act-plus 1.1.78 → 1.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/act-plus.umd.cjs CHANGED
@@ -1,40 +1,40 @@
1
- (function(vt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router"),require("element-plus"),require("tinymce/tinymce"),require("tinymce/icons/default/icons"),require("tinymce/models/dom"),require("tinymce/themes/silver"),require("tinymce/plugins/image"),require("tinymce/plugins/table"),require("tinymce/plugins/lists"),require("tinymce/plugins/wordcount"),require("tinymce/plugins/preview"),require("tinymce/plugins/emoticons"),require("tinymce/plugins/emoticons/js/emojis.js"),require("tinymce/plugins/code"),require("tinymce/plugins/link"),require("tinymce/plugins/advlist"),require("tinymce/plugins/codesample"),require("tinymce/plugins/autoresize"),require("tinymce/plugins/quickbars"),require("tinymce/plugins/nonbreaking"),require("tinymce/plugins/searchreplace"),require("tinymce/plugins/autolink"),require("tinymce/plugins/directionality"),require("tinymce/plugins/visualblocks"),require("tinymce/plugins/visualchars"),require("tinymce/plugins/charmap"),require("tinymce/plugins/insertdatetime"),require("tinymce/plugins/importcss"),require("tinymce/plugins/accordion"),require("tinymce/plugins/anchor"),require("tinymce/plugins/fullscreen")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","element-plus","tinymce/tinymce","tinymce/icons/default/icons","tinymce/models/dom","tinymce/themes/silver","tinymce/plugins/image","tinymce/plugins/table","tinymce/plugins/lists","tinymce/plugins/wordcount","tinymce/plugins/preview","tinymce/plugins/emoticons","tinymce/plugins/emoticons/js/emojis.js","tinymce/plugins/code","tinymce/plugins/link","tinymce/plugins/advlist","tinymce/plugins/codesample","tinymce/plugins/autoresize","tinymce/plugins/quickbars","tinymce/plugins/nonbreaking","tinymce/plugins/searchreplace","tinymce/plugins/autolink","tinymce/plugins/directionality","tinymce/plugins/visualblocks","tinymce/plugins/visualchars","tinymce/plugins/charmap","tinymce/plugins/insertdatetime","tinymce/plugins/importcss","tinymce/plugins/accordion","tinymce/plugins/anchor","tinymce/plugins/fullscreen"],l):(vt=typeof globalThis<"u"?globalThis:vt||self,l(vt["act-plus"]={},vt.Vue,vt.VueRouter,vt.elementPlus,vt.tinymce))})(this,function(vt,l,rn,Ne,hr){"use strict";const gT="";/*!
2
- * shared v10.0.5
3
- * (c) 2024 kazuya kawaguchi
1
+ (function(Bt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router"),require("element-plus"),require("tinymce/tinymce"),require("tinymce/icons/default/icons"),require("tinymce/models/dom"),require("tinymce/themes/silver"),require("tinymce/plugins/image"),require("tinymce/plugins/table"),require("tinymce/plugins/lists"),require("tinymce/plugins/wordcount"),require("tinymce/plugins/preview"),require("tinymce/plugins/emoticons"),require("tinymce/plugins/emoticons/js/emojis.js"),require("tinymce/plugins/code"),require("tinymce/plugins/link"),require("tinymce/plugins/advlist"),require("tinymce/plugins/codesample"),require("tinymce/plugins/autoresize"),require("tinymce/plugins/quickbars"),require("tinymce/plugins/nonbreaking"),require("tinymce/plugins/searchreplace"),require("tinymce/plugins/autolink"),require("tinymce/plugins/directionality"),require("tinymce/plugins/visualblocks"),require("tinymce/plugins/visualchars"),require("tinymce/plugins/charmap"),require("tinymce/plugins/insertdatetime"),require("tinymce/plugins/importcss"),require("tinymce/plugins/accordion"),require("tinymce/plugins/anchor"),require("tinymce/plugins/fullscreen")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","element-plus","tinymce/tinymce","tinymce/icons/default/icons","tinymce/models/dom","tinymce/themes/silver","tinymce/plugins/image","tinymce/plugins/table","tinymce/plugins/lists","tinymce/plugins/wordcount","tinymce/plugins/preview","tinymce/plugins/emoticons","tinymce/plugins/emoticons/js/emojis.js","tinymce/plugins/code","tinymce/plugins/link","tinymce/plugins/advlist","tinymce/plugins/codesample","tinymce/plugins/autoresize","tinymce/plugins/quickbars","tinymce/plugins/nonbreaking","tinymce/plugins/searchreplace","tinymce/plugins/autolink","tinymce/plugins/directionality","tinymce/plugins/visualblocks","tinymce/plugins/visualchars","tinymce/plugins/charmap","tinymce/plugins/insertdatetime","tinymce/plugins/importcss","tinymce/plugins/accordion","tinymce/plugins/anchor","tinymce/plugins/fullscreen"],l):(Bt=typeof globalThis<"u"?globalThis:Bt||self,l(Bt["act-plus"]={},Bt.Vue,Bt.VueRouter,Bt.elementPlus,Bt.tinymce))})(this,function(Bt,l,rn,Ve,dr){"use strict";const PQ="";/*!
2
+ * shared v10.0.8
3
+ * (c) 2025 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
- */const Yt=typeof window<"u";let Rt,on;if(process.env.NODE_ENV!=="production"){const i=Yt&&window.performance;i&&i.mark&&i.measure&&i.clearMarks&&i.clearMeasures&&(Rt=e=>{i.mark(e)},on=(e,t,n)=>{i.measure(e,t,n),i.clearMarks(t),i.clearMarks(n)})}const KO=/\{([0-9a-zA-Z]+)\}/g;function ur(i,...e){return e.length===1&&Ce(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),i.replace(KO,(t,n)=>e.hasOwnProperty(n)?e[n]:"")}const si=(i,e=!1)=>e?Symbol.for(i):Symbol(i),JO=(i,e,t)=>e_({l:i,k:e,s:t}),e_=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ye=i=>typeof i=="number"&&isFinite(i),t_=i=>sl(i)==="[object Date]",An=i=>sl(i)==="[object RegExp]",fr=i=>ke(i)&&Object.keys(i).length===0,tt=Object.assign,i_=Object.create,Ve=(i=null)=>i_(i);let gh;const ln=()=>gh||(gh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ve());function Oh(i){return i.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const n_=Object.prototype.hasOwnProperty;function zt(i,e){return n_.call(i,e)}const We=Array.isArray,Le=i=>typeof i=="function",ne=i=>typeof i=="string",Te=i=>typeof i=="boolean",Ce=i=>i!==null&&typeof i=="object",s_=i=>Ce(i)&&Le(i.then)&&Le(i.catch),_h=Object.prototype.toString,sl=i=>_h.call(i),ke=i=>sl(i)==="[object Object]",r_=i=>i==null?"":We(i)||ke(i)&&i.toString===_h?JSON.stringify(i,null,2):String(i);function rl(i,e=""){return i.reduce((t,n,s)=>s===0?t+n:t+e+n,"")}const bh=2;function o_(i,e=0,t=i.length){const n=i.split(/\r?\n/);let s=0;const r=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=e){for(let a=o-bh;a<=o+bh||t>s;a++){if(a<0||a>=n.length)continue;const c=a+1;r.push(`${c}${" ".repeat(3-String(c).length)}| ${n[a]}`);const h=n[a].length;if(a===o){const u=e-(s-h)+1,f=Math.max(1,t>s?h-u:t-e);r.push(" | "+" ".repeat(u)+"^".repeat(f))}else if(a>o){if(t>s){const u=Math.max(Math.min(t-s,h),1);r.push(" | "+"^".repeat(u))}s+=h+1}}break}return r.join(`
6
- `)}function Bi(i,e){typeof console<"u"&&(console.warn("[intlify] "+i),e&&console.warn(e.stack))}const yh={};function wh(i){yh[i]||(yh[i]=!0,Bi(i))}function ol(){const i=new Map;return{events:i,on(t,n){const s=i.get(t);s&&s.push(n)||i.set(t,[n])},off(t,n){const s=i.get(t);s&&s.splice(s.indexOf(n)>>>0,1)},emit(t,n){(i.get(t)||[]).slice().map(s=>s(n)),(i.get("*")||[]).slice().map(s=>s(t,n))}}}const dr=i=>!Ce(i)||We(i);function pr(i,e){if(dr(i)||dr(e))throw new Error("Invalid value");const t=[{src:i,des:e}];for(;t.length;){const{src:n,des:s}=t.pop();Object.keys(n).forEach(r=>{r!=="__proto__"&&(Ce(n[r])&&!Ce(s[r])&&(s[r]=Array.isArray(n[r])?[]:Ve()),dr(s[r])||dr(n[r])?s[r]=n[r]:t.push({src:n[r],des:s[r]}))})}}/*!
7
- * message-compiler v10.0.5
8
- * (c) 2024 kazuya kawaguchi
5
+ */function xi(i,e){typeof console<"u"&&(console.warn("[intlify] "+i),e&&console.warn(e.stack))}const _u={};function bu(i){_u[i]||(_u[i]=!0,xi(i))}const zt=typeof window<"u";let Rt,on;if(process.env.NODE_ENV!=="production"){const i=zt&&window.performance;i&&i.mark&&i.measure&&i.clearMarks&&i.clearMeasures&&(Rt=e=>{i.mark(e)},on=(e,t,n)=>{i.measure(e,t,n),i.clearMarks(t),i.clearMarks(n)})}const p_=/\{([0-9a-zA-Z]+)\}/g;function pr(i,...e){return e.length===1&&Te(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),i.replace(p_,(t,n)=>e.hasOwnProperty(n)?e[n]:"")}const ri=(i,e=!1)=>e?Symbol.for(i):Symbol(i),m_=(i,e,t)=>g_({l:i,k:e,s:t}),g_=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ze=i=>typeof i=="number"&&isFinite(i),O_=i=>rl(i)==="[object Date]",Tn=i=>rl(i)==="[object RegExp]",mr=i=>xe(i)&&Object.keys(i).length===0,tt=Object.assign,__=Object.create,Me=(i=null)=>__(i);let yu;const ln=()=>yu||(yu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Me());function wu(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function ku(i){return i.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function b_(i){return i=i.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,s,r)=>`${s}="${ku(r)}"`),i=i.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,s,r)=>`${s}='${ku(r)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(i)&&(process.env.NODE_ENV!=="production"&&xi("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),i=i.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{i=i.replace(n,"$1javascript&#58;")}),i}const y_=Object.prototype.hasOwnProperty;function Yt(i,e){return y_.call(i,e)}const je=Array.isArray,ve=i=>typeof i=="function",te=i=>typeof i=="string",Ne=i=>typeof i=="boolean",Te=i=>i!==null&&typeof i=="object",w_=i=>Te(i)&&ve(i.then)&&ve(i.catch),xu=Object.prototype.toString,rl=i=>xu.call(i),xe=i=>rl(i)==="[object Object]",k_=i=>i==null?"":je(i)||xe(i)&&i.toString===xu?JSON.stringify(i,null,2):String(i);function ol(i,e=""){return i.reduce((t,n,s)=>s===0?t+n:t+e+n,"")}const Su=2;function x_(i,e=0,t=i.length){const n=i.split(/\r?\n/);let s=0;const r=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=e){for(let a=o-Su;a<=o+Su||t>s;a++){if(a<0||a>=n.length)continue;const c=a+1;r.push(`${c}${" ".repeat(3-String(c).length)}| ${n[a]}`);const u=n[a].length;if(a===o){const h=e-(s-u)+1,f=Math.max(1,t>s?u-h:t-e);r.push(" | "+" ".repeat(h)+"^".repeat(f))}else if(a>o){if(t>s){const h=Math.max(Math.min(t-s,u),1);r.push(" | "+"^".repeat(h))}s+=u+1}}break}return r.join(`
6
+ `)}function ll(){const i=new Map;return{events:i,on(t,n){const s=i.get(t);s&&s.push(n)||i.set(t,[n])},off(t,n){const s=i.get(t);s&&s.splice(s.indexOf(n)>>>0,1)},emit(t,n){(i.get(t)||[]).slice().map(s=>s(n)),(i.get("*")||[]).slice().map(s=>s(t,n))}}}const gr=i=>!Te(i)||je(i);function Or(i,e){if(gr(i)||gr(e))throw new Error("Invalid value");const t=[{src:i,des:e}];for(;t.length;){const{src:n,des:s}=t.pop();Object.keys(n).forEach(r=>{r!=="__proto__"&&(Te(n[r])&&!Te(s[r])&&(s[r]=Array.isArray(n[r])?[]:Me()),gr(s[r])||gr(n[r])?s[r]=n[r]:t.push({src:n[r],des:s[r]}))})}}/*!
7
+ * message-compiler v10.0.8
8
+ * (c) 2025 kazuya kawaguchi
9
9
  * Released under the MIT License.
10
- */function l_(i,e,t){return{line:i,column:e,offset:t}}function ll(i,e,t){const n={start:i,end:e};return t!=null&&(n.source=t),n}const be={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},a_=17,c_={[be.EXPECTED_TOKEN]:"Expected token: '{0}'",[be.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[be.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[be.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[be.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[be.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[be.EMPTY_PLACEHOLDER]:"Empty placeholder",[be.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[be.INVALID_LINKED_FORMAT]:"Invalid linked format",[be.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[be.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[be.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[be.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[be.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[be.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Qn(i,e,t={}){const{domain:n,messages:s,args:r}=t,o=process.env.NODE_ENV!=="production"?ur((s||c_)[i]||"",...r||[]):i,a=new SyntaxError(String(o));return a.code=i,e&&(a.location=e),a.domain=n,a}function h_(i){throw i}const u_=/<\/?[\w\s="/.':;#-\/]+>/,f_=i=>u_.test(i),Si=" ",d_="\r",bt=`
11
- `,p_=String.fromCharCode(8232),m_=String.fromCharCode(8233);function g_(i){const e=i;let t=0,n=1,s=1,r=0;const o=k=>e[k]===d_&&e[k+1]===bt,a=k=>e[k]===bt,c=k=>e[k]===m_,h=k=>e[k]===p_,u=k=>o(k)||a(k)||c(k)||h(k),f=()=>t,d=()=>n,m=()=>s,b=()=>r,w=k=>o(k)||c(k)||h(k)?bt:e[k],g=()=>w(t),p=()=>w(t+r);function O(){return r=0,u(t)&&(n++,s=0),o(t)&&t++,t++,s++,e[t]}function C(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,n=1,s=1,r=0}function E(k=0){r=k}function x(){const k=t+r;for(;k!==t;)O();r=0}return{index:f,line:d,column:m,peekOffset:b,charAt:w,currentChar:g,currentPeek:p,next:O,peek:C,reset:y,resetPeek:E,skipToPeek:x}}const Di=void 0,O_=".",kh="'",__="tokenizer";function b_(i,e={}){const t=e.location!==!1,n=g_(i),s=()=>n.index(),r=()=>l_(n.line(),n.column(),n.index()),o=r(),a=s(),c={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},h=()=>c,{onError:u}=e;function f(R,Q,W,...Y){const $e=h();if(Q.column+=W,Q.offset+=W,u){const Xe=t?ll($e.startLoc,Q):null,Qe=Qn(R,Xe,{domain:__,args:Y});u(Qe)}}function d(R,Q,W){R.endLoc=r(),R.currentType=Q;const Y={type:Q};return t&&(Y.loc=ll(R.startLoc,R.endLoc)),W!=null&&(Y.value=W),Y}const m=R=>d(R,13);function b(R,Q){return R.currentChar()===Q?(R.next(),Q):(f(be.EXPECTED_TOKEN,r(),0,Q),"")}function w(R){let Q="";for(;R.currentPeek()===Si||R.currentPeek()===bt;)Q+=R.currentPeek(),R.peek();return Q}function g(R){const Q=w(R);return R.skipToPeek(),Q}function p(R){if(R===Di)return!1;const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q===95}function O(R){if(R===Di)return!1;const Q=R.charCodeAt(0);return Q>=48&&Q<=57}function C(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function y(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=R.currentPeek()==="-"?R.peek():R.currentPeek(),$e=O(Y);return R.resetPeek(),$e}function E(R,Q){const{currentType:W}=Q;if(W!==2)return!1;w(R);const Y=R.currentPeek()===kh;return R.resetPeek(),Y}function x(R,Q){const{currentType:W}=Q;if(W!==7)return!1;w(R);const Y=R.currentPeek()===".";return R.resetPeek(),Y}function k(R,Q){const{currentType:W}=Q;if(W!==8)return!1;w(R);const Y=p(R.currentPeek());return R.resetPeek(),Y}function P(R,Q){const{currentType:W}=Q;if(!(W===7||W===11))return!1;w(R);const Y=R.currentPeek()===":";return R.resetPeek(),Y}function N(R,Q){const{currentType:W}=Q;if(W!==9)return!1;const Y=()=>{const Xe=R.currentPeek();return Xe==="{"?p(R.peek()):Xe==="@"||Xe==="|"||Xe===":"||Xe==="."||Xe===Si||!Xe?!1:Xe===bt?(R.peek(),Y()):A(R,!1)},$e=Y();return R.resetPeek(),$e}function _(R){w(R);const Q=R.currentPeek()==="|";return R.resetPeek(),Q}function A(R,Q=!0){const W=($e=!1,Xe="")=>{const Qe=R.currentPeek();return Qe==="{"||Qe==="@"||!Qe?$e:Qe==="|"?!(Xe===Si||Xe===bt):Qe===Si?(R.peek(),W(!0,Si)):Qe===bt?(R.peek(),W(!0,bt)):!0},Y=W();return Q&&R.resetPeek(),Y}function S(R,Q){const W=R.currentChar();return W===Di?Di:Q(W)?(R.next(),W):null}function M(R){const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q>=48&&Q<=57||Q===95||Q===36}function T(R){return S(R,M)}function I(R){const Q=R.charCodeAt(0);return Q>=97&&Q<=122||Q>=65&&Q<=90||Q>=48&&Q<=57||Q===95||Q===36||Q===45}function B(R){return S(R,I)}function U(R){const Q=R.charCodeAt(0);return Q>=48&&Q<=57}function Z(R){return S(R,U)}function K(R){const Q=R.charCodeAt(0);return Q>=48&&Q<=57||Q>=65&&Q<=70||Q>=97&&Q<=102}function X(R){return S(R,K)}function J(R){let Q="",W="";for(;Q=Z(R);)W+=Q;return W}function fe(R){let Q="";for(;;){const W=R.currentChar();if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W===Si||W===bt)if(A(R))Q+=W,R.next();else{if(_(R))break;Q+=W,R.next()}else Q+=W,R.next()}return Q}function he(R){g(R);let Q="",W="";for(;Q=B(R);)W+=Q;return R.currentChar()===Di&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W}function ye(R){g(R);let Q="";return R.currentChar()==="-"?(R.next(),Q+=`-${J(R)}`):Q+=J(R),R.currentChar()===Di&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),Q}function z(R){return R!==kh&&R!==bt}function D(R){g(R),b(R,"'");let Q="",W="";for(;Q=S(R,z);)Q==="\\"?W+=V(R):W+=Q;const Y=R.currentChar();return Y===bt||Y===Di?(f(be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),Y===bt&&(R.next(),b(R,"'")),W):(b(R,"'"),W)}function V(R){const Q=R.currentChar();switch(Q){case"\\":case"'":return R.next(),`\\${Q}`;case"u":return q(R,Q,4);case"U":return q(R,Q,6);default:return f(be.UNKNOWN_ESCAPE_SEQUENCE,r(),0,Q),""}}function q(R,Q,W){b(R,Q);let Y="";for(let $e=0;$e<W;$e++){const Xe=X(R);if(!Xe){f(be.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${Q}${Y}${R.currentChar()}`);break}Y+=Xe}return`\\${Q}${Y}`}function H(R){return R!=="{"&&R!=="}"&&R!==Si&&R!==bt}function Ue(R){g(R);let Q="",W="";for(;Q=S(R,H);)W+=Q;return W}function Ri(R){let Q="",W="";for(;Q=T(R);)W+=Q;return W}function Re(R){const Q=W=>{const Y=R.currentChar();return Y==="{"||Y==="@"||Y==="|"||Y==="("||Y===")"||!Y||Y===Si?W:(W+=Y,R.next(),Q(W))};return Q("")}function qe(R){g(R);const Q=b(R,"|");return g(R),Q}function Wt(R,Q){let W=null;switch(R.currentChar()){case"{":return Q.braceNest>=1&&f(be.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),R.next(),W=d(Q,2,"{"),g(R),Q.braceNest++,W;case"}":return Q.braceNest>0&&Q.currentType===2&&f(be.EMPTY_PLACEHOLDER,r(),0),R.next(),W=d(Q,3,"}"),Q.braceNest--,Q.braceNest>0&&g(R),Q.inLinked&&Q.braceNest===0&&(Q.inLinked=!1),W;case"@":return Q.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W=Dt(R,Q)||m(Q),Q.braceNest=0,W;default:{let $e=!0,Xe=!0,Qe=!0;if(_(R))return Q.braceNest>0&&f(be.UNTERMINATED_CLOSING_BRACE,r(),0),W=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,W;if(Q.braceNest>0&&(Q.currentType===4||Q.currentType===5||Q.currentType===6))return f(be.UNTERMINATED_CLOSING_BRACE,r(),0),Q.braceNest=0,ki(R,Q);if($e=C(R,Q))return W=d(Q,4,he(R)),g(R),W;if(Xe=y(R,Q))return W=d(Q,5,ye(R)),g(R),W;if(Qe=E(R,Q))return W=d(Q,6,D(R)),g(R),W;if(!$e&&!Xe&&!Qe)return W=d(Q,12,Ue(R)),f(be.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,W.value),g(R),W;break}}return W}function Dt(R,Q){const{currentType:W}=Q;let Y=null;const $e=R.currentChar();switch((W===7||W===8||W===11||W===9)&&($e===bt||$e===Si)&&f(be.INVALID_LINKED_FORMAT,r(),0),$e){case"@":return R.next(),Y=d(Q,7,"@"),Q.inLinked=!0,Y;case".":return g(R),R.next(),d(Q,8,".");case":":return g(R),R.next(),d(Q,9,":");default:return _(R)?(Y=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,Y):x(R,Q)||P(R,Q)?(g(R),Dt(R,Q)):k(R,Q)?(g(R),d(Q,11,Ri(R))):N(R,Q)?(g(R),$e==="{"?Wt(R,Q)||Y:d(Q,10,Re(R))):(W===7&&f(be.INVALID_LINKED_FORMAT,r(),0),Q.braceNest=0,Q.inLinked=!1,ki(R,Q))}}function ki(R,Q){let W={type:13};if(Q.braceNest>0)return Wt(R,Q)||m(Q);if(Q.inLinked)return Dt(R,Q)||m(Q);switch(R.currentChar()){case"{":return Wt(R,Q)||m(Q);case"}":return f(be.UNBALANCED_CLOSING_BRACE,r(),0),R.next(),d(Q,3,"}");case"@":return Dt(R,Q)||m(Q);default:{if(_(R))return W=d(Q,1,qe(R)),Q.braceNest=0,Q.inLinked=!1,W;if(A(R))return d(Q,0,fe(R));break}}return W}function Vi(){const{currentType:R,offset:Q,startLoc:W,endLoc:Y}=c;return c.lastType=R,c.lastOffset=Q,c.lastStartLoc=W,c.lastEndLoc=Y,c.offset=s(),c.startLoc=r(),n.currentChar()===Di?d(c,13):ki(n,c)}return{nextToken:Vi,currentOffset:s,currentPosition:r,context:h}}const y_="parser",w_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function k_(i,e,t){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||t,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function x_(i={}){const e=i.location!==!1,{onError:t}=i;function n(p,O,C,y,...E){const x=p.currentPosition();if(x.offset+=y,x.column+=y,t){const k=e?ll(C,x):null,P=Qn(O,k,{domain:y_,args:E});t(P)}}function s(p,O,C){const y={type:p};return e&&(y.start=O,y.end=O,y.loc={start:C,end:C}),y}function r(p,O,C,y){e&&(p.end=O,p.loc&&(p.loc.end=C))}function o(p,O){const C=p.context(),y=s(3,C.offset,C.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function a(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(5,y,E);return x.index=parseInt(O,10),p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function c(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(4,y,E);return x.key=O,p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function h(p,O){const C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(9,y,E);return x.value=O.replace(w_,k_),p.nextToken(),r(x,p.currentOffset(),p.currentPosition()),x}function u(p){const O=p.nextToken(),C=p.context(),{lastOffset:y,lastStartLoc:E}=C,x=s(8,y,E);return O.type!==11?(n(p,be.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),x.value="",r(x,y,E),{nextConsumeToken:O,node:x}):(O.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ri(O)),x.value=O.value||"",r(x,p.currentOffset(),p.currentPosition()),{node:x})}function f(p,O){const C=p.context(),y=s(7,C.offset,C.startLoc);return y.value=O,r(y,p.currentOffset(),p.currentPosition()),y}function d(p){const O=p.context(),C=s(6,O.offset,O.startLoc);let y=p.nextToken();if(y.type===8){const E=u(p);C.modifier=E.node,y=E.nextConsumeToken||p.nextToken()}switch(y.type!==9&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),y=p.nextToken(),y.type===2&&(y=p.nextToken()),y.type){case 10:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=f(p,y.value||"");break;case 4:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=c(p,y.value||"");break;case 5:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=a(p,y.value||"");break;case 6:y.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(y)),C.key=h(p,y.value||"");break;default:{n(p,be.UNEXPECTED_EMPTY_LINKED_KEY,O.lastStartLoc,0);const E=p.context(),x=s(7,E.offset,E.startLoc);return x.value="",r(x,E.offset,E.startLoc),C.key=x,r(C,E.offset,E.startLoc),{nextConsumeToken:y,node:C}}}return r(C,p.currentOffset(),p.currentPosition()),{node:C}}function m(p){const O=p.context(),C=O.currentType===1?p.currentOffset():O.offset,y=O.currentType===1?O.endLoc:O.startLoc,E=s(2,C,y);E.items=[];let x=null;do{const N=x||p.nextToken();switch(x=null,N.type){case 0:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(o(p,N.value||""));break;case 5:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(a(p,N.value||""));break;case 4:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(c(p,N.value||""));break;case 6:N.value==null&&n(p,be.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,ri(N)),E.items.push(h(p,N.value||""));break;case 7:{const _=d(p);E.items.push(_.node),x=_.nextConsumeToken||null;break}}}while(O.currentType!==13&&O.currentType!==1);const k=O.currentType===1?O.lastOffset:p.currentOffset(),P=O.currentType===1?O.lastEndLoc:p.currentPosition();return r(E,k,P),E}function b(p,O,C,y){const E=p.context();let x=y.items.length===0;const k=s(1,O,C);k.cases=[],k.cases.push(y);do{const P=m(p);x||(x=P.items.length===0),k.cases.push(P)}while(E.currentType!==13);return x&&n(p,be.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),r(k,p.currentOffset(),p.currentPosition()),k}function w(p){const O=p.context(),{offset:C,startLoc:y}=O,E=m(p);return O.currentType===13?E:b(p,C,y,E)}function g(p){const O=b_(p,tt({},i)),C=O.context(),y=s(0,C.offset,C.startLoc);return e&&y.loc&&(y.loc.source=p),y.body=w(O),i.onCacheKey&&(y.cacheKey=i.onCacheKey(p)),C.currentType!==13&&n(O,be.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,p[C.offset]||""),r(y,O.currentOffset(),O.currentPosition()),y}return{parse:g}}function ri(i){if(i.type===13)return"EOF";const e=(i.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function S_(i,e={}){const t={ast:i,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function xh(i,e){for(let t=0;t<i.length;t++)al(i[t],e)}function al(i,e){switch(i.type){case 1:xh(i.cases,e),e.helper("plural");break;case 2:xh(i.items,e);break;case 6:{al(i.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function C_(i,e={}){const t=S_(i);t.helper("normalize"),i.body&&al(i.body,t);const n=t.context();i.helpers=Array.from(n.helpers)}function A_(i){const e=i.body;return e.type===2?Sh(e):e.cases.forEach(t=>Sh(t)),i}function Sh(i){if(i.items.length===1){const e=i.items[0];(e.type===3||e.type===9)&&(i.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<i.items.length;t++){const n=i.items[t];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===i.items.length){i.static=rl(e);for(let t=0;t<i.items.length;t++){const n=i.items[t];(n.type===3||n.type===9)&&delete n.value}}}}const Q_="minifier";function Pn(i){switch(i.t=i.type,i.type){case 0:{const e=i;Pn(e.body),e.b=e.body,delete e.body;break}case 1:{const e=i,t=e.cases;for(let n=0;n<t.length;n++)Pn(t[n]);e.c=t,delete e.cases;break}case 2:{const e=i,t=e.items;for(let n=0;n<t.length;n++)Pn(t[n]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=i;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=i;Pn(e.key),e.k=e.key,delete e.key,e.modifier&&(Pn(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=i;e.i=e.index,delete e.index;break}case 4:{const e=i;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Q_,args:[i.type]})}delete i.type}const P_="parser";function T_(i,e){const{sourceMap:t,filename:n,breakLineCode:s,needIndent:r}=e,o=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:s,needIndent:r,indentLevel:0};o&&i.loc&&(a.source=i.loc.source);const c=()=>a;function h(g,p){a.code+=g}function u(g,p=!0){const O=p?s:"";h(r?O+" ".repeat(g):O)}function f(g=!0){const p=++a.indentLevel;g&&u(p)}function d(g=!0){const p=--a.indentLevel;g&&u(p)}function m(){u(a.indentLevel)}return{context:c,push:h,indent:f,deindent:d,newline:m,helper:g=>`_${g}`,needIndent:()=>a.needIndent}}function E_(i,e){const{helper:t}=i;i.push(`${t("linked")}(`),Tn(i,e.key),e.modifier?(i.push(", "),Tn(i,e.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function $_(i,e){const{helper:t,needIndent:n}=i;i.push(`${t("normalize")}([`),i.indent(n());const s=e.items.length;for(let r=0;r<s&&(Tn(i,e.items[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}function N_(i,e){const{helper:t,needIndent:n}=i;if(e.cases.length>1){i.push(`${t("plural")}([`),i.indent(n());const s=e.cases.length;for(let r=0;r<s&&(Tn(i,e.cases[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}}function R_(i,e){e.body?Tn(i,e.body):i.push("null")}function Tn(i,e){const{helper:t}=i;switch(e.type){case 0:R_(i,e);break;case 1:N_(i,e);break;case 2:$_(i,e);break;case 6:E_(i,e);break;case 8:i.push(JSON.stringify(e.value),e);break;case 7:i.push(JSON.stringify(e.value),e);break;case 5:i.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:i.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:i.push(JSON.stringify(e.value),e);break;case 3:i.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Qn(be.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:P_,args:[e.type]})}}const V_=(i,e={})=>{const t=ne(e.mode)?e.mode:"normal",n=ne(e.filename)?e.filename:"message.intl",s=!!e.sourceMap,r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
12
- `,o=e.needIndent?e.needIndent:t!=="arrow",a=i.helpers||[],c=T_(i,{mode:t,filename:n,sourceMap:s,breakLineCode:r,needIndent:o});c.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),a.length>0&&(c.push(`const { ${rl(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),c.newline()),c.push("return "),Tn(c,i),c.deindent(o),c.push("}"),delete i.helpers;const{code:h,map:u}=c.context();return{ast:i,code:h,map:u?u.toJSON():void 0}};function L_(i,e={}){const t=tt({},e),n=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=x_(t).parse(i);return n?(r&&A_(a),s&&Pn(a),{ast:a,code:""}):(C_(a,t),V_(a,t))}/*!
13
- * core-base v10.0.5
14
- * (c) 2024 kazuya kawaguchi
10
+ */function S_(i,e,t){return{line:i,column:e,offset:t}}function al(i,e,t){const n={start:i,end:e};return t!=null&&(n.source=t),n}const we={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},C_=17,A_={[we.EXPECTED_TOKEN]:"Expected token: '{0}'",[we.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[we.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[we.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[we.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[we.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[we.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[we.EMPTY_PLACEHOLDER]:"Empty placeholder",[we.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[we.INVALID_LINKED_FORMAT]:"Invalid linked format",[we.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[we.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[we.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[we.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[we.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[we.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Pn(i,e,t={}){const{domain:n,messages:s,args:r}=t,o=process.env.NODE_ENV!=="production"?pr((s||A_)[i]||"",...r||[]):i,a=new SyntaxError(String(o));return a.code=i,e&&(a.location=e),a.domain=n,a}function T_(i){throw i}const P_=/<\/?[\w\s="/.':;#-\/]+>/,Q_=i=>P_.test(i),Si=" ",E_="\r",bt=`
11
+ `,$_=String.fromCharCode(8232),N_=String.fromCharCode(8233);function R_(i){const e=i;let t=0,n=1,s=1,r=0;const o=k=>e[k]===E_&&e[k+1]===bt,a=k=>e[k]===bt,c=k=>e[k]===N_,u=k=>e[k]===$_,h=k=>o(k)||a(k)||c(k)||u(k),f=()=>t,d=()=>n,m=()=>s,b=()=>r,w=k=>o(k)||c(k)||u(k)?bt:e[k],g=()=>w(t),p=()=>w(t+r);function y(){return r=0,h(t)&&(n++,s=0),o(t)&&t++,t++,s++,e[t]}function x(){return o(t+r)&&r++,r++,e[t+r]}function O(){t=0,n=1,s=1,r=0}function Q(k=0){r=k}function S(){const k=t+r;for(;k!==t;)y();r=0}return{index:f,line:d,column:m,peekOffset:b,charAt:w,currentChar:g,currentPeek:p,next:y,peek:x,reset:O,resetPeek:Q,skipToPeek:S}}const Bi=void 0,V_=".",Cu="'",L_="tokenizer";function M_(i,e={}){const t=e.location!==!1,n=R_(i),s=()=>n.index(),r=()=>S_(n.line(),n.column(),n.index()),o=r(),a=s(),c={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},u=()=>c,{onError:h}=e;function f(V,R,L,...pe){const ce=u();if(R.column+=L,R.offset+=L,h){const Le=t?al(ce.startLoc,R):null,Ee=Pn(V,Le,{domain:L_,args:pe});h(Ee)}}function d(V,R,L){V.endLoc=r(),V.currentType=R;const pe={type:R};return t&&(pe.loc=al(V.startLoc,V.endLoc)),L!=null&&(pe.value=L),pe}const m=V=>d(V,13);function b(V,R){return V.currentChar()===R?(V.next(),R):(f(we.EXPECTED_TOKEN,r(),0,R),"")}function w(V){let R="";for(;V.currentPeek()===Si||V.currentPeek()===bt;)R+=V.currentPeek(),V.peek();return R}function g(V){const R=w(V);return V.skipToPeek(),R}function p(V){if(V===Bi)return!1;const R=V.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function y(V){if(V===Bi)return!1;const R=V.charCodeAt(0);return R>=48&&R<=57}function x(V,R){const{currentType:L}=R;if(L!==2)return!1;w(V);const pe=p(V.currentPeek());return V.resetPeek(),pe}function O(V,R){const{currentType:L}=R;if(L!==2)return!1;w(V);const pe=V.currentPeek()==="-"?V.peek():V.currentPeek(),ce=y(pe);return V.resetPeek(),ce}function Q(V,R){const{currentType:L}=R;if(L!==2)return!1;w(V);const pe=V.currentPeek()===Cu;return V.resetPeek(),pe}function S(V,R){const{currentType:L}=R;if(L!==7)return!1;w(V);const pe=V.currentPeek()===".";return V.resetPeek(),pe}function k(V,R){const{currentType:L}=R;if(L!==8)return!1;w(V);const pe=p(V.currentPeek());return V.resetPeek(),pe}function T(V,R){const{currentType:L}=R;if(!(L===7||L===11))return!1;w(V);const pe=V.currentPeek()===":";return V.resetPeek(),pe}function $(V,R){const{currentType:L}=R;if(L!==9)return!1;const pe=()=>{const Le=V.currentPeek();return Le==="{"?p(V.peek()):Le==="@"||Le==="|"||Le===":"||Le==="."||Le===Si||!Le?!1:Le===bt?(V.peek(),pe()):A(V,!1)},ce=pe();return V.resetPeek(),ce}function _(V){w(V);const R=V.currentPeek()==="|";return V.resetPeek(),R}function A(V,R=!0){const L=(ce=!1,Le="")=>{const Ee=V.currentPeek();return Ee==="{"||Ee==="@"||!Ee?ce:Ee==="|"?!(Le===Si||Le===bt):Ee===Si?(V.peek(),L(!0,Si)):Ee===bt?(V.peek(),L(!0,bt)):!0},pe=L();return R&&V.resetPeek(),pe}function C(V,R){const L=V.currentChar();return L===Bi?Bi:R(L)?(V.next(),L):null}function D(V){const R=V.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function P(V){return C(V,D)}function F(V){const R=V.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function B(V){return C(V,F)}function U(V){const R=V.charCodeAt(0);return R>=48&&R<=57}function oe(V){return C(V,U)}function Z(V){const R=V.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function G(V){return C(V,Z)}function j(V){let R="",L="";for(;R=oe(V);)L+=R;return L}function K(V){let R="";for(;;){const L=V.currentChar();if(L==="{"||L==="}"||L==="@"||L==="|"||!L)break;if(L===Si||L===bt)if(A(V))R+=L,V.next();else{if(_(V))break;R+=L,V.next()}else R+=L,V.next()}return R}function de(V){g(V);let R="",L="";for(;R=B(V);)L+=R;return V.currentChar()===Bi&&f(we.UNTERMINATED_CLOSING_BRACE,r(),0),L}function fe(V){g(V);let R="";return V.currentChar()==="-"?(V.next(),R+=`-${j(V)}`):R+=j(V),V.currentChar()===Bi&&f(we.UNTERMINATED_CLOSING_BRACE,r(),0),R}function he(V){return V!==Cu&&V!==bt}function v(V){g(V),b(V,"'");let R="",L="";for(;R=C(V,he);)R==="\\"?L+=N(V):L+=R;const pe=V.currentChar();return pe===bt||pe===Bi?(f(we.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),pe===bt&&(V.next(),b(V,"'")),L):(b(V,"'"),L)}function N(V){const R=V.currentChar();switch(R){case"\\":case"'":return V.next(),`\\${R}`;case"u":return q(V,R,4);case"U":return q(V,R,6);default:return f(we.UNKNOWN_ESCAPE_SEQUENCE,r(),0,R),""}}function q(V,R,L){b(V,R);let pe="";for(let ce=0;ce<L;ce++){const Le=G(V);if(!Le){f(we.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${R}${pe}${V.currentChar()}`);break}pe+=Le}return`\\${R}${pe}`}function Y(V){return V!=="{"&&V!=="}"&&V!==Si&&V!==bt}function Qe(V){g(V);let R="",L="";for(;R=C(V,Y);)L+=R;return L}function Vi(V){let R="",L="";for(;R=P(V);)L+=R;return L}function Li(V){const R=L=>{const pe=V.currentChar();return pe==="{"||pe==="@"||pe==="|"||pe==="("||pe===")"||!pe||pe===Si?L:(L+=pe,V.next(),R(L))};return R("")}function Ae(V){g(V);const R=b(V,"|");return g(V),R}function qe(V,R){let L=null;switch(V.currentChar()){case"{":return R.braceNest>=1&&f(we.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),V.next(),L=d(R,2,"{"),g(V),R.braceNest++,L;case"}":return R.braceNest>0&&R.currentType===2&&f(we.EMPTY_PLACEHOLDER,r(),0),V.next(),L=d(R,3,"}"),R.braceNest--,R.braceNest>0&&g(V),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),L;case"@":return R.braceNest>0&&f(we.UNTERMINATED_CLOSING_BRACE,r(),0),L=vt(V,R)||m(R),R.braceNest=0,L;default:{let ce=!0,Le=!0,Ee=!0;if(_(V))return R.braceNest>0&&f(we.UNTERMINATED_CLOSING_BRACE,r(),0),L=d(R,1,Ae(V)),R.braceNest=0,R.inLinked=!1,L;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return f(we.UNTERMINATED_CLOSING_BRACE,r(),0),R.braceNest=0,Mi(V,R);if(ce=x(V,R))return L=d(R,4,de(V)),g(V),L;if(Le=O(V,R))return L=d(R,5,fe(V)),g(V),L;if(Ee=Q(V,R))return L=d(R,6,v(V)),g(V),L;if(!ce&&!Le&&!Ee)return L=d(R,12,Qe(V)),f(we.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,L.value),g(V),L;break}}return L}function vt(V,R){const{currentType:L}=R;let pe=null;const ce=V.currentChar();switch((L===7||L===8||L===11||L===9)&&(ce===bt||ce===Si)&&f(we.INVALID_LINKED_FORMAT,r(),0),ce){case"@":return V.next(),pe=d(R,7,"@"),R.inLinked=!0,pe;case".":return g(V),V.next(),d(R,8,".");case":":return g(V),V.next(),d(R,9,":");default:return _(V)?(pe=d(R,1,Ae(V)),R.braceNest=0,R.inLinked=!1,pe):S(V,R)||T(V,R)?(g(V),vt(V,R)):k(V,R)?(g(V),d(R,11,Vi(V))):$(V,R)?(g(V),ce==="{"?qe(V,R)||pe:d(R,10,Li(V))):(L===7&&f(we.INVALID_LINKED_FORMAT,r(),0),R.braceNest=0,R.inLinked=!1,Mi(V,R))}}function Mi(V,R){let L={type:13};if(R.braceNest>0)return qe(V,R)||m(R);if(R.inLinked)return vt(V,R)||m(R);switch(V.currentChar()){case"{":return qe(V,R)||m(R);case"}":return f(we.UNBALANCED_CLOSING_BRACE,r(),0),V.next(),d(R,3,"}");case"@":return vt(V,R)||m(R);default:{if(_(V))return L=d(R,1,Ae(V)),R.braceNest=0,R.inLinked=!1,L;if(A(V))return d(R,0,K(V));break}}return L}function nn(){const{currentType:V,offset:R,startLoc:L,endLoc:pe}=c;return c.lastType=V,c.lastOffset=R,c.lastStartLoc=L,c.lastEndLoc=pe,c.offset=s(),c.startLoc=r(),n.currentChar()===Bi?d(c,13):Mi(n,c)}return{nextToken:nn,currentOffset:s,currentPosition:r,context:u}}const D_="parser",v_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B_(i,e,t){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||t,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function I_(i={}){const e=i.location!==!1,{onError:t}=i;function n(p,y,x,O,...Q){const S=p.currentPosition();if(S.offset+=O,S.column+=O,t){const k=e?al(x,S):null,T=Pn(y,k,{domain:D_,args:Q});t(T)}}function s(p,y,x){const O={type:p};return e&&(O.start=y,O.end=y,O.loc={start:x,end:x}),O}function r(p,y,x,O){e&&(p.end=y,p.loc&&(p.loc.end=x))}function o(p,y){const x=p.context(),O=s(3,x.offset,x.startLoc);return O.value=y,r(O,p.currentOffset(),p.currentPosition()),O}function a(p,y){const x=p.context(),{lastOffset:O,lastStartLoc:Q}=x,S=s(5,O,Q);return S.index=parseInt(y,10),p.nextToken(),r(S,p.currentOffset(),p.currentPosition()),S}function c(p,y){const x=p.context(),{lastOffset:O,lastStartLoc:Q}=x,S=s(4,O,Q);return S.key=y,p.nextToken(),r(S,p.currentOffset(),p.currentPosition()),S}function u(p,y){const x=p.context(),{lastOffset:O,lastStartLoc:Q}=x,S=s(9,O,Q);return S.value=y.replace(v_,B_),p.nextToken(),r(S,p.currentOffset(),p.currentPosition()),S}function h(p){const y=p.nextToken(),x=p.context(),{lastOffset:O,lastStartLoc:Q}=x,S=s(8,O,Q);return y.type!==11?(n(p,we.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),S.value="",r(S,O,Q),{nextConsumeToken:y,node:S}):(y.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,oi(y)),S.value=y.value||"",r(S,p.currentOffset(),p.currentPosition()),{node:S})}function f(p,y){const x=p.context(),O=s(7,x.offset,x.startLoc);return O.value=y,r(O,p.currentOffset(),p.currentPosition()),O}function d(p){const y=p.context(),x=s(6,y.offset,y.startLoc);let O=p.nextToken();if(O.type===8){const Q=h(p);x.modifier=Q.node,O=Q.nextConsumeToken||p.nextToken()}switch(O.type!==9&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi(O)),O=p.nextToken(),O.type===2&&(O=p.nextToken()),O.type){case 10:O.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi(O)),x.key=f(p,O.value||"");break;case 4:O.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi(O)),x.key=c(p,O.value||"");break;case 5:O.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi(O)),x.key=a(p,O.value||"");break;case 6:O.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi(O)),x.key=u(p,O.value||"");break;default:{n(p,we.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const Q=p.context(),S=s(7,Q.offset,Q.startLoc);return S.value="",r(S,Q.offset,Q.startLoc),x.key=S,r(x,Q.offset,Q.startLoc),{nextConsumeToken:O,node:x}}}return r(x,p.currentOffset(),p.currentPosition()),{node:x}}function m(p){const y=p.context(),x=y.currentType===1?p.currentOffset():y.offset,O=y.currentType===1?y.endLoc:y.startLoc,Q=s(2,x,O);Q.items=[];let S=null;do{const $=S||p.nextToken();switch(S=null,$.type){case 0:$.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi($)),Q.items.push(o(p,$.value||""));break;case 5:$.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi($)),Q.items.push(a(p,$.value||""));break;case 4:$.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi($)),Q.items.push(c(p,$.value||""));break;case 6:$.value==null&&n(p,we.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,oi($)),Q.items.push(u(p,$.value||""));break;case 7:{const _=d(p);Q.items.push(_.node),S=_.nextConsumeToken||null;break}}}while(y.currentType!==13&&y.currentType!==1);const k=y.currentType===1?y.lastOffset:p.currentOffset(),T=y.currentType===1?y.lastEndLoc:p.currentPosition();return r(Q,k,T),Q}function b(p,y,x,O){const Q=p.context();let S=O.items.length===0;const k=s(1,y,x);k.cases=[],k.cases.push(O);do{const T=m(p);S||(S=T.items.length===0),k.cases.push(T)}while(Q.currentType!==13);return S&&n(p,we.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),r(k,p.currentOffset(),p.currentPosition()),k}function w(p){const y=p.context(),{offset:x,startLoc:O}=y,Q=m(p);return y.currentType===13?Q:b(p,x,O,Q)}function g(p){const y=M_(p,tt({},i)),x=y.context(),O=s(0,x.offset,x.startLoc);return e&&O.loc&&(O.loc.source=p),O.body=w(y),i.onCacheKey&&(O.cacheKey=i.onCacheKey(p)),x.currentType!==13&&n(y,we.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,p[x.offset]||""),r(O,y.currentOffset(),y.currentPosition()),O}return{parse:g}}function oi(i){if(i.type===13)return"EOF";const e=(i.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function Z_(i,e={}){const t={ast:i,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function Au(i,e){for(let t=0;t<i.length;t++)cl(i[t],e)}function cl(i,e){switch(i.type){case 1:Au(i.cases,e),e.helper("plural");break;case 2:Au(i.items,e);break;case 6:{cl(i.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function F_(i,e={}){const t=Z_(i);t.helper("normalize"),i.body&&cl(i.body,t);const n=t.context();i.helpers=Array.from(n.helpers)}function U_(i){const e=i.body;return e.type===2?Tu(e):e.cases.forEach(t=>Tu(t)),i}function Tu(i){if(i.items.length===1){const e=i.items[0];(e.type===3||e.type===9)&&(i.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<i.items.length;t++){const n=i.items[t];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===i.items.length){i.static=ol(e);for(let t=0;t<i.items.length;t++){const n=i.items[t];(n.type===3||n.type===9)&&delete n.value}}}}const X_="minifier";function Qn(i){switch(i.t=i.type,i.type){case 0:{const e=i;Qn(e.body),e.b=e.body,delete e.body;break}case 1:{const e=i,t=e.cases;for(let n=0;n<t.length;n++)Qn(t[n]);e.c=t,delete e.cases;break}case 2:{const e=i,t=e.items;for(let n=0;n<t.length;n++)Qn(t[n]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=i;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=i;Qn(e.key),e.k=e.key,delete e.key,e.modifier&&(Qn(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=i;e.i=e.index,delete e.index;break}case 4:{const e=i;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Pn(we.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:X_,args:[i.type]})}delete i.type}const W_="parser";function q_(i,e){const{sourceMap:t,filename:n,breakLineCode:s,needIndent:r}=e,o=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:s,needIndent:r,indentLevel:0};o&&i.loc&&(a.source=i.loc.source);const c=()=>a;function u(g,p){a.code+=g}function h(g,p=!0){const y=p?s:"";u(r?y+" ".repeat(g):y)}function f(g=!0){const p=++a.indentLevel;g&&h(p)}function d(g=!0){const p=--a.indentLevel;g&&h(p)}function m(){h(a.indentLevel)}return{context:c,push:u,indent:f,deindent:d,newline:m,helper:g=>`_${g}`,needIndent:()=>a.needIndent}}function j_(i,e){const{helper:t}=i;i.push(`${t("linked")}(`),En(i,e.key),e.modifier?(i.push(", "),En(i,e.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function z_(i,e){const{helper:t,needIndent:n}=i;i.push(`${t("normalize")}([`),i.indent(n());const s=e.items.length;for(let r=0;r<s&&(En(i,e.items[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}function Y_(i,e){const{helper:t,needIndent:n}=i;if(e.cases.length>1){i.push(`${t("plural")}([`),i.indent(n());const s=e.cases.length;for(let r=0;r<s&&(En(i,e.cases[r]),r!==s-1);r++)i.push(", ");i.deindent(n()),i.push("])")}}function G_(i,e){e.body?En(i,e.body):i.push("null")}function En(i,e){const{helper:t}=i;switch(e.type){case 0:G_(i,e);break;case 1:Y_(i,e);break;case 2:z_(i,e);break;case 6:j_(i,e);break;case 8:i.push(JSON.stringify(e.value),e);break;case 7:i.push(JSON.stringify(e.value),e);break;case 5:i.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:i.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:i.push(JSON.stringify(e.value),e);break;case 3:i.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Pn(we.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:W_,args:[e.type]})}}const K_=(i,e={})=>{const t=te(e.mode)?e.mode:"normal",n=te(e.filename)?e.filename:"message.intl",s=!!e.sourceMap,r=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
12
+ `,o=e.needIndent?e.needIndent:t!=="arrow",a=i.helpers||[],c=q_(i,{mode:t,filename:n,sourceMap:s,breakLineCode:r,needIndent:o});c.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(o),a.length>0&&(c.push(`const { ${ol(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),c.newline()),c.push("return "),En(c,i),c.deindent(o),c.push("}"),delete i.helpers;const{code:u,map:h}=c.context();return{ast:i,code:u,map:h?h.toJSON():void 0}};function H_(i,e={}){const t=tt({},e),n=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=I_(t).parse(i);return n?(r&&U_(a),s&&Qn(a),{ast:a,code:""}):(F_(a,t),K_(a,t))}/*!
13
+ * core-base v10.0.8
14
+ * (c) 2025 kazuya kawaguchi
15
15
  * Released under the MIT License.
16
- */function M_(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function cl(i){return t=>B_(t,i)}function B_(i,e){const t=v_(e);if(t==null)throw ls(0);if(ul(t)===1){const r=I_(t);return i.plural(r.reduce((o,a)=>[...o,Ch(i,a)],[]))}else return Ch(i,t)}const D_=["b","body"];function v_(i){return vi(i,D_)}const Z_=["c","cases"];function I_(i){return vi(i,Z_,[])}function Ch(i,e){const t=F_(e);if(t!=null)return i.type==="text"?t:i.normalize([t]);{const n=q_(e).reduce((s,r)=>[...s,hl(i,r)],[]);return i.normalize(n)}}const U_=["s","static"];function F_(i){return vi(i,U_)}const j_=["i","items"];function q_(i){return vi(i,j_,[])}function hl(i,e){const t=ul(e);switch(t){case 3:return mr(e,t);case 9:return mr(e,t);case 4:{const n=e;if(zt(n,"k")&&n.k)return i.interpolate(i.named(n.k));if(zt(n,"key")&&n.key)return i.interpolate(i.named(n.key));throw ls(t)}case 5:{const n=e;if(zt(n,"i")&&Ye(n.i))return i.interpolate(i.list(n.i));if(zt(n,"index")&&Ye(n.index))return i.interpolate(i.list(n.index));throw ls(t)}case 6:{const n=e,s=z_(n),r=H_(n);return i.linked(hl(i,r),s?hl(i,s):void 0,i.type)}case 7:return mr(e,t);case 8:return mr(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const X_=["t","type"];function ul(i){return vi(i,X_)}const W_=["v","value"];function mr(i,e){const t=vi(i,W_);if(t)return t;throw ls(e)}const Y_=["m","modifier"];function z_(i){return vi(i,Y_)}const G_=["k","key"];function H_(i){const e=vi(i,G_);if(e)return e;throw ls(6)}function vi(i,e,t){for(let n=0;n<e.length;n++){const s=e[n];if(zt(i,s)&&i[s]!=null)return i[s]}return t}function ls(i){return new Error(`unhandled node type: ${i}`)}const K_="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function J_(i,e){e&&f_(i)&&Bi(ur(K_,{source:i}))}const e0=i=>i;let gr=Ve();function Zi(i){return Ce(i)&&ul(i)===0&&(zt(i,"b")||zt(i,"body"))}function t0(i,e={}){let t=!1;const n=e.onError||h_;return e.onError=s=>{t=!0,n(s)},{...L_(i,e),detectError:t}}function i0(i,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ne(i)){const t=Te(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&J_(i,t);const s=(e.onCacheKey||e0)(i),r=gr[s];if(r)return r;const{ast:o,detectError:a}=t0(i,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=cl(o);return a?c:gr[s]=c}else{if(process.env.NODE_ENV!=="production"&&!Zi(i))return Bi(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>i;const t=i.cacheKey;if(t){const n=gr[t];return n||(gr[t]=cl(i))}else return cl(i)}}let as=null;function n0(i){as=i}function s0(i,e,t){as&&as.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:e,meta:t})}const r0=o0("function:translate");function o0(i){return e=>as&&as.emit(i,e)}const mt={INVALID_ARGUMENT:a_,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},l0=24;function Ci(i){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:a0}:void 0)}const a0={[mt.INVALID_ARGUMENT]:"Invalid arguments",[mt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[mt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[mt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[mt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function fl(i,e){return e.locale!=null?Ah(e.locale):Ah(i.locale)}let dl;function Ah(i){if(ne(i))return i;if(Le(i)){if(i.resolvedOnce&&dl!=null)return dl;if(i.constructor.name==="Function"){const e=i();if(s_(e))throw Ci(mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return dl=e}else throw Ci(mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ci(mt.NOT_SUPPORT_LOCALE_TYPE)}function c0(i,e,t){return[...new Set([t,...We(e)?e:Ce(e)?Object.keys(e):ne(e)?[e]:[t]])]}function Qh(i,e,t){const n=ne(t)?t:cs,s=i;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(n);if(!r){r=[];let o=[t];for(;We(o);)o=Ph(r,o,e);const a=We(e)||!ke(e)?e:e.default?e.default:null;o=ne(a)?[a]:a,We(o)&&Ph(r,o,!1),s.__localeChainCache.set(n,r)}return r}function Ph(i,e,t){let n=!0;for(let s=0;s<e.length&&Te(n);s++){const r=e[s];ne(r)&&(n=h0(i,e[s],t))}return n}function h0(i,e,t){let n;const s=e.split("-");do{const r=s.join("-");n=u0(i,r,t),s.splice(-1,1)}while(s.length&&n===!0);return n}function u0(i,e,t){let n=!1;if(!i.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const s=e.replace(/!/g,"");i.push(s),(We(t)||ke(t))&&t[s]&&(n=t[s])}return n}const Ii=[];Ii[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ii[1]={w:[1],".":[2],"[":[4],o:[7]},Ii[2]={w:[2],i:[3,0],0:[3,0]},Ii[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ii[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ii[5]={"'":[4,0],o:8,l:[5,0]},Ii[6]={'"':[4,0],o:8,l:[6,0]};const f0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function d0(i){return f0.test(i)}function p0(i){const e=i.charCodeAt(0),t=i.charCodeAt(i.length-1);return e===t&&(e===34||e===39)?i.slice(1,-1):i}function m0(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function g0(i){const e=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:d0(e)?p0(e):"*"+e}function O0(i){const e=[];let t=-1,n=0,s=0,r,o,a,c,h,u,f;const d=[];d[0]=()=>{o===void 0?o=a:o+=a},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),s++},d[3]=()=>{if(s>0)s--,n=4,d[0]();else{if(s=0,o===void 0||(o=g0(o),o===!1))return!1;d[1]()}};function m(){const b=i[t+1];if(n===5&&b==="'"||n===6&&b==='"')return t++,a="\\"+b,d[0](),!0}for(;n!==null;)if(t++,r=i[t],!(r==="\\"&&m())){if(c=m0(r),f=Ii[n],h=f[c]||f.l||8,h===8||(n=h[0],h[1]!==void 0&&(u=d[h[1]],u&&(a=r,u()===!1))))return;if(n===7)return e}}const Th=new Map;function _0(i,e){return Ce(i)?i[e]:null}function b0(i,e){if(!Ce(i))return null;let t=Th.get(e);if(t||(t=O0(e),t&&Th.set(e,t)),!t)return null;const n=t.length;let s=i,r=0;for(;r<n;){const o=s[t[r]];if(o===void 0||Le(s))return null;s=o,r++}return s}const St={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},y0=8,w0={[St.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[St.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[St.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[St.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[St.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function an(i,...e){return ur(w0[i],...e)}const k0="10.0.5",Or=-1,cs="en-US",_r="",Eh=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function x0(){return{upper:(i,e)=>e==="text"&&ne(i)?i.toUpperCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,e)=>e==="text"&&ne(i)?i.toLowerCase():e==="vnode"&&Ce(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,e)=>e==="text"&&ne(i)?Eh(i):e==="vnode"&&Ce(i)&&"__v_isVNode"in i?Eh(i.children):i}}let $h;function S0(i){$h=i}let Nh;function C0(i){Nh=i}let Rh;function A0(i){Rh=i}let Vh=null;const Q0=i=>{Vh=i},P0=()=>Vh;let Lh=null;const Mh=i=>{Lh=i},T0=()=>Lh;let Bh=0;function E0(i={}){const e=Le(i.onWarn)?i.onWarn:Bi,t=ne(i.version)?i.version:k0,n=ne(i.locale)||Le(i.locale)?i.locale:cs,s=Le(n)?cs:n,r=We(i.fallbackLocale)||ke(i.fallbackLocale)||ne(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,o=ke(i.messages)?i.messages:pl(s),a=ke(i.datetimeFormats)?i.datetimeFormats:pl(s),c=ke(i.numberFormats)?i.numberFormats:pl(s),h=tt(Ve(),i.modifiers,x0()),u=i.pluralRules||Ve(),f=Le(i.missing)?i.missing:null,d=Te(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=Te(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=!!i.fallbackFormat,w=!!i.unresolving,g=Le(i.postTranslation)?i.postTranslation:null,p=ke(i.processor)?i.processor:null,O=Te(i.warnHtmlMessage)?i.warnHtmlMessage:!0,C=!!i.escapeParameter,y=Le(i.messageCompiler)?i.messageCompiler:$h;process.env.NODE_ENV!=="production"&&Le(i.messageCompiler)&&wh(an(St.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const E=Le(i.messageResolver)?i.messageResolver:Nh||_0,x=Le(i.localeFallbacker)?i.localeFallbacker:Rh||c0,k=Ce(i.fallbackContext)?i.fallbackContext:void 0,P=i,N=Ce(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,_=Ce(P.__numberFormatters)?P.__numberFormatters:new Map,A=Ce(P.__meta)?P.__meta:{};Bh++;const S={version:t,cid:Bh,locale:n,fallbackLocale:r,messages:o,modifiers:h,pluralRules:u,missing:f,missingWarn:d,fallbackWarn:m,fallbackFormat:b,unresolving:w,postTranslation:g,processor:p,warnHtmlMessage:O,escapeParameter:C,messageCompiler:y,messageResolver:E,localeFallbacker:x,fallbackContext:k,onWarn:e,__meta:A};return S.datetimeFormats=a,S.numberFormats=c,S.__datetimeFormatters=N,S.__numberFormatters=_,process.env.NODE_ENV!=="production"&&(S.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&s0(S,t,A),S}const pl=i=>({[i]:Ve()});function br(i,e){return i instanceof RegExp?i.test(e):i}function Dh(i,e){return i instanceof RegExp?i.test(e):i}function ml(i,e,t,n,s){const{missing:r,onWarn:o}=i;if(process.env.NODE_ENV!=="production"){const a=i.__v_emitter;a&&a.emit("missing",{locale:t,key:e,type:s,groupId:`${s}:${e}`})}if(r!==null){const a=r(i,t,e,s);return ne(a)?a:e}else return process.env.NODE_ENV!=="production"&&Dh(n,e)&&o(an(St.NOT_FOUND_KEY,{key:e,locale:t})),e}function hs(i,e,t){const n=i;n.__localeChainCache=new Map,i.localeFallbacker(i,t,e)}function vh(i,e){return i===e?!1:i.split("-")[0]===e.split("-")[0]}function $0(i,e){const t=e.indexOf(i);if(t===-1)return!1;for(let n=t+1;n<e.length;n++)if(vh(i,e[n]))return!0;return!1}const Zh=typeof Intl<"u",Ih={dateTimeFormat:Zh&&typeof Intl.DateTimeFormat<"u",numberFormat:Zh&&typeof Intl.NumberFormat<"u"};function Uh(i,...e){const{datetimeFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__datetimeFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ih.dateTimeFormat)return r(an(St.CANNOT_FORMAT_DATE)),_r;const[c,h,u,f]=gl(...e),d=Te(u.missingWarn)?u.missingWarn:i.missingWarn,m=Te(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=fl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.DateTimeFormat(w,f).format(h);let p={},O,C=null,y=w,E=null;const x="datetime format";for(let N=0;N<g.length;N++){if(O=E=g[N],process.env.NODE_ENV!=="production"&&w!==O&&br(m,c)&&r(an(St.FALLBACK_TO_DATE_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:x,key:c,from:y,to:E,groupId:`${x}:${c}`})}if(p=t[O]||{},C=p[c],ke(C))break;ml(i,c,O,d,x),y=E}if(!ke(C)||!ne(O))return n?Or:c;let k=`${O}__${c}`;fr(f)||(k=`${k}__${JSON.stringify(f)}`);let P=a.get(k);return P||(P=new Intl.DateTimeFormat(O,tt({},C,f)),a.set(k,P)),b?P.formatToParts(h):P.format(h)}const Fh=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function gl(...i){const[e,t,n,s]=i,r=Ve();let o=Ve(),a;if(ne(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw Ci(mt.INVALID_ISO_DATE_ARGUMENT);const h=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();a=new Date(h);try{a.toISOString()}catch{throw Ci(mt.INVALID_ISO_DATE_ARGUMENT)}}else if(t_(e)){if(isNaN(e.getTime()))throw Ci(mt.INVALID_DATE_ARGUMENT);a=e}else if(Ye(e))a=e;else throw Ci(mt.INVALID_ARGUMENT);return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{Fh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function jh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__datetimeFormatters.has(r)&&n.__datetimeFormatters.delete(r)}}function qh(i,...e){const{numberFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__numberFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ih.numberFormat)return r(an(St.CANNOT_FORMAT_NUMBER)),_r;const[c,h,u,f]=Ol(...e),d=Te(u.missingWarn)?u.missingWarn:i.missingWarn,m=Te(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,b=!!u.part,w=fl(i,u),g=o(i,s,w);if(!ne(c)||c==="")return new Intl.NumberFormat(w,f).format(h);let p={},O,C=null,y=w,E=null;const x="number format";for(let N=0;N<g.length;N++){if(O=E=g[N],process.env.NODE_ENV!=="production"&&w!==O&&br(m,c)&&r(an(St.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:O})),process.env.NODE_ENV!=="production"&&w!==O){const _=i.__v_emitter;_&&_.emit("fallback",{type:x,key:c,from:y,to:E,groupId:`${x}:${c}`})}if(p=t[O]||{},C=p[c],ke(C))break;ml(i,c,O,d,x),y=E}if(!ke(C)||!ne(O))return n?Or:c;let k=`${O}__${c}`;fr(f)||(k=`${k}__${JSON.stringify(f)}`);let P=a.get(k);return P||(P=new Intl.NumberFormat(O,tt({},C,f)),a.set(k,P)),b?P.formatToParts(h):P.format(h)}const Xh=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ol(...i){const[e,t,n,s]=i,r=Ve();let o=Ve();if(!Ye(e))throw Ci(mt.INVALID_ARGUMENT);const a=e;return ne(t)?r.key=t:ke(t)&&Object.keys(t).forEach(c=>{Xh.includes(c)?o[c]=t[c]:r[c]=t[c]}),ne(n)?r.locale=n:ke(n)&&(o=n),ke(s)&&(o=s),[r.key||"",a,r,o]}function Wh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__numberFormatters.has(r)&&n.__numberFormatters.delete(r)}}const N0=i=>i,R0=i=>"",V0="text",L0=i=>i.length===0?"":rl(i),M0=r_;function Yh(i,e){return i=Math.abs(i),e===2?i?i>1?1:0:1:i?Math.min(i,2):0}function B0(i){const e=Ye(i.pluralIndex)?i.pluralIndex:-1;return i.named&&(Ye(i.named.count)||Ye(i.named.n))?Ye(i.named.count)?i.named.count:Ye(i.named.n)?i.named.n:e:e}function D0(i,e){e.count||(e.count=i),e.n||(e.n=i)}function v0(i={}){const e=i.locale,t=B0(i),n=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?i.pluralRules[e]:Yh,s=Ce(i.pluralRules)&&ne(e)&&Le(i.pluralRules[e])?Yh:void 0,r=p=>p[n(t,p.length,s)],o=i.list||[],a=p=>o[p],c=i.named||Ve();Ye(i.pluralIndex)&&D0(t,c);const h=p=>c[p];function u(p,O){const C=Le(i.messages)?i.messages(p,!!O):Ce(i.messages)?i.messages[p]:!1;return C||(i.parent?i.parent.message(p):R0)}const f=p=>i.modifiers?i.modifiers[p]:N0,d=ke(i.processor)&&Le(i.processor.normalize)?i.processor.normalize:L0,m=ke(i.processor)&&Le(i.processor.interpolate)?i.processor.interpolate:M0,b=ke(i.processor)&&ne(i.processor.type)?i.processor.type:V0,g={list:a,named:h,plural:r,linked:(p,...O)=>{const[C,y]=O;let E="text",x="";O.length===1?Ce(C)?(x=C.modifier||x,E=C.type||E):ne(C)&&(x=C||x):O.length===2&&(ne(C)&&(x=C||x),ne(y)&&(E=y||E));const k=u(p,!0)(g),P=E==="vnode"&&We(k)&&x?k[0]:k;return x?f(x)(P,E):P},message:u,type:b,interpolate:m,normalize:d,values:tt(Ve(),o,c)};return g}const zh=()=>"",Zt=i=>Le(i);function Gh(i,...e){const{fallbackFormat:t,postTranslation:n,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=i,[c,h]=_l(...e),u=Te(h.missingWarn)?h.missingWarn:i.missingWarn,f=Te(h.fallbackWarn)?h.fallbackWarn:i.fallbackWarn,d=Te(h.escapeParameter)?h.escapeParameter:i.escapeParameter,m=!!h.resolvedMessage,b=ne(h.default)||Te(h.default)?Te(h.default)?r?c:()=>c:h.default:t?r?c:()=>c:null,w=t||b!=null&&(ne(b)||Le(b)),g=fl(i,h);d&&Z0(h);let[p,O,C]=m?[c,g,a[g]||Ve()]:Hh(i,c,g,o,f,u),y=p,E=c;if(!m&&!(ne(y)||Zi(y)||Zt(y))&&w&&(y=b,E=y),!m&&(!(ne(y)||Zi(y)||Zt(y))||!ne(O)))return s?Or:c;if(process.env.NODE_ENV!=="production"&&ne(y)&&i.messageCompiler==null)return Bi(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let x=!1;const k=()=>{x=!0},P=Zt(y)?y:Kh(i,c,O,y,E,k);if(x)return y;const N=j0(i,O,C,h),_=v0(N),A=I0(i,P,_),S=n?n(A,c):A;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const M={timestamp:Date.now(),key:ne(c)?c:Zt(y)?y.key:"",locale:O||(Zt(y)?y.locale:""),format:ne(y)?y:Zt(y)?y.source:"",message:S};M.meta=tt({},i.__meta,P0()||{}),r0(M)}return S}function Z0(i){We(i.list)?i.list=i.list.map(e=>ne(e)?Oh(e):e):Ce(i.named)&&Object.keys(i.named).forEach(e=>{ne(i.named[e])&&(i.named[e]=Oh(i.named[e]))})}function Hh(i,e,t,n,s,r){const{messages:o,onWarn:a,messageResolver:c,localeFallbacker:h}=i,u=h(i,n,t);let f=Ve(),d,m=null,b=t,w=null;const g="translate";for(let p=0;p<u.length;p++){if(d=w=u[p],process.env.NODE_ENV!=="production"&&t!==d&&!vh(t,d)&&br(s,e)&&a(an(St.FALLBACK_TO_TRANSLATE,{key:e,target:d})),process.env.NODE_ENV!=="production"&&t!==d){const E=i.__v_emitter;E&&E.emit("fallback",{type:g,key:e,from:b,to:w,groupId:`${g}:${e}`})}f=o[d]||Ve();let O=null,C,y;if(process.env.NODE_ENV!=="production"&&Yt&&(O=window.performance.now(),C="intlify-message-resolve-start",y="intlify-message-resolve-end",Rt&&Rt(C)),(m=c(f,e))===null&&(m=f[e]),process.env.NODE_ENV!=="production"&&Yt){const E=window.performance.now(),x=i.__v_emitter;x&&O&&m&&x.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:E-O,groupId:`${g}:${e}`}),C&&y&&Rt&&on&&(Rt(y),on("intlify message resolve",C,y))}if(ne(m)||Zi(m)||Zt(m))break;if(!$0(d,u)){const E=ml(i,e,d,r,g);E!==e&&(m=E)}b=w}return[m,d,f]}function Kh(i,e,t,n,s,r){const{messageCompiler:o,warnHtmlMessage:a}=i;if(Zt(n)){const d=n;return d.locale=d.locale||t,d.key=d.key||e,d}if(o==null){const d=()=>n;return d.locale=t,d.key=e,d}let c=null,h,u;process.env.NODE_ENV!=="production"&&Yt&&(c=window.performance.now(),h="intlify-message-compilation-start",u="intlify-message-compilation-end",Rt&&Rt(h));const f=o(n,U0(i,t,s,n,a,r));if(process.env.NODE_ENV!=="production"&&Yt){const d=window.performance.now(),m=i.__v_emitter;m&&c&&m.emit("message-compilation",{type:"message-compilation",message:n,time:d-c,groupId:`translate:${e}`}),h&&u&&Rt&&on&&(Rt(u),on("intlify message compilation",h,u))}return f.locale=t,f.key=e,f.source=n,f}function I0(i,e,t){let n=null,s,r;process.env.NODE_ENV!=="production"&&Yt&&(n=window.performance.now(),s="intlify-message-evaluation-start",r="intlify-message-evaluation-end",Rt&&Rt(s));const o=e(t);if(process.env.NODE_ENV!=="production"&&Yt){const a=window.performance.now(),c=i.__v_emitter;c&&n&&c.emit("message-evaluation",{type:"message-evaluation",value:o,time:a-n,groupId:`translate:${e.key}`}),s&&r&&Rt&&on&&(Rt(r),on("intlify message evaluation",s,r))}return o}function _l(...i){const[e,t,n]=i,s=Ve();if(!ne(e)&&!Ye(e)&&!Zt(e)&&!Zi(e))throw Ci(mt.INVALID_ARGUMENT);const r=Ye(e)?String(e):(Zt(e),e);return Ye(t)?s.plural=t:ne(t)?s.default=t:ke(t)&&!fr(t)?s.named=t:We(t)&&(s.list=t),Ye(n)?s.plural=n:ne(n)?s.default=n:ke(n)&&tt(s,n),[r,s]}function U0(i,e,t,n,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{if(r&&r(o),process.env.NODE_ENV!=="production"){const a=F0(n),c=`Message compilation error: ${o.message}`,h=o.location&&a&&o_(a,o.location.start.offset,o.location.end.offset),u=i.__v_emitter;u&&a&&u.emit("compile-error",{message:a,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${t}`}),console.error(h?`${c}
17
- ${h}`:c)}else throw o},onCacheKey:o=>JO(e,t,o)}}function F0(i){if(ne(i))return i;if(i.loc&&i.loc.source)return i.loc.source}function j0(i,e,t,n){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:c,missingWarn:h,fallbackContext:u}=i,d={locale:e,modifiers:s,pluralRules:r,messages:(m,b)=>{let w=o(t,m);if(w==null&&(u||b)){const[,,g]=Hh(u||i,m,e,a,c,h);w=o(g,m)}if(ne(w)||Zi(w)){let g=!1;const O=Kh(i,m,e,w,m,()=>{g=!0});return g?zh:O}else return Zt(w)?w:zh}};return i.processor&&(d.processor=i.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),Ye(n.plural)&&(d.pluralIndex=n.plural),d}M_();function q0(){return Jh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Jh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const X0=typeof Proxy=="function",W0="devtools-plugin:setup",Y0="plugin:settings:set";let En,bl;function z0(){var i;return En!==void 0||(typeof window<"u"&&window.performance?(En=!0,bl=window.performance):typeof globalThis<"u"&&(!((i=globalThis.perf_hooks)===null||i===void 0)&&i.performance)?(En=!0,bl=globalThis.perf_hooks.performance):En=!1),En}function G0(){return z0()?bl.now():Date.now()}class H0{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const o in e.settings){const a=e.settings[o];n[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},n);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return G0()}},t&&t.on(Y0,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(h=>{this.targetQueue.push({method:a,args:c,resolve:h})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function K0(i,e){const t=i,n=Jh(),s=q0(),r=X0&&t.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(W0,i,e);else{const o=r?new H0(t,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}/*!
18
- * vue-i18n v10.0.5
19
- * (c) 2024 kazuya kawaguchi
16
+ */function J_(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function It(i){return Te(i)&&ul(i)===0&&(Yt(i,"b")||Yt(i,"body"))}const Pu=["b","body"];function e0(i){return Ii(i,Pu)}const Qu=["c","cases"];function t0(i){return Ii(i,Qu,[])}const Eu=["s","static"];function i0(i){return Ii(i,Eu)}const $u=["i","items"];function n0(i){return Ii(i,$u,[])}const Nu=["t","type"];function ul(i){return Ii(i,Nu)}const Ru=["v","value"];function _r(i,e){const t=Ii(i,Ru);if(t!=null)return t;throw as(e)}const Vu=["m","modifier"];function s0(i){return Ii(i,Vu)}const Lu=["k","key"];function r0(i){const e=Ii(i,Lu);if(e)return e;throw as(6)}function Ii(i,e,t){for(let n=0;n<e.length;n++){const s=e[n];if(Yt(i,s)&&i[s]!=null)return i[s]}return t}const Mu=[...Pu,...Qu,...Eu,...$u,...Lu,...Vu,...Ru,...Nu];function as(i){return new Error(`unhandled node type: ${i}`)}function hl(i){return t=>o0(t,i)}function o0(i,e){const t=e0(e);if(t==null)throw as(0);if(ul(t)===1){const r=t0(t);return i.plural(r.reduce((o,a)=>[...o,Du(i,a)],[]))}else return Du(i,t)}function Du(i,e){const t=i0(e);if(t!=null)return i.type==="text"?t:i.normalize([t]);{const n=n0(e).reduce((s,r)=>[...s,fl(i,r)],[]);return i.normalize(n)}}function fl(i,e){const t=ul(e);switch(t){case 3:return _r(e,t);case 9:return _r(e,t);case 4:{const n=e;if(Yt(n,"k")&&n.k)return i.interpolate(i.named(n.k));if(Yt(n,"key")&&n.key)return i.interpolate(i.named(n.key));throw as(t)}case 5:{const n=e;if(Yt(n,"i")&&ze(n.i))return i.interpolate(i.list(n.i));if(Yt(n,"index")&&ze(n.index))return i.interpolate(i.list(n.index));throw as(t)}case 6:{const n=e,s=s0(n),r=r0(n);return i.linked(fl(i,r),s?fl(i,s):void 0,i.type)}case 7:return _r(e,t);case 8:return _r(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const l0="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function a0(i,e){e&&Q_(i)&&xi(pr(l0,{source:i}))}const c0=i=>i;let br=Me();function u0(i,e={}){let t=!1;const n=e.onError||T_;return e.onError=s=>{t=!0,n(s)},{...H_(i,e),detectError:t}}function h0(i,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&te(i)){const t=Ne(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&a0(i,t);const s=(e.onCacheKey||c0)(i),r=br[s];if(r)return r;const{ast:o,detectError:a}=u0(i,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=hl(o);return a?c:br[s]=c}else{if(process.env.NODE_ENV!=="production"&&!It(i))return xi(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>i;const t=i.cacheKey;if(t){const n=br[t];return n||(br[t]=hl(i))}else return hl(i)}}let cs=null;function f0(i){cs=i}function d0(i,e,t){cs&&cs.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:e,meta:t})}const p0=m0("function:translate");function m0(i){return e=>cs&&cs.emit(i,e)}const mt={INVALID_ARGUMENT:C_,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},g0=24;function Ci(i){return Pn(i,null,process.env.NODE_ENV!=="production"?{messages:O0}:void 0)}const O0={[mt.INVALID_ARGUMENT]:"Invalid arguments",[mt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[mt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[mt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[mt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function dl(i,e){return e.locale!=null?vu(e.locale):vu(i.locale)}let pl;function vu(i){if(te(i))return i;if(ve(i)){if(i.resolvedOnce&&pl!=null)return pl;if(i.constructor.name==="Function"){const e=i();if(w_(e))throw Ci(mt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return pl=e}else throw Ci(mt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ci(mt.NOT_SUPPORT_LOCALE_TYPE)}function _0(i,e,t){return[...new Set([t,...je(e)?e:Te(e)?Object.keys(e):te(e)?[e]:[t]])]}function Bu(i,e,t){const n=te(t)?t:us,s=i;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(n);if(!r){r=[];let o=[t];for(;je(o);)o=Iu(r,o,e);const a=je(e)||!xe(e)?e:e.default?e.default:null;o=te(a)?[a]:a,je(o)&&Iu(r,o,!1),s.__localeChainCache.set(n,r)}return r}function Iu(i,e,t){let n=!0;for(let s=0;s<e.length&&Ne(n);s++){const r=e[s];te(r)&&(n=b0(i,e[s],t))}return n}function b0(i,e,t){let n;const s=e.split("-");do{const r=s.join("-");n=y0(i,r,t),s.splice(-1,1)}while(s.length&&n===!0);return n}function y0(i,e,t){let n=!1;if(!i.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const s=e.replace(/!/g,"");i.push(s),(je(t)||xe(t))&&t[s]&&(n=t[s])}return n}const Zi=[];Zi[0]={w:[0],i:[3,0],"[":[4],o:[7]},Zi[1]={w:[1],".":[2],"[":[4],o:[7]},Zi[2]={w:[2],i:[3,0],0:[3,0]},Zi[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Zi[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Zi[5]={"'":[4,0],o:8,l:[5,0]},Zi[6]={'"':[4,0],o:8,l:[6,0]};const w0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function k0(i){return w0.test(i)}function x0(i){const e=i.charCodeAt(0),t=i.charCodeAt(i.length-1);return e===t&&(e===34||e===39)?i.slice(1,-1):i}function S0(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function C0(i){const e=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:k0(e)?x0(e):"*"+e}function A0(i){const e=[];let t=-1,n=0,s=0,r,o,a,c,u,h,f;const d=[];d[0]=()=>{o===void 0?o=a:o+=a},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),s++},d[3]=()=>{if(s>0)s--,n=4,d[0]();else{if(s=0,o===void 0||(o=C0(o),o===!1))return!1;d[1]()}};function m(){const b=i[t+1];if(n===5&&b==="'"||n===6&&b==='"')return t++,a="\\"+b,d[0](),!0}for(;n!==null;)if(t++,r=i[t],!(r==="\\"&&m())){if(c=S0(r),f=Zi[n],u=f[c]||f.l||8,u===8||(n=u[0],u[1]!==void 0&&(h=d[u[1]],h&&(a=r,h()===!1))))return;if(n===7)return e}}const Zu=new Map;function T0(i,e){return Te(i)?i[e]:null}function P0(i,e){if(!Te(i))return null;let t=Zu.get(e);if(t||(t=A0(e),t&&Zu.set(e,t)),!t)return null;const n=t.length;let s=i,r=0;for(;r<n;){const o=t[r];if(Mu.includes(o)&&It(s))return null;const a=s[o];if(a===void 0||ve(s))return null;s=a,r++}return s}const Ct={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},Q0=8,E0={[Ct.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Ct.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ct.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ct.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ct.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ct.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function an(i,...e){return pr(E0[i],...e)}const $0="10.0.8",yr=-1,us="en-US",wr="",Fu=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function N0(){return{upper:(i,e)=>e==="text"&&te(i)?i.toUpperCase():e==="vnode"&&Te(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,e)=>e==="text"&&te(i)?i.toLowerCase():e==="vnode"&&Te(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,e)=>e==="text"&&te(i)?Fu(i):e==="vnode"&&Te(i)&&"__v_isVNode"in i?Fu(i.children):i}}let Uu;function R0(i){Uu=i}let Xu;function V0(i){Xu=i}let Wu;function L0(i){Wu=i}let qu=null;const M0=i=>{qu=i},D0=()=>qu;let ju=null;const zu=i=>{ju=i},v0=()=>ju;let Yu=0;function B0(i={}){const e=ve(i.onWarn)?i.onWarn:xi,t=te(i.version)?i.version:$0,n=te(i.locale)||ve(i.locale)?i.locale:us,s=ve(n)?us:n,r=je(i.fallbackLocale)||xe(i.fallbackLocale)||te(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,o=xe(i.messages)?i.messages:ml(s),a=xe(i.datetimeFormats)?i.datetimeFormats:ml(s),c=xe(i.numberFormats)?i.numberFormats:ml(s),u=tt(Me(),i.modifiers,N0()),h=i.pluralRules||Me(),f=ve(i.missing)?i.missing:null,d=Ne(i.missingWarn)||Tn(i.missingWarn)?i.missingWarn:!0,m=Ne(i.fallbackWarn)||Tn(i.fallbackWarn)?i.fallbackWarn:!0,b=!!i.fallbackFormat,w=!!i.unresolving,g=ve(i.postTranslation)?i.postTranslation:null,p=xe(i.processor)?i.processor:null,y=Ne(i.warnHtmlMessage)?i.warnHtmlMessage:!0,x=!!i.escapeParameter,O=ve(i.messageCompiler)?i.messageCompiler:Uu;process.env.NODE_ENV!=="production"&&ve(i.messageCompiler)&&bu(an(Ct.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const Q=ve(i.messageResolver)?i.messageResolver:Xu||T0,S=ve(i.localeFallbacker)?i.localeFallbacker:Wu||_0,k=Te(i.fallbackContext)?i.fallbackContext:void 0,T=i,$=Te(T.__datetimeFormatters)?T.__datetimeFormatters:new Map,_=Te(T.__numberFormatters)?T.__numberFormatters:new Map,A=Te(T.__meta)?T.__meta:{};Yu++;const C={version:t,cid:Yu,locale:n,fallbackLocale:r,messages:o,modifiers:u,pluralRules:h,missing:f,missingWarn:d,fallbackWarn:m,fallbackFormat:b,unresolving:w,postTranslation:g,processor:p,warnHtmlMessage:y,escapeParameter:x,messageCompiler:O,messageResolver:Q,localeFallbacker:S,fallbackContext:k,onWarn:e,__meta:A};return C.datetimeFormats=a,C.numberFormats=c,C.__datetimeFormatters=$,C.__numberFormatters=_,process.env.NODE_ENV!=="production"&&(C.__v_emitter=T.__v_emitter!=null?T.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&d0(C,t,A),C}const ml=i=>({[i]:Me()});function kr(i,e){return i instanceof RegExp?i.test(e):i}function Gu(i,e){return i instanceof RegExp?i.test(e):i}function gl(i,e,t,n,s){const{missing:r,onWarn:o}=i;if(process.env.NODE_ENV!=="production"){const a=i.__v_emitter;a&&a.emit("missing",{locale:t,key:e,type:s,groupId:`${s}:${e}`})}if(r!==null){const a=r(i,t,e,s);return te(a)?a:e}else return process.env.NODE_ENV!=="production"&&Gu(n,e)&&o(an(Ct.NOT_FOUND_KEY,{key:e,locale:t})),e}function hs(i,e,t){const n=i;n.__localeChainCache=new Map,i.localeFallbacker(i,t,e)}function Ku(i,e){return i===e?!1:i.split("-")[0]===e.split("-")[0]}function I0(i,e){const t=e.indexOf(i);if(t===-1)return!1;for(let n=t+1;n<e.length;n++)if(Ku(i,e[n]))return!0;return!1}const Hu=typeof Intl<"u",Ju={dateTimeFormat:Hu&&typeof Intl.DateTimeFormat<"u",numberFormat:Hu&&typeof Intl.NumberFormat<"u"};function eh(i,...e){const{datetimeFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__datetimeFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ju.dateTimeFormat)return r(an(Ct.CANNOT_FORMAT_DATE)),wr;const[c,u,h,f]=Ol(...e),d=Ne(h.missingWarn)?h.missingWarn:i.missingWarn,m=Ne(h.fallbackWarn)?h.fallbackWarn:i.fallbackWarn,b=!!h.part,w=dl(i,h),g=o(i,s,w);if(!te(c)||c==="")return new Intl.DateTimeFormat(w,f).format(u);let p={},y,x=null,O=w,Q=null;const S="datetime format";for(let $=0;$<g.length;$++){if(y=Q=g[$],process.env.NODE_ENV!=="production"&&w!==y&&kr(m,c)&&r(an(Ct.FALLBACK_TO_DATE_FORMAT,{key:c,target:y})),process.env.NODE_ENV!=="production"&&w!==y){const _=i.__v_emitter;_&&_.emit("fallback",{type:S,key:c,from:O,to:Q,groupId:`${S}:${c}`})}if(p=t[y]||{},x=p[c],xe(x))break;gl(i,c,y,d,S),O=Q}if(!xe(x)||!te(y))return n?yr:c;let k=`${y}__${c}`;mr(f)||(k=`${k}__${JSON.stringify(f)}`);let T=a.get(k);return T||(T=new Intl.DateTimeFormat(y,tt({},x,f)),a.set(k,T)),b?T.formatToParts(u):T.format(u)}const th=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ol(...i){const[e,t,n,s]=i,r=Me();let o=Me(),a;if(te(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw Ci(mt.INVALID_ISO_DATE_ARGUMENT);const u=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();a=new Date(u);try{a.toISOString()}catch{throw Ci(mt.INVALID_ISO_DATE_ARGUMENT)}}else if(O_(e)){if(isNaN(e.getTime()))throw Ci(mt.INVALID_DATE_ARGUMENT);a=e}else if(ze(e))a=e;else throw Ci(mt.INVALID_ARGUMENT);return te(t)?r.key=t:xe(t)&&Object.keys(t).forEach(c=>{th.includes(c)?o[c]=t[c]:r[c]=t[c]}),te(n)?r.locale=n:xe(n)&&(o=n),xe(s)&&(o=s),[r.key||"",a,r,o]}function ih(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__datetimeFormatters.has(r)&&n.__datetimeFormatters.delete(r)}}function nh(i,...e){const{numberFormats:t,unresolving:n,fallbackLocale:s,onWarn:r,localeFallbacker:o}=i,{__numberFormatters:a}=i;if(process.env.NODE_ENV!=="production"&&!Ju.numberFormat)return r(an(Ct.CANNOT_FORMAT_NUMBER)),wr;const[c,u,h,f]=_l(...e),d=Ne(h.missingWarn)?h.missingWarn:i.missingWarn,m=Ne(h.fallbackWarn)?h.fallbackWarn:i.fallbackWarn,b=!!h.part,w=dl(i,h),g=o(i,s,w);if(!te(c)||c==="")return new Intl.NumberFormat(w,f).format(u);let p={},y,x=null,O=w,Q=null;const S="number format";for(let $=0;$<g.length;$++){if(y=Q=g[$],process.env.NODE_ENV!=="production"&&w!==y&&kr(m,c)&&r(an(Ct.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:y})),process.env.NODE_ENV!=="production"&&w!==y){const _=i.__v_emitter;_&&_.emit("fallback",{type:S,key:c,from:O,to:Q,groupId:`${S}:${c}`})}if(p=t[y]||{},x=p[c],xe(x))break;gl(i,c,y,d,S),O=Q}if(!xe(x)||!te(y))return n?yr:c;let k=`${y}__${c}`;mr(f)||(k=`${k}__${JSON.stringify(f)}`);let T=a.get(k);return T||(T=new Intl.NumberFormat(y,tt({},x,f)),a.set(k,T)),b?T.formatToParts(u):T.format(u)}const sh=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function _l(...i){const[e,t,n,s]=i,r=Me();let o=Me();if(!ze(e))throw Ci(mt.INVALID_ARGUMENT);const a=e;return te(t)?r.key=t:xe(t)&&Object.keys(t).forEach(c=>{sh.includes(c)?o[c]=t[c]:r[c]=t[c]}),te(n)?r.locale=n:xe(n)&&(o=n),xe(s)&&(o=s),[r.key||"",a,r,o]}function rh(i,e,t){const n=i;for(const s in t){const r=`${e}__${s}`;n.__numberFormatters.has(r)&&n.__numberFormatters.delete(r)}}const Z0=i=>i,F0=i=>"",U0="text",X0=i=>i.length===0?"":ol(i),W0=k_;function oh(i,e){return i=Math.abs(i),e===2?i?i>1?1:0:1:i?Math.min(i,2):0}function q0(i){const e=ze(i.pluralIndex)?i.pluralIndex:-1;return i.named&&(ze(i.named.count)||ze(i.named.n))?ze(i.named.count)?i.named.count:ze(i.named.n)?i.named.n:e:e}function j0(i,e){e.count||(e.count=i),e.n||(e.n=i)}function z0(i={}){const e=i.locale,t=q0(i),n=Te(i.pluralRules)&&te(e)&&ve(i.pluralRules[e])?i.pluralRules[e]:oh,s=Te(i.pluralRules)&&te(e)&&ve(i.pluralRules[e])?oh:void 0,r=p=>p[n(t,p.length,s)],o=i.list||[],a=p=>o[p],c=i.named||Me();ze(i.pluralIndex)&&j0(t,c);const u=p=>c[p];function h(p,y){const x=ve(i.messages)?i.messages(p,!!y):Te(i.messages)?i.messages[p]:!1;return x||(i.parent?i.parent.message(p):F0)}const f=p=>i.modifiers?i.modifiers[p]:Z0,d=xe(i.processor)&&ve(i.processor.normalize)?i.processor.normalize:X0,m=xe(i.processor)&&ve(i.processor.interpolate)?i.processor.interpolate:W0,b=xe(i.processor)&&te(i.processor.type)?i.processor.type:U0,g={list:a,named:u,plural:r,linked:(p,...y)=>{const[x,O]=y;let Q="text",S="";y.length===1?Te(x)?(S=x.modifier||S,Q=x.type||Q):te(x)&&(S=x||S):y.length===2&&(te(x)&&(S=x||S),te(O)&&(Q=O||Q));const k=h(p,!0)(g),T=Q==="vnode"&&je(k)&&S?k[0]:k;return S?f(S)(T,Q):T},message:h,type:b,interpolate:m,normalize:d,values:tt(Me(),o,c)};return g}const lh=()=>"",Zt=i=>ve(i);function ah(i,...e){const{fallbackFormat:t,postTranslation:n,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=i,[c,u]=bl(...e),h=Ne(u.missingWarn)?u.missingWarn:i.missingWarn,f=Ne(u.fallbackWarn)?u.fallbackWarn:i.fallbackWarn,d=Ne(u.escapeParameter)?u.escapeParameter:i.escapeParameter,m=!!u.resolvedMessage,b=te(u.default)||Ne(u.default)?Ne(u.default)?r?c:()=>c:u.default:t?r?c:()=>c:null,w=t||b!=null&&(te(b)||ve(b)),g=dl(i,u);d&&Y0(u);let[p,y,x]=m?[c,g,a[g]||Me()]:ch(i,c,g,o,f,h),O=p,Q=c;if(!m&&!(te(O)||It(O)||Zt(O))&&w&&(O=b,Q=O),!m&&(!(te(O)||It(O)||Zt(O))||!te(y)))return s?yr:c;if(process.env.NODE_ENV!=="production"&&te(O)&&i.messageCompiler==null)return xi(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let S=!1;const k=()=>{S=!0},T=Zt(O)?O:uh(i,c,y,O,Q,k);if(S)return O;const $=J0(i,y,x,u),_=z0($),A=G0(i,T,_);let C=n?n(A,c):A;if(d&&te(C)&&(C=b_(C)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const D={timestamp:Date.now(),key:te(c)?c:Zt(O)?O.key:"",locale:y||(Zt(O)?O.locale:""),format:te(O)?O:Zt(O)?O.source:"",message:C};D.meta=tt({},i.__meta,D0()||{}),p0(D)}return C}function Y0(i){je(i.list)?i.list=i.list.map(e=>te(e)?wu(e):e):Te(i.named)&&Object.keys(i.named).forEach(e=>{te(i.named[e])&&(i.named[e]=wu(i.named[e]))})}function ch(i,e,t,n,s,r){const{messages:o,onWarn:a,messageResolver:c,localeFallbacker:u}=i,h=u(i,n,t);let f=Me(),d,m=null,b=t,w=null;const g="translate";for(let p=0;p<h.length;p++){if(d=w=h[p],process.env.NODE_ENV!=="production"&&t!==d&&!Ku(t,d)&&kr(s,e)&&a(an(Ct.FALLBACK_TO_TRANSLATE,{key:e,target:d})),process.env.NODE_ENV!=="production"&&t!==d){const Q=i.__v_emitter;Q&&Q.emit("fallback",{type:g,key:e,from:b,to:w,groupId:`${g}:${e}`})}f=o[d]||Me();let y=null,x,O;if(process.env.NODE_ENV!=="production"&&zt&&(y=window.performance.now(),x="intlify-message-resolve-start",O="intlify-message-resolve-end",Rt&&Rt(x)),(m=c(f,e))===null&&(m=f[e]),process.env.NODE_ENV!=="production"&&zt){const Q=window.performance.now(),S=i.__v_emitter;S&&y&&m&&S.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:Q-y,groupId:`${g}:${e}`}),x&&O&&Rt&&on&&(Rt(O),on("intlify message resolve",x,O))}if(te(m)||It(m)||Zt(m))break;if(!I0(d,h)){const Q=gl(i,e,d,r,g);Q!==e&&(m=Q)}b=w}return[m,d,f]}function uh(i,e,t,n,s,r){const{messageCompiler:o,warnHtmlMessage:a}=i;if(Zt(n)){const d=n;return d.locale=d.locale||t,d.key=d.key||e,d}if(o==null){const d=()=>n;return d.locale=t,d.key=e,d}let c=null,u,h;process.env.NODE_ENV!=="production"&&zt&&(c=window.performance.now(),u="intlify-message-compilation-start",h="intlify-message-compilation-end",Rt&&Rt(u));const f=o(n,K0(i,t,s,n,a,r));if(process.env.NODE_ENV!=="production"&&zt){const d=window.performance.now(),m=i.__v_emitter;m&&c&&m.emit("message-compilation",{type:"message-compilation",message:n,time:d-c,groupId:`translate:${e}`}),u&&h&&Rt&&on&&(Rt(h),on("intlify message compilation",u,h))}return f.locale=t,f.key=e,f.source=n,f}function G0(i,e,t){let n=null,s,r;process.env.NODE_ENV!=="production"&&zt&&(n=window.performance.now(),s="intlify-message-evaluation-start",r="intlify-message-evaluation-end",Rt&&Rt(s));const o=e(t);if(process.env.NODE_ENV!=="production"&&zt){const a=window.performance.now(),c=i.__v_emitter;c&&n&&c.emit("message-evaluation",{type:"message-evaluation",value:o,time:a-n,groupId:`translate:${e.key}`}),s&&r&&Rt&&on&&(Rt(r),on("intlify message evaluation",s,r))}return o}function bl(...i){const[e,t,n]=i,s=Me();if(!te(e)&&!ze(e)&&!Zt(e)&&!It(e))throw Ci(mt.INVALID_ARGUMENT);const r=ze(e)?String(e):(Zt(e),e);return ze(t)?s.plural=t:te(t)?s.default=t:xe(t)&&!mr(t)?s.named=t:je(t)&&(s.list=t),ze(n)?s.plural=n:te(n)?s.default=n:xe(n)&&tt(s,n),[r,s]}function K0(i,e,t,n,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{if(r&&r(o),process.env.NODE_ENV!=="production"){const a=H0(n),c=`Message compilation error: ${o.message}`,u=o.location&&a&&x_(a,o.location.start.offset,o.location.end.offset),h=i.__v_emitter;h&&a&&h.emit("compile-error",{message:a,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${t}`}),console.error(u?`${c}
17
+ ${u}`:c)}else throw o},onCacheKey:o=>m_(e,t,o)}}function H0(i){if(te(i))return i;if(i.loc&&i.loc.source)return i.loc.source}function J0(i,e,t,n){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:c,missingWarn:u,fallbackContext:h}=i,d={locale:e,modifiers:s,pluralRules:r,messages:(m,b)=>{let w=o(t,m);if(w==null&&(h||b)){const[,,g]=ch(h||i,m,e,a,c,u);w=o(g,m)}if(te(w)||It(w)){let g=!1;const y=uh(i,m,e,w,m,()=>{g=!0});return g?lh:y}else return Zt(w)?w:lh}};return i.processor&&(d.processor=i.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),ze(n.plural)&&(d.pluralIndex=n.plural),d}J_();function eb(){return hh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function hh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const tb=typeof Proxy=="function",ib="devtools-plugin:setup",nb="plugin:settings:set";let $n,yl;function sb(){var i;return $n!==void 0||(typeof window<"u"&&window.performance?($n=!0,yl=window.performance):typeof globalThis<"u"&&(!((i=globalThis.perf_hooks)===null||i===void 0)&&i.performance)?($n=!0,yl=globalThis.perf_hooks.performance):$n=!1),$n}function rb(){return sb()?yl.now():Date.now()}class ob{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const o in e.settings){const a=e.settings[o];n[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},n);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return rb()}},t&&t.on(nb,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:a,args:c,resolve:u})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function lb(i,e){const t=i,n=hh(),s=eb(),r=tb&&t.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(ib,i,e);else{const o=r?new ob(t,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}/*!
18
+ * vue-i18n v10.0.8
19
+ * (c) 2025 kazuya kawaguchi
20
20
  * Released under the MIT License.
21
- */const J0="10.0.5";function eb(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ln().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ln().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ui={FALLBACK_TO_ROOT:y0,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},tb={[Ui.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Ui.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Ui.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Ui.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function yr(i,...e){return ur(tb[i],...e)}const Me={UNEXPECTED_RETURN_TYPE:l0,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function yt(i,...e){return Qn(i,null,process.env.NODE_ENV!=="production"?{messages:ib,args:e}:void 0)}const ib={[Me.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Me.INVALID_ARGUMENT]:"Invalid argument",[Me.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Me.NOT_INSTALLED]:"Need to install with `app.use` function",[Me.UNEXPECTED_ERROR]:"Unexpected error",[Me.REQUIRED_VALUE]:"Required in value: {0}",[Me.INVALID_VALUE]:"Invalid value",[Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Me.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Me.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Me.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},yl=si("__translateVNode"),wl=si("__datetimeParts"),kl=si("__numberParts"),cn=si("__enableEmitter"),us=si("__disableEmitter"),eu=si("__setPluralRules"),tu=si("__injectWithOption"),xl=si("__dispose");function fs(i){if(!Ce(i))return i;for(const e in i)if(zt(i,e))if(!e.includes("."))Ce(i[e])&&fs(i[e]);else{const t=e.split("."),n=t.length-1;let s=i,r=!1;for(let o=0;o<n;o++){if(t[o]in s||(s[t[o]]=Ve()),!Ce(s[t[o]])){process.env.NODE_ENV!=="production"&&Bi(yr(Ui.IGNORE_OBJ_FLATTEN,{key:t[o]})),r=!0;break}s=s[t[o]]}r||(s[t[n]]=i[e],delete i[e]),Ce(s[t[n]])&&fs(s[t[n]])}return i}function Sl(i,e){const{messages:t,__i18n:n,messageResolver:s,flatJson:r}=e,o=ke(t)?t:We(n)?Ve():{[i]:Ve()};if(We(n)&&n.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:h}=a;c?(o[c]=o[c]||Ve(),pr(h,o[c])):pr(h,o)}else ne(a)&&pr(JSON.parse(a),o)}),s==null&&r)for(const a in o)zt(o,a)&&fs(o[a]);return o}function iu(i){return i.type}function nu(i,e,t){let n=Ce(e.messages)?e.messages:Ve();"__i18nGlobal"in t&&(n=Sl(i.locale.value,{messages:n,__i18n:t.__i18nGlobal}));const s=Object.keys(n);s.length&&s.forEach(r=>{i.mergeLocaleMessage(r,n[r])});{if(Ce(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{i.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(Ce(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{i.mergeNumberFormat(o,e.numberFormats[o])})}}}function su(i){return l.createVNode(l.Text,null,i,0)}const ru="__INTLIFY_META__",ou=()=>[],nb=()=>!1;let lu=0;function au(i){return(e,t,n,s)=>i(t,n,l.getCurrentInstance()||void 0,s)}const sb=()=>{const i=l.getCurrentInstance();let e=null;return i&&(e=iu(i)[ru])?{[ru]:e}:null};function Cl(i={}){const{__root:e,__injectWithOption:t}=i,n=e===void 0,s=i.flatJson,r=Yt?l.ref:l.shallowRef;let o=Te(i.inheritLocale)?i.inheritLocale:!0;const a=r(e&&o?e.locale.value:ne(i.locale)?i.locale:cs),c=r(e&&o?e.fallbackLocale.value:ne(i.fallbackLocale)||We(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a.value),h=r(Sl(a.value,i)),u=r(ke(i.datetimeFormats)?i.datetimeFormats:{[a.value]:{}}),f=r(ke(i.numberFormats)?i.numberFormats:{[a.value]:{}});let d=e?e.missingWarn:Te(i.missingWarn)||An(i.missingWarn)?i.missingWarn:!0,m=e?e.fallbackWarn:Te(i.fallbackWarn)||An(i.fallbackWarn)?i.fallbackWarn:!0,b=e?e.fallbackRoot:Te(i.fallbackRoot)?i.fallbackRoot:!0,w=!!i.fallbackFormat,g=Le(i.missing)?i.missing:null,p=Le(i.missing)?au(i.missing):null,O=Le(i.postTranslation)?i.postTranslation:null,C=e?e.warnHtmlMessage:Te(i.warnHtmlMessage)?i.warnHtmlMessage:!0,y=!!i.escapeParameter;const E=e?e.modifiers:ke(i.modifiers)?i.modifiers:{};let x=i.pluralRules||e&&e.pluralRules,k;k=(()=>{n&&Mh(null);const F={version:J0,locale:a.value,fallbackLocale:c.value,messages:h.value,modifiers:E,pluralRules:x,missing:p===null?void 0:p,missingWarn:d,fallbackWarn:m,fallbackFormat:w,unresolving:!0,postTranslation:O===null?void 0:O,warnHtmlMessage:C,escapeParameter:y,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=u.value,F.numberFormats=f.value,F.__datetimeFormatters=ke(k)?k.__datetimeFormatters:void 0,F.__numberFormatters=ke(k)?k.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=ke(k)?k.__v_emitter:void 0);const G=E0(F);return n&&Mh(G),G})(),hs(k,a.value,c.value);function N(){return[a.value,c.value,h.value,u.value,f.value]}const _=l.computed({get:()=>a.value,set:F=>{a.value=F,k.locale=a.value}}),A=l.computed({get:()=>c.value,set:F=>{c.value=F,k.fallbackLocale=c.value,hs(k,a.value,F)}}),S=l.computed(()=>h.value),M=l.computed(()=>u.value),T=l.computed(()=>f.value);function I(){return Le(O)?O:null}function B(F){O=F,k.postTranslation=F}function U(){return g}function Z(F){F!==null&&(p=au(F)),g=F,k.missing=p}function K(F,G){return F!=="translate"||!G.resolvedMessage}const X=(F,G,Pe,Fe,Li,rs)=>{N();let sn;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=e?T0():void 0),sn=F(k)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=void 0)}if(Pe!=="translate exists"&&Ye(sn)&&sn===Or||Pe==="translate exists"&&!sn){const[Mi,il]=G();if(process.env.NODE_ENV!=="production"&&e&&ne(Mi)&&K(Pe,il)&&(b&&(br(m,Mi)||Dh(d,Mi))&&Bi(yr(Ui.FALLBACK_TO_ROOT,{key:Mi,type:Pe})),process.env.NODE_ENV!=="production")){const{__v_emitter:os}=k;os&&b&&os.emit("fallback",{type:Pe,key:Mi,to:"global",groupId:`${Pe}:${Mi}`})}return e&&b?Fe(e):Li(Mi)}else{if(rs(sn))return sn;throw yt(Me.UNEXPECTED_RETURN_TYPE)}};function J(...F){return X(G=>Reflect.apply(Gh,null,[G,...F]),()=>_l(...F),"translate",G=>Reflect.apply(G.t,G,[...F]),G=>G,G=>ne(G))}function fe(...F){const[G,Pe,Fe]=F;if(Fe&&!Ce(Fe))throw yt(Me.INVALID_ARGUMENT);return J(G,Pe,tt({resolvedMessage:!0},Fe||{}))}function he(...F){return X(G=>Reflect.apply(Uh,null,[G,...F]),()=>gl(...F),"datetime format",G=>Reflect.apply(G.d,G,[...F]),()=>_r,G=>ne(G))}function ye(...F){return X(G=>Reflect.apply(qh,null,[G,...F]),()=>Ol(...F),"number format",G=>Reflect.apply(G.n,G,[...F]),()=>_r,G=>ne(G))}function z(F){return F.map(G=>ne(G)||Ye(G)||Te(G)?su(String(G)):G)}const V={normalize:z,interpolate:F=>F,type:"vnode"};function q(...F){return X(G=>{let Pe;const Fe=G;try{Fe.processor=V,Pe=Reflect.apply(Gh,null,[Fe,...F])}finally{Fe.processor=null}return Pe},()=>_l(...F),"translate",G=>G[yl](...F),G=>[su(G)],G=>We(G))}function H(...F){return X(G=>Reflect.apply(qh,null,[G,...F]),()=>Ol(...F),"number format",G=>G[kl](...F),ou,G=>ne(G)||We(G))}function Ue(...F){return X(G=>Reflect.apply(Uh,null,[G,...F]),()=>gl(...F),"datetime format",G=>G[wl](...F),ou,G=>ne(G)||We(G))}function Ri(F){x=F,k.pluralRules=x}function Re(F,G){return X(()=>{if(!F)return!1;const Pe=ne(G)?G:a.value,Fe=Dt(Pe),Li=k.messageResolver(Fe,F);return Zi(Li)||Zt(Li)||ne(Li)},()=>[F],"translate exists",Pe=>Reflect.apply(Pe.te,Pe,[F,G]),nb,Pe=>Te(Pe))}function qe(F){let G=null;const Pe=Qh(k,c.value,a.value);for(let Fe=0;Fe<Pe.length;Fe++){const Li=h.value[Pe[Fe]]||{},rs=k.messageResolver(Li,F);if(rs!=null){G=rs;break}}return G}function Wt(F){const G=qe(F);return G??(e?e.tm(F)||{}:{})}function Dt(F){return h.value[F]||{}}function ki(F,G){if(s){const Pe={[F]:G};for(const Fe in Pe)zt(Pe,Fe)&&fs(Pe[Fe]);G=Pe[F]}h.value[F]=G,k.messages=h.value}function Vi(F,G){h.value[F]=h.value[F]||{};const Pe={[F]:G};if(s)for(const Fe in Pe)zt(Pe,Fe)&&fs(Pe[Fe]);G=Pe[F],pr(G,h.value[F]),k.messages=h.value}function R(F){return u.value[F]||{}}function Q(F,G){u.value[F]=G,k.datetimeFormats=u.value,jh(k,F,G)}function W(F,G){u.value[F]=tt(u.value[F]||{},G),k.datetimeFormats=u.value,jh(k,F,G)}function Y(F){return f.value[F]||{}}function $e(F,G){f.value[F]=G,k.numberFormats=f.value,Wh(k,F,G)}function Xe(F,G){f.value[F]=tt(f.value[F]||{},G),k.numberFormats=f.value,Wh(k,F,G)}lu++,e&&Yt&&(l.watch(e.locale,F=>{o&&(a.value=F,k.locale=F,hs(k,a.value,c.value))}),l.watch(e.fallbackLocale,F=>{o&&(c.value=F,k.fallbackLocale=F,hs(k,a.value,c.value))}));const Qe={id:lu,locale:_,fallbackLocale:A,get inheritLocale(){return o},set inheritLocale(F){o=F,F&&e&&(a.value=e.locale.value,c.value=e.fallbackLocale.value,hs(k,a.value,c.value))},get availableLocales(){return Object.keys(h.value).sort()},messages:S,get modifiers(){return E},get pluralRules(){return x||{}},get isGlobal(){return n},get missingWarn(){return d},set missingWarn(F){d=F,k.missingWarn=d},get fallbackWarn(){return m},set fallbackWarn(F){m=F,k.fallbackWarn=m},get fallbackRoot(){return b},set fallbackRoot(F){b=F},get fallbackFormat(){return w},set fallbackFormat(F){w=F,k.fallbackFormat=w},get warnHtmlMessage(){return C},set warnHtmlMessage(F){C=F,k.warnHtmlMessage=F},get escapeParameter(){return y},set escapeParameter(F){y=F,k.escapeParameter=F},t:J,getLocaleMessage:Dt,setLocaleMessage:ki,mergeLocaleMessage:Vi,getPostTranslationHandler:I,setPostTranslationHandler:B,getMissingHandler:U,setMissingHandler:Z,[eu]:Ri};return Qe.datetimeFormats=M,Qe.numberFormats=T,Qe.rt=fe,Qe.te=Re,Qe.tm=Wt,Qe.d=he,Qe.n=ye,Qe.getDateTimeFormat=R,Qe.setDateTimeFormat=Q,Qe.mergeDateTimeFormat=W,Qe.getNumberFormat=Y,Qe.setNumberFormat=$e,Qe.mergeNumberFormat=Xe,Qe[tu]=t,Qe[yl]=q,Qe[wl]=Ue,Qe[kl]=H,process.env.NODE_ENV!=="production"&&(Qe[cn]=F=>{k.__v_emitter=F},Qe[us]=()=>{k.__v_emitter=void 0}),Qe}const cu="vue-i18n: composer properties",Al={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},rb={"vue-i18n-resource-inspector":"Search for scopes ..."},ob={"vue-i18n-timeline":16764185};let Ql;async function lb(i,e){return new Promise((t,n)=>{try{K0({id:"vue-devtools-plugin-vue-i18n",label:Al["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[cu],app:i},s=>{Ql=s,s.on.visitComponentTree(({componentInstance:o,treeNode:a})=>{ab(o,a,e)}),s.on.inspectComponent(({componentInstance:o,instanceData:a})=>{o.vnode.el&&o.vnode.el.__VUE_I18N__&&a&&(e.mode==="legacy"?o.vnode.el.__VUE_I18N__!==e.global.__composer&&uu(a,o.vnode.el.__VUE_I18N__):uu(a,o.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Al["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:rb["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&db(o,e)});const r=new Map;s.on.getInspectorState(async o=>{if(o.app===i&&o.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),mb(o,e),o.nodeId==="global"){if(!r.has(o.app)){const[a]=await s.getComponentInstances(o.app);r.set(o.app,a)}s.highlightElement(r.get(o.app))}else{const a=pb(o.nodeId,e);a&&s.highlightElement(a)}}),s.on.editInspectorState(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&Ob(o,e)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Al["vue-i18n-timeline"],color:ob["vue-i18n-timeline"]}),t(!0)})}catch(s){console.error(s),n(!1)}})}function hu(i){return i.type.name||i.type.displayName||i.type.__file||"Anonymous"}function ab(i,e,t){const n=t.mode==="composition"?t.global:t.global.__composer;if(i&&i.vnode.el&&i.vnode.el.__VUE_I18N__&&i.vnode.el.__VUE_I18N__!==n){const s={label:`i18n (${hu(i)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(s)}}function uu(i,e){const t=cu;i.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),i.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),i.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),i.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),i.state.push({type:t,key:"messages",editable:!1,value:Pl(e.messages.value)}),i.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),i.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Pl(i){const e={};return Object.keys(i).forEach(t=>{const n=i[t];Le(n)&&"source"in n?e[t]=fb(n):Zi(n)&&n.loc&&n.loc.source?e[t]=n.loc.source:Ce(n)?e[t]=Pl(n):e[t]=n}),e}const cb={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function hb(i){return i.replace(/[<>"&]/g,ub)}function ub(i){return cb[i]||i}function fb(i){return{_custom:{type:"function",display:`<span>ƒ</span> ${i.source?`("${hb(i.source)}")`:"(?)"}`}}}function db(i,e){i.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[n,s]of e.__instances){const r=e.mode==="composition"?s:s.__composer;t!==r&&i.rootNodes.push({id:r.id.toString(),label:`${hu(n)} Scope`})}}function pb(i,e){let t=null;if(i!=="global"){for(const[n,s]of e.__instances.entries())if(s.id.toString()===i){t=n;break}}return t}function fu(i,e){if(i==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(n=>n.id.toString()===i);return t?e.mode==="composition"?t:t.__composer:null}}function mb(i,e){const t=fu(i.nodeId,e);return t&&(i.state=gb(t)),null}function gb(i){const e={},t="Locale related info",n=[{type:t,key:"locale",editable:!0,value:i.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:i.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:i.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:i.inheritLocale}];e[t]=n;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:Pl(i.messages.value)}];e[s]=r;{const o="Datetime formats info",a=[{type:o,key:"datetimeFormats",editable:!1,value:i.datetimeFormats.value}];e[o]=a;const c="Datetime formats info",h=[{type:c,key:"numberFormats",editable:!1,value:i.numberFormats.value}];e[c]=h}return e}function ds(i,e){if(Ql){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Ql.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:i,groupId:t,time:Date.now(),meta:{},data:e||{},logType:i==="compile-error"?"error":i==="fallback"||i==="missing"?"warning":"default"}})}}function Ob(i,e){const t=fu(i.nodeId,e);if(t){const[n]=i.path;n==="locale"&&ne(i.state.value)?t.locale.value=i.state.value:n==="fallbackLocale"&&(ne(i.state.value)||We(i.state.value)||Ce(i.state.value))?t.fallbackLocale.value=i.state.value:n==="inheritLocale"&&Te(i.state.value)&&(t.inheritLocale=i.state.value)}}function _b(i){const e=ne(i.locale)?i.locale:cs,t=ne(i.fallbackLocale)||We(i.fallbackLocale)||ke(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:e,n=Le(i.missing)?i.missing:void 0,s=Te(i.silentTranslationWarn)||An(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,r=Te(i.silentFallbackWarn)||An(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,o=Te(i.fallbackRoot)?i.fallbackRoot:!0,a=!!i.formatFallbackMessages,c=ke(i.modifiers)?i.modifiers:{},h=i.pluralizationRules,u=Le(i.postTranslation)?i.postTranslation:void 0,f=ne(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,d=!!i.escapeParameterHtml,m=Te(i.sync)?i.sync:!0;let b=i.messages;if(ke(i.sharedMessages)){const E=i.sharedMessages;b=Object.keys(E).reduce((k,P)=>{const N=k[P]||(k[P]={});return tt(N,E[P]),k},b||{})}const{__i18n:w,__root:g,__injectWithOption:p}=i,O=i.datetimeFormats,C=i.numberFormats,y=i.flatJson;return{locale:e,fallbackLocale:t,messages:b,flatJson:y,datetimeFormats:O,numberFormats:C,missing:n,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:c,pluralRules:h,postTranslation:u,warnHtmlMessage:f,escapeParameter:d,messageResolver:i.messageResolver,inheritLocale:m,__i18n:w,__root:g,__injectWithOption:p}}function Tl(i={}){const e=Cl(_b(i)),{__extender:t}=i,n={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Te(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Te(s)?!s:s},get silentFallbackWarn(){return Te(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Te(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},tc(...s){const[r,o,a]=s,c={plural:1};let h=null,u=null;if(process.env.NODE_ENV!=="production"&&wh(yr(Ui.DEPRECATE_TC)),!ne(r))throw yt(Me.INVALID_ARGUMENT);const f=r;return ne(o)?c.locale=o:Ye(o)?c.plural=o:We(o)?h=o:ke(o)&&(u=o),ne(a)?c.locale=a:We(a)?h=a:ke(a)&&(u=a),Reflect.apply(e.t,e,[f,h||u||{},c])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return n.__extender=t,process.env.NODE_ENV!=="production"&&(n.__enableEmitter=s=>{const r=e;r[cn]&&r[cn](s)},n.__disableEmitter=()=>{const s=e;s[us]&&s[us]()}),n}function bb(i,e,t){return{beforeCreate(){const n=l.getCurrentInstance();if(!n)throw yt(Me.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=du(i,r);else{r.__injectWithOption=!0,r.__extender=t.__vueI18nExtend,this.$i18n=Tl(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=du(i,s);else{this.$i18n=Tl({__i18n:s.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=i;s.__i18nGlobal&&nu(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),t.__setInstance(n,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const n=this.$i18n;this.$el.__VUE_I18N__=n.__composer;const s=this.__v_emitter=ol();n.__enableEmitter&&n.__enableEmitter(s),s.on("*",ds)}},unmounted(){const n=l.getCurrentInstance();if(!n)throw yt(Me.UNEXPECTED_ERROR);const s=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ds),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),t.__deleteInstance(n),delete this.$i18n}}}function du(i,e){i.locale=e.locale||i.locale,i.fallbackLocale=e.fallbackLocale||i.fallbackLocale,i.missing=e.missing||i.missing,i.silentTranslationWarn=e.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=e.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=e.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=e.postTranslation||i.postTranslation,i.warnHtmlInMessage=e.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=e.escapeParameterHtml||i.escapeParameterHtml,i.sync=e.sync||i.sync,i.__composer[eu](e.pluralizationRules||i.pluralizationRules);const t=Sl(i.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(n=>i.mergeLocaleMessage(n,t[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>i.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>i.mergeNumberFormat(n,e.numberFormats[n])),i}const El={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function yb({slots:i},e){return e.length===1&&e[0]==="default"?(i.default?i.default():[]).reduce((n,s)=>[...n,...s.type===l.Fragment?s.children:[s]],[]):e.reduce((t,n)=>{const s=i[n];return s&&(t[n]=s()),t},Ve())}function pu(){return l.Fragment}const mu=l.defineComponent({name:"i18n-t",props:tt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>Ye(i)||!isNaN(i)}},El),setup(i,e){const{slots:t,attrs:n}=e,s=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f!=="_"),o=Ve();i.locale&&(o.locale=i.locale),i.plural!==void 0&&(o.plural=ne(i.plural)?+i.plural:i.plural);const a=yb(e,r),c=s[yl](i.keypath,a,o),h=tt(Ve(),n),u=ne(i.tag)||Ce(i.tag)?i.tag:pu();return l.h(u,h,c)}}});function wb(i){return We(i)&&!ne(i[0])}function gu(i,e,t,n){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=Ve();i.locale&&(o.locale=i.locale),ne(i.format)?o.key=i.format:Ce(i.format)&&(ne(i.format.key)&&(o.key=i.format.key),a=Object.keys(i.format).reduce((d,m)=>t.includes(m)?tt(Ve(),d,{[m]:i.format[m]}):d,Ve()));const c=n(i.value,o,a);let h=[o.key];We(c)?h=c.map((d,m)=>{const b=s[d.type],w=b?b({[d.type]:d.value,index:m,parts:c}):[d.value];return wb(w)&&(w[0].key=`${d.type}-${m}`),w}):ne(c)&&(h=[c]);const u=tt(Ve(),r),f=ne(i.tag)||Ce(i.tag)?i.tag:pu();return l.h(f,u,h)}}const Ou=l.defineComponent({name:"i18n-n",props:tt({value:{type:Number,required:!0},format:{type:[String,Object]}},El),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return gu(i,e,Xh,(...n)=>t[kl](...n))}}),_u=l.defineComponent({name:"i18n-d",props:tt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},El),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return gu(i,e,Fh,(...n)=>t[wl](...n))}});function kb(i,e){const t=i;if(i.mode==="composition")return t.__getInstance(e)||i.global;{const n=t.__getInstance(e);return n!=null?n.__composer:i.global.__composer}}function xb(i){const e=o=>{const{instance:a,value:c}=o;if(!a||!a.$)throw yt(Me.UNEXPECTED_ERROR);const h=kb(i,a.$),u=bu(c);return[Reflect.apply(h.t,h,[...yu(u)]),h]};return{created:(o,a)=>{const[c,h]=e(a);Yt&&i.global===h&&(o.__i18nWatcher=l.watch(h.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=h,o.textContent=c},unmounted:o=>{Yt&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const c=o.__composer,h=bu(a);o.textContent=Reflect.apply(c.t,c,[...yu(h)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function bu(i){if(ne(i))return{path:i};if(ke(i)){if(!("path"in i))throw yt(Me.REQUIRED_VALUE,"path");return i}else throw yt(Me.INVALID_VALUE)}function yu(i){const{path:e,locale:t,args:n,choice:s,plural:r}=i,o={},a=n||{};return ne(t)&&(o.locale=t),Ye(s)&&(o.plural=s),Ye(r)&&(o.plural=r),[e,a,o]}function Sb(i,e,...t){const n=ke(t[0])?t[0]:{};(Te(n.globalInstall)?n.globalInstall:!0)&&([mu.name,"I18nT"].forEach(r=>i.component(r,mu)),[Ou.name,"I18nN"].forEach(r=>i.component(r,Ou)),[_u.name,"I18nD"].forEach(r=>i.component(r,_u))),i.directive("t",xb(e))}const Cb=si("global-vue-i18n");function wu(i={},e){const t=__VUE_I18N_LEGACY_API__&&Te(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,n=Te(i.globalInjection)?i.globalInjection:!0,s=new Map,[r,o]=Ab(i,t),a=si(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(d){return s.get(d)||null}function h(d,m){s.set(d,m)}function u(d){s.delete(d)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...m){if(process.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=f),d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,f),ke(m[0])){const g=m[0];f.__composerExtend=g.__composerExtend,f.__vueI18nExtend=g.__vueI18nExtend}let b=null;!t&&n&&(b=Vb(d,f.global)),__VUE_I18N_FULL_INSTALL__&&Sb(d,f,...m),__VUE_I18N_LEGACY_API__&&t&&d.mixin(bb(o,o.__composer,f));const w=d.unmount;if(d.unmount=()=>{b&&b(),f.dispose(),w()},process.env.NODE_ENV!=="production"){if(!await lb(d,f))throw yt(Me.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const p=ol();if(t){const O=o;O.__enableEmitter&&O.__enableEmitter(p)}else{const O=o;O[cn]&&O[cn](p)}p.on("*",ds)}},get global(){return o},dispose(){r.stop()},__instances:s,__getInstance:c,__setInstance:h,__deleteInstance:u};return f}function Gt(i={}){const e=l.getCurrentInstance();if(e==null)throw yt(Me.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw yt(Me.NOT_INSTALLED);const t=Qb(e),n=Tb(t),s=iu(e),r=Pb(i,s);if(r==="global")return nu(n,i,s),n;if(r==="parent"){let c=Eb(t,e,i.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Bi(yr(Ui.NOT_FOUND_PARENT_SCOPE)),c=n),c}const o=t;let a=o.__getInstance(e);if(a==null){const c=tt({},i);"__i18n"in s&&(c.__i18n=s.__i18n),n&&(c.__root=n),a=Cl(c),o.__composerExtend&&(a[xl]=o.__composerExtend(a)),Nb(o,e,a),o.__setInstance(e,a)}return a}function Ab(i,e,t){const n=l.effectScope(),s=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Tl(i)):n.run(()=>Cl(i));if(s==null)throw yt(Me.UNEXPECTED_ERROR);return[n,s]}function Qb(i){const e=l.inject(i.isCE?Cb:i.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw yt(i.isCE?Me.NOT_INSTALLED_WITH_PROVIDE:Me.UNEXPECTED_ERROR);return e}function Pb(i,e){return fr(i)?"__i18n"in e?"local":"global":i.useScope?i.useScope:"local"}function Tb(i){return i.mode==="composition"?i.global:i.global.__composer}function Eb(i,e,t=!1){let n=null;const s=e.root;let r=$b(e,t);for(;r!=null;){const o=i;if(i.mode==="composition")n=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(n=a.__composer,t&&n&&!n[tu]&&(n=null))}if(n!=null||s===r)break;r=r.parent}return n}function $b(i,e=!1){return i==null?null:e&&i.vnode.ctx||i.parent}function Nb(i,e,t){let n=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,n=ol();const s=t;s[cn]&&s[cn](n),n.on("*",ds)}},e),l.onUnmounted(()=>{const s=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(n&&n.off("*",ds),s[us]&&s[us](),delete e.vnode.el.__VUE_I18N__),i.__deleteInstance(e);const r=s[xl];r&&(r(),delete s[xl])},e)}const Rb=["locale","fallbackLocale","availableLocales"],ku=["t","rt","d","n","tm","te"];function Vb(i,e){const t=Object.create(null);return Rb.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw yt(Me.UNEXPECTED_ERROR);const o=l.isRef(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),i.config.globalProperties.$i18n=t,ku.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw yt(Me.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${s}`,r)}),()=>{delete i.config.globalProperties.$i18n,ku.forEach(s=>{delete i.config.globalProperties[`$${s}`]})}}if(eb(),S0(i0),C0(b0),A0(Qh),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const i=ln();i.__INTLIFY__=!0,n0(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const xu="3.7.7",Lb=xu,$n=typeof Buffer=="function",Su=typeof TextDecoder=="function"?new TextDecoder:void 0,Cu=typeof TextEncoder=="function"?new TextEncoder:void 0,Mb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ps=Array.prototype.slice.call(Mb),wr=(i=>{let e={};return i.forEach((t,n)=>e[t]=n),e})(ps),Bb=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,at=String.fromCharCode.bind(String),Au=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),Qu=i=>i.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Pu=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),Tu=i=>{let e,t,n,s,r="";const o=i.length%3;for(let a=0;a<i.length;){if((t=i.charCodeAt(a++))>255||(n=i.charCodeAt(a++))>255||(s=i.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|s,r+=ps[e>>18&63]+ps[e>>12&63]+ps[e>>6&63]+ps[e&63]}return o?r.slice(0,o-3)+"===".substring(o):r},$l=typeof btoa=="function"?i=>btoa(i):$n?i=>Buffer.from(i,"binary").toString("base64"):Tu,Nl=$n?i=>Buffer.from(i).toString("base64"):i=>{let t=[];for(let n=0,s=i.length;n<s;n+=4096)t.push(at.apply(null,i.subarray(n,n+4096)));return $l(t.join(""))},kr=(i,e=!1)=>e?Qu(Nl(i)):Nl(i),Db=i=>{if(i.length<2){var e=i.charCodeAt(0);return e<128?i:e<2048?at(192|e>>>6)+at(128|e&63):at(224|e>>>12&15)+at(128|e>>>6&63)+at(128|e&63)}else{var e=65536+(i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320);return at(240|e>>>18&7)+at(128|e>>>12&63)+at(128|e>>>6&63)+at(128|e&63)}},vb=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Eu=i=>i.replace(vb,Db),$u=$n?i=>Buffer.from(i,"utf8").toString("base64"):Cu?i=>Nl(Cu.encode(i)):i=>$l(Eu(i)),Nn=(i,e=!1)=>e?Qu($u(i)):$u(i),Nu=i=>Nn(i,!0),Zb=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ib=i=>{switch(i.length){case 4:var e=(7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3),t=e-65536;return at((t>>>10)+55296)+at((t&1023)+56320);case 3:return at((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return at((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},Ru=i=>i.replace(Zb,Ib),Vu=i=>{if(i=i.replace(/\s+/g,""),!Bb.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(i.length&3));let e,t="",n,s;for(let r=0;r<i.length;)e=wr[i.charAt(r++)]<<18|wr[i.charAt(r++)]<<12|(n=wr[i.charAt(r++)])<<6|(s=wr[i.charAt(r++)]),t+=n===64?at(e>>16&255):s===64?at(e>>16&255,e>>8&255):at(e>>16&255,e>>8&255,e&255);return t},Rl=typeof atob=="function"?i=>atob(Pu(i)):$n?i=>Buffer.from(i,"base64").toString("binary"):Vu,Lu=$n?i=>Au(Buffer.from(i,"base64")):i=>Au(Rl(i).split("").map(e=>e.charCodeAt(0))),Mu=i=>Lu(Bu(i)),Ub=$n?i=>Buffer.from(i,"base64").toString("utf8"):Su?i=>Su.decode(Lu(i)):i=>Ru(Rl(i)),Bu=i=>Pu(i.replace(/[-_]/g,e=>e=="-"?"+":"/")),Vl=i=>Ub(Bu(i)),Fb=i=>{if(typeof i!="string")return!1;const e=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Du=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),vu=function(){const i=(e,t)=>Object.defineProperty(String.prototype,e,Du(t));i("fromBase64",function(){return Vl(this)}),i("toBase64",function(e){return Nn(this,e)}),i("toBase64URI",function(){return Nn(this,!0)}),i("toBase64URL",function(){return Nn(this,!0)}),i("toUint8Array",function(){return Mu(this)})},Zu=function(){const i=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Du(t));i("toBase64",function(e){return kr(this,e)}),i("toBase64URI",function(){return kr(this,!0)}),i("toBase64URL",function(){return kr(this,!0)})},jb={version:xu,VERSION:Lb,atob:Rl,atobPolyfill:Vu,btoa:$l,btoaPolyfill:Tu,fromBase64:Vl,toBase64:Nn,encode:Nn,encodeURI:Nu,encodeURL:Nu,utob:Eu,btou:Ru,decode:Vl,isValid:Fb,fromUint8Array:kr,toUint8Array:Mu,extendString:vu,extendUint8Array:Zu,extendBuiltins:()=>{vu(),Zu()}},qb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACOZJREFUeF7tnUF2ozoQRYGNJT2Nvacke3KYJr0x00f9zYnb346FwKpXpZtJD1qgp1fvusAhqO/4wQEcuOlAjzc4gAO3HQAQ0oEDPzgAIMQDBwCEDOBAmQN0kDLfOKoRBwCkkUKzzDIHAKTMN45qxAEAaaTQLLPMAQAp842jGnFAGpD9fv+c6nA8Hv/+y892DgzD8HU4HL62O2PMM0kBkoBIMPR9/zRNE1DUydz7OI5vdabyN4sMILvd7hMozAIEJDesNwckdY1pml6BwwyOeWIguVICU0BeXl5Sa381jwYCgEStgwCHLJV0krPSmHWQl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xUqspZxkElVzub146DlqeL12sRLrduVSP5PjduUJfFOBUg35vcCqAWRRcj0Nw/BtHMfvm0pyQDMKBCjGcfx9OBzOlk/KtwSsCpB7wU6ZZWse/LtDBQIMIeyagLiVsXpAHK47ITekAIA0tJhMJb8CAJJfU67YkAIA0tBiMpX8CgBIfk25YkMKAEhDi8lU8isAIPk15YoNKQAgDS0mU8mvAIDk15QrNqQAgDS0mEwlvwL/AfRjWW6yHrZ9AAAAAElFTkSuQmCC",zb={xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",png:"image/png",gif:"image/gif",jpeg:"image/jpeg",jpg:"image/jpeg",mp3:"audio/mpeg",aac:"audio/aac",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",htm:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jsonld:"application/ld+json",mid:"audio/midi audio/x-midi",midi:"audio/midi audio/x-midi",mjs:"text/javascript",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"text/xml",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip"},Iu=()=>{function i(o,a){try{const c=decodeURI(o.headers["content-disposition"]);let h=a||c.split("filename*=utf-8")[1];const u=h.substring(h.lastIndexOf(".")+1),f=new Blob([o.data],{type:zb[u]??"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),m=(window.URL||window.webkitURL).createObjectURL(f),b=document.createElement("a");b.setAttribute("href",m);const w=h.lastIndexOf(".");h=`${h.slice(0,w)}_${Ne.dayjs().format("YYYYMMDD")+h.slice(w)}`,b.setAttribute("download",h),document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(m)}catch(c){console.error(c)}}function e({multiple:o=!1},a){const c=document.createElement("input");c.style.display="none",c.setAttribute("type","file"),o&&c.setAttribute("multiple",o),c.setAttribute("accept","application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.xml"),document.body.appendChild(c),c.click(),c.addEventListener("change",h=>{a(h)&&document.body.removeChild(c)})}function t(o){return o?o.substring(o.lastIndexOf("/")+1):""}function n(o){return o?new URL(Object.assign({"../static/images/upload-excel.png":qb,"../static/images/upload-file.png":Xb,"../static/images/upload-pdf.png":Wb,"../static/images/upload-word.png":Yb})[`../static/${o}`],self.location).href:""}function s(o,a,c){if(!a)return;let h=c||t(a);const u=h.lastIndexOf(".");h=`${h.slice(0,u)}_${Date.now()+h.slice(u)}`,o({url:a,method:"GET",responseType:"blob"}).then(f=>{const d=URL.createObjectURL(f.data),m=document.createElement("a");m.style.display="none",m.setAttribute("href",d),m.setAttribute("target","_blank"),m.setAttribute("download",h),document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(d)})}function r(o){if(!o)return;const a=document.createElement("input");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),Ne.ElNotification({title:"提示",message:"复制成功",type:"success",duration:2e3})}return{exportFile:i,importFile:e,getAssetsFileName:t,getAssetsFilePath:n,downloadFile:s,copy:r}},Uu={label:"name",value:"code",children:"children"},Fu={label:"key",value:"value"},xr={label:"name",value:"code",children:"children"},Gb={year:"year",month:"month",date:"day"};/*! Element Plus Icons Vue v2.3.1 */var Hb=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Kb=Hb,Jb=l.defineComponent({name:"Delete",__name:"delete",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ey=Jb,ty=l.defineComponent({name:"Download",__name:"download",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),iy=ty,ny=l.defineComponent({name:"MoreFilled",__name:"more-filled",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),sy=ny,ry=l.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),oy=ry;const wT="",ct=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},ly={class:"a-loading"},Sr=ct({__name:"index",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("div",ly,t[0]||(t[0]=[l.createElementVNode("span",{class:"dot dot-spin"},[l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i")],-1)])))}},[["__scopeId","data-v-048c6c03"]]),xT="",ay={key:0,class:"table-link"},cy=["onClick"],hy={class:"no-image"},uy={key:4},ju=ct({__name:"index",props:{pageKey:{type:String,default:""},defaultParams:{type:Array,default:()=>[]},matchData:{type:Object,default:()=>({})},maxHeight:{type:[String,Number],default:-1},tableConfig:{type:Object,default:()=>({})}},emits:["onClickRow","changeExpansionRow","refresh","load","operate"],setup(i,{expose:e,emit:t}){const n=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>qy),loadingComponent:Sr,delay:20}),s=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>Wy),loadingComponent:Sr,delay:20}),r=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>zy),loadingComponent:Sr,delay:20}),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Ky)),a=l.defineAsyncComponent(()=>Promise.resolve().then(()=>t1)),{t:c}=Gt(),h=l.inject("actModules"),u=l.inject("apiPrefix"),f=l.inject("request"),d=l.inject("themeColor"),m=l.inject("cacheTokenType"),b=l.inject("cookieStorage"),w=rn.useRoute(),g=rn.useRouter(),p=t,O=i,C=()=>({pageLoading:!1,tableLoading:!1,tableTotal:0,tableSelection:[],tableQuery:{pageIndex:1,pageSize:10},showFormDialog:!1,showEditorPreDialog:!1,dialogTitle:"",editorDialogTitle:"",dialogData:{}});let y=l.reactive(C()),E=l.ref("loading"),x=l.ref([]),k={},P=[],N=l.ref([]),_=l.ref([]),A=l.ref([]),S=l.ref([]),M=l.ref([]),T=l.ref({});const I=l.ref(null),B=l.ref(null),U=l.ref(null),Z=l.ref(null),K=l.ref(0);let X=l.ref({});const J=$=>f({url:`${u}/sysOperate/getMenuOfOperateByRole`,method:"post",data:$}),fe=$=>f({url:`${u}/pages/getPageDetail?key=${$}`,method:"get"}),he=()=>{y=l.reactive(C()),E.value="loading",x.value=[],k={},P=[],N.value=[],_.value=[],A.value=[],S.value=[],M.value=[],X.value={}},ye=()=>{l.nextTick(()=>{setTimeout(()=>{var ue,oe,re,te,ee,Oe,me;const $=((oe=(ue=I.value)==null?void 0:ue.$el)==null?void 0:oe.offsetHeight)||0,v=((te=(re=B.value)==null?void 0:re.$el)==null?void 0:te.offsetHeight)||0,ae=((Oe=(ee=U.value)==null?void 0:ee.$el)==null?void 0:Oe.offsetHeight)||0,pe=$-v-ae-6;K.value=O.maxHeight>0?O.maxHeight:(me=k==null?void 0:k.tableConfig)!=null&&me.isPagination?pe-48:pe},500)})},z=()=>[...os(P)],D=$=>{Z.value.updateSelection($)},V=()=>y.tableSelection,q=async()=>{await ti(P),p("refresh")},H=$=>{if(!$||!$.tableQueryDefaultValue)return;const ae=Wt($)["value-format"]||"YYYY-MM-DD HH:mm:ss";if($.fieldType=="date"&&$.tableQueryDefaultValue=="nowYear")return Ne.dayjs().format(ae);if($.fieldType=="date"&&$.tableQueryDefaultValue=="yearAgo")return Ne.dayjs().subtract(1,"year").format(ae);if($.fieldType=="dateRange"&&$.tableQueryDefaultValue.includes("&")){const pe=$.tableQueryDefaultValue.split("&");return[Ne.dayjs(pe[0]).subtract(6,"month").format(ae),Ne.dayjs(pe[1]).format(ae)]}if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="yearAgo")return[Ne.dayjs().subtract(1,"year").format(ae),Ne.dayjs().format(ae)];if($.fieldType=="dateRange"&&$.tableQueryDefaultValue=="sixMonthsAgo")return[Ne.dayjs().subtract(6,"month").format(ae),Ne.dayjs().format(ae)]},Ue=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";"),ue=pe&&pe.length?pe[0]:"",oe=ue.substring(ue.lastIndexOf(".")+1);return/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/.test(oe)},Ri=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const pe=(v.row[$.fieldKey]??"").split(";");return pe&&pe.length?pe[0]:""},Re=($,v)=>{if(!(v.row&&Object.keys(v.row).length))return;const ae=v.row[$.fieldKey]??null;return ae?ae.split(";"):[]},qe=$=>$==="true",Wt=$=>new Function("",$.fieldUiProps)()||{},Dt=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent(h[`/src/views${$}.vue`])):null,ki=async($,v)=>Reflect.has(h,`/src/views${$}.vue`)?l.markRaw(l.defineAsyncComponent({loader:h[`/src/views${$}.vue`],loadingComponent:Sr,delay:20})):null,Vi=async()=>{k.buttons=await Promise.all(k.buttons.map(async $=>{if($.isCustomBtn&&$.customType=="component"){const{customComponentUrl:v,customComponentName:ae}=$,pe=await Dt(v);$[ae]=pe}return $}))},R=async()=>{const $=k.fields.filter(v=>(v.formCustomComponentes??[]).some(ae=>ae.permissionCode=="tableShow"&&ae.isFieldCustom));M.value=await Promise.all($.map(async v=>{const ae=v.formCustomComponentes.find(re=>re.permissionCode=="tableShow"),{customComponentUrl:pe,customComponentName:ue}=ae,oe=await Dt(pe);return v.customTableHeaderName=ue,v.customTableHeaderUrl=pe,v[`customTableHeaderInstance_${ue}`]=oe,v.headerItem={label:v.fieldName,prop:v.fieldKey,align:v.tableCellAlignType,width:v.tableCellWidthType=="default"?v.tableCellWidth:"",minWidth:v.tableCellWidthType=="min"?v.tableCellWidth:"",showOverflowTooltip:v.isTableCellOverflowTooltip||!1,sort:v.isTableCellSort||!1},v}))},Q=($,v)=>{switch($){case"array":return typeof v=="string"?v.toString().split().sort((ae,pe)=>ae.sort-pe.sort):[v];case"number":return Number(v);case"boolean":return!!v;default:return v}},W=($,v)=>v[$.fieldKey]?v[$.fieldKey].toString().includes("T")?Ne.dayjs(v[$.fieldKey]).format("YYYY-MM-DD HH:mm:ss"):v[$.fieldKey]:"";function Y($,v={}){return $.replace(/\{([^}]+)\}/g,(ae,pe)=>{const ue=pe.trim().split(".");let oe=v;for(const re of ue){if(!oe||typeof oe!="object")break;oe=oe[re]}return oe!==void 0?oe:ae})}const $e=$=>$?Y($,O.matchData):"",Xe=($,v,ae)=>{switch($){case"LessThanOrEqual":return v<=ae;case"LessThan":return v<ae;case"GreaterThanOrEqual":return v>=ae;case"GreaterThan":return v>ae;case"NotEqual":return v!=ae;case"Equal":return v==ae;default:return v==ae}},Qe=($,v)=>{if(!$.matchFields.length)return!0;const ae=re=>re.matchType=="default"?v[re.matchFieldName]:O.matchData[re.matchType][re.matchFieldName];let ue=$.matchFields.reduce((re,te,ee)=>{const Oe=ae(te),me=Xe(te.matchCondition,Oe,te.fieldValue==""?null:te.fieldValue=="true"||te.fieldValue=="false"?qe(te.fieldValue):te.fieldValue);return re+=me,ee!==$.matchFields.length-1&&(re+=te.spliceCondition||"&&"),re},"").split("||"),oe=ue.reduce((re,te,ee)=>(re+=`(${te})`,ee<ue.length-1&&(re+="||"),re),"");return new Function(`return ${oe}`)()},F=($,v)=>Object.keys(v).length?x.value.some(ae=>ae.unique==$.permissionCode)&&Qe($,v):!1,G=async $=>{try{y.pageLoading=!0;const v=O.pageKey??w.params.key,{data:{pageConfigs:ae}}=await fe(v);return k=ae.pageConfig?JSON.parse(ae.pageConfig):{},y.tableQuery.pageSize=k.tableConfig.pageSize||10,y.pageLoading=!1,Promise.resolve(Object.keys(k).length)}catch(v){y.pageLoading=!1,console.error(v)}},Pe=async($=[],v={},ae=!0,pe=!1)=>{try{const ue=$.filter(te=>["select","multipleSelect","selectIcon","switch","virtualizedSelect","virtualizedMultipleSelect","fullLoadTreeSelect","provinceCascade"].includes(te.fieldType)&&(!Reflect.has(te,"dataList")||!te.dataList.length||pe)),re=(await Promise.allSettled(ue.map(async te=>{const ee=te.postRequestParams.filter(lt=>lt.submitType==="default").reduce((lt,ii)=>(lt[ii.submitName]=Q(ii.paramsType,ii.submitValue),lt),{}),Oe=te.postRequestParams.filter(lt=>lt.submitType==="match").reduce((lt,ii)=>(lt[ii.submitName]=Q(ii.paramsType,v[ii.submitValue][ii.submitName]),lt),{}),me=te.postRequestParams.filter(lt=>lt.submitType==="dynamic").map(lt=>({field:lt.submitName,operate:lt.submitMatchType,value:Q(lt.paramsType,lt.submitValue)}));let He={};Object.keys(ee).length&&(He={...He,...ee}),Object.keys(Oe).length&&(He={...He,...Oe}),me.length&&(He.dynamicFilters=me);const{data:xi}=await f({url:te.fieldRequestUrl,method:te.fieldRequestType||"GET",data:He});return Promise.resolve({...te,dataList:xi||[]})}))).filter(te=>te.status==="fulfilled"&&Reflect.has(te,"value")).map(te=>te.value);return ae&&k.fields.forEach(te=>{const ee=re.find(Oe=>te.fieldName==Oe.fieldName&&te.fieldKey==Oe.fieldKey);ee&&(te.dataList=(ee==null?void 0:ee.dataList)??[])}),re}catch(ue){console.error(ue)}},Fe=l.computed(()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return!$||$>=_.value.length}),Li=()=>{const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return Fe.value?_.value:_.value.slice(0,$)},rs=()=>{var v;const{tableConfig:{tableMoreBtnSplitNumber:$}}=k;return Fe.value?[]:_.value.slice($,(v=_.value)==null?void 0:v.length)},sn=async $=>{try{const v=($||[]).filter(oe=>oe.useScenes.some(re=>["tableShow"].includes(re))).sort((oe,re)=>oe.sort-re.sort),ae=["editor","upload","date"];let pe=v.map(oe=>{const re=oe.formCustomComponentes.some(te=>te.permissionCode=="tableShow"&&te.isFieldCustom);return{label:oe.fieldName,prop:oe.fieldKey,align:oe.tableCellAlignType,width:oe.tableCellWidthType=="default"?oe.tableCellWidth:"",minWidth:oe.tableCellWidthType=="min"?oe.tableCellWidth:"",showOverflowTooltip:oe.isTableCellOverflowTooltip||!1,sort:oe.isTableCellSort||!1,render:!!oe.fieldRequestUrl||oe.tableCellContentType=="link"||ae.includes(oe.fieldType),isCustomTableHeader:re}});k.tableConfig.isSerialNumber&&pe.unshift({prop:"serialNumber",width:80}),k.tableConfig.isCheckRow&&pe.unshift({prop:"checkbox",width:50});const ue=_.value.filter(oe=>x.value.some(re=>re.unique==oe.permissionCode));k.tableConfig.isOperateRow&&ue.length&&pe.push({label:c("act.operate"),prop:"operate",width:k.tableConfig.tableOperateCellWidth,render:!0,fixed:"right"}),S.value=v.filter(oe=>!!oe.fieldRequestUrl&&oe.useScenes.includes("tableShow")||oe.tableCellContentType=="link"||ae.includes(oe.fieldType)),N.value=pe}catch(v){console.error(v)}},Mi=()=>{_.value=(k.buttons||[]).filter($=>$.permissionCode!==1001&&$.btnPostion.includes("table")).sort(($,v)=>$.sort-v.sort).map($=>($.loading=!1,$.btnAlias&&($.btnName=$.btnAlias),$))},il=()=>k.fields.filter($=>$.useScenes.includes("tableSearch")).map($=>(["date","dateRange"].includes($.fieldType)?$.queryValue=$.tableQueryDefaultValue?$.tableQueryDefaultValue:H($):$.queryValue=($==null?void 0:$.tableQueryDefaultValue)||void 0,O.defaultParams.some(v=>{v.field==$.fieldKey&&v.operate===$.tableQueryCondition&&($.queryValue=v.value)}),$)),os=($,v="queryValue")=>$?($||[]).filter(pe=>!!pe[v]).reduce((pe,ue)=>{var re;const oe=Wt(ue);if(ue.fieldType==="date"&&oe["value-format"]!=="YYYY"){const te=oe!=null&&oe.dayJsType?Gb[(re=ue.fieldUiProps)==null?void 0:re.dayJsType]:"day",ee=oe["value-format"]||"YYYY-MM-DD HH:mm:ss";pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:Ne.dayjs(ue[v]).startOf(te).format(ee)},{field:ue.fieldKey,operate:"LessThanOrEqual",value:Ne.dayjs(ue[v]).endOf(te).format(ee)}]}else if(ue.fieldType==="dateRange"&&ue[v].length)if(ue.fieldKey.includes("&")){const te=ue.fieldKey.split("&")||[];pe=[...pe,{field:te[0],operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:te[1],operate:"LessThanOrEqual",value:ue.queryValue[1]}]}else pe=[...pe,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:ue.fieldKey,operate:"LessThanOrEqual",value:ue.queryValue[1]}];else if(["provinceCascade"].includes(ue.fieldType)&&ue[v].length){const te=(ue.fieldKey.split("&")||[]).map((ee,Oe)=>({field:ee,operate:"Equal",value:ue.queryValue[Oe]}));pe=[...pe,...te]}else return Array.isArray(ue[v])&&!ue[v].length?[...pe]:[...pe,{field:ue.fieldKey,operate:ue.tableQueryCondition,value:ue.tableQueryCondition==="In"&&ue[v]&&typeof ue[v]=="string"?ue[v].split(";"):ue[v]=="true"||ue[v]=="false"?qe(ue[v]):ue[v]}];return pe},[]):[],uT=($,v)=>{if(!$.dataList||!Reflect.has(v,$.fieldKey))return"";const ae=v[$.fieldKey];if(!ae&&ae!==0&&ae!==!1)return"";const pe=Wt($),ue=Object.assign({key:"key",value:"value"},pe.props||{});return["virtualizedSelect","virtualizedMultipleSelect"].includes($.fieldType)&&(ue.key=ue.label),["multipleSelect","select","switch","virtualizedSelect","virtualizedMultipleSelect","selectIcon"].includes($.fieldType)?($.dataList||[]).filter(oe=>{const re=$.fieldType==="selectIcon"?`btn-${oe[ue.value]}`:oe[ue.value],te=re=="true"||re=="false"?qe(re):re;return Array.isArray(ae)?ae.some(ee=>ee==re==ee):typeof ae=="string"?ae.split(";").includes(te):ae==te}).map(oe=>oe[ue.key]).join(";"):ae},ti=async($=[])=>{try{y.tableLoading=!0;const v=O.defaultParams.filter(oe=>!(k.fields??[]).some(re=>re.fieldKey===oe.field&&re.tableQueryCondition===oe.operate&&re.useScenes.includes("tableSearch"))),ae=k.tableConfig.defaultParams.map(oe=>({field:oe.submitFieldName,operate:oe.matchValue,value:Q(oe.submitFieldType,oe.defaultValue)})),pe=[...v,...ae,...os($)];k.tableConfig.isPagination||(y.tableQuery.pageSize=9999);const{data:ue}=await f({url:k.tableConfig.dataUrl,method:"POST",data:{...y.tableQuery,dynamicFilters:pe}});y.tableTotal=ue.totalCount||0,A.value=ue.datas||[],y.tableLoading=!1}catch(v){y.tableLoading=!1,console.error(v)}},YO=async()=>{try{E.value="loading";const $=O.pageKey;if(!await G($)){E.value="end";return}await R(),await Vi(),await Pe(k.fields.filter(oe=>oe.useScenes.some(re=>["tableSearch","tableShow"].includes(re)))),E.value="success";let ae="";if(m==="sessionStorage")ae=sessionStorage.getItem("accessToken");else{const oe=b.getPrefix();ae=b.getItemValue(`${oe}accessToken`)}const ue=JSON.parse(jb.decode(ae.split(".")[1]))["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];x.value=(await J({roleId:ue,key:$})).data.datas||[],Mi(),sn(k.fields),ye(),P=il(),(!Reflect.has(k.tableConfig,"isExecuteImmediatelyTableApi")||k.tableConfig.isExecuteImmediatelyTableApi)&&await ti(P),p("load"),console.log(k)}catch($){console.error($),E.value="end"}};l.provide("globalProps",O),l.provide("loadComponents",Dt),l.provide("defineAsyncLoadComponents",ki),l.provide("stringToBoolean",qe),l.provide("matchCondition",Xe),l.provide("menuPermissionBtns",x),l.provide("getTableData",ti),l.provide("tableBtnRefs",T.value),l.provide("formatDataType",Q),l.provide("getFieldUiProps",Wt),l.provide("disposeRequestData",Pe),l.provide("disposeDate",H),l.provide("getDefaultQueryValues",il),l.watch(()=>O.pageKey,($,v)=>{he(),YO()},{immediate:!0});const zO=async($,v)=>{P=$,await ti($),p("refresh"),v(!0)},fT=$=>{p("operate",$),ti(P)},nl=($,v)=>{const{exportFile:ae,importFile:pe,downloadFile:ue}=Iu();if($.isCustomBtn){if($.customType=="component"&&!Reflect.has($,[$.customComponentName])){Ne.ElNotification({title:"提示",message:`当前自定义按钮未创建vue文件,请在路径【/src/views${$.customComponentUrl}】下创建vue文件`,type:"warning",duration:2500});return}if($.customType=="code"){try{new Function("router","route","data","configItem","cookieStorage",$.codeStr)(g,w,v,$,b)}catch(te){console.error(te)}return}const re=`${$.customComponentName}-${$.permissionCode}`;T.value[re]&&T.value[re].onTigger({rowData:v,tableSelection:y.tableSelection});return}if($.submitWay=="associationSubTable"){Ne.ElNotification({title:c("act.tip"),message:c("act.developing"),type:"warning",duration:2500});return}if(["export","exportUrl"].includes($.submitWay)){$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;let re=[...O.defaultParams,...os(P)],te=($.submitFields||[]).reduce((Oe,me)=>{if(me.matchType=="default")Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Q(me.submitFieldType,me.matchFieldName)}];else if(me.matchType=="match"){const He=me.submitFieldMatchOrigin==="rowData"?v:O.matchData[me.submitFieldMatchOrigin];Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:Q(me.submitFieldType,He[me.matchFieldName])}]}else if(me.matchType=="selection"){const He=y.tableSelection.map(xi=>xi[me.matchFieldName]);Oe=[...Oe,{field:me.submitFieldName,operate:me.submitFieldType==="array"?"In":"Equal",value:me.submitFieldType==="string"?He.join():He}]}return Oe},[]);const ee=[...re,...te];f({url:$e($.requestUrl),method:"post",data:{dynamicFilters:ee},responseType:["exportUrl"].includes($.submitWay)?"json":"blob"}).then(Oe=>{$.submitWay=="exportUrl"?ue(f,Oe.data):ae(Oe),p("operate",$),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(Oe=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if(["import","batchImport"].includes($.submitWay)){pe({multiple:$.submitWay=="batchImport"},re=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0;const te=new FormData;if(($.submitFields||[]).forEach(ee=>{var Oe,me;if(ee.matchType=="default")te.append(ee.submitFieldName,Q(ee.submitFieldType,ee.matchFieldName));else if(ee.matchType=="match")(Oe=Object.keys(v))!=null&&Oe.length&&te.append(ee.submitFieldName,Q(ee.submitFieldType,v[ee.matchFieldName]));else if(ee.matchType=="query"){const He=((me=P.find(xi=>xi.fieldKey==ee.matchFieldName))==null?void 0:me.queryValue)??null;te.append(ee.submitFieldName,Q(ee.submitFieldType,He))}}),$.submitWay=="import")te.append($.importFileName||"file",re.target.files[0]);else for(let ee of re.target.files)te.append($.importFileName||"files",ee);return f({url:$e($.requestUrl),method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:te}).then(ee=>{Ne.ElNotification({title:c("act.tip"),message:`${ee.msg}`,type:"success",duration:2500}),p("operate",$),ti(P),$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1}).catch(()=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})});return}if($.submitWay==="executeApi"){let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Q(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:O.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Q(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=P.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=y.tableSelection.reduce((me,He)=>(Oe.submitFieldType==="array"?me=[...me,...Q(Oe.submitFieldType,He[Oe.matchFieldName])]:me=[...me,Q(Oe.submitFieldType,He[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:$e($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),p("operate",$),ti(P)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1});return}if($.submitWay==="messageBox"){if($.btnPostion==="header"&&$.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}Ne.ElMessageBox.confirm(`${c("act.isExecuteOperate")}?`,c("act.tip"),{confirmButtonText:c("act.enter"),cancelButtonText:c("act.cancel"),type:"warning"}).then(()=>{let re=($.submitFields||[]).reduce((te,ee)=>{var Oe;if(ee.matchType=="default")te[ee.submitFieldName]=Q(ee.submitFieldType,ee.matchFieldName);else if(ee.matchType=="match"){const me=ee.submitFieldMatchOrigin==="rowData"?v:O.matchData[ee.submitFieldMatchOrigin];te[ee.submitFieldName]=Q(ee.submitFieldType,me[ee.matchFieldName])}else ee.matchType=="query"&&(te[ee.submitFieldName]=((Oe=P.find(me=>me.fieldKey==ee.matchFieldName))==null?void 0:Oe.queryValue)??null);return te},{});if($.btnPostion==="header"){const te=($.submitFields||[]).filter(ee=>ee.matchType=="selection").reduce((ee,Oe)=>(ee[Oe.submitFieldName]=y.tableSelection.reduce((me,He)=>(Oe.submitFieldType==="array"?me=[...me,...Q(Oe.submitFieldType,He[Oe.matchFieldName])]:me=[...me,Q(Oe.submitFieldType,He[Oe.matchFieldName])],me),[]),ee),{});Object.assign(re,te)}$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!0:v[`loading${$.permissionCode}`]=!0,f({url:$e($.requestUrl),method:"post",data:re}).then(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1,Ne.ElNotification({type:"success",title:c("act.tip"),message:`${$.btnName}${c("act.success")}`,duration:2500}),p("operate",$),ti(P)}).catch(te=>{$.btnPostion==="header"?$[`loading${$.permissionCode}`]=!1:v[`loading${$.permissionCode}`]=!1})}).catch(re=>{});return}if($.btnPostion==="header"&&$.submitWay==="dialog"&&($.submitFields||[]).some(re=>re.submitFieldMatchOrigin==="selections")&&!y.tableSelection.length){if(!k.tableConfig.isCheckRow){Ne.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!y.tableSelection.length){Ne.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${$.btnName}${c("act.data")}`,type:"warning",duration:2500});return}return}let oe=(k.fields||[]).filter(re=>re.useScenes.includes($.permissionCode)).map(re=>(re.customFiledsComponentes=re.formCustomComponentes.find(te=>te.permissionCode==$.permissionCode)||{},re));if(!oe.length){Ne.ElNotification({title:c("act.tip"),message:c("act.buttonBindField"),type:"warning",duration:2500});return}if($.submitWay==="dialog"){y.dialogTitle=$.btnName,y.dialogData={dataItem:{...$},rowData:{...v},selections:y.tableSelection||[],formConfig:k.formConfig,formList:oe},y.showFormDialog=!0;return}},dT=($,v,ae)=>{p("onClickRow",$,v,ae)},pT=($,v)=>{X.value=$,p("changeExpansionRow",$,v)},mT=($,v)=>{y.editorDialogTitle=`${c("act.preview")}${$.fieldName}`,y.dialogData={...v,editorContent:v[$.fieldKey]},y.showEditorPreDialog=!0};return e({loadData:YO,getDynamicFiltersData:z,getTableData:ti,getTableSelection:V,setTableSelection:D}),($,v)=>{const ae=l.resolveComponent("el-table-column"),pe=l.resolveComponent("el-image"),ue=l.resolveComponent("el-link"),oe=l.resolveComponent("a-svg-icon"),re=l.resolveComponent("el-button"),te=l.resolveComponent("el-dropdown-item"),ee=l.resolveComponent("el-dropdown-menu"),Oe=l.resolveComponent("el-dropdown"),me=l.resolveComponent("el-empty"),He=l.resolveComponent("el-card"),xi=l.resolveDirective("debounce"),lt=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(He,{class:"act-module",ref_key:"actModuleRef",ref:I,shadow:"never"},{default:l.withCtx(()=>{var ii,GO;return[l.unref(E)==="success"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(n),{ref_key:"queryModuleRef",ref:B,data:l.unref(k),onReset:zO,onSearch:zO},null,8,["data"]),l.createVNode(l.unref(s),{ref_key:"headerButtonsModuleRef",ref:U,data:l.unref(k),onOnOperate:nl},null,8,["data"]),l.createVNode(l.unref(r),{ref_key:"aTableRef",ref:Z,loading:l.unref(y).tableLoading,total:l.unref(y).tableTotal,tableQuery:l.unref(y).tableQuery,"onUpdate:tableQuery":v[0]||(v[0]=_e=>l.unref(y).tableQuery=_e),selection:l.unref(y).tableSelection,"onUpdate:selection":v[1]||(v[1]=_e=>l.unref(y).tableSelection=_e),headers:l.unref(N),data:l.unref(A),showPagination:(GO=(ii=l.unref(k))==null?void 0:ii.tableConfig)==null?void 0:GO.isPagination,tableConfig:O.tableConfig,maxHeight:K.value,onRefresh:q,onOnRowClick:dT,onChangeExpand:pT},l.createSlots({operate:l.withCtx(({scope:_e})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Li(),(ge,ni)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:ni},[F(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(T)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:ti},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(oe,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[xi]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`],onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(oe,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading","onClick"])),[[xi]])],64)):l.createCommentVNode("",!0)],64))),128)),Fe.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Oe,{key:0,class:"table-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(ee,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(rs(),(ge,ni)=>(l.openBlock(),l.createBlock(te,{key:ni,onClick:Cn=>nl(ge,_e.row)},{default:l.withCtx(()=>[F(ge,_e.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[ge.isCustomBtn&&ge.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ge[ge.customComponentName]),{key:0,ref_for:!0,ref:Cn=>l.unref(T)[`${ge.customComponentName}-${ge.permissionCode}`]=Cn,buttonData:ge,scope:_e,onRefresh:ti},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(re,{class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(oe,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[xi]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(re,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:_e.row[`loading${ge.permissionCode}`]},{default:l.withCtx(()=>[ge.btnIcon&&!_e.row[`loading${ge.permissionCode}`]?(l.openBlock(),l.createBlock(oe,{key:0,class:"mr2",name:ge.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(_e.row[`loading${ge.permissionCode}`]?ge.btnName+l.unref(c)("act.loading")+"...":ge.btnName),1)]),_:2},1032,["loading"])),[[xi]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:l.withCtx(()=>[l.createVNode(re,{class:"table-btn-more",icon:l.unref(sy),size:"small",circle:""},null,8,["icon"])]),_:2},1024))]),_:2},[l.renderList(l.unref(M),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(()=>[_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_e[`customTableHeaderInstance_${_e.customTableHeaderName}`]),{key:0,data:_e,configData:l.unref(k),rowData:l.unref(X)},null,8,["data","configData","rowData"])):(l.openBlock(),l.createBlock(ae,{key:1,label:_e.fieldName+l.unref(c)("act.customTableHeader"),width:"260"},null,8,["label"]))])})),l.renderList(l.unref(S),(_e,ge)=>({name:_e.fieldKey,fn:l.withCtx(({scope:ni})=>[_e.tableCellContentType=="link"?(l.openBlock(),l.createElementBlock("span",ay,l.toDisplayString(ni.row[_e.fieldKey]),1)):_e.fieldType=="editor"?(l.openBlock(),l.createElementBlock("span",{key:1,class:"table-link",onClick:Cn=>mT(_e,ni.row)},"点击预览",8,cy)):_e.fieldType=="upload"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[Ue(_e,ni)?(l.openBlock(),l.createBlock(pe,{key:0,class:"file-image",fit:"cover","preview-src-list":Re(_e,ni),"preview-teleported":"",src:Ri(_e,ni)},{error:l.withCtx(()=>[l.createElementVNode("div",hy,l.toDisplayString(_e("act.noImage")),1)]),_:2},1032,["preview-src-list","src"])):(l.openBlock(),l.createBlock(ue,{key:1,type:"primary"}))],64)):_e.fieldType=="date"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString(W(_e,ni.row)),1)],64)):(l.openBlock(),l.createElementBlock("span",uy,l.toDisplayString(uT(_e,ni.row)),1))])}))]),1032,["loading","total","tableQuery","selection","headers","data","showPagination","tableConfig","maxHeight"])],64)):l.createCommentVNode("",!0),l.createVNode(l.unref(o),{visible:l.unref(y).showFormDialog,"onUpdate:visible":v[2]||(v[2]=_e=>l.unref(y).showFormDialog=_e),title:l.unref(y).dialogTitle,data:l.unref(y).dialogData,onRefresh:fT},null,8,["visible","title","data"]),l.createVNode(l.unref(a),{visible:l.unref(y).showEditorPreDialog,"onUpdate:visible":v[3]||(v[3]=_e=>l.unref(y).showEditorPreDialog=_e),title:l.unref(y).editorDialogTitle,data:l.unref(y).dialogData},null,8,["visible","title","data"]),l.unref(E)==="end"?(l.openBlock(),l.createBlock(me,{key:1,description:l.unref(c)("act.noConfigPage")},{image:l.withCtx(()=>[l.createVNode(oe,{name:"config-nodata",width:"200",height:"200"})]),_:1},8,["description"])):l.createCommentVNode("",!0)]}),_:1})),[[lt,l.unref(y).pageLoading]])}}},[["__scopeId","data-v-5e51a3ae"]]),fy=[{key:"按钮形式",value:"default"},{key:"文字形式",value:"text"}],dy=[{key:"顶部",value:"header"},{key:"表格",value:"table"}],py=[{key:"主题色",value:"primary"},{key:"绿色",value:"success"},{key:"灰色",value:"info"},{key:"橙黄色",value:"warning"},{key:"红色",value:"danger"},{key:"浅蓝",value:"primary-light"}],my=[{key:"模态框",value:"dialog"},{key:"提示框",value:"messageBox"},{key:"导入",value:"import"},{key:"多文件导入",value:"batchImport"},{key:"导出(流)",value:"export"},{key:"导出(url)",value:"exportUrl"},{key:"直接执行接口",value:"executeApi"},{key:"关联子表",value:"associationSubTable"}],gy=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Oy=[{key:"且",value:"&&"},{key:"或",value:"||"}],_y=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"选择列",value:"selection"},{key:"查询条件",value:"query"}],by=[{key:"默认匹配",value:"default"},{key:"用户信息变量",value:"userInfo"}],yy=[{key:"组件",value:"component"},{key:"代码",value:"code"}],wy=[{key:"GET",value:"GET"},{key:"POST",value:"POST"}],qu=[{key:"隐式",value:"implicit"},{key:"输入框",value:"input"},{key:"数字输入框",value:"inputNumber"},{key:"textarea文本框",value:"textarea"},{key:"下拉单选框",value:"select"},{key:"虚拟下拉框",value:"virtualizedSelect"},{key:"下拉多选框",value:"multipleSelect"},{key:"虚拟下拉多选框",value:"virtualizedMultipleSelect"},{key:"树形下拉框",value:"fullLoadTreeSelect"},{key:"树形下拉框(懒加载)",value:"treeSelect"},{key:"级联下拉框",value:"provinceCascade"},{key:"时间框",value:"date"},{key:"时间范围框",value:"dateRange"},{key:"上传",value:"upload"},{key:"富文本",value:"editor"},{key:"switch开关",value:"switch"},{key:"下拉选择图标",value:"selectIcon"}],ky=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"dynamic",value:"dynamic"}],xy=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"}],Sy=[{key:"居中",value:"center"},{key:"左对齐",value:"left"},{key:"右对齐",value:"right"}],Cy=[{key:"默认",value:"default"},{key:"链接",value:"link"},{key:"标签",value:"tag"}],Ay=[{key:"默认宽",value:"default"},{key:"最小宽",value:"min"}],Xu=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Qy=[{key:"左侧",value:"right"},{key:"上侧",value:"top"}],Py=[{key:"是",value:"1"},{key:"否",value:"0"}],Wu=[{label:"表格配置",options:[{key:"表格查询",value:"tableSearch"},{key:"表格展示",value:"tableShow"}]},{label:"表单配置",options:[]}],Ty={__name:"configForm",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({formRow:1,dialogWidth:800,formLabelWidth:120,formLabelPosition:"top"});let r=l.ref(null),o=l.ref(s());return l.watch(()=>n.modelValue,(a,c)=>{a&&(o.value=Object.assign(o.value,{...a}))},{deep:!0,immediate:!0}),e({formRef:r,form:o}),(a,c)=>{const h=l.resolveComponent("el-input-number"),u=l.resolveComponent("el-form-item"),f=l.resolveComponent("el-col"),d=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),b=l.resolveComponent("el-row"),w=l.resolveComponent("el-form"),g=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(g,{class:"form-card",shadow:"hover",header:"表单配置"},{default:l.withCtx(()=>[l.createVNode(w,{ref_key:"formRef",ref:r,model:l.unref(o),"label-suffix":":","label-width":"110px"},{default:l.withCtx(()=>[l.createVNode(b,null,{default:l.withCtx(()=>[l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"弹窗宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).dialogWidth,"onUpdate:modelValue":c[0]||(c[0]=p=>l.unref(o).dialogWidth=p),min:800},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"排版列数"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formRow,"onUpdate:modelValue":c[1]||(c[1]=p=>l.unref(o).formRow=p),min:1,max:4},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label宽度"},{default:l.withCtx(()=>[l.createVNode(h,{modelValue:l.unref(o).formLabelWidth,"onUpdate:modelValue":c[2]||(c[2]=p=>l.unref(o).formLabelWidth=p),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(u,{label:"label位置",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"formLabelPosition"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(o).formLabelPosition,"onUpdate:modelValue":c[3]||(c[3]=p=>l.unref(o).formLabelPosition=p),placeholder:"请选择"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Qy),(p,O)=>(l.openBlock(),l.createBlock(d,{key:O+"labelPosition",label:p.key,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},CT="",Ey=ct({__name:"configTable",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({dataUrl:void 0,defaultParams:[],isCheckRow:!1,isOperateRow:!0,isPagination:!0,isSerialNumber:!0,isSort:!0,isExpandQuery:!1,isExecuteImmediatelyTableApi:!0,tableOperateCellWidth:160,pageSize:10,tableQueryLabelWidth:100,tableQueryRowWidth:5,tableMoreBtnSplitNumber:0,headerMoreBtnSplitNumber:0}),r=l.inject("conditionList")();let o=l.ref(null),a=l.ref(s());l.watch(()=>n.modelValue,(f,d)=>{if(f){if(!Object.keys(f).length)return;const m={...f,defaultParams:[...f.defaultParams||[]]};Object.keys(a.value).forEach(b=>{["defaultParams"].includes(b)?a.value[b]=[...m[b]||[]]:b==="tableMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"tableMoreBtnSplitNumber")?m[b]:0:b==="headerMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"headerMoreBtnSplitNumber")?m[b]:0:b==="isExecuteImmediatelyTableApi"?a.value[b]=Reflect.has(m,"isExecuteImmediatelyTableApi")?m[b]:!0:a.value[b]=m[b]})}},{deep:!0,immediate:!0});const c=()=>{a.value.defaultParams.push({submitFieldName:"",defaultValue:"",matchValue:"",submitFieldType:""})},h=f=>{a.value.defaultParams.splice(f,1)},u=f=>{f||(a.value.pageSize=10)};return e({formRef:o,form:a}),(f,d)=>{const m=l.resolveComponent("el-input"),b=l.resolveComponent("el-form-item"),w=l.resolveComponent("el-col"),g=l.resolveComponent("el-row"),p=l.resolveComponent("el-button"),O=l.resolveComponent("el-divider"),C=l.resolveComponent("el-option"),y=l.resolveComponent("el-select"),E=l.resolveComponent("el-switch"),x=l.resolveComponent("el-input-number"),k=l.resolveComponent("el-form"),P=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(P,{class:"form-card",shadow:"hover",header:"表格配置"},{default:l.withCtx(()=>[l.createVNode(k,{ref_key:"formRef",ref:o,model:l.unref(a),"label-suffix":":","label-width":"120"},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:24},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格数据url",prop:"dataUrl",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(a).dataUrl,"onUpdate:modelValue":d[0]||(d[0]=N=>l.unref(a).dataUrl=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(O,{"content-position":"left"},{default:l.withCtx(()=>[d[14]||(d[14]=l.createTextVNode(" 表格默认参数配置 ")),l.createVNode(p,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:c})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).defaultParams,(N,_)=>(l.openBlock(),l.createBlock(g,{class:"table-post-params",key:_},{default:l.withCtx(()=>[l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"字段",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.submitFieldName,"onUpdate:modelValue":A=>N.submitFieldName=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".matchValue"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.matchValue,"onUpdate:modelValue":A=>N.matchValue=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(A,S)=>(l.openBlock(),l.createBlock(C,{key:S,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"默认值",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".defaultValue"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:N.defaultValue,"onUpdate:modelValue":A=>N.defaultValue=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:N.submitFieldType,"onUpdate:modelValue":A=>N.submitFieldType=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Xu),(A,S)=>(l.openBlock(),l.createBlock(C,{key:S,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(O,{"content-position":"left"}),l.createVNode(w,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(p,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:A=>h(_)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"多选列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isCheckRow,"onUpdate:modelValue":d[1]||(d[1]=N=>l.unref(a).isCheckRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isOperateRow,"onUpdate:modelValue":d[2]||(d[2]=N=>l.unref(a).isOperateRow=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isPagination,"onUpdate:modelValue":d[3]||(d[3]=N=>l.unref(a).isPagination=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"序号列"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isSerialNumber,"onUpdate:modelValue":d[4]||(d[4]=N=>l.unref(a).isSerialNumber=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"排序"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isSort,"onUpdate:modelValue":d[5]||(d[5]=N=>l.unref(a).isSort=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"展/收查询条件"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isExpandQuery,"onUpdate:modelValue":d[6]||(d[6]=N=>l.unref(a).isExpandQuery=N),onChange:u},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"立即执行接口"},{default:l.withCtx(()=>[l.createVNode(E,{modelValue:l.unref(a).isExecuteImmediatelyTableApi,"onUpdate:modelValue":d[7]||(d[7]=N=>l.unref(a).isExecuteImmediatelyTableApi=N)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(g,null,{default:l.withCtx(()=>[l.unref(a).isOperateRow?(l.openBlock(),l.createBlock(w,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableOperateCellWidth,"onUpdate:modelValue":d[8]||(d[8]=N=>l.unref(a).tableOperateCellWidth=N),min:120},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(a).isPagination?(l.openBlock(),l.createBlock(w,{key:1,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页页数",prop:"pageSize","label-width":"150",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).pageSize,"onUpdate:modelValue":d[9]||(d[9]=N=>l.unref(a).pageSize=N),min:10},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件label宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableQueryLabelWidth,"onUpdate:modelValue":d[10]||(d[10]=N=>l.unref(a).tableQueryLabelWidth=N),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件列数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableQueryRowWidth,"onUpdate:modelValue":d[11]||(d[11]=N=>l.unref(a).tableQueryRowWidth=N),min:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).tableMoreBtnSplitNumber,"onUpdate:modelValue":d[12]||(d[12]=N=>l.unref(a).tableMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"顶部更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(a).headerMoreBtnSplitNumber,"onUpdate:modelValue":d[13]||(d[13]=N=>l.unref(a).headerMoreBtnSplitNumber=N),min:0},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},[["__scopeId","data-v-fa895b16"]]),QT="",$y=ct({__name:"configBtns",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=rn.useRoute(),s=l.inject("apiPrefix"),r=l.inject("request"),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>n1)),a=i,c=()=>({sort:0,permissionCode:null,requestUrl:"",btnName:"",btnAlias:"",btnIcon:"",btnPostion:"",btnType:"",btnColor:"",submitWay:"",importFileName:"",isPromptVerificationSelectTable:"1",isCustomBtn:!1,customType:"",codeStr:"",customComponentName:"",customComponentUrl:"",associationMenuId:"",submitFields:[],matchFields:[]}),h=()=>({tableLoading:!1,showConfigBtnDialog:!1,dialogData:{}});let u=l.reactive(h()),f=l.ref(null),d=0,m=l.ref([]),b=l.ref([]),w=[{prop:"checkbox",width:60},{prop:"serialNumber",width:80},{label:"按钮名称",prop:"btnName",minWidth:200},{label:"权限码",prop:"permissionCode",minWidth:200},{label:"按钮别名",prop:"btnAlias",minWidth:120},{label:"按钮图标",prop:"btnIcon",minWidth:120},{label:"是否自定义",prop:"isCustomBtn",width:120,render:!0},{label:"排序",prop:"sort",width:180,render:!0},{label:"操作",prop:"operate",width:120,render:!0,fixed:"right"}],g=l.ref([]);const p=k=>r({url:`${s}/sysMenus/getAllList`,method:"post",data:k}),O=k=>r({url:`${s}/sysMenus/getMenuOfOperate`,method:"get",params:k}),C=(k,P)=>{b.value.includes(k.permissionCode)||b.value.push(k.permissionCode),Object.assign(g.value[d],k),P(!0)},y=async k=>{try{u.tableLoading=!0;const P=a.id?a.id:n.params.id,{data:N}=await O({id:P});b.value=(N||[]).filter(_=>(k||[]).some(A=>A.permissionCode==_.unique)).map(_=>_.unique),g.value=(N||[]).map((_,A)=>{let S=c(),M=(k||[]).find(T=>T.permissionCode==_.unique)||{};return{...S,btnIcon:_.icon||"",...M,btnName:_.name,permissionCode:_.unique,sort:M.sort?M.sort:(A+1)*10}}).sort((_,A)=>_.sort-A.sort),u.tableLoading=!1}catch(P){u.tableLoading=!1,console.error(P)}},E=()=>f.value.getSelectionRows()||[];l.provide("associationMenuList",m),l.provide("createDefaultButtonItem",c),l.watch(()=>a.modelValue,async(k,P)=>{try{const N=a.id?a.id:n.params.id;m.value=(await p({dynamicFilters:[{field:"parentId",operate:"Equal",value:N}]})).data||[],await y(k)}catch(N){u.tableLoading=!1,console.error(N)}},{deep:!0});const x=k=>{u.dialogData=k.row,d=k.$index,u.showConfigBtnDialog=!0};return e({getTableSelectionRows:E}),(k,P)=>{const N=l.resolveComponent("el-tag"),_=l.resolveComponent("el-input-number"),A=l.resolveComponent("el-button"),S=l.resolveComponent("a-table"),M=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(M,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>P[2]||(P[2]=[l.createElementVNode("div",{class:"card-header"},[l.createElementVNode("div",{class:"card-header-title"},"按钮配置")],-1)])),default:l.withCtx(()=>[l.createVNode(S,{ref_key:"tableRef",ref:f,loading:l.unref(u).tableLoading,rowKey:"permissionCode",selection:l.unref(b),"onUpdate:selection":P[0]||(P[0]=T=>l.isRef(b)?b.value=T:b=T),headers:l.unref(w),data:l.unref(g),showPagination:!1},{isCustomBtn:l.withCtx(({scope:T})=>[l.createVNode(N,{type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(T.row.isCustomBtn?"是":"否"),1)]),_:2},1024)]),sort:l.withCtx(({scope:T})=>[l.createVNode(_,{modelValue:T.row.sort,"onUpdate:modelValue":I=>T.row.sort=I,min:0},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:T})=>[l.createVNode(A,{type:"primary",text:"",size:"small",icon:"Aim",onClick:I=>x(T)},{default:l.withCtx(()=>P[3]||(P[3]=[l.createTextVNode(" 配置 ")])),_:2},1032,["onClick"])]),_:1},8,["loading","selection","headers","data"]),l.createVNode(l.unref(o),{visible:l.unref(u).showConfigBtnDialog,"onUpdate:visible":P[1]||(P[1]=T=>l.unref(u).showConfigBtnDialog=T),title:"配置按钮",data:l.unref(u).dialogData,onRefresh:C},null,8,["visible","data"])]),_:1})}}},[["__scopeId","data-v-8c801481"]]),TT="",Ny={class:"card-header"},Ry=ct({__name:"configFileds",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>o1)),n=e,s=i;l.inject("configData")();const r=()=>({tableLoading:!1,showAddFieldDialog:!1,dialogTitle:"字段配置",dialogData:{}});let o=l.reactive(r()),a=0,c=[{label:"序号",prop:"serialNumber",width:60},{label:"字段",prop:"fieldName",minWidth:160},{label:"字段Key",prop:"fieldKey",minWidth:160},{label:"字段类型",prop:"fieldType",minWidth:160,render:!0},{label:"使用场景",prop:"useScenes",minWidth:340,render:!0},{label:"排序",prop:"sort",width:200,render:!0},{label:"操作",prop:"operate",width:170,render:!0,fixed:"right"}],h=l.ref([]);Wu[0].options.map(C=>({btnName:C.key,permissionCode:C.value}));const u=C=>{if(!Reflect.has(C,"fieldType"))return"";const y=qu.find(E=>E.value==C.fieldType);return(y==null?void 0:y.key)||""},f=C=>Reflect.has(C,"useScenes")?(C.formCustomComponentes??[]).filter(y=>C.useScenes.includes(y.permissionCode)):[],d=C=>(C.formCustomComponentes||[]).filter(y=>y.isFieldCustom).map(y=>`${y.btnName}:是`).join(),m=(C,y)=>{if(a==null){const E=h.value.length;h.value.push({...C,sort:(E+1)*10})}else h.value[a]={...C,postRequestParams:[...C.postRequestParams],useScenes:[...C.useScenes],formCustomComponentes:[...C.formCustomComponentes]};n("update:modelValue",h.value),y(!0)},b=async()=>{try{o.tableLoading=!0,h.value=(s.modelValue||[]).map(C=>({...C,sort:C.sort?C.sort:0})).sort((C,y)=>C.sort-y.sort),o.tableLoading=!1}catch(C){o.tableLoading=!1,console.error(C)}};l.watch(()=>s.modelValue,async(C,y)=>{await b()},{deep:!0,immediate:!0});const w=()=>{a=null,o.dialogData={},o.showAddFieldDialog=!0},g=C=>{a=C.$index,o.dialogData=C.row,o.showAddFieldDialog=!0},p=()=>{n("update:modelValue",h.value)},O=C=>{h.value.splice(C.$index,1),n("update:modelValue",h.value)};return(C,y)=>{const E=l.resolveComponent("el-button"),x=l.resolveComponent("el-tag"),k=l.resolveComponent("el-badge"),P=l.resolveComponent("el-input-number"),N=l.resolveComponent("a-table"),_=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(_,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>[l.createElementVNode("div",Ny,[y[3]||(y[3]=l.createElementVNode("div",{class:"card-header-title"},"字段配置",-1)),l.createVNode(E,{class:"card-header-operate",type:"primary",icon:"Plus",onClick:y[0]||(y[0]=A=>w())},{default:l.withCtx(()=>y[2]||(y[2]=[l.createTextVNode("添加字段")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(N,{loading:l.unref(o).tableLoading,headers:l.unref(c),data:l.unref(h),showPagination:!1},{fieldType:l.withCtx(({scope:A})=>[l.createTextVNode(l.toDisplayString(u(A.row)),1)]),useScenes:l.withCtx(({scope:A})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f(A.row),(S,M)=>(l.openBlock(),l.createBlock(k,{key:M,value:S.isFieldCustom?"C":"",offset:[-5,5]},{default:l.withCtx(()=>[l.createVNode(x,{style:{margin:"0 4px"},type:"success",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S.btnName),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),formCustomComponentes:l.withCtx(({scope:A})=>[d(A.row)?(l.openBlock(),l.createBlock(x,{key:0,type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d(A.row)),1)]),_:2},1024)):l.createCommentVNode("",!0)]),sort:l.withCtx(({scope:A})=>[l.createVNode(P,{modelValue:A.row.sort,"onUpdate:modelValue":S=>A.row.sort=S,min:0,onChange:p},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:A})=>[l.createVNode(E,{type:"primary",text:"",size:"small",icon:"EditPen",onClick:S=>g(A)},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(E,{type:"danger",text:"",size:"small",icon:"Delete",onClick:S=>O(A)},{default:l.withCtx(()=>y[5]||(y[5]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1},8,["loading","headers","data"]),l.createVNode(l.unref(t),{visible:l.unref(o).showAddFieldDialog,"onUpdate:visible":y[1]||(y[1]=A=>l.unref(o).showAddFieldDialog=A),title:l.unref(o).dialogTitle,configData:s.data,data:l.unref(o).dialogData,onRefresh:m},null,8,["visible","title","configData","data"])]),_:1})}}},[["__scopeId","data-v-75e750d2"]]),$T="",Vy={class:"dialog-footer"},Ly=ct({__name:"dialogInitConfig",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=rn.useRoute(),n=l.inject("apiPrefix"),s=l.inject("request"),r=e,o=i;l.computed(()=>t.params.key);const a=()=>({dataBase:"",api:""}),c=()=>({loading:!1,btnLoading:!1});let h=l.reactive(c()),u=l.ref([]),f=l.ref(null),d=l.ref(a());const m=C=>s({url:`${n}/scripts/getAllDatabaseTable`,method:"get",data:C}),b=async()=>{try{h.loading=!0;const{data:C}=await m();u.value=C||[],h.loading=!1}catch(C){console.error(C),h.loading=!1}};l.watch(()=>o.visible,async(C,y)=>{C&&await b()});const w=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),g=C=>{p(),C()},p=()=>{d.value=Object.assign(d.value,a()),f.value.resetFields(),r("update:visible",!1)},O=C=>{C&&C.validate(async y=>{if(y)try{h.btnLoading=!0;const{data:E}=await s({url:`${n}/scripts/getAllColumnsByTableName`,method:"get",params:{tableName:d.value.dataBase}}),x=(E||[]).map(k=>{let P=w();return P.fieldName=k.comment,P.fieldKey=k.name,P.fieldType="string",P});r("refresh",{formList:x},()=>{p()}),h.btnLoading=!1}catch(E){console.error(E),h.btnLoading=!1}})};return(C,y)=>{const E=l.resolveComponent("el-option"),x=l.resolveComponent("el-select"),k=l.resolveComponent("el-form-item"),P=l.resolveComponent("el-input"),N=l.resolveComponent("el-form"),_=l.resolveComponent("el-button"),A=l.resolveComponent("el-dialog"),S=l.resolveDirective("loading"),M=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(A,{"model-value":o.visible,title:o.title,top:"10vh",width:"600",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":g},{footer:l.withCtx(()=>[l.createElementVNode("span",Vy,[l.createVNode(_,{loading:l.unref(h).btnLoading,onClick:p},{default:l.withCtx(()=>y[3]||(y[3]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(_,{type:"primary",loading:l.unref(h).btnLoading,onClick:y[2]||(y[2]=T=>O(l.unref(f)))},{default:l.withCtx(()=>y[4]||(y[4]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[M]])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(N,{ref_key:"formRef",ref:f,model:l.unref(d),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(k,{label:"数据库","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"dataBase"},{default:l.withCtx(()=>[l.createVNode(x,{modelValue:l.unref(d).dataBase,"onUpdate:modelValue":y[0]||(y[0]=T=>l.unref(d).dataBase=T),placeholder:"请选择数据库",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u),(T,I)=>(l.openBlock(),l.createBlock(E,{key:T,label:`${T.tableComment}【${T.tableName}】`,value:T.tableName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.createVNode(k,{label:"接口地址(关键字)","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"api"},{default:l.withCtx(()=>[l.createVNode(P,{modelValue:l.unref(d).api,"onUpdate:modelValue":y[1]||(y[1]=T=>l.unref(d).api=T),placeholder:"请输入接口地址(关键字)",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[S,l.unref(h).loading]])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-8fa48448"]]),RT="",My={class:"page-container"},By={class:"submit-box"},Dy={class:"submit-box-r"},Yu=ct({__name:"index",props:{pageKey:{type:String,default:""},id:{type:String,default:void 0}},setup(i){const e=rn.useRoute(),t=rn.useRouter(),n=l.inject("apiPrefix"),s=l.inject("request"),r=i;let o=r.id??void 0,a=r.pageKey?r.pageKey:e.params.key,c=l.ref([]),h=l.ref(),u=l.ref([]),f=l.ref({}),d=l.ref(null),m=l.ref(null),b=l.ref(null),w=l.ref({}),g=l.ref({}),p=l.ref([]),O=l.ref([]),C=l.reactive({pageLoading:!1,saveBtnLoading:!1,showDialogInitConfig:!1});const y=B=>s({url:`${n}/pages/getPageDetail?key=${B}`,method:"get"}),E=B=>s({url:`${n}/pageConfigs/createOrEdit`,method:"post",data:B}),x=B=>s({url:`${n}/sysMenus/getAllList`,method:"post",data:B}),k=B=>s({url:`${n}/sysDataDictionaries/getDictionaryByGroup?groupName=${B}`,method:"get"}),P=async()=>{const{data:B}=await x({dynamicFilters:[{field:"url",operate:"Equal",value:"/pages"}]});c.value=B||[]},N=async()=>{try{const{data:{pageConfigs:B}}=await y(a),U=JSON.parse(B.pageConfig)||{};o=B.pageId,console.log("pageConfigData",U),f.value=U,w.value={...U.tableConfig??{}},g.value={...U.formConfig??{}},p.value=[...U.buttons??[]],O.value=[...U.fields??[]]}catch(B){console.error(B)}},_=()=>{w.value={},g.value={},p.value=[],O.value=[],N()};l.provide("conditionList",()=>u),l.provide("pageKey",()=>l.ref(a)),l.provide("configData",()=>f),l.onMounted(async()=>{try{C.pageLoading=!0,await P(),h.value=e.params.id,u.value=(await k("Condition")).data||[],await N(),C.pageLoading=!1}catch(B){C.pageLoading=!1,console.error(B)}});const A=B=>{const U=c.value.find(Z=>Z.id==B);t.replace({path:`/actConfig/${U.key}/${U.id}`}),h.value=U.id,a=U.key,N()},S=()=>{C.showDialogInitConfig=!0},M=({formList:B},U)=>{O.value=[...B],U(!0)},T=()=>{let B={id:o,key:a,pageConfig:{tableConfig:d.value.form,formConfig:m.value.form,buttons:b.value.getTableSelectionRows(),fields:O.value}};B.pageConfig=JSON.stringify(B.pageConfig),C.saveBtnLoading=!0,E(B).then(U=>{Ne.ElNotification({title:"提示",message:"保存成功",type:"success",duration:2500}),_(),C.saveBtnLoading=!1}).catch(U=>{C.saveBtnLoading=!1})},I=async()=>{Promise.all([d.value.formRef.validate(),m.value.formRef.validate()]).then(B=>{B.every(U=>U)&&T()}).catch(B=>B)};return(B,U)=>{const Z=l.resolveComponent("el-button"),K=l.resolveComponent("el-option"),X=l.resolveComponent("el-select"),J=l.resolveComponent("el-card"),fe=l.resolveComponent("el-col"),he=l.resolveComponent("el-row"),ye=l.resolveDirective("debounce"),z=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",My,[l.createVNode(he,{style:{margin:"0"},gutter:12},{default:l.withCtx(()=>[l.createVNode(fe,{class:"header-operate",span:24},{default:l.withCtx(()=>[l.createVNode(J,{class:"form-card",shadow:"hover"},{default:l.withCtx(()=>[l.createElementVNode("div",By,[U[10]||(U[10]=l.createElementVNode("div",{class:"submit-box-l"},null,-1)),l.createElementVNode("div",Dy,[l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"primary",loading:l.unref(C).initBtnLoading,onClick:U[0]||(U[0]=D=>S())},{default:l.withCtx(()=>U[8]||(U[8]=[l.createTextVNode("一键初始化配置")])),_:1},8,["loading"])),[[ye]]),l.createVNode(X,{class:"menu-select",modelValue:l.unref(h),"onUpdate:modelValue":U[1]||(U[1]=D=>l.isRef(h)?h.value=D:h=D),placeholder:"菜单切换",clearable:"",filterable:"",onChange:A},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),D=>(l.openBlock(),l.createBlock(K,{key:D.id,label:D.name,value:D.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.withDirectives((l.openBlock(),l.createBlock(Z,{style:{width:"120px"},type:"success",loading:l.unref(C).saveBtnLoading,onClick:U[2]||(U[2]=D=>I(B.formRef))},{default:l.withCtx(()=>U[9]||(U[9]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[ye]])])])]),_:1})]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Ey,{ref_key:"configTableRef",ref:d,modelValue:l.unref(w),"onUpdate:modelValue":U[3]||(U[3]=D=>l.isRef(w)?w.value=D:w=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(Ty,{ref_key:"configFormRef",ref:m,modelValue:l.unref(g),"onUpdate:modelValue":U[4]||(U[4]=D=>l.isRef(g)?g.value=D:g=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode($y,{ref_key:"configBtnsRef",ref:b,modelValue:l.unref(p),"onUpdate:modelValue":U[5]||(U[5]=D=>l.isRef(p)?p.value=D:p=D)},null,8,["modelValue"])]),_:1}),l.createVNode(fe,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Ry,{modelValue:l.unref(O),"onUpdate:modelValue":U[6]||(U[6]=D=>l.isRef(O)?O.value=D:O=D)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(Ly,{visible:l.unref(C).showDialogInitConfig,"onUpdate:visible":U[7]||(U[7]=D=>l.unref(C).showDialogInitConfig=D),title:"一键初始化配置",onRefresh:M},null,8,["visible"])])),[[z,l.unref(C).pageLoading]])}}},[["__scopeId","data-v-8dfa8a8a"]]),vy=(i,e)=>{let t=e.value||1e3,n,s=!1;i.addEventListener("click",r=>{n&&clearTimeout(n),s?r&&r.stopImmediatePropagation():s=!0,n=setTimeout(()=>{n=null,s=!1},t)},!0)},Cr={en:{act:{sort:"Serial Number",noData:"No Data",operate:"Operation",inputPlaceholder:"Please Input ",selectPlaceholder:"Please Select ",tip:"Tip",time:"Time",startTime:"Start Time",endTime:"End Time",loading:"ing",reset:"Reset",requiredMessage:"Required",customTableHeader:"Custom",developing:"In the process of feature development Coming soon",fieldCustom:"Custom",cancel:"Cancel",save:"Save",saveSuccessfully:"Save Successfully",configTableRow:"Please configure the table to select multiple columns",pleaseSelcet:"Please Selcet Need",data:"Data",success:"Success",buttonBindField:"The current button is not bound to a field",enter:"Enter",isExecuteOperate:"Are you sure to perform this operation",noConfigPage:"No Config Page",noImage:"No image",preview:"Preview",uploadText:"Drag the file here, or",clickUpload:"Click to upload",uploadLoading:"Upload loading...",uploadErrorTip:"The file type is incorrect. Please upload the file in the correct format again",uploadLimitTip:"Exceeding the file limit, please confirm and upload again.",expand:"Expand",retract:"Retract",formatCode:"FormatCode"}},zhCn:{act:{sort:"序号",noData:"暂无数据",operate:"操作",inputPlaceholder:"请输入",selectPlaceholder:"请选择",tip:"提示",time:"时间",startTime:"开始时间",endTime:"结束时间",loading:"中",reset:"重置",requiredMessage:"必填项",customTableHeader:"自定义表头(暂未创建文件)",developing:"功能开发中...敬请期待",fieldCustom:"当前字段为自定义,请在项目中创建对应组件",cancel:"取消",save:"保存",saveSuccessfully:"保存成功",configTableRow:"请配置表格多选列",pleaseSelcet:"请选择需要",data:"的数据",success:"成功",buttonBindField:"当前按钮未绑定字段",enter:"确定",isExecuteOperate:"是否确认执行此操作",noConfigPage:"暂无页面信息",noImage:"暂无",preview:"预览",uploadText:"将文件拖到此处,或",clickUpload:"点击上传",uploadLoading:"上传中...",uploadErrorTip:"文件类型不正确,请重新上传正确格式的文件。",uploadLimitTip:"超出文件数量限制,请确认后重新上传。",expand:"展开",retract:"收起",formatCode:"一键格式化代码"}}},zu={ActPage:ju,ActConfig:Yu},Zy={install(i,e){var d;const{modules:t,apiPrefix:n,request:s,themeColor:r,cacheTokenType:o="sessionStorage",cookieStorage:a,language:{messages:c={},en:h="zhCn"}}=e,u={act:Object.assign(Cr[h].act,((d=c[h])==null?void 0:d.act)??{})},f=wu({locale:h,fallbackLocale:h,messages:{...Cr,[h]:u}});i.use(f),i.provide("actModules",t),i.provide("themeColor",r),i.provide("apiPrefix",n||"/api/v1"),i.provide("request",s),i.provide("cacheTokenType",o),i.provide("cookieStorage",a),i.directive("debounce",vy),Object.keys(zu).forEach(m=>{i.component(m,zu[m])})}},Iy={ActPage:ju,ActConfig:Yu};function Uy(i){var o;const{modules:e,language:{messages:t={},en:n="zhCn"}}=i,s={act:Object.assign(Cr[n].act,((o=t[n])==null?void 0:o.act)??{})};return wu({locale:n,fallbackLocale:n,messages:{...Cr,[n]:s}})}const LT="",Fy={key:0,class:"search-module-container"},jy={class:"no-config-field"},qy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["reset","search"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),{t:n}=Gt(),s=l.inject("request"),r=l.inject("globalProps"),o=l.inject("loadComponents"),a=l.inject("getFieldUiProps"),c=l.inject("formatDataType"),h=l.inject("disposeDate"),u=l.inject("getDefaultQueryValues"),f=e,d=i,m=l.ref({});let b=l.ref([]),w=l.ref([]),g=l.ref(!0);const p=l.ref(0),O=l.ref(0),C=A=>d.data.tableConfig.isExpandQuery&&g.value?d.data.tableConfig.tableQueryRowWidth>A+1:!0,y=async A=>{b.value=await Promise.all(A.filter(S=>S.useScenes.includes("tableSearch")).map(async S=>{S.tableQueryDefaultValue&&(["date","dateRange"].includes(S.fieldType)?S.queryValue=h(S):S.queryValue=S.tableQueryDefaultValue?S.tableQueryDefaultValue:void 0),r.defaultParams.some(T=>{T.field==S.fieldKey&&T.operate===S.tableQueryCondition&&(S.queryValue=T.value)});const M=(S.formCustomComponentes??[]).find(T=>T.permissionCode==="tableSearch");if(S.isQueryFieldCustom=!1,M&&M.isFieldCustom){const{isFieldCustom:T,customComponentName:I,customComponentUrl:B}=M;if(S.isQueryFieldCustom=!0,O.value++,T&&!S.customQueryComponent){const U=await o(B,I);S.customQueryComponent=U}}return S}))},E=A=>{const S=(A||[]).filter(M=>M.permissionCode===1001).map(M=>({...M,loading:!1}));w.value=[...S,{btnName:n("act.reset"),permissionCode:"9999",btnColor:"info",btnIcon:"btn-reset",loading:!1}]},x=async({node:A,resolve:S},M)=>{const T=a(M),{label:I,value:B,children:U,isLeaf:Z}={...xr,...T.treeProps||{}};if(A[Z])return S([]);const K=M.postRequestParams.filter(z=>z.submitType==="default").reduce((z,D)=>(z[D.submitName]=c(D.paramsType,D.submitValue),z),{}),X=M.postRequestParams.filter(z=>z.submitType==="match").reduce((z,D)=>(z[D.submitName]=c(D.paramsType,r.matchData[D.submitValue][D.submitName]),z),{}),J=M.postRequestParams.filter(z=>z.submitType==="dynamic").map(z=>({field:z.submitName,operate:z.submitMatchType,value:T.loadCode?A==null?void 0:A.data.value:c(z.paramsType,z.submitValue)}));let fe={};Object.keys(K).length&&(fe={...fe,...K}),Object.keys(X).length&&(fe={...fe,...X}),J.length&&(fe.dynamicFilters=J),T.loadCode&&Reflect.has(fe,T.loadCode)&&(fe[T.loadCode]=A==null?void 0:A.data.value);const{data:he}=await s({url:M.fieldRequestUrl,method:M.fieldRequestType||"GET",data:fe}),ye=(he||[]).map(z=>({label:z[I],value:z[B],children:[],isLeaf:z[Z]}));S(ye)};l.watch(()=>d.data,(A,S)=>{y(A.fields),E(A.buttons)},{immediate:!0,deep:!0});const k=()=>{p.value++,p.value===O.value&&P({permissionCode:1001})},P=A=>{switch(A.loading=!0,A.permissionCode){case"9999":b.value.forEach(T=>{T.tableQueryDefaultValue?T.queryValue=["date","dateRange"].includes(T.fieldType)?h(T):(T==null?void 0:T.tableQueryDefaultValue)||void 0:T.queryValue=T.fieldType.includes("&")?[]:void 0});const S=u();f("reset",S,()=>{A.loading=!1});break;default:const M=b.value.filter(T=>Array.isArray(T.queryValue)?T.queryValue.length:!!T.queryValue);f("search",M,()=>{A.loading=!1});break}},N=()=>{g.value=!g.value},_=()=>{P({permissionCode:1001})};return(A,S)=>{var z;const M=l.resolveComponent("el-input"),T=l.resolveComponent("el-option"),I=l.resolveComponent("el-select"),B=l.resolveComponent("el-select-v2"),U=l.resolveComponent("el-cascader"),Z=l.resolveComponent("el-tree-select"),K=l.resolveComponent("el-date-picker"),X=l.resolveComponent("el-form-item"),J=l.resolveComponent("a-svg-icon"),fe=l.resolveComponent("el-button"),he=l.resolveComponent("el-form"),ye=l.resolveDirective("debounce");return l.unref(b)&&l.unref(b).length?(l.openBlock(),l.createElementBlock("div",Fy,[l.createVNode(he,{style:l.normalizeStyle({"--table-query-row":d.data.tableConfig.tableQueryRowWidth}),class:"form-content",ref:"elForm","label-suffix":":","label-position":"right"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(D,V)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:V},[C(V)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[D.isQueryFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[D.customQueryComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(D.customQueryComponent),{key:0,class:"custom-btn",ref_for:!0,ref:q=>m.value[`customQueryComponent_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,queryItem:D,data:d.data,onRefresh:S[9]||(S[9]=q=>P({permissionCode:1001})),onLoaded:k},null,40,["modelValue","onUpdate:modelValue","queryItem","data"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:V},[l.createElementVNode("span",jy,"【"+l.toDisplayString(D.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(n)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(X,{key:0,class:"search-form-item","label-width":d.data.tableConfig.tableQueryLabelWidth,label:D.fieldName},{default:l.withCtx(()=>[D.fieldType==="input"||D.fieldType==="editor"?(l.openBlock(),l.createBlock(M,l.mergeProps({key:0,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",ref_for:!0},l.unref(a)(D),{onKeyup:S[0]||(S[0]=l.withKeys(l.withModifiers(q=>P({permissionCode:1001}),["prevent"]),["enter","native"])),onClear:_}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):l.createCommentVNode("",!0),D.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${D.fieldName}`,clearable:"",onKeyup:S[1]||(S[1]=l.withKeys(l.withModifiers(q=>P({permissionCode:1001}),["prevent"]),["enter","native"])),ref_for:!0},l.unref(a)(D)),null,16,["modelValue","onUpdate:modelValue","placeholder"])):["select","switch","multipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(I,l.mergeProps({key:2,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{multiple:D.fieldType==="multipleSelect","collapse-tags":D.fieldType==="multipleSelect","collapse-tags-tooltip":D.fieldType==="multipleSelect",onChange:S[2]||(S[2]=q=>P({permissionCode:1001}))}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(D.dataList,(q,H)=>(l.openBlock(),l.createBlock(T,{key:H,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","collapse-tags","collapse-tags-tooltip"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(D.fieldType)?(l.openBlock(),l.createBlock(B,l.mergeProps({key:3,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Fu)},placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(a)(D),{"collapse-tags":D.fieldType==="virtualizedMultipleSelect","collapse-tags-tooltip":D.fieldType==="virtualizedMultipleSelect",multiple:D.fieldType==="virtualizedMultipleSelect",onChange:S[3]||(S[3]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","collapse-tags","collapse-tags-tooltip","multiple"])):D.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(U,l.mergeProps({key:4,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,options:D.dataList,props:{...l.unref(Uu)},clearable:"",filterable:"",placeholder:`${l.unref(n)("act.selectPlaceholder")}${D.fieldName}`,ref_for:!0},l.unref(a)(D),{onChange:S[4]||(S[4]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder"])):D.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:5,ref_for:!0,ref:q=>m.value[`elTreeSelect_fullLoad_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,data:D.dataList,placeholder:`请选择${D.fieldName}`,props:{...l.unref(xr),...l.unref(a)(D).treeProps||{}},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:""},l.unref(a)(D),{onChange:S[5]||(S[5]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","data","placeholder","props"])):D.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:6,ref_for:!0,ref:q=>m.value[`elTreeSelect_${V}`]=q,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,placeholder:`请选择${D.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(q,H)=>x({node:q,resolve:H},D)},l.unref(a)(D),{onChange:S[6]||(S[6]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):D.fieldType==="date"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:7,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"date",placeholder:`${l.unref(n)("act.selectPlaceholder")}${l.unref(n)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:S[7]||(S[7]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):D.fieldType==="dateRange"?(l.openBlock(),l.createBlock(K,l.mergeProps({key:8,modelValue:D.queryValue,"onUpdate:modelValue":q=>D.queryValue=q,type:"daterange","start-placeholder":l.unref(n)("act.startTime"),"end-placeholder":l.unref(n)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",clearable:"",ref_for:!0},l.unref(a)(D),{onChange:S[8]||(S[8]=q=>P({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label-width","label"]))],64)):l.createCommentVNode("",!0)],64))),128)),l.unref(b).length?(l.openBlock(),l.createBlock(X,{key:0,class:"search-form-btn","label-width":"0"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(D,V)=>l.withDirectives((l.openBlock(),l.createBlock(fe,{key:V,type:D.btnColor,loading:D.loading,onClick:q=>P(D)},{default:l.withCtx(()=>[D.btnIcon?(l.openBlock(),l.createBlock(J,{key:0,class:"mr6",name:D.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(D.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[ye]])),128))]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["style"]),d.data.tableConfig.isExpandQuery&&((z=l.unref(b))==null?void 0:z.length)>d.data.tableConfig.tableQueryRowWidth?(l.openBlock(),l.createBlock(fe,{key:0,class:"expand",text:"",size:"small",icon:l.unref(g)?"ArrowDown":"ArrowUp",onClick:N},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(g)?l.unref(n)("act.expand"):l.unref(n)("act.retract")),1)]),_:1},8,["icon"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}},[["__scopeId","data-v-92d7682c"]])},Symbol.toStringTag,{value:"Module"})),DT="",Xy={class:"header-operate-container"},Wy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["onOperate"],setup(i,{emit:e}){const t=e,n=i,{t:s}=Gt();let r=l.ref([]);const o=l.inject("globalProps"),a=l.inject("menuPermissionBtns"),c=l.inject("stringToBoolean"),h=l.inject("matchCondition"),u=l.inject("getTableData"),f=l.inject("tableBtnRefs"),d=l.computed(()=>{const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return!C||C>=r.value.length}),m=()=>{const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return d.value?r.value:r.value.slice(0,C)},b=()=>{var y;const{tableConfig:{headerMoreBtnSplitNumber:C}}=n.data;return d.value?[]:r.value.slice(C,(y=r.value)==null?void 0:y.length)},w=C=>{if(!C.matchFields.length)return!0;const y=C.matchFields.filter(N=>N.matchType!="default"),E=N=>o.matchData[N.matchType][N.matchFieldName];let k=y.reduce((N,_,A)=>{const S=E(_);return N+=h(_.matchCondition,S,_.fieldValue==""?null:_.fieldValue=="true"||_.fieldValue=="false"?c(_.fieldValue):_.fieldValue),A!==y.length-1&&(N+=_.spliceCondition||"&&"),N},"").split("||"),P=k.reduce((N,_,A)=>(N+=`(${_})`,A<k.length-1&&(N+="||"),N),"");return new Function(`return ${P}`)()},g=C=>a.value.some(y=>y.unique==C.permissionCode)&&w(C),p=C=>{r.value=(C||[]).filter(y=>y.permissionCode!==1001&&y.btnPostion.includes("header")).sort((y,E)=>y.sort-E.sort).map(y=>(y.btnAlias&&(y.btnName=y.btnAlias),Reflect.has(y,"isPromptVerificationSelectTable")||(y.isPromptVerificationSelectTable="1"),y))};l.watch(()=>n.data,(C,y)=>{p(C.buttons)},{immediate:!0});const O=C=>{t("onOperate",C,{})};return(C,y)=>{const E=l.resolveComponent("a-svg-icon"),x=l.resolveComponent("el-button"),k=l.resolveComponent("el-icon"),P=l.resolveComponent("el-dropdown-item"),N=l.resolveComponent("el-dropdown-menu"),_=l.resolveComponent("el-dropdown"),A=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",Xy,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(),(S,M)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:S.permissionCode},[g(S)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[S.isCustomBtn&&S.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(S[S.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:T=>l.unref(f)[`${S.customComponentName}-${S.permissionCode}`]=T,buttonData:S,onRefresh:y[0]||(y[0]=T=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(x,{class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`],onClick:T=>O(S)},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(x,{key:1,class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`],onClick:T=>O(S)},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])],64)):l.createCommentVNode("",!0)],64))),128)),d.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_,{key:0,class:"header-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(N,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b(),(S,M)=>(l.openBlock(),l.createBlock(P,{key:S.permissionCode,onClick:T=>O(S)},{default:l.withCtx(()=>[g(S)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[S.isCustomBtn&&S.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(S[S.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:T=>l.unref(f)[`${S.customComponentName}-${S.permissionCode}`]=T,buttonData:S,onRefresh:y[1]||(y[1]=T=>l.unref(u)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(x,{class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`]},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(x,{key:1,class:"el-btn",type:S.btnColor,loading:S[`loading${S.permissionCode}`]},{default:l.withCtx(()=>[S.btnIcon&&!S[`loading${S.permissionCode}`]?(l.openBlock(),l.createBlock(E,{key:0,class:"mr4",name:S.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(S[`loading${S.permissionCode}`]?S.btnName+l.unref(s)("act.loading")+"...":S.btnName),1)]),_:2},1032,["type","loading"])),[[A]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:l.withCtx(()=>[l.createVNode(x,{type:"primary"},{default:l.withCtx(()=>[y[2]||(y[2]=l.createTextVNode(" 更多按钮")),l.createVNode(k,{class:"el-icon--right"},{default:l.withCtx(()=>[l.createVNode(l.unref(Kb))]),_:1})]),_:1})]),_:1}))])}}},[["__scopeId","data-v-f0dda1b5"]])},Symbol.toStringTag,{value:"Module"})),IT="",Yy={class:"act-table"},zy=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{loading:{type:Boolean,default:!1},maxHeight:{type:Number,default:600},total:{type:Number,default:0},tableQuery:{type:Object,default:()=>({pageIndex:1,pageSize:10})},selection:{type:Array,default:()=>[]},headers:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},showSerialNumber:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},rowKey:{type:String,default:"id"},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},tableConfig:{type:Object,default:()=>({})}},emits:["update:tableQuery","update:selection","refresh","onRowClick","changeExpand"],setup(i,{expose:e,emit:t}){const{t:n}=Gt(),s=t,r=i;let o=l.ref(null);const a=g=>r.showPagination?g+1+(r.tableQuery.pageIndex-1)*r.tableQuery.pageSize:g+1,c=g=>{l.nextTick(()=>{r.data.forEach(p=>{g.includes(p[r.rowKey])&&o.value.toggleRowSelection(p,!0)})})},h=g=>o.value.getSelectionRows();l.watch(()=>r.selection,(g,p)=>{g&&g.length&&c(g)},{deep:!0,immediate:!0});const u=g=>{s("update:selection",g)},f=(g,p)=>{g&&l.nextTick(()=>{r.data.forEach(O=>{g.includes(O[p||r.rowKey])&&o.value.toggleRowSelection(O,!0)})})},d=g=>{s("update:tableQuery",{...r.tableQuery,pageSize:g}),s("refresh",[])},m=g=>{s("update:tableQuery",{...r.tableQuery,pageIndex:g}),s("refresh",[])},b=(g,p,O)=>{s("onRowClick",g,p,O)},w=(g,p)=>{s("changeExpand",g,p)};return e({getSelectionRows:h,updateSelection:f}),(g,p)=>{const O=l.resolveComponent("el-table-column"),C=l.resolveComponent("el-table"),y=l.resolveComponent("el-pagination"),E=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Yy,[l.withDirectives((l.openBlock(),l.createBlock(C,l.mergeProps({style:{width:"100%"},ref_key:"tableRef",ref:o,data:r.data,stripe:"",border:"","highlight-current-row":"","max-height":r.maxHeight,"row-key":r.rowKey,"default-expand-all":"","tree-props":i.treeProps},r.tableConfig,{onSelectionChange:u,onRowClick:b,onExpandChange:w}),{empty:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.data.length||r.data.length==0?l.unref(n)("act.noData"):""),1)]),default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.headers,x=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:x.prop},[x.isCustomTableHeader?l.renderSlot(g.$slots,x.prop,{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[x.render?(l.openBlock(),l.createBlock(O,{key:0,label:x.label,align:x.align,width:x.width,minWidth:x.minWidth,sortable:x.sort,"show-overflow-tooltip":x.prop=="operate"?!1:x.showOverflowTooltip,fixed:x.fixed},{default:l.withCtx(k=>[l.renderSlot(g.$slots,x.prop,{scope:k},void 0,!0)]),_:2},1032,["label","align","width","minWidth","sortable","show-overflow-tooltip","fixed"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[x.prop=="checkbox"?(l.openBlock(),l.createBlock(O,{key:0,type:"selection",align:"center",width:x.width,fixed:""},null,8,["width"])):x.prop=="serialNumber"?(l.openBlock(),l.createBlock(O,{key:1,index:a,type:"index",align:"center",width:x.width,label:l.unref(n)("act.sort"),fixed:""},null,8,["width","label"])):(l.openBlock(),l.createBlock(O,{key:2,prop:x.prop,label:x.label,align:x.align,sortable:x.sort,"show-overflow-tooltip":x.showOverflowTooltip,width:x.width,"min-width":x.minWidth,fixed:x.fixed},null,8,["prop","label","align","sortable","show-overflow-tooltip","width","min-width","fixed"]))],64))],64))],64))),128))]),_:3},16,["data","max-height","row-key","tree-props"])),[[E,r.loading]]),r.showPagination?(l.openBlock(),l.createBlock(y,{key:0,class:"table-pagination","current-page":r.tableQuery.pageIndex,"onUpdate:currentPage":p[0]||(p[0]=x=>r.tableQuery.pageIndex=x),"page-size":r.tableQuery.pageSize,"onUpdate:pageSize":p[1]||(p[1]=x=>r.tableQuery.pageSize=x),"page-sizes":[10,20,50,75,100,200,500],background:"",layout:"total, sizes, prev, pager, next, jumper",total:r.total,onSizeChange:d,onCurrentChange:m},null,8,["current-page","page-size","total"])):l.createCommentVNode("",!0)])}}},[["__scopeId","data-v-d2da0301"]])},Symbol.toStringTag,{value:"Module"})),jT="",Gy={class:"no-config-field"},Hy={class:"dialog-footer"},Ky=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Gu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Hu)),s=l.defineAsyncComponent(()=>Promise.resolve().then(()=>w1)),r=l.defineAsyncComponent(()=>Promise.resolve().then(()=>D1)),{t:o}=Gt(),a=l.inject("request"),c=l.inject("loadComponents"),h=l.inject("formatDataType"),u=l.inject("globalProps"),f=l.inject("stringToBoolean"),d=l.inject("getFieldUiProps"),m=l.inject("disposeRequestData"),b=e,w=i,g=l.ref(!1),p=l.ref(!1),O=l.ref(null),C=l.ref([]),y=l.ref({}),E=l.ref({}),x=Z=>Z.formColumnCol==null?24:Z.formColumnCol?Z.formColumnCol:24/Z.formRow,k=Z=>["input","textarea"].includes(Z.fieldType)?"blur":(["select","multipleSelect","datetimerange","treeSelect","provinceCascade"].includes(Z.fieldType),"change"),P=async({node:Z,resolve:K},X)=>{const J=d(X),{label:fe,value:he,children:ye,isLeaf:z}={...xr,...J.treeProps||{}};if(Z[z])return K([]);const D=X.postRequestParams.filter(Re=>Re.submitType==="default").reduce((Re,qe)=>(Re[qe.submitName]=h(qe.paramsType,qe.submitValue),Re),{}),V=X.postRequestParams.filter(Re=>Re.submitType==="match").reduce((Re,qe)=>(Re[qe.submitName]=h(qe.paramsType,u.matchData[qe.submitValue][qe.submitName]),Re),{}),q=X.postRequestParams.filter(Re=>Re.submitType==="dynamic").map(Re=>{let qe={field:Re.submitName,operate:Re.submitMatchType,value:h(Re.paramsType,Re.submitValue)};return J.loadCode===Re.submitName&&(Z!=null&&Z.data.value)&&(qe.value=Z==null?void 0:Z.data.value),qe});let H={};Object.keys(D).length&&(H={...H,...D}),Object.keys(V).length&&(H={...H,...V}),q.length&&(H.dynamicFilters=q),J.loadCode&&Reflect.has(H,J.loadCode)&&(H[J.loadCode]=Z==null?void 0:Z.data.value);const{data:Ue}=await a({url:X.fieldRequestUrl,method:X.fieldRequestType||"GET",data:H}),Ri=(Ue||[]).map(Re=>({label:Re[fe],value:Re[he],children:[],isLeaf:Re[z]}));K(Ri)},N=Z=>{if(!["input","textarea"].includes(Z)){if(["multipleSelect","dateRange"].includes(Z))return[];if(["switch"].includes(Z))return!1}},_=(Z,K)=>{if(typeof Z=="string"&&["string"].includes(K))return Z.toString();if(["string"].includes(K))return Z.sort((X,J)=>X.sort-J.sort).join(";");if(["number"].includes(K))return Number(Z);if(["array"].includes(K))return Z.sort((X,J)=>X.sort-J.sort)},A=(Z,K=!1)=>{if(["multipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";").map(J=>K?{value:J}:J):[];if(["virtualizedMultipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";"):[];if(["dateRange","provinceCascade"].includes(Z.fieldType)){const J=Z.fieldKey.split("&");return w.data.rowData[Z.fieldKey]=J.map(fe=>w.data.rowData[fe]),w.data.rowData[Z.fieldKey]}let X=w.data.rowData[Z.fieldKey];if(["select"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&X!==null&&(X=K?{value:X.toString()}:X.toString())}if(["virtualizedSelect"].includes(Z.fieldType)){const J=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][J["value-key"]?J["value-key"]:"value"]=="string"&&X!==null&&(X=X.toString())}return(X==="true"||X==="false")&&(X=f(X)),X},S=Z=>a({url:w.data.dataItem.requestUrl,method:"post",data:Z});l.watch(()=>w.visible,async(Z,K)=>{var X,J;if(Z)try{g.value=!0;const fe=await m(w.data.formList,w.data.rowData,!1,!0);console.log("formList",(X=w.data)==null?void 0:X.formList),C.value=await Promise.all((((J=w.data)==null?void 0:J.formList)??[]).sort((he,ye)=>he.sort-ye.sort).map(async he=>{const ye=fe.find(q=>he.fieldName==q.fieldName&&he.fieldKey==q.fieldKey);ye&&(he.dataList=(ye==null?void 0:ye.dataList)??[]),["select","multipleSelect"].includes(he.fieldType)&&(y.value[`${he.fieldKey}ActImplicit`]=Object.keys(w.data.rowData).length&&he.isFormSetValue?A(he,!0):N(he.fieldType)),y.value[he.fieldKey]=Object.keys(w.data.rowData).length&&he.isFormSetValue?A(he):N(he.fieldType);const{isFieldCustom:z,customComponentName:D,customComponentUrl:V}=he.customFiledsComponentes;if(z&&!he.customFiledsComponentes[D]){const q=await c(V,D);he.customFiledsComponentes[D]=q}return he})),g.value=!1}catch(fe){console.error(fe),g.value=!1}});const M=Z=>{T(),Z()},T=()=>{C.value=[],O.value.resetFields(),b("update:visible",!1)},I=(Z,K)=>{const X=d(K),{fieldKey:J,fieldType:fe}=K;if(fe==="multipleSelect"){const he=Z.filter(z=>typeof z=="string"),ye=Z.filter(z=>typeof z!="string").map(z=>z.value);y.value[X.createFieldKey]=he.length?_(he,"string"):void 0,y.value[J]=ye.length?_(ye,"string"):void 0}else typeof Z=="string"?(y.value[X.createFieldKey]=Z,y.value[J]=void 0):(y.value[J]=Z.value,delete y.value[X.createFieldKey])},B=Z=>{Z&&Z.validate(K=>{if(K){const{dataItem:X,rowData:J}=w.data;let fe={...l.toRaw(y.value)};Object.keys(fe).forEach(z=>{if(z.includes("ActImplicit")){delete fe[z];return}const D=C.value.find(V=>V.fieldKey===z);z.includes("&")?z.split("&").forEach((q,H)=>{fe[q]=fe[z]?_(fe[z][H],D.fieldSubmitType):fe[z]}):Array.isArray(fe[z])&&D.fieldSubmitType=="string"&&(fe[z]=_(fe[z],"string"))});const he=X.submitFields.filter(z=>z.matchType=="default").reduce((z,D)=>(D.submitFieldType==="string"&&(z[D.submitFieldName]=D.matchFieldName.toString()),z),{}),ye=X.submitFields.filter(z=>z.matchType=="match").reduce((z,D)=>(Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin==="selections"?z[D.submitFieldName]=w.data.selections.map(V=>h(D.submitFieldType,V[D.matchFieldName])):Reflect.has(D,"submitFieldMatchOrigin")&&D.submitFieldMatchOrigin!="rowData"?Reflect.has(u.matchData,D.submitFieldMatchOrigin)&&(z[D.submitFieldName]=h(D.submitFieldType,u.matchData[D.submitFieldMatchOrigin][D.matchFieldName])):z[D.submitFieldName]=h(D.submitFieldType,J[D.matchFieldName]),z),{});S({...fe,...he,...ye}).then(z=>{try{Ne.ElNotification({title:o("act.tip"),message:o("act.saveSuccessfully"),type:"success",duration:2500}),T(),b("refresh",X)}catch(D){console.error(D)}p.value=!1}).catch(z=>{console.error(z),p.value=!1})}})},U=Z=>{const K=Object.keys(E.value).map(X=>{var J;return(J=E.value[X])==null?void 0:J.updateFormData(y.value)}).filter(X=>X);Promise.all([Z.validate(),...K]).then(X=>{X.every(J=>J)&&B(Z)}).catch(X=>(console.error(X),X))};return(Z,K)=>{var ki;const X=l.resolveComponent("el-input"),J=l.resolveComponent("el-option"),fe=l.resolveComponent("el-select"),he=l.resolveComponent("el-select-v2"),ye=l.resolveComponent("el-tree-select"),z=l.resolveComponent("el-date-picker"),D=l.resolveComponent("el-cascader"),V=l.resolveComponent("el-switch"),q=l.resolveComponent("el-form-item"),H=l.resolveComponent("el-col"),Ue=l.resolveComponent("el-row"),Ri=l.resolveComponent("el-form"),Re=l.resolveComponent("el-button"),qe=l.resolveComponent("el-dialog"),Wt=l.resolveDirective("loading"),Dt=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(qe,{"model-value":w.visible,title:w.title,top:"5vh",width:(ki=i.data.formConfig)==null?void 0:ki.dialogWidth,draggable:"",overflow:"","append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"before-close":M},{footer:l.withCtx(()=>[l.createElementVNode("span",Hy,[l.createVNode(Re,{loading:p.value,onClick:T},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.cancel")),1)]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(Re,{type:"primary",loading:p.value,onClick:K[1]||(K[1]=Vi=>U(O.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.save")),1)]),_:1},8,["loading"])),[[Dt]])])]),default:l.withCtx(()=>{var Vi,R;return[l.withDirectives((l.openBlock(),l.createBlock(Ri,{class:"a-form",ref_key:"formRef",ref:O,model:y.value,"label-suffix":":","label-width":(Vi=i.data.formConfig)==null?void 0:Vi.formLabelWidth,"label-position":(R=i.data.formConfig)==null?void 0:R.formLabelPosition},{default:l.withCtx(()=>[l.createVNode(Ue,{gutter:40},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,(Q,W)=>(l.openBlock(),l.createBlock(H,{span:x(Q),key:W},{default:l.withCtx(()=>[Q.customFiledsComponentes.isFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[Q.customFiledsComponentes[Q.customFiledsComponentes.customComponentName]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(Q.customFiledsComponentes[Q.customFiledsComponentes.customComponentName]),{key:0,ref_for:!0,ref:Y=>E.value[Q.customFiledsComponentes.customComponentName]=Y,formConfig:i.data.formConfig,item:Q,rowData:w.data.rowData,visible:w.visible,form:y.value,"onUpdate:form":K[0]||(K[0]=Y=>y.value=Y)},null,40,["formConfig","item","rowData","visible","form"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:W},[l.createElementVNode("span",Gy,"【"+l.toDisplayString(Q.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(o)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(q,{key:0,label:Q.fieldName,prop:["select","multipleSelect"].includes(Q.fieldType)?`${Q.fieldKey}ActImplicit`:Q.fieldKey,rules:[{required:Q.isFormFieldRequired,message:l.unref(o)("act.requiredMessage"),trigger:k(Q)}]},{default:l.withCtx(()=>[Q.fieldType==="input"?(l.openBlock(),l.createBlock(X,l.mergeProps({key:0,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):l.createCommentVNode("",!0),Q.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,clearable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="textarea"?(l.openBlock(),l.createBlock(X,l.mergeProps({key:2,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,rows:4,ref_for:!0},l.unref(d)(Q),{type:"textarea",disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="selectIcon"?(l.openBlock(),l.createBlock(l.unref(n),l.mergeProps({key:3,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,icons:Q.dataList,placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Q.dataList,(Y,$e)=>(l.openBlock(),l.createBlock(J,{key:$e,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","icons","placeholder","disabled"])):["select","multipleSelect"].includes(Q.fieldType)?(l.openBlock(),l.createBlock(fe,l.mergeProps({key:4,modelValue:y.value[`${Q.fieldKey}ActImplicit`],"onUpdate:modelValue":Y=>y.value[`${Q.fieldKey}ActImplicit`]=Y,placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,clearable:"",filterable:"","value-key":"value",ref_for:!0},l.unref(d)(Q),{multiple:Q.fieldType==="multipleSelect",disabled:Q.isFormDisabled,onChange:Y=>I(Y,Q)}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Q.dataList,(Y,$e)=>(l.openBlock(),l.createBlock(J,{key:$e,label:Y.key,value:Y},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","disabled","onChange"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(Q.fieldType)?(l.openBlock(),l.createBlock(he,l.mergeProps({key:5,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,options:Q.dataList,props:{...l.unref(Fu)},placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,clearable:"",filterable:"",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled,multiple:Q.fieldType==="virtualizedMultipleSelect"}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled","multiple"])):Q.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:6,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,data:Q.dataList,"default-expanded-keys":[y.value[Q.fieldKey]||null],placeholder:`请选择${Q.fieldName}`,props:{...l.unref(xr),...l.unref(d)(Q).treeProps||{}},"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","data","default-expanded-keys","placeholder","props"])):Q.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(ye,l.mergeProps({key:7,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,placeholder:`请选择${Q.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(Y,$e)=>P({node:Y,resolve:$e},Q),ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):Q.fieldType==="date"?(l.openBlock(),l.createBlock(z,l.mergeProps({key:8,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,type:"date",placeholder:`${l.unref(o)("act.selectPlaceholder")}${l.unref(o)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):Q.fieldType==="dateRange"?(l.openBlock(),l.createBlock(z,l.mergeProps({key:9,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,type:"daterange","start-placeholder":l.unref(o)("act.startTime"),"end-placeholder":l.unref(o)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","disabled"])):Q.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(D,l.mergeProps({key:10,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,options:Q.dataList,props:l.unref(Uu),clearable:"",filterable:"",placeholder:`${l.unref(o)("act.selectPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q),{disabled:Q.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled"])):Q.fieldType==="switch"?(l.openBlock(),l.createBlock(V,l.mergeProps({key:11,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,"active-value":!0,"inactive-value":!1,ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue"])):Q.fieldType==="upload"?(l.openBlock(),l.createBlock(l.unref(s),l.mergeProps({key:12,class:"form-upload",modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,request:l.unref(a),ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","request"])):Q.fieldType==="editor"?(l.openBlock(),l.createBlock(l.unref(r),l.mergeProps({key:13,modelValue:y.value[Q.fieldKey],"onUpdate:modelValue":Y=>y.value[Q.fieldKey]=Y,disabled:Q.isFormDisabled,placeholder:`${l.unref(o)("act.inputPlaceholder")}${Q.fieldName}`,ref_for:!0},l.unref(d)(Q)),null,16,["modelValue","onUpdate:modelValue","disabled","placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))]),_:2},1032,["span"]))),128))]),_:1})]),_:1},8,["model","label-width","label-position"])),[[Wt,g.value]])]}),_:1},8,["model-value","title","width"])}}},[["__scopeId","data-v-4ca7d743"]])},Symbol.toStringTag,{value:"Module"})),WT="",Jy=["innerHTML"],e1={class:"dialog-footer"},t1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=()=>({loading:!1});let o=l.reactive(r());l.watch(()=>s.visible,async(h,u)=>{h&&(o.loading=!0,o.loading=!1)});const a=h=>{c(),h()},c=()=>{n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:800,"append-to-body":"","destroy-on-close":"",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":a},{footer:l.withCtx(()=>[l.createElementVNode("span",e1,[l.createVNode(f,{onClick:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.cancel")),1)]),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("div",{innerHTML:i.data.editorContent},null,8,Jy)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-be1c5be6"]])},Symbol.toStringTag,{value:"Module"})),GT="",i1={class:"dialog-footer"},n1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogConfigBtn",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>Hu)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>WO)),s=rn.useRoute(),r=l.inject("apiPrefix"),o=l.inject("request"),a=e,c=i,h=l.computed(()=>s.params.key),u=()=>({btnLoading:!1});let f=l.reactive(u());const d=l.inject("createDefaultButtonItem"),m=l.inject("associationMenuList"),b=l.inject("conditionList")();let w=l.ref([]),g=l.ref(null),p=l.ref(d());const O=M=>o({url:`${r}/icons/getAllList`,method:"post",data:M}),C=async()=>{try{const{data:M}=await O({dynamicFilters:[{field:"type",operate:"Equal",value:"2"}]});w.value=M||[]}catch(M){console.error(M)}};l.watch(()=>c.visible,async(M,T)=>{if(M){await C();const I={...c.data};Object.keys(p.value).forEach(B=>{B=="submitFields"||B=="matchFields"?p.value[B]=[...I[B]||[]]:B=="isPromptVerificationSelectTable"?p.value[B]=I[B]??"1":p.value[B]=I[B]})}});const y=()=>{p.value.submitWay=void 0,p.value.customType=void 0,p.value.codeStr=void 0,p.value.customComponentName=void 0,p.value.customComponentUrl=void 0},E=()=>{p.value.submitFields.push({matchType:"match",submitFieldMatchOrigin:"rowData",submitFieldName:"",matchFieldName:"",submitFieldType:""})},x=M=>{p.value.submitFields.splice(M,1)},k=()=>{p.value.matchFields.push({matchType:"default",matchFieldName:"",matchCondition:"",fieldValue:"",spliceCondition:""})},P=M=>{p.value.matchFields.splice(M,1),p.value.matchFields.length===1&&(p.value.matchFields[0].spliceCondition="")},N=(M,T)=>{M.submitFieldMatchOrigin=T==="match"?"rowData":""},_=M=>{A(),M()},A=()=>{p.value=Object.assign(p.value,d()),g.value.resetFields(),a("update:visible",!1)},S=M=>{M&&M.validate(T=>{if(T)try{f.btnLoading=!0,a("refresh",{...p.value,submitFields:[...p.value.submitFields],matchFields:[...p.value.matchFields]},()=>{A()}),f.btnLoading=!1}catch(I){console.error(I),f.btnLoading=!1}})};return(M,T)=>{const I=l.resolveComponent("el-input"),B=l.resolveComponent("el-form-item"),U=l.resolveComponent("el-col"),Z=l.resolveComponent("el-option"),K=l.resolveComponent("el-select"),X=l.resolveComponent("el-row"),J=l.resolveComponent("el-button"),fe=l.resolveComponent("el-divider"),he=l.resolveComponent("el-switch"),ye=l.resolveComponent("el-form"),z=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(z,{"model-value":c.visible,title:c.title,top:"5vh",width:"1200",draggable:"",overflow:"","append-to-body":"","append-to":"body","close-on-click-modal":!1,"before-close":_},{footer:l.withCtx(()=>[l.createElementVNode("span",i1,[l.createVNode(J,{loading:l.unref(f).btnLoading,onClick:A},{default:l.withCtx(()=>T[19]||(T[19]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(J,{type:"primary",loading:l.unref(f).btnLoading,onClick:T[16]||(T[16]=V=>S(l.unref(g)))},{default:l.withCtx(()=>T[20]||(T[20]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref_key:"formRef",ref:g,model:l.unref(p),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(X,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮",prop:"btnName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnName,"onUpdate:modelValue":T[0]||(T[0]=V=>l.unref(p).btnName=V),disabled:"",placeholder:"请输入按钮名称"},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(p).permissionCode),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮图标",prop:"btnIcon"},{default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(p).btnIcon,"onUpdate:modelValue":T[1]||(T[1]=V=>l.unref(p).btnIcon=V),icons:l.unref(w),props:{value:"name",type:"btn"}},null,8,["modelValue","icons"])]),_:1})]),_:1}),l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"接口地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"requestUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).requestUrl,"onUpdate:modelValue":T[2]||(T[2]=V=>l.unref(p).requestUrl=V),placeholder:"请输入接口地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮位置",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnPostion"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnPostion,"onUpdate:modelValue":T[3]||(T[3]=V=>l.unref(p).btnPostion=V),placeholder:"请选择按钮位置",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(dy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnType,"onUpdate:modelValue":T[4]||(T[4]=V=>l.unref(p).btnType=V),placeholder:"请选择按钮类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(fy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮别名",prop:"btnAlias"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).btnAlias,"onUpdate:modelValue":T[5]||(T[5]=V=>l.unref(p).btnAlias=V),placeholder:"请输入按钮别名",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮颜色",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnColor"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).btnColor,"onUpdate:modelValue":T[6]||(T[6]=V=>l.unref(p).btnColor=V),placeholder:"请选择按钮颜色",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(py),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(U,{key:0,span:12},{default:l.withCtx(()=>[!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(B,{key:0,label:"提交方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitWay"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).submitWay,"onUpdate:modelValue":T[7]||(T[7]=V=>l.unref(p).submitWay=V),placeholder:"请选择提交方式",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(my),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):l.createCommentVNode("",!0)]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["import","batchImport"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:1,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"导入提交文件字段",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"importFileName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).importFileName,"onUpdate:modelValue":T[8]||(T[8]=V=>l.unref(p).importFileName=V),placeholder:"请输入导入提交文件字段",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["messageBox","executeApi"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:2,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"是否提示校验选择表格",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"isPromptVerificationSelectTable"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).isPromptVerificationSelectTable,"onUpdate:modelValue":T[9]||(T[9]=V=>l.unref(p).isPromptVerificationSelectTable=V),placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Py),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1}),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[T[17]||(T[17]=l.createTextVNode(" 提交字段配置 ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:E})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).submitFields,(V,q)=>(l.openBlock(),l.createBlock(X,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldName,"onUpdate:modelValue":H=>V.submitFieldName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:8},{default:l.withCtx(()=>[l.createVNode(B,{label:"方式","label-width":"80px",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"120px"},onChange:H=>N(V,H)},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(_y),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.matchType==="match"?(l.openBlock(),l.createBlock(U,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配源",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldMatchOrigin"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.submitFieldMatchOrigin,"onUpdate:modelValue":H=>V.submitFieldMatchOrigin=H,placeholder:"请输入匹配源",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitFields."+q+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.submitFieldType,"onUpdate:modelValue":H=>V.submitFieldType=H,placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(gy),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>x(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(fe,{"content-position":"left"},{default:l.withCtx(()=>[T[18]||(T[18]=l.createTextVNode(" 匹配字段配置(表格操作列按钮显示/隐藏) ")),l.createVNode(J,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:k})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).matchFields,(V,q)=>(l.openBlock(),l.createBlock(X,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"matchFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(I,{placeholder:"请输入",modelValue:V.matchFieldName,"onUpdate:modelValue":H=>V.matchFieldName=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchType,"onUpdate:modelValue":H=>V.matchType=H,placeholder:"请选择",style:{width:"180px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(by),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"matchFields."+q+".matchCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.matchCondition,"onUpdate:modelValue":H=>V.matchCondition=H,placeholder:"请选择匹配条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"字段值",prop:"matchFields."+q+".fieldValue"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:V.fieldValue,"onUpdate:modelValue":H=>V.fieldValue=H,placeholder:"请输入字段值",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(J,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>P(q)},null,8,["onClick"])]),_:2},1024),q+1!==l.unref(p).matchFields.length?(l.openBlock(),l.createBlock(U,{key:0,span:24},{default:l.withCtx(()=>[l.createVNode(B,{class:"condition-box",label:"","label-width":"0",prop:"matchFields."+q+".spliceCondition"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:V.spliceCondition,"onUpdate:modelValue":H=>V.spliceCondition=H,placeholder:"请选择拼接条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Oy),(H,Ue)=>(l.openBlock(),l.createBlock(Z,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128)),l.createVNode(X,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义按钮",prop:"isCustomBtn"},{default:l.withCtx(()=>[l.createVNode(he,{modelValue:l.unref(p).isCustomBtn,"onUpdate:modelValue":T[10]||(T[10]=V=>l.unref(p).isCustomBtn=V),onChange:y},null,8,["modelValue"])]),_:1})]),_:1}),l.unref(p).isCustomBtn?(l.openBlock(),l.createBlock(U,{key:0,span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"customType"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).customType,"onUpdate:modelValue":T[11]||(T[11]=V=>l.unref(p).customType=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(yy),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"关联菜单"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:l.unref(p).associationMenuId,"onUpdate:modelValue":T[12]||(T[12]=V=>l.unref(p).associationMenuId=V),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(m),(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q,label:V.name,value:V.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.unref(p).customType==="code"?(l.openBlock(),l.createBlock(X,{key:0,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"代码片段",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"codeStr"},{default:l.withCtx(()=>[l.createVNode(l.unref(n),{modelValue:l.unref(p).codeStr,"onUpdate:modelValue":T[13]||(T[13]=V=>l.unref(p).codeStr=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(p).customType==="component"?(l.openBlock(),l.createBlock(X,{key:1,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentName"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentName,"onUpdate:modelValue":T[14]||(T[14]=V=>l.unref(p).customComponentName=V),placeholder:"请输入组件名称",clearable:""},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(h.value),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:14},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentUrl"},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:l.unref(p).customComponentUrl,"onUpdate:modelValue":T[15]||(T[15]=V=>l.unref(p).customComponentUrl=V),placeholder:"请输入组件地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-325d2233"]])},Symbol.toStringTag,{value:"Module"})),JT="",s1={slot:"prepend"},r1={class:"dialog-footer"},o1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogAddField",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>hT)),n=e,s=i,r=l.inject("pageKey")(),o=l.inject("conditionList")(),a=l.inject("configData")(),c=()=>({btnLoading:!1,showSiteComponentsParamsDialog:!1});let h=l.reactive(c());const u=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableQueryDefaultValue:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),f=Wu,d=l.ref(null),m=l.ref(u()),b=()=>["select","selectIcon","multipleSelect","treeSelect","provinceCascade","switch","virtualizedSelect","virtualizedMultipleSelect"].includes(m.value.fieldType),w=()=>m.value.useScenes.includes("tableSearch")&&m.value.fieldType!=="time",g=()=>m.value.useScenes.includes("tableShow"),p=()=>m.value.fieldType&&m.value.fieldType!=="implicit"&&m.value.useScenes.some(_=>!["tableSearch","tableShow"].some(A=>A==_));l.watch(()=>s.visible,async(_,A)=>{if(_){const S=(a.value.buttons||[]).filter(T=>T.permissionCode!=1001).map(T=>({key:T.btnName,value:T.permissionCode}));f.some(T=>{if(T.label==="表单配置")return T.options=S,!0});const{data:M}=s;if(!M.fieldName)return;Object.keys(m.value).forEach(T=>{if(T=="permissionCode")m.value[T]=M.unique;else if(T=="formCustomComponentes"){const I=M.useScenes.map(B=>M[T].find(Z=>Z.permissionCode==B)||{});m.value[T]=[...I]}else["postRequestParams","useScenes"].includes(T)?m.value[T]=[...M[T]||[]]:m.value[T]=M[T]})}});const O=()=>{m.value.postRequestParams.push({submitName:"",submitValue:"",submitType:"default",submitMatchType:"",paramsType:""})},C=_=>{m.value.postRequestParams.splice(_,1)},y=_=>{m.value.postRequestParams=[]},E=_=>{const A=f.find(M=>M.label==="表格配置").options,S=f.find(M=>M.label==="表单配置").options;m.value.formCustomComponentes=[...A,...S].filter(M=>_.includes(M.value)).map(M=>{const T=m.value.formCustomComponentes.find(I=>I.permissionCode==M.value);return{btnName:M.key,permissionCode:M.value,pageKey:r,customComponentName:(T==null?void 0:T.customComponentName)||void 0,customComponentUrl:(T==null?void 0:T.customComponentUrl)||void 0,isFieldCustom:(T==null?void 0:T.isFieldCustom)||!1}})},x=(_,A)=>{A.customComponentName=void 0,A.customComponentUrl=void 0},k=_=>{P(),_()},P=()=>{m.value=u(),d.value.resetFields(),n("update:visible",!1)},N=_=>{_&&_.validate(A=>{A&&(h.btnLoading=!0,m.value.formCustomComponentes.forEach(S=>{delete S.isFiledCustom}),n("refresh",JSON.parse(JSON.stringify(m.value)),()=>{P()}),h.btnLoading=!1)})};return(_,A)=>{const S=l.resolveComponent("el-input"),M=l.resolveComponent("el-form-item"),T=l.resolveComponent("el-col"),I=l.resolveComponent("el-option"),B=l.resolveComponent("el-select"),U=l.resolveComponent("el-button"),Z=l.resolveComponent("el-row"),K=l.resolveComponent("el-divider"),X=l.resolveComponent("el-option-group"),J=l.resolveComponent("el-switch"),fe=l.resolveComponent("el-input-number"),he=l.resolveComponent("el-form"),ye=l.resolveComponent("el-scrollbar"),z=l.resolveComponent("el-dialog"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(z,{"model-value":s.visible,title:s.title,top:"5vh",width:"1400",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":k},{footer:l.withCtx(()=>[l.createElementVNode("span",r1,[l.createVNode(U,{onClick:P,loading:l.unref(h).btnLoading},{default:l.withCtx(()=>A[29]||(A[29]=[l.createTextVNode("取消")])),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(U,{type:"primary",loading:l.unref(h).btnLoading,onClick:A[22]||(A[22]=V=>N(d.value))},{default:l.withCtx(()=>A[30]||(A[30]=[l.createTextVNode("保存")])),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.createVNode(ye,{ref:"configFieldsScroll","max-height":"800px"},{default:l.withCtx(()=>[l.createVNode(he,{ref_key:"formRef",ref:d,model:m.value,"label-suffix":":","label-width":"120px"},{default:l.withCtx(()=>[l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldName"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.fieldName,"onUpdate:modelValue":A[0]||(A[0]=V=>m.value.fieldName=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段key",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldKey"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.fieldKey,"onUpdate:modelValue":A[1]||(A[1]=V=>m.value.fieldKey=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"字段类型",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldType,"onUpdate:modelValue":A[2]||(A[2]=V=>m.value.fieldType=V),placeholder:"请选择",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(qu),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:4},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件参数",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(U,{type:"primary",onClick:A[3]||(A[3]=V=>l.unref(h).showSiteComponentsParamsDialog=!0)},{default:l.withCtx(()=>A[23]||(A[23]=[l.createTextVNode("设置props")])),_:1}),l.createVNode(l.unref(t),{modelValue:m.value.fieldUiProps,"onUpdate:modelValue":A[4]||(A[4]=V=>m.value.fieldUiProps=V),visible:l.unref(h).showSiteComponentsParamsDialog,"onUpdate:visible":A[5]||(A[5]=V=>l.unref(h).showSiteComponentsParamsDialog=V),title:"设置组件参数"},null,8,["modelValue","visible"])]),_:1})]),_:1})]),_:1}),b()?(l.openBlock(),l.createBlock(Z,{key:0},{default:l.withCtx(()=>[l.createVNode(T,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"数据源",prop:"fieldRequestUrl"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入",modelValue:m.value.fieldRequestUrl,"onUpdate:modelValue":A[7]||(A[7]=V=>m.value.fieldRequestUrl=V),clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldRequestType,"onUpdate:modelValue":A[6]||(A[6]=V=>m.value.fieldRequestType=V),placeholder:"请选择",style:{width:"150px"},onChange:y},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(wy),V=>(l.openBlock(),l.createBlock(I,{key:V.value,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),m.value.fieldRequestType=="POST"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>[A[24]||(A[24]=l.createTextVNode(" POST参数配置 ")),l.createVNode(U,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:O})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.postRequestParams,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(T,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitName"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.submitName,"onUpdate:modelValue":H=>V.submitName=H,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(T,{span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"方式",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitValue"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入值",modelValue:V.submitValue,"onUpdate:modelValue":H=>V.submitValue=H,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitType,"onUpdate:modelValue":H=>V.submitType=H,placeholder:"请选择方式",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(ky),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),V.submitType==="dynamic"?(l.openBlock(),l.createBlock(T,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitMatchType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.submitMatchType,"onUpdate:modelValue":H=>V.submitMatchType=H,placeholder:"请选择方式",clearable:"",filterable:"",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(T,{span:5},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"postRequestParams."+q+".paramsType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:V.paramsType,"onUpdate:modelValue":H=>V.paramsType=H,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Xu),(H,Ue)=>(l.openBlock(),l.createBlock(I,{key:Ue,label:H.key,value:H.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(T,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(U,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:H=>C(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))],64)):l.createCommentVNode("",!0),l.createVNode(Z,null,{default:l.withCtx(()=>[l.createVNode(T,{span:24},{default:l.withCtx(()=>[l.createVNode(M,{label:"使用场景",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"useScenes"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.useScenes,"onUpdate:modelValue":A[8]||(A[8]=V=>m.value.useScenes=V),placeholder:"请选择",multiple:"",clearable:"",filterable:"",onChange:E},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),V=>(l.openBlock(),l.createBlock(X,{key:V.label,label:V.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(V.options,q=>(l.openBlock(),l.createBlock(I,{key:q.key,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),w()?(l.openBlock(),l.createBlock(Z,{key:2},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[25]||(A[25]=[l.createTextVNode("查询模块")])),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"查询条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableQueryCondition"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableQueryCondition,"onUpdate:modelValue":A[9]||(A[9]=V=>m.value.tableQueryCondition=V),placeholder:"请选择查询条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"默认值",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"tableQueryDefaultValue"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:m.value.tableQueryDefaultValue,"onUpdate:modelValue":A[10]||(A[10]=V=>m.value.tableQueryDefaultValue=V),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),g()?(l.openBlock(),l.createBlock(Z,{key:3},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[26]||(A[26]=[l.createTextVNode("表格模块")])),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"列宽",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"tableCellWidth"},{default:l.withCtx(()=>[l.createVNode(S,{placeholder:"请输入",modelValue:m.value.tableCellWidth,"onUpdate:modelValue":A[12]||(A[12]=V=>m.value.tableCellWidth=V)},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellWidthType,"onUpdate:modelValue":A[11]||(A[11]=V=>m.value.tableCellWidthType=V),placeholder:"请选择",style:{width:"100px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ay),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"对齐方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellAlignType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellAlignType,"onUpdate:modelValue":A[13]||(A[13]=V=>m.value.tableCellAlignType=V),placeholder:"请选择对齐方式",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"内容类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellContentType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellContentType,"onUpdate:modelValue":A[14]||(A[14]=V=>m.value.tableCellContentType=V),placeholder:"请选择内容类型",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"溢出隐藏",prop:"isTableCellOverflowTooltip"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellOverflowTooltip,"onUpdate:modelValue":A[15]||(A[15]=V=>m.value.isTableCellOverflowTooltip=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:"排序",prop:"isTableCellSort"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isTableCellSort,"onUpdate:modelValue":A[16]||(A[16]=V=>m.value.isTableCellSort=V)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),p()?(l.openBlock(),l.createBlock(Z,{key:4},{default:l.withCtx(()=>[l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[27]||(A[27]=[l.createTextVNode("表单模块")])),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否必填",prop:"isFormFieldRequired"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormFieldRequired,"onUpdate:modelValue":A[17]||(A[17]=V=>m.value.isFormFieldRequired=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否回显",prop:"isFormSetValue"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormSetValue,"onUpdate:modelValue":A[18]||(A[18]=V=>m.value.isFormSetValue=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:3},{default:l.withCtx(()=>[l.createVNode(M,{label:"是否禁用",prop:"isFormDisabled"},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:m.value.isFormDisabled,"onUpdate:modelValue":A[19]||(A[19]=V=>m.value.isFormDisabled=V)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"fieldSubmitType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldSubmitType,"onUpdate:modelValue":A[20]||(A[20]=V=>m.value.fieldSubmitType=V),placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(xy),(V,q)=>(l.openBlock(),l.createBlock(I,{key:q,label:V.key,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(T,{span:6},{default:l.withCtx(()=>[l.createVNode(M,{label:"栅格数",prop:"formColumnCol"},{default:l.withCtx(()=>[l.createVNode(fe,{modelValue:m.value.formColumnCol,"onUpdate:modelValue":A[21]||(A[21]=V=>m.value.formColumnCol=V),max:24},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>A[28]||(A[28]=[l.createTextVNode("不同场景自定义字段组件")])),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.formCustomComponentes,(V,q)=>(l.openBlock(),l.createBlock(Z,{key:q},{default:l.withCtx(()=>[l.createVNode(T,{span:2},{default:l.withCtx(()=>[l.createVNode(M,{label:`${V.btnName}`,prop:`formCustomComponentes.${q}.isFieldCustom`},{default:l.withCtx(()=>[l.createVNode(J,{modelValue:V.isFieldCustom,"onUpdate:modelValue":H=>V.isFieldCustom=H,onChange:H=>x(H,V)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label","prop"])]),_:2},1024),V.isFieldCustom?(l.openBlock(),l.createBlock(T,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件名称","label-width":"220",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentName`},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.customComponentName,"onUpdate:modelValue":H=>V.customComponentName=H,placeholder:"请输入",clearable:""},{default:l.withCtx(()=>[l.createElementVNode("template",s1,[l.createTextVNode(l.toDisplayString(l.unref(r)),1)])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),V.isFieldCustom?(l.openBlock(),l.createBlock(T,{key:1,span:14},{default:l.withCtx(()=>[l.createVNode(M,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentUrl`},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:V.customComponentUrl,"onUpdate:modelValue":H=>V.customComponentUrl=H,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["model"])]),_:1},512)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-6b2ebaa8"]])},Symbol.toStringTag,{value:"Module"})),Gu=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i,s=l.computed({get(){return n.modelValue},set(a){t("update:modelValue",a)}}),r=a=>{let c=a.charAt(0);return a=a.replace(/[^\d.]/g,""),a=a.replace(/^\./g,""),a=a.replace(/\.{2,}/g,"."),a=a.replace(".","$#$").replace(/\./g,"").replace("$#$","."),c=="-"&&(a="-"+a),a},o=a=>{s.value=r(a)};return(a,c)=>{const h=l.resolveComponent("el-input");return l.openBlock(),l.createBlock(h,l.mergeProps({modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),modelModifiers:{number:!0},placeholder:"Please input"},a.$attrs,{onInput:o}),null,16,["modelValue"])}}}},Symbol.toStringTag,{value:"Module"})),nE="",sE="",l1={class:"select-icon-container"},a1={class:"icon-list"},c1=["onClick"],h1={class:"icon-value",slot:"reference"},Hu=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},icons:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",type:"btn"})}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i;let s=l.ref(!1),r=l.ref(-1),o=l.ref([]);const a=()=>r.value==-1?"":o.value[r.value];l.watch(()=>n.icons,(h,u)=>{h&&(o.value=(n.icons||[]).map(f=>{const{props:d}=n;return Reflect.has(f,d.value)?`${d.type}-${f[d.value]}`:`${d.type}-${f}`}))},{deep:!0,immediate:!0}),l.watch(()=>n.modelValue,(h,u)=>{if(!h){r.value=-1,t("update:modelValue","");return}const f=o.value.findIndex(d=>d===h);r.value=f},{deep:!0,immediate:!0});const c=(h,u)=>{r.value=u,t("update:modelValue",a()),s.value=!1};return(h,u)=>{const f=l.resolveComponent("a-svg-icon"),d=l.resolveComponent("el-button"),m=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",l1,[l.createVNode(m,{"popper-class":"select-icon-popover",placement:"bottom-start",visible:l.unref(s),"onUpdate:visible":u[0]||(u[0]=b=>l.isRef(s)?s.value=b:s=b),width:400,trigger:"click"},{reference:l.withCtx(()=>[l.createElementVNode("div",h1,[l.unref(r)>=0?(l.openBlock(),l.createBlock(f,{key:0,name:n.modelValue,width:"24",height:"24",color:"#000"},null,8,["name"])):l.createCommentVNode("",!0),l.createVNode(d,{class:"icon-btn",type:"primary"},{default:l.withCtx(()=>u[1]||(u[1]=[l.createTextVNode("选择图标")])),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("ul",a1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(b,w)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["icon-item",{"icon-item-checked":l.unref(r)==w}]),key:w,onClick:g=>c(b,w)},[l.createVNode(f,{class:"icon-svg",name:b,width:"24",height:"24",color:"#999"},null,8,["name"])],10,c1))),128))])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-308d02d4"]])},Symbol.toStringTag,{value:"Module"}));let Ar;const u1=new Uint8Array(16);function f1(){if(!Ar&&(Ar=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ar))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ar(u1)}const ht=[];for(let i=0;i<256;++i)ht.push((i+256).toString(16).slice(1));function d1(i,e=0){return ht[i[e+0]]+ht[i[e+1]]+ht[i[e+2]]+ht[i[e+3]]+"-"+ht[i[e+4]]+ht[i[e+5]]+"-"+ht[i[e+6]]+ht[i[e+7]]+"-"+ht[i[e+8]]+ht[i[e+9]]+"-"+ht[i[e+10]]+ht[i[e+11]]+ht[i[e+12]]+ht[i[e+13]]+ht[i[e+14]]+ht[i[e+15]]}const Ku={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function p1(i,e,t){if(Ku.randomUUID&&!e&&!i)return Ku.randomUUID();i=i||{};const n=i.random||(i.rng||f1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=n[s];return e}return d1(n)}const aE="",m1={class:"upload-container"},g1={class:"el-upload__text"},O1={class:"tip-text"},_1={class:"file-list-l"},b1=["onMouseenter","onMouseleave"],y1={class:"el-file-operate"},w1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{request:{type:Function,required:!0,default:null},modelValue:{type:[Array,String],default:[]},action:{type:String,default:"/api/v1/utils/uploadFiles"},data:{type:Object,default:()=>({uploadFileType:1})},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},accept:{type:String,default:"*"},tipText:{type:String,default:""},fileMaxSize:{type:Number,default:100},autoUpload:{type:Boolean,default:!0}},emits:["update:modelValue","delete"],setup(i,{expose:e,emit:t}){const{getAssetsFileName:n,getAssetsFilePath:s,downloadFile:r}=Iu(),{t:o}=Gt(),a=t,c=i,h={image:/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,word:/(doc|docx)$/,pdf:/(pdf)$/,excel:/(xls|xlsx)$/};let u=l.ref(!1),f=l.ref({}),d=l.ref(!1),m=l.ref(null),b=null,w=l.computed({get(){return C(c.modelValue)},set(T){a("update:modelValue",T)}});const g=T=>{const I=(w.value||[]).map(Z=>Z.filePath);if(T==0)return I;let B=I.splice(T),U=I.splice(0,T);return B.concat(U)},p=T=>{const I=T.substring(T.lastIndexOf(".")+1);let B=null;return Object.keys(h).some(U=>{if(h[U].test(I))return B=U,!0}),B===null&&(B="file"),B},O=T=>T.map(I=>({uid:I.uid??p1(),name:n(I),filePath:I,fileType:p(I),status:"success"})),C=T=>{const I=Array.isArray(T)?T.map(B=>B.filePath):T?T.split(";"):[];return O(I||[])},y=({name:T})=>{const I=T.lastIndexOf("."),B=T.slice(I),U=c.accept.trim().split(",");let Z=!1;return U.includes(B)&&(Z=!0),Z=U.some(K=>K=="image/*"?h.image.test(B):K.startsWith(".")?T.endsWith(K):K===B),Z||Ne.ElNotification({title:`${o("act.tip")}`,message:`【${T}】${o("act.uploadErrorTip")}`,type:"warning",duration:2500}),Z},E=(T,I,B)=>{b&&(clearTimeout(b),b=null),b=setTimeout(()=>{T.call(this,I)},B)},x=T=>c.request({url:c.action,method:"POST",data:T,headers:{"Content-Type":"application/x-www-form-urlencoded"}}),k=async T=>{try{const I=T.filter(X=>X.status=="ready"&&y(X)),B=w.value.length+I.length;if(I.length===0){m.value.clearFiles();return}if(B>c.limit){Ne.ElNotification({title:`${o("act.tip")}`,message:`${o("act.uploadLimitTip")}`,type:"warning",duration:2500}),m.value.clearFiles();return}if(!c.autoUpload){const X=I.map(J=>({...J,filePath:null,status:"success"}));a("update:modelValue",X),m.value.clearFiles();return}u.value=!0;const U=new FormData;Object.keys(c.data).forEach(X=>{U.append(X,c.data[X])}),I.forEach(X=>{U.append(c.name,X.raw)});let{data:Z}=await x(U);const K=c.multiple?[...w.value.map(X=>X.filePath),...Z.filePaths||[]].join(";"):[...Z.filePaths||[]].join(";");m.value.clearFiles(),a("update:modelValue",K),u.value=!1}catch(I){m.value.clearFiles(),u.value=!1,console.error(I)}},P=(T,I)=>{E(k,I,500)},N=(T,I)=>{const B=f.value[`tooltipRef${I}`];d.value=B.scrollWidth<=Math.round(B.getBoundingClientRect().width)},_=({filePath:T,name:I,uid:B},U)=>{l.nextTick(()=>{document.querySelector(`.previewImage_${B}`).children[0].click()})},A=({filePath:T,name:I})=>{r(c.request,T)},S=(T,I)=>{w.value=w.value.filter((B,U)=>U!==I),a("delete",{data:T})};return e({clearFiles:()=>{w.value=[],m.value.clearFiles()}}),(T,I)=>{const B=l.resolveComponent("upload-filled"),U=l.resolveComponent("el-icon"),Z=l.resolveComponent("el-upload"),K=l.resolveComponent("el-image"),X=l.resolveComponent("el-tooltip"),J=l.resolveComponent("el-button"),fe=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",m1,[l.withDirectives((l.openBlock(),l.createBlock(Z,l.mergeProps({ref_key:"uploadRef",ref:m,action:"#",drag:"",accept:c.accept,multiple:c.multiple,"auto-upload":!1,"show-file-list":!1,"on-change":P},T.$attrs,{"element-loading-text":l.unref(o)("act.uploadLoading")}),{tip:l.withCtx(()=>[c.tipText?l.renderSlot(T.$slots,"default",{key:0},()=>[l.createElementVNode("p",O1,l.toDisplayString(c.tipText),1)],!0):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createVNode(U,{class:"el-icon--upload"},{default:l.withCtx(()=>[l.createVNode(B)]),_:1}),l.createElementVNode("div",g1,[l.createTextVNode(l.toDisplayString(l.unref(o)("act.uploadText")),1),l.createElementVNode("em",null,l.toDisplayString(l.unref(o)("act.clickUpload")),1)])]),_:3},16,["accept","multiple","element-loading-text"])),[[fe,l.unref(u)]]),l.renderSlot(T.$slots,"default",{},()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(he,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"file-list",key:he.uid},[l.createElementVNode("div",_1,[he.fileType==="image"?(l.openBlock(),l.createBlock(K,{key:0,class:l.normalizeClass(["file-list-image",{[`previewImage_${he.uid}`]:!0}]),fit:"cover","preview-src-list":g(ye),"preview-teleported":"",src:he.filePath},null,8,["class","preview-src-list","src"])):(l.openBlock(),l.createBlock(K,{key:1,class:"file-list-icon",src:l.unref(s)(`images/upload-${he.fileType}.png`)},null,8,["src"])),l.createVNode(X,{effect:"dark",content:he.name,placement:"bottom-start",disabled:l.unref(d)},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"el-file-name",ref_for:!0,ref:z=>l.unref(f)[`tooltipRef${ye}`]=z,onMouseenter:z=>N(z,ye),onMouseleave:z=>N(z,ye)},l.toDisplayString(he.name),41,b1)]),_:2},1032,["content","disabled"])]),l.createElementVNode("div",y1,[he.fileType==="image"?(l.openBlock(),l.createBlock(J,{key:0,type:"primary",size:"small",icon:l.unref(oy),circle:"",onClick:z=>_(he)},null,8,["icon","onClick"])):l.createCommentVNode("",!0),l.createVNode(J,{type:"primary",size:"small",icon:l.unref(iy),circle:"",onClick:z=>A(he)},null,8,["icon","onClick"]),l.createVNode(J,{type:"danger",size:"small",icon:l.unref(ey),circle:"",onClick:z=>S(he,ye)},null,8,["icon","onClick"])])]))),128))],!0)])}}},[["__scopeId","data-v-f839bee6"]])},Symbol.toStringTag,{value:"Module"}));var k1=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCompositionEnd","onCompositionStart","onCompositionUpdate","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],x1=function(i){return k1.map(function(e){return e.toLowerCase()}).indexOf(i.toLowerCase())!==-1},S1=function(i,e,t){Object.keys(e).filter(x1).forEach(function(n){var s=e[n];typeof s=="function"&&(n==="onInit"?s(i,t):t.on(n.substring(2),function(r){return s(r,t)}))})},C1=function(i,e,t,n){var s=i.modelEvents?i.modelEvents:null,r=Array.isArray(s)?s.join(" "):s;l.watch(n,function(o,a){t&&typeof o=="string"&&o!==a&&o!==t.getContent({format:i.outputFormat})&&t.setContent(o)}),t.on(r||"change input undo redo",function(){e.emit("update:modelValue",t.getContent({format:i.outputFormat}))})},A1=function(i,e,t,n,s,r){n.setContent(r()),t.attrs["onUpdate:modelValue"]&&C1(e,t,n,s),S1(i,t.attrs,n)},Ju=0,ef=function(i){var e=Date.now(),t=Math.floor(Math.random()*1e9);return Ju++,i+"_"+t+Ju+String(e)},Q1=function(i){return i!==null&&i.tagName.toLowerCase()==="textarea"},tf=function(i){return typeof i>"u"||i===""?[]:Array.isArray(i)?i:i.split(" ")},P1=function(i,e){return tf(i).concat(tf(e))},T1=function(i){return i==null},nf=function(){return{listeners:[],scriptId:ef("tiny-script"),scriptLoaded:!1}},E1=function(){var i=nf(),e=function(s,r,o,a){var c=r.createElement("script");c.referrerPolicy="origin",c.type="application/javascript",c.id=s,c.src=o;var h=function(){c.removeEventListener("load",h),a()};c.addEventListener("load",h),r.head&&r.head.appendChild(c)},t=function(s,r,o){i.scriptLoaded?o():(i.listeners.push(o),s.getElementById(i.scriptId)||e(i.scriptId,s,r,function(){i.listeners.forEach(function(a){return a()}),i.scriptLoaded=!0}))},n=function(){i=nf()};return{load:t,reinitialize:n}},$1=E1(),N1=function(){return typeof window<"u"?window:global},hn=function(){var i=N1();return i&&i.tinymce?i.tinymce:null},R1={apiKey:String,licenseKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(i){return i==="html"||i==="text"}}},oi=globalThis&&globalThis.__assign||function(){return oi=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s])}return i},oi.apply(this,arguments)},V1=function(i,e,t,n){return i(n||"div",{id:e,ref:t})},L1=function(i,e,t){return i("textarea",{id:e,visibility:"hidden",ref:t})},Ll={selector:void 0,target:void 0},M1=l.defineComponent({props:R1,setup:function(i,e){var t=i.init?oi(oi({},i.init),Ll):oi({},Ll),n=l.toRefs(i),s=n.disabled,r=n.modelValue,o=n.tagName,a=l.ref(null),c=null,h=i.id||ef("tiny-vue"),u=i.init&&i.init.inline||i.inline,f=!!e.attrs["onUpdate:modelValue"],d=!0,m=i.initialValue?i.initialValue:"",b="",w=function(O){return f?function(){return r!=null&&r.value?r.value:""}:function(){return O?m:b}},g=function(){var O=w(d),C=oi(oi({},t),{readonly:i.disabled,target:a.value,plugins:P1(t.plugins,i.plugins),toolbar:i.toolbar||t.toolbar,inline:u,license_key:i.licenseKey,setup:function(y){c=y,y.on("init",function(E){return A1(E,i,e,y,r,O)}),typeof t.setup=="function"&&t.setup(y)}});Q1(a.value)&&(a.value.style.visibility=""),hn().init(C),d=!1};l.watch(s,function(O){var C;c!==null&&(typeof((C=c.mode)===null||C===void 0?void 0:C.set)=="function"?c.mode.set(O?"readonly":"design"):c.setMode(O?"readonly":"design"))}),l.watch(o,function(O){var C;f||(b=c.getContent()),(C=hn())===null||C===void 0||C.remove(c),l.nextTick(function(){return g()})}),l.onMounted(function(){if(hn()!==null)g();else if(a.value&&a.value.ownerDocument){var O=i.cloudChannel?i.cloudChannel:"7",C=i.apiKey?i.apiKey:"no-api-key",y=T1(i.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/".concat(C,"/tinymce/").concat(O,"/tinymce.min.js"):i.tinymceScriptSrc;$1.load(a.value.ownerDocument,y,g)}}),l.onBeforeUnmount(function(){hn()!==null&&hn().remove(c)}),u||(l.onActivated(function(){d||g()}),l.onDeactivated(function(){var O;f||(b=c.getContent()),(O=hn())===null||O===void 0||O.remove(c)}));var p=function(O){var C;b=c.getContent(),(C=hn())===null||C===void 0||C.remove(c),t=oi(oi(oi({},t),O),Ll),l.nextTick(function(){return g()})};return e.expose({rerender:p,getEditor:function(){return c}}),function(){return u?V1(l.h,h,a,i.tagName):L1(l.h,h,a)}}});const uE="",B1={style:{height:"100%",overflow:"hidden"}},D1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String,default:""},value:{type:String,default:""},baseUrl:{type:String,default:""},width:{type:[Number,String],default:"100%"},height:{type:Number,default:500},disabled:{type:Boolean,default:!1},editableRoot:{type:Boolean,default:!0},placeholder:{type:String,default:"请输入"},plugins:{type:[String,Array],default:"importcss autoresize searchreplace autolink directionality code visualblocks visualchars fullscreen image link codesample table charmap nonbreaking anchor insertdatetime advlist lists wordcount charmap quickbars emoticons accordion"},toolbar:{type:[String,Array,Boolean],default:"undo redo | accordion accordionremove | blocks fontfamily fontsize| bold italic underline strikethrough ltr rtl | align numlist bullist | link image | table | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | anchor codesample"}},emits:["update:modelValue","setHtml"],setup(i,{expose:e,emit:t}){const n=t,s=i,r=l.ref("vue-tinymce-"+ +new Date+((Math.random()*1e3).toFixed(0)+"")),o=l.reactive({selector:"#"+r.value,language_url:"/tinymce/langs/zh_CN.js",language:"zh_CN",skin_url:"/tinymce/skins/ui/oxide",content_css:"/tinymce/skins/content/default/content.css",editable_root:s.editableRoot,width:s.width,max_height:s.height,branding:!1,promotion:!1,menubar:"edit view insert format tools table",paste_data_images:!0,image_dimensions:!1,plugins:s.plugins,toolbar:s.toolbar,convert_urls:!1,link_default_target:"_blank",link_context_toolbar:!0,quickbars_insert_toolbar:"",quickbars_image_toolbar:"alignleft aligncenter alignright | rotateleft rotateright | imageoptions",editimage_toolbar:"rotateleft rotateright | flipv fliph | editimage imageoptions",font_family_formats:"Arial=arial,helvetica,sans-serif; 宋体=SimSun; 微软雅黑=Microsoft Yahei; Impact=impact,chicago;",font_size_formats:"11px 12px 14px 16px 18px 24px 36px 48px 64px 72px",image_caption:!0,editimage_cors_hosts:["picsum.photos"],noneditable_class:"mceNonEditable",toolbar_mode:"wrap",content_style:"body {margin:12px; font-family:sans-serif; font-size:14px }p {margin:3px; line-height:24px;}",image_advtab:!0,importcss_append:!0,paste_webkit_styles:"all",paste_merge_formats:!0,nonbreaking_force_tab:!1,paste_auto_cleanup_on_paste:!1,file_picker_types:"file",quickbars_selection_toolbar:"bold italic | quicklink h2 h3 blockquote quickimage quicktable",images_upload_handler:function(u,f){}});console.log(o);const a=l.computed({get(){return s.modelValue},set(u){n("update:modelValue",u)}});return l.watch(()=>a.value,()=>{n("setHtml",hr.activeEditor.getContent({format:"text"}),a.value)}),l.onMounted(()=>{hr.init({})}),e({onGetContent:()=>hr.activeEditor.getContent(),onSetContent:u=>{hr.activeEditor.setContent(u)}}),(u,f)=>(l.openBlock(),l.createElementBlock("div",B1,[l.createVNode(l.unref(M1),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=d=>a.value=d),init:o,disabled:i.disabled,placeholder:i.placeholder,id:r.value},null,8,["modelValue","init","disabled","placeholder","id"])]))}}},Symbol.toStringTag,{value:"Module"}));let Ml=[],sf=[];(()=>{let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,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,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<i.length;e++)(e%2?sf:Ml).push(t=t+i[e])})();function v1(i){if(i<768)return!1;for(let e=0,t=Ml.length;;){let n=e+t>>1;if(i<Ml[n])t=n;else if(i>=sf[n])e=n+1;else return!0;if(e==t)return!1}}function rf(i){return i>=127462&&i<=127487}const of=8205;function Z1(i,e,t=!0,n=!0){return(t?lf:I1)(i,e,n)}function lf(i,e,t){if(e==i.length)return e;e&&af(i.charCodeAt(e))&&cf(i.charCodeAt(e-1))&&e--;let n=Bl(i,e);for(e+=hf(n);e<i.length;){let s=Bl(i,e);if(n==of||s==of||t&&v1(s))e+=hf(s),n=s;else if(rf(s)){let r=0,o=e-2;for(;o>=0&&rf(Bl(i,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function I1(i,e,t){for(;e>0;){let n=lf(i,e-2,t);if(n<e)return n;e--}return 0}function Bl(i,e){let t=i.charCodeAt(e);if(!cf(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return af(n)?(t-55296<<10)+(n-56320)+65536:t}function af(i){return i>=56320&&i<57344}function cf(i){return i>=55296&&i<56320}function hf(i){return i<65536?1:2}class Ae{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Rn(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),li.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Rn(this,e,t);let n=[];return this.decompose(e,t,n,0),li.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),s=new ms(this),r=new ms(e);for(let o=t,a=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(e=1){return new ms(this,e)}iterRange(e,t=this.length){return new ff(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new df(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ae.empty:e.length<=32?new ze(e):li.from(ze.split(e,[]))}}class ze extends Ae{constructor(e,t=U1(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.text[r],a=s+o.length;if((t?n:a)>=e)return new F1(s,a,n,o);s=a+1,n++}}decompose(e,t,n,s){let r=e<=0&&t>=this.length?this:new ze(uf(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=n.pop(),a=Qr(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new ze(a,o.length+r.length));else{let c=a.length>>1;n.push(new ze(a.slice(0,c)),new ze(a.slice(c)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof ze))return super.replace(e,t,n);[e,t]=Rn(this,e,t);let s=Qr(this.text,Qr(n.text,uf(this.text,0,e)),t),r=this.length+n.length-(t-e);return s.length<=32?new ze(s,r):li.from(ze.split(s,[]),r)}sliceString(e,t=this.length,n=`
22
- `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let a=this.text[o],c=r+a.length;r>e&&o&&(s+=n),e<c&&t>r&&(s+=a.slice(Math.max(0,e-r),t-r)),r=c+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let r of e)n.push(r),s+=r.length+1,n.length==32&&(t.push(new ze(n,s)),n=[],s=-1);return s>-1&&t.push(new ze(n,s)),t}}class li extends Ae{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.children[r],a=s+o.length,c=n+o.lines-1;if((t?c:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=c+1}}decompose(e,t,n,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let a=this.children[r],c=o+a.length;if(e<=c&&t>=o){let h=s&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!h?n.push(a):a.decompose(e-o,t-o,n,h)}o=c+1}}replace(e,t,n){if([e,t]=Rn(this,e,t),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],a=r+o.length;if(e>=r&&t<=a){let c=o.replace(e-r,t-r,n),h=this.lines-o.lines+c.lines;if(c.lines<h>>5-1&&c.lines>h>>5+1){let u=this.children.slice();return u[s]=c,new li(u,this.length-(t-e)+n.length)}return super.replace(r,a,c)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
23
- `){[e,t]=Rn(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let a=this.children[r],c=o+a.length;o>e&&r&&(s+=n),e<c&&t>o&&(s+=a.sliceString(e-o,t-o,n)),o=c+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof li))return 0;let n=0,[s,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==a)return n;let c=this.children[s],h=e.children[r];if(c!=h)return n+c.scanIdentical(h,t);n+=c.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let m of e)n+=m.lines;if(n<32){let m=[];for(let b of e)b.flatten(m);return new ze(m,t)}let s=Math.max(32,n>>5),r=s<<1,o=s>>1,a=[],c=0,h=-1,u=[];function f(m){let b;if(m.lines>r&&m instanceof li)for(let w of m.children)f(w);else m.lines>o&&(c>o||!c)?(d(),a.push(m)):m instanceof ze&&c&&(b=u[u.length-1])instanceof ze&&m.lines+b.lines<=32?(c+=m.lines,h+=m.length+1,u[u.length-1]=new ze(b.text.concat(m.text),b.length+1+m.length)):(c+m.lines>s&&d(),c+=m.lines,h+=m.length+1,u.push(m))}function d(){c!=0&&(a.push(u.length==1?u[0]:li.from(u,h)),h=-1,c=u.length=0)}for(let m of e)f(m);return d(),a.length==1?a[0]:new li(a,t)}}Ae.empty=new ze([""],0);function U1(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Qr(i,e,t=0,n=1e9){for(let s=0,r=0,o=!0;r<i.length&&s<=n;r++){let a=i[r],c=s+a.length;c>=t&&(c>n&&(a=a.slice(0,n-s)),s<t&&(a=a.slice(t-s)),o?(e[e.length-1]+=a,o=!1):e.push(a)),s=c+1}return e}function uf(i,e,t){return Qr(i,[""],e,t)}class ms{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ze?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],r=this.offsets[n],o=r>>1,a=s instanceof ze?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
24
- `,this;e--}else if(s instanceof ze){let c=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=s.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof ze?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ff{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new ms(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class df{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ae.prototype[Symbol.iterator]=function(){return this.iter()},ms.prototype[Symbol.iterator]=ff.prototype[Symbol.iterator]=df.prototype[Symbol.iterator]=function(){return this});class F1{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}}function Rn(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function ut(i,e,t=!0,n=!0){return Z1(i,e,t,n)}function j1(i){return i>=56320&&i<57344}function q1(i){return i>=55296&&i<56320}function Ct(i,e){let t=i.charCodeAt(e);if(!q1(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return j1(n)?(t-55296<<10)+(n-56320)+65536:t}function Dl(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function ai(i){return i<65536?1:2}const vl=/\r\n?|\n/;var ft=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(ft||(ft={}));class ci{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,s,r),s+=r):s+=o,n+=r}}iterChangedRanges(e,t=!1){Zl(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new ci(e)}composeDesc(e){return this.empty?e:e.empty?this:pf(this,e)}mapDesc(e,t=!1){return e.empty?this:Il(this,e,t)}mapPos(e,t=-1,n=ft.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],c=this.sections[o++],h=s+a;if(c<0){if(h>e)return r+(e-s);r+=a}else{if(n!=ft.Simple&&h>=e&&(n==ft.TrackDel&&s<e&&h>e||n==ft.TrackBefore&&s<e||n==ft.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!a)return e==s||t<0?r:r+c;r+=c}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let r=this.sections[n++],o=this.sections[n++],a=s+r;if(o>=0&&s<=t&&a>=e)return s<e&&a>t?"cover":!0;s=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ci(e)}static create(e){return new ci(e)}}class it extends ci{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Zl(this,(t,n,s,r,o)=>e=e.replace(s,s+(n-t),o),!1),e}mapDesc(e,t=!1){return Il(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],a=t[s+1];if(a>=0){t[s]=a,t[s+1]=o;let c=s>>1;for(;n.length<c;)n.push(Ae.empty);n.push(o?e.slice(r,r+o):Ae.empty)}r+=o}return new it(t,n)}compose(e){return this.empty?e:e.empty?this:pf(this,e,!0)}map(e,t=!1){return e.empty?this:Il(this,e,t,!0)}iterChanges(e,t=!1){Zl(this,e,t)}get desc(){return ci.create(this.sections)}filter(e){let t=[],n=[],s=[],r=new gs(this);e:for(let o=0,a=0;;){let c=o==e.length?1e9:e[o++];for(;a<c||a==c&&r.len==0;){if(r.done)break e;let u=Math.min(r.len,c-a);gt(s,u,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;gt(t,u,f),f>0&&Fi(n,t,r.text),r.forward(u),a+=u}let h=e[o++];for(;a<h;){if(r.done)break e;let u=Math.min(r.len,h-a);gt(t,u,-1),gt(s,u,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(u),a+=u}}return{changes:new it(t,n),filtered:ci.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],r=[],o=0,a=null;function c(u=!1){if(!u&&!s.length)return;o<t&&gt(s,t-o,-1);let f=new it(s,r);a=a?a.compose(f.map(a)):f,s=[],r=[],o=0}function h(u){if(Array.isArray(u))for(let f of u)h(f);else if(u instanceof it){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);c(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:m}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let b=m?typeof m=="string"?Ae.of(m.split(n||vl)):m:Ae.empty,w=b.length;if(f==d&&w==0)return;f<o&&c(),f>o&&gt(s,f-o,-1),gt(s,d-f,w),Fi(r,s,b),o=d}}return h(e),c(!a),a}static empty(e){return new it(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;n.length<s;)n.push(Ae.empty);n[s]=Ae.of(r.slice(1)),t.push(r[0],n[s].length)}}}return new it(t,n)}static createSet(e,t){return new it(e,t)}}function gt(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function Fi(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(Ae.empty);i.push(t)}}function Zl(i,e,t){let n=i.inserted;for(let s=0,r=0,o=0;o<i.sections.length;){let a=i.sections[o++],c=i.sections[o++];if(c<0)s+=a,r+=a;else{let h=s,u=r,f=Ae.empty;for(;h+=a,u+=c,c&&n&&(f=f.append(n[o-2>>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)a=i.sections[o++],c=i.sections[o++];e(s,h,r,u,f),s=h,r=u}}}function Il(i,e,t,n=!1){let s=[],r=n?[]:null,o=new gs(i),a=new gs(e);for(let c=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let h=Math.min(o.len,a.len);gt(s,h,-1),o.forward(h),a.forward(h)}else if(a.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let h=a.len;for(gt(s,a.ins,-1);h;){let u=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=u&&(gt(s,0,o.ins),r&&Fi(r,s,o.text),c=o.i),o.forward(u),h-=u}a.next()}else if(o.ins>=0){let h=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);h+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;gt(s,h,c<o.i?o.ins:0),r&&c<o.i&&Fi(r,s,o.text),c=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return r?it.createSet(s,r):ci.create(s);throw new Error("Mismatched change set lengths")}}}function pf(i,e,t=!1){let n=[],s=t?[]:null,r=new gs(i),o=new gs(e);for(let a=!1;;){if(r.done&&o.done)return s?it.createSet(n,s):ci.create(n);if(r.ins==0)gt(n,r.len,0,a),r.next();else if(o.len==0&&!o.done)gt(n,0,o.ins,a),s&&Fi(s,n,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(r.len2,o.len),h=n.length;if(r.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;gt(n,c,u,a),s&&u&&Fi(s,n,o.text)}else o.ins==-1?(gt(n,r.off?0:r.len,c,a),s&&Fi(s,n,r.textBit(c))):(gt(n,r.off?0:r.len,o.off?0:o.ins,a),s&&!o.off&&Fi(s,n,o.text));a=(r.ins>c||o.ins>=0&&o.len>c)&&(a||n.length>h),r.forward2(c),o.forward(c)}}}}class gs{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Ae.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Ae.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class un{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new un(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return j.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return j.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return j.range(e.anchor,e.head)}static create(e,t,n){return new un(e,t,n)}}class j{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:j.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new j([this.main],0)}addRange(e,t=!0){return j.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,j.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new j(e.ranges.map(t=>un.fromJSON(t)),e.main)}static single(e,t=e){return new j([j.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=n:r.from<n)return j.normalized(e.slice(),t);n=r.to}return new j(e,t)}static cursor(e,t=0,n,s){return un.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let r=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?un.create(t,e,48|r):un.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let a=o.from,c=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?j.range(c,a):j.range(a,c))}}return new j(e,t)}}function mf(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ul=0;class ce{constructor(e,t,n,s,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=Ul++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new ce(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Fl),!!e.static,e.enables)}of(e){return new Pr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Pr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Pr(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function Fl(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class Pr{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=Ul++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,a=this.type==2,c=!1,h=!1,u=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,d){if(c&&d.docChanged||h&&(d.docChanged||d.selection)||jl(f,u)){let m=n(f);if(a?!gf(m,f.values[o],s):!s(m,f.values[o]))return f.values[o]=m,1}return 0},reconfigure:(f,d)=>{let m,b=d.config.address[r];if(b!=null){let w=$r(d,b);if(this.dependencies.every(g=>g instanceof ce?d.facet(g)===f.facet(g):g instanceof rt?d.field(g,!1)==f.field(g,!1):!0)||(a?gf(m=n(f),w,s):s(m=n(f),w)))return f.values[o]=w,0}else m=n(f);return f.values[o]=m,1}}}}function gf(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function jl(i,e){let t=!1;for(let n of e)bs(i,n)&1&&(t=!0);return t}function X1(i,e,t){let n=t.map(c=>i[c.id]),s=t.map(c=>c.type),r=n.filter(c=>!(c&1)),o=i[e.id]>>1;function a(c){let h=[];for(let u=0;u<n.length;u++){let f=$r(c,n[u]);if(s[u]==2)for(let d of f)h.push(d);else h.push(f)}return e.combine(h)}return{create(c){for(let h of n)bs(c,h);return c.values[o]=a(c),1},update(c,h){if(!jl(c,r))return 0;let u=a(c);return e.compare(u,c.values[o])?0:(c.values[o]=u,1)},reconfigure(c,h){let u=jl(c,n),f=h.config.facets[e.id],d=h.facet(e);if(f&&!u&&Fl(t,f))return c.values[o]=d,0;let m=a(c);return e.compare(m,d)?(c.values[o]=d,0):(c.values[o]=m,1)}}}const Tr=ce.define({static:!0});class rt{constructor(e,t,n,s,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new rt(Ul++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Tr).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let r=n.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(n.values[t]=o,1)},reconfigure:(n,s)=>{let r=n.facet(Tr),o=s.facet(Tr),a;return(a=r.find(c=>c.field==this))&&a!=o.find(c=>c.field==this)?(n.values[t]=a.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,Tr.of({field:this,create:e})]}get extension(){return this}}const fn={lowest:4,low:3,default:2,high:1,highest:0};function Os(i){return e=>new Of(e,i)}const ji={highest:Os(fn.highest),high:Os(fn.high),default:Os(fn.default),low:Os(fn.low),lowest:Os(fn.lowest)};class Of{constructor(e,t){this.inner=e,this.prec=t}}class _s{of(e){return new ql(this,e)}reconfigure(e){return _s.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ql{constructor(e,t){this.compartment=e,this.inner=t}}class Er{constructor(e,t,n,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let s=[],r=Object.create(null),o=new Map;for(let d of W1(e,t,o))d instanceof rt?s.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let a=Object.create(null),c=[],h=[];for(let d of s)a[d.id]=h.length<<1,h.push(m=>d.slot(m));let u=n==null?void 0:n.config.facets;for(let d in r){let m=r[d],b=m[0].facet,w=u&&u[d]||[];if(m.every(g=>g.type==0))if(a[b.id]=c.length<<1|1,Fl(w,m))c.push(n.facet(b));else{let g=b.combine(m.map(p=>p.value));c.push(n&&b.compare(g,n.facet(b))?n.facet(b):g)}else{for(let g of m)g.type==0?(a[g.id]=c.length<<1|1,c.push(g.value)):(a[g.id]=h.length<<1,h.push(p=>g.dynamicSlot(p)));a[b.id]=h.length<<1,h.push(g=>X1(g,b,m))}}let f=h.map(d=>d(a));return new Er(e,o,f,a,c,r)}}function W1(i,e,t){let n=[[],[],[],[],[]],s=new Map;function r(o,a){let c=s.get(o);if(c!=null){if(c<=a)return;let h=n[c].indexOf(o);h>-1&&n[c].splice(h,1),o instanceof ql&&t.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let h of o)r(h,a);else if(o instanceof ql){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,a)}else if(o instanceof Of)r(o.inner,o.prec);else if(o instanceof rt)n[a].push(o),o.provides&&r(o.provides,a);else if(o instanceof Pr)n[a].push(o),o.facet.extensions&&r(o.facet.extensions,fn.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,a)}}return r(i,fn.default),n.reduce((o,a)=>o.concat(a))}function bs(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function $r(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const _f=ce.define(),Xl=ce.define({combine:i=>i.some(e=>e),static:!0}),bf=ce.define({combine:i=>i.length?i[0]:void 0,static:!0}),yf=ce.define(),wf=ce.define(),kf=ce.define(),xf=ce.define({combine:i=>i.length?i[0]:!1});class Ai{constructor(e,t){this.type=e,this.value=t}static define(){return new Y1}}class Y1{of(e){return new Ai(this,e)}}class z1{constructor(e){this.map=e}of(e){return new we(this,e)}}class we{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new we(this.type,t)}is(e){return this.type==e}static define(e={}){return new z1(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let r=s.map(t);r&&n.push(r)}return n}}we.reconfigure=we.define(),we.appendConfig=we.define();class Ke{constructor(e,t,n,s,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&mf(n,t.newLength),r.some(a=>a.type==Ke.time)||(this.annotations=r.concat(Ke.time.of(Date.now())))}static create(e,t,n,s,r,o){return new Ke(e,t,n,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Ke.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Ke.time=Ai.define(),Ke.userEvent=Ai.define(),Ke.addToHistory=Ai.define(),Ke.remote=Ai.define();function G1(i,e){let t=[];for(let n=0,s=0;;){let r,o;if(n<i.length&&(s==e.length||e[s]>=i[n]))r=i[n++],o=i[n++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Sf(i,e,t){var n;let s,r,o;return t?(s=e.changes,r=it.empty(e.changes.length),o=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),r=i.changes.mapDesc(e.changes,!0),o=i.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:we.mapEffects(i.effects,s).concat(we.mapEffects(e.effects,r)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function Wl(i,e,t){let n=e.selection,s=Vn(e.annotations);return e.userEvent&&(s=s.concat(Ke.userEvent.of(e.userEvent))),{changes:e.changes instanceof it?e.changes:it.of(e.changes||[],t,i.facet(bf)),selection:n&&(n instanceof j?n:j.single(n.anchor,n.head)),effects:Vn(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function Cf(i,e,t){let n=Wl(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;n=Sf(n,Wl(i,e[r],o?n.changes.newLength:i.doc.length),o)}let s=Ke.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return K1(t?H1(s):s)}function H1(i){let e=i.startState,t=!0;for(let s of e.facet(yf)){let r=s(i);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:G1(t,r))}if(t!==!0){let s,r;if(t===!1)r=i.changes.invertedDesc,s=it.empty(e.doc.length);else{let o=i.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}i=Ke.create(e,s,i.selection&&i.selection.map(r),we.mapEffects(i.effects,r),i.annotations,i.scrollIntoView)}let n=e.facet(wf);for(let s=n.length-1;s>=0;s--){let r=n[s](i);r instanceof Ke?i=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Ke?i=r[0]:i=Cf(e,Vn(r),!1)}return i}function K1(i){let e=i.startState,t=e.facet(kf),n=i;for(let s=t.length-1;s>=0;s--){let r=t[s](i);r&&Object.keys(r).length&&(n=Sf(n,Wl(e,r,i.changes.newLength),!0))}return n==i?i:Ke.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const J1=[];function Vn(i){return i==null?J1:Array.isArray(i)?i:[i]}var je=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(je||(je={}));const ew=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Yl;try{Yl=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function tw(i){if(Yl)return Yl.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||ew.test(t)))return!0}return!1}function iw(i){return e=>{if(!/\S/.test(e))return je.Space;if(tw(e))return je.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return je.Word;return je.Other}}class Se{constructor(e,t,n,s,r,o){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)bs(this,a<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return bs(this,n),$r(this,n)}update(...e){return Cf(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let a of e.effects)a.is(_s.reconfigure)?(t&&(s=new Map,t.compartments.forEach((c,h)=>s.set(h,c)),t=null),s.set(a.value.compartment,a.value.extension)):a.is(we.reconfigure)?(t=null,n=a.value):a.is(we.appendConfig)&&(t=null,n=Vn(n).concat(a.value));let r;t?r=e.startState.values.slice():(t=Er.resolve(n,s,this),r=new Se(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(Xl)?e.newSelection:e.newSelection.asSingle();new Se(t,e.newDoc,o,r,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:j.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),r=[n.range],o=Vn(n.effects);for(let a=1;a<t.ranges.length;a++){let c=e(t.ranges[a]),h=this.changes(c.changes),u=h.map(s);for(let d=0;d<a;d++)r[d]=r[d].map(u);let f=s.mapDesc(h,!0);r.push(c.range.map(f)),s=s.compose(u),o=we.mapEffects(o,u).concat(we.mapEffects(Vn(c.effects),f))}return{changes:s,selection:j.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof it?e:it.of(e,this.doc.length,this.facet(Se.lineSeparator))}toText(e){return Ae.of(e.split(this.facet(Se.lineSeparator)||vl))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(bs(this,t),$r(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof rt&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let r in n)if(Object.prototype.hasOwnProperty.call(e,r)){let o=n[r],a=e[r];s.push(o.init(c=>o.spec.fromJSON(a,c)))}}return Se.create({doc:e.doc,selection:j.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Er.resolve(e.extensions||[],new Map),n=e.doc instanceof Ae?e.doc:Ae.of((e.doc||"").split(t.staticFacet(Se.lineSeparator)||vl)),s=e.selection?e.selection instanceof j?e.selection:j.single(e.selection.anchor,e.selection.head):j.single(0);return mf(s,n.length),t.staticFacet(Xl)||(s=s.asSingle()),new Se(t,n,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Se.tabSize)}get lineBreak(){return this.facet(Se.lineSeparator)||`
25
- `}get readOnly(){return this.facet(xf)}phrase(e,...t){for(let n of this.facet(Se.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?n:t[r-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let r of this.facet(_f))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return iw(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let c=ut(t,o,!1);if(r(t.slice(c,o))!=je.Word)break;o=c}for(;a<s;){let c=ut(t,a);if(r(t.slice(a,c))!=je.Word)break;a=c}return o==a?null:j.range(o+n,a+n)}}Se.allowMultipleSelections=Xl,Se.tabSize=ce.define({combine:i=>i.length?i[0]:4}),Se.lineSeparator=bf,Se.readOnly=xf,Se.phrases=ce.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}}),Se.languageData=_f,Se.changeFilter=yf,Se.transactionFilter=wf,Se.transactionExtender=kf,_s.reconfigure=we.define();function hi(i,e,t={}){let n={};for(let s of i)for(let r of Object.keys(s)){let o=s[r],a=n[r];if(a===void 0)n[r]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,r))n[r]=t[r](a,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class dn{eq(e){return this==e}range(e,t=e){return zl.create(e,t,this)}}dn.prototype.startSide=dn.prototype.endSide=0,dn.prototype.point=!1,dn.prototype.mapMode=ft.TrackDel;let zl=class HO{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new HO(e,t,n)}};function Gl(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class Hl{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let r=n?this.to:this.from;for(let o=s,a=r.length;;){if(o==a)return o;let c=o+a>>1,h=r[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return h>=0?o:a;h>=0?a=c:o=c+1}}between(e,t,n,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let n=[],s=[],r=[],o=-1,a=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],u=this.from[c]+e,f=this.to[c]+e,d,m;if(u==f){let b=t.mapPos(u,h.startSide,h.mapMode);if(b==null||(d=m=b,h.startSide!=h.endSide&&(m=t.mapPos(u,h.endSide),m<d)))continue}else if(d=t.mapPos(u,h.startSide),m=t.mapPos(f,h.endSide),d>m||d==m&&h.startSide>0&&h.endSide<=0)continue;(m-d||h.endSide-h.startSide)<0||(o<0&&(o=d),h.point&&(a=Math.max(a,m-d)),n.push(h),s.push(d-o),r.push(m-o))}return{mapped:n.length?new Hl(s,r,n,a):null,pos:o}}}class Ee{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new Ee(e,t,n,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(Gl)),this.isEmpty)return t.length?Ee.of(t):this;let a=new Qf(this,null,-1).goto(0),c=0,h=[],u=new Qi;for(;a.value||c<t.length;)if(c<t.length&&(a.from-t[c].from||a.startSide-t[c].value.startSide)>=0){let f=t[c++];u.addInner(f.from,f.to,f.value)||h.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(a.chunkIndex)<t[c].from)&&(!o||s>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||s>a.to||r<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||h.push(zl.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!h.length?Ee.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(a,a+c.length);if(h===!1)s=Math.max(s,c.maxPoint),t.push(c),n.push(e.mapPos(a));else if(h===!0){let{mapped:u,pos:f}=c.map(a,e);u&&(s=Math.max(s,u.maxPoint),t.push(u),n.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Ee(n,t,r||Ee.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return ys.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ys.from(e).goto(t)}static compare(e,t,n,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),c=Af(o,a,n),h=new ws(o,c,r),u=new ws(a,c,r);n.iterGaps((f,d,m)=>Pf(h,f,u,d,m,s)),n.empty&&n.length==0&&Pf(h,0,u,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let r=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let a=Af(r,o),c=new ws(r,a,0).goto(n),h=new ws(o,a,0).goto(n);for(;;){if(c.to!=h.to||!Jl(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>s)return!0;c.next(),h.next()}}static spans(e,t,n,s,r=-1){let o=new ws(e,null,r).goto(t),a=t,c=o.openStart;for(;;){let h=Math.min(o.to,n);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,c);s.point(a,h,o.point,u,f,o.pointRank),c=Math.min(o.openEnd(h),u.length)}else h>a&&(s.span(a,h,o.active,c),c=o.openEnd(h));if(o.to>n)return c+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Qi;for(let s of e instanceof zl?[e]:t?nw(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return Ee.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=Ee.empty;s=s.nextLayer)t=new Ee(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}Ee.empty=new Ee([],[],null,-1);function nw(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(Gl(e,n)>0)return i.slice().sort(Gl);e=n}return i}Ee.empty.nextLayer=Ee.empty;class Qi{finishChunk(e){this.chunks.push(new Hl(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Qi)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Ee.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Ee.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Af(i,e,t){let n=new Map;for(let r of i)for(let o=0;o<r.chunk.length;o++)r.chunk[o].maxPoint<=0&&n.set(r.chunk[o],r.chunkPos[o]);let s=new Set;for(let r of e)for(let o=0;o<r.chunk.length;o++){let a=n.get(r.chunk[o]);a!=null&&(t?t.mapPos(a):a)==r.chunkPos[o]&&!(t!=null&&t.touchesRange(a,a+r.chunk[o].length))&&s.add(r.chunk[o])}return s}class Qf{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class ys{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&s.push(new Qf(o,t,n,r));return s.length==1?s[0]:new ys(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kl(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kl(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Kl(this.heap,0)}}}function Kl(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class ws{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ys.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Nr(this.active,e),Nr(this.activeTo,e),Nr(this.activeRank,e),this.minActive=Tf(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||s-this.activeTo[t])>0;)t++;Rr(this.active,t,n),Rr(this.activeTo,t,s),Rr(this.activeRank,t,r),e&&Rr(e,t,this.cursor.from),this.minActive=Tf(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),n&&Nr(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Pf(i,e,t,n,s,r){i.goto(e),t.goto(n);let o=n+s,a=n,c=n-e;for(;;){let h=i.to+c-t.to,u=h||i.endSide-t.endSide,f=u<0?i.to+c:t.to,d=Math.min(f,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Jl(i.activeForPoint(i.to),t.activeForPoint(t.to))||r.comparePoint(a,d,i.point,t.point):d>a&&!Jl(i.active,t.active)&&r.compareRange(a,d,i.active,t.active),f>o)break;(h||i.openEnd!=t.openEnd)&&r.boundChange&&r.boundChange(f),a=f,u<=0&&i.next(),u>=0&&t.next()}}function Jl(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!i[t].eq(e[t]))return!1;return!0}function Nr(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function Rr(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function Tf(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function Ln(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=ut(i,s));return n}function ea(i,e,t,n){for(let s=0,r=0;;){if(r>=e)return s;if(s==i.length)break;r+=i.charCodeAt(s)==9?t-r%t:1,s=ut(i,s)}return n===!0?-1:i.length}const ta="ͼ",Ef=typeof Symbol>"u"?"__"+ta:Symbol.for(ta),ia=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),$f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qi{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,a,c,h){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return c.push(o[0]+";");for(let m in a){let b=a[m];if(/&/.test(m))r(m.split(/,\s*/).map(w=>o.map(g=>w.replace(/&/,g))).reduce((w,g)=>w.concat(g)),b,c);else if(b&&typeof b=="object"){if(!f)throw new RangeError("The value of a property ("+m+") should be a primitive value.");r(s(m),b,u,d)}else b!=null&&u.push(m.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+b+";")}(u.length||d)&&c.push((n&&!f&&!h?o.map(n):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
26
- `)}static newName(){let e=$f[Ef]||1;return $f[Ef]=e+1,ta+e.toString(36)}static mount(e,t,n){let s=e[ia],r=n&&n.nonce;s?r&&s.setNonce(r):s=new sw(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let Nf=new Map;class sw{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Nf.get(n);if(r)return e[ia]=r;this.sheet=new s.CSSStyleSheet,Nf.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[ia]=this}mount(e,t){let n=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let a=e[o],c=this.modules.indexOf(a);if(c<r&&c>-1&&(this.modules.splice(c,1),r--,c=-1),c==-1){if(this.modules.splice(r++,0,a),n)for(let h=0;h<a.rules.length;h++)n.insertRule(a.rules[h],s++)}else{for(;r<c;)s+=this.modules[r++].rules.length;s+=a.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
27
- `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Xi={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:"'"},ks={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rw=typeof navigator<"u"&&/Mac/.test(navigator.platform),ow=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),dt=0;dt<10;dt++)Xi[48+dt]=Xi[96+dt]=String(dt);for(var dt=1;dt<=24;dt++)Xi[dt+111]="F"+dt;for(var dt=65;dt<=90;dt++)Xi[dt]=String.fromCharCode(dt+32),ks[dt]=String.fromCharCode(dt);for(var na in Xi)ks.hasOwnProperty(na)||(ks[na]=Xi[na]);function lw(i){var e=rw&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||ow&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?ks:Xi)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function xs(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function sa(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function Vr(i,e){if(!e.anchorNode)return!1;try{return sa(i,e.anchorNode)}catch{return!1}}function Mn(i){return i.nodeType==3?mn(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function Ss(i,e,t,n){return t?Rf(i,e,t,n,-1)||Rf(i,e,t,n,1):!1}function pn(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function Lr(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Rf(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:ui(i))){if(i.nodeName=="DIV")return!1;let r=i.parentNode;if(!r||r.nodeType!=1)return!1;e=pn(i)+(s<0?0:1),i=r}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?ui(i):0}else return!1}}function ui(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function Cs(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function aw(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function Vf(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function cw(i,e,t,n,s,r,o,a){let c=i.ownerDocument,h=c.defaultView||window;for(let u=i,f=!1;u&&!f;)if(u.nodeType==1){let d,m=u==c.body,b=1,w=1;if(m)d=aw(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:b,scaleY:w}=Vf(u,O)),d={left:O.left,right:O.left+u.clientWidth*b,top:O.top,bottom:O.top+u.clientHeight*w}}let g=0,p=0;if(s=="nearest")e.top<d.top?(p=-(d.top-e.top+o),t>0&&e.bottom>d.bottom+p&&(p=e.bottom-d.bottom+p+o)):e.bottom>d.bottom&&(p=e.bottom-d.bottom+o,t<0&&e.top-p<d.top&&(p=-(d.top+p-e.top+o)));else{let O=e.bottom-e.top,C=d.bottom-d.top;p=(s=="center"&&O<=C?e.top+O/2-C/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-C+o)-d.top}if(n=="nearest"?e.left<d.left?(g=-(d.left-e.left+r),t>0&&e.right>d.right+g&&(g=e.right-d.right+g+r)):e.right>d.right&&(g=e.right-d.right+r,t<0&&e.left<d.left+g&&(g=-(d.left+g-e.left+r))):g=(n=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:n=="start"==a?e.left-r:e.right-(d.right-d.left)+r)-d.left,g||p)if(m)h.scrollBy(g,p);else{let O=0,C=0;if(p){let y=u.scrollTop;u.scrollTop+=p/w,C=(u.scrollTop-y)*w}if(g){let y=u.scrollLeft;u.scrollLeft+=g/b,O=(u.scrollLeft-y)*b}e={left:e.left-O,top:e.top-C,right:e.right-O,bottom:e.bottom-C},O&&Math.abs(O-g)<1&&(n="nearest"),C&&Math.abs(C-p)<1&&(s="nearest")}if(m)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function hw(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:n}}class uw{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?ui(t):0),n,Math.min(e.focusOffset,n?ui(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let Bn=null;function Lf(i){if(i.setActive)return i.setActive();if(Bn)return i.focus(Bn);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(Bn==null?{get preventScroll(){return Bn={preventScroll:!0},!0}}:void 0),!Bn){Bn=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],r=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=r&&(n.scrollLeft=r)}}}let Mf;function mn(i,e,t=e){let n=Mf||(Mf=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function Dn(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let r=new KeyboardEvent("keydown",s);r.synthetic=!0,i.dispatchEvent(r);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,i.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function fw(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function Bf(i){for(;i.attributes.length;)i.removeAttributeNode(i.attributes[0])}function dw(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,ui(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=ui(t))}else{if(t==i)return!0;n=pn(t),t=t.parentNode}}function Df(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function vf(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=ui(t)}else if(t.parentNode&&!Lr(t))n=pn(t),t=t.parentNode;else return null}}function Zf(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!Lr(t))n=pn(t)+1,t=t.parentNode;else return null}}class Ot{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Ot(e.parentNode,pn(e),t)}static after(e,t){return new Ot(e.parentNode,pn(e)+1,t)}}const ra=[];class Be{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,s=null,r;for(let o of this.children){if(o.flags&7){if(!o.dom&&(r=s?s.nextSibling:n.firstChild)){let a=Be.get(r);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(e,t),o.flags&=-8}if(r=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=If(r);else n.insertBefore(o.dom,r);s=o.dom}for(r=s?s.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=If(r)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let s=ui(e)==0?0:t==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;s==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?s=-1:s=1),e=r}s<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Be.get(n);)n=n.nextSibling;if(!n)return this.length;for(let s=0,r=0;;s++){let o=this.children[s];if(o.dom==n)return r;r+=o.length+o.breakAfter}}domBoundsAround(e,t,n=0){let s=-1,r=-1,o=-1,a=-1;for(let c=0,h=n,u=n;c<this.children.length;c++){let f=this.children[c],d=h+f.length;if(h<e&&d>t)return f.domBoundsAround(e,t,h);if(d>=e&&s==-1&&(s=c,r=h),h>t&&f.dom.parentNode==this.dom){o=c,a=u;break}u=d,h=d+f.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=ra){this.markDirty();for(let s=e;s<t;s++){let r=this.children[s];r.parent==this&&n.indexOf(r)<0&&r.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let s=0;s<n.length;s++)n[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Uf(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,s,r,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Be.prototype.breakAfter=0;function If(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class Uf{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Ff(i,e,t,n,s,r,o,a,c){let{children:h}=i,u=h.length?h[e]:null,f=r.length?r[r.length-1]:null,d=f?f.breakAfter:o;if(!(e==n&&u&&!o&&!d&&r.length<2&&u.merge(t,s,r.length?f:null,t==0,a,c))){if(n<h.length){let m=h[n];m&&(s<m.length||m.breakAfter&&(f!=null&&f.breakAfter))?(e==n&&(m=m.split(s),s=0),!d&&f&&m.merge(0,s,f,!0,0,c)?r[r.length-1]=m:((s||m.children.length&&!m.children[0].length)&&m.merge(0,s,null,!1,0,c),r.push(m))):m!=null&&m.breakAfter&&(f?f.breakAfter=1:o=1),n++}for(u&&(u.breakAfter=o,t>0&&(!o&&r.length&&u.merge(t,u.length,r[0],!1,a,0)?u.breakAfter=r.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,a,0),e++));e<n&&r.length;)if(h[n-1].become(r[r.length-1]))n--,r.pop(),c=r.length?0:a;else if(h[e].become(r[0]))e++,r.shift(),a=r.length?0:c;else break;!r.length&&e&&n<h.length&&!h[e-1].breakAfter&&h[n].merge(0,0,h[e-1],!1,a,c)&&e--,(e<n||r.length)&&i.replaceChildren(e,n,r)}}function jf(i,e,t,n,s,r){let o=i.childCursor(),{i:a,off:c}=o.findPos(t,1),{i:h,off:u}=o.findPos(e,-1),f=e-t;for(let d of n)f+=d.length;i.length+=f,Ff(i,h,u,a,c,n,0,s,r)}let At=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},oa=typeof document<"u"?document:{documentElement:{style:{}}};const la=/Edge\/(\d+)/.exec(At.userAgent),qf=/MSIE \d/.test(At.userAgent),aa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(At.userAgent),Mr=!!(qf||aa||la),Xf=!Mr&&/gecko\/(\d+)/i.test(At.userAgent),ca=!Mr&&/Chrome\/(\d+)/.exec(At.userAgent),Wf="webkitFontSmoothing"in oa.documentElement.style,Yf=!Mr&&/Apple Computer/.test(At.vendor),zf=Yf&&(/Mobile\/\w+/.test(At.userAgent)||At.maxTouchPoints>2);var le={mac:zf||/Mac/.test(At.platform),windows:/Win/.test(At.platform),linux:/Linux|X11/.test(At.platform),ie:Mr,ie_version:qf?oa.documentMode||6:aa?+aa[1]:la?+la[1]:0,gecko:Xf,gecko_version:Xf?+(/Firefox\/(\d+)/.exec(At.userAgent)||[0,0])[1]:0,chrome:!!ca,chrome_version:ca?+ca[1]:0,ios:zf,android:/Android\b/.test(At.userAgent),webkit:Wf,safari:Yf,webkit_version:Wf?+(/\bAppleWebKit\/(\d+)/.exec(At.userAgent)||[0,0])[1]:0,tabSize:oa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const pw=256;class Ht extends Be{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Ht)||this.length-(t-e)+n.length>pw||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Ht(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Ot(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return mw(this.dom,e,t)}}class Pi extends Be{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let s of t)s.setParent(this)}setAttrs(e){if(Bf(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,s,r,o){return n&&(!(n instanceof Pi&&n.mark.eq(this.mark))||e&&r<=0||t<this.length&&o<=0)?!1:(jf(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,s=-1,r=0;for(let a of this.children){let c=n+a.length;c>e&&t.push(n<e?a.split(e-n):a),s<0&&n>=e&&(s=r),n=c,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Pi(this.mark,t,o)}domAtPos(e){return Gf(this,e)}coordsAt(e,t){return Kf(this,e,t)}}function mw(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;e==0&&t<0||e==n&&t>=0?le.chrome||le.gecko||(e?(s--,o=1):r<n&&(r++,o=-1)):t<0?s--:r<n&&r++;let a=mn(i,s,r).getClientRects();if(!a.length)return null;let c=a[(o?o<0:t>=0)?0:a.length-1];return le.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(a,h=>h.width)||c),o?Cs(c,o<0):c||null}class Wi extends Be{static create(e,t,n){return new Wi(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Wi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,s,r,o){return n&&(!(n instanceof Wi)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Wi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ae.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,s=this.posAtStart;return n?n.slice(s,s+this.length):Ae.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;r=s[a],!(e>0?a==0:a==s.length-1||r.top<r.bottom);a+=o?-1:1);return Cs(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class vn extends Be{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof vn&&e.side==this.side}split(){return new vn(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Ot.before(this.dom):Ot.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ae.empty}get isHidden(){return!0}}Ht.prototype.children=Wi.prototype.children=vn.prototype.children=ra;function Gf(i,e){let t=i.dom,{children:n}=i,s=0;for(let r=0;s<n.length;s++){let o=n[s],a=r+o.length;if(!(a==r&&o.getSide()<=0)){if(e>r&&e<a&&o.dom.parentNode==t)return o.domAtPos(e-r);if(e<=r)break;r=a}}for(let r=s;r>0;r--){let o=n[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r<n.length;r++){let o=n[r];if(o.dom.parentNode==t)return o.domAtPos(0)}return new Ot(t,0)}function Hf(i,e,t){let n,{children:s}=i;t>0&&e instanceof Pi&&s.length&&(n=s[s.length-1])instanceof Pi&&n.mark.eq(e.mark)?Hf(n,e.children[0],t-1):(s.push(e),e.setParent(i)),i.length+=e.length}function Kf(i,e,t){let n=null,s=-1,r=null,o=-1;function a(h,u){for(let f=0,d=0;f<h.children.length&&d<=u;f++){let m=h.children[f],b=d+m.length;b>=u&&(m.children.length?a(m,u-d):(!r||r.isHidden&&t>0)&&(b>u||d==b&&m.getSide()>0)?(r=m,o=u-d):(d<u||d==b&&m.getSide()<0&&!m.isHidden)&&(n=m,s=u-d)),d=b}}a(i,e);let c=(t<0?n:r)||n||r;return c?c.coordsAt(Math.max(0,c==n?s:o),t):gw(i)}function gw(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=Mn(e);return t[t.length-1]||null}function ha(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const Jf=Object.create(null);function Br(i,e,t){if(i==e)return!0;i||(i=Jf),e||(e=Jf);let n=Object.keys(i),s=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of n)if(r!=t&&(s.indexOf(r)==-1||i[r]!==e[r]))return!1;return!0}function ua(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function Ow(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class fi{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var wt=function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i}(wt||(wt={}));class de extends dn{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new As(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Yi(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:r,end:o}=ed(e,t);n=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Yi(e,n,s,t,e.widget||null,!0)}static line(e){return new Qs(e)}static set(e,t=!1){return Ee.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}de.none=Ee.empty;class As extends de{constructor(e){let{start:t,end:n}=ed(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof As&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Br(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}As.prototype.point=!1;class Qs extends de{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Qs&&this.spec.class==e.spec.class&&Br(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Qs.prototype.mapMode=ft.TrackBefore,Qs.prototype.point=!0;class Yi extends de{constructor(e,t,n,s,r,o){super(t,n,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ft.TrackBefore:ft.TrackAfter:ft.TrackDel}get type(){return this.startSide!=this.endSide?wt.WidgetRange:this.startSide<=0?wt.WidgetBefore:wt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Yi&&_w(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Yi.prototype.point=!0;function ed(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function _w(i,e){return i==e||!!(i&&e&&i.compare(e))}function Dr(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class Je extends Be{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,r,o){if(n){if(!(n instanceof Je))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),jf(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new Je;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:s}=this.childPos(e);s&&(t.append(this.children[n].split(s),0),this.children[n].merge(s,this.children[n].length,null,!1,0,0),n++);for(let r=n;r<this.children.length;r++)t.append(this.children[r],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Br(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Hf(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=ha(t,this.attrs||{})),n&&(this.attrs=ha({class:n},this.attrs||{}))}domAtPos(e){return Gf(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(Bf(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(ua(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&Be.get(s)instanceof Pi;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((n=Be.get(s))===null||n===void 0?void 0:n.isEditable)==!1&&(!le.ios||!this.children.some(r=>r instanceof Ht))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Ht)||/[^ -~]/.test(n.text))return null;let s=Mn(n.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=Kf(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=n.bottom-n.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight<r){let o=(r-s.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}become(e){return e instanceof Je&&this.children.length==0&&e.children.length==0&&Br(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,s=0;n<e.children.length;n++){let r=e.children[n],o=s+r.length;if(o>=t){if(r instanceof Je)return r;if(o>t)break}s=o+r.breakAfter}return null}}class Ti extends Be{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,r,o){return n&&(!(n instanceof Ti)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Ti(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return ra}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ae.empty}domBoundsAround(){return null}become(e){return e instanceof Ti&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof fa?null:Cs(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class fa extends fi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ps{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ti&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Je),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(vr(new vn(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Ti)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(vr(new Ht(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Yi){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof Yi)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ti(n.widget||Zn.block,a,n));else{let c=Wi.create(n.widget||Zn.inline,a,a?0:n.startSide),h=this.atCursorPos&&!c.isEditable&&r<=s.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||r>s.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(vr(new vn(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(vr(c,s),r),this.atCursorPos=u,this.pendingBuffer=u?e<t||r>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,s,r){let o=new Ps(e,t,n,r);return o.openEnd=Ee.spans(s,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function vr(i,e){for(let t of e)i=new Pi(t,[i],i.length);return i}class Zn extends fi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Zn.inline=new Zn("span"),Zn.block=new Zn("div");var Ze=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Ze||(Ze={}));const gn=Ze.LTR,da=Ze.RTL;function td(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const bw=td("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),yw=td("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),pa=Object.create(null),di=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);pa[e]=t,pa[t]=-e}function id(i){return i<=247?bw[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?yw[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const ww=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class zi{get dir(){return this.level%2?da:gn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let r=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(r<0||(s!=0?s<0?a.from<t:a.to>t:e[r].level>a.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function nd(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!nd(n.inner,s.inner))return!1}return!0}const De=[];function kw(i,e,t,n,s){for(let r=0;r<=n.length;r++){let o=r?n[r-1].to:e,a=r<n.length?n[r].from:t,c=r?256:s;for(let h=o,u=c,f=c;h<a;h++){let d=id(i.charCodeAt(h));d==512?d=u:d==8&&f==4&&(d=16),De[h]=d==4?2:d,d&7&&(f=d),u=d}for(let h=o,u=c,f=c;h<a;h++){let d=De[h];if(d==128)h<a-1&&u==De[h+1]&&u&24?d=De[h]=u:De[h]=256;else if(d==64){let m=h+1;for(;m<a&&De[m]==64;)m++;let b=h&&u==8||m<t&&De[m]==8?f==1?1:8:256;for(let w=h;w<m;w++)De[w]=b;h=m-1}else d==8&&f==1&&(De[h]=1);u=d,d&7&&(f=d)}}}function xw(i,e,t,n,s){let r=s==1?2:1;for(let o=0,a=0,c=0;o<=n.length;o++){let h=o?n[o-1].to:e,u=o<n.length?n[o].from:t;for(let f=h,d,m,b;f<u;f++)if(m=pa[d=i.charCodeAt(f)])if(m<0){for(let w=a-3;w>=0;w-=3)if(di[w+1]==-m){let g=di[w+2],p=g&2?s:g&4?g&1?r:s:0;p&&(De[f]=De[di[w]]=p),a=w;break}}else{if(di.length==189)break;di[a++]=f,di[a++]=d,di[a++]=c}else if((b=De[f])==2||b==1){let w=b==s;c=w?0:1;for(let g=a-3;g>=0;g-=3){let p=di[g+2];if(p&2)break;if(w)di[g+2]|=2;else{if(p&4)break;di[g+2]|=4}}}}}function Sw(i,e,t,n){for(let s=0,r=n;s<=t.length;s++){let o=s?t[s-1].to:i,a=s<t.length?t[s].from:e;for(let c=o;c<a;){let h=De[c];if(h==256){let u=c+1;for(;;)if(u==a){if(s==t.length)break;u=t[s++].to,a=s<t.length?t[s].from:e}else if(De[u]==256)u++;else break;let f=r==1,d=(u<e?De[u]:n)==1,m=f==d?f?1:2:n;for(let b=u,w=s,g=w?t[w-1].to:i;b>c;)b==g&&(b=t[--w].from,g=w?t[w-1].to:i),De[--b]=m;c=u}else r=h,c++}}}function ma(i,e,t,n,s,r,o){let a=n%2?2:1;if(n%2==s%2)for(let c=e,h=0;c<t;){let u=!0,f=!1;if(h==r.length||c<r[h].from){let w=De[c];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h<r.length&&b==r[h].from){if(f)break e;let w=r[h];if(!u)for(let g=w.to,p=h+1;;){if(g==t)break e;if(p<r.length&&r[p].from==g)g=r[p++].to;else{if(De[g]==a)break e;break}}if(h++,d)d.push(w);else{w.from>c&&o.push(new zi(c,w.from,m));let g=w.direction==gn!=!(m%2);ga(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.to}b=w.to}else{if(b==t||(u?De[b]!=a:De[b]==a))break;b++}d?ma(i,c,b,n+1,s,d,o):c<b&&o.push(new zi(c,b,m)),c=b}else for(let c=t,h=r.length;c>e;){let u=!0,f=!1;if(!h||c>r[h-1].to){let w=De[c-1];w!=a&&(u=!1,f=w==16)}let d=!u&&a==1?[]:null,m=u?n:n+1,b=c;e:for(;;)if(h&&b==r[h-1].to){if(f)break e;let w=r[--h];if(!u)for(let g=w.from,p=h;;){if(g==e)break e;if(p&&r[p-1].to==g)g=r[--p].from;else{if(De[g-1]==a)break e;break}}if(d)d.push(w);else{w.to<c&&o.push(new zi(w.to,c,m));let g=w.direction==gn!=!(m%2);ga(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.from}b=w.from}else{if(b==e||(u?De[b-1]!=a:De[b-1]==a))break;b--}d?ma(i,b,c,n+1,s,d,o):b<c&&o.push(new zi(b,c,m)),c=b}}function ga(i,e,t,n,s,r,o){let a=e%2?2:1;kw(i,s,r,n,a),xw(i,s,r,n,a),Sw(s,r,n,a),ma(i,s,r,e,t,n,o)}function Cw(i,e,t){if(!i)return[new zi(0,0,e==da?1:0)];if(e==gn&&!t.length&&!ww.test(i))return sd(i.length);if(t.length)for(;i.length>De.length;)De[De.length]=256;let n=[],s=e==gn?0:1;return ga(i,s,s,t,0,i.length,n),n}function sd(i){return[new zi(0,i,0)]}let rd="";function Aw(i,e,t,n,s){var r;let o=n.head-i.from,a=zi.find(e,o,(r=n.bidiLevel)!==null&&r!==void 0?r:-1,n.assoc),c=e[a],h=c.side(s,t);if(o==h){let d=a+=s?1:-1;if(d<0||d>=e.length)return null;c=e[a=d],o=c.side(!s,t),h=c.side(s,t)}let u=ut(i.text,o,c.forward(s,t));(u<c.from||u>c.to)&&(u=h),rd=i.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return f&&u==h&&f.level+(s?0:1)<c.level?j.cursor(f.side(!s,t)+i.from,f.forward(s,t)?1:-1,f.level):j.cursor(u+i.from,c.forward(s,t)?-1:1,c.level)}function Qw(i,e,t){for(let n=e;n<t;n++){let s=id(i.charCodeAt(n));if(s==1)return gn;if(s==2||s==4)return da}return gn}const od=ce.define(),ld=ce.define(),ad=ce.define(),cd=ce.define(),Oa=ce.define(),hd=ce.define(),ud=ce.define(),_a=ce.define(),ba=ce.define(),fd=ce.define({combine:i=>i.some(e=>e)}),dd=ce.define({combine:i=>i.some(e=>e)}),pd=ce.define();class In{constructor(e,t="nearest",n="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new In(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new In(j.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Zr=we.define({map:(i,e)=>i.map(e)}),md=we.define();function Qt(i,e,t){let n=i.facet(cd);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ei=ce.define({combine:i=>i.length?i[0]:!0});let Pw=0;const Ts=ce.define();class Ge{constructor(e,t,n,s,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:r,decorations:o}=t||{};return new Ge(Pw++,e,n,s,a=>{let c=[Ts.of(a)];return o&&c.push(Es.of(h=>{let u=h.plugin(a);return u?o(u):de.none})),r&&c.push(r(a)),c})}static fromClass(e,t){return Ge.define(n=>new e(n),t)}}class ya{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Qt(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Qt(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Qt(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const gd=ce.define(),wa=ce.define(),Es=ce.define(),Od=ce.define(),ka=ce.define(),_d=ce.define();function bd(i,e){let t=i.state.facet(_d);if(!t.length)return t;let n=t.map(r=>r instanceof Function?r(i):r),s=[];return Ee.spans(n,e.from,e.to,{point(){},span(r,o,a,c){let h=r-e.from,u=o-e.from,f=s;for(let d=a.length-1;d>=0;d--,c--){let m=a[d].spec.bidiIsolate,b;if(m==null&&(m=Qw(e.text,h,u)),c>0&&f.length&&(b=f[f.length-1]).to==h&&b.direction==m)b.to=u,f=b.inner;else{let w={from:h,to:u,direction:m,inner:[]};f.push(w),f=w.inner}}}}),s}const yd=ce.define();function xa(i){let e=0,t=0,n=0,s=0;for(let r of i.state.facet(yd)){let o=r(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:n,bottom:s}}const $s=ce.define();class It{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new It(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,r=0,o=0,a=0;;s++){let c=s==e.length?null:e[s],h=o-a,u=c?c.fromB:1e9;for(;r<t.length&&t[r]<u;){let f=t[r],d=t[r+1],m=Math.max(a,f),b=Math.min(u,d);if(m<=b&&new It(m+h,b+h,m,b).addToSet(n),d>u)break;r+=2}if(!c)return n;new It(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),o=c.toA,a=c.toB}}}class Ir{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=it.empty(this.startState.doc.length);for(let r of n)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,a,c)=>s.push(new It(r,o,a,c))),this.changedRanges=s}static create(e,t,n){return new Ir(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class wd extends Be{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=de.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Je],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new It(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:h,toA:u})=>u<this.minWidthFrom||h>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!Lw(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Ew(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:u}=this.hasComposition;n=new It(h,u,e.changes.mapPos(h,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(le.ie||le.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),c=Rw(o,a,e.changes);return n=It.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=le.chrome||le.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Ti&&o.widget instanceof fa&&r.push(o.dom);s.updateGaps(r)}updateChildren(e,t,n){let s=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let o=s.length-1;;o--){let a=o>=0?s[o]:null;if(!a)break;let{fromA:c,toA:h,fromB:u,toB:f}=a,d,m,b,w;if(n&&n.range.fromB<f&&n.range.toB>u){let y=Ps.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),E=Ps.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);m=y.breakAtStart,b=y.openStart,w=E.openEnd;let x=this.compositionView(n);E.breakAtStart?x.breakAfter=1:E.content.length&&x.merge(x.length,x.length,E.content[0],!1,E.openStart,0)&&(x.breakAfter=E.content[0].breakAfter,E.content.shift()),y.content.length&&x.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),d=y.content.concat(x).concat(E.content)}else({content:d,breakAtStart:m,openStart:b,openEnd:w}=Ps.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:p}=r.findPos(h,1),{i:O,off:C}=r.findPos(c,-1);Ff(this,O,C,g,p,d,m,b,w)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(md)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Ht(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Pi(s,[t],t.length);let n=new Je;return n.append(t,0),n}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(o);let a=Be.get(r);a&&a!=o&&(a.dom=null),o.setDOM(r)},n=this.childPos(e.range.fromB,1),s=this.children[n.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)n=s.childPos(n.off,1),s=s.children[n.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,s=n==this.dom,r=!s&&!(this.view.state.facet(Ei)||this.dom.tabIndex>-1)&&Vr(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(le.gecko&&a.empty&&!this.hasComposition&&Tw(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=h=new Ot(f,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Ss(c.node,c.offset,u.anchorNode,u.anchorOffset)||!Ss(h.node,h.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{le.android&&le.chrome&&this.dom.contains(u.focusNode)&&Vw(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=xs(this.view.root);if(f)if(a.empty){if(le.gecko){let d=$w(c.node,c.offset);if(d&&d!=3){let m=(d==1?vf:Zf)(c.node,c.offset);m&&(c=new Ot(m.node,m.offset))}}f.collapse(c.node,c.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(h.node,h.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),d.setEnd(h.node,h.offset),d.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new Ot(u.anchorNode,u.anchorOffset),this.impreciseHead=h.precise?null:new Ot(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ss(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=xs(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=Je.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let c=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!c||!h||c.bottom>h.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(s,r)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let s=e.offset;!n&&s<t.childNodes.length;s++){let r=Be.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(0))}for(let s=e.offset-1;!n&&s>=0;s--){let r=Be.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(r.length))}return n?new Ot(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Be.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(n<s.length||s instanceof Je)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,s=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],c=r-a.breakAfter,h=c-a.length;if(c<e)break;if(h<=e&&(h<e||a.covers(-1))&&(c>e||a.covers(1))&&(!n||a instanceof Je&&!(n instanceof Je&&t>=0)))n=a,s=h;else if(n&&h==e&&c==e&&a instanceof Ti&&Math.abs(t)<2){if(a.deco.startSide<0)break;o&&(n=null)}r=h}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),s=this.children[t];if(!(s instanceof Je))return null;for(;s.children.length;){let{i:a,off:c}=s.childPos(n,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}n=c}if(!(s instanceof Ht))return null;let r=ut(s.text,n);if(r==n)return null;let o=mn(s.dom,n,r).getClientRects();for(let a=0;a<o.length;a++){let c=o[a];if(a==o.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==Ze.LTR;for(let h=0,u=0;u<this.children.length;u++){let f=this.children[u],d=h+f.length;if(d>s)break;if(h>=n){let m=f.dom.getBoundingClientRect();if(t.push(m.height),o){let b=f.dom.lastChild,w=b?Mn(b):[];if(w.length){let g=w[w.length-1],p=c?g.right-m.left:m.right-g.left;p>a&&(a=p,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=d)}}}h=d+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Ze.RTL:Ze.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Je){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Mn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Uf(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(de.replace({widget:new fa(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return de.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Es).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),n=!1,s=this.view.state.facet(Od).map((r,o)=>{let a=typeof r=="function";return a&&(n=!0),a?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(Ee.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(pd))try{if(h(this.view,e.range,e))return!0}catch(u){Qt(this.view.state,u,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let r=xa(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;cw(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Ze.LTR)}}function Tw(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function kd(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=vf(t.focusNode,t.focusOffset),s=Zf(t.focusNode,t.focusOffset),r=n||s;if(s&&n&&s.node!=n.node){let a=Be.get(s.node);if(!a||a instanceof Ht&&a.text!=s.node.nodeValue)r=s;else if(i.docView.lastCompositionAfterCursor){let c=Be.get(n.node);!c||c instanceof Ht&&c.text!=n.node.nodeValue||(r=s)}}if(i.docView.lastCompositionAfterCursor=r!=n,!r)return null;let o=e-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}function Ew(i,e,t){let n=kd(i,t);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a)||i.state.doc.sliceString(n.from,n.to)!=a)return null;let c=e.invertedDesc,h=new It(c.mapPos(r),c.mapPos(o),r,o),u=[];for(let f=s.parentNode;;f=f.parentNode){let d=Be.get(f);if(d instanceof Pi)u.push({node:f,deco:d.mark});else{if(d instanceof Je||f.nodeName=="DIV"&&f.parentNode==i.contentDOM)return{range:h,text:s,marks:u,line:f};if(f!=i.contentDOM)u.push({node:f,deco:new As({inclusive:!0,attributes:Ow(f),tagName:f.tagName.toLowerCase()})});else return null}}}function $w(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let Nw=class{constructor(){this.changes=[]}compareRange(e,t){Dr(e,t,this.changes)}comparePoint(e,t){Dr(e,t,this.changes)}boundChange(e){Dr(e,e,this.changes)}};function Rw(i,e,t){let n=new Nw;return Ee.compare(i,e,t,n),n.changes}function Vw(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function Lw(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}function Mw(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),r=e-s.from;if(s.length==0)return j.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,a=r;t<0?o=ut(s.text,r,!1):a=ut(s.text,r);let c=n(s.text.slice(o,a));for(;o>0;){let h=ut(s.text,o,!1);if(n(s.text.slice(h,o))!=c)break;o=h}for(;a<s.length;){let h=ut(s.text,a);if(n(s.text.slice(a,h))!=c)break;a=h}return j.range(o+s.from,a+s.from)}function Bw(i,e){return e.left>i?e.left-i:Math.max(0,i-e.right)}function Dw(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Sa(i,e){return i.top<e.bottom-1&&i.bottom>e.top+1}function xd(i,e){return e<i.top?{top:e,left:i.left,right:i.right,bottom:i.bottom}:i}function Sd(i,e){return e>i.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Ca(i,e,t){let n,s,r,o,a=!1,c,h,u,f;for(let b=i.firstChild;b;b=b.nextSibling){let w=Mn(b);for(let g=0;g<w.length;g++){let p=w[g];s&&Sa(s,p)&&(p=xd(Sd(p,s.bottom),s.top));let O=Bw(e,p),C=Dw(t,p);if(O==0&&C==0)return b.nodeType==3?Cd(b,e,t):Ca(b,e,t);if(!n||o>C||o==C&&r>O){n=b,s=p,r=O,o=C;let y=C?t<p.top?-1:1:O?e<p.left?-1:1:0;a=!y||(y>0?g<w.length-1:g>0)}O==0?t>p.bottom&&(!u||u.bottom<p.bottom)?(c=b,u=p):t<p.top&&(!f||f.top>p.top)&&(h=b,f=p):u&&Sa(u,p)?u=Sd(u,p.bottom):f&&Sa(f,p)&&(f=xd(f,p.top))}}if(u&&u.bottom>=t?(n=c,s=u):f&&f.top<=t&&(n=h,s=f),!n)return{node:i,offset:0};let d=Math.max(s.left,Math.min(s.right,e));if(n.nodeType==3)return Cd(n,d,t);if(a&&n.contentEditable!="false")return Ca(n,d,t);let m=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(s.left+s.right)/2?1:0);return{node:i,offset:m}}function Cd(i,e,t){let n=i.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;a<n;a++){let c=mn(i,a,a+1).getClientRects();for(let h=0;h<c.length;h++){let u=c[h];if(u.top==u.bottom)continue;o||(o=e-u.left);let f=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<r){let d=e>=(u.left+u.right)/2,m=d;if((le.chrome||le.gecko)&&mn(i,a).getBoundingClientRect().left==u.right&&(m=!d),f<=0)return{node:i,offset:a+(m?1:0)};s=a+(m?1:0),r=f}}}return{node:i,offset:s>-1?s:o>0?i.nodeValue.length:0}}function Ad(i,e,t,n=-1){var s,r;let o=i.contentDOM.getBoundingClientRect(),a=o.top+i.viewState.paddingTop,c,{docHeight:h}=i.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>h)return i.state.doc.length;for(let y=i.viewState.heightOracle.textHeight/2,E=!1;c=i.elementAtHeight(d),c.type!=wt.Text;)for(;d=n>0?c.bottom+y:c.top-y,!(d>=0&&d<=h);){if(E)return t?null:0;E=!0,n=-n}f=a+d;let m=c.from;if(m<i.viewport.from)return i.viewport.from==0?0:t?null:Qd(i,o,c,u,f);if(m>i.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Qd(i,o,c,u,f);let b=i.dom.ownerDocument,w=i.root.elementFromPoint?i.root:b,g=w.elementFromPoint(u,f);g&&!i.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=w.elementFromPoint(u,f),g&&!i.contentDOM.contains(g)&&(g=null));let p,O=-1;if(g&&((s=i.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(b.caretPositionFromPoint){let y=b.caretPositionFromPoint(u,f);y&&({offsetNode:p,offset:O}=y)}else if(b.caretRangeFromPoint){let y=b.caretRangeFromPoint(u,f);y&&({startContainer:p,startOffset:O}=y,(!i.contentDOM.contains(p)||le.safari&&vw(p,O,u)||le.chrome&&Zw(p,O,u))&&(p=void 0))}p&&(O=Math.min(ui(p),O))}if(!p||!i.docView.dom.contains(p)){let y=Je.find(i.docView,m);if(!y)return d>c.top+c.height/2?c.to:c.from;({node:p,offset:O}=Ca(y.dom,u,f))}let C=i.docView.nearest(p);if(!C)return null;if(C.isWidget&&((r=C.dom)===null||r===void 0?void 0:r.nodeType)==1){let y=C.dom.getBoundingClientRect();return e.y<y.top||e.y<=y.bottom&&e.x<=(y.left+y.right)/2?C.posAtStart:C.posAtEnd}else return C.localPosFromDOM(p,O)+C.posAtStart}function Qd(i,e,t,n,s){let r=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let a=i.viewState.heightOracle.textHeight,c=Math.floor((s-t.top-(i.defaultLineHeight-a)*.5)/a);r+=c*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+ea(o,r,i.state.tabSize)}function vw(i,e,t){let n;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(let s=i.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return mn(i,n-1,n).getBoundingClientRect().left>t}function Zw(i,e,t){if(e!=0)return!1;for(let s=i;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let n=i.nodeType==1?i.getBoundingClientRect():mn(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function Aa(i,e){let t=i.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==wt.Text))return n}return t}function Iw(i,e,t,n){let s=Aa(i,e.head),r=!n||s.type!=wt.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=i.dom.getBoundingClientRect(),a=i.textDirectionAt(s.from),c=i.posAtCoords({x:t==(a==Ze.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(c!=null)return j.cursor(c,t?-1:1)}return j.cursor(t?s.to:s.from,t?-1:1)}function Pd(i,e,t,n){let s=i.state.doc.lineAt(e.head),r=i.bidiSpans(s),o=i.textDirectionAt(s.from);for(let a=e,c=null;;){let h=Aw(s,r,o,a,t),u=rd;if(!h){if(s.number==(t?i.state.doc.lines:1))return a;u=`
28
- `,s=i.state.doc.line(s.number+(t?1:-1)),r=i.bidiSpans(s),h=i.visualLineSide(s,!t)}if(c){if(!c(u))return a}else{if(!n)return h;c=n(u)}a=h}}function Uw(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return r=>{let o=n(r);return s==je.Space&&(s=o),s==o}}function Fw(i,e,t,n){let s=e.head,r=t?1:-1;if(s==(t?i.state.doc.length:0))return j.cursor(s,e.assoc);let o=e.goalColumn,a,c=i.contentDOM.getBoundingClientRect(),h=i.coordsAtPos(s,e.assoc||-1),u=i.documentTop;if(h)o==null&&(o=h.left-c.left),a=r<0?h.top:h.bottom;else{let m=i.viewState.lineBlockAt(s);o==null&&(o=Math.min(c.right-c.left,i.defaultCharacterWidth*(s-m.from))),a=(r<0?m.top:m.bottom)+u}let f=c.left+o,d=n??i.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let b=a+(d+m)*r,w=Ad(i,{x:f,y:b},!1,r);if(b<c.top||b>c.bottom||(r<0?w<s:w>s)){let g=i.docView.coordsForChar(w),p=!g||b<g.top?-1:1;return j.cursor(w,p,void 0,o)}}}function Ur(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(r,o,a)=>{if(e>r&&e<o){let c=n||t||(e-r<o-e?-1:1);e=c<0?r:o,n=c}});if(!n)return e}}function Qa(i,e,t){let n=Ur(i.state.facet(ka).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:j.cursor(n,n<t.from?1:-1)}const Ns="￿";class jw{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Se.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ns}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let a=Be.get(s),c=Be.get(o);(a&&c?a.breakAfter:(a?a.breakAfter:Lr(s))||Lr(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=s.exec(t))&&(r=a.index,o=a[0].length),this.append(t.slice(n,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);n=r+o}}readNode(e){if(e.cmIgnore)return;let t=Be.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(qw(e,n.node,n.offset)?t:0))}}function qw(i,e,t){for(;;){if(!e||t<ui(e))return!1;if(e==i)return!0;t=pn(e)+1,e=e.parentNode}}class Td{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Xw{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=r||o?[]:zw(e),c=new jw(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=Gw(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!sa(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!sa(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((le.ios||le.chrome)&&e.state.selection.main.empty&&c!=h&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(c,h),d=Math.max(c,h),m=u.from-f,b=u.to-d;(m==0||m==1||f==0)&&(b==0||b==-1||d==e.state.doc.length)&&(c=0,h=e.state.doc.length)}this.newSel=j.single(h,c)}}}function Ed(i,e){let t,{newSel:n}=e,s=i.state.selection.main,r=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,c=s.from,h=null;(r===8||le.android&&e.text.length<a-o)&&(c=s.to,h="end");let u=Yw(i.state.doc.sliceString(o,a,Ns),e.text,c-o,h);u&&(le.chrome&&r==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Ns+Ns&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:Ae.of(e.text.slice(u.from,u.toB).split(Ns))})}else n&&(!i.hasFocus&&i.state.facet(Ei)||n.main.eq(s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(le.mac||le.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:Ae.of([t.insert.toString().replace("."," ")])}):t&&t.from>=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:le.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
29
- `&&i.lineWrapping&&(n&&(n=j.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:Ae.of([" "])}),t)return Pa(i,t,n,r);if(n&&!n.main.eq(s)){let o=!1,a="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),a=i.inputState.lastSelectionOrigin),i.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}else return!1}function Pa(i,e,t,n=-1){if(le.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(le.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Dn(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Dn(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Dn(i.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,a=()=>o||(o=Ww(i,e,t));return i.state.facet(hd).some(c=>c(i,e.from,e.to,r,a))||i.dispatch(a()),!0}function Ww(i,e,t){let n,s=i.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",c=r.to>e.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(i.state.toText(a+e.insert.sliceString(0,void 0,i.state.lineBreak)+c))}else{let a=s.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=i.state.sliceDoc(e.from,e.to),u,f=t&&kd(i,t.main.head);if(f){let b=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-b}}else u=i.state.doc.lineAt(r.head);let d=r.to-e.to,m=r.to-r.from;n=s.changeByRange(b=>{if(b.from==r.from&&b.to==r.to)return{changes:a,range:c||b.map(a)};let w=b.to-d,g=w-h.length;if(b.to-b.from!=m||i.state.sliceDoc(g,w)!=h||b.to>=u.from&&b.from<=u.to)return{range:b};let p=s.changes({from:g,to:w,insert:e.insert}),O=b.to-r.to;return{changes:p,range:c?j.range(Math.max(0,c.anchor+O),Math.max(0,c.head+O)):b.map(p)}})}else n={changes:a,selection:c&&s.selection.replaceRange(c)}}let o="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,o+=".compose",i.inputState.compositionFirstChange&&(o+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:o,scrollIntoView:!0})}function Yw(i,e,t,n){let s=Math.min(i.length,e.length),r=0;for(;r<s&&i.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&i.length==e.length)return null;let o=i.length,a=e.length;for(;o>0&&a>0&&i.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(n=="end"){let c=Math.max(0,r-Math.min(o,a));t-=o+c-r}if(o<r&&i.length<e.length){let c=t<=r&&t>=o?r-t:0;r-=c,a=r+(a-o),o=r}else if(a<r){let c=t<=r&&t>=a?r-t:0;r-=c,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}function zw(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}=i.observer.selectionRange;return t&&(e.push(new Td(t,n)),(s!=t||r!=n)&&e.push(new Td(s,r))),e}function Gw(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?j.single(t+e,n+e):null}class Hw{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,le.safari&&e.contentDOM.addEventListener("input",()=>null),le.gecko&&dk(e.contentDOM.ownerDocument)}handleEvent(e){!rk(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Kw(e),n=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,a=n[r];a&&o!=!a.handlers.length&&(s.removeEventListener(r,this.handleEvent),a=null),a||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in n)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Rd.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),le.android&&le.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return le.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Nd.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||Jw.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Dn(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:le.safari&&!le.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function $d(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){Qt(t.state,s)}}}function Kw(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push($d(n.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push($d(n.value,o))}}for(let n in Kt)t(n).handlers.push(Kt[n]);for(let n in Ut)t(n).observers.push(Ut[n]);return e}const Nd=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Jw="dthko",Rd=[16,17,18,20,91,92,224,225],Fr=6;function jr(i){return Math.max(0,i)*.7+8}function ek(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class tk{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=hw(e.contentDOM),this.atoms=e.state.facet(ka).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Se.allowMultipleSelections)&&ik(e,t),this.dragging=sk(e,t)&&Ud(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&ek(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,r=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=xa(this.view);e.clientX-c.left<=s+Fr?t=-jr(s-e.clientX):e.clientX+c.right>=o-Fr&&(t=jr(e.clientX-o)),e.clientY-c.top<=r+Fr?n=-jr(r-e.clientY):e.clientY+c.bottom>=a-Fr&&(n=jr(e.clientY-a)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let s=e.ranges[n],r=null;if(s.empty){let o=Ur(this.atoms,s.from,0);o!=s.from&&(r=j.cursor(o,-1))}else{let o=Ur(this.atoms,s.from,-1),a=Ur(this.atoms,s.to,1);(o!=s.from||a!=s.to)&&(r=j.range(s.from==s.anchor?o:a,s.from==s.head?o:a))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?j.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function ik(i,e){let t=i.state.facet(od);return t.length?t[0](e):le.mac?e.metaKey:e.ctrlKey}function nk(i,e){let t=i.state.facet(ld);return t.length?t[0](e):le.mac?!e.altKey:!e.ctrlKey}function sk(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=xs(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r<s.length;r++){let o=s[r];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function rk(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Be.get(t))&&n.ignoreEvent(e))return!1;return!0}const Kt=Object.create(null),Ut=Object.create(null),Vd=le.ie&&le.ie_version<15||le.ios&&le.webkit_version<604;function ok(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Ld(i,t.value)},50)}function qr(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function Ld(i,e){e=qr(i.state,_a,e);let{state:t}=i,n,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(Ta!=null&&t.selection.ranges.every(c=>c.empty)&&Ta==r.toString()){let c=-1;n=t.changeByRange(h=>{let u=t.doc.lineAt(h.from);if(u.from==c)return{range:h};c=u.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:j.cursor(h.from+f.length)}})}else o?n=t.changeByRange(c=>{let h=r.line(s++);return{changes:{from:c.from,to:c.to,insert:h.text},range:j.cursor(c.from+h.length)}}):n=t.replaceSelection(r);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ut.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft},Kt.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1),Ut.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")},Ut.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")},Kt.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(ad))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=ck(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new tk(i,e,t,n)),n&&i.observer.ignore(()=>{Lf(i.contentDOM);let r=i.root.activeElement;r&&!r.contains(i.contentDOM)&&r.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Md(i,e,t,n){if(n==1)return j.cursor(e,t);if(n==2)return Mw(i.state,e,t);{let s=Je.find(i.docView,e),r=i.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,a=s?s.posAtEnd:r.to;return a<i.state.doc.length&&a==r.to&&a++,j.range(o,a)}}let Bd=(i,e,t)=>e>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function lk(i,e,t,n){let s=Je.find(i.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Bd(t,n,o))return-1;let a=s.coordsAt(r,1);return a&&Bd(t,n,a)?1:o&&o.bottom>=n?-1:1}function Dd(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:lk(i,t,e.clientX,e.clientY)}}const ak=le.ie&&le.ie_version<=11;let vd=null,Zd=0,Id=0;function Ud(i){if(!ak)return i.detail;let e=vd,t=Id;return vd=i,Id=Date.now(),Zd=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Zd+1)%3:1}function ck(i,e){let t=Dd(i,e),n=Ud(e),s=i.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,a){let c=Dd(i,r),h,u=Md(i,c.pos,c.bias,n);if(t.pos!=c.pos&&!o){let f=Md(i,t.pos,t.bias,n),d=Math.min(f.from,u.from),m=Math.max(f.to,u.to);u=d<u.from?j.range(d,m):j.range(m,d)}return o?s.replaceRange(s.main.extend(u.from,u.to)):a&&n==1&&s.ranges.length>1&&(h=hk(s,c.pos))?h:a?s.addRange(u):j.create([u])}}}function hk(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return j.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}Kt.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=j.range(r,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",qr(i.state,ba,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Kt.dragend=i=>(i.inputState.draggedContent=null,!1);function Fd(i,e,t,n){if(t=qr(i.state,_a,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=i.inputState,o=n&&r&&nk(i,e)?{from:r.from,to:r.to}:null,a={from:s,insert:t},c=i.state.changes(o?[o,a]:a);i.focus(),i.dispatch({changes:c,selection:{anchor:c.mapPos(s,-1),head:c.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}Kt.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,r=()=>{++s==t.length&&Fd(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=r,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),r()},a.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return Fd(i,e,n,!0),!0}return!1},Kt.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Vd?null:e.clipboardData;return t?(Ld(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ok(i),!1)};function uk(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function fk(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of i.selection.ranges){let o=i.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),s=o.number}n=!0}return{text:qr(i,ba,e.join(i.lineBreak)),ranges:t,linewise:n}}let Ta=null;Kt.copy=Kt.cut=(i,e)=>{let{text:t,ranges:n,linewise:s}=fk(i.state);if(!t&&!s)return!1;Ta=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=Vd?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(uk(i,t),!1)};const jd=Ai.define();function qd(i,e){let t=[];for(let n of i.facet(ud)){let s=n(i,e);s&&t.push(s)}return t?i.update({effects:t,annotations:jd.of(!0)}):null}function Xd(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=qd(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ut.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),Xd(i)},Ut.blur=i=>{i.observer.clearSelectionRange(),Xd(i)},Ut.compositionstart=Ut.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))},Ut.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,le.chrome&&le.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))},Ut.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()},Kt.beforeinput=(i,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let a=o[0],c=i.posAtDOM(a.startContainer,a.startOffset),h=i.posAtDOM(a.endContainer,a.endOffset);return Pa(i,{from:c,to:h,insert:i.state.toText(r)},null),!0}}let s;if(le.chrome&&le.android&&(s=Nd.find(r=>r.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return le.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),le.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ut.compositionend(i,e),20),!1};const Wd=new Set;function dk(i){Wd.has(i)||(Wd.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const Yd=["pre-wrap","normal","pre-line","break-spaces"];let Un=!1;function zd(){Un=!1}class pk{constructor(e){this.lineWrapping=e,this.doc=Ae.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Yd.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,r,o){let a=Yd.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=r,c){this.heightSamples={};for(let h=0;h<o.length;h++){let u=o[h];u<0?h++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class mk{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class pi{constructor(e,t,n,s,r){this.from=e,this.length=t,this.top=n,this.height=s,this._content=r}get type(){return typeof this._content=="number"?wt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Yi?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new pi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ie=function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i}(Ie||(Ie={}));const Xr=.001;class kt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Xr&&(Un=!0),this.height=e)}replace(e,t,n){return kt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let r=this,o=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:c,toA:h,fromB:u,toB:f}=s[a],d=r.lineAt(c,Ie.ByPosNoHeight,n.setDoc(t),0,0),m=d.to>=h?d:r.lineAt(h,Ie.ByPosNoHeight,n,0,0);for(f+=m.to-h,h=m.to;a>0&&d.from<=s[a-1].toA;)c=s[a-1].fromA,u=s[a-1].fromB,a--,c<d.from&&(d=r.lineAt(c,Ie.ByPosNoHeight,n,0,0));u+=d.from-c,c=d.from;let b=Ea.build(n.setDoc(o),e,u,f);r=Wr(r,r.replace(c,h,b))}return r.updateHeight(n,0)}static empty(){return new Vt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,r=0;for(;;)if(t==n)if(s>r*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,s-=a.size}else if(r>s*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,r-=a.size}else break;else if(s<r){let a=e[t++];a&&(s+=a.size)}else{let a=e[--n];a&&(r+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new gk(kt.of(e.slice(0,t)),o,kt.of(e.slice(n)))}}function Wr(i,e){return i==e?i:(i.constructor!=e.constructor&&(Un=!0),e)}kt.prototype.size=1;class Gd extends kt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,s){return new pi(s,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,s,r){return this.blockAt(0,n,s,r)}forEachLine(e,t,n,s,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,s,r))}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Vt extends Gd{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new pi(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Vt||s instanceof pt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof pt?s=new Vt(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):kt.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class pt extends kt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-n+1,o,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*r);o=c/r,this.length>r+1&&(a=(this.height-c)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:s,perLine:o,perChar:a}}blockAt(e,t,n,s){let{firstLine:r,lastLine:o,perLine:a,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),u=t.doc.lineAt(h),f=a+u.length*c,d=Math.max(n,e-f/2);return new pi(u.from,u.length,d,f,0)}else{let h=Math.max(0,Math.min(o-r,Math.floor((e-n)/a))),{from:u,length:f}=t.doc.line(r+h);return new pi(u,f,n+a*h,a,0)}}lineAt(e,t,n,s,r){if(t==Ie.ByHeight)return this.blockAt(e,n,s,r);if(t==Ie.ByPosNoHeight){let{from:m,to:b}=n.doc.lineAt(e);return new pi(m,b-m,0,0,0)}let{firstLine:o,perLine:a,perChar:c}=this.heightMetrics(n,r),h=n.doc.lineAt(e),u=a+h.length*c,f=h.number-o,d=s+a*f+c*(h.from-r-f);return new pi(h.from,h.length,Math.max(s,Math.min(d,s+this.height-u)),u,0)}forEachLine(e,t,n,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:a,perLine:c,perChar:h}=this.heightMetrics(n,r);for(let u=e,f=s;u<=t;){let d=n.doc.lineAt(u);if(u==e){let b=d.number-a;f+=c*b+h*(e-r-b)}let m=c+h*d.length;o(new pi(d.from,d.length,f,m,0)),f+=m,u=d.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let r=n[n.length-1];r instanceof pt?n[n.length-1]=new pt(r.length+s):n.push(null,new pt(s-1))}if(e>0){let r=n[0];r instanceof pt?n[0]=new pt(e+r.length):n.unshift(new pt(e-1),null)}return kt.of(n)}decomposeLeft(e,t){t.push(new pt(e-1),null)}decomposeRight(e,t){t.push(null,new pt(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],a=Math.max(t,s.from),c=-1;for(s.from>t&&o.push(new pt(s.from-t-1).updateHeight(e,t));a<=r&&s.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=s.heights[s.index++];c==-1?c=f:Math.abs(f-c)>=Xr&&(c=-2);let d=new Vt(u,f);d.outdated=!1,o.push(d),a+=u+1}a<=r&&o.push(null,new pt(r-a).updateHeight(e,a));let h=kt.of(o);return(c<0||Math.abs(h.height-this.height)>=Xr||Math.abs(c-this.heightMetrics(e,t).perLine)>=Xr)&&(Un=!0),Wr(this,h)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class gk extends kt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,r,s+this.left.length+this.break)}lineAt(e,t,n,s,r){let o=s+this.left.height,a=r+this.left.length+this.break,c=t==Ie.ByHeight?e<o:e<a,h=c?this.left.lineAt(e,t,n,s,r):this.right.lineAt(e,t,n,o,a);if(this.break||(c?h.to<a:h.from>a))return h;let u=t==Ie.ByPosNoHeight?Ie.ByPosNoHeight:Ie.ByPos;return c?h.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,s,r).join(h)}forEachLine(e,t,n,s,r,o){let a=s+this.left.height,c=r+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,s,r,o),t>=c&&this.right.forEachLine(e,t,n,a,c,o);else{let h=this.lineAt(c,Ie.ByPos,n,s,r);e<h.from&&this.left.forEachLine(e,h.from-1,n,s,r,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,n,a,c,o)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let a of n)r.push(a);if(e>0&&Hd(r,o-1),t<this.length){let a=r.length;this.decomposeRight(t,r),Hd(r,a)}return kt.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<s&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?kt.of(this.break?[e,null,t]:[e,t]):(this.left=Wr(this.left,e),this.right=Wr(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:r,right:o}=this,a=t+r.length+this.break,c=null;return s&&s.from<=t+r.length&&s.more?c=r=r.updateHeight(e,t,n,s):r.updateHeight(e,t,n),s&&s.from<=a+o.length&&s.more?c=o=o.updateHeight(e,a,n,s):o.updateHeight(e,a,n),c?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Hd(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof pt&&(n=i[e+1])instanceof pt&&i.splice(e-1,3,new pt(t.length+1+n.length))}const Ok=5;class Ea{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Vt?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Vt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new Gd(o,s,n)):(o||r||s>=Ok)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Vt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new pt(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vt)return e;let t=new Vt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vt)&&!this.isCovered?this.nodes.push(new Vt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Vt&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let r=new Ea(n,e);return Ee.spans(t,n,s,r,0),r.finish(n)}}function _k(i,e,t){let n=new bk;return Ee.compare(i,e,t,n,0),n.changes}class bk{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&Dr(e,t,this.changes,5)}}function yk(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,r=Math.max(0,t.left),o=Math.min(s.innerWidth,t.right),a=Math.max(0,t.top),c=Math.min(s.innerHeight,t.bottom);for(let h=i.parentNode;h&&h!=n.body;)if(h.nodeType==1){let u=h,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();r=Math.max(r,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),c=Math.min(h==i.parentNode?s.innerHeight:c,d.bottom)}h=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,c)-(t.top+e)}}function wk(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function kk(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class $a{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],r=t[n];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(e,t){return de.replace({widget:new xk(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class xk extends fi{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Kd{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Jd,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ze.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(wa).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new pk(t),this.stateDeco=e.facet(Es).filter(n=>typeof n!="function"),this.heightMap=kt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle.setDoc(e.doc),[new It(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=de.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Yr(r,o))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Jd:new Na(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Rs(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Es).filter(u=>typeof u!="function");let s=e.changedRanges,r=It.extendWithRanges(s,_k(n,this.stateDeco,e?e.changes:it.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);zd(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Un)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(dd)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Ze.RTL:Ze.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:E}=Vf(t,a);(y>.005&&Math.abs(this.scaleX-y)>.005||E>.005&&Math.abs(this.scaleY-E)>.005)&&(this.scaleX=y,this.scaleY=E,h|=16,o=c=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=Df(e.scrollDOM);let b=(this.printing?kk:yk)(t,this.paddingTop),w=b.top-this.pixelViewport.top,g=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(c=!0)),!this.inView&&!this.scrollTarget&&!wk(e.dom))return 0;let O=a.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let y=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(y)&&(o=!0),o||s.lineWrapping&&Math.abs(O-this.contentDOMWidth)>s.charWidth){let{lineHeight:E,charWidth:x,textHeight:k}=e.docView.measureTextSize();o=E>0&&s.refresh(r,E,x,k,O/x,y),o&&(e.docView.minWidth=0,h|=16)}w>0&&g>0?u=Math.max(w,g):w<0&&g<0&&(u=Math.min(w,g)),zd();for(let E of this.viewports){let x=E.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(E);this.heightMap=(o?kt.empty().applyChanges(this.stateDeco,Ae.empty,this.heightOracle,[new It(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new mk(E.from,x))}Un&&(h|=2)}let C=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return C&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),h|=this.updateForViewport()),(h&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,c=new Yr(s.lineAt(o-n*1e3,Ie.ByHeight,r,0,0).from,s.lineAt(a+(1-n)*1e3,Ie.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(h<c.from||h>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,Ie.ByPos,r,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&h<c.from?d=f.top:d=f.bottom-u,c=new Yr(s.lineAt(d-1e3/2,Ie.ByHeight,r,0,0).from,s.lineAt(d+u+1e3/2,Ie.ByHeight,r,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new Yr(this.heightMap.lineAt(n,Ie.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,Ie.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,Ie.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,Ie.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||s<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&s>o-2*1e3&&r<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new $a(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,r=s>>1,o=s<<1;if(this.defaultTextDirection!=Ze.LTR&&!n)return[];let a=[],c=(u,f,d,m)=>{if(f-u<r)return;let b=this.state.selection.main,w=[b.from];b.empty||w.push(b.to);for(let p of w)if(p>u&&p<f){c(u,p-10,d,m),c(p+10,f,d,m);return}let g=Ck(e,p=>p.from>=d.from&&p.to<=d.to&&Math.abs(p.from-u)<r&&Math.abs(p.to-f)<r&&!w.some(O=>p.from<O&&p.to>O));if(!g){if(f<d.to&&t&&n&&t.visibleRanges.some(C=>C.from<=f&&C.to>=f)){let C=t.moveToLineBoundary(j.cursor(f),!1,!0).head;C>u&&(f=C)}let p=this.gapSize(d,u,f,m),O=n||p<2e6?p:2e6;g=new $a(u,f,p,O)}a.push(g)},h=u=>{if(u.length<o||u.type!=wt.Text)return;let f=Sk(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,m,b;if(n){let w=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,p;if(d!=null){let O=Gr(f,d),C=((this.visibleBottom-this.visibleTop)/2+w)/u.height;g=O-C,p=O+C}else g=(this.visibleTop-u.top-w)/u.height,p=(this.visibleBottom-u.top+w)/u.height;m=zr(f,g),b=zr(f,p)}else{let w=f.total*this.heightOracle.charWidth,g=s*this.heightOracle.charWidth,p=0;if(w>2e6)for(let x of e)x.from>=u.from&&x.from<u.to&&x.size!=x.displaySize&&x.from*this.heightOracle.charWidth+p<this.pixelViewport.left&&(p=x.size-x.displaySize);let O=this.pixelViewport.left+p,C=this.pixelViewport.right+p,y,E;if(d!=null){let x=Gr(f,d),k=((C-O)/2+g)/w;y=x-k,E=x+k}else y=(O-g)/w,E=(C+g)/w;m=zr(f,y),b=zr(f,E)}m>u.from&&c(u.from,m,u,f),b<u.to&&c(b,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(h):h(u);return a}gapSize(e,t,n,s){let r=Gr(s,n)-Gr(s,t);return this.heightOracle.lineWrapping?e.height*r:s.total*this.heightOracle.charWidth*r}updateLineGaps(e){$a.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=de.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Ee.spans(t,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let r=0;r<n.length&&!(s&8);r++){let o=this.visibleRanges[r],a=n[r];(o.from!=a.from||o.to!=a.to)&&(s|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Rs(this.heightMap.lineAt(e,Ie.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Rs(this.heightMap.lineAt(this.scaler.fromDOM(e),Ie.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Rs(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Yr{constructor(e,t){this.from=e,this.to=t}}function Sk(i,e,t){let n=[],s=i,r=0;return Ee.spans(t,i,e,{span(){},point(o,a){o>s&&(n.push({from:s,to:o}),r+=o-s),s=a}},20),s<e&&(n.push({from:s,to:e}),r+=e-s),{total:r,ranges:n}}function zr({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:r,to:o}=e[s],a=o-r;if(n<=a)return r+n;n-=a}}function Gr(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function Ck(i,e){for(let t of i)if(e(t))return t}const Jd={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};class Na{constructor(e,t,n){let s=0,r=0,o=0;this.viewports=n.map(({from:a,to:c})=>{let h=t.lineAt(a,Ie.ByPos,e,0,0).top,u=t.lineAt(c,Ie.ByPos,e,0,0).bottom;return s+=u-h,{from:a,to:c,top:h,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let a of this.viewports)a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return s+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,s=r.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-s)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,s=r.domBottom}}eq(e){return e instanceof Na?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Rs(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new pi(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>Rs(s,e)):i._content)}const Hr=ce.define({combine:i=>i.join(" ")}),Ra=ce.define({combine:i=>i.indexOf(!0)>-1}),Va=qi.newName(),ep=qi.newName(),tp=qi.newName(),ip={"&light":"."+ep,"&dark":"."+tp};function La(i,e,t){return new qi(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const Ak=La("."+Va,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ip),Qk={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ma=le.ie&&le.ie_version<=11;class Pk{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new uw,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(le.ie&&le.ie_version<=11||le.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(le.chrome&&le.chrome_version<126)&&(this.editContext=new Ek(e),e.state.facet(Ei)&&(e.contentDOM.editContext=this.editContext.editContext)),Ma&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,s=this.selectionRange;if(n.state.facet(Ei)?n.root.activeElement!=this.dom:!Vr(this.dom,s))return;let r=s.anchorNode&&n.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(le.ie&&le.ie_version<=11||le.android&&le.chrome)&&!n.state.selection.main.empty&&s.focusNode&&Ss(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=xs(e.root);if(!t)return!1;let n=le.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Tk(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=Vr(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&dw(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Qk),Ma&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ma&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Dn(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Vr(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Xw(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=Ed(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=np(t,e.previousSibling||e.target.previousSibling,-1),s=np(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ei)!=e.state.facet(Ei)&&(e.view.contentDOM.editContext=e.state.facet(Ei)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function np(i,e,t){for(;e;){let n=Be.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function sp(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return Ss(o.node,o.offset,s,r)&&([t,n,s,r]=[s,r,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}}function Tk(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return sp(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?sp(i,t):null}class Ek{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let s=e.state.selection.main,{anchor:r,head:o}=s,a=this.toEditorPos(n.updateRangeStart),c=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let h={from:a,to:c,insert:Ae.of(n.text.split(`
30
- `))};if(h.from==this.from&&r<this.from?h.from=r:h.to==this.to&&r>this.to&&(h.to=r),h.from==h.to&&!h.insert.length){let u=j.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));u.main.eq(s)||e.dispatch({selection:u,userEvent:"select"});return}if((le.mac||le.android)&&h.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:c,insert:Ae.of([n.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let u=this.to-this.from+(h.to-h.from+h.insert.length);Pa(e,h,j.single(this.toEditorPos(n.selectionStart,u),this.toEditorPos(n.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let s=[],r=null;for(let o=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);o<a;o++){let c=e.coordsForChar(o);r=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let r of n.getTextFormats()){let o=r.underlineStyle,a=r.underlineThickness;if(o!="None"&&a!="None"){let c=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(c<h){let u=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;s.push(de.mark({attributes:{style:u}}).range(c,h))}}}e.dispatch({effects:md.of(de.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=xs(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,a,c,h)=>{if(n)return;let u=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=u}t+=u}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(n=>!n.isUserEvent("input.type")&&n.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class se{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(r=>n(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||fw(e.parent)||document,this.viewState=new Kd(e.state||Se.create(e)),e.scrollTo&&e.scrollTo.is(Zr)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ts).map(s=>new ya(s));for(let s of this.plugins)s.update(this);this.observer=new Pk(this),this.inputState=new Hw(this),this.inputState.ensureHandlers(this.plugins),this.docView=new wd(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Ke?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,s,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,c=null;e.some(d=>d.annotation(jd))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=qd(r,o),c||(a=1));let h=this.observer.delayedAndroidKey,u=null;if(h?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(Se.phrases)!=this.state.facet(Se.phrases))return this.setState(r);s=Ir.create(this,r,e),s.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:m}=d.state.selection;f=new In(m.empty?m:j.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of d.effects)m.is(Zr)&&(f=m.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Kr.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet($s)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Hr)!=s.state.facet(Hr)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let d of this.state.facet(Oa))try{d(s)}catch(m){Qt(this.state,m,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ed(this,u)&&h.force&&Dn(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new Kd(e),this.plugins=e.facet(Ts).map(n=>new ya(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new wd(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Ts),n=e.state.facet(Ts);if(t!=n){let s=[];for(let r of n){let o=t.indexOf(r);if(o<0)s.push(new ya(r));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(n){Qt(this.state,n,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(Df(n))r=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(s);r=m.from,o=m.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let u=h.map(m=>{try{return m.read(this)}catch(b){return Qt(this.state,b),rp}}),f=Ir.create(this,this.state,[]),d=!1;f.flags|=c,t?t.flags|=c:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let m=0;m<h.length;m++)if(u[m]!=rp)try{let b=h[m];b.write&&b.write(u[m],this)}catch(b){Qt(this.state,b)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let b=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(b>1||b<-1){s=s+b,n.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(Oa))a(t)}get themeClasses(){return Va+" "+(this.state.facet(Ra)?tp:ep)+" "+this.state.facet(Hr)}updateAttrs(){let e=op(this,gd,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ei)?"true":"false",class:"cm-content",style:`${le.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),op(this,wa,t);let n=this.observer.ignore(()=>{let s=ua(this.contentDOM,this.contentAttrs,t),r=ua(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(se.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet($s);let e=this.state.facet(se.cspNonce);qi.mount(this.root,this.styleModules.concat(Ak).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Qa(this,e,Pd(this,e,t,n))}moveByGroup(e,t){return Qa(this,e,Pd(this,e,t,n=>Uw(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return j.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return Iw(this,e,t,n)}moveVertically(e,t,n){return Qa(this,e,Fw(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Ad(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[zi.find(r,e-s.from,-1,t)];return Cs(n,o.dir==Ze.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(fd)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>$k)return sd(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||nd(r.isolates,n=bd(this,e))))return r.order;n||(n=bd(this,e));let s=Cw(e.text,t,n);return this.bidiCache.push(new Kr(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||le.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Lf(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Zr.of(new In(typeof e=="number"?j.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Zr.of(new In(j.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ge.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ge.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=qi.newName(),s=[Hr.of(n),$s.of(La(`.${n}`,e))];return t&&t.dark&&s.push(Ra.of(!0)),s}static baseTheme(e){return ji.lowest($s.of(La("."+Va,e,ip)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&Be.get(n)||Be.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}se.styleModule=$s,se.inputHandler=hd,se.clipboardInputFilter=_a,se.clipboardOutputFilter=ba,se.scrollHandler=pd,se.focusChangeEffect=ud,se.perLineTextDirection=fd,se.exceptionSink=cd,se.updateListener=Oa,se.editable=Ei,se.mouseSelectionStyle=ad,se.dragMovesSelection=ld,se.clickAddsSelectionRange=od,se.decorations=Es,se.outerDecorations=Od,se.atomicRanges=ka,se.bidiIsolatedRanges=_d,se.scrollMargins=yd,se.darkTheme=Ra,se.cspNonce=ce.define({combine:i=>i.length?i[0]:""}),se.contentAttributes=wa,se.editorAttributes=gd,se.lineWrapping=se.contentAttributes.of({class:"cm-lineWrapping"}),se.announce=we.define();const $k=4096,rp={};class Kr{constructor(e,t,n,s,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:Ze.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir==s&&!t.touchesRange(o.from,o.to)&&n.push(new Kr(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function op(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let r=n[s],o=typeof r=="function"?r(i):r;o&&ha(o,t)}return t}const Nk=le.mac?"mac":le.windows?"win":le.linux?"linux":"key";function Rk(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,r,o,a;for(let c=0;c<t.length-1;++c){const h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))s=!0;else if(/^(c|ctrl|control)$/i.test(h))r=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?a=!0:r=!0;else throw new Error("Unrecognized modifier name: "+h)}return s&&(n="Alt-"+n),r&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Jr(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const Vk=ji.default(se.domEventHandlers({keydown(i,e){return cp(ap(e.state),i,e,"editor")}})),Vs=ce.define({enables:Vk}),lp=new WeakMap;function ap(i){let e=i.facet(Vs),t=lp.get(e);return t||lp.set(e,t=Bk(e.reduce((n,s)=>n.concat(s),[]))),t}function Lk(i,e,t){return cp(ap(i.state),e,i,t)}let Gi=null;const Mk=4e3;function Bk(i,e=Nk){let t=Object.create(null),n=Object.create(null),s=(o,a)=>{let c=n[o];if(c==null)n[o]=a;else if(c!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,a,c,h,u)=>{var f,d;let m=t[o]||(t[o]=Object.create(null)),b=a.split(/ (?!$)/).map(p=>Rk(p,e));for(let p=1;p<b.length;p++){let O=b.slice(0,p).join(" ");s(O,!0),m[O]||(m[O]={preventDefault:!0,stopPropagation:!1,run:[C=>{let y=Gi={view:C,prefix:O,scope:o};return setTimeout(()=>{Gi==y&&(Gi=null)},Mk),!0}]})}let w=b.join(" ");s(w,!1);let g=m[w]||(m[w]={preventDefault:!1,stopPropagation:!1,run:((d=(f=m._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});c&&g.run.push(c),h&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let o of i){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of a){let u=t[h]||(t[h]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(m=>f(m,Ba))}let c=o[e]||o.key;if(c)for(let h of a)r(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let Ba=null;function cp(i,e,t,n){Ba=e;let s=lw(e),r=Ct(s,0),o=ai(r)==s.length&&s!=" ",a="",c=!1,h=!1,u=!1;Gi&&Gi.view==t&&Gi.scope==n&&(a=Gi.prefix+" ",Rd.indexOf(e.keyCode)<0&&(h=!0,Gi=null));let f=new Set,d=g=>{if(g){for(let p of g.run)if(!f.has(p)&&(f.add(p),p(t)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),h=!0)}return!1},m=i[n],b,w;return m&&(d(m[a+Jr(s,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(le.windows&&e.ctrlKey&&e.altKey)&&(b=Xi[e.keyCode])&&b!=s?(d(m[a+Jr(b,e,!0)])||e.shiftKey&&(w=ks[e.keyCode])!=s&&w!=b&&d(m[a+Jr(w,e,!1)]))&&(c=!0):o&&e.shiftKey&&d(m[a+Jr(s,e,!0)])&&(c=!0),!c&&d(m._any)&&(c=!0)),h&&(c=!0),c&&u&&e.stopPropagation(),Ba=null,c}class Ls{constructor(e,t,n,s,r){this.className=e,this.left=t,this.top=n,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let r=hp(e);return[new Ls(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Dk(e,t,n)}}function hp(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Ze.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function up(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let r=i.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=i.posAtCoords({x:r.left+1,y:o}),c=i.posAtCoords({x:r.right-1,y:o});return a==null||c==null?n:{from:Math.max(n.from,Math.min(a,c)),to:Math.min(n.to,Math.max(a,c))}}function Dk(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),r=i.textDirection==Ze.LTR,o=i.contentDOM,a=o.getBoundingClientRect(),c=hp(i),h=o.querySelector(".cm-line"),u=h&&window.getComputedStyle(h),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),m=Aa(i,n),b=Aa(i,s),w=m.type==wt.Text?m:null,g=b.type==wt.Text?b:null;if(w&&(i.lineWrapping||m.widgetLineBreaks)&&(w=up(i,n,1,w)),g&&(i.lineWrapping||b.widgetLineBreaks)&&(g=up(i,s,-1,g)),w&&g&&w.from==g.from&&w.to==g.to)return O(C(t.from,t.to,w));{let E=w?C(t.from,null,w):y(m,!1),x=g?C(null,t.to,g):y(b,!0),k=[];return(w||m).to<(g||b).from-(w&&g?1:0)||m.widgetLineBreaks>1&&E.bottom+i.defaultLineHeight/2<x.top?k.push(p(f,E.bottom,d,x.top)):E.bottom<x.top&&i.elementAtHeight((E.bottom+x.top)/2).type==wt.Text&&(E.bottom=x.top=(E.bottom+x.top)/2),O(E).concat(k).concat(O(x))}function p(E,x,k,P){return new Ls(e,E-c.left,x-c.top,k-E,P-x)}function O({top:E,bottom:x,horizontal:k}){let P=[];for(let N=0;N<k.length;N+=2)P.push(p(k[N],E,k[N+1],x));return P}function C(E,x,k){let P=1e9,N=-1e9,_=[];function A(T,I,B,U,Z){let K=i.coordsAtPos(T,T==k.to?-2:2),X=i.coordsAtPos(B,B==k.from?2:-2);!K||!X||(P=Math.min(K.top,X.top,P),N=Math.max(K.bottom,X.bottom,N),Z==Ze.LTR?_.push(r&&I?f:K.left,r&&U?d:X.right):_.push(!r&&U?f:X.left,!r&&I?d:K.right))}let S=E??k.from,M=x??k.to;for(let T of i.visibleRanges)if(T.to>S&&T.from<M)for(let I=Math.max(T.from,S),B=Math.min(T.to,M);;){let U=i.state.doc.lineAt(I);for(let Z of i.bidiSpans(U)){let K=Z.from+U.from,X=Z.to+U.from;if(K>=B)break;X>I&&A(Math.max(K,I),E==null&&K<=S,Math.min(X,B),x==null&&X>=M,Z.dir)}if(I=U.to+1,I>=B)break}return _.length==0&&A(S,E==null,M,x==null,i.textDirection),{top:P,bottom:N,horizontal:_}}function y(E,x){let k=a.top+(x?E.top:E.bottom);return{top:k,bottom:k,horizontal:[]}}}function vk(i,e){return i.constructor==e.constructor&&i.eq(e)}class Zk{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(eo)!=e.state.facet(eo)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(eo);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,n)=>!vk(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const eo=ce.define();function fp(i){return[Ge.define(e=>new Zk(e,i)),eo.of(i)]}const dp=!(le.ios&&le.webkit&&le.webkit_version<534),Ms=ce.define({combine(i){return hi(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Ik(i={}){return[Ms.of(i),Uk,Fk,jk,dd.of(!0)]}function pp(i){return i.startState.facet(Ms)!=i.state.facet(Ms)}const Uk=fp({above:!0,markers(i){let{state:e}=i,t=e.facet(Ms),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||dp:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=s.empty?s:j.cursor(s.head,s.head>s.anchor?-1:1);for(let c of Ls.forRange(i,o,a))n.push(c)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=pp(i);return t&&mp(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){mp(e.state,i)},class:"cm-cursorLayer"});function mp(i,e){e.style.animationDuration=i.facet(Ms).cursorBlinkRate+"ms"}const Fk=fp({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Ls.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||pp(i)},class:"cm-selectionLayer"}),Da={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};dp&&(Da[".cm-line"].caretColor=Da[".cm-content"].caretColor="transparent !important");const jk=ji.highest(se.theme(Da)),gp=we.define({map(i,e){return i==null?null:e.mapPos(i)}}),Bs=rt.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(gp)?n.value:t,i)}}),qk=Ge.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(Bs);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(i.startState.field(Bs)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(Bs),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(Bs)!=i&&this.view.dispatch({effects:gp.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Xk(){return[Bs,qk]}function Op(i,e,t,n,s){e.lastIndex=0;for(let r=i.iterRange(t,n),o=t,a;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;a=e.exec(r.value);)s(o+a.index,a)}function Wk(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:r}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),r=Math.min(i.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}class Yk{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(a,c,h,u)=>s(u,h,h+a[0].length,a,c);else if(typeof n=="function")this.addMatch=(a,c,h,u)=>{let f=n(a,c,h);f&&u(h,h+a[0].length,f)};else if(n)this.addMatch=(a,c,h,u)=>u(h,h+a[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Qi,n=t.add.bind(t);for(let{from:s,to:r}of Wk(e,this.maxLength))Op(e.state.doc,this.regexp,s,r,(o,a)=>this.addMatch(a,e,o,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),s=Math.max(c,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let r of e.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,s);if(a>o){let c=e.state.doc.lineAt(o),h=c.to<a?e.state.doc.lineAt(a):c,u=Math.max(r.from,c.from),f=Math.min(r.to,h.to);if(this.boundary){for(;o>c.from;o--)if(this.boundary.test(c.text[o-1-c.from])){u=o;break}for(;a<h.to;a++)if(this.boundary.test(h.text[a-h.from])){f=a;break}}let d=[],m,b=(w,g,p)=>d.push(p.range(w,g));if(c==h)for(this.regexp.lastIndex=u-c.from;(m=this.regexp.exec(c.text))&&m.index<f-c.from;)this.addMatch(m,e,m.index+c.from,b);else Op(e.state.doc,this.regexp,u,f,(w,g)=>this.addMatch(g,e,w,b));t=t.update({filterFrom:u,filterTo:f,filter:(w,g)=>w<u||g>f,add:d})}}return t}}const va=/x/.unicode!=null?"gu":"g",zk=new RegExp(`[\0-\b
31
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,va),Gk={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Za=null;function Hk(){var i;if(Za==null&&typeof document<"u"&&document.body){let e=document.body.style;Za=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Za||!1}const to=ce.define({combine(i){let e=hi(i,{render:null,specialChars:zk,addSpecialChars:null});return(e.replaceTabs=!Hk())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,va)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,va)),e}});function Kk(i={}){return[to.of(i),Jk()]}let _p=null;function Jk(){return _p||(_p=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=de.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(to)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new Yk({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,r=Ct(e[0],0);if(r==9){let o=s.lineAt(n),a=t.state.tabSize,c=Ln(o.text,a,n-o.from);return de.replace({widget:new nx((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=de.replace({widget:new ix(i,r)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(to);i.startState.facet(to)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const ex="•";function tx(i){return i>=32?ex:i==10?"␤":String.fromCharCode(9216+i)}class ix extends fi{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=tx(this.code),n=e.state.phrase("Control character")+" "+(Gk[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=n,r.setAttribute("aria-label",n),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class nx extends fi{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function sx(){return ox}const rx=de.line({class:"cm-activeLine"}),ox=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(rx.range(s.from)),e=s.from)}return de.set(t)}},{decorations:i=>i.decorations});class lx extends fi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Mn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=Cs(t[0],n.direction!="rtl"),r=parseInt(n.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function ax(i){return Ge.fromClass(class{constructor(e){this.view=e,this.placeholder=i?de.set([de.widget({widget:new lx(i),side:1}).range(0)]):de.none}get decorations(){return this.view.state.doc.length?de.none:this.placeholder}},{decorations:e=>e.decorations})}const Ia=2e3;function cx(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ia||t.off>Ia||e.col<0||t.col<0){let o=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let c=n;c<=s;c++){let h=i.doc.line(c);h.length<=a&&r.push(j.range(h.from+o,h.to+a))}}else{let o=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let c=n;c<=s;c++){let h=i.doc.line(c),u=ea(h.text,o,i.tabSize,!0);if(u<0)r.push(j.cursor(h.to));else{let f=ea(h.text,a,i.tabSize);r.push(j.range(h.from+u,h.from+f))}}}return r}function hx(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function bp(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,r=s>Ia?-1:s==n.length?hx(i,e.clientX):Ln(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:r,off:s}}function ux(i,e){let t=bp(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(s.changes)}},get(s,r,o){let a=bp(i,s);if(!a)return n;let c=cx(i.state,t,a);return c.length?o?j.create(c.concat(n.ranges)):j.create(c):n}}:null}function fx(i){let e=(i==null?void 0:i.eventFilter)||(t=>t.altKey&&t.button==0);return se.mouseSelectionStyle.of((t,n)=>e(n)?ux(t,n):null)}const dx={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},px={style:"cursor: crosshair"};function mx(i={}){let[e,t]=dx[i.key||"Alt"],n=Ge.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,se.contentAttributes.of(s=>{var r;return!((r=s.plugin(n))===null||r===void 0)&&r.isDown?px:null})]}const Ds="-10000px";class yp{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=n(o,r))}update(e,t){var n;let s=e.state.facet(this.facet),r=s.filter(c=>c);if(s===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let o=[],a=t?[]:null;for(let c=0;c<r.length;c++){let h=r[c],u=-1;if(h){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==h.create&&(u=f)}if(u<0)o[c]=this.createTooltipView(h,c?o[c-1]:null),a&&(a[c]=!!h.above);else{let f=o[c]=this.tooltipViews[u];a&&(a[c]=t[u]),f.update&&f.update(e)}}}for(let c of this.tooltipViews)o.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(a.forEach((c,h)=>t[h]=c),t.length=a.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function gx(i){let{win:e}=i;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Ua=ce.define({combine:i=>{var e,t,n;return{position:le.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||gx}}}),wp=new WeakMap,Fa=Ge.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(Ua);this.position=e.position,this.parent=e.parent,this.classes=i.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new yp(i,ja,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),i.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(Ua);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Ds,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(le.gecko)t=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Ds&&r.style.left=="0px"){let o=r.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(i=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=xa(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Ua).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:r}=i,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:u}=h,f=i.pos[a],d=i.size[a];if(!f||c.clip!==!1&&(f.bottom<=Math.max(t.top,n.top)||f.top>=Math.min(t.bottom,n.bottom)||f.right<Math.max(t.left,n.left)-.1||f.left>Math.min(t.right,n.right)+.1)){u.style.top=Ds;continue}let m=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,b=m?7:0,w=d.right-d.left,g=(e=wp.get(h))!==null&&e!==void 0?e:d.bottom-d.top,p=h.offset||_x,O=this.view.textDirection==Ze.LTR,C=d.width>n.right-n.left?O?n.left:n.right-d.width:O?Math.max(n.left,Math.min(f.left-(m?14:0)+p.x,n.right-w)):Math.min(Math.max(n.left,f.left-w+(m?14:0)-p.x),n.right-w),y=this.above[a];!c.strictSide&&(y?f.top-g-b-p.y<n.top:f.bottom+g+b+p.y>n.bottom)&&y==n.bottom-f.bottom>f.top-n.top&&(y=this.above[a]=!y);let E=(y?f.top-n.top:n.bottom-f.bottom)-b;if(E<g&&h.resize!==!1){if(E<this.view.defaultLineHeight){u.style.top=Ds;continue}wp.set(h,g),u.style.height=(g=E)/r+"px"}else u.style.height&&(u.style.height="");let x=y?f.top-g-b-p.y:f.bottom+b+p.y,k=C+w;if(h.overlap!==!0)for(let P of o)P.left<k&&P.right>C&&P.top<x+g&&P.bottom>x&&(x=y?P.top-g-2-b:P.bottom+b+2);if(this.position=="absolute"?(u.style.top=(x-i.parent.top)/r+"px",kp(u,(C-i.parent.left)/s)):(u.style.top=x/r+"px",kp(u,C/s)),m){let P=f.left+(O?p.x:-p.x)-(C+14-7);m.style.left=P/s+"px"}h.overlap!==!0&&o.push({left:C,top:x,right:k,bottom:x+g}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(i.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let i of this.manager.tooltipViews)i.dom.style.top=Ds}},{eventObservers:{scroll(){this.maybeMeasure()}}});function kp(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const Ox=se.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),_x={x:0,y:0},ja=ce.define({enables:[Fa,Ox]}),io=ce.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class no{static create(e){return new no(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new yp(e,io,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const bx=ja.compute([io],i=>{let e=i.facet(io);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:no.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class yx{constructor(e,t,n,s,r){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let s,r=1;if(n instanceof Wi)s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let a=e.coordsAtPos(s);if(!a||t.y<a.top||t.y>a.bottom||t.x<a.left-e.defaultCharacterWidth||t.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(s)).find(u=>u.from<=s&&u.to>=s),h=c&&c.dir==Ze.RTL?-1:1;r=t.x<a.left?-h:h}let o=this.source(e,s,r);if(o!=null&&o.then){let a=this.pending={pos:s};o.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>Qt(e.state,c,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Fa),t=e?e.manager.tooltips.findIndex(n=>n.create==no.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!wx(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,a=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!kx(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const so=4;function wx(i,e){let{left:t,right:n,top:s,bottom:r}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();s=Math.min(a.top,s),r=Math.max(a.bottom,r)}return e.clientX>=t-so&&e.clientX<=n+so&&e.clientY>=s-so&&e.clientY<=r+so}function kx(i,e,t,n,s,r){let o=i.scrollDOM.getBoundingClientRect(),a=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.right<n||o.top>s||Math.min(o.bottom,a)<s)return!1;let c=i.posAtCoords({x:n,y:s},!1);return c>=e&&c<=t}function xx(i,e={}){let t=we.define(),n=rt.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let a of s){let c=r.changes.mapPos(a.pos,-1,ft.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),a);h.pos=c,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(Sx)&&(s=[]);return s},provide:s=>io.from(s)});return{active:n,extension:[n,Ge.define(s=>new yx(s,i,n,t,e.hoverTime||300)),bx]}}function xp(i,e){let t=i.plugin(Fa);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const Sx=we.define(),Sp=ce.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function vs(i,e){let t=i.plugin(Cp),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const Cp=Ge.fromClass(class{constructor(i){this.input=i.state.facet(Zs),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(Sp);this.top=new ro(i,!0,e.topContainer),this.bottom=new ro(i,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(i){let e=i.state.facet(Sp);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ro(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ro(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(Zs);if(t!=this.input){let n=t.filter(c=>c),s=[],r=[],o=[],a=[];for(let c of n){let h=this.specs.indexOf(c),u;h<0?(u=c(i.view),a.push(u)):(u=this.panels[h],u.update&&u.update(i)),s.push(u),(u.top?r:o).push(u)}this.specs=n,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ro{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Ap(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Ap(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Ap(i){let e=i.nextSibling;return i.remove(),e}const Zs=ce.define({enables:Cp});class $i extends dn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}$i.prototype.elementClass="",$i.prototype.toDOM=void 0,$i.prototype.mapMode=ft.TrackBefore,$i.prototype.startSide=$i.prototype.endSide=-1,$i.prototype.point=!0;const oo=ce.define(),Cx=ce.define(),Ax={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ee.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Is=ce.define();function Qx(i){return[Qp(),Is.of(Object.assign(Object.assign({},Ax),i))]}const qa=ce.define({combine:i=>i.some(e=>e)});function Qp(i){let e=[Px];return i&&i.fixed===!1&&e.push(qa.of(!0)),e}const Px=Ge.fromClass(class{constructor(i){this.view=i,this.prevViewport=i.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=i.state.facet(Is).map(e=>new Tp(i,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!i.state.facet(qa),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}i.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(qa)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&this.dom.remove();let t=Ee.iter(this.view.state.facet(oo),this.view.viewport.from),n=[],s=this.gutters.map(r=>new Tx(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let o=!0;for(let a of r.type)if(a.type==wt.Text&&o){Xa(t,n,a.from);for(let c of s)c.line(this.view,a,n);o=!1}else if(a.widget)for(let c of s)c.widget(this.view,a)}else if(r.type==wt.Text){Xa(t,n,r.from);for(let o of s)o.line(this.view,r,n)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();i&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(i){let e=i.startState.facet(Is),t=i.state.facet(Is),n=i.docChanged||i.heightChanged||i.viewportChanged||!Ee.eq(i.startState.facet(oo),i.state.facet(oo),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new Tp(this.view,r)):(this.gutters[o].update(i),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove()}},{provide:i=>se.scrollMargins.of(e=>{let t=e.plugin(i);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Ze.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Pp(i){return Array.isArray(i)?i:[i]}function Xa(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class Tx{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Ee.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let a=new Ep(e,o,r,n);s.elements.push(a),s.dom.appendChild(a.dom)}else s.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];Xa(this.cursor,s,t.from),n.length&&(s=s.concat(n));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let r of e.state.facet(Cx)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Tp{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let c=r.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=s.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Pp(t.markers(e)),t.initialSpacer&&(this.spacer=new Ep(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Pp(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!Ee.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Ep{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Ex(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let a=o,c=r<t.length?t[r++]:null,h=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(c)){a=f,h=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(s);let f=s.nextSibling;s.remove(),s=f}}if(!c)break;c.toDOM&&(h?s=s.nextSibling:this.dom.insertBefore(c.toDOM(e),s)),h&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function Ex(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const $x=ce.define(),Nx=ce.define(),Fn=ce.define({combine(i){return hi(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let r=n[s],o=t[s];n[s]=r?(a,c,h)=>r(a,c,h)||o(a,c,h):o}return n}})}});class Wa extends $i{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ya(i,e){return i.state.facet(Fn).formatNumber(e,i.state)}const Rx=Is.compute([Fn],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet($x)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new Wa(Ya(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet(Nx)){let r=s(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Fn)!=e.state.facet(Fn),initialSpacer(e){return new Wa(Ya(e,$p(e.state.doc.lines)))},updateSpacer(e,t){let n=Ya(t.view,$p(t.view.state.doc.lines));return n==e.number?e:new Wa(n)},domEventHandlers:i.facet(Fn).domEventHandlers}));function Vx(i={}){return[Fn.of(i),Qp(),Rx]}function $p(i){let e=9;for(;e<i;)e=e*10+9;return e}const Lx=new class extends $i{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Mx=oo.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(Lx.range(s)))}return Ee.of(e)});function Bx(){return Mx}const Np=1024;let Dx=0;class za{constructor(e,t){this.from=e,this.to=t}}class xe{constructor(e={}){this.id=Dx++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}xe.closedBy=new xe({deserialize:i=>i.split(" ")}),xe.openedBy=new xe({deserialize:i=>i.split(" ")}),xe.group=new xe({deserialize:i=>i.split(" ")}),xe.isolate=new xe({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}}),xe.contextHash=new xe({perNode:!0}),xe.lookAhead=new xe({perNode:!0}),xe.mounted=new xe({perNode:!0});class lo{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[xe.mounted.id]}}const vx=Object.create(null);class Pt{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):vx,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Pt(e.name||"",t,e.id,n);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(xe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(xe.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?n.name:s[r]];if(o)return o}}}}Pt.none=new Pt("",Object.create(null),0,8);class Ga{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let s=null;for(let r of e){let o=r(n);o&&(s||(s=Object.assign({},n.props)),s[o[0].id]=o[1])}t.push(s?new Pt(n.name,s,n.id,n.flags):n)}return new Ga(t)}}const ao=new WeakMap,Rp=new WeakMap;var nt;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(nt||(nt={}));class et{constructor(e,t,n,s,r){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,r&&r.length){this.props=Object.create(null);for(let[o,a]of r)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=lo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.toString();s&&(t&&(t+=","),t+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Ja(this.topNode,e)}cursorAt(e,t=0,n=0){let s=ao.get(this)||this.topNode,r=new Ja(s);return r.moveTo(e,t),ao.set(this,r._tree),r}get topNode(){return new Tt(this,0,0,null)}resolve(e,t=0){let n=Us(ao.get(this)||this.topNode,e,t,!1);return ao.set(this,n),n}resolveInner(e,t=0){let n=Us(Rp.get(this)||this.topNode,e,t,!0);return Rp.set(this,n),n}resolveStack(e,t=0){return Ux(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:r=this.length}=e,o=e.mode||0,a=(o&nt.IncludeAnonymous)>0;for(let c=this.cursor(o|nt.IncludeAnonymous);;){let h=!1;if(c.from<=r&&c.to>=s&&(!a&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&n&&(a||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:tc(Pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new et(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new et(Pt.none,t,n,s)))}static build(e){return Fx(e)}}et.empty=new et(Pt.none,[],[],0);class Ha{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Ha(this.buffer,this.index)}}class Hi{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],s=this.set.types[t],r=s.name;if(/\W/.test(r)&&!s.isError&&(r=JSON.stringify(r)),e+=4,n==e)return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,s,r){let{buffer:o}=this,a=-1;for(let c=e;c!=t&&!(Vp(r,s,o[c+1],o[c+2])&&(a=c,n>0));c=o[c+3]);return a}slice(e,t,n){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let a=e,c=0;a<t;){r[c++]=s[a++],r[c++]=s[a++]-n;let h=r[c++]=s[a++]-n;r[c++]=s[a++]-e,o=Math.max(o,h)}return new Hi(r,o,this.set)}}function Vp(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Us(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let o=!n&&i instanceof Tt&&i.index<0?null:i.parent;if(!o)return i;i=o}let r=n?0:nt.IgnoreOverlays;if(n)for(let o=i,a=o.parent;a;o=a,a=o.parent)o instanceof Tt&&o.index<0&&((s=a.enter(e,t,r))===null||s===void 0?void 0:s.from)!=o.from&&(i=a);for(;;){let o=i.enter(e,t,r);if(!o)return i;i=o}}class Lp{cursor(e=0){return new Ja(this,e)}getChild(e,t=null,n=null){let s=Mp(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return Mp(this,e,t,n)}resolve(e,t=0){return Us(this,e,t,!1)}resolveInner(e,t=0){return Us(this,e,t,!0)}matchContext(e){return Ka(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class Tt extends Lp{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,s,r=0){for(let o=this;;){for(let{children:a,positions:c}=o._tree,h=t>0?a.length:-1;e!=h;e+=t){let u=a[e],f=c[e]+o.from;if(Vp(s,n,f,f+u.length)){if(u instanceof Hi){if(r&nt.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,t,n-f,s);if(d>-1)return new mi(new Zx(o,u,e,f),null,d)}else if(r&nt.IncludeAnonymous||!u.type.isAnonymous||ec(u)){let d;if(!(r&nt.IgnoreMounts)&&(d=lo.get(u))&&!d.overlay)return new Tt(d.tree,f,e,o);let m=new Tt(u,f,e,o);return r&nt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(t<0?u.children.length-1:0,t,n,s)}}}if(r&nt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let s;if(!(n&nt.IgnoreOverlays)&&(s=lo.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:a}of s.overlay)if((t>0?o<=r:o<r)&&(t<0?a>=r:a>r))return new Tt(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Mp(i,e,t,n){let s=i.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(n!=null&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return n==null?r:[]}}function Ka(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class Zx{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class mi extends Lp{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new mi(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&nt.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new mi(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new mi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new mi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,r=n.buffer[this.index+3];if(r>s){let o=n.buffer[this.index+1];e.push(n.slice(s,r,o)),t.push(0)}return new et(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Bp(i){if(!i.length)return null;let e=0,t=i[0];for(let r=1;r<i.length;r++){let o=i[r];(o.from>t.from||o.to<t.to)&&(t=o,e=r)}let n=t instanceof Tt&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new Ix(s,t)}class Ix{constructor(e,t){this.heads=e,this.node=t}get next(){return Bp(this.heads)}}function Ux(i,e,t){let n=i.resolveInner(e,t),s=null;for(let r=n instanceof Tt?n:n.context.parent;r;r=r.parent)if(r.index<0){let o=r.parent;(s||(s=[n])).push(o.resolve(e,t)),r=o}else{let o=lo.get(r.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Tt(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[n])).push(Us(a,e,t,!1))}}return s?Bp(s):n}class Ja{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Tt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof Tt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&nt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&nt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&nt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(s.buffer.buffer[r+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let a=n._tree.children[r];if(this.mode&nt.IncludeAnonymous||a instanceof Hi||!a.type.isAnonymous||ec(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,n=r+1;break e}s=this.stack[--r]}for(let s=n;s<this.stack.length;s++)t=new mi(this.buffer,t,this.stack[s]);return this.bufferNode=new mi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return Ka(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,r=this.stack.length-1;s>=0;r--){if(r<0)return Ka(this._tree,e,s);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function ec(i){return i.children.some(e=>e instanceof Hi||!e.type.isAnonymous||ec(e))}function Fx(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=Np,reused:r=[],minRepeatType:o=n.types.length}=i,a=Array.isArray(t)?new Ha(t,t.length):t,c=n.types,h=0,u=0;function f(E,x,k,P,N,_){let{id:A,start:S,end:M,size:T}=a,I=u,B=h;for(;T<0;)if(a.next(),T==-1){let J=r[A];k.push(J),P.push(S-E);return}else if(T==-3){h=A;return}else if(T==-4){u=A;return}else throw new RangeError(`Unrecognized record size: ${T}`);let U=c[A],Z,K,X=S-E;if(M-S<=s&&(K=g(a.pos-x,N))){let J=new Uint16Array(K.size-K.skip),fe=a.pos-K.size,he=J.length;for(;a.pos>fe;)he=p(K.start,J,he);Z=new Hi(J,M-K.start,n),X=K.start-E}else{let J=a.pos-T;a.next();let fe=[],he=[],ye=A>=o?A:-1,z=0,D=M;for(;a.pos>J;)ye>=0&&a.id==ye&&a.size>=0?(a.end<=D-s&&(b(fe,he,S,z,a.end,D,ye,I,B),z=fe.length,D=a.end),a.next()):_>2500?d(S,J,fe,he):f(S,J,fe,he,ye,_+1);if(ye>=0&&z>0&&z<fe.length&&b(fe,he,S,z,S,D,ye,I,B),fe.reverse(),he.reverse(),ye>-1&&z>0){let V=m(U,B);Z=tc(U,fe,he,0,fe.length,0,M-S,V,V)}else Z=w(U,fe,he,M-S,I-M,B)}k.push(Z),P.push(X)}function d(E,x,k,P){let N=[],_=0,A=-1;for(;a.pos>x;){let{id:S,start:M,end:T,size:I}=a;if(I>4)a.next();else{if(A>-1&&M<A)break;A<0&&(A=T-s),N.push(S,M,T),_++,a.next()}}if(_){let S=new Uint16Array(_*4),M=N[N.length-2];for(let T=N.length-3,I=0;T>=0;T-=3)S[I++]=N[T],S[I++]=N[T+1]-M,S[I++]=N[T+2]-M,S[I++]=I;k.push(new Hi(S,N[2]-M,n)),P.push(M-E)}}function m(E,x){return(k,P,N)=>{let _=0,A=k.length-1,S,M;if(A>=0&&(S=k[A])instanceof et){if(!A&&S.type==E&&S.length==N)return S;(M=S.prop(xe.lookAhead))&&(_=P[A]+S.length+M)}return w(E,k,P,N,_,x)}}function b(E,x,k,P,N,_,A,S,M){let T=[],I=[];for(;E.length>P;)T.push(E.pop()),I.push(x.pop()+k-N);E.push(w(n.types[A],T,I,_-N,S-_,M)),x.push(N-k)}function w(E,x,k,P,N,_,A){if(_){let S=[xe.contextHash,_];A=A?[S].concat(A):[S]}if(N>25){let S=[xe.lookAhead,N];A=A?[S].concat(A):[S]}return new et(E,x,k,P,A)}function g(E,x){let k=a.fork(),P=0,N=0,_=0,A=k.end-s,S={size:0,start:0,skip:0};e:for(let M=k.pos-E;k.pos>M;){let T=k.size;if(k.id==x&&T>=0){S.size=P,S.start=N,S.skip=_,_+=4,P+=4,k.next();continue}let I=k.pos-T;if(T<0||I<M||k.start<A)break;let B=k.id>=o?4:0,U=k.start;for(k.next();k.pos>I;){if(k.size<0)if(k.size==-3)B+=4;else break e;else k.id>=o&&(B+=4);k.next()}N=U,P+=T,_+=B}return(x<0||P==E)&&(S.size=P,S.start=N,S.skip=_),S.size>4?S:void 0}function p(E,x,k){let{id:P,start:N,end:_,size:A}=a;if(a.next(),A>=0&&P<o){let S=k;if(A>4){let M=a.pos-(A-4);for(;a.pos>M;)k=p(E,x,k)}x[--k]=S,x[--k]=_-E,x[--k]=N-E,x[--k]=P}else A==-3?h=P:A==-4&&(u=P);return k}let O=[],C=[];for(;a.pos>0;)f(i.start||0,i.bufferStart||0,O,C,-1,0);let y=(e=i.length)!==null&&e!==void 0?e:O.length?C[0]+O[0].length:0;return new et(c[i.topID],O.reverse(),C.reverse(),y)}const Dp=new WeakMap;function co(i,e){if(!i.isAnonymous||e instanceof Hi||e.type!=i)return 1;let t=Dp.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof et)){t=1;break}t+=co(i,n)}Dp.set(e,t)}return t}function tc(i,e,t,n,s,r,o,a,c){let h=0;for(let b=n;b<s;b++)h+=co(i,e[b]);let u=Math.ceil(h*1.5/8),f=[],d=[];function m(b,w,g,p,O){for(let C=g;C<p;){let y=C,E=w[C],x=co(i,b[C]);for(C++;C<p;C++){let k=co(i,b[C]);if(x+k>=u)break;x+=k}if(C==y+1){if(x>u){let k=b[y];m(k.children,k.positions,0,k.children.length,w[y]+O);continue}f.push(b[y])}else{let k=w[C-1]+b[C-1].length-E;f.push(tc(i,b,w,y,C,E,k,null,c))}d.push(E+O-r)}}return m(e,t,n,s,0),(a||c)(f,d,o)}class jx{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof mi?this.setBuffer(e.context.buffer,e.index,t):e instanceof Tt&&this.map.set(e.tree,t)}get(e){return e instanceof mi?this.getBuffer(e.context.buffer,e.index):e instanceof Tt?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class On{constructor(e,t,n,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new On(0,e.length,e,0,!1,n)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let a=0,c=0,h=0;;a++){let u=a<t.length?t[a]:null,f=u?u.fromA:1e9;if(f-c>=n)for(;o&&o.from<f;){let d=o;if(c>=d.from||f<=d.to||h){let m=Math.max(d.from,c)-h,b=Math.min(d.to,f)-h;d=m>=b?null:new On(m,b,d.tree,d.offset+h,a>0,!!u)}if(d&&s.push(d),o.to>f)break;o=r<e.length?e[r++]:null}if(!u)break;c=u.toA,h=u.toA-u.toB}return s}}class vp{startParse(e,t,n){return typeof e=="string"&&(e=new qx(e)),n=n?n.length?n.map(s=>new za(s.from,s.to)):[new za(0,0)]:[new za(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let r=s.advance();if(r)return r}}}class qx{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new xe({perNode:!0});let Xx=0;class Ft{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=Xx++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Ft&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Ft(n,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new ho(e);return n=>n.modified.indexOf(t)>-1?n:ho.get(n.base||n,n.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Wx=0;class ho{constructor(e){this.name=e,this.instances=[],this.id=Wx++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>a.base==e&&Yx(t,a.modified));if(n)return n;let s=[],r=new Ft(e.name,s,e,t);for(let a of t)a.instances.push(r);let o=zx(t);for(let a of e.set)if(!a.modified.length)for(let c of o)s.push(ho.get(a,c));return r}}function Yx(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function zx(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function Zp(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let r=[],o=2,a=s;for(let f=0;;){if(a=="..."&&f>0&&f+3==s.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+s);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(f)}let c=r.length-1,h=r[c];if(!h)throw new RangeError("Invalid path: "+s);let u=new uo(n,o,c>0?r.slice(0,c):null);e[h]=u.sort(e[h])}}return Ip.add(e)}const Ip=new xe;class uo{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}uo.empty=new uo([],2,null);function Up(i,e){let t=Object.create(null);for(let r of i)if(!Array.isArray(r.tag))t[r.tag.id]=r.class;else for(let o of r.tag)t[o.id]=r.class;let{scope:n,all:s=null}=e||{};return{style:r=>{let o=s;for(let a of r)for(let c of a.set){let h=t[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:n}}function Gx(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function Hx(i,e,t,n=0,s=i.length){let r=new Kx(n,Array.isArray(e)?e:[e],t);r.highlightRange(i.cursor(),n,s,"",r.highlighters),r.flush(s)}class Kx{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,r){let{type:o,from:a,to:c}=e;if(a>=n||c<=t)return;o.isTop&&(r=this.highlighters.filter(m=>!m.scope||m.scope(o)));let h=s,u=Jx(e)||uo.empty,f=Gx(r,u.tags);if(f&&(h&&(h+=" "),h+=f,u.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,a),h),u.opaque)return;let d=e.tree&&e.tree.prop(xe.mounted);if(d&&d.overlay){let m=e.node.enter(d.overlay[0].from+a,1),b=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),w=e.firstChild();for(let g=0,p=a;;g++){let O=g<d.overlay.length?d.overlay[g]:null,C=O?O.from+a:c,y=Math.max(t,p),E=Math.min(n,C);if(y<E&&w)for(;e.from<E&&(this.highlightRange(e,y,E,s,r),this.startSpan(Math.min(E,e.to),h),!(e.to>=C||!e.nextSibling())););if(!O||C>n)break;p=O.to+a,p>t&&(this.highlightRange(m.cursor(),Math.max(t,O.from+a),Math.min(n,p),"",b),this.startSpan(Math.min(n,p),h))}w&&e.parent()}else if(e.firstChild()){d&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,r),this.startSpan(Math.min(n,e.to),h)}while(e.nextSibling());e.parent()}}}function Jx(i){let e=i.type.prop(Ip);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const ie=Ft.define,fo=ie(),Ki=ie(),Fp=ie(Ki),jp=ie(Ki),Ji=ie(),po=ie(Ji),ic=ie(Ji),gi=ie(),_n=ie(gi),Oi=ie(),_i=ie(),nc=ie(),Fs=ie(nc),mo=ie(),L={comment:fo,lineComment:ie(fo),blockComment:ie(fo),docComment:ie(fo),name:Ki,variableName:ie(Ki),typeName:Fp,tagName:ie(Fp),propertyName:jp,attributeName:ie(jp),className:ie(Ki),labelName:ie(Ki),namespace:ie(Ki),macroName:ie(Ki),literal:Ji,string:po,docString:ie(po),character:ie(po),attributeValue:ie(po),number:ic,integer:ie(ic),float:ie(ic),bool:ie(Ji),regexp:ie(Ji),escape:ie(Ji),color:ie(Ji),url:ie(Ji),keyword:Oi,self:ie(Oi),null:ie(Oi),atom:ie(Oi),unit:ie(Oi),modifier:ie(Oi),operatorKeyword:ie(Oi),controlKeyword:ie(Oi),definitionKeyword:ie(Oi),moduleKeyword:ie(Oi),operator:_i,derefOperator:ie(_i),arithmeticOperator:ie(_i),logicOperator:ie(_i),bitwiseOperator:ie(_i),compareOperator:ie(_i),updateOperator:ie(_i),definitionOperator:ie(_i),typeOperator:ie(_i),controlOperator:ie(_i),punctuation:nc,separator:ie(nc),bracket:Fs,angleBracket:ie(Fs),squareBracket:ie(Fs),paren:ie(Fs),brace:ie(Fs),content:gi,heading:_n,heading1:ie(_n),heading2:ie(_n),heading3:ie(_n),heading4:ie(_n),heading5:ie(_n),heading6:ie(_n),contentSeparator:ie(gi),list:ie(gi),quote:ie(gi),emphasis:ie(gi),strong:ie(gi),link:ie(gi),monospace:ie(gi),strikethrough:ie(gi),inserted:ie(),deleted:ie(),changed:ie(),invalid:ie(),meta:mo,documentMeta:ie(mo),annotation:ie(mo),processingInstruction:ie(mo),definition:Ft.defineModifier("definition"),constant:Ft.defineModifier("constant"),function:Ft.defineModifier("function"),standard:Ft.defineModifier("standard"),local:Ft.defineModifier("local"),special:Ft.defineModifier("special")};for(let i in L){let e=L[i];e instanceof Ft&&(e.name=i)}Up([{tag:L.link,class:"tok-link"},{tag:L.heading,class:"tok-heading"},{tag:L.emphasis,class:"tok-emphasis"},{tag:L.strong,class:"tok-strong"},{tag:L.keyword,class:"tok-keyword"},{tag:L.atom,class:"tok-atom"},{tag:L.bool,class:"tok-bool"},{tag:L.url,class:"tok-url"},{tag:L.labelName,class:"tok-labelName"},{tag:L.inserted,class:"tok-inserted"},{tag:L.deleted,class:"tok-deleted"},{tag:L.literal,class:"tok-literal"},{tag:L.string,class:"tok-string"},{tag:L.number,class:"tok-number"},{tag:[L.regexp,L.escape,L.special(L.string)],class:"tok-string2"},{tag:L.variableName,class:"tok-variableName"},{tag:L.local(L.variableName),class:"tok-variableName tok-local"},{tag:L.definition(L.variableName),class:"tok-variableName tok-definition"},{tag:L.special(L.variableName),class:"tok-variableName2"},{tag:L.definition(L.propertyName),class:"tok-propertyName tok-definition"},{tag:L.typeName,class:"tok-typeName"},{tag:L.namespace,class:"tok-namespace"},{tag:L.className,class:"tok-className"},{tag:L.macroName,class:"tok-macroName"},{tag:L.propertyName,class:"tok-propertyName"},{tag:L.operator,class:"tok-operator"},{tag:L.comment,class:"tok-comment"},{tag:L.meta,class:"tok-meta"},{tag:L.invalid,class:"tok-invalid"},{tag:L.punctuation,class:"tok-punctuation"}]);var sc;const jn=new xe;function qp(i){return ce.define({combine:i?e=>e.concat(i):void 0})}const rc=new xe;class Jt{constructor(e,t,n=[],s=""){this.data=e,this.name=s,Se.prototype.hasOwnProperty("tree")||Object.defineProperty(Se.prototype,"tree",{get(){return st(this)}}),this.parser=t,this.extension=[en.of(this),Se.languageData.of((r,o,a)=>{let c=Xp(r,o,a),h=c.type.prop(jn);if(!h)return[];let u=r.facet(h),f=c.type.prop(rc);if(f){let d=c.resolve(o-c.from,a);for(let m of f)if(m.test(d,r)){let b=r.facet(m.facet);return m.type=="replace"?b:b.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Xp(e,t,n).type.prop(jn)==this.data}findRegions(e){let t=e.facet(en);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(r,o)=>{if(r.prop(jn)==this.data){n.push({from:o,to:o+r.length});return}let a=r.prop(xe.mounted);if(a){if(a.tree.prop(jn)==this.data){if(a.overlay)for(let c of a.overlay)n.push({from:c.from+o,to:c.to+o});else n.push({from:o,to:o+r.length});return}else if(a.overlay){let c=n.length;if(s(a.tree,a.overlay[0].from+o),n.length>c)return}}for(let c=0;c<r.children.length;c++){let h=r.children[c];h instanceof et&&s(h,r.positions[c]+o)}};return s(st(e),0),n}get allowsNesting(){return!0}}Jt.setState=we.define();function Xp(i,e,t){let n=i.facet(en),s=st(i).topNode;if(!n||n.allowsNesting)for(let r=s;r;r=r.enter(e,t,nt.ExcludeBuffers))r.type.isTop&&(s=r);return s}class go extends Jt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=qp(e.languageData);return new go(t,e.parser.configure({props:[jn.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new go(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function st(i){let e=i.field(Jt.state,!1);return e?e.tree:et.empty}class eS{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let js=null;class Oo{constructor(e,t,n=[],s,r,o,a,c){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Oo(e,t,[],et.empty,0,n,[],null)}startParse(){return this.parser.startParse(new eS(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=et.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(On.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(On.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=js;js=this;try{return e()}finally{js=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Wp(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,u,f,d)=>c.push({fromA:h,toA:u,fromB:f,toB:d})),n=On.applyChanges(n,c),s=et.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let u=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);u<f&&a.push({from:u,to:f})}}}return new Oo(this.parser,t,n,s,r,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:r}=this.skipped[n];s<e.to&&r>e.from&&(this.fragments=Wp(this.fragments,s,r),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends vp{createParse(t,n,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let c=js;if(c){for(let h of s)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new et(Pt.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return js}}function Wp(i,e,t){return On.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class qn{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new qn(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Oo.create(e.facet(en).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new qn(n)}}Jt.state=rt.define({create:qn.init,update(i,e){for(let t of e.effects)if(t.is(Jt.setState))return t.value;return e.startState.facet(en)!=e.state.facet(en)?qn.init(e.state):i.apply(e)}});let Yp=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Yp=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const oc=typeof navigator<"u"&&(!((sc=navigator.scheduling)===null||sc===void 0)&&sc.isInputPending)?()=>navigator.scheduling.isInputPending():null,tS=Ge.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Jt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Jt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Yp(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,r=n.field(Jt.state);if(r.tree==r.context.tree&&r.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!oc?Math.max(25,e.timeRemaining()-5):1e9),a=r.context.treeLen<s&&n.doc.length>s+1e3,c=r.context.work(()=>oc&&oc()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Jt.setState.of(new qn(r.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Qt(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),en=ce.define({combine(i){return i.length?i[0]:null},enables:i=>[Jt.state,tS,se.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class iS{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const nS=ce.define(),qs=ce.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function _o(i){let e=i.facet(qs);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function Xs(i,e){let t="",n=i.tabSize,s=i.facet(qs)[0];if(s==" "){for(;e>=n;)t+=" ",e-=n;s=" "}for(let r=0;r<e;r++)t+=s;return t}function lc(i,e){i instanceof Se&&(i=new bo(i));for(let n of i.state.facet(nS)){let s=n(i,e);if(s!==void 0)return s}let t=st(i.state);return t.length>=e?sS(i,t,e):null}class bo{constructor(e,t={}){this.state=e,this.options=t,this.unit=_o(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=n.from&&s<=n.to?r&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.countColumn(n,e-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return Ln(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const zp=new xe;function sS(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let r=[];for(let o=s;o&&!(o.from==n.node.from&&o.type==n.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)n={node:r[o],next:n}}return Gp(n,i,t)}function Gp(i,e,t){for(let n=i;n;n=n.next){let s=oS(n.node);if(s)return s(ac.create(e,t,n))}return 0}function rS(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function oS(i){let e=i.type.prop(zp);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(xe.closedBy))){let s=i.lastChild,r=s&&n.indexOf(s.name)>-1;return o=>Hp(o,!0,1,void 0,r&&!rS(o)?s.from:void 0)}return i.parent==null?lS:null}function lS(){return 0}class ac extends bo{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new ac(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(aS(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Gp(this.context.next,this.base,this.pos)}}function aS(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function cS(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,r=i.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let a=t.to;;){let c=e.childAfter(a);if(!c||c==n)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}a=c.to}}function hS({closing:i,align:e=!0,units:t=1}){return n=>Hp(n,e,t,i)}function Hp(i,e,t,n,s){let r=i.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==i.pos+o,c=e?cS(i):null;return c?a?i.column(c.from):i.column(c.to):i.baseIndent+(a?0:i.unit*t)}const uS=i=>i.baseIndent;function cc({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const fS=200;function dS(){return Se.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+fS)return i;let r=t.sliceString(s.from,n);if(!e.some(h=>h.test(r)))return i;let{state:o}=i,a=-1,c=[];for(let{head:h}of o.selection.ranges){let u=o.doc.lineAt(h);if(u.from==a)continue;a=u.from;let f=lc(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],m=Xs(o,f);d!=m&&c.push({from:u.from,to:u.from+d.length,insert:m})}return c.length?[i,{changes:c,sequential:!0}]:i})}const pS=ce.define(),Kp=new xe;function mS(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function gS(i,e,t){let n=st(i);if(n.length<t)return null;let s=n.resolveStack(t,1),r=null;for(let o=s;o;o=o.next){let a=o.node;if(a.to<=t||a.from>t)continue;if(r&&a.from<e)break;let c=a.type.prop(Kp);if(c&&(a.to<n.length-50||n.length==i.doc.length||!OS(a))){let h=c(a,i);h&&h.from<=t&&h.from>=e&&h.to>t&&(r=h)}}return r}function OS(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function yo(i,e,t){for(let n of i.facet(pS)){let s=n(i,e,t);if(s)return s}return gS(i,e,t)}function Jp(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const wo=we.define({map:Jp}),Ws=we.define({map:Jp});function em(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const bn=rt.define({create(){return de.none},update(i,e){i=i.map(e.changes);for(let t of e.effects)if(t.is(wo)&&!_S(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(hc),s=n?de.replace({widget:new xS(n(e.state,t.value))}):rm;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Ws)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;i.between(n,n,(s,r)=>{s<n&&r>n&&(t=!0)}),t&&(i=i.update({filterFrom:n,filterTo:n,filter:(s,r)=>r<=n||s>=n}))}return i},provide:i=>se.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(rm.range(n,s))}return de.set(e,!0)}});function ko(i,e,t){var n;let s=null;return(n=i.field(bn,!1))===null||n===void 0||n.between(e,t,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function _S(i,e,t){let n=!1;return i.between(e,e,(s,r)=>{s==e&&r==t&&(n=!0)}),n}function tm(i,e){return i.field(bn,!1)?e:e.concat(we.appendConfig.of(nm()))}const bS=i=>{for(let e of em(i)){let t=yo(i.state,e.from,e.to);if(t)return i.dispatch({effects:tm(i.state,[wo.of(t),im(i,t)])}),!0}return!1},yS=i=>{if(!i.state.field(bn,!1))return!1;let e=[];for(let t of em(i)){let n=ko(i.state,t.from,t.to);n&&e.push(Ws.of(n),im(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function im(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return se.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const wS=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:bS},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:yS},{key:"Ctrl-Alt-[",run:i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),r=yo(e,s.from,s.to);r&&t.push(wo.of(r)),n=(r?i.lineBlockAt(r.to):s).to+1}return t.length&&i.dispatch({effects:tm(i.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:i=>{let e=i.state.field(bn,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Ws.of({from:n,to:s}))}),i.dispatch({effects:t}),!0}}],kS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},hc=ce.define({combine(i){return hi(i,kS)}});function nm(i){let e=[bn,AS];return i&&e.push(hc.of(i)),e}function sm(i,e){let{state:t}=i,n=t.facet(hc),s=o=>{let a=i.lineBlockAt(i.posAtDOM(o.target)),c=ko(i.state,a.from,a.to);c&&i.dispatch({effects:Ws.of(c)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const rm=de.replace({widget:new class extends fi{toDOM(i){return sm(i,null)}}});class xS extends fi{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return sm(e,this.value)}}const SS={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class uc extends $i{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function CS(i={}){let e=Object.assign(Object.assign({},SS),i),t=new uc(e,!0),n=new uc(e,!1),s=Ge.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(en)!=o.state.facet(en)||o.startState.field(bn,!1)!=o.state.field(bn,!1)||st(o.startState)!=st(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Qi;for(let c of o.viewportLineBlocks){let h=ko(o.state,c.from,c.to)?n:yo(o.state,c.from,c.to)?t:null;h&&a.add(c.from,c.from,h)}return a.finish()}}),{domEventHandlers:r}=e;return[s,Qx({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(s))===null||a===void 0?void 0:a.markers)||Ee.empty},initialSpacer(){return new uc(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,a,c)=>{if(r.click&&r.click(o,a,c))return!0;let h=ko(o.state,a.from,a.to);if(h)return o.dispatch({effects:Ws.of(h)}),!0;let u=yo(o.state,a.from,a.to);return u?(o.dispatch({effects:wo.of(u)}),!0):!1}})}),nm()]}const AS=se.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Ys{constructor(e,t){this.specs=e;let n;function s(a){let c=qi.newName();return(n||(n=Object.create(null)))["."+c]=a,c}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Jt?a=>a.prop(jn)==o.data:o?a=>a==o:void 0,this.style=Up(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:r}).style,this.module=n?new qi(n):null,this.themeType=t.themeType}static define(e,t){return new Ys(e,t||{})}}const fc=ce.define(),om=ce.define({combine(i){return i.length?[i[0]]:null}});function dc(i){let e=i.facet(fc);return e.length?e:i.facet(om)}function lm(i,e){let t=[PS],n;return i instanceof Ys&&(i.module&&t.push(se.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(om.of(i)):n?t.push(fc.computeN([se.darkTheme],s=>s.facet(se.darkTheme)==(n=="dark")?[i]:[])):t.push(fc.of(i)),t}class QS{constructor(e){this.markCache=Object.create(null),this.tree=st(e.state),this.decorations=this.buildDeco(e,dc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=st(e.state),n=dc(e.state),s=n!=dc(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!s&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return de.none;let n=new Qi;for(let{from:s,to:r}of e.visibleRanges)Hx(this.tree,t,(o,a,c)=>{n.add(o,a,this.markCache[c]||(this.markCache[c]=de.mark({class:c})))},s,r);return n.finish()}}const PS=ji.high(Ge.fromClass(QS,{decorations:i=>i.decorations})),TS=Ys.define([{tag:L.meta,color:"#404740"},{tag:L.link,textDecoration:"underline"},{tag:L.heading,textDecoration:"underline",fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.keyword,color:"#708"},{tag:[L.atom,L.bool,L.url,L.contentSeparator,L.labelName],color:"#219"},{tag:[L.literal,L.inserted],color:"#164"},{tag:[L.string,L.deleted],color:"#a11"},{tag:[L.regexp,L.escape,L.special(L.string)],color:"#e40"},{tag:L.definition(L.variableName),color:"#00f"},{tag:L.local(L.variableName),color:"#30a"},{tag:[L.typeName,L.namespace],color:"#085"},{tag:L.className,color:"#167"},{tag:[L.special(L.variableName),L.macroName],color:"#256"},{tag:L.definition(L.propertyName),color:"#00c"},{tag:L.comment,color:"#940"},{tag:L.invalid,color:"#f00"}]),ES=se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),am=1e4,cm="()[]{}",hm=ce.define({combine(i){return hi(i,{afterCursor:!0,brackets:cm,maxScanDistance:am,renderMatch:RS})}}),$S=de.mark({class:"cm-matchingBracket"}),NS=de.mark({class:"cm-nonmatchingBracket"});function RS(i){let e=[],t=i.matched?$S:NS;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const VS=[rt.define({create(){return de.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(hm);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=bi(e.state,s.head,-1,n)||s.head>0&&bi(e.state,s.head-1,1,n)||n.afterCursor&&(bi(e.state,s.head,1,n)||s.head<e.state.doc.length&&bi(e.state,s.head+1,-1,n));r&&(t=t.concat(n.renderMatch(r,e.state)))}return de.set(t,!0)},provide:i=>se.decorations.from(i)}),ES];function LS(i={}){return[hm.of(i),VS]}const MS=new xe;function pc(i,e,t){let n=i.prop(e<0?xe.openedBy:xe.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function mc(i){let e=i.type.prop(MS);return e?e(i.node):i}function bi(i,e,t,n={}){let s=n.maxScanDistance||am,r=n.brackets||cm,o=st(i),a=o.resolveInner(e,t);for(let c=a;c;c=c.parent){let h=pc(c.type,t,r);if(h&&c.from<c.to){let u=mc(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return BS(i,e,t,c,u,h,r)}}return DS(i,e,t,o,a.type,s,r)}function BS(i,e,t,n,s,r,o){let a=n.parent,c={from:s.from,to:s.to},h=0,u=a==null?void 0:a.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(h==0&&r.indexOf(u.type.name)>-1&&u.from<u.to){let f=mc(u);return{start:c,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(pc(u.type,t,o))h++;else if(pc(u.type,-t,o)){if(h==0){let f=mc(u);return{start:c,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}h--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function DS(i,e,t,n,s,r,o){let a=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),c=o.indexOf(a);if(c<0||c%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},u=i.doc.iterRange(e,t>0?i.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=r;){let m=u.value;t<0&&(d+=m.length);let b=e+d*t;for(let w=t>0?0:m.length-1,g=t>0?m.length:-1;w!=g;w+=t){let p=o.indexOf(m[w]);if(!(p<0||n.resolveInner(b+w,1).type!=s))if(p%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:b+w,to:b+w+1},matched:p>>1==c>>1};f--}}t>0&&(d+=m.length)}return u.done?{start:h,matched:!1}:null}const vS=Object.create(null),um=[Pt.none],fm=[],dm=Object.create(null),ZS=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ZS[i]=IS(vS,e);function gc(i,e){fm.indexOf(i)>-1||(fm.push(i),console.warn(e))}function IS(i,e){let t=[];for(let a of e.split(" ")){let c=[];for(let h of a.split(".")){let u=i[h]||L[h];u?typeof u=="function"?c.length?c=c.map(u):gc(h,`Modifier ${h} used at start of tag`):c.length?gc(h,`Tag ${h} used as modifier`):c=Array.isArray(u)?u:[u]:gc(h,`Unknown highlighting tag ${h}`)}for(let h of c)t.push(h)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(a=>a.id),r=dm[s];if(r)return r.id;let o=dm[s]=Pt.define({id:um.length,name:n,props:[Zp({[n]:t})]});return um.push(o),o.id}Ze.RTL,Ze.LTR;const US=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=_c(i.state,t.from);return n.line?FS(i):n.block?qS(i):!1};function Oc(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const FS=Oc(YS,0),jS=Oc(pm,0),qS=Oc((i,e)=>pm(i,e,WS(e)),0);function _c(i,e){let t=i.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const zs=50;function XS(i,{open:e,close:t},n,s){let r=i.sliceDoc(n-zs,n),o=i.sliceDoc(s,s+zs),a=/\s*$/.exec(r)[0].length,c=/^\s*/.exec(o)[0].length,h=r.length-a;if(r.slice(h-e.length,h)==e&&o.slice(c,c+t.length)==t)return{open:{pos:n-a,margin:a&&1},close:{pos:s+c,margin:c&&1}};let u,f;s-n<=2*zs?u=f=i.sliceDoc(n,s):(u=i.sliceDoc(n,n+zs),f=i.sliceDoc(s-zs,s));let d=/^\s*/.exec(u)[0].length,m=/\s*$/.exec(f)[0].length,b=f.length-m-t.length;return u.slice(d,d+e.length)==e&&f.slice(b,b+t.length)==t?{open:{pos:n+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:s-m-t.length,margin:/\s/.test(f.charAt(b-1))?1:0}}:null}function WS(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function pm(i,e,t=e.selection.ranges){let n=t.map(r=>_c(e,r.from).block);if(!n.every(r=>r))return null;let s=t.map((r,o)=>XS(e,n[o],r.from,r.to));if(i!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:n[o].open+" "},{from:r.to,insert:" "+n[o].close}]))};if(i!=1&&s.some(r=>r)){let r=[];for(let o=0,a;o<s.length;o++)if(a=s[o]){let c=n[o],{open:h,close:u}=a;r.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:u.pos-u.margin,to:u.pos+c.close.length})}return{changes:r}}return null}function YS(i,e,t=e.selection.ranges){let n=[],s=-1;for(let{from:r,to:o}of t){let a=n.length,c=1e9,h=_c(e,r).line;if(h){for(let u=r;u<=o;){let f=e.doc.lineAt(u);if(f.from>s&&(r==o||o>f.from)){s=f.from;let d=/^\s*/.exec(f.text)[0].length,m=d==f.length,b=f.text.slice(d,d+h.length)==h?d:-1;d<f.text.length&&d<c&&(c=d),n.push({line:f,comment:b,token:h,indent:d,empty:m,single:!1})}u=f.to+1}if(c<1e9)for(let u=a;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=c);n.length==a+1&&(n[a].single=!0)}}if(i!=2&&n.some(r=>r.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:a,token:c,indent:h,empty:u,single:f}of n)(f||!u)&&r.push({from:a.from+h,insert:c+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:a,token:c}of n)if(a>=0){let h=o.from+a,u=h+c.length;o.text[u-o.from]==" "&&u++,r.push({from:h,to:u})}return{changes:r}}return null}const bc=Ai.define(),zS=Ai.define(),GS=ce.define(),mm=ce.define({combine(i){return hi(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),gm=rt.define({create(){return yi.empty},update(i,e){let t=e.state.facet(mm),n=e.annotation(bc);if(n){let c=Et.fromTransaction(e,n.selection),h=n.side,u=h==0?i.undone:i.done;return c?u=So(u,u.length,t.minDepth,c):u=bm(u,e.startState.selection),new yi(h==0?n.rest:u,h==0?u:n.rest)}let s=e.annotation(zS);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(Ke.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let r=Et.fromTransaction(e),o=e.annotation(Ke.time),a=e.annotation(Ke.userEvent);return r?i=i.addChanges(r,o,a,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new yi(i.done.map(Et.fromJSON),i.undone.map(Et.fromJSON))}});function HS(i={}){return[gm,mm.of(i),se.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Om:e.inputType=="historyRedo"?yc:null;return n?(e.preventDefault(),n(t)):!1}})]}function xo(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(gm,!1);if(!s)return!1;let r=s.pop(i,t,e);return r?(n(r),!0):!1}}const Om=xo(0,!1),yc=xo(1,!1),KS=xo(0,!0),JS=xo(1,!0);class Et{constructor(e,t,n,s,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Et(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Et(e.changes&&it.fromJSON(e.changes),[],e.mapped&&ci.fromJSON(e.mapped),e.startSelection&&j.fromJSON(e.startSelection),e.selectionsAfter.map(j.fromJSON))}static fromTransaction(e,t){let n=jt;for(let s of e.startState.facet(GS)){let r=s(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Et(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,jt)}static selection(e){return new Et(void 0,jt,void 0,void 0,e)}}function So(i,e,t,n){let s=e+1>t+20?e-t-1:0,r=i.slice(s,e);return r.push(n),r}function eC(i,e){let t=[],n=!1;return i.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,a)=>{for(let c=0;c<t.length;){let h=t[c++],u=t[c++];a>=h&&o<=u&&(n=!0)}}),n}function tC(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function _m(i,e){return i.length?e.length?i.concat(e):i:e}const jt=[],iC=200;function bm(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-iC));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),So(i,i.length-1,1e9,t.setSelAfter(n)))}else return[Et.selection([e])]}function nC(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function wc(i,e){if(!i.length)return i;let t=i.length,n=jt;for(;t;){let s=sC(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let r=i.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[Et.selection(n)]:jt}function sC(i,e,t){let n=_m(i.selectionsAfter.length?i.selectionsAfter.map(a=>a.map(e)):jt,t);if(!i.changes)return Et.selection(n);let s=i.changes.map(e),r=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(r):r;return new Et(s,we.mapEffects(i.effects,e),o,i.startSelection.map(r),n)}const rC=/^(input\.type|delete)($|\.)/;class yi{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new yi(this.done,this.undone):this}addChanges(e,t,n,s,r){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||rC.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,eC(a.changes,e.changes))||n=="input.type.compose")?o=So(o,o.length-1,s.minDepth,new Et(e.changes.compose(a.changes),_m(we.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,jt)):o=So(o,o.length,s.minDepth,e),new yi(o,jt,t,n)}addSelection(e,t,n,s){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:jt;return r.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&tC(r[r.length-1],e)?this:new yi(bm(this.done,e),this.undone,t,n)}addMapping(e){return new yi(wc(this.done,e),wc(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let r=s[s.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:bc.of({side:e,rest:nC(s),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let a=s.length==1?jt:s.slice(0,s.length-1);return r.mapped&&(a=wc(a,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:bc.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}yi.empty=new yi(jt,jt);const oC=[{key:"Mod-z",run:Om,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:yc,preventDefault:!0},{linux:"Ctrl-Shift-z",run:yc,preventDefault:!0},{key:"Mod-u",run:KS,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:JS,preventDefault:!0}];function Xn(i,e){return j.create(i.ranges.map(e),i.mainIndex)}function wi(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ei({state:i,dispatch:e},t){let n=Xn(i.selection,t);return n.eq(i.selection,!0)?!1:(e(wi(i,n)),!0)}function Co(i,e){return j.cursor(e?i.to:i.from)}function ym(i,e){return ei(i,t=>t.empty?i.moveByChar(t,e):Co(t,e))}function _t(i){return i.textDirectionAt(i.state.selection.main.head)==Ze.LTR}const wm=i=>ym(i,!_t(i)),km=i=>ym(i,_t(i));function xm(i,e){return ei(i,t=>t.empty?i.moveByGroup(t,e):Co(t,e))}const lC=i=>xm(i,!_t(i)),aC=i=>xm(i,_t(i));function cC(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function Ao(i,e,t){let n=st(i).resolveInner(e.head),s=t?xe.closedBy:xe.openedBy;for(let c=e.head;;){let h=t?n.childAfter(c):n.childBefore(c);if(!h)break;cC(i,h,s)?n=h:c=t?h.to:h.from}let r=n.type.prop(s),o,a;return r&&(o=t?bi(i,n.from,1):bi(i,n.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?n.to:n.from,j.cursor(a,t?-1:1)}const hC=i=>ei(i,e=>Ao(i.state,e,!_t(i))),uC=i=>ei(i,e=>Ao(i.state,e,_t(i)));function Sm(i,e){return ei(i,t=>{if(!t.empty)return Co(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const Cm=i=>Sm(i,!1),Am=i=>Sm(i,!0);function Qm(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let r of i.state.facet(se.scrollMargins)){let o=r(i);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(n=Math.max(o==null?void 0:o.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function Pm(i,e){let t=Qm(i),{state:n}=i,s=Xn(n.selection,o=>o.empty?i.moveVertically(o,e,t.height):Co(o,e));if(s.eq(n.selection))return!1;let r;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),a=i.scrollDOM.getBoundingClientRect(),c=a.top+t.marginTop,h=a.bottom-t.marginBottom;o&&o.top>c&&o.bottom<h&&(r=se.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-c}))}return i.dispatch(wi(n,s),{effects:r}),!0}const Tm=i=>Pm(i,!1),kc=i=>Pm(i,!0);function tn(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let r=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&e.head!=n.from+r&&(s=j.cursor(n.from+r))}return s}const fC=i=>ei(i,e=>tn(i,e,!0)),dC=i=>ei(i,e=>tn(i,e,!1)),pC=i=>ei(i,e=>tn(i,e,!_t(i))),mC=i=>ei(i,e=>tn(i,e,_t(i))),gC=i=>ei(i,e=>j.cursor(i.lineBlockAt(e.head).from,1)),OC=i=>ei(i,e=>j.cursor(i.lineBlockAt(e.head).to,-1));function _C(i,e,t){let n=!1,s=Xn(i.selection,r=>{let o=bi(i,r.head,-1)||bi(i,r.head,1)||r.head>0&&bi(i,r.head-1,1)||r.head<i.doc.length&&bi(i,r.head+1,-1);if(!o||!o.end)return r;n=!0;let a=o.start.from==r.head?o.end.to:o.end.from;return t?j.range(r.anchor,a):j.cursor(a)});return n?(e(wi(i,s)),!0):!1}const bC=({state:i,dispatch:e})=>_C(i,e,!1);function qt(i,e){let t=Xn(i.state.selection,n=>{let s=e(n);return j.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(wi(i.state,t)),!0)}function Em(i,e){return qt(i,t=>i.moveByChar(t,e))}const $m=i=>Em(i,!_t(i)),Nm=i=>Em(i,_t(i));function Rm(i,e){return qt(i,t=>i.moveByGroup(t,e))}const yC=i=>Rm(i,!_t(i)),wC=i=>Rm(i,_t(i)),kC=i=>qt(i,e=>Ao(i.state,e,!_t(i))),xC=i=>qt(i,e=>Ao(i.state,e,_t(i)));function Vm(i,e){return qt(i,t=>i.moveVertically(t,e))}const Lm=i=>Vm(i,!1),Mm=i=>Vm(i,!0);function Bm(i,e){return qt(i,t=>i.moveVertically(t,e,Qm(i).height))}const Dm=i=>Bm(i,!1),vm=i=>Bm(i,!0),SC=i=>qt(i,e=>tn(i,e,!0)),CC=i=>qt(i,e=>tn(i,e,!1)),AC=i=>qt(i,e=>tn(i,e,!_t(i))),QC=i=>qt(i,e=>tn(i,e,_t(i))),PC=i=>qt(i,e=>j.cursor(i.lineBlockAt(e.head).from)),TC=i=>qt(i,e=>j.cursor(i.lineBlockAt(e.head).to)),Zm=({state:i,dispatch:e})=>(e(wi(i,{anchor:0})),!0),Im=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.doc.length})),!0),Um=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.selection.main.anchor,head:0})),!0),Fm=({state:i,dispatch:e})=>(e(wi(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),EC=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),$C=({state:i,dispatch:e})=>{let t=Po(i).map(({from:n,to:s})=>j.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:j.create(t),userEvent:"select"})),!0},NC=({state:i,dispatch:e})=>{let t=Xn(i.selection,n=>{let s=st(i),r=s.resolveStack(n.from,1);if(n.empty){let o=s.resolveStack(n.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:a}=o;if((a.from<n.from&&a.to>=n.to||a.to>n.to&&a.from<=n.from)&&o.next)return j.range(a.to,a.from)}return n});return t.eq(i.selection)?!1:(e(wi(i,t)),!0)},RC=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=j.create([t.main]):t.main.empty||(n=j.create([j.cursor(t.main.head)])),n?(e(wi(i,n)),!0):!1};function Gs(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(r=>{let{from:o,to:a}=r;if(o==a){let c=e(r);c<o?(t="delete.backward",c=Qo(i,c,!1)):c>o&&(t="delete.forward",c=Qo(i,c,!0)),o=Math.min(o,c),a=Math.max(a,c)}else o=Qo(i,o,!1),a=Qo(i,a,!0);return o==a?{range:r}:{changes:{from:o,to:a},range:j.cursor(o,o<r.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?se.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Qo(i,e,t){if(i instanceof se)for(let n of i.state.facet(se.atomicRanges).map(s=>s(i)))n.between(e,e,(s,r)=>{s<e&&r>e&&(e=t?r:s)});return e}const jm=(i,e,t)=>Gs(i,n=>{let s=n.from,{state:r}=i,o=r.doc.lineAt(s),a,c;if(t&&!e&&s>o.from&&s<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,s-o.from))){if(a[a.length-1]==" ")return s-1;let h=Ln(a,r.tabSize),u=h%_o(r)||_o(r);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)s--;c=s}else c=ut(o.text,s-o.from,e,e)+o.from,c==s&&o.number!=(e?r.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,s-o.from))&&(c=ut(o.text,c-o.from,!1,!1)+o.from);return c}),xc=i=>jm(i,!1,!0),qm=i=>jm(i,!0,!1),Xm=(i,e)=>Gs(i,t=>{let n=t.head,{state:s}=i,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let a=null;;){if(n==(e?r.to:r.from)){n==t.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let c=ut(r.text,n-r.from,e)+r.from,h=r.text.slice(Math.min(n,c)-r.from,Math.max(n,c)-r.from),u=o(h);if(a!=null&&u!=a)break;(h!=" "||n!=t.head)&&(a=u),n=c}return n}),Wm=i=>Xm(i,!1),VC=i=>Xm(i,!0),LC=i=>Gs(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),MC=i=>Gs(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),BC=i=>Gs(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),DC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Ae.of(["",""])},range:j.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},vC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,r=i.doc.lineAt(s),o=s==r.from?s-1:ut(r.text,s-r.from,!1)+r.from,a=s==r.to?s+1:ut(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:a,insert:i.doc.slice(s,a).append(i.doc.slice(o,s))},range:j.cursor(a)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Po(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),r=i.doc.lineAt(n.to);if(!n.empty&&n.to==r.from&&(r=i.doc.lineAt(n.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});t=r.number+1}return e}function Ym(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let r of Po(i)){if(t?r.to==i.doc.length:r.from==0)continue;let o=i.doc.lineAt(t?r.to+1:r.from-1),a=o.length+1;if(t){n.push({from:r.to,to:o.to},{from:r.from,insert:o.text+i.lineBreak});for(let c of r.ranges)s.push(j.range(Math.min(i.doc.length,c.anchor+a),Math.min(i.doc.length,c.head+a)))}else{n.push({from:o.from,to:r.from},{from:r.to,insert:i.lineBreak+o.text});for(let c of r.ranges)s.push(j.range(c.anchor-a,c.head-a))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:j.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const ZC=({state:i,dispatch:e})=>Ym(i,e,!1),IC=({state:i,dispatch:e})=>Ym(i,e,!0);function zm(i,e,t){if(i.readOnly)return!1;let n=[];for(let s of Po(i))t?n.push({from:s.from,insert:i.doc.slice(s.from,s.to)+i.lineBreak}):n.push({from:s.to,insert:i.lineBreak+i.doc.slice(s.from,s.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const UC=({state:i,dispatch:e})=>zm(i,e,!1),FC=({state:i,dispatch:e})=>zm(i,e,!0),jC=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(Po(e).map(({from:s,to:r})=>(s>0?s--:r<e.doc.length&&r++,{from:s,to:r}))),n=Xn(e.selection,s=>{let r;if(i.lineWrapping){let o=i.lineBlockAt(s.head),a=i.coordsAtPos(s.head,s.assoc||1);a&&(r=o.bottom+i.documentTop-a.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,r)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qC(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=st(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),r;return n&&s&&n.to<=e&&s.from>=e&&(r=n.type.prop(xe.closedBy))&&r.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const Gm=Hm(!1),XC=Hm(!0);function Hm(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:r,to:o}=s,a=e.doc.lineAt(r),c=!i&&r==o&&qC(e,r);i&&(r=o=(o<=a.to?a:e.doc.lineAt(o)).to);let h=new bo(e,{simulateBreak:r,simulateDoubleBreak:!!c}),u=lc(h,r);for(u==null&&(u=Ln(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;c?{from:r,to:o}=c:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let f=["",Xs(e,u)];return c&&f.push(Xs(e,h.lineIndent(a.from,-1))),{changes:{from:r,to:o,insert:Ae.of(f)},range:j.cursor(r+1+f[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Sc(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let a=i.doc.lineAt(o);a.number>t&&(n.empty||n.to>a.from)&&(e(a,s,n),t=a.number),o=a.to+1}let r=i.changes(s);return{changes:s,range:j.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}})}const WC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new bo(i,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Sc(i,(r,o,a)=>{let c=lc(n,r.from);if(c==null)return;/\S/.test(r.text)||(c=0);let h=/^\s*/.exec(r.text)[0],u=Xs(i,c);(h!=u||a.from<r.from+h.length)&&(t[r.from]=c,o.push({from:r.from,to:r.from+h.length,insert:u}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},Km=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Sc(i,(t,n)=>{n.push({from:t.from,insert:i.facet(qs)})}),{userEvent:"input.indent"})),!0),Jm=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Sc(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Ln(s,i.tabSize),o=0,a=Xs(i,Math.max(0,r-_o(i)));for(;o<s.length&&o<a.length&&s.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+s.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),YC=i=>(i.setTabFocusMode(),!0),zC=[{key:"Ctrl-b",run:wm,shift:$m,preventDefault:!0},{key:"Ctrl-f",run:km,shift:Nm},{key:"Ctrl-p",run:Cm,shift:Lm},{key:"Ctrl-n",run:Am,shift:Mm},{key:"Ctrl-a",run:gC,shift:PC},{key:"Ctrl-e",run:OC,shift:TC},{key:"Ctrl-d",run:qm},{key:"Ctrl-h",run:xc},{key:"Ctrl-k",run:LC},{key:"Ctrl-Alt-h",run:Wm},{key:"Ctrl-o",run:DC},{key:"Ctrl-t",run:vC},{key:"Ctrl-v",run:kc}],GC=[{key:"ArrowLeft",run:wm,shift:$m,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:lC,shift:yC,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:pC,shift:AC,preventDefault:!0},{key:"ArrowRight",run:km,shift:Nm,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:aC,shift:wC,preventDefault:!0},{mac:"Cmd-ArrowRight",run:mC,shift:QC,preventDefault:!0},{key:"ArrowUp",run:Cm,shift:Lm,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Zm,shift:Um},{mac:"Ctrl-ArrowUp",run:Tm,shift:Dm},{key:"ArrowDown",run:Am,shift:Mm,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Im,shift:Fm},{mac:"Ctrl-ArrowDown",run:kc,shift:vm},{key:"PageUp",run:Tm,shift:Dm},{key:"PageDown",run:kc,shift:vm},{key:"Home",run:dC,shift:CC,preventDefault:!0},{key:"Mod-Home",run:Zm,shift:Um},{key:"End",run:fC,shift:SC,preventDefault:!0},{key:"Mod-End",run:Im,shift:Fm},{key:"Enter",run:Gm,shift:Gm},{key:"Mod-a",run:EC},{key:"Backspace",run:xc,shift:xc},{key:"Delete",run:qm},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Wm},{key:"Mod-Delete",mac:"Alt-Delete",run:VC},{mac:"Mod-Backspace",run:MC},{mac:"Mod-Delete",run:BC}].concat(zC.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),HC=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:hC,shift:kC},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:uC,shift:xC},{key:"Alt-ArrowUp",run:ZC},{key:"Shift-Alt-ArrowUp",run:UC},{key:"Alt-ArrowDown",run:IC},{key:"Shift-Alt-ArrowDown",run:FC},{key:"Escape",run:RC},{key:"Mod-Enter",run:XC},{key:"Alt-l",mac:"Ctrl-l",run:$C},{key:"Mod-i",run:NC,preventDefault:!0},{key:"Mod-[",run:Jm},{key:"Mod-]",run:Km},{key:"Mod-Alt-\\",run:WC},{key:"Shift-Mod-k",run:jC},{key:"Shift-Mod-\\",run:bC},{key:"Mod-/",run:US},{key:"Alt-A",run:jS},{key:"Ctrl-m",mac:"Shift-Alt-m",run:YC}].concat(GC),KC={key:"Tab",run:Km,shift:Jm};function ve(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)eg(i,arguments[e]);return i}function eg(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)eg(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}const tg=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class Wn{constructor(e,t,n=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=r?a=>r(tg(a)):tg,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ct(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Dl(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ai(e);let s=this.normalize(t);if(s.length)for(let r=0,o=n;;r++){let a=s.charCodeAt(r),c=this.match(a,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(c)return this.value=c,this;break}o==n&&r<t.length&&t.charCodeAt(r)==a&&o++}}}match(e,t,n){let s=null;for(let r=0;r<this.matches.length;r+=2){let o=this.matches[r],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?s={from:this.matches[r+1],to:n}:(this.matches[r]++,a=!0)),a||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(Wn.prototype[Symbol.iterator]=function(){return this});const ig={from:-1,to:-1,match:/.*/.exec("")},Cc="gm"+(/x/.unicode==null?"":"u");class ng{constructor(e,t,n,s=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=ig,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new sg(e,t,n,s,r);this.re=new RegExp(t,Cc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let o=e.lineAt(s);this.curLineStart=o.from,this.matchPos=To(e,s),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=To(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Ac=new WeakMap;class Yn{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=Ac.get(e);if(!s||s.from>=n||s.to<=t){let a=new Yn(t,e.sliceString(t,n));return Ac.set(e,a),a}if(s.from==t&&s.to==n)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to<n&&(r+=e.sliceString(s.to,n)),Ac.set(e,new Yn(o,r)),new Yn(t,r.slice(t-o,n-o))}}class sg{constructor(e,t,n,s,r){this.text=e,this.to=r,this.done=!1,this.value=ig,this.matchPos=To(e,s),this.re=new RegExp(t,Cc+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Yn.get(e,s,this.chunkEnd(s+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=To(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ng.prototype[Symbol.iterator]=sg.prototype[Symbol.iterator]=function(){return this});function JC(i){try{return new RegExp(i,Cc),!0}catch{return!1}}function To(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}function Qc(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=ve("input",{class:"cm-textfield",name:"line",value:e}),n=ve("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),i.dispatch({effects:Eo.of(!1)}),i.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},ve("label",i.state.phrase("Go to line"),": ",t)," ",ve("button",{class:"cm-button",type:"submit"},i.state.phrase("go")));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=i,a=o.doc.lineAt(o.selection.main.head),[,c,h,u,f]=r,d=u?+u.slice(1):0,m=h?+h:a.number;if(h&&f){let g=m/100;c&&(g=g*(c=="-"?-1:1)+a.number/o.doc.lines),m=Math.round(o.doc.lines*g)}else h&&c&&(m=m*(c=="-"?-1:1)+a.number);let b=o.doc.line(Math.max(1,Math.min(o.doc.lines,m))),w=j.cursor(b.from+Math.max(0,Math.min(d,b.length)));i.dispatch({effects:[Eo.of(!1),se.scrollIntoView(w.from,{y:"center"})],selection:w}),i.focus()}return{dom:n}}const Eo=we.define(),rg=rt.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(Eo)&&(i=t.value);return i},provide:i=>Zs.from(i,e=>e?Qc:null)}),eA=i=>{let e=vs(i,Qc);if(!e){let t=[Eo.of(!0)];i.state.field(rg,!1)==null&&t.push(we.appendConfig.of([rg,tA])),i.dispatch({effects:t}),e=vs(i,Qc)}return e&&e.dom.querySelector("input").select(),!0},tA=se.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),iA={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},og=ce.define({combine(i){return hi(i,iA,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function nA(i){let e=[aA,lA];return i&&e.push(og.of(i)),e}const sA=de.mark({class:"cm-selectionMatch"}),rA=de.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lg(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=je.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=je.Word)}function oA(i,e,t,n){return i(e.sliceDoc(t,t+1))==je.Word&&i(e.sliceDoc(n-1,n))==je.Word}const lA=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(og),{state:t}=i,n=t.selection;if(n.ranges.length>1)return de.none;let s=n.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return de.none;let c=t.wordAt(s.head);if(!c)return de.none;o=t.charCategorizer(s.head),r=t.sliceDoc(c.from,c.to)}else{let c=s.to-s.from;if(c<e.minSelectionLength||c>200)return de.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(lg(o,t,s.from,s.to)&&oA(o,t,s.from,s.to)))return de.none}else if(r=t.sliceDoc(s.from,s.to),!r)return de.none}let a=[];for(let c of i.visibleRanges){let h=new Wn(t.doc,r,c.from,c.to);for(;!h.next().done;){let{from:u,to:f}=h.value;if((!o||lg(o,t,u,f))&&(s.empty&&u<=s.from&&f>=s.to?a.push(rA.range(u,f)):(u>=s.to||f<=s.from)&&a.push(sA.range(u,f)),a.length>e.maxMatches))return de.none}}return de.set(a)}},{decorations:i=>i.decorations}),aA=se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),cA=({state:i,dispatch:e})=>{let{selection:t}=i,n=j.create(t.ranges.map(s=>i.wordAt(s.head)||j.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function hA(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,a=new Wn(i.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Wn(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(c=>c.from==a.value.from))continue;if(r){let c=i.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const uA=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(r=>r.from===r.to))return cA({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(r=>i.sliceDoc(r.from,r.to)!=n))return!1;let s=hA(i,n);return s?(e(i.update({selection:i.selection.addRange(j.range(s.from,s.to),!1),effects:se.scrollIntoView(s.to)})),!0):!1},zn=ce.define({combine(i){return hi(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new xA(e),scrollToMatch:e=>se.scrollIntoView(e)})}});class ag{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||JC(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
32
- `:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new mA(this):new dA(this)}getCursor(e,t=0,n){let s=e.doc?e:Se.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Hn(this,s,t,n):Gn(this,s,t,n)}}class cg{constructor(e){this.spec=e}}function Gn(i,e,t,n){return new Wn(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:s=>s.toLowerCase(),i.wholeWord?fA(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function fA(i,e){return(t,n,s,r)=>((r>t||r+s.length<n)&&(r=Math.max(0,t-2),s=i.sliceString(r,Math.min(i.length,n+2))),(e($o(s,t-r))!=je.Word||e(No(s,t-r))!=je.Word)&&(e(No(s,n-r))!=je.Word||e($o(s,n-r))!=je.Word))}class dA extends cg{constructor(e){super(e)}nextMatch(e,t,n){let s=Gn(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Gn(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Gn(this.spec,e,r,s),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(r==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Gn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Gn(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Hn(i,e,t,n){return new ng(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?pA(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function $o(i,e){return i.slice(ut(i,e,!1),e)}function No(i,e){return i.slice(e,ut(i,e))}function pA(i){return(e,t,n)=>!n[0].length||(i($o(n.input,n.index))!=je.Word||i(No(n.input,n.index))!=je.Word)&&(i(No(n.input,n.index+n[0].length))!=je.Word||i($o(n.input,n.index+n[0].length))!=je.Word)}class mA extends cg{nextMatch(e,t,n){let s=Hn(this.spec,e,n,e.doc.length).next();return s.done&&(s=Hn(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let r=Math.max(t,n-s*1e4),o=Hn(this.spec,e,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==t||a.from>r+10))return a;if(r==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n<e.match.length?e.match[n]:t)}matchAll(e,t){let n=Hn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Hn(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Hs=we.define(),Pc=we.define(),nn=rt.define({create(i){return new Tc($c(i).create(),null)},update(i,e){for(let t of e.effects)t.is(Hs)?i=new Tc(t.value.create(),i.panel):t.is(Pc)&&(i=new Tc(i.query,t.value?Ec:null));return i},provide:i=>Zs.from(i,e=>e.panel)});class Tc{constructor(e,t){this.query=e,this.panel=t}}const gA=de.mark({class:"cm-searchMatch"}),OA=de.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_A=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(nn))}update(i){let e=i.state.field(nn);(e!=i.startState.field(nn)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return de.none;let{view:t}=this,n=new Qi;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:a,to:c}=r[s];for(;s<o-1&&c>r[s+1].from-2*250;)c=r[++s].to;i.highlight(t.state,a,c,(h,u)=>{let f=t.state.selection.ranges.some(d=>d.from==h&&d.to==u);n.add(h,u,f?OA:gA)})}return n.finish()}},{decorations:i=>i.decorations});function Ks(i){return e=>{let t=e.state.field(nn,!1);return t&&t.query.spec.valid?i(e,t):dg(e)}}const Ro=Ks((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=j.single(n.from,n.to),r=i.state.facet(zn);return i.dispatch({selection:s,effects:[Nc(i,n),r.scrollToMatch(s.main,i)],userEvent:"select.search"}),fg(i),!0}),Vo=Ks((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let r=j.single(s.from,s.to),o=i.state.facet(zn);return i.dispatch({selection:r,effects:[Nc(i,s),o.scrollToMatch(r.main,i)],userEvent:"select.search"}),fg(i),!0}),bA=Ks((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:j.create(t.map(n=>j.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),yA=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,r=[],o=0;for(let a=new Wn(i.doc,i.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(j.range(a.value.from,a.value.to))}return e(i.update({selection:j.create(r,o),userEvent:"select.search.matches"})),!0},hg=Ks((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,n,n);if(!r)return!1;let o=r,a=[],c,h,u=[];if(o.from==n&&o.to==s&&(h=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:h}),o=e.nextMatch(t,o.from,o.to),u.push(se.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),o){let f=a.length==0||a[0].from>=r.to?0:r.to-r.from-h.length;c=j.single(o.from-f,o.to-f),u.push(Nc(i,o)),u.push(t.facet(zn).scrollToMatch(c.main,i))}return i.dispatch({changes:a,selection:c,effects:u,userEvent:"input.replace"}),!0}),wA=Ks((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:se.announce.of(n),userEvent:"input.replace.all"}),!0});function Ec(i){return i.state.facet(zn).createPanel(i)}function $c(i,e){var t,n,s,r,o;let a=i.selection.main,c=a.empty||a.to>a.from+100?"":i.sliceDoc(a.from,a.to);if(e&&!c)return e;let h=i.facet(zn);return new ag({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function ug(i){let e=vs(i,Ec);return e&&e.dom.querySelector("[main-field]")}function fg(i){let e=ug(i);e&&e==i.root.activeElement&&e.select()}const dg=i=>{let e=i.state.field(nn,!1);if(e&&e.panel){let t=ug(i);if(t&&t!=i.root.activeElement){let n=$c(i.state,e.query.spec);n.valid&&i.dispatch({effects:Hs.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[Pc.of(!0),e?Hs.of($c(i.state,e.query.spec)):we.appendConfig.of(CA)]});return!0},pg=i=>{let e=i.state.field(nn,!1);if(!e||!e.panel)return!1;let t=vs(i,Ec);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:Pc.of(!1)}),!0},kA=[{key:"Mod-f",run:dg,scope:"editor search-panel"},{key:"F3",run:Ro,shift:Vo,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ro,shift:Vo,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:pg,scope:"editor search-panel"},{key:"Mod-Shift-l",run:yA},{key:"Mod-Alt-g",run:eA},{key:"Mod-d",run:uA,preventDefault:!0}];class xA{constructor(e){this.view=e;let t=this.query=e.state.field(nn).query.spec;this.commit=this.commit.bind(this),this.searchField=ve("input",{value:t.search,placeholder:Lt(e,"Find"),"aria-label":Lt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ve("input",{value:t.replace,placeholder:Lt(e,"Replace"),"aria-label":Lt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ve("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=ve("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=ve("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,r,o){return ve("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=ve("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>Ro(e),[Lt(e,"next")]),n("prev",()=>Vo(e),[Lt(e,"previous")]),n("select",()=>bA(e),[Lt(e,"all")]),ve("label",null,[this.caseField,Lt(e,"match case")]),ve("label",null,[this.reField,Lt(e,"regexp")]),ve("label",null,[this.wordField,Lt(e,"by word")]),...e.state.readOnly?[]:[ve("br"),this.replaceField,n("replace",()=>hg(e),[Lt(e,"replace")]),n("replaceAll",()=>wA(e),[Lt(e,"replace all")])],ve("button",{name:"close",onclick:()=>pg(e),"aria-label":Lt(e,"close"),type:"button"},["×"])])}commit(){let e=new ag({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Hs.of(e)}))}keydown(e){Lk(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Vo:Ro)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),hg(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(Hs)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(zn).top}}function Lt(i,e){return i.state.phrase(e)}const Lo=30,Mo=/[\s\.,:;?!]/;function Nc(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,r=Math.max(n.from,e-Lo),o=Math.min(s,t+Lo),a=i.state.sliceDoc(r,o);if(r!=n.from){for(let c=0;c<Lo;c++)if(!Mo.test(a[c+1])&&Mo.test(a[c])){a=a.slice(c);break}}if(o!=s){for(let c=a.length-1;c>a.length-Lo;c--)if(!Mo.test(a[c-1])&&Mo.test(a[c])){a=a.slice(0,c);break}}return se.announce.of(`${i.state.phrase("current match")}. ${a} ${i.state.phrase("on line")} ${n.number}.`)}const SA=se.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),CA=[nn,ji.low(_A),SA];class mg{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=st(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),r=s.search(bg(e,!1));return r<0?null:{from:n+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function gg(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function AA(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let r=1;r<s.length;r++)t[s[r]]=!0}let n=gg(e)+gg(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Og(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:AA(e);return s=>{let r=s.matchBefore(n);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function QA(i,e){return t=>{for(let n=st(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class _g{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function yn(i){return i.selection.main.from}function bg(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",r=n[n.length-1]!="$";return!s&&!r?i:new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const Rc=Ai.define();function PA(i,e,t,n){let{main:s}=i.selection,r=t-s.from,o=n-s.from;return Object.assign(Object.assign({},i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+r,a.from+o)!=i.sliceDoc(t,n))return{range:a};let c=i.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:c},range:j.cursor(a.from+r+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const yg=new WeakMap;function TA(i){if(!Array.isArray(i))return i;let e=yg.get(i);return e||yg.set(i,e=Og(i)),e}const Bo=we.define(),Js=we.define();class EA{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Ct(e,t),s=ai(n);this.chars.push(n);let r=e.slice(t,t+s),o=r.toUpperCase();this.folded.push(Ct(o==r?r.toLowerCase():o,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:r,byWord:o}=this;if(t.length==1){let O=Ct(e,0),C=ai(O),y=C==e.length?0:-100;if(O!=t[0])if(O==n[0])y+=-200;else return null;return this.ret(y,[0,C])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,h=0;if(a<0){for(let O=0,C=Math.min(e.length,200);O<C&&h<c;){let y=Ct(e,O);(y==t[h]||y==n[h])&&(s[h++]=O),O+=ai(y)}if(h<c)return null}let u=0,f=0,d=!1,m=0,b=-1,w=-1,g=/[a-z]/.test(e),p=!0;for(let O=0,C=Math.min(e.length,200),y=0;O<C&&f<c;){let E=Ct(e,O);a<0&&(u<c&&E==t[u]&&(r[u++]=O),m<c&&(E==t[m]||E==n[m]?(m==0&&(b=O),w=O+1,m++):m=0));let x,k=E<255?E>=48&&E<=57||E>=97&&E<=122?2:E>=65&&E<=90?1:0:(x=Dl(E))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!O||k==1&&g||y==0&&k!=0)&&(t[f]==E||n[f]==E&&(d=!0)?o[f++]=O:o.length&&(p=!1)),y=k,O+=ai(E)}return f==c&&o[0]==0&&p?this.result(-100+(d?-200:0),o,e):m==c&&b==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):m==c?this.ret(-200+-700-e.length,[b,w]):f==c?this.result(-100+(d?-200:0)+-700+(p?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],r=0;for(let o of t){let a=o+(this.astral?ai(Ct(n,o)):1);r&&s[r-1]==o?s[r-1]=a:(s[r++]=o,s[r++]=a)}return this.ret(e-n.length,s)}}class $A{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const ot=ce.define({combine(i){return hi(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:NA,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>wg(e(n),t(n)),optionClass:(e,t)=>n=>wg(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function wg(i,e){return i?e?i+" "+e:i:e}function NA(i,e,t,n,s,r){let o=i.textDirection==Ze.RTL,a=o,c=!1,h="top",u,f,d=e.left-s.left,m=s.right-e.right,b=n.right-n.left,w=n.bottom-n.top;if(a&&d<Math.min(b,m)?a=!1:!a&&m<Math.min(b,d)&&(a=!0),b<=(a?d:m))u=Math.max(s.top,Math.min(t.top,s.bottom-w))-e.top,f=Math.min(400,a?d:m);else{c=!0,f=Math.min(400,(o?e.right:s.right-e.left)-30);let O=s.bottom-e.bottom;O>=w||O>e.top?u=t.bottom-e.top:(h="bottom",u=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,p=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${u/g}px; max-width: ${f/p}px`,class:"cm-completionInfo-"+(c?o?"left-narrow":"right-narrow":a?"left":"right")}}function RA(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,c=0;for(let h=0;h<r.length;){let u=r[h++],f=r[h++];u>c&&o.appendChild(document.createTextNode(a.slice(c,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",c=f}return c<a.length&&o.appendChild(document.createTextNode(a.slice(c))),o},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Vc(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class VA{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,a=e.state.facet(ot);this.optionContent=RA(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Vc(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(t).open;for(let u=c.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<h.length){this.applyCompletion(e,h[+f[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ot).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:Js.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:r,selected:o,disabled:a}=n.open;(!s.open||s.open.options!=r)&&(this.range=Vc(r.length,o,e.state.facet(ot).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Vc(t.options.length,t.selected,this.view.state.facet(ot).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:s}=n;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(n);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Qt(this.view.state,o,"completion info")):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;n.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&MA(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(ot).positionInfo(this.view,t,s,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:c}=e[o],{section:h}=a;if(h){let d=typeof h=="string"?h:h.name;if(d!=r&&(o>n.from||n.from==0))if(r=d,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let m=s.appendChild(document.createElement("completion-section"));m.textContent=d}}const u=s.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let m=d(a,this.view.state,this.view,c);m&&u.appendChild(m)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function LA(i,e){return t=>new VA(t,i,e)}function MA(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function kg(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function BA(i,e){let t=[],n=null,s=h=>{t.push(h);let{section:u}=h.completion;if(u){n||(n=[]);let f=typeof u=="string"?u:u.name;n.some(d=>d.name==f)||n.push(typeof u=="string"?{name:f}:u)}},r=e.facet(ot);for(let h of i)if(h.hasResult()){let u=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new _g(f,h.source,u?u(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),d,m=r.filterStrict?new $A(f):new EA(f);for(let b of h.result.options)if(d=m.match(b.label)){let w=b.displayLabel?u?u(b,d.matched):[]:d.matched;s(new _g(b,h.source,w,d.score+(b.boost||0)))}}}if(n){let h=Object.create(null),u=0,f=(d,m)=>{var b,w;return((b=d.rank)!==null&&b!==void 0?b:1e9)-((w=m.rank)!==null&&w!==void 0?w:1e9)||(d.name<m.name?-1:1)};for(let d of n.sort(f))u-=1e5,h[d.name]=u;for(let d of t){let{section:m}=d.completion;m&&(d.score+=h[typeof m=="string"?m:m.name])}}let o=[],a=null,c=r.compareCompletions;for(let h of t.sort((u,f)=>f.score-u.score||c(u.completion,f.completion))){let u=h.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(h):kg(h.completion)>kg(a)&&(o[o.length-1]=h),a=h.completion}return o}class Kn{constructor(e,t,n,s,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Kn(this.options,xg(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,r,o){if(s&&!o&&e.some(h=>h.isPending))return s.setDisabled();let a=BA(e,t);if(!a.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let c=t.facet(ot).selectOnOpen?0:-1;if(s&&s.selected!=c&&s.selected!=-1){let h=s.options[s.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==h){c=u;break}}return new Kn(a,xg(n,c),{pos:e.reduce((h,u)=>u.hasResult()?Math.min(h,u.from):h,1e8),create:FA,above:r.aboveCursor},s?s.timestamp:Date.now(),c,!1)}map(e){return new Kn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Kn(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Do{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Do(IA,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(ot),r=(n.override||t.languageDataAt("autocomplete",yn(t)).map(TA)).map(c=>(this.active.find(u=>u.source==c)||new Xt(c,this.active.some(u=>u.state!=0)?1:0)).update(e,n));r.length==this.active.length&&r.every((c,h)=>c==this.active[h])&&(r=this.active);let o=this.open,a=e.effects.some(c=>c.is(Lc));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!DA(r,this.active)||a?o=Kn.build(r,t,this.id,o,n,a):o&&o.disabled&&!r.some(c=>c.isPending)&&(o=null),!o&&r.every(c=>!c.isPending)&&r.some(c=>c.hasResult())&&(r=r.map(c=>c.hasResult()?new Xt(c.source,0):c));for(let c of e.effects)c.is(Cg)&&(o=o&&o.setSelected(c.value,this.id));return r==this.active&&o==this.open?this:new Do(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?vA:ZA}}function DA(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,r=n==e.length;if(s||r)return s==r;if(i[t++].result!=e[n++].result)return!1}}const vA={"aria-autocomplete":"list"},ZA={};function xg(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const IA=[];function Sg(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(Rc);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class Xt{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Sg(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new Xt(s.source,0)),n&4&&s.state==0&&(s=new Xt(this.source,1)),s=s.updateFor(e,n);for(let r of e.effects)if(r.is(Bo))s=new Xt(s.source,1,r.value);else if(r.is(Js))s=new Xt(s.source,0);else if(r.is(Lc))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(yn(e.state))}}class Jn extends Xt{constructor(e,t,n,s,r,o){super(e,3,t),this.limit=n,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=yn(e.state);if(a>o||!s||t&2&&(yn(e.startState)==this.from||a<this.limit))return new Xt(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return UA(s.validFor,e.state,r,o)?new Jn(this.source,this.explicit,c,s,r,o):s.update&&(s=s.update(s,r,o,new mg(e.state,a,!1)))?new Jn(this.source,this.explicit,c,s,s.from,(n=s.to)!==null&&n!==void 0?n:yn(e.state)):new Xt(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Jn(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Xt(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function UA(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):bg(i,!0).test(s)}const Lc=we.define({map(i,e){return i.map(t=>t.map(e))}}),Cg=we.define(),$t=rt.define({create(){return Do.start()},update(i,e){return i.update(e)},provide:i=>[ja.from(i,e=>e.tooltip),se.contentAttributes.from(i,e=>e.attrs)]});function Mc(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field($t).active.find(s=>s.source==e.source);return n instanceof Jn?(typeof t=="string"?i.dispatch(Object.assign(Object.assign({},PA(i.state,t,n.from,n.to)),{annotations:Rc.of(e.completion)})):t(i,e.completion,n.from,n.to),!0):!1}const FA=LA($t,Mc);function vo(i,e="option"){return t=>{let n=t.state.field($t,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(ot).interactionDelay)return!1;let s=1,r;e=="page"&&(r=xp(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:Cg.of(a)}),!0}}const jA=i=>{let e=i.state.field($t,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(ot).interactionDelay?!1:Mc(i,e.open.options[e.open.selected])},Ag=i=>i.state.field($t,!1)?(i.dispatch({effects:Bo.of(!0)}),!0):!1,qA=i=>{let e=i.state.field($t,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:Js.of(null)}),!0)};class XA{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const WA=50,YA=1e3,zA=Ge.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field($t).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field($t),t=i.state.facet(ot);if(!i.selectionSet&&!i.docChanged&&i.startState.field($t)==e)return;let n=i.transactions.some(r=>{let o=Sg(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;r<this.running.length;r++){let o=this.running[r];if(n||o.context.abortOnDocChange&&i.docChanged||o.updates.length+i.transactions.length>WA&&Date.now()-o.time>YA){for(let a of o.context.abortListeners)try{a()}catch(c){Qt(this.view.state,c)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(r=>r.effects.some(o=>o.is(Bo)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of i.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field($t);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=yn(e),n=new mg(e,t,i.explicit,this.view),s=new XA(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Js.of(null)}),Qt(this.view.state,r)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ot),n=this.view.state.field($t);for(let s=0;s<this.running.length;s++){let r=this.running[s];if(r.done===void 0)continue;if(this.running.splice(s--,1),r.done){let a=yn(r.updates.length?r.updates[0].startState:this.view.state),c=Math.min(a,r.done.from+(r.active.explicit?0:1)),h=new Jn(r.active.source,r.active.explicit,c,r.done,r.done.from,(i=r.done.to)!==null&&i!==void 0?i:a);for(let u of r.updates)h=h.update(u,t);if(h.hasResult()){e.push(h);continue}}let o=n.active.find(a=>a.source==r.active.source);if(o&&o.isPending)if(r.done==null){let a=new Xt(r.active.source,0);for(let c of r.updates)a=a.update(c,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Lc.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field($t,!1);if(e&&e.tooltip&&this.view.state.facet(ot).closeOnBlur){let t=e.open&&xp(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Js.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Bo.of(!1)}),20),this.composing=0}}}),GA=typeof navigator=="object"&&/Win/.test(navigator.platform),HA=ji.highest(se.domEventHandlers({keydown(i,e){let t=e.state.field($t,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(GA&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(o=>o.source==n.source),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(i.key)>-1&&Mc(e,n),!1}})),Qg=se.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class KA{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class Bc{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,ft.TrackDel),n=e.mapPos(this.to,1,ft.TrackDel);return t==null||n==null?null:new Bc(this.field,t,n)}}class Dc{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let c of this.lines){if(n.length){let h=o,u=/^\t*/.exec(c)[0].length;for(let f=0;f<u;f++)h+=e.facet(qs);s.push(t+h.length-u),c=h+c.slice(u)}n.push(c),t+=c.length+1}let a=this.fieldPositions.map(c=>new Bc(c.field,s[c.line]+c.from,s[c.line]+c.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=r[1]?+r[1]:null,c=r[2]||r[3]||"",h=-1,u=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:u&&t[f].name==u)&&(h=f);if(h<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:u}),h=f;for(let d of s)d.field>=h&&d.field++}s.push(new KA(h,n.length,r.index,r.index+u.length)),o=o.slice(0,r.index)+c+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(a,c,h)=>{for(let u of s)u.line==n.length&&u.from>h&&(u.from--,u.to--);return c}),n.push(o)}return new Dc(n,s)}}let JA=de.widget({widget:new class extends fi{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),eQ=de.mark({class:"cm-snippetField"});class es{constructor(e,t){this.ranges=e,this.active=t,this.deco=de.set(e.map(n=>(n.from==n.to?JA:eQ).range(n.from,n.to)))}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new es(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const er=we.define({map(i,e){return i&&i.map(e)}}),tQ=we.define(),tr=rt.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(er))return t.value;if(t.is(tQ)&&i)return new es(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>se.decorations.from(i,e=>e?e.deco:de.none)});function vc(i,e){return j.create(i.filter(t=>t.field==e).map(t=>j.range(t.from,t.to)))}function iQ(i){let e=Dc.parse(i);return(t,n,s,r)=>{let{text:o,ranges:a}=e.instantiate(t.state,s),{main:c}=t.state.selection,h={changes:{from:s,to:r==c.from?c.to:r,insert:Ae.of(o)},scrollIntoView:!0,annotations:n?[Rc.of(n),Ke.userEvent.of("input.complete")]:void 0};if(a.length&&(h.selection=vc(a,0)),a.some(u=>u.field>0)){let u=new es(a,0),f=h.effects=[er.of(u)];t.state.field(tr,!1)===void 0&&f.push(we.appendConfig.of([tr,sQ,rQ,Qg]))}t.dispatch(t.state.update(h))}}function Pg(i){return({state:e,dispatch:t})=>{let n=e.field(tr,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,r=i>0&&!n.ranges.some(o=>o.field==s+i);return t(e.update({selection:vc(n.ranges,s),effects:er.of(r?null:new es(n.ranges,s)),scrollIntoView:!0})),!0}}const nQ=[{key:"Tab",run:Pg(1),shift:Pg(-1)},{key:"Escape",run:({state:i,dispatch:e})=>i.field(tr,!1)?(e(i.update({effects:er.of(null)})),!0):!1}],Tg=ce.define({combine(i){return i.length?i[0]:nQ}}),sQ=ji.highest(Vs.compute([Tg],i=>i.facet(Tg)));function Nt(i,e){return Object.assign(Object.assign({},e),{apply:iQ(i)})}const rQ=se.domEventHandlers({mousedown(i,e){let t=e.state.field(tr,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=n&&r.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:vc(t.ranges,s.field),effects:er.of(t.ranges.some(r=>r.field>s.field)?new es(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),ir={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},wn=we.define({map(i,e){let t=e.mapPos(i,-1,ft.TrackAfter);return t??void 0}}),Zc=new class extends dn{};Zc.startSide=1,Zc.endSide=-1;const Eg=rt.define({create(){return Ee.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(wn)&&(i=i.update({add:[Zc.range(t.value,t.value+1)]}));return i}});function oQ(){return[aQ,Eg]}const Ic="()[]{}<>";function $g(i){for(let e=0;e<Ic.length;e+=2)if(Ic.charCodeAt(e)==i)return Ic.charAt(e+1);return Dl(i<128?i:i+1)}function Ng(i,e){return i.languageDataAt("closeBrackets",e)[0]||ir}const lQ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),aQ=se.inputHandler.of((i,e,t,n)=>{if((lQ?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&ai(Ct(n,0))==1||e!=s.from||t!=s.to)return!1;let r=hQ(i.state,n);return r?(i.dispatch(r),!0):!1}),cQ=[{key:"Backspace",run:({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=Ng(i,i.selection.main.head).brackets||ir.brackets,s=null,r=i.changeByRange(o=>{if(o.empty){let a=uQ(i.doc,o.head);for(let c of n)if(c==a&&Zo(i.doc,o.head)==$g(Ct(c,0)))return{changes:{from:o.head-c.length,to:o.head+c.length},range:j.cursor(o.head-c.length)}}return{range:s=o}});return s||e(i.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function hQ(i,e){let t=Ng(i,i.selection.main.head),n=t.brackets||ir.brackets;for(let s of n){let r=$g(Ct(s,0));if(e==s)return r==s?pQ(i,s,n.indexOf(s+s+s)>-1,t):fQ(i,s,r,t.before||ir.before);if(e==r&&Rg(i,i.selection.main.from))return dQ(i,s,r)}return null}function Rg(i,e){let t=!1;return i.field(Eg).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function Zo(i,e){let t=i.sliceString(e,e+2);return t.slice(0,ai(Ct(t,0)))}function uQ(i,e){let t=i.sliceString(e-2,e);return ai(Ct(t,0))==t.length?t:t.slice(1)}function fQ(i,e,t,n){let s=null,r=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:wn.of(o.to+e.length),range:j.range(o.anchor+e.length,o.head+e.length)};let a=Zo(i.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:wn.of(o.head+e.length),range:j.cursor(o.head+e.length)}:{range:s=o}});return s?null:i.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function dQ(i,e,t){let n=null,s=i.changeByRange(r=>r.empty&&Zo(i.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:j.cursor(r.head+t.length)}:n={range:r});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function pQ(i,e,t,n){let s=n.stringPrefixes||ir.stringPrefixes,r=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:wn.of(a.to+e.length),range:j.range(a.anchor+e.length,a.head+e.length)};let c=a.head,h=Zo(i.doc,c),u;if(h==e){if(Vg(i,c))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(Rg(i,c)){let d=t&&i.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+d.length,insert:d},range:j.cursor(c+d.length)}}}else{if(t&&i.sliceDoc(c-2*e.length,c)==e+e&&(u=Lg(i,c-2*e.length,s))>-1&&Vg(i,u))return{changes:{insert:e+e+e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)};if(i.charCategorizer(c)(h)!=je.Word&&Lg(i,c,s)>-1&&!mQ(i,c,e,s))return{changes:{insert:e+e,from:c},effects:wn.of(c+e.length),range:j.cursor(c+e.length)}}return{range:r=a}});return r?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Vg(i,e){let t=st(i).resolveInner(e+1);return t.parent&&t.from==e}function mQ(i,e,t,n){let s=st(i).resolveInner(e,-1),r=n.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),c=a.indexOf(t);if(!c||c>-1&&n.indexOf(a.slice(0,c))>-1){let u=s.firstChild;for(;u&&u.from==s.from&&u.to-u.from>t.length+c;){if(i.sliceDoc(u.to-t.length,u.to)==t)return!1;u=u.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function Lg(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=je.Word)return e;for(let s of t){let r=e-s.length;if(i.sliceDoc(r,e)==s&&n(i.sliceDoc(r-1,r))!=je.Word)return r}return-1}function gQ(i={}){return[HA,$t,ot.of(i),zA,OQ,Qg]}const Mg=[{key:"Ctrl-Space",run:Ag},{mac:"Alt-`",run:Ag},{key:"Escape",run:qA},{key:"ArrowDown",run:vo(!0)},{key:"ArrowUp",run:vo(!1)},{key:"PageDown",run:vo(!0,"page")},{key:"PageUp",run:vo(!1,"page")},{key:"Enter",run:jA}],OQ=ji.highest(Vs.computeN([ot],i=>i.facet(ot).defaultKeymap?[Mg]:[]));class Bg{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class kn{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=e,r=n.facet(nr).markerFilter;r&&(s=r(s,n));let o=e.slice().sort((f,d)=>f.from-d.from||f.to-d.to),a=new Qi,c=[],h=0;for(let f=0;;){let d=f==o.length?null:o[f];if(!d&&!c.length)break;let m,b;for(c.length?(m=h,b=c.reduce((g,p)=>Math.min(g,p.to),d&&d.from>m?d.from:1e8)):(m=d.from,b=d.to,c.push(d),f++);f<o.length;){let g=o[f];if(g.from==m&&(g.to>g.from||g.to==m))c.push(g),f++,b=Math.min(g.to,b);else{b=Math.min(g.from,b);break}}let w=TQ(c);if(c.some(g=>g.from==g.to||g.from==g.to-1&&n.doc.lineAt(g.from).to==g.from))a.add(m,m,de.widget({widget:new CQ(w),diagnostics:c.slice()}));else{let g=c.reduce((p,O)=>O.markClass?p+" "+O.markClass:p,"");a.add(m,b,de.mark({class:"cm-lintRange cm-lintRange-"+w+g,diagnostics:c.slice(),inclusiveEnd:c.some(p=>p.to>b)}))}h=b;for(let g=0;g<c.length;g++)c[g].to<=h&&c.splice(g--,1)}let u=a.finish();return new kn(u,t,ts(u))}}function ts(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!n)n=new Bg(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new Bg(n.from,r,n.diagnostic)}}),n}function _Q(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(nr).hideOn(i,t,n);if(s!=null)return s;let r=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(o=>o.is(Dg))||i.changes.touchesRange(r.from,Math.max(r.to,n)))}function bQ(i,e){return i.field(Mt,!1)?e:e.concat(we.appendConfig.of(EQ))}const Dg=we.define(),Uc=we.define(),vg=we.define(),Mt=rt.define({create(){return new kn(de.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let r=e.changes.mapPos(i.selected.from,1);n=ts(t,i.selected.diagnostic,r)||ts(t,null,r)}!t.size&&s&&e.state.facet(nr).autoPanel&&(s=null),i=new kn(t,s,n)}for(let t of e.effects)if(t.is(Dg)){let n=e.state.facet(nr).autoPanel?t.value.length?sr.open:null:i.panel;i=kn.init(t.value,n,e.state)}else t.is(Uc)?i=new kn(i.diagnostics,t.value?sr.open:null,i.selected):t.is(vg)&&(i=new kn(i.diagnostics,i.panel,t.value));return i},provide:i=>[Zs.from(i,e=>e.panel),se.decorations.from(i,e=>e.diagnostics)]}),yQ=de.mark({class:"cm-lintRange cm-lintRange-active"});function wQ(i,e,t){let{diagnostics:n}=i.state.field(Mt),s,r=-1,o=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(c,h,{spec:u})=>{if(e>=c&&e<=h&&(c==h||(e>c||t>0)&&(e<h||t<0)))return s=u.diagnostics,r=c,o=h,!1});let a=i.state.facet(nr).tooltipFilter;return s&&a&&(s=a(s,i.state)),s?{pos:r,end:o,above:i.state.doc.lineAt(r).to<o,create(){return{dom:kQ(i,s)}}}:null}function kQ(i,e){return ve("ul",{class:"cm-tooltip-lint"},e.map(t=>Ug(i,t,!1)))}const xQ=i=>{let e=i.state.field(Mt,!1);(!e||!e.panel)&&i.dispatch({effects:bQ(i.state,[Uc.of(!0)])});let t=vs(i,sr.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Zg=i=>{let e=i.state.field(Mt,!1);return!e||!e.panel?!1:(i.dispatch({effects:Uc.of(!1)}),!0)},SQ=[{key:"Mod-Shift-m",run:xQ,preventDefault:!0},{key:"F8",run:i=>{let e=i.state.field(Mt,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],nr=ce.define({combine(i){return Object.assign({sources:i.map(e=>e.source).filter(e=>e!=null)},hi(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function Ig(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(r=>r.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Ug(i,e,t){var n;let s=t?Ig(e.actions):[];return ve("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ve("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((r,o)=>{let a=!1,c=d=>{if(d.preventDefault(),a)return;a=!0;let m=ts(i.state.field(Mt).diagnostics,e);m&&r.apply(i,m.from,m.to)},{name:h}=r,u=s[o]?h.indexOf(s[o]):-1,f=u<0?h:[h.slice(0,u),ve("u",h.slice(u,u+1)),h.slice(u+1)];return ve("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${h}${u<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&ve("div",{class:"cm-diagnosticSource"},e.source))}class CQ extends fi{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ve("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Fg{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ug(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class sr{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)Zg(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Ig(r.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==s.keyCode){let c=ts(this.view.state.field(Mt).diagnostics,r);c&&r.actions[a].apply(e,c.from,c.to)}}else return;s.preventDefault()},n=s=>{for(let r=0;r<this.items.length;r++)this.items[r].dom.contains(s.target)&&this.moveSelection(r)};this.list=ve("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=ve("div",{class:"cm-panel-lint"},this.list,ve("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Zg(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mt).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Mt),n=0,s=!1,r=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:h})=>{for(let u of h.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let m=n;m<this.items.length;m++)if(this.items[m].diagnostic==u){f=m;break}f<0?(d=new Fg(this.view,u),this.items.splice(n,0,d),s=!0):(d=this.items[f],f>n&&(this.items.splice(n,f-n),s=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),r=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new Fg(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let h=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/h:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Mt),n=ts(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:vg.of(n)})}static open(e){return new sr(e)}}function AQ(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function Io(i){return AQ(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const QQ=se.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Io("#d11")},".cm-lintRange-warning":{backgroundImage:Io("orange")},".cm-lintRange-info":{backgroundImage:Io("#999")},".cm-lintRange-hint":{backgroundImage:Io("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function PQ(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function TQ(i){let e="hint",t=1;for(let n of i){let s=PQ(n.severity);s>t&&(t=s,e=n.severity)}return e}const EQ=[Mt,se.decorations.compute([Mt],i=>{let{selected:e,panel:t}=i.field(Mt);return!e||!t||e.from==e.to?de.none:de.set([yQ.range(e.from,e.to)])}),xx(wQ,{hideOn:_Q}),QQ],$Q=(()=>[Vx(),Bx(),Kk(),HS(),CS(),Ik(),Xk(),Se.allowMultipleSelections.of(!0),dS(),lm(TS,{fallback:!0}),LS(),oQ(),gQ(),fx(),mx(),sx(),nA(),Vs.of([...cQ,...HC,...kA,...oC,...wS,...Mg,...SQ])])();/*!
21
+ */const ab="10.0.8";function cb(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ln().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ln().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ln().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ln().__INTLIFY_PROD_DEVTOOLS__=!1)}const Fi={FALLBACK_TO_ROOT:Q0,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},ub={[Fi.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Fi.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Fi.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Fi.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function xr(i,...e){return pr(ub[i],...e)}const Be={UNEXPECTED_RETURN_TYPE:g0,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function yt(i,...e){return Pn(i,null,process.env.NODE_ENV!=="production"?{messages:hb,args:e}:void 0)}const hb={[Be.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Be.INVALID_ARGUMENT]:"Invalid argument",[Be.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Be.NOT_INSTALLED]:"Need to install with `app.use` function",[Be.UNEXPECTED_ERROR]:"Unexpected error",[Be.REQUIRED_VALUE]:"Required in value: {0}",[Be.INVALID_VALUE]:"Invalid value",[Be.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Be.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Be.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Be.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},wl=ri("__translateVNode"),kl=ri("__datetimeParts"),xl=ri("__numberParts"),cn=ri("__enableEmitter"),fs=ri("__disableEmitter"),fh=ri("__setPluralRules"),dh=ri("__injectWithOption"),Sl=ri("__dispose");function ds(i){if(!Te(i)||It(i))return i;for(const e in i)if(Yt(i,e))if(!e.includes("."))Te(i[e])&&ds(i[e]);else{const t=e.split("."),n=t.length-1;let s=i,r=!1;for(let o=0;o<n;o++){if(t[o]==="__proto__")throw new Error(`unsafe key: ${t[o]}`);if(t[o]in s||(s[t[o]]=Me()),!Te(s[t[o]])){process.env.NODE_ENV!=="production"&&xi(xr(Fi.IGNORE_OBJ_FLATTEN,{key:t[o]})),r=!0;break}s=s[t[o]]}if(r||(It(s)?Mu.includes(t[n])||delete i[e]:(s[t[n]]=i[e],delete i[e])),!It(s)){const o=s[t[n]];Te(o)&&ds(o)}}return i}function Cl(i,e){const{messages:t,__i18n:n,messageResolver:s,flatJson:r}=e,o=xe(t)?t:je(n)?Me():{[i]:Me()};if(je(n)&&n.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:u}=a;c?(o[c]=o[c]||Me(),Or(u,o[c])):Or(u,o)}else te(a)&&Or(JSON.parse(a),o)}),s==null&&r)for(const a in o)Yt(o,a)&&ds(o[a]);return o}function ph(i){return i.type}function mh(i,e,t){let n=Te(e.messages)?e.messages:Me();"__i18nGlobal"in t&&(n=Cl(i.locale.value,{messages:n,__i18n:t.__i18nGlobal}));const s=Object.keys(n);s.length&&s.forEach(r=>{i.mergeLocaleMessage(r,n[r])});{if(Te(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{i.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(Te(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{i.mergeNumberFormat(o,e.numberFormats[o])})}}}function gh(i){return l.createVNode(l.Text,null,i,0)}const Oh="__INTLIFY_META__",_h=()=>[],fb=()=>!1;let bh=0;function yh(i){return(e,t,n,s)=>i(t,n,l.getCurrentInstance()||void 0,s)}const db=()=>{const i=l.getCurrentInstance();let e=null;return i&&(e=ph(i)[Oh])?{[Oh]:e}:null};function Al(i={}){const{__root:e,__injectWithOption:t}=i,n=e===void 0,s=i.flatJson,r=zt?l.ref:l.shallowRef;let o=Ne(i.inheritLocale)?i.inheritLocale:!0;const a=r(e&&o?e.locale.value:te(i.locale)?i.locale:us),c=r(e&&o?e.fallbackLocale.value:te(i.fallbackLocale)||je(i.fallbackLocale)||xe(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:a.value),u=r(Cl(a.value,i)),h=r(xe(i.datetimeFormats)?i.datetimeFormats:{[a.value]:{}}),f=r(xe(i.numberFormats)?i.numberFormats:{[a.value]:{}});let d=e?e.missingWarn:Ne(i.missingWarn)||Tn(i.missingWarn)?i.missingWarn:!0,m=e?e.fallbackWarn:Ne(i.fallbackWarn)||Tn(i.fallbackWarn)?i.fallbackWarn:!0,b=e?e.fallbackRoot:Ne(i.fallbackRoot)?i.fallbackRoot:!0,w=!!i.fallbackFormat,g=ve(i.missing)?i.missing:null,p=ve(i.missing)?yh(i.missing):null,y=ve(i.postTranslation)?i.postTranslation:null,x=e?e.warnHtmlMessage:Ne(i.warnHtmlMessage)?i.warnHtmlMessage:!0,O=!!i.escapeParameter;const Q=e?e.modifiers:xe(i.modifiers)?i.modifiers:{};let S=i.pluralRules||e&&e.pluralRules,k;k=(()=>{n&&zu(null);const X={version:ab,locale:a.value,fallbackLocale:c.value,messages:u.value,modifiers:Q,pluralRules:S,missing:p===null?void 0:p,missingWarn:d,fallbackWarn:m,fallbackFormat:w,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:x,escapeParameter:O,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};X.datetimeFormats=h.value,X.numberFormats=f.value,X.__datetimeFormatters=xe(k)?k.__datetimeFormatters:void 0,X.__numberFormatters=xe(k)?k.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(X.__v_emitter=xe(k)?k.__v_emitter:void 0);const z=B0(X);return n&&zu(z),z})(),hs(k,a.value,c.value);function $(){return[a.value,c.value,u.value,h.value,f.value]}const _=l.computed({get:()=>a.value,set:X=>{a.value=X,k.locale=a.value}}),A=l.computed({get:()=>c.value,set:X=>{c.value=X,k.fallbackLocale=c.value,hs(k,a.value,X)}}),C=l.computed(()=>u.value),D=l.computed(()=>h.value),P=l.computed(()=>f.value);function F(){return ve(y)?y:null}function B(X){y=X,k.postTranslation=X}function U(){return g}function oe(X){X!==null&&(p=yh(X)),g=X,k.missing=p}function Z(X,z){return X!=="translate"||!z.resolvedMessage}const G=(X,z,$e,Xe,Di,os)=>{$();let sn;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=e?v0():void 0),sn=X(k)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=void 0)}if($e!=="translate exists"&&ze(sn)&&sn===yr||$e==="translate exists"&&!sn){const[vi,nl]=z();if(process.env.NODE_ENV!=="production"&&e&&te(vi)&&Z($e,nl)&&(b&&(kr(m,vi)||Gu(d,vi))&&xi(xr(Fi.FALLBACK_TO_ROOT,{key:vi,type:$e})),process.env.NODE_ENV!=="production")){const{__v_emitter:ls}=k;ls&&b&&ls.emit("fallback",{type:$e,key:vi,to:"global",groupId:`${$e}:${vi}`})}return e&&b?Xe(e):Di(vi)}else{if(os(sn))return sn;throw yt(Be.UNEXPECTED_RETURN_TYPE)}};function j(...X){return G(z=>Reflect.apply(ah,null,[z,...X]),()=>bl(...X),"translate",z=>Reflect.apply(z.t,z,[...X]),z=>z,z=>te(z))}function K(...X){const[z,$e,Xe]=X;if(Xe&&!Te(Xe))throw yt(Be.INVALID_ARGUMENT);return j(z,$e,tt({resolvedMessage:!0},Xe||{}))}function de(...X){return G(z=>Reflect.apply(eh,null,[z,...X]),()=>Ol(...X),"datetime format",z=>Reflect.apply(z.d,z,[...X]),()=>wr,z=>te(z))}function fe(...X){return G(z=>Reflect.apply(nh,null,[z,...X]),()=>_l(...X),"number format",z=>Reflect.apply(z.n,z,[...X]),()=>wr,z=>te(z))}function he(X){return X.map(z=>te(z)||ze(z)||Ne(z)?gh(String(z)):z)}const N={normalize:he,interpolate:X=>X,type:"vnode"};function q(...X){return G(z=>{let $e;const Xe=z;try{Xe.processor=N,$e=Reflect.apply(ah,null,[Xe,...X])}finally{Xe.processor=null}return $e},()=>bl(...X),"translate",z=>z[wl](...X),z=>[gh(z)],z=>je(z))}function Y(...X){return G(z=>Reflect.apply(nh,null,[z,...X]),()=>_l(...X),"number format",z=>z[xl](...X),_h,z=>te(z)||je(z))}function Qe(...X){return G(z=>Reflect.apply(eh,null,[z,...X]),()=>Ol(...X),"datetime format",z=>z[kl](...X),_h,z=>te(z)||je(z))}function Vi(X){S=X,k.pluralRules=S}function Li(X,z){return G(()=>{if(!X)return!1;const $e=te(z)?z:a.value,Xe=vt($e),Di=k.messageResolver(Xe,X);return It(Di)||Zt(Di)||te(Di)},()=>[X],"translate exists",$e=>Reflect.apply($e.te,$e,[X,z]),fb,$e=>Ne($e))}function Ae(X){let z=null;const $e=Bu(k,c.value,a.value);for(let Xe=0;Xe<$e.length;Xe++){const Di=u.value[$e[Xe]]||{},os=k.messageResolver(Di,X);if(os!=null){z=os;break}}return z}function qe(X){const z=Ae(X);return z??(e?e.tm(X)||{}:{})}function vt(X){return u.value[X]||{}}function Mi(X,z){if(s){const $e={[X]:z};for(const Xe in $e)Yt($e,Xe)&&ds($e[Xe]);z=$e[X]}u.value[X]=z,k.messages=u.value}function nn(X,z){u.value[X]=u.value[X]||{};const $e={[X]:z};if(s)for(const Xe in $e)Yt($e,Xe)&&ds($e[Xe]);z=$e[X],Or(z,u.value[X]),k.messages=u.value}function V(X){return h.value[X]||{}}function R(X,z){h.value[X]=z,k.datetimeFormats=h.value,ih(k,X,z)}function L(X,z){h.value[X]=tt(h.value[X]||{},z),k.datetimeFormats=h.value,ih(k,X,z)}function pe(X){return f.value[X]||{}}function ce(X,z){f.value[X]=z,k.numberFormats=f.value,rh(k,X,z)}function Le(X,z){f.value[X]=tt(f.value[X]||{},z),k.numberFormats=f.value,rh(k,X,z)}bh++,e&&zt&&(l.watch(e.locale,X=>{o&&(a.value=X,k.locale=X,hs(k,a.value,c.value))}),l.watch(e.fallbackLocale,X=>{o&&(c.value=X,k.fallbackLocale=X,hs(k,a.value,c.value))}));const Ee={id:bh,locale:_,fallbackLocale:A,get inheritLocale(){return o},set inheritLocale(X){o=X,X&&e&&(a.value=e.locale.value,c.value=e.fallbackLocale.value,hs(k,a.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:C,get modifiers(){return Q},get pluralRules(){return S||{}},get isGlobal(){return n},get missingWarn(){return d},set missingWarn(X){d=X,k.missingWarn=d},get fallbackWarn(){return m},set fallbackWarn(X){m=X,k.fallbackWarn=m},get fallbackRoot(){return b},set fallbackRoot(X){b=X},get fallbackFormat(){return w},set fallbackFormat(X){w=X,k.fallbackFormat=w},get warnHtmlMessage(){return x},set warnHtmlMessage(X){x=X,k.warnHtmlMessage=X},get escapeParameter(){return O},set escapeParameter(X){O=X,k.escapeParameter=X},t:j,getLocaleMessage:vt,setLocaleMessage:Mi,mergeLocaleMessage:nn,getPostTranslationHandler:F,setPostTranslationHandler:B,getMissingHandler:U,setMissingHandler:oe,[fh]:Vi};return Ee.datetimeFormats=D,Ee.numberFormats=P,Ee.rt=K,Ee.te=Li,Ee.tm=qe,Ee.d=de,Ee.n=fe,Ee.getDateTimeFormat=V,Ee.setDateTimeFormat=R,Ee.mergeDateTimeFormat=L,Ee.getNumberFormat=pe,Ee.setNumberFormat=ce,Ee.mergeNumberFormat=Le,Ee[dh]=t,Ee[wl]=q,Ee[kl]=Qe,Ee[xl]=Y,process.env.NODE_ENV!=="production"&&(Ee[cn]=X=>{k.__v_emitter=X},Ee[fs]=()=>{k.__v_emitter=void 0}),Ee}const wh="vue-i18n: composer properties",Tl={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},pb={"vue-i18n-resource-inspector":"Search for scopes ..."},mb={"vue-i18n-timeline":16764185};let Pl;async function gb(i,e){return new Promise((t,n)=>{try{lb({id:"vue-devtools-plugin-vue-i18n",label:Tl["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[wh],app:i},s=>{Pl=s,s.on.visitComponentTree(({componentInstance:o,treeNode:a})=>{Ob(o,a,e)}),s.on.inspectComponent(({componentInstance:o,instanceData:a})=>{o.vnode.el&&o.vnode.el.__VUE_I18N__&&a&&(e.mode==="legacy"?o.vnode.el.__VUE_I18N__!==e.global.__composer&&xh(a,o.vnode.el.__VUE_I18N__):xh(a,o.vnode.el.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Tl["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:pb["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&kb(o,e)});const r=new Map;s.on.getInspectorState(async o=>{if(o.app===i&&o.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),Sb(o,e),o.nodeId==="global"){if(!r.has(o.app)){const[a]=await s.getComponentInstances(o.app);r.set(o.app,a)}s.highlightElement(r.get(o.app))}else{const a=xb(o.nodeId,e);a&&s.highlightElement(a)}}),s.on.editInspectorState(o=>{o.app===i&&o.inspectorId==="vue-i18n-resource-inspector"&&Ab(o,e)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Tl["vue-i18n-timeline"],color:mb["vue-i18n-timeline"]}),t(!0)})}catch(s){console.error(s),n(!1)}})}function kh(i){return i.type.name||i.type.displayName||i.type.__file||"Anonymous"}function Ob(i,e,t){const n=t.mode==="composition"?t.global:t.global.__composer;if(i&&i.vnode.el&&i.vnode.el.__VUE_I18N__&&i.vnode.el.__VUE_I18N__!==n){const s={label:`i18n (${kh(i)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(s)}}function xh(i,e){const t=wh;i.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),i.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),i.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),i.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),i.state.push({type:t,key:"messages",editable:!1,value:Ql(e.messages.value)}),i.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),i.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Ql(i){const e={};return Object.keys(i).forEach(t=>{const n=i[t];ve(n)&&"source"in n?e[t]=wb(n):It(n)&&n.loc&&n.loc.source?e[t]=n.loc.source:Te(n)?e[t]=Ql(n):e[t]=n}),e}const _b={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function bb(i){return i.replace(/[<>"&]/g,yb)}function yb(i){return _b[i]||i}function wb(i){return{_custom:{type:"function",display:`<span>ƒ</span> ${i.source?`("${bb(i.source)}")`:"(?)"}`}}}function kb(i,e){i.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[n,s]of e.__instances){const r=e.mode==="composition"?s:s.__composer;t!==r&&i.rootNodes.push({id:r.id.toString(),label:`${kh(n)} Scope`})}}function xb(i,e){let t=null;if(i!=="global"){for(const[n,s]of e.__instances.entries())if(s.id.toString()===i){t=n;break}}return t}function Sh(i,e){if(i==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(n=>n.id.toString()===i);return t?e.mode==="composition"?t:t.__composer:null}}function Sb(i,e){const t=Sh(i.nodeId,e);return t&&(i.state=Cb(t)),null}function Cb(i){const e={},t="Locale related info",n=[{type:t,key:"locale",editable:!0,value:i.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:i.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:i.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:i.inheritLocale}];e[t]=n;const s="Locale messages info",r=[{type:s,key:"messages",editable:!1,value:Ql(i.messages.value)}];e[s]=r;{const o="Datetime formats info",a=[{type:o,key:"datetimeFormats",editable:!1,value:i.datetimeFormats.value}];e[o]=a;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:i.numberFormats.value}];e[c]=u}return e}function ps(i,e){if(Pl){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Pl.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:i,groupId:t,time:Date.now(),meta:{},data:e||{},logType:i==="compile-error"?"error":i==="fallback"||i==="missing"?"warning":"default"}})}}function Ab(i,e){const t=Sh(i.nodeId,e);if(t){const[n]=i.path;n==="locale"&&te(i.state.value)?t.locale.value=i.state.value:n==="fallbackLocale"&&(te(i.state.value)||je(i.state.value)||Te(i.state.value))?t.fallbackLocale.value=i.state.value:n==="inheritLocale"&&Ne(i.state.value)&&(t.inheritLocale=i.state.value)}}function Tb(i){const e=te(i.locale)?i.locale:us,t=te(i.fallbackLocale)||je(i.fallbackLocale)||xe(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:e,n=ve(i.missing)?i.missing:void 0,s=Ne(i.silentTranslationWarn)||Tn(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,r=Ne(i.silentFallbackWarn)||Tn(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,o=Ne(i.fallbackRoot)?i.fallbackRoot:!0,a=!!i.formatFallbackMessages,c=xe(i.modifiers)?i.modifiers:{},u=i.pluralizationRules,h=ve(i.postTranslation)?i.postTranslation:void 0,f=te(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,d=!!i.escapeParameterHtml,m=Ne(i.sync)?i.sync:!0;let b=i.messages;if(xe(i.sharedMessages)){const Q=i.sharedMessages;b=Object.keys(Q).reduce((k,T)=>{const $=k[T]||(k[T]={});return tt($,Q[T]),k},b||{})}const{__i18n:w,__root:g,__injectWithOption:p}=i,y=i.datetimeFormats,x=i.numberFormats,O=i.flatJson;return{locale:e,fallbackLocale:t,messages:b,flatJson:O,datetimeFormats:y,numberFormats:x,missing:n,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:c,pluralRules:u,postTranslation:h,warnHtmlMessage:f,escapeParameter:d,messageResolver:i.messageResolver,inheritLocale:m,__i18n:w,__root:g,__injectWithOption:p}}function El(i={}){const e=Al(Tb(i)),{__extender:t}=i,n={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Ne(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Ne(s)?!s:s},get silentFallbackWarn(){return Ne(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Ne(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},tc(...s){const[r,o,a]=s,c={plural:1};let u=null,h=null;if(process.env.NODE_ENV!=="production"&&bu(xr(Fi.DEPRECATE_TC)),!te(r))throw yt(Be.INVALID_ARGUMENT);const f=r;return te(o)?c.locale=o:ze(o)?c.plural=o:je(o)?u=o:xe(o)&&(h=o),te(a)?c.locale=a:je(a)?u=a:xe(a)&&(h=a),Reflect.apply(e.t,e,[f,u||h||{},c])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return n.__extender=t,process.env.NODE_ENV!=="production"&&(n.__enableEmitter=s=>{const r=e;r[cn]&&r[cn](s)},n.__disableEmitter=()=>{const s=e;s[fs]&&s[fs]()}),n}function Pb(i,e,t){return{beforeCreate(){const n=l.getCurrentInstance();if(!n)throw yt(Be.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=Ch(i,r);else{r.__injectWithOption=!0,r.__extender=t.__vueI18nExtend,this.$i18n=El(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Ch(i,s);else{this.$i18n=El({__i18n:s.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=i;s.__i18nGlobal&&mh(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),t.__setInstance(n,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const n=this.$i18n;this.$el.__VUE_I18N__=n.__composer;const s=this.__v_emitter=ll();n.__enableEmitter&&n.__enableEmitter(s),s.on("*",ps)}},unmounted(){const n=l.getCurrentInstance();if(!n)throw yt(Be.UNEXPECTED_ERROR);const s=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ps),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),t.__deleteInstance(n),delete this.$i18n}}}function Ch(i,e){i.locale=e.locale||i.locale,i.fallbackLocale=e.fallbackLocale||i.fallbackLocale,i.missing=e.missing||i.missing,i.silentTranslationWarn=e.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=e.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=e.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=e.postTranslation||i.postTranslation,i.warnHtmlInMessage=e.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=e.escapeParameterHtml||i.escapeParameterHtml,i.sync=e.sync||i.sync,i.__composer[fh](e.pluralizationRules||i.pluralizationRules);const t=Cl(i.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(n=>i.mergeLocaleMessage(n,t[n])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(n=>i.mergeDateTimeFormat(n,e.datetimeFormats[n])),e.numberFormats&&Object.keys(e.numberFormats).forEach(n=>i.mergeNumberFormat(n,e.numberFormats[n])),i}const $l={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function Qb({slots:i},e){return e.length===1&&e[0]==="default"?(i.default?i.default():[]).reduce((n,s)=>[...n,...s.type===l.Fragment?s.children:[s]],[]):e.reduce((t,n)=>{const s=i[n];return s&&(t[n]=s()),t},Me())}function Ah(){return l.Fragment}const Th=l.defineComponent({name:"i18n-t",props:tt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>ze(i)||!isNaN(i)}},$l),setup(i,e){const{slots:t,attrs:n}=e,s=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f!=="_"),o=Me();i.locale&&(o.locale=i.locale),i.plural!==void 0&&(o.plural=te(i.plural)?+i.plural:i.plural);const a=Qb(e,r),c=s[wl](i.keypath,a,o),u=tt(Me(),n),h=te(i.tag)||Te(i.tag)?i.tag:Ah();return l.h(h,u,c)}}});function Eb(i){return je(i)&&!te(i[0])}function Ph(i,e,t,n){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=Me();i.locale&&(o.locale=i.locale),te(i.format)?o.key=i.format:Te(i.format)&&(te(i.format.key)&&(o.key=i.format.key),a=Object.keys(i.format).reduce((d,m)=>t.includes(m)?tt(Me(),d,{[m]:i.format[m]}):d,Me()));const c=n(i.value,o,a);let u=[o.key];je(c)?u=c.map((d,m)=>{const b=s[d.type],w=b?b({[d.type]:d.value,index:m,parts:c}):[d.value];return Eb(w)&&(w[0].key=`${d.type}-${m}`),w}):te(c)&&(u=[c]);const h=tt(Me(),r),f=te(i.tag)||Te(i.tag)?i.tag:Ah();return l.h(f,h,u)}}const Qh=l.defineComponent({name:"i18n-n",props:tt({value:{type:Number,required:!0},format:{type:[String,Object]}},$l),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return Ph(i,e,sh,(...n)=>t[xl](...n))}}),Eh=l.defineComponent({name:"i18n-d",props:tt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},$l),setup(i,e){const t=i.i18n||Gt({useScope:i.scope,__useComponent:!0});return Ph(i,e,th,(...n)=>t[kl](...n))}});function $b(i,e){const t=i;if(i.mode==="composition")return t.__getInstance(e)||i.global;{const n=t.__getInstance(e);return n!=null?n.__composer:i.global.__composer}}function Nb(i){const e=o=>{const{instance:a,value:c}=o;if(!a||!a.$)throw yt(Be.UNEXPECTED_ERROR);const u=$b(i,a.$),h=$h(c);return[Reflect.apply(u.t,u,[...Nh(h)]),u]};return{created:(o,a)=>{const[c,u]=e(a);zt&&i.global===u&&(o.__i18nWatcher=l.watch(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=u,o.textContent=c},unmounted:o=>{zt&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const c=o.__composer,u=$h(a);o.textContent=Reflect.apply(c.t,c,[...Nh(u)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function $h(i){if(te(i))return{path:i};if(xe(i)){if(!("path"in i))throw yt(Be.REQUIRED_VALUE,"path");return i}else throw yt(Be.INVALID_VALUE)}function Nh(i){const{path:e,locale:t,args:n,choice:s,plural:r}=i,o={},a=n||{};return te(t)&&(o.locale=t),ze(s)&&(o.plural=s),ze(r)&&(o.plural=r),[e,a,o]}function Rb(i,e,...t){const n=xe(t[0])?t[0]:{};(Ne(n.globalInstall)?n.globalInstall:!0)&&([Th.name,"I18nT"].forEach(r=>i.component(r,Th)),[Qh.name,"I18nN"].forEach(r=>i.component(r,Qh)),[Eh.name,"I18nD"].forEach(r=>i.component(r,Eh))),i.directive("t",Nb(e))}const Vb=ri("global-vue-i18n");function Rh(i={},e){const t=__VUE_I18N_LEGACY_API__&&Ne(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,n=Ne(i.globalInjection)?i.globalInjection:!0,s=new Map,[r,o]=Lb(i,t),a=ri(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(d){return s.get(d)||null}function u(d,m){s.set(d,m)}function h(d){s.delete(d)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...m){if(process.env.NODE_ENV!=="production"&&(d.__VUE_I18N__=f),d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,f),xe(m[0])){const g=m[0];f.__composerExtend=g.__composerExtend,f.__vueI18nExtend=g.__vueI18nExtend}let b=null;!t&&n&&(b=Ub(d,f.global)),__VUE_I18N_FULL_INSTALL__&&Rb(d,f,...m),__VUE_I18N_LEGACY_API__&&t&&d.mixin(Pb(o,o.__composer,f));const w=d.unmount;if(d.unmount=()=>{b&&b(),f.dispose(),w()},process.env.NODE_ENV!=="production"){if(!await gb(d,f))throw yt(Be.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const p=ll();if(t){const y=o;y.__enableEmitter&&y.__enableEmitter(p)}else{const y=o;y[cn]&&y[cn](p)}p.on("*",ps)}},get global(){return o},dispose(){r.stop()},__instances:s,__getInstance:c,__setInstance:u,__deleteInstance:h};return f}function Gt(i={}){const e=l.getCurrentInstance();if(e==null)throw yt(Be.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw yt(Be.NOT_INSTALLED);const t=Mb(e),n=vb(t),s=ph(e),r=Db(i,s);if(r==="global")return mh(n,i,s),n;if(r==="parent"){let c=Bb(t,e,i.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&xi(xr(Fi.NOT_FOUND_PARENT_SCOPE)),c=n),c}const o=t;let a=o.__getInstance(e);if(a==null){const c=tt({},i);"__i18n"in s&&(c.__i18n=s.__i18n),n&&(c.__root=n),a=Al(c),o.__composerExtend&&(a[Sl]=o.__composerExtend(a)),Zb(o,e,a),o.__setInstance(e,a)}return a}function Lb(i,e,t){const n=l.effectScope(),s=__VUE_I18N_LEGACY_API__&&e?n.run(()=>El(i)):n.run(()=>Al(i));if(s==null)throw yt(Be.UNEXPECTED_ERROR);return[n,s]}function Mb(i){const e=l.inject(i.isCE?Vb:i.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw yt(i.isCE?Be.NOT_INSTALLED_WITH_PROVIDE:Be.UNEXPECTED_ERROR);return e}function Db(i,e){return mr(i)?"__i18n"in e?"local":"global":i.useScope?i.useScope:"local"}function vb(i){return i.mode==="composition"?i.global:i.global.__composer}function Bb(i,e,t=!1){let n=null;const s=e.root;let r=Ib(e,t);for(;r!=null;){const o=i;if(i.mode==="composition")n=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(n=a.__composer,t&&n&&!n[dh]&&(n=null))}if(n!=null||s===r)break;r=r.parent}return n}function Ib(i,e=!1){return i==null?null:e&&i.vnode.ctx||i.parent}function Zb(i,e,t){let n=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,n=ll();const s=t;s[cn]&&s[cn](n),n.on("*",ps)}},e),l.onUnmounted(()=>{const s=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(n&&n.off("*",ps),s[fs]&&s[fs](),delete e.vnode.el.__VUE_I18N__),i.__deleteInstance(e);const r=s[Sl];r&&(r(),delete s[Sl])},e)}const Fb=["locale","fallbackLocale","availableLocales"],Vh=["t","rt","d","n","tm","te"];function Ub(i,e){const t=Object.create(null);return Fb.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw yt(Be.UNEXPECTED_ERROR);const o=l.isRef(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),i.config.globalProperties.$i18n=t,Vh.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw yt(Be.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${s}`,r)}),()=>{delete i.config.globalProperties.$i18n,Vh.forEach(s=>{delete i.config.globalProperties[`$${s}`]})}}if(cb(),R0(h0),V0(P0),L0(Bu),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const i=ln();i.__INTLIFY__=!0,f0(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Lh="3.7.8",Xb=Lh,Nn=typeof Buffer=="function",Mh=typeof TextDecoder=="function"?new TextDecoder:void 0,Dh=typeof TextEncoder=="function"?new TextEncoder:void 0,Wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ms=Array.prototype.slice.call(Wb),Sr=(i=>{let e={};return i.forEach((t,n)=>e[t]=n),e})(ms),qb=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,at=String.fromCharCode.bind(String),vh=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),Bh=i=>i.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Ih=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),Zh=i=>{let e,t,n,s,r="";const o=i.length%3;for(let a=0;a<i.length;){if((t=i.charCodeAt(a++))>255||(n=i.charCodeAt(a++))>255||(s=i.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|s,r+=ms[e>>18&63]+ms[e>>12&63]+ms[e>>6&63]+ms[e&63]}return o?r.slice(0,o-3)+"===".substring(o):r},Nl=typeof btoa=="function"?i=>btoa(i):Nn?i=>Buffer.from(i,"binary").toString("base64"):Zh,Rl=Nn?i=>Buffer.from(i).toString("base64"):i=>{let t=[];for(let n=0,s=i.length;n<s;n+=4096)t.push(at.apply(null,i.subarray(n,n+4096)));return Nl(t.join(""))},Cr=(i,e=!1)=>e?Bh(Rl(i)):Rl(i),jb=i=>{if(i.length<2){var e=i.charCodeAt(0);return e<128?i:e<2048?at(192|e>>>6)+at(128|e&63):at(224|e>>>12&15)+at(128|e>>>6&63)+at(128|e&63)}else{var e=65536+(i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320);return at(240|e>>>18&7)+at(128|e>>>12&63)+at(128|e>>>6&63)+at(128|e&63)}},zb=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Fh=i=>i.replace(zb,jb),Uh=Nn?i=>Buffer.from(i,"utf8").toString("base64"):Dh?i=>Rl(Dh.encode(i)):i=>Nl(Fh(i)),Rn=(i,e=!1)=>e?Bh(Uh(i)):Uh(i),Xh=i=>Rn(i,!0),Yb=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Gb=i=>{switch(i.length){case 4:var e=(7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3),t=e-65536;return at((t>>>10)+55296)+at((t&1023)+56320);case 3:return at((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return at((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},Wh=i=>i.replace(Yb,Gb),qh=i=>{if(i=i.replace(/\s+/g,""),!qb.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(i.length&3));let e,t,n,s=[];for(let r=0;r<i.length;)e=Sr[i.charAt(r++)]<<18|Sr[i.charAt(r++)]<<12|(t=Sr[i.charAt(r++)])<<6|(n=Sr[i.charAt(r++)]),t===64?s.push(at(e>>16&255)):n===64?s.push(at(e>>16&255,e>>8&255)):s.push(at(e>>16&255,e>>8&255,e&255));return s.join("")},Vl=typeof atob=="function"?i=>atob(Ih(i)):Nn?i=>Buffer.from(i,"base64").toString("binary"):qh,jh=Nn?i=>vh(Buffer.from(i,"base64")):i=>vh(Vl(i).split("").map(e=>e.charCodeAt(0))),zh=i=>jh(Yh(i)),Kb=Nn?i=>Buffer.from(i,"base64").toString("utf8"):Mh?i=>Mh.decode(jh(i)):i=>Wh(Vl(i)),Yh=i=>Ih(i.replace(/[-_]/g,e=>e=="-"?"+":"/")),Ll=i=>Kb(Yh(i)),Hb=i=>{if(typeof i!="string")return!1;const e=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},Gh=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),Kh=function(){const i=(e,t)=>Object.defineProperty(String.prototype,e,Gh(t));i("fromBase64",function(){return Ll(this)}),i("toBase64",function(e){return Rn(this,e)}),i("toBase64URI",function(){return Rn(this,!0)}),i("toBase64URL",function(){return Rn(this,!0)}),i("toUint8Array",function(){return zh(this)})},Hh=function(){const i=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Gh(t));i("toBase64",function(e){return Cr(this,e)}),i("toBase64URI",function(){return Cr(this,!0)}),i("toBase64URL",function(){return Cr(this,!0)})},Jb={version:Lh,VERSION:Xb,atob:Vl,atobPolyfill:qh,btoa:Nl,btoaPolyfill:Zh,fromBase64:Ll,toBase64:Rn,encode:Rn,encodeURI:Xh,encodeURL:Xh,utob:Fh,btou:Wh,decode:Ll,isValid:Hb,fromUint8Array:Cr,toUint8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J78ah4rgACIuek8DQggAOLJr+axAgiAmJvO04AAAiCe/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAAAIgnvxqHiuAAIi56TwNCCAA4smv5rECCICYm87TgAACIJ78ah4rgACIuek8DQggAOLJr+axAgiAmJvO04AAAiCe/GoeK4AAiLnpPA0IIADiya/msQIIgJibztOAALJYrchfHv97Rk0/CO3JdJ5iTQXE2hOmrz9IBWRa6Kp+jdyT+WqPVfDSnzAlUz+YAiIUpPZ1Jj5bBQDEVm9G86TA4XB4tnyFg2kGCQsheCGmp/UjVmUFLN8NEqZiDoiwD1GWnct7UMC6QS8CCH2IBytWG6Np/1EEkDAoWaRaA1YbWInsUQwQski1Pqw2MOveYxbCvAeZBwaSar1YY2DmpVVxQKY7Wj//fwFr0htOa1w9YlJVoBgcxUqspZxkElVzub146DlqeL12sRLrduVSP5PjduUJfFOBUg35vcCqAWRRcj0Nw/BtHMfvm0pyQDMKBCjGcfx9OBzOlk/KtwSsCpB7wU6ZZWse/LtDBQIMIeyagLiVsXpAHK47ITekAIA0tJhMJb8CAJJfU67YkAIA0tBiMpX8CgBIfk25YkMKAEhDi8lU8isAIPk15YoNKQAgDS0mU8mvAIDk15QrNqQAgDS0mEwlvwL/AfRjWW6yHrZ9AAAAAElFTkSuQmCC",sy={xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",png:"image/png",gif:"image/gif",jpeg:"image/jpeg",jpg:"image/jpeg",mp3:"audio/mpeg",aac:"audio/aac",html:"text/html",css:"text/css",js:"text/javascript",json:"application/json",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",htm:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jsonld:"application/ld+json",mid:"audio/midi audio/x-midi",midi:"audio/midi audio/x-midi",mjs:"text/javascript",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tif:"image/tiff",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"text/xml",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip"},Jh=()=>{function i(o,a){try{const c=decodeURI(o.headers["content-disposition"]);let u=a||c.split("filename*=utf-8")[1];const h=u.substring(u.lastIndexOf(".")+1),f=new Blob([o.data],{type:sy[h]??"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),m=(window.URL||window.webkitURL).createObjectURL(f),b=document.createElement("a");b.setAttribute("href",m);const w=u.lastIndexOf(".");u=`${u.slice(0,w)}_${Ve.dayjs().format("YYYYMMDD")+u.slice(w)}`,b.setAttribute("download",u),document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(m)}catch(c){console.error(c)}}function e({multiple:o=!1},a){const c=document.createElement("input");c.style.display="none",c.setAttribute("type","file"),o&&c.setAttribute("multiple",o),c.setAttribute("accept","application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.xml"),document.body.appendChild(c),c.click(),c.addEventListener("change",u=>{a(u)&&document.body.removeChild(c)})}function t(o){return o?o.substring(o.lastIndexOf("/")+1):""}function n(o){return o?new URL(Object.assign({"../static/images/upload-excel.png":ey,"../static/images/upload-file.png":ty,"../static/images/upload-pdf.png":iy,"../static/images/upload-word.png":ny})[`../static/${o}`],self.location).href:""}function s(o,a,c){if(!a)return;let u=c||t(a);const h=u.lastIndexOf(".");u=`${u.slice(0,h)}_${Date.now()+u.slice(h)}`,o({url:a,method:"GET",responseType:"blob"}).then(f=>{const d=URL.createObjectURL(f.data),m=document.createElement("a");m.style.display="none",m.setAttribute("href",d),m.setAttribute("target","_blank"),m.setAttribute("download",u),document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(d)})}function r(o){if(!o)return;const a=document.createElement("input");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),Ve.ElNotification({title:"提示",message:"复制成功",type:"success",duration:2e3})}return{exportFile:i,importFile:e,getAssetsFileName:t,getAssetsFilePath:n,downloadFile:s,copy:r}},ef={label:"name",value:"code",children:"children"},tf={label:"key",value:"value"},Ar={label:"name",value:"code",children:"children"},ry={year:"year",month:"month",date:"day"};/*! Element Plus Icons Vue v2.3.2 */var oy=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),ly=oy,ay=l.defineComponent({name:"Delete",__name:"delete",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),cy=ay,uy=l.defineComponent({name:"Download",__name:"download",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),hy=uy,fy=l.defineComponent({name:"MoreFilled",__name:"more-filled",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),dy=fy,py=l.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),my=py;const RQ="",ct=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},gy={class:"a-loading"},Tr=ct({__name:"index",setup(i){return(e,t)=>(l.openBlock(),l.createElementBlock("div",gy,[...t[0]||(t[0]=[l.createElementVNode("span",{class:"dot dot-spin"},[l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i"),l.createElementVNode("i")],-1)])]))}},[["__scopeId","data-v-048c6c03"]]),LQ="",Oy={key:0,class:"table-link"},_y=["onClick"],by={class:"no-image"},yy={key:4},nf=ct({__name:"index",props:{pageKey:{type:String,default:""},defaultParams:{type:Array,default:()=>[]},matchData:{type:Object,default:()=>({})},maxHeight:{type:[String,Number],default:-1},tableConfig:{type:Object,default:()=>({})}},emits:["onClickRow","changeExpansionRow","refresh","load","operate"],setup(i,{expose:e,emit:t}){const n=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>e1),loadingComponent:Tr,delay:20}),s=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>i1),loadingComponent:Tr,delay:20}),r=l.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>s1),loadingComponent:Tr,delay:20}),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>l1)),a=l.defineAsyncComponent(()=>Promise.resolve().then(()=>u1)),{t:c}=Gt(),u=l.inject("actModules"),h=l.inject("apiPrefix"),f=l.inject("request"),d=l.inject("themeColor"),m=l.inject("cacheTokenType"),b=l.inject("cookieStorage"),w=rn.useRoute(),g=rn.useRouter(),p=t,y=i,x=()=>({pageLoading:!1,tableLoading:!1,tableTotal:0,tableSelection:[],tableQuery:{pageIndex:1,pageSize:10},showFormDialog:!1,showEditorPreDialog:!1,dialogTitle:"",editorDialogTitle:"",dialogData:{}});let O=l.reactive(x()),Q=l.ref("loading"),S=l.ref([]),k={},T=[],$=l.ref([]),_=l.ref([]),A=l.ref([]),C=l.ref([]),D=l.ref([]),P=l.ref({});const F=l.ref(null),B=l.ref(null),U=l.ref(null),oe=l.ref(null),Z=l.ref(0);let G=l.ref({});const j=E=>f({url:`${h}/sysOperate/getMenuOfOperateByRole`,method:"post",data:E}),K=E=>f({url:`${h}/pages/getPageDetail?key=${E}`,method:"get"}),de=()=>{O=l.reactive(x()),Q.value="loading",S.value=[],k={},T=[],$.value=[],_.value=[],A.value=[],C.value=[],D.value=[],G.value={}},fe=()=>{l.nextTick(()=>{setTimeout(()=>{var ue,re,se,J,H,be,Oe;const E=((re=(ue=F.value)==null?void 0:ue.$el)==null?void 0:re.offsetHeight)||0,I=((J=(se=B.value)==null?void 0:se.$el)==null?void 0:J.offsetHeight)||0,le=((be=(H=U.value)==null?void 0:H.$el)==null?void 0:be.offsetHeight)||0,ge=E-I-le-6;Z.value=y.maxHeight>0?y.maxHeight:(Oe=k==null?void 0:k.tableConfig)!=null&&Oe.isPagination?ge-48:ge},500)})},he=()=>[...ls(T)],v=E=>{oe.value.updateSelection(E)},N=()=>O.tableSelection,q=async()=>{await ii(T),p("refresh")},Y=E=>{if(!E||!E.tableQueryDefaultValue)return;const le=qe(E)["value-format"]||"YYYY-MM-DD HH:mm:ss";if(E.fieldType=="date"&&E.tableQueryDefaultValue=="nowYear")return Ve.dayjs().format(le);if(E.fieldType=="date"&&E.tableQueryDefaultValue=="yearAgo")return Ve.dayjs().subtract(1,"year").format(le);if(E.fieldType=="dateRange"&&E.tableQueryDefaultValue.includes("&")){const ge=E.tableQueryDefaultValue.split("&");return[Ve.dayjs(ge[0]).subtract(6,"month").format(le),Ve.dayjs(ge[1]).format(le)]}if(E.fieldType=="dateRange"&&E.tableQueryDefaultValue=="yearAgo")return[Ve.dayjs().subtract(1,"year").format(le),Ve.dayjs().format(le)];if(E.fieldType=="dateRange"&&E.tableQueryDefaultValue=="sixMonthsAgo")return[Ve.dayjs().subtract(6,"month").format(le),Ve.dayjs().format(le)]},Qe=(E,I)=>{if(!(I.row&&Object.keys(I.row).length))return;const ge=(I.row[E.fieldKey]??"").split(";"),ue=ge&&ge.length?ge[0]:"",re=ue.substring(ue.lastIndexOf(".")+1);return/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/.test(re)},Vi=(E,I)=>{if(!(I.row&&Object.keys(I.row).length))return;const ge=(I.row[E.fieldKey]??"").split(";");return ge&&ge.length?ge[0]:""},Li=(E,I)=>{if(!(I.row&&Object.keys(I.row).length))return;const le=I.row[E.fieldKey]??null;return le?le.split(";"):[]},Ae=E=>E==="true",qe=E=>new Function("",E.fieldUiProps)()||{},vt=async(E,I)=>Reflect.has(u,`/src/views${E}.vue`)?l.markRaw(l.defineAsyncComponent(u[`/src/views${E}.vue`])):null,Mi=async(E,I)=>Reflect.has(u,`/src/views${E}.vue`)?l.markRaw(l.defineAsyncComponent({loader:u[`/src/views${E}.vue`],loadingComponent:Tr,delay:20})):null,nn=async()=>{k.buttons=await Promise.all(k.buttons.map(async E=>{if(E.isCustomBtn&&E.customType=="component"){const{customComponentUrl:I,customComponentName:le}=E,ge=await vt(I);E[le]=ge}return E}))},V=async()=>{const E=k.fields.filter(I=>(I.formCustomComponentes??[]).some(le=>le.permissionCode=="tableShow"&&le.isFieldCustom));D.value=await Promise.all(E.map(async I=>{const le=I.formCustomComponentes.find(se=>se.permissionCode=="tableShow"),{customComponentUrl:ge,customComponentName:ue}=le,re=await vt(ge);return I.customTableHeaderName=ue,I.customTableHeaderUrl=ge,I[`customTableHeaderInstance_${ue}`]=re,I.headerItem={label:I.fieldName,prop:I.fieldKey,align:I.tableCellAlignType,width:I.tableCellWidthType=="default"?I.tableCellWidth:"",minWidth:I.tableCellWidthType=="min"?I.tableCellWidth:"",showOverflowTooltip:I.isTableCellOverflowTooltip||!1,sort:I.isTableCellSort||!1},I}))},R=(E,I)=>{switch(E){case"array":return typeof I=="string"?I.toString().split().sort((le,ge)=>le.sort-ge.sort):[I];case"number":return Number(I);case"boolean":return!!I;default:return I}},L=(E,I)=>I[E.fieldKey]?I[E.fieldKey].toString().includes("T")?Ve.dayjs(I[E.fieldKey]).format("YYYY-MM-DD HH:mm:ss"):I[E.fieldKey]:"";function pe(E,I={}){return E.replace(/\{([^}]+)\}/g,(le,ge)=>{const ue=ge.trim().split(".");let re=I;for(const se of ue){if(!re||typeof re!="object")break;re=re[se]}return re!==void 0?re:le})}const ce=E=>E?pe(E,y.matchData):"",Le=(E,I,le)=>{switch(E){case"LessThanOrEqual":return I<=le;case"LessThan":return I<le;case"GreaterThanOrEqual":return I>=le;case"GreaterThan":return I>le;case"NotEqual":return I!=le;case"Equal":return I==le;default:return I==le}},Ee=(E,I)=>{if(!E.matchFields.length)return!0;const le=se=>se.matchType=="default"?I[se.matchFieldName]:y.matchData[se.matchType][se.matchFieldName];let ue=E.matchFields.reduce((se,J,H)=>{const be=le(J),Oe=Le(J.matchCondition,be,J.fieldValue==""?null:J.fieldValue=="true"||J.fieldValue=="false"?Ae(J.fieldValue):J.fieldValue);return se+=Oe,H!==E.matchFields.length-1&&(se+=J.spliceCondition||"&&"),se},"").split("||"),re=ue.reduce((se,J,H)=>(se+=`(${J})`,H<ue.length-1&&(se+="||"),se),"");return new Function(`return ${re}`)()},X=(E,I)=>Object.keys(I).length?S.value.some(le=>le.unique==E.permissionCode)&&Ee(E,I):!1,z=async E=>{try{O.pageLoading=!0;const I=y.pageKey??w.params.key,{data:{pageConfigs:le}}=await K(I);return k=le.pageConfig?JSON.parse(le.pageConfig):{},O.tableQuery.pageSize=k.tableConfig.pageSize||10,O.pageLoading=!1,Promise.resolve(Object.keys(k).length)}catch(I){O.pageLoading=!1,console.error(I)}},$e=async(E=[],I={},le=!0,ge=!1)=>{try{const ue=E.filter(J=>["select","multipleSelect","selectIcon","switch","virtualizedSelect","virtualizedMultipleSelect","fullLoadTreeSelect","provinceCascade"].includes(J.fieldType)&&(!Reflect.has(J,"dataList")||!J.dataList.length||ge)),se=(await Promise.allSettled(ue.map(async J=>{const H=J.postRequestParams.filter(lt=>lt.submitType==="default").reduce((lt,ni)=>(lt[ni.submitName]=R(ni.paramsType,ni.submitValue),lt),{}),be=J.postRequestParams.filter(lt=>lt.submitType==="match").reduce((lt,ni)=>(lt[ni.submitName]=R(ni.paramsType,I[ni.submitValue][ni.submitName]),lt),{}),Oe=J.postRequestParams.filter(lt=>lt.submitType==="dynamic").map(lt=>({field:lt.submitName,operate:lt.submitMatchType,value:R(lt.paramsType,lt.submitValue)}));let Ke={};Object.keys(H).length&&(Ke={...Ke,...H}),Object.keys(be).length&&(Ke={...Ke,...be}),Oe.length&&(Ke.dynamicFilters=Oe);const{data:ki}=await f({url:J.fieldRequestUrl,method:J.fieldRequestType||"GET",data:Ke});return Promise.resolve({...J,dataList:ki||[]})}))).filter(J=>J.status==="fulfilled"&&Reflect.has(J,"value")).map(J=>J.value);return le&&k.fields.forEach(J=>{const H=se.find(be=>J.fieldName==be.fieldName&&J.fieldKey==be.fieldKey);H&&(J.dataList=(H==null?void 0:H.dataList)??[])}),se}catch(ue){console.error(ue)}},Xe=l.computed(()=>{const{tableConfig:{tableMoreBtnSplitNumber:E}}=k;return!E||E>=_.value.length}),Di=()=>{const{tableConfig:{tableMoreBtnSplitNumber:E}}=k;return Xe.value?_.value:_.value.slice(0,E)},os=()=>{var I;const{tableConfig:{tableMoreBtnSplitNumber:E}}=k;return Xe.value?[]:_.value.slice(E,(I=_.value)==null?void 0:I.length)},sn=async E=>{try{const I=(E||[]).filter(re=>re.useScenes.some(se=>["tableShow"].includes(se))).sort((re,se)=>re.sort-se.sort),le=["editor","upload","date"];let ge=I.map(re=>{const se=re.formCustomComponentes.some(J=>J.permissionCode=="tableShow"&&J.isFieldCustom);return{label:re.fieldName,prop:re.fieldKey,align:re.tableCellAlignType,width:re.tableCellWidthType=="default"?re.tableCellWidth:"",minWidth:re.tableCellWidthType=="min"?re.tableCellWidth:"",showOverflowTooltip:re.isTableCellOverflowTooltip||!1,sort:re.isTableCellSort||!1,render:!!re.fieldRequestUrl||re.tableCellContentType=="link"||le.includes(re.fieldType),isCustomTableHeader:se}});k.tableConfig.isSerialNumber&&ge.unshift({prop:"serialNumber",width:80}),k.tableConfig.isCheckRow&&ge.unshift({prop:"checkbox",width:50});const ue=_.value.filter(re=>S.value.some(se=>se.unique==re.permissionCode));k.tableConfig.isOperateRow&&ue.length&&ge.push({label:c("act.operate"),prop:"operate",width:k.tableConfig.tableOperateCellWidth,render:!0,fixed:"right"}),C.value=I.filter(re=>!!re.fieldRequestUrl&&re.useScenes.includes("tableShow")||re.tableCellContentType=="link"||le.includes(re.fieldType)),$.value=ge}catch(I){console.error(I)}},vi=()=>{_.value=(k.buttons||[]).filter(E=>E.permissionCode!==1001&&E.btnPostion.includes("table")).sort((E,I)=>E.sort-I.sort).map(E=>(E.loading=!1,E.btnAlias&&(E.btnName=E.btnAlias),E))},nl=()=>k.fields.filter(E=>E.useScenes.includes("tableSearch")).map(E=>(["date","dateRange"].includes(E.fieldType)?E.queryValue=E.tableQueryDefaultValue?E.tableQueryDefaultValue:Y(E):E.queryValue=(E==null?void 0:E.tableQueryDefaultValue)||void 0,y.defaultParams.some(I=>{I.field==E.fieldKey&&I.operate===E.tableQueryCondition&&(E.queryValue=I.value)}),E)),ls=(E,I="queryValue")=>E?(E||[]).filter(ge=>!!ge[I]).reduce((ge,ue)=>{var se;const re=qe(ue);if(ue.fieldType==="date"&&re["value-format"]!=="YYYY"){const J=re!=null&&re.dayJsType?ry[(se=ue.fieldUiProps)==null?void 0:se.dayJsType]:"day",H=re["value-format"]||"YYYY-MM-DD HH:mm:ss";ge=[...ge,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:Ve.dayjs(ue[I]).startOf(J).format(H)},{field:ue.fieldKey,operate:"LessThanOrEqual",value:Ve.dayjs(ue[I]).endOf(J).format(H)}]}else if(ue.fieldType==="dateRange"&&ue[I].length)if(ue.fieldKey.includes("&")){const J=ue.fieldKey.split("&")||[];ge=[...ge,{field:J[0],operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:J[1],operate:"LessThanOrEqual",value:ue.queryValue[1]}]}else ge=[...ge,{field:ue.fieldKey,operate:"GreaterThanOrEqual",value:ue.queryValue[0]},{field:ue.fieldKey,operate:"LessThanOrEqual",value:ue.queryValue[1]}];else if(["provinceCascade"].includes(ue.fieldType)&&ue[I].length){const J=(ue.fieldKey.split("&")||[]).map((H,be)=>({field:H,operate:"Equal",value:ue.queryValue[be]}));ge=[...ge,...J]}else return Array.isArray(ue[I])&&!ue[I].length?[...ge]:[...ge,{field:ue.fieldKey,operate:ue.tableQueryCondition,value:ue.tableQueryCondition==="In"&&ue[I]&&typeof ue[I]=="string"?ue[I].split(";"):ue[I]=="true"||ue[I]=="false"?Ae(ue[I]):ue[I]}];return ge},[]):[],xQ=(E,I)=>{if(!E.dataList||!Reflect.has(I,E.fieldKey))return"";const le=I[E.fieldKey];if(!le&&le!==0&&le!==!1)return"";const ge=qe(E),ue=Object.assign({key:"key",value:"value"},ge.props||{});return["virtualizedSelect","virtualizedMultipleSelect"].includes(E.fieldType)&&(ue.key=ue.label),["multipleSelect","select","switch","virtualizedSelect","virtualizedMultipleSelect","selectIcon"].includes(E.fieldType)?(E.dataList||[]).filter(re=>{const se=E.fieldType==="selectIcon"?`btn-${re[ue.value]}`:re[ue.value],J=se=="true"||se=="false"?Ae(se):se;return Array.isArray(le)?le.some(H=>H==se==H):typeof le=="string"?le.split(";").includes(J):le==J}).map(re=>re[ue.key]).join(";"):le},ii=async(E=[])=>{try{O.tableLoading=!0;const I=y.defaultParams.filter(re=>!(k.fields??[]).some(se=>se.fieldKey===re.field&&se.tableQueryCondition===re.operate&&se.useScenes.includes("tableSearch"))),le=k.tableConfig.defaultParams.map(re=>({field:re.submitFieldName,operate:re.matchValue,value:R(re.submitFieldType,re.defaultValue)})),ge=[...I,...le,...ls(E)];k.tableConfig.isPagination||(O.tableQuery.pageSize=9999);const{data:ue}=await f({url:k.tableConfig.dataUrl,method:"POST",data:{...O.tableQuery,dynamicFilters:ge}});O.tableTotal=ue.totalCount||0,A.value=ue.datas||[],O.tableLoading=!1}catch(I){O.tableLoading=!1,console.error(I)}},u_=async()=>{try{Q.value="loading";const E=y.pageKey;if(!await z(E)){Q.value="end";return}await V(),await nn(),await $e(k.fields.filter(re=>re.useScenes.some(se=>["tableSearch","tableShow"].includes(se)))),Q.value="success";let le="";if(m==="sessionStorage")le=sessionStorage.getItem("accessToken");else{const re=b.getPrefix();le=b.getItemValue(`${re}accessToken`)}const ue=JSON.parse(Jb.decode(le.split(".")[1]))["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];S.value=(await j({roleId:ue,key:E})).data.datas||[],vi(),sn(k.fields),fe(),T=nl(),(!Reflect.has(k.tableConfig,"isExecuteImmediatelyTableApi")||k.tableConfig.isExecuteImmediatelyTableApi)&&await ii(T),p("load"),console.log(k)}catch(E){console.error(E),Q.value="end"}};l.provide("globalProps",y),l.provide("loadComponents",vt),l.provide("defineAsyncLoadComponents",Mi),l.provide("stringToBoolean",Ae),l.provide("matchCondition",Le),l.provide("menuPermissionBtns",S),l.provide("getTableData",ii),l.provide("tableBtnRefs",P.value),l.provide("formatDataType",R),l.provide("getFieldUiProps",qe),l.provide("disposeRequestData",$e),l.provide("disposeDate",Y),l.provide("getDefaultQueryValues",nl),l.watch(()=>y.pageKey,(E,I)=>{de(),u_()},{immediate:!0});const h_=async(E,I)=>{T=E,await ii(E),p("refresh"),I(!0)},SQ=E=>{p("operate",E),ii(T)},sl=(E,I)=>{const{exportFile:le,importFile:ge,downloadFile:ue}=Jh();if(E.isCustomBtn){if(E.customType=="component"&&!Reflect.has(E,[E.customComponentName])){Ve.ElNotification({title:"提示",message:`当前自定义按钮未创建vue文件,请在路径【/src/views${E.customComponentUrl}】下创建vue文件`,type:"warning",duration:2500});return}if(E.customType=="code"){try{new Function("router","route","data","configItem","cookieStorage",E.codeStr)(g,w,I,E,b)}catch(J){console.error(J)}return}const se=`${E.customComponentName}-${E.permissionCode}`;P.value[se]&&P.value[se].onTigger({rowData:I,tableSelection:O.tableSelection});return}if(E.submitWay=="associationSubTable"){Ve.ElNotification({title:c("act.tip"),message:c("act.developing"),type:"warning",duration:2500});return}if(["export","exportUrl"].includes(E.submitWay)){E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!0:I[`loading${E.permissionCode}`]=!0;let se=[...y.defaultParams,...ls(T)],J=(E.submitFields||[]).reduce((be,Oe)=>{if(Oe.matchType=="default")be=[...be,{field:Oe.submitFieldName,operate:Oe.submitFieldType==="array"?"In":"Equal",value:R(Oe.submitFieldType,Oe.matchFieldName)}];else if(Oe.matchType=="match"){const Ke=Oe.submitFieldMatchOrigin==="rowData"?I:y.matchData[Oe.submitFieldMatchOrigin];be=[...be,{field:Oe.submitFieldName,operate:Oe.submitFieldType==="array"?"In":"Equal",value:R(Oe.submitFieldType,Ke[Oe.matchFieldName])}]}else if(Oe.matchType=="selection"){const Ke=O.tableSelection.map(ki=>ki[Oe.matchFieldName]);be=[...be,{field:Oe.submitFieldName,operate:Oe.submitFieldType==="array"?"In":"Equal",value:Oe.submitFieldType==="string"?Ke.join():Ke}]}return be},[]);const H=[...se,...J];f({url:ce(E.requestUrl),method:"post",data:{dynamicFilters:H},responseType:["exportUrl"].includes(E.submitWay)?"json":"blob"}).then(be=>{E.submitWay=="exportUrl"?ue(f,be.data):le(be),p("operate",E),E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1}).catch(be=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1});return}if(["import","batchImport"].includes(E.submitWay)){ge({multiple:E.submitWay=="batchImport"},se=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!0:I[`loading${E.permissionCode}`]=!0;const J=new FormData;if((E.submitFields||[]).forEach(H=>{var be,Oe;if(H.matchType=="default")J.append(H.submitFieldName,R(H.submitFieldType,H.matchFieldName));else if(H.matchType=="match")(be=Object.keys(I))!=null&&be.length&&J.append(H.submitFieldName,R(H.submitFieldType,I[H.matchFieldName]));else if(H.matchType=="query"){const Ke=((Oe=T.find(ki=>ki.fieldKey==H.matchFieldName))==null?void 0:Oe.queryValue)??null;J.append(H.submitFieldName,R(H.submitFieldType,Ke))}}),E.submitWay=="import")J.append(E.importFileName||"file",se.target.files[0]);else for(let H of se.target.files)J.append(E.importFileName||"files",H);return f({url:ce(E.requestUrl),method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:J}).then(H=>{Ve.ElNotification({title:c("act.tip"),message:`${H.msg}`,type:"success",duration:2500}),p("operate",E),ii(T),E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1}).catch(()=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1})});return}if(E.submitWay==="executeApi"){let se=(E.submitFields||[]).reduce((J,H)=>{var be;if(H.matchType=="default")J[H.submitFieldName]=R(H.submitFieldType,H.matchFieldName);else if(H.matchType=="match"){const Oe=H.submitFieldMatchOrigin==="rowData"?I:y.matchData[H.submitFieldMatchOrigin];J[H.submitFieldName]=R(H.submitFieldType,Oe[H.matchFieldName])}else H.matchType=="query"&&(J[H.submitFieldName]=((be=T.find(Oe=>Oe.fieldKey==H.matchFieldName))==null?void 0:be.queryValue)??null);return J},{});if(E.btnPostion==="header"&&E.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ve.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ve.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${E.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}if(E.btnPostion==="header"){const J=(E.submitFields||[]).filter(H=>H.matchType=="selection").reduce((H,be)=>(H[be.submitFieldName]=O.tableSelection.reduce((Oe,Ke)=>(be.submitFieldType==="array"?Oe=[...Oe,...R(be.submitFieldType,Ke[be.matchFieldName])]:Oe=[...Oe,R(be.submitFieldType,Ke[be.matchFieldName])],Oe),[]),H),{});Object.assign(se,J)}E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!0:I[`loading${E.permissionCode}`]=!0,f({url:ce(E.requestUrl),method:"post",data:se}).then(J=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1,Ve.ElNotification({type:"success",title:c("act.tip"),message:`${E.btnName}${c("act.success")}`,duration:2500}),p("operate",E),ii(T)}).catch(J=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1});return}if(E.submitWay==="messageBox"){if(E.btnPostion==="header"&&E.isPromptVerificationSelectTable=="1"){if(!k.tableConfig.isCheckRow){Ve.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ve.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${E.btnName}${c("act.data")}`,type:"warning",duration:2500});return}}Ve.ElMessageBox.confirm(`${c("act.isExecuteOperate")}?`,c("act.tip"),{confirmButtonText:c("act.enter"),cancelButtonText:c("act.cancel"),type:"warning"}).then(()=>{let se=(E.submitFields||[]).reduce((J,H)=>{var be;if(H.matchType=="default")J[H.submitFieldName]=R(H.submitFieldType,H.matchFieldName);else if(H.matchType=="match"){const Oe=H.submitFieldMatchOrigin==="rowData"?I:y.matchData[H.submitFieldMatchOrigin];J[H.submitFieldName]=R(H.submitFieldType,Oe[H.matchFieldName])}else H.matchType=="query"&&(J[H.submitFieldName]=((be=T.find(Oe=>Oe.fieldKey==H.matchFieldName))==null?void 0:be.queryValue)??null);return J},{});if(E.btnPostion==="header"){const J=(E.submitFields||[]).filter(H=>H.matchType=="selection").reduce((H,be)=>(H[be.submitFieldName]=O.tableSelection.reduce((Oe,Ke)=>(be.submitFieldType==="array"?Oe=[...Oe,...R(be.submitFieldType,Ke[be.matchFieldName])]:Oe=[...Oe,R(be.submitFieldType,Ke[be.matchFieldName])],Oe),[]),H),{});Object.assign(se,J)}E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!0:I[`loading${E.permissionCode}`]=!0,f({url:ce(E.requestUrl),method:"post",data:se}).then(J=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1,Ve.ElNotification({type:"success",title:c("act.tip"),message:`${E.btnName}${c("act.success")}`,duration:2500}),p("operate",E),ii(T)}).catch(J=>{E.btnPostion==="header"?E[`loading${E.permissionCode}`]=!1:I[`loading${E.permissionCode}`]=!1})}).catch(se=>{});return}if(E.btnPostion==="header"&&E.submitWay==="dialog"&&(E.submitFields||[]).some(se=>se.submitFieldMatchOrigin==="selections")&&!O.tableSelection.length){if(!k.tableConfig.isCheckRow){Ve.ElNotification({title:c("act.tip"),message:c("act.configTableRow"),type:"warning",duration:2500});return}if(!O.tableSelection.length){Ve.ElNotification({title:c("act.tip"),message:`${c("act.pleaseSelcet")}${E.btnName}${c("act.data")}`,type:"warning",duration:2500});return}return}let re=(k.fields||[]).filter(se=>se.useScenes.includes(E.permissionCode)).map(se=>(se.customFiledsComponentes=se.formCustomComponentes.find(J=>J.permissionCode==E.permissionCode)||{},se));if(!re.length){Ve.ElNotification({title:c("act.tip"),message:c("act.buttonBindField"),type:"warning",duration:2500});return}if(E.submitWay==="dialog"){O.dialogTitle=E.btnName,O.dialogData={dataItem:{...E},rowData:{...I},selections:O.tableSelection||[],formConfig:k.formConfig,formList:re},O.showFormDialog=!0;return}},CQ=(E,I,le)=>{p("onClickRow",E,I,le)},AQ=(E,I)=>{G.value=E,p("changeExpansionRow",E,I)},TQ=(E,I)=>{O.editorDialogTitle=`${c("act.preview")}${E.fieldName}`,O.dialogData={...I,editorContent:I[E.fieldKey]},O.showEditorPreDialog=!0};return e({loadData:u_,getDynamicFiltersData:he,getTableData:ii,getTableSelection:N,setTableSelection:v}),(E,I)=>{const le=l.resolveComponent("el-table-column"),ge=l.resolveComponent("el-image"),ue=l.resolveComponent("el-link"),re=l.resolveComponent("a-svg-icon"),se=l.resolveComponent("el-button"),J=l.resolveComponent("el-dropdown-item"),H=l.resolveComponent("el-dropdown-menu"),be=l.resolveComponent("el-dropdown"),Oe=l.resolveComponent("el-empty"),Ke=l.resolveComponent("el-card"),ki=l.resolveDirective("debounce"),lt=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(Ke,{class:"act-module",ref_key:"actModuleRef",ref:F,shadow:"never"},{default:l.withCtx(()=>{var ni,f_;return[l.unref(Q)==="success"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(n),{ref_key:"queryModuleRef",ref:B,data:l.unref(k),onReset:h_,onSearch:h_},null,8,["data"]),l.createVNode(l.unref(s),{ref_key:"headerButtonsModuleRef",ref:U,data:l.unref(k),onOnOperate:sl},null,8,["data"]),l.createVNode(l.unref(r),{ref_key:"aTableRef",ref:oe,loading:l.unref(O).tableLoading,total:l.unref(O).tableTotal,tableQuery:l.unref(O).tableQuery,"onUpdate:tableQuery":I[0]||(I[0]=ye=>l.unref(O).tableQuery=ye),selection:l.unref(O).tableSelection,"onUpdate:selection":I[1]||(I[1]=ye=>l.unref(O).tableSelection=ye),headers:l.unref($),data:l.unref(A),showPagination:(f_=(ni=l.unref(k))==null?void 0:ni.tableConfig)==null?void 0:f_.isPagination,tableConfig:y.tableConfig,maxHeight:Z.value,onRefresh:q,onOnRowClick:CQ,onChangeExpand:AQ},l.createSlots({operate:l.withCtx(({scope:ye})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Di(),(_e,si)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:si},[X(_e,ye.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[_e.isCustomBtn&&_e.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_e[_e.customComponentName]),{key:0,ref_for:!0,ref:An=>l.unref(P)[`${_e.customComponentName}-${_e.permissionCode}`]=An,buttonData:_e,scope:ye,onRefresh:ii},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(se,{class:"ml4",type:"primary",link:"",size:"small",loading:ye.row[`loading${_e.permissionCode}`],onClick:An=>sl(_e,ye.row)},{default:l.withCtx(()=>[_e.btnIcon&&!ye.row[`loading${_e.permissionCode}`]?(l.openBlock(),l.createBlock(re,{key:0,class:"mr2",name:_e.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(ye.row[`loading${_e.permissionCode}`]?_e.btnName+l.unref(c)("act.loading")+"...":_e.btnName),1)]),_:2},1032,["loading","onClick"])),[[ki]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(se,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:ye.row[`loading${_e.permissionCode}`],onClick:An=>sl(_e,ye.row)},{default:l.withCtx(()=>[_e.btnIcon&&!ye.row[`loading${_e.permissionCode}`]?(l.openBlock(),l.createBlock(re,{key:0,class:"mr2",name:_e.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(ye.row[`loading${_e.permissionCode}`]?_e.btnName+l.unref(c)("act.loading")+"...":_e.btnName),1)]),_:2},1032,["loading","onClick"])),[[ki]])],64)):l.createCommentVNode("",!0)],64))),128)),Xe.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(be,{key:0,class:"table-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode(H,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(os(),(_e,si)=>(l.openBlock(),l.createBlock(J,{key:si,onClick:An=>sl(_e,ye.row)},{default:l.withCtx(()=>[X(_e,ye.row)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[_e.isCustomBtn&&_e.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(_e[_e.customComponentName]),{key:0,ref_for:!0,ref:An=>l.unref(P)[`${_e.customComponentName}-${_e.permissionCode}`]=An,buttonData:_e,scope:ye,onRefresh:ii},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(se,{class:"ml4",type:"primary",link:"",size:"small",loading:ye.row[`loading${_e.permissionCode}`]},{default:l.withCtx(()=>[_e.btnIcon&&!ye.row[`loading${_e.permissionCode}`]?(l.openBlock(),l.createBlock(re,{key:0,class:"mr2",name:_e.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(ye.row[`loading${_e.permissionCode}`]?_e.btnName+l.unref(c)("act.loading")+"...":_e.btnName),1)]),_:2},1032,["loading"])),[[ki]])]),_:2},1064,["buttonData","scope"])):l.withDirectives((l.openBlock(),l.createBlock(se,{key:1,class:"ml4",type:"primary",link:"",size:"small",loading:ye.row[`loading${_e.permissionCode}`]},{default:l.withCtx(()=>[_e.btnIcon&&!ye.row[`loading${_e.permissionCode}`]?(l.openBlock(),l.createBlock(re,{key:0,class:"mr2",name:_e.btnIcon,width:"12",height:"12",color:l.unref(d)},null,8,["name","color"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(ye.row[`loading${_e.permissionCode}`]?_e.btnName+l.unref(c)("act.loading")+"...":_e.btnName),1)]),_:2},1032,["loading"])),[[ki]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:l.withCtx(()=>[l.createVNode(se,{class:"table-btn-more",icon:l.unref(dy),size:"small",circle:""},null,8,["icon"])]),_:2},1024))]),_:2},[l.renderList(l.unref(D),(ye,_e)=>({name:ye.fieldKey,fn:l.withCtx(()=>[ye[`customTableHeaderInstance_${ye.customTableHeaderName}`]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(ye[`customTableHeaderInstance_${ye.customTableHeaderName}`]),{key:0,data:ye,configData:l.unref(k),rowData:l.unref(G)},null,8,["data","configData","rowData"])):(l.openBlock(),l.createBlock(le,{key:1,label:ye.fieldName+l.unref(c)("act.customTableHeader"),width:"260"},null,8,["label"]))])})),l.renderList(l.unref(C),(ye,_e)=>({name:ye.fieldKey,fn:l.withCtx(({scope:si})=>[ye.tableCellContentType=="link"?(l.openBlock(),l.createElementBlock("span",Oy,l.toDisplayString(si.row[ye.fieldKey]),1)):ye.fieldType=="editor"?(l.openBlock(),l.createElementBlock("span",{key:1,class:"table-link",onClick:An=>TQ(ye,si.row)},"点击预览",8,_y)):ye.fieldType=="upload"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[Qe(ye,si)?(l.openBlock(),l.createBlock(ge,{key:0,class:"file-image",fit:"cover","preview-src-list":Li(ye,si),"preview-teleported":"",src:Vi(ye,si)},{error:l.withCtx(()=>[l.createElementVNode("div",by,l.toDisplayString(ye("act.noImage")),1)]),_:2},1032,["preview-src-list","src"])):(l.openBlock(),l.createBlock(ue,{key:1,type:"primary"}))],64)):ye.fieldType=="date"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString(L(ye,si.row)),1)],64)):(l.openBlock(),l.createElementBlock("span",yy,l.toDisplayString(xQ(ye,si.row)),1))])}))]),1032,["loading","total","tableQuery","selection","headers","data","showPagination","tableConfig","maxHeight"])],64)):l.createCommentVNode("",!0),l.createVNode(l.unref(o),{visible:l.unref(O).showFormDialog,"onUpdate:visible":I[2]||(I[2]=ye=>l.unref(O).showFormDialog=ye),title:l.unref(O).dialogTitle,data:l.unref(O).dialogData,onRefresh:SQ},null,8,["visible","title","data"]),l.createVNode(l.unref(a),{visible:l.unref(O).showEditorPreDialog,"onUpdate:visible":I[3]||(I[3]=ye=>l.unref(O).showEditorPreDialog=ye),title:l.unref(O).editorDialogTitle,data:l.unref(O).dialogData},null,8,["visible","title","data"]),l.unref(Q)==="end"?(l.openBlock(),l.createBlock(Oe,{key:1,description:l.unref(c)("act.noConfigPage")},{image:l.withCtx(()=>[l.createVNode(re,{name:"config-nodata",width:"200",height:"200"})]),_:1},8,["description"])):l.createCommentVNode("",!0)]}),_:1})),[[lt,l.unref(O).pageLoading]])}}},[["__scopeId","data-v-dba0e25e"]]),wy=[{key:"按钮形式",value:"default"},{key:"文字形式",value:"text"}],ky=[{key:"顶部",value:"header"},{key:"表格",value:"table"}],xy=[{key:"主题色",value:"primary"},{key:"绿色",value:"success"},{key:"灰色",value:"info"},{key:"橙黄色",value:"warning"},{key:"红色",value:"danger"},{key:"浅蓝",value:"primary-light"}],Sy=[{key:"模态框",value:"dialog"},{key:"提示框",value:"messageBox"},{key:"导入",value:"import"},{key:"多文件导入",value:"batchImport"},{key:"导出(流)",value:"export"},{key:"导出(url)",value:"exportUrl"},{key:"直接执行接口",value:"executeApi"},{key:"关联子表",value:"associationSubTable"}],Cy=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],Ay=[{key:"且",value:"&&"},{key:"或",value:"||"}],Ty=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"选择列",value:"selection"},{key:"查询条件",value:"query"}],Py=[{key:"默认匹配",value:"default"},{key:"用户信息变量",value:"userInfo"}],Qy=[{key:"组件",value:"component"},{key:"代码",value:"code"}],Ey=[{key:"GET",value:"GET"},{key:"POST",value:"POST"}],sf=[{key:"隐式",value:"implicit"},{key:"输入框",value:"input"},{key:"数字输入框",value:"inputNumber"},{key:"textarea文本框",value:"textarea"},{key:"下拉单选框",value:"select"},{key:"虚拟下拉框",value:"virtualizedSelect"},{key:"下拉多选框",value:"multipleSelect"},{key:"虚拟下拉多选框",value:"virtualizedMultipleSelect"},{key:"树形下拉框",value:"fullLoadTreeSelect"},{key:"树形下拉框(懒加载)",value:"treeSelect"},{key:"级联下拉框",value:"provinceCascade"},{key:"时间框",value:"date"},{key:"时间范围框",value:"dateRange"},{key:"上传",value:"upload"},{key:"富文本",value:"editor"},{key:"switch开关",value:"switch"},{key:"下拉选择图标",value:"selectIcon"}],$y=[{key:"默认值",value:"default"},{key:"匹配",value:"match"},{key:"dynamic",value:"dynamic"}],Ny=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"}],Ry=[{key:"居中",value:"center"},{key:"左对齐",value:"left"},{key:"右对齐",value:"right"}],Vy=[{key:"默认",value:"default"},{key:"链接",value:"link"},{key:"标签",value:"tag"}],Ly=[{key:"默认宽",value:"default"},{key:"最小宽",value:"min"}],rf=[{key:"数组",value:"array"},{key:"字符串",value:"string"},{key:"数字",value:"number"},{key:"布尔",value:"boolean"}],My=[{key:"左侧",value:"right"},{key:"上侧",value:"top"}],Dy=[{key:"是",value:"1"},{key:"否",value:"0"}],of=[{label:"表格配置",options:[{key:"表格查询",value:"tableSearch"},{key:"表格展示",value:"tableShow"}]},{label:"表单配置",options:[]}],vy={__name:"configForm",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({formRow:1,dialogWidth:800,formLabelWidth:120,formLabelPosition:"top"});let r=l.ref(null),o=l.ref(s());return l.watch(()=>n.modelValue,(a,c)=>{a&&(o.value=Object.assign(o.value,{...a}))},{deep:!0,immediate:!0}),e({formRef:r,form:o}),(a,c)=>{const u=l.resolveComponent("el-input-number"),h=l.resolveComponent("el-form-item"),f=l.resolveComponent("el-col"),d=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),b=l.resolveComponent("el-row"),w=l.resolveComponent("el-form"),g=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(g,{class:"form-card",shadow:"hover",header:"表单配置"},{default:l.withCtx(()=>[l.createVNode(w,{ref_key:"formRef",ref:r,model:l.unref(o),"label-suffix":":","label-width":"110px"},{default:l.withCtx(()=>[l.createVNode(b,null,{default:l.withCtx(()=>[l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(h,{label:"弹窗宽度"},{default:l.withCtx(()=>[l.createVNode(u,{modelValue:l.unref(o).dialogWidth,"onUpdate:modelValue":c[0]||(c[0]=p=>l.unref(o).dialogWidth=p),min:800},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(h,{label:"排版列数"},{default:l.withCtx(()=>[l.createVNode(u,{modelValue:l.unref(o).formRow,"onUpdate:modelValue":c[1]||(c[1]=p=>l.unref(o).formRow=p),min:1,max:4},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(h,{label:"label宽度"},{default:l.withCtx(()=>[l.createVNode(u,{modelValue:l.unref(o).formLabelWidth,"onUpdate:modelValue":c[2]||(c[2]=p=>l.unref(o).formLabelWidth=p),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(f,{span:8},{default:l.withCtx(()=>[l.createVNode(h,{label:"label位置",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"formLabelPosition"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(o).formLabelPosition,"onUpdate:modelValue":c[3]||(c[3]=p=>l.unref(o).formLabelPosition=p),placeholder:"请选择"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(My),(p,y)=>(l.openBlock(),l.createBlock(d,{key:y+"labelPosition",label:p.key,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},DQ="",By=ct({__name:"configTable",props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=i,s=()=>({dataUrl:void 0,defaultParams:[],isCheckRow:!1,isOperateRow:!0,isPagination:!0,isSerialNumber:!0,isSort:!0,isExpandQuery:!1,isExecuteImmediatelyTableApi:!0,tableOperateCellWidth:160,pageSize:10,tableQueryLabelWidth:100,tableQueryRowWidth:5,tableMoreBtnSplitNumber:0,headerMoreBtnSplitNumber:0}),r=l.inject("conditionList")();let o=l.ref(null),a=l.ref(s());l.watch(()=>n.modelValue,(f,d)=>{if(f){if(!Object.keys(f).length)return;const m={...f,defaultParams:[...f.defaultParams||[]]};Object.keys(a.value).forEach(b=>{["defaultParams"].includes(b)?a.value[b]=[...m[b]||[]]:b==="tableMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"tableMoreBtnSplitNumber")?m[b]:0:b==="headerMoreBtnSplitNumber"?a.value[b]=Reflect.has(m,"headerMoreBtnSplitNumber")?m[b]:0:b==="isExecuteImmediatelyTableApi"?a.value[b]=Reflect.has(m,"isExecuteImmediatelyTableApi")?m[b]:!0:a.value[b]=m[b]})}},{deep:!0,immediate:!0});const c=()=>{a.value.defaultParams.push({submitFieldName:"",defaultValue:"",matchValue:"",submitFieldType:""})},u=f=>{a.value.defaultParams.splice(f,1)},h=f=>{f||(a.value.pageSize=10)};return e({formRef:o,form:a}),(f,d)=>{const m=l.resolveComponent("el-input"),b=l.resolveComponent("el-form-item"),w=l.resolveComponent("el-col"),g=l.resolveComponent("el-row"),p=l.resolveComponent("el-button"),y=l.resolveComponent("el-divider"),x=l.resolveComponent("el-option"),O=l.resolveComponent("el-select"),Q=l.resolveComponent("el-switch"),S=l.resolveComponent("el-input-number"),k=l.resolveComponent("el-form"),T=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(T,{class:"form-card",shadow:"hover",header:"表格配置"},{default:l.withCtx(()=>[l.createVNode(k,{ref_key:"formRef",ref:o,model:l.unref(a),"label-suffix":":","label-width":"120"},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:24},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格数据url",prop:"dataUrl",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:l.unref(a).dataUrl,"onUpdate:modelValue":d[0]||(d[0]=$=>l.unref(a).dataUrl=$),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(y,{"content-position":"left"},{default:l.withCtx(()=>[d[14]||(d[14]=l.createTextVNode(" 表格默认参数配置 ",-1)),l.createVNode(p,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:c})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).defaultParams,($,_)=>(l.openBlock(),l.createBlock(g,{class:"table-post-params",key:_},{default:l.withCtx(()=>[l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"字段",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:$.submitFieldName,"onUpdate:modelValue":A=>$.submitFieldName=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".matchValue"},{default:l.withCtx(()=>[l.createVNode(O,{modelValue:$.matchValue,"onUpdate:modelValue":A=>$.matchValue=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(A,C)=>(l.openBlock(),l.createBlock(x,{key:C,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"默认值",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"defaultParams."+_+".defaultValue"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:$.defaultValue,"onUpdate:modelValue":A=>$.defaultValue=A,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(w,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"defaultParams."+_+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(O,{modelValue:$.submitFieldType,"onUpdate:modelValue":A=>$.submitFieldType=A,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(rf),(A,C)=>(l.openBlock(),l.createBlock(x,{key:C,label:A.key,value:A.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(y,{"content-position":"left"}),l.createVNode(w,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(p,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:A=>u(_)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"多选列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isCheckRow,"onUpdate:modelValue":d[1]||(d[1]=$=>l.unref(a).isCheckRow=$)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isOperateRow,"onUpdate:modelValue":d[2]||(d[2]=$=>l.unref(a).isOperateRow=$)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isPagination,"onUpdate:modelValue":d[3]||(d[3]=$=>l.unref(a).isPagination=$),onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"序号列"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isSerialNumber,"onUpdate:modelValue":d[4]||(d[4]=$=>l.unref(a).isSerialNumber=$)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"排序"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isSort,"onUpdate:modelValue":d[5]||(d[5]=$=>l.unref(a).isSort=$)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"展/收查询条件"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isExpandQuery,"onUpdate:modelValue":d[6]||(d[6]=$=>l.unref(a).isExpandQuery=$),onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:6},{default:l.withCtx(()=>[l.createVNode(b,{label:"立即执行接口"},{default:l.withCtx(()=>[l.createVNode(Q,{modelValue:l.unref(a).isExecuteImmediatelyTableApi,"onUpdate:modelValue":d[7]||(d[7]=$=>l.unref(a).isExecuteImmediatelyTableApi=$)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.createVNode(g,null,{default:l.withCtx(()=>[l.unref(a).isOperateRow?(l.openBlock(),l.createBlock(w,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"操作列宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).tableOperateCellWidth,"onUpdate:modelValue":d[8]||(d[8]=$=>l.unref(a).tableOperateCellWidth=$),min:120},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(a).isPagination?(l.openBlock(),l.createBlock(w,{key:1,span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"分页页数",prop:"pageSize","label-width":"150",rules:[{required:!0,message:"必填项",trigger:"blur"}]},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).pageSize,"onUpdate:modelValue":d[9]||(d[9]=$=>l.unref(a).pageSize=$),min:10},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件label宽度","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).tableQueryLabelWidth,"onUpdate:modelValue":d[10]||(d[10]=$=>l.unref(a).tableQueryLabelWidth=$),min:80},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"查询条件列数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).tableQueryRowWidth,"onUpdate:modelValue":d[11]||(d[11]=$=>l.unref(a).tableQueryRowWidth=$),min:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"表格更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).tableMoreBtnSplitNumber,"onUpdate:modelValue":d[12]||(d[12]=$=>l.unref(a).tableMoreBtnSplitNumber=$),min:0},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(w,{span:8},{default:l.withCtx(()=>[l.createVNode(b,{label:"顶部更多按钮分割数","label-width":"150"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(a).headerMoreBtnSplitNumber,"onUpdate:modelValue":d[13]||(d[13]=$=>l.unref(a).headerMoreBtnSplitNumber=$),min:0},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}},[["__scopeId","data-v-3a00699d"]]),BQ="",Iy=ct({__name:"configBtns",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const n=rn.useRoute(),s=l.inject("apiPrefix"),r=l.inject("request"),o=l.defineAsyncComponent(()=>Promise.resolve().then(()=>f1)),a=i,c=()=>({sort:0,permissionCode:null,requestUrl:"",btnName:"",btnAlias:"",btnIcon:"",btnPostion:"",btnType:"",btnColor:"",submitWay:"",importFileName:"",isPromptVerificationSelectTable:"1",isCustomBtn:!1,customType:"",codeStr:"",customComponentName:"",customComponentUrl:"",associationMenuId:"",submitFields:[],matchFields:[]}),u=()=>({tableLoading:!1,showConfigBtnDialog:!1,dialogData:{}});let h=l.reactive(u()),f=l.ref(null),d=0,m=l.ref([]),b=l.ref([]),w=[{prop:"checkbox",width:60},{prop:"serialNumber",width:80},{label:"按钮名称",prop:"btnName",minWidth:200},{label:"权限码",prop:"permissionCode",minWidth:200},{label:"按钮别名",prop:"btnAlias",minWidth:120},{label:"按钮图标",prop:"btnIcon",minWidth:120},{label:"是否自定义",prop:"isCustomBtn",width:120,render:!0},{label:"排序",prop:"sort",width:180,render:!0},{label:"操作",prop:"operate",width:120,render:!0,fixed:"right"}],g=l.ref([]);const p=k=>r({url:`${s}/sysMenus/getAllList`,method:"post",data:k}),y=k=>r({url:`${s}/sysMenus/getMenuOfOperate`,method:"get",params:k}),x=(k,T)=>{b.value.includes(k.permissionCode)||b.value.push(k.permissionCode),Object.assign(g.value[d],k),T(!0)},O=async k=>{try{h.tableLoading=!0;const T=a.id?a.id:n.params.id,{data:$}=await y({id:T});b.value=($||[]).filter(_=>(k||[]).some(A=>A.permissionCode==_.unique)).map(_=>_.unique),g.value=($||[]).map((_,A)=>{let C=c(),D=(k||[]).find(P=>P.permissionCode==_.unique)||{};return{...C,btnIcon:_.icon||"",...D,btnName:_.name,permissionCode:_.unique,sort:D.sort?D.sort:(A+1)*10}}).sort((_,A)=>_.sort-A.sort),h.tableLoading=!1}catch(T){h.tableLoading=!1,console.error(T)}},Q=()=>f.value.getSelectionRows()||[];l.provide("associationMenuList",m),l.provide("createDefaultButtonItem",c),l.watch(()=>a.modelValue,async(k,T)=>{try{const $=a.id?a.id:n.params.id;m.value=(await p({dynamicFilters:[{field:"parentId",operate:"Equal",value:$}]})).data||[],await O(k)}catch($){h.tableLoading=!1,console.error($)}},{deep:!0});const S=k=>{h.dialogData=k.row,d=k.$index,h.showConfigBtnDialog=!0};return e({getTableSelectionRows:Q}),(k,T)=>{const $=l.resolveComponent("el-tag"),_=l.resolveComponent("el-input-number"),A=l.resolveComponent("el-button"),C=l.resolveComponent("a-table"),D=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(D,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>[...T[2]||(T[2]=[l.createElementVNode("div",{class:"card-header"},[l.createElementVNode("div",{class:"card-header-title"},"按钮配置")],-1)])]),default:l.withCtx(()=>[l.createVNode(C,{ref_key:"tableRef",ref:f,loading:l.unref(h).tableLoading,rowKey:"permissionCode",selection:l.unref(b),"onUpdate:selection":T[0]||(T[0]=P=>l.isRef(b)?b.value=P:b=P),headers:l.unref(w),data:l.unref(g),showPagination:!1},{isCustomBtn:l.withCtx(({scope:P})=>[l.createVNode($,{type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(P.row.isCustomBtn?"是":"否"),1)]),_:2},1024)]),sort:l.withCtx(({scope:P})=>[l.createVNode(_,{modelValue:P.row.sort,"onUpdate:modelValue":F=>P.row.sort=F,min:0},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:P})=>[l.createVNode(A,{type:"primary",text:"",size:"small",icon:"Aim",onClick:F=>S(P)},{default:l.withCtx(()=>[...T[3]||(T[3]=[l.createTextVNode(" 配置 ",-1)])]),_:1},8,["onClick"])]),_:1},8,["loading","selection","headers","data"]),l.createVNode(l.unref(o),{visible:l.unref(h).showConfigBtnDialog,"onUpdate:visible":T[1]||(T[1]=P=>l.unref(h).showConfigBtnDialog=P),title:"配置按钮",data:l.unref(h).dialogData,onRefresh:x},null,8,["visible","data"])]),_:1})}}},[["__scopeId","data-v-05dd44e9"]]),ZQ="",Zy={class:"card-header"},Fy=ct({__name:"configFileds",props:{modelValue:{type:Object,default:()=>[]}},emits:["update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>m1)),n=e,s=i;l.inject("configData")();const r=()=>({tableLoading:!1,showAddFieldDialog:!1,dialogTitle:"字段配置",dialogData:{}});let o=l.reactive(r()),a=0,c=[{label:"序号",prop:"serialNumber",width:60},{label:"字段",prop:"fieldName",minWidth:160},{label:"字段Key",prop:"fieldKey",minWidth:160},{label:"字段类型",prop:"fieldType",minWidth:160,render:!0},{label:"使用场景",prop:"useScenes",minWidth:340,render:!0},{label:"排序",prop:"sort",width:200,render:!0},{label:"操作",prop:"operate",width:170,render:!0,fixed:"right"}],u=l.ref([]);of[0].options.map(x=>({btnName:x.key,permissionCode:x.value}));const h=x=>{if(!Reflect.has(x,"fieldType"))return"";const O=sf.find(Q=>Q.value==x.fieldType);return(O==null?void 0:O.key)||""},f=x=>Reflect.has(x,"useScenes")?(x.formCustomComponentes??[]).filter(O=>x.useScenes.includes(O.permissionCode)):[],d=x=>(x.formCustomComponentes||[]).filter(O=>O.isFieldCustom).map(O=>`${O.btnName}:是`).join(),m=(x,O)=>{if(a==null){const Q=u.value.length;u.value.push({...x,sort:(Q+1)*10})}else u.value[a]={...x,postRequestParams:[...x.postRequestParams],useScenes:[...x.useScenes],formCustomComponentes:[...x.formCustomComponentes]};n("update:modelValue",u.value),O(!0)},b=async()=>{try{o.tableLoading=!0,u.value=(s.modelValue||[]).map(x=>({...x,sort:x.sort?x.sort:0})).sort((x,O)=>x.sort-O.sort),o.tableLoading=!1}catch(x){o.tableLoading=!1,console.error(x)}};l.watch(()=>s.modelValue,async(x,O)=>{await b()},{deep:!0,immediate:!0});const w=()=>{a=null,o.dialogData={},o.showAddFieldDialog=!0},g=x=>{a=x.$index,o.dialogData=x.row,o.showAddFieldDialog=!0},p=()=>{n("update:modelValue",u.value)},y=x=>{u.value.splice(x.$index,1),n("update:modelValue",u.value)};return(x,O)=>{const Q=l.resolveComponent("el-button"),S=l.resolveComponent("el-tag"),k=l.resolveComponent("el-badge"),T=l.resolveComponent("el-input-number"),$=l.resolveComponent("a-table"),_=l.resolveComponent("el-card");return l.openBlock(),l.createBlock(_,{class:"form-card",shadow:"hover"},{header:l.withCtx(()=>[l.createElementVNode("div",Zy,[O[3]||(O[3]=l.createElementVNode("div",{class:"card-header-title"},"字段配置",-1)),l.createVNode(Q,{class:"card-header-operate",type:"primary",icon:"Plus",onClick:O[0]||(O[0]=A=>w())},{default:l.withCtx(()=>[...O[2]||(O[2]=[l.createTextVNode("添加字段",-1)])]),_:1})])]),default:l.withCtx(()=>[l.createVNode($,{loading:l.unref(o).tableLoading,headers:l.unref(c),data:l.unref(u),showPagination:!1},{fieldType:l.withCtx(({scope:A})=>[l.createTextVNode(l.toDisplayString(h(A.row)),1)]),useScenes:l.withCtx(({scope:A})=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f(A.row),(C,D)=>(l.openBlock(),l.createBlock(k,{key:D,value:C.isFieldCustom?"C":"",offset:[-5,5]},{default:l.withCtx(()=>[l.createVNode(S,{style:{margin:"0 4px"},type:"success",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C.btnName),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),formCustomComponentes:l.withCtx(({scope:A})=>[d(A.row)?(l.openBlock(),l.createBlock(S,{key:0,type:"primary",effect:"dark",size:"small"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d(A.row)),1)]),_:2},1024)):l.createCommentVNode("",!0)]),sort:l.withCtx(({scope:A})=>[l.createVNode(T,{modelValue:A.row.sort,"onUpdate:modelValue":C=>A.row.sort=C,min:0,onChange:p},null,8,["modelValue","onUpdate:modelValue"])]),operate:l.withCtx(({scope:A})=>[l.createVNode(Q,{type:"primary",text:"",size:"small",icon:"EditPen",onClick:C=>g(A)},{default:l.withCtx(()=>[...O[4]||(O[4]=[l.createTextVNode("编辑",-1)])]),_:1},8,["onClick"]),l.createVNode(Q,{type:"danger",text:"",size:"small",icon:"Delete",onClick:C=>y(A)},{default:l.withCtx(()=>[...O[5]||(O[5]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1},8,["loading","headers","data"]),l.createVNode(l.unref(t),{visible:l.unref(o).showAddFieldDialog,"onUpdate:visible":O[1]||(O[1]=A=>l.unref(o).showAddFieldDialog=A),title:l.unref(o).dialogTitle,configData:s.data,data:l.unref(o).dialogData,onRefresh:m},null,8,["visible","title","configData","data"])]),_:1})}}},[["__scopeId","data-v-5ac6753d"]]),UQ="",Uy={class:"dialog-footer"},Xy=ct({__name:"dialogInitConfig",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=rn.useRoute(),n=l.inject("apiPrefix"),s=l.inject("request"),r=e,o=i;l.computed(()=>t.params.key);const a=()=>({dataBase:"",api:""}),c=()=>({loading:!1,btnLoading:!1});let u=l.reactive(c()),h=l.ref([]),f=l.ref(null),d=l.ref(a());const m=x=>s({url:`${n}/scripts/getAllDatabaseTable`,method:"get",data:x}),b=async()=>{try{u.loading=!0;const{data:x}=await m();h.value=x||[],u.loading=!1}catch(x){console.error(x),u.loading=!1}};l.watch(()=>o.visible,async(x,O)=>{x&&await b()});const w=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),g=x=>{p(),x()},p=()=>{d.value=Object.assign(d.value,a()),f.value.resetFields(),r("update:visible",!1)},y=x=>{x&&x.validate(async O=>{if(O)try{u.btnLoading=!0;const{data:Q}=await s({url:`${n}/scripts/getAllColumnsByTableName`,method:"get",params:{tableName:d.value.dataBase}}),S=(Q||[]).map(k=>{let T=w();return T.fieldName=k.comment,T.fieldKey=k.name,T.fieldType="string",T});r("refresh",{formList:S},()=>{p()}),u.btnLoading=!1}catch(Q){console.error(Q),u.btnLoading=!1}})};return(x,O)=>{const Q=l.resolveComponent("el-option"),S=l.resolveComponent("el-select"),k=l.resolveComponent("el-form-item"),T=l.resolveComponent("el-input"),$=l.resolveComponent("el-form"),_=l.resolveComponent("el-button"),A=l.resolveComponent("el-dialog"),C=l.resolveDirective("loading"),D=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(A,{"model-value":o.visible,title:o.title,top:"10vh",width:"600",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":g},{footer:l.withCtx(()=>[l.createElementVNode("span",Uy,[l.createVNode(_,{loading:l.unref(u).btnLoading,onClick:p},{default:l.withCtx(()=>[...O[3]||(O[3]=[l.createTextVNode("取消",-1)])]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(_,{type:"primary",loading:l.unref(u).btnLoading,onClick:O[2]||(O[2]=P=>y(l.unref(f)))},{default:l.withCtx(()=>[...O[4]||(O[4]=[l.createTextVNode("保存",-1)])]),_:1},8,["loading"])),[[D]])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock($,{ref_key:"formRef",ref:f,model:l.unref(d),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(k,{label:"数据库","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"dataBase"},{default:l.withCtx(()=>[l.createVNode(S,{modelValue:l.unref(d).dataBase,"onUpdate:modelValue":O[0]||(O[0]=P=>l.unref(d).dataBase=P),placeholder:"请选择数据库",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(P,F)=>(l.openBlock(),l.createBlock(Q,{key:P,label:`${P.tableComment}【${P.tableName}】`,value:P.tableName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l.createVNode(k,{label:"接口地址(关键字)","label-width":"120",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"api"},{default:l.withCtx(()=>[l.createVNode(T,{modelValue:l.unref(d).api,"onUpdate:modelValue":O[1]||(O[1]=P=>l.unref(d).api=P),placeholder:"请输入接口地址(关键字)",clearable:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[C,l.unref(u).loading]])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-5c2c8b66"]]),WQ="",Wy={class:"page-container"},qy={class:"submit-box"},jy={class:"submit-box-r"},lf=ct({__name:"index",props:{pageKey:{type:String,default:""},id:{type:String,default:void 0}},setup(i){const e=rn.useRoute(),t=rn.useRouter(),n=l.inject("apiPrefix"),s=l.inject("request"),r=i;let o=r.id??void 0,a=r.pageKey?r.pageKey:e.params.key,c=l.ref([]),u=l.ref(),h=l.ref([]),f=l.ref({}),d=l.ref(null),m=l.ref(null),b=l.ref(null),w=l.ref({}),g=l.ref({}),p=l.ref([]),y=l.ref([]),x=l.reactive({pageLoading:!1,saveBtnLoading:!1,showDialogInitConfig:!1});const O=B=>s({url:`${n}/pages/getPageDetail?key=${B}`,method:"get"}),Q=B=>s({url:`${n}/pageConfigs/createOrEdit`,method:"post",data:B}),S=B=>s({url:`${n}/sysMenus/getAllList`,method:"post",data:B}),k=B=>s({url:`${n}/sysDataDictionaries/getDictionaryByGroup?groupName=${B}`,method:"get"}),T=async()=>{const{data:B}=await S({dynamicFilters:[{field:"url",operate:"Equal",value:"/pages"}]});c.value=B||[]},$=async()=>{try{const{data:{pageConfigs:B}}=await O(a),U=JSON.parse(B.pageConfig)||{};o=B.pageId,console.log("pageConfigData",U),f.value=U,w.value={...U.tableConfig??{}},g.value={...U.formConfig??{}},p.value=[...U.buttons??[]],y.value=[...U.fields??[]]}catch(B){console.error(B)}},_=()=>{w.value={},g.value={},p.value=[],y.value=[],$()};l.provide("conditionList",()=>h),l.provide("pageKey",()=>l.ref(a)),l.provide("configData",()=>f),l.onMounted(async()=>{try{x.pageLoading=!0,await T(),u.value=e.params.id,h.value=(await k("Condition")).data||[],await $(),x.pageLoading=!1}catch(B){x.pageLoading=!1,console.error(B)}});const A=B=>{const U=c.value.find(oe=>oe.id==B);t.replace({path:`/actConfig/${U.key}/${U.id}`}),u.value=U.id,a=U.key,$()},C=()=>{x.showDialogInitConfig=!0},D=({formList:B},U)=>{y.value=[...B],U(!0)},P=()=>{let B={id:o,key:a,pageConfig:{tableConfig:d.value.form,formConfig:m.value.form,buttons:b.value.getTableSelectionRows(),fields:y.value}};B.pageConfig=JSON.stringify(B.pageConfig),x.saveBtnLoading=!0,Q(B).then(U=>{Ve.ElNotification({title:"提示",message:"保存成功",type:"success",duration:2500}),_(),x.saveBtnLoading=!1}).catch(U=>{x.saveBtnLoading=!1})},F=async()=>{Promise.all([d.value.formRef.validate(),m.value.formRef.validate()]).then(B=>{B.every(U=>U)&&P()}).catch(B=>B)};return(B,U)=>{const oe=l.resolveComponent("el-button"),Z=l.resolveComponent("el-option"),G=l.resolveComponent("el-select"),j=l.resolveComponent("el-card"),K=l.resolveComponent("el-col"),de=l.resolveComponent("el-row"),fe=l.resolveDirective("debounce"),he=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",Wy,[l.createVNode(de,{style:{margin:"0"},gutter:12},{default:l.withCtx(()=>[l.createVNode(K,{class:"header-operate",span:24},{default:l.withCtx(()=>[l.createVNode(j,{class:"form-card",shadow:"hover"},{default:l.withCtx(()=>[l.createElementVNode("div",qy,[U[10]||(U[10]=l.createElementVNode("div",{class:"submit-box-l"},null,-1)),l.createElementVNode("div",jy,[l.withDirectives((l.openBlock(),l.createBlock(oe,{style:{width:"120px"},type:"primary",loading:l.unref(x).initBtnLoading,onClick:U[0]||(U[0]=v=>C())},{default:l.withCtx(()=>[...U[8]||(U[8]=[l.createTextVNode("一键初始化配置",-1)])]),_:1},8,["loading"])),[[fe]]),l.createVNode(G,{class:"menu-select",modelValue:l.unref(u),"onUpdate:modelValue":U[1]||(U[1]=v=>l.isRef(u)?u.value=v:u=v),placeholder:"菜单切换",clearable:"",filterable:"",onChange:A},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),v=>(l.openBlock(),l.createBlock(Z,{key:v.id,label:v.name,value:v.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.withDirectives((l.openBlock(),l.createBlock(oe,{style:{width:"120px"},type:"success",loading:l.unref(x).saveBtnLoading,onClick:U[2]||(U[2]=v=>F(B.formRef))},{default:l.withCtx(()=>[...U[9]||(U[9]=[l.createTextVNode("保存",-1)])]),_:1},8,["loading"])),[[fe]])])])]),_:1})]),_:1}),l.createVNode(K,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(By,{ref_key:"configTableRef",ref:d,modelValue:l.unref(w),"onUpdate:modelValue":U[3]||(U[3]=v=>l.isRef(w)?w.value=v:w=v)},null,8,["modelValue"])]),_:1}),l.createVNode(K,{class:"mt12",span:12},{default:l.withCtx(()=>[l.createVNode(vy,{ref_key:"configFormRef",ref:m,modelValue:l.unref(g),"onUpdate:modelValue":U[4]||(U[4]=v=>l.isRef(g)?g.value=v:g=v)},null,8,["modelValue"])]),_:1}),l.createVNode(K,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Iy,{ref_key:"configBtnsRef",ref:b,modelValue:l.unref(p),"onUpdate:modelValue":U[5]||(U[5]=v=>l.isRef(p)?p.value=v:p=v)},null,8,["modelValue"])]),_:1}),l.createVNode(K,{class:"mt12",span:24},{default:l.withCtx(()=>[l.createVNode(Fy,{modelValue:l.unref(y),"onUpdate:modelValue":U[6]||(U[6]=v=>l.isRef(y)?y.value=v:y=v)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(Xy,{visible:l.unref(x).showDialogInitConfig,"onUpdate:visible":U[7]||(U[7]=v=>l.unref(x).showDialogInitConfig=v),title:"一键初始化配置",onRefresh:D},null,8,["visible"])])),[[he,l.unref(x).pageLoading]])}}},[["__scopeId","data-v-8dfa8a8a"]]),zy=(i,e)=>{let t=e.value||1e3,n,s=!1;i.addEventListener("click",r=>{n&&clearTimeout(n),s?r&&r.stopImmediatePropagation():s=!0,n=setTimeout(()=>{n=null,s=!1},t)},!0)},Pr={en:{act:{sort:"Serial Number",noData:"No Data",operate:"Operation",inputPlaceholder:"Please Input ",selectPlaceholder:"Please Select ",tip:"Tip",time:"Time",startTime:"Start Time",endTime:"End Time",loading:"ing",reset:"Reset",requiredMessage:"Required",customTableHeader:"Custom",developing:"In the process of feature development Coming soon",fieldCustom:"Custom",cancel:"Cancel",save:"Save",saveSuccessfully:"Save Successfully",configTableRow:"Please configure the table to select multiple columns",pleaseSelcet:"Please Selcet Need",data:"Data",success:"Success",buttonBindField:"The current button is not bound to a field",enter:"Enter",isExecuteOperate:"Are you sure to perform this operation",noConfigPage:"No Config Page",noImage:"No image",preview:"Preview",uploadText:"Drag the file here, or",clickUpload:"Click to upload",uploadLoading:"Upload loading...",uploadErrorTip:"The file type is incorrect. Please upload the file in the correct format again",uploadLimitTip:"Exceeding the file limit, please confirm and upload again.",expand:"Expand",retract:"Retract",formatCode:"FormatCode"}},zhCn:{act:{sort:"序号",noData:"暂无数据",operate:"操作",inputPlaceholder:"请输入",selectPlaceholder:"请选择",tip:"提示",time:"时间",startTime:"开始时间",endTime:"结束时间",loading:"中",reset:"重置",requiredMessage:"必填项",customTableHeader:"自定义表头(暂未创建文件)",developing:"功能开发中...敬请期待",fieldCustom:"当前字段为自定义,请在项目中创建对应组件",cancel:"取消",save:"保存",saveSuccessfully:"保存成功",configTableRow:"请配置表格多选列",pleaseSelcet:"请选择需要",data:"的数据",success:"成功",buttonBindField:"当前按钮未绑定字段",enter:"确定",isExecuteOperate:"是否确认执行此操作",noConfigPage:"暂无页面信息",noImage:"暂无",preview:"预览",uploadText:"将文件拖到此处,或",clickUpload:"点击上传",uploadLoading:"上传中...",uploadErrorTip:"文件类型不正确,请重新上传正确格式的文件。",uploadLimitTip:"超出文件数量限制,请确认后重新上传。",expand:"展开",retract:"收起",formatCode:"一键格式化代码"}}},af={ActPage:nf,ActConfig:lf},Yy={install(i,e){var d;const{modules:t,apiPrefix:n,request:s,themeColor:r,cacheTokenType:o="sessionStorage",cookieStorage:a,language:{messages:c={},en:u="zhCn"}}=e,h={act:Object.assign(Pr[u].act,((d=c[u])==null?void 0:d.act)??{})},f=Rh({locale:u,fallbackLocale:u,messages:{...Pr,[u]:h}});i.use(f),i.provide("actModules",t),i.provide("themeColor",r),i.provide("apiPrefix",n||"/api/v1"),i.provide("request",s),i.provide("cacheTokenType",o),i.provide("cookieStorage",a),i.directive("debounce",zy),Object.keys(af).forEach(m=>{i.component(m,af[m])})}},Gy={ActPage:nf,ActConfig:lf};function Ky(i){var o;const{modules:e,language:{messages:t={},en:n="zhCn"}}=i,s={act:Object.assign(Pr[n].act,((o=t[n])==null?void 0:o.act)??{})};return Rh({locale:n,fallbackLocale:n,messages:{...Pr,[n]:s}})}const jQ="",Hy={key:0,class:"search-module-container"},Jy={class:"no-config-field"},e1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["reset","search"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>cf)),{t:n}=Gt(),s=l.inject("request"),r=l.inject("globalProps"),o=l.inject("loadComponents"),a=l.inject("getFieldUiProps"),c=l.inject("formatDataType"),u=l.inject("disposeDate"),h=l.inject("getDefaultQueryValues"),f=e,d=i,m=l.ref({});let b=l.ref([]),w=l.ref([]),g=l.ref(!0);const p=l.ref(0),y=l.ref(0),x=A=>d.data.tableConfig.isExpandQuery&&g.value?d.data.tableConfig.tableQueryRowWidth>A+1:!0,O=async A=>{b.value=await Promise.all(A.filter(C=>C.useScenes.includes("tableSearch")).map(async C=>{C.tableQueryDefaultValue&&(["date","dateRange"].includes(C.fieldType)?C.queryValue=u(C):C.queryValue=C.tableQueryDefaultValue?C.tableQueryDefaultValue:void 0),r.defaultParams.some(P=>{P.field==C.fieldKey&&P.operate===C.tableQueryCondition&&(C.queryValue=P.value)});const D=(C.formCustomComponentes??[]).find(P=>P.permissionCode==="tableSearch");if(C.isQueryFieldCustom=!1,D&&D.isFieldCustom){const{isFieldCustom:P,customComponentName:F,customComponentUrl:B}=D;if(C.isQueryFieldCustom=!0,y.value++,P&&!C.customQueryComponent){const U=await o(B,F);C.customQueryComponent=U}}return C}))},Q=A=>{const C=(A||[]).filter(D=>D.permissionCode===1001).map(D=>({...D,loading:!1}));w.value=[...C,{btnName:n("act.reset"),permissionCode:"9999",btnColor:"info",btnIcon:"btn-reset",loading:!1}]},S=async({node:A,resolve:C},D)=>{const P=a(D),{label:F,value:B,children:U,isLeaf:oe}={...Ar,...P.treeProps||{}};if(A[oe])return C([]);const Z=D.postRequestParams.filter(he=>he.submitType==="default").reduce((he,v)=>(he[v.submitName]=c(v.paramsType,v.submitValue),he),{}),G=D.postRequestParams.filter(he=>he.submitType==="match").reduce((he,v)=>(he[v.submitName]=c(v.paramsType,r.matchData[v.submitValue][v.submitName]),he),{}),j=D.postRequestParams.filter(he=>he.submitType==="dynamic").map(he=>({field:he.submitName,operate:he.submitMatchType,value:P.loadCode?A==null?void 0:A.data.value:c(he.paramsType,he.submitValue)}));let K={};Object.keys(Z).length&&(K={...K,...Z}),Object.keys(G).length&&(K={...K,...G}),j.length&&(K.dynamicFilters=j),P.loadCode&&Reflect.has(K,P.loadCode)&&(K[P.loadCode]=A==null?void 0:A.data.value);const{data:de}=await s({url:D.fieldRequestUrl,method:D.fieldRequestType||"GET",data:K}),fe=(de||[]).map(he=>({label:he[F],value:he[B],children:[],isLeaf:he[oe]}));C(fe)};l.watch(()=>d.data,(A,C)=>{O(A.fields),Q(A.buttons)},{immediate:!0,deep:!0});const k=()=>{p.value++,p.value===y.value&&T({permissionCode:1001})},T=A=>{switch(A.loading=!0,A.permissionCode){case"9999":b.value.forEach(P=>{P.tableQueryDefaultValue?P.queryValue=["date","dateRange"].includes(P.fieldType)?u(P):(P==null?void 0:P.tableQueryDefaultValue)||void 0:P.queryValue=P.fieldType.includes("&")?[]:void 0});const C=h();f("reset",C,()=>{A.loading=!1});break;default:const D=b.value.filter(P=>Array.isArray(P.queryValue)?P.queryValue.length:!!P.queryValue);f("search",D,()=>{A.loading=!1});break}},$=()=>{g.value=!g.value},_=()=>{T({permissionCode:1001})};return(A,C)=>{var he;const D=l.resolveComponent("el-input"),P=l.resolveComponent("el-option"),F=l.resolveComponent("el-select"),B=l.resolveComponent("el-select-v2"),U=l.resolveComponent("el-cascader"),oe=l.resolveComponent("el-tree-select"),Z=l.resolveComponent("el-date-picker"),G=l.resolveComponent("el-form-item"),j=l.resolveComponent("a-svg-icon"),K=l.resolveComponent("el-button"),de=l.resolveComponent("el-form"),fe=l.resolveDirective("debounce");return l.unref(b)&&l.unref(b).length?(l.openBlock(),l.createElementBlock("div",Hy,[l.createVNode(de,{style:l.normalizeStyle({"--table-query-row":d.data.tableConfig.tableQueryRowWidth}),class:"form-content",ref:"elForm","label-suffix":":","label-position":"right"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(v,N)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:N},[x(N)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[v.isQueryFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[v.customQueryComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(v.customQueryComponent),{key:0,class:"custom-btn",ref_for:!0,ref:q=>m.value[`customQueryComponent_${N}`]=q,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,queryItem:v,data:d.data,onRefresh:C[9]||(C[9]=q=>T({permissionCode:1001})),onLoaded:k},null,40,["modelValue","onUpdate:modelValue","queryItem","data"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:N},[l.createElementVNode("span",Jy,"【"+l.toDisplayString(v.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(n)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(G,{key:0,class:"search-form-item","label-width":d.data.tableConfig.tableQueryLabelWidth,label:v.fieldName},{default:l.withCtx(()=>[v.fieldType==="input"||v.fieldType==="editor"?(l.openBlock(),l.createBlock(D,l.mergeProps({key:0,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${v.fieldName}`,clearable:""},{ref_for:!0},l.unref(a)(v),{onKeyup:C[0]||(C[0]=l.withKeys(l.withModifiers(q=>T({permissionCode:1001}),["prevent"]),["enter","native"])),onClear:_}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):l.createCommentVNode("",!0),v.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,placeholder:`${l.unref(n)("act.inputPlaceholder")}${v.fieldName}`,clearable:"",onKeyup:C[1]||(C[1]=l.withKeys(l.withModifiers(q=>T({permissionCode:1001}),["prevent"]),["enter","native"]))},{ref_for:!0},l.unref(a)(v)),null,16,["modelValue","onUpdate:modelValue","placeholder"])):["select","switch","multipleSelect"].includes(v.fieldType)?(l.openBlock(),l.createBlock(F,l.mergeProps({key:2,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,placeholder:`${l.unref(n)("act.selectPlaceholder")}${v.fieldName}`,clearable:"",filterable:""},{ref_for:!0},l.unref(a)(v),{multiple:v.fieldType==="multipleSelect","collapse-tags":v.fieldType==="multipleSelect","collapse-tags-tooltip":v.fieldType==="multipleSelect",onChange:C[2]||(C[2]=q=>T({permissionCode:1001}))}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v.dataList,(q,Y)=>(l.openBlock(),l.createBlock(P,{key:Y,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","collapse-tags","collapse-tags-tooltip"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(v.fieldType)?(l.openBlock(),l.createBlock(B,l.mergeProps({key:3,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,options:v.dataList,props:{...l.unref(tf)},placeholder:`${l.unref(n)("act.selectPlaceholder")}${v.fieldName}`,clearable:"",filterable:""},{ref_for:!0},l.unref(a)(v),{"collapse-tags":v.fieldType==="virtualizedMultipleSelect","collapse-tags-tooltip":v.fieldType==="virtualizedMultipleSelect",multiple:v.fieldType==="virtualizedMultipleSelect",onChange:C[3]||(C[3]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","collapse-tags","collapse-tags-tooltip","multiple"])):v.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(U,l.mergeProps({key:4,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,options:v.dataList,props:{...l.unref(ef)},clearable:"",filterable:"",placeholder:`${l.unref(n)("act.selectPlaceholder")}${v.fieldName}`},{ref_for:!0},l.unref(a)(v),{onChange:C[4]||(C[4]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder"])):v.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(oe,l.mergeProps({key:5,ref_for:!0,ref:q=>m.value[`elTreeSelect_fullLoad_${N}`]=q,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,data:v.dataList,placeholder:`请选择${v.fieldName}`,props:{...l.unref(Ar),...l.unref(a)(v).treeProps||{}},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:""},{ref_for:!0},l.unref(a)(v),{onChange:C[5]||(C[5]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","data","placeholder","props"])):v.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(oe,l.mergeProps({key:6,ref_for:!0,ref:q=>m.value[`elTreeSelect_${N}`]=q,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,placeholder:`请选择${v.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(q,Y)=>S({node:q,resolve:Y},v)},{ref_for:!0},l.unref(a)(v),{onChange:C[6]||(C[6]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):v.fieldType==="date"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:7,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,type:"date",placeholder:`${l.unref(n)("act.selectPlaceholder")}${l.unref(n)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss",clearable:""},{ref_for:!0},l.unref(a)(v),{onChange:C[7]||(C[7]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","placeholder"])):v.fieldType==="dateRange"?(l.openBlock(),l.createBlock(Z,l.mergeProps({key:8,modelValue:v.queryValue,"onUpdate:modelValue":q=>v.queryValue=q,type:"daterange","start-placeholder":l.unref(n)("act.startTime"),"end-placeholder":l.unref(n)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",clearable:""},{ref_for:!0},l.unref(a)(v),{onChange:C[8]||(C[8]=q=>T({permissionCode:1001}))}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label-width","label"]))],64)):l.createCommentVNode("",!0)],64))),128)),l.unref(b).length?(l.openBlock(),l.createBlock(G,{key:0,class:"search-form-btn","label-width":"0"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(v,N)=>l.withDirectives((l.openBlock(),l.createBlock(K,{key:N,type:v.btnColor,loading:v.loading,onClick:q=>T(v)},{default:l.withCtx(()=>[v.btnIcon?(l.openBlock(),l.createBlock(j,{key:0,class:"mr6",name:v.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(v.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[fe]])),128))]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["style"]),d.data.tableConfig.isExpandQuery&&((he=l.unref(b))==null?void 0:he.length)>d.data.tableConfig.tableQueryRowWidth?(l.openBlock(),l.createBlock(K,{key:0,class:"expand",text:"",size:"small",icon:l.unref(g)?"ArrowDown":"ArrowUp",onClick:$},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(g)?l.unref(n)("act.expand"):l.unref(n)("act.retract")),1)]),_:1},8,["icon"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}},[["__scopeId","data-v-cdf7c817"]])},Symbol.toStringTag,{value:"Module"})),GQ="",t1={class:"header-operate-container"},i1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{data:{type:Object,default:()=>({})}},emits:["onOperate"],setup(i,{emit:e}){const t=e,n=i,{t:s}=Gt();let r=l.ref([]);const o=l.inject("globalProps"),a=l.inject("menuPermissionBtns"),c=l.inject("stringToBoolean"),u=l.inject("matchCondition"),h=l.inject("getTableData"),f=l.inject("tableBtnRefs"),d=l.computed(()=>{const{tableConfig:{headerMoreBtnSplitNumber:x}}=n.data;return!x||x>=r.value.length}),m=()=>{const{tableConfig:{headerMoreBtnSplitNumber:x}}=n.data;return d.value?r.value:r.value.slice(0,x)},b=()=>{var O;const{tableConfig:{headerMoreBtnSplitNumber:x}}=n.data;return d.value?[]:r.value.slice(x,(O=r.value)==null?void 0:O.length)},w=x=>{if(!x.matchFields.length)return!0;const O=x.matchFields.filter($=>$.matchType!="default"),Q=$=>o.matchData[$.matchType][$.matchFieldName];let k=O.reduce(($,_,A)=>{const C=Q(_);return $+=u(_.matchCondition,C,_.fieldValue==""?null:_.fieldValue=="true"||_.fieldValue=="false"?c(_.fieldValue):_.fieldValue),A!==O.length-1&&($+=_.spliceCondition||"&&"),$},"").split("||"),T=k.reduce(($,_,A)=>($+=`(${_})`,A<k.length-1&&($+="||"),$),"");return new Function(`return ${T}`)()},g=x=>a.value.some(O=>O.unique==x.permissionCode)&&w(x),p=x=>{r.value=(x||[]).filter(O=>O.permissionCode!==1001&&O.btnPostion.includes("header")).sort((O,Q)=>O.sort-Q.sort).map(O=>(O.btnAlias&&(O.btnName=O.btnAlias),Reflect.has(O,"isPromptVerificationSelectTable")||(O.isPromptVerificationSelectTable="1"),O))};l.watch(()=>n.data,(x,O)=>{p(x.buttons)},{immediate:!0});const y=x=>{t("onOperate",x,{})};return(x,O)=>{const Q=l.resolveComponent("a-svg-icon"),S=l.resolveComponent("el-button"),k=l.resolveComponent("el-icon"),T=l.resolveComponent("el-dropdown-item"),$=l.resolveComponent("el-dropdown-menu"),_=l.resolveComponent("el-dropdown"),A=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",t1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(),(C,D)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:C.permissionCode},[g(C)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[C.isCustomBtn&&C.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(C[C.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:P=>l.unref(f)[`${C.customComponentName}-${C.permissionCode}`]=P,buttonData:C,onRefresh:O[0]||(O[0]=P=>l.unref(h)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(S,{class:"el-btn",type:C.btnColor,loading:C[`loading${C.permissionCode}`],onClick:P=>y(C)},{default:l.withCtx(()=>[C.btnIcon&&!C[`loading${C.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:C.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(C[`loading${C.permissionCode}`]?C.btnName+l.unref(s)("act.loading")+"...":C.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(S,{key:1,class:"el-btn",type:C.btnColor,loading:C[`loading${C.permissionCode}`],onClick:P=>y(C)},{default:l.withCtx(()=>[C.btnIcon&&!C[`loading${C.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:C.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(C[`loading${C.permissionCode}`]?C.btnName+l.unref(s)("act.loading")+"...":C.btnName),1)]),_:2},1032,["type","loading","onClick"])),[[A]])],64)):l.createCommentVNode("",!0)],64))),128)),d.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_,{key:0,class:"header-opreate-dropdown"},{dropdown:l.withCtx(()=>[l.createVNode($,null,{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b(),(C,D)=>(l.openBlock(),l.createBlock(T,{key:C.permissionCode,onClick:P=>y(C)},{default:l.withCtx(()=>[g(C)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[C.isCustomBtn&&C.customType=="component"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(C[C.customComponentName]),{key:0,class:"custom-btn",ref_for:!0,ref:P=>l.unref(f)[`${C.customComponentName}-${C.permissionCode}`]=P,buttonData:C,onRefresh:O[1]||(O[1]=P=>l.unref(h)())},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createBlock(S,{class:"el-btn",type:C.btnColor,loading:C[`loading${C.permissionCode}`]},{default:l.withCtx(()=>[C.btnIcon&&!C[`loading${C.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:C.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(C[`loading${C.permissionCode}`]?C.btnName+l.unref(s)("act.loading")+"...":C.btnName),1)]),_:2},1032,["type","loading"])),[[A]])]),_:2},1064,["buttonData"])):l.withDirectives((l.openBlock(),l.createBlock(S,{key:1,class:"el-btn",type:C.btnColor,loading:C[`loading${C.permissionCode}`]},{default:l.withCtx(()=>[C.btnIcon&&!C[`loading${C.permissionCode}`]?(l.openBlock(),l.createBlock(Q,{key:0,class:"mr4",name:C.btnIcon,width:"12",height:"12",color:"#fff"},null,8,["name"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(C[`loading${C.permissionCode}`]?C.btnName+l.unref(s)("act.loading")+"...":C.btnName),1)]),_:2},1032,["type","loading"])),[[A]])],64)):l.createCommentVNode("",!0)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:l.withCtx(()=>[l.createVNode(S,{type:"primary"},{default:l.withCtx(()=>[O[2]||(O[2]=l.createTextVNode(" 更多按钮",-1)),l.createVNode(k,{class:"el-icon--right"},{default:l.withCtx(()=>[l.createVNode(l.unref(ly))]),_:1})]),_:1})]),_:1}))])}}},[["__scopeId","data-v-204fc0b7"]])},Symbol.toStringTag,{value:"Module"})),JQ="",n1={class:"act-table"},s1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{loading:{type:Boolean,default:!1},maxHeight:{type:Number,default:600},total:{type:Number,default:0},tableQuery:{type:Object,default:()=>({pageIndex:1,pageSize:10})},selection:{type:Array,default:()=>[]},headers:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},showSerialNumber:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},rowKey:{type:String,default:"id"},treeProps:{type:Object,default:()=>({children:"children",hasChildren:"hasChildren"})},tableConfig:{type:Object,default:()=>({})}},emits:["update:tableQuery","update:selection","refresh","onRowClick","changeExpand"],setup(i,{expose:e,emit:t}){const{t:n}=Gt(),s=t,r=i;let o=l.ref(null);const a=g=>r.showPagination?g+1+(r.tableQuery.pageIndex-1)*r.tableQuery.pageSize:g+1,c=g=>{l.nextTick(()=>{r.data.forEach(p=>{g.includes(p[r.rowKey])&&o.value.toggleRowSelection(p,!0)})})},u=g=>o.value.getSelectionRows();l.watch(()=>r.selection,(g,p)=>{g&&g.length&&c(g)},{deep:!0,immediate:!0});const h=g=>{s("update:selection",g)},f=(g,p)=>{g&&l.nextTick(()=>{r.data.forEach(y=>{g.includes(y[p||r.rowKey])&&o.value.toggleRowSelection(y,!0)})})},d=g=>{s("update:tableQuery",{...r.tableQuery,pageSize:g}),s("refresh",[])},m=g=>{s("update:tableQuery",{...r.tableQuery,pageIndex:g}),s("refresh",[])},b=(g,p,y)=>{s("onRowClick",g,p,y)},w=(g,p)=>{s("changeExpand",g,p)};return e({getSelectionRows:u,updateSelection:f}),(g,p)=>{const y=l.resolveComponent("el-table-column"),x=l.resolveComponent("el-table"),O=l.resolveComponent("el-pagination"),Q=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",n1,[l.withDirectives((l.openBlock(),l.createBlock(x,l.mergeProps({style:{width:"100%"},ref_key:"tableRef",ref:o,data:r.data,stripe:"",border:"","highlight-current-row":"","max-height":r.maxHeight,"row-key":r.rowKey,"default-expand-all":"","tree-props":i.treeProps},r.tableConfig,{onSelectionChange:h,onRowClick:b,onExpandChange:w}),{empty:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.data.length||r.data.length==0?l.unref(n)("act.noData"):""),1)]),default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.headers,S=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:S.prop},[S.isCustomTableHeader?l.renderSlot(g.$slots,S.prop,{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[S.render?(l.openBlock(),l.createBlock(y,{key:0,label:S.label,align:S.align,width:S.width,minWidth:S.minWidth,sortable:S.sort,"show-overflow-tooltip":S.prop=="operate"?!1:S.showOverflowTooltip,fixed:S.fixed},{default:l.withCtx(k=>[l.renderSlot(g.$slots,S.prop,{scope:k},void 0,!0)]),_:2},1032,["label","align","width","minWidth","sortable","show-overflow-tooltip","fixed"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[S.prop=="checkbox"?(l.openBlock(),l.createBlock(y,{key:0,type:"selection",align:"center",width:S.width,fixed:""},null,8,["width"])):S.prop=="serialNumber"?(l.openBlock(),l.createBlock(y,{key:1,index:a,type:"index",align:"center",width:S.width,label:l.unref(n)("act.sort"),fixed:""},null,8,["width","label"])):(l.openBlock(),l.createBlock(y,{key:2,prop:S.prop,label:S.label,align:S.align,sortable:S.sort,"show-overflow-tooltip":S.showOverflowTooltip,width:S.width,"min-width":S.minWidth,fixed:S.fixed},null,8,["prop","label","align","sortable","show-overflow-tooltip","width","min-width","fixed"]))],64))],64))],64))),128))]),_:3},16,["data","max-height","row-key","tree-props"])),[[Q,r.loading]]),r.showPagination?(l.openBlock(),l.createBlock(O,{key:0,class:"table-pagination","current-page":r.tableQuery.pageIndex,"onUpdate:currentPage":p[0]||(p[0]=S=>r.tableQuery.pageIndex=S),"page-size":r.tableQuery.pageSize,"onUpdate:pageSize":p[1]||(p[1]=S=>r.tableQuery.pageSize=S),"page-sizes":[10,20,50,75,100,200,500],background:"",layout:"total, sizes, prev, pager, next, jumper",total:r.total,onSizeChange:d,onCurrentChange:m},null,8,["current-page","page-size","total"])):l.createCommentVNode("",!0)])}}},[["__scopeId","data-v-d2da0301"]])},Symbol.toStringTag,{value:"Module"})),iE="",r1={class:"no-config-field"},o1={class:"dialog-footer"},l1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>cf)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>uf)),s=l.defineAsyncComponent(()=>Promise.resolve().then(()=>E1)),r=l.defineAsyncComponent(()=>Promise.resolve().then(()=>j1)),{t:o}=Gt(),a=l.inject("request"),c=l.inject("loadComponents"),u=l.inject("formatDataType"),h=l.inject("globalProps"),f=l.inject("stringToBoolean"),d=l.inject("getFieldUiProps"),m=l.inject("disposeRequestData"),b=e,w=i,g=l.ref(!1),p=l.ref(!1),y=l.ref(null),x=l.ref([]),O=l.ref({}),Q=l.ref({}),S=Z=>Z.formColumnCol==null?24:Z.formColumnCol?Z.formColumnCol:24/Z.formRow,k=Z=>["input","textarea"].includes(Z.fieldType)?"blur":(["select","multipleSelect","datetimerange","treeSelect","provinceCascade"].includes(Z.fieldType),"change"),T=async({node:Z,resolve:G},j)=>{const K=d(j),{label:de,value:fe,children:he,isLeaf:v}={...Ar,...K.treeProps||{}};if(Z[v])return G([]);const N=j.postRequestParams.filter(Ae=>Ae.submitType==="default").reduce((Ae,qe)=>(Ae[qe.submitName]=u(qe.paramsType,qe.submitValue),Ae),{}),q=j.postRequestParams.filter(Ae=>Ae.submitType==="match").reduce((Ae,qe)=>(Ae[qe.submitName]=u(qe.paramsType,h.matchData[qe.submitValue][qe.submitName]),Ae),{}),Y=j.postRequestParams.filter(Ae=>Ae.submitType==="dynamic").map(Ae=>{let qe={field:Ae.submitName,operate:Ae.submitMatchType,value:u(Ae.paramsType,Ae.submitValue)};return K.loadCode===Ae.submitName&&(Z!=null&&Z.data.value)&&(qe.value=Z==null?void 0:Z.data.value),qe});let Qe={};Object.keys(N).length&&(Qe={...Qe,...N}),Object.keys(q).length&&(Qe={...Qe,...q}),Y.length&&(Qe.dynamicFilters=Y),K.loadCode&&Reflect.has(Qe,K.loadCode)&&(Qe[K.loadCode]=Z==null?void 0:Z.data.value);const{data:Vi}=await a({url:j.fieldRequestUrl,method:j.fieldRequestType||"GET",data:Qe}),Li=(Vi||[]).map(Ae=>({label:Ae[de],value:Ae[fe],children:[],isLeaf:Ae[v]}));G(Li)},$=Z=>{if(!["input","textarea"].includes(Z)){if(["multipleSelect","dateRange"].includes(Z))return[];if(["switch"].includes(Z))return!1}},_=(Z,G)=>{if(typeof Z=="string"&&["string"].includes(G))return Z.toString();if(["string"].includes(G))return Z.sort((j,K)=>j.sort-K.sort).join(";");if(["number"].includes(G))return Number(Z);if(["array"].includes(G))return Z.sort((j,K)=>j.sort-K.sort)},A=(Z,G=!1)=>{if(["multipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";").map(K=>G?{value:K}:K):[];if(["virtualizedMultipleSelect"].includes(Z.fieldType))return w.data.rowData[Z.fieldKey]?w.data.rowData[Z.fieldKey].split(";"):[];if(["dateRange","provinceCascade"].includes(Z.fieldType)){const K=Z.fieldKey.split("&");return w.data.rowData[Z.fieldKey]=K.map(de=>w.data.rowData[de]),w.data.rowData[Z.fieldKey]}let j=w.data.rowData[Z.fieldKey];if(["select"].includes(Z.fieldType)){const K=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][K["value-key"]?K["value-key"]:"value"]=="string"&&j!==null&&(j=G?{value:j.toString()}:j.toString())}if(["virtualizedSelect"].includes(Z.fieldType)){const K=d(Z);Z.dataList&&Z.dataList.length&&typeof Z.dataList[0][K["value-key"]?K["value-key"]:"value"]=="string"&&j!==null&&(j=j.toString())}return(j==="true"||j==="false")&&(j=f(j)),j},C=Z=>a({url:w.data.dataItem.requestUrl,method:"post",data:Z});l.watch(()=>w.visible,async(Z,G)=>{var j,K;if(Z)try{g.value=!0;const de=await m(w.data.formList,w.data.rowData,!1,!0);console.log("formList",(j=w.data)==null?void 0:j.formList),x.value=await Promise.all((((K=w.data)==null?void 0:K.formList)??[]).sort((fe,he)=>fe.sort-he.sort).map(async fe=>{const he=de.find(Y=>fe.fieldName==Y.fieldName&&fe.fieldKey==Y.fieldKey);he&&(fe.dataList=(he==null?void 0:he.dataList)??[]),["select","multipleSelect"].includes(fe.fieldType)&&(O.value[`${fe.fieldKey}ActImplicit`]=Object.keys(w.data.rowData).length&&fe.isFormSetValue?A(fe,!0):$(fe.fieldType)),O.value[fe.fieldKey]=Object.keys(w.data.rowData).length&&fe.isFormSetValue?A(fe):$(fe.fieldType);const{isFieldCustom:v,customComponentName:N,customComponentUrl:q}=fe.customFiledsComponentes;if(v&&!fe.customFiledsComponentes[N]){const Y=await c(q,N);fe.customFiledsComponentes[N]=Y}return fe})),g.value=!1}catch(de){console.error(de),g.value=!1}});const D=Z=>{P(),Z()},P=()=>{x.value=[],y.value.resetFields(),b("update:visible",!1)},F=(Z,G)=>{const j=d(G),{fieldKey:K,fieldType:de}=G;if(console.log(Z),console.log(G),console.log(j),console.log(O.value),de==="multipleSelect"){const fe=Z.filter(v=>typeof v=="string"),he=Z.filter(v=>typeof v!="string").map(v=>v.value);O.value[j.createFieldKey]=fe.length?_(fe,"string"):"",O.value[K]=he.length?_(he,"string"):""}else typeof Z=="string"?(O.value[j.createFieldKey]=Z,O.value[K]=""):(O.value[K]=Z.value,delete O.value[j.createFieldKey])},B=(Z,G)=>{const{fieldKey:j,fieldType:K}=G;K==="multipleSelect"?Z===void 0&&(O.value[j]=[]):Z===void 0&&(O.value[j]="")},U=Z=>{Z&&Z.validate(G=>{if(G){const{dataItem:j,rowData:K}=w.data;let de={...l.toRaw(O.value)};p.value=!0,Object.keys(de).forEach(v=>{if(v.includes("ActImplicit")){delete de[v];return}const N=x.value.find(q=>q.fieldKey===v);v.includes("&")?v.split("&").forEach((Y,Qe)=>{de[Y]=de[v]?_(de[v][Qe],N.fieldSubmitType):de[v]}):Array.isArray(de[v])&&N.fieldSubmitType=="string"&&(de[v]=_(de[v],"string"))});const fe=j.submitFields.filter(v=>v.matchType=="default").reduce((v,N)=>(N.submitFieldType==="string"&&(v[N.submitFieldName]=N.matchFieldName.toString()),v),{}),he=j.submitFields.filter(v=>v.matchType=="match").reduce((v,N)=>(Reflect.has(N,"submitFieldMatchOrigin")&&N.submitFieldMatchOrigin==="selections"?v[N.submitFieldName]=w.data.selections.map(q=>u(N.submitFieldType,q[N.matchFieldName])):Reflect.has(N,"submitFieldMatchOrigin")&&N.submitFieldMatchOrigin!="rowData"?Reflect.has(h.matchData,N.submitFieldMatchOrigin)&&(v[N.submitFieldName]=u(N.submitFieldType,h.matchData[N.submitFieldMatchOrigin][N.matchFieldName])):v[N.submitFieldName]=u(N.submitFieldType,K[N.matchFieldName]),v),{});C({...de,...fe,...he}).then(v=>{try{Ve.ElNotification({title:o("act.tip"),message:o("act.saveSuccessfully"),type:"success",duration:2500}),P(),b("refresh",j)}catch(N){console.error(N)}p.value=!1}).catch(v=>{console.error(v),p.value=!1})}})},oe=Z=>{const G=Object.keys(Q.value).map(j=>{var K;return(K=Q.value[j])==null?void 0:K.updateFormData(O.value)}).filter(j=>j);Promise.all([Z.validate(),...G]).then(j=>{j.every(K=>K)&&U(Z)}).catch(j=>(console.error(j),j))};return(Z,G)=>{var nn;const j=l.resolveComponent("el-input"),K=l.resolveComponent("el-option"),de=l.resolveComponent("el-select"),fe=l.resolveComponent("el-select-v2"),he=l.resolveComponent("el-tree-select"),v=l.resolveComponent("el-date-picker"),N=l.resolveComponent("el-cascader"),q=l.resolveComponent("el-switch"),Y=l.resolveComponent("el-form-item"),Qe=l.resolveComponent("el-col"),Vi=l.resolveComponent("el-row"),Li=l.resolveComponent("el-form"),Ae=l.resolveComponent("el-button"),qe=l.resolveComponent("el-dialog"),vt=l.resolveDirective("loading"),Mi=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(qe,{"model-value":w.visible,title:w.title,top:"5vh",width:(nn=i.data.formConfig)==null?void 0:nn.dialogWidth,draggable:"",overflow:"","append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,"before-close":D},{footer:l.withCtx(()=>[l.createElementVNode("span",o1,[l.createVNode(Ae,{loading:p.value,onClick:P},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.cancel")),1)]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(Ae,{type:"primary",loading:p.value,onClick:G[1]||(G[1]=V=>oe(y.value))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("act.save")),1)]),_:1},8,["loading"])),[[Mi]])])]),default:l.withCtx(()=>{var V,R;return[l.withDirectives((l.openBlock(),l.createBlock(Li,{class:"a-form",ref_key:"formRef",ref:y,model:O.value,"label-suffix":":","label-width":(V=i.data.formConfig)==null?void 0:V.formLabelWidth,"label-position":(R=i.data.formConfig)==null?void 0:R.formLabelPosition},{default:l.withCtx(()=>[l.createVNode(Vi,{gutter:40},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,(L,pe)=>(l.openBlock(),l.createBlock(Qe,{span:S(L),key:pe},{default:l.withCtx(()=>[L.customFiledsComponentes.isFieldCustom?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[L.customFiledsComponentes[L.customFiledsComponentes.customComponentName]?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(L.customFiledsComponentes[L.customFiledsComponentes.customComponentName]),{key:0,ref_for:!0,ref:ce=>Q.value[L.customFiledsComponentes.customComponentName]=ce,formConfig:i.data.formConfig,item:L,rowData:w.data.rowData,visible:w.visible,form:O.value,"onUpdate:form":G[0]||(G[0]=ce=>O.value=ce)},null,40,["formConfig","item","rowData","visible","form"])):(l.openBlock(),l.createElementBlock("div",{class:"no-config",key:pe},[l.createElementVNode("span",r1,"【"+l.toDisplayString(L.fieldName)+"】",1),l.createTextVNode(l.toDisplayString(l.unref(o)("act.fieldCustom")),1)]))],64)):(l.openBlock(),l.createBlock(Y,{key:0,label:L.fieldName,prop:["select","multipleSelect"].includes(L.fieldType)?`${L.fieldKey}ActImplicit`:L.fieldKey,rules:[{required:L.isFormFieldRequired,message:l.unref(o)("act.requiredMessage"),trigger:k(L)}]},{default:l.withCtx(()=>[L.fieldType==="input"?(l.openBlock(),l.createBlock(j,l.mergeProps({key:0,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,placeholder:`${l.unref(o)("act.inputPlaceholder")}${L.fieldName}`,clearable:""},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):l.createCommentVNode("",!0),L.fieldType==="inputNumber"?(l.openBlock(),l.createBlock(l.unref(t),l.mergeProps({key:1,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,placeholder:`${l.unref(o)("act.inputPlaceholder")}${L.fieldName}`,clearable:""},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):L.fieldType==="textarea"?(l.openBlock(),l.createBlock(j,l.mergeProps({key:2,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,placeholder:`${l.unref(o)("act.inputPlaceholder")}${L.fieldName}`,rows:4},{ref_for:!0},l.unref(d)(L),{type:"textarea",disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):L.fieldType==="selectIcon"?(l.openBlock(),l.createBlock(l.unref(n),l.mergeProps({key:3,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,icons:L.dataList,placeholder:`${l.unref(o)("act.selectPlaceholder")}${L.fieldName}`},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.dataList,(ce,Le)=>(l.openBlock(),l.createBlock(K,{key:Le,label:ce.key,value:ce.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","icons","placeholder","disabled"])):["select","multipleSelect"].includes(L.fieldType)?(l.openBlock(),l.createBlock(de,l.mergeProps({key:4,modelValue:O.value[`${L.fieldKey}ActImplicit`],"onUpdate:modelValue":ce=>O.value[`${L.fieldKey}ActImplicit`]=ce,placeholder:`${l.unref(o)("act.selectPlaceholder")}${L.fieldName}`,clearable:"",filterable:"","value-key":"value"},{ref_for:!0},l.unref(d)(L),{multiple:L.fieldType==="multipleSelect",disabled:L.isFormDisabled,onChange:ce=>F(ce,L)}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.dataList,(ce,Le)=>(l.openBlock(),l.createBlock(K,{key:Le,label:ce.key,value:ce},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue","placeholder","multiple","disabled","onChange"])):["virtualizedSelect","virtualizedMultipleSelect"].includes(L.fieldType)?(l.openBlock(),l.createBlock(fe,l.mergeProps({key:5,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,options:L.dataList,props:{...l.unref(tf)},placeholder:`${l.unref(o)("act.selectPlaceholder")}${L.fieldName}`,clearable:"",filterable:""},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled,multiple:L.fieldType==="virtualizedMultipleSelect",onChange:ce=>B(ce,L)}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled","multiple","onChange"])):L.fieldType==="fullLoadTreeSelect"?(l.openBlock(),l.createBlock(he,l.mergeProps({key:6,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,data:L.dataList,"default-expanded-keys":[O.value[L.fieldKey]||null],placeholder:`请选择${L.fieldName}`,props:{...l.unref(Ar),...l.unref(d)(L).treeProps||{}},"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:""},{ref_for:!0},l.unref(d)(L)),null,16,["modelValue","onUpdate:modelValue","data","default-expanded-keys","placeholder","props"])):L.fieldType==="treeSelect"?(l.openBlock(),l.createBlock(he,l.mergeProps({key:7,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,placeholder:`请选择${L.fieldName}`,props:{isLeaf:"isLeaf"},"render-after-expand":!1,"collapse-tags":"","collapse-tags-tooltip":"",multiple:"","show-checkbox":"",clearable:"",filterable:"",lazy:"",load:(ce,Le)=>T({node:ce,resolve:Le},L)},{ref_for:!0},l.unref(d)(L)),null,16,["modelValue","onUpdate:modelValue","placeholder","load"])):L.fieldType==="date"?(l.openBlock(),l.createBlock(v,l.mergeProps({key:8,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,type:"date",placeholder:`${l.unref(o)("act.selectPlaceholder")}${l.unref(o)("act.time")}`,"value-format":"YYYY-MM-DD HH:mm:ss"},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","placeholder","disabled"])):L.fieldType==="dateRange"?(l.openBlock(),l.createBlock(v,l.mergeProps({key:9,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,type:"daterange","start-placeholder":l.unref(o)("act.startTime"),"end-placeholder":l.unref(o)("act.endTime"),"value-format":"YYYY-MM-DD HH:mm:ss"},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","disabled"])):L.fieldType==="provinceCascade"?(l.openBlock(),l.createBlock(N,l.mergeProps({key:10,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,options:L.dataList,props:l.unref(ef),clearable:"",filterable:"",placeholder:`${l.unref(o)("act.selectPlaceholder")}${L.fieldName}`},{ref_for:!0},l.unref(d)(L),{disabled:L.isFormDisabled}),null,16,["modelValue","onUpdate:modelValue","options","props","placeholder","disabled"])):L.fieldType==="switch"?(l.openBlock(),l.createBlock(q,l.mergeProps({key:11,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,"active-value":!0,"inactive-value":!1},{ref_for:!0},l.unref(d)(L)),null,16,["modelValue","onUpdate:modelValue"])):L.fieldType==="upload"?(l.openBlock(),l.createBlock(l.unref(s),l.mergeProps({key:12,class:"form-upload",modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,request:l.unref(a)},{ref_for:!0},l.unref(d)(L)),null,16,["modelValue","onUpdate:modelValue","request"])):L.fieldType==="editor"?(l.openBlock(),l.createBlock(l.unref(r),l.mergeProps({key:13,modelValue:O.value[L.fieldKey],"onUpdate:modelValue":ce=>O.value[L.fieldKey]=ce,disabled:L.isFormDisabled,placeholder:`${l.unref(o)("act.inputPlaceholder")}${L.fieldName}`},{ref_for:!0},l.unref(d)(L)),null,16,["modelValue","onUpdate:modelValue","disabled","placeholder"])):l.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))]),_:2},1032,["span"]))),128))]),_:1})]),_:1},8,["model","label-width","label-position"])),[[vt,g.value]])]}),_:1},8,["model-value","title","width"])}}},[["__scopeId","data-v-c26ce281"]])},Symbol.toStringTag,{value:"Module"})),rE="",a1=["innerHTML"],c1={class:"dialog-footer"},u1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=()=>({loading:!1});let o=l.reactive(r());l.watch(()=>s.visible,async(u,h)=>{u&&(o.loading=!0,o.loading=!1)});const a=u=>{c(),u()},c=()=>{n("update:visible",!1)};return(u,h)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:800,"append-to-body":"","destroy-on-close":"",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":a},{footer:l.withCtx(()=>[l.createElementVNode("span",c1,[l.createVNode(f,{onClick:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.cancel")),1)]),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("div",{innerHTML:i.data.editorContent},null,8,a1)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-95be1288"]])},Symbol.toStringTag,{value:"Module"})),aE="",h1={class:"dialog-footer"},f1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogConfigBtn",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>uf)),n=l.defineAsyncComponent(()=>Promise.resolve().then(()=>c_)),s=rn.useRoute(),r=l.inject("apiPrefix"),o=l.inject("request"),a=e,c=i,u=l.computed(()=>s.params.key),h=()=>({btnLoading:!1});let f=l.reactive(h());const d=l.inject("createDefaultButtonItem"),m=l.inject("associationMenuList"),b=l.inject("conditionList")();let w=l.ref([]),g=l.ref(null),p=l.ref(d());const y=D=>o({url:`${r}/icons/getAllList`,method:"post",data:D}),x=async()=>{try{const{data:D}=await y({dynamicFilters:[{field:"type",operate:"Equal",value:"2"}]});w.value=D||[]}catch(D){console.error(D)}};l.watch(()=>c.visible,async(D,P)=>{if(D){await x();const F={...c.data};Object.keys(p.value).forEach(B=>{B=="submitFields"||B=="matchFields"?p.value[B]=[...F[B]||[]]:B=="isPromptVerificationSelectTable"?p.value[B]=F[B]??"1":p.value[B]=F[B]})}});const O=()=>{p.value.submitWay=void 0,p.value.customType=void 0,p.value.codeStr=void 0,p.value.customComponentName=void 0,p.value.customComponentUrl=void 0},Q=()=>{p.value.submitFields.push({matchType:"match",submitFieldMatchOrigin:"rowData",submitFieldName:"",matchFieldName:"",submitFieldType:""})},S=D=>{p.value.submitFields.splice(D,1)},k=()=>{p.value.matchFields.push({matchType:"default",matchFieldName:"",matchCondition:"",fieldValue:"",spliceCondition:""})},T=D=>{p.value.matchFields.splice(D,1),p.value.matchFields.length===1&&(p.value.matchFields[0].spliceCondition="")},$=(D,P)=>{D.submitFieldMatchOrigin=P==="match"?"rowData":""},_=D=>{A(),D()},A=()=>{p.value=Object.assign(p.value,d()),g.value.resetFields(),a("update:visible",!1)},C=D=>{D&&D.validate(P=>{if(P)try{f.btnLoading=!0,a("refresh",{...p.value,submitFields:[...p.value.submitFields],matchFields:[...p.value.matchFields]},()=>{A()}),f.btnLoading=!1}catch(F){console.error(F),f.btnLoading=!1}})};return(D,P)=>{const F=l.resolveComponent("el-input"),B=l.resolveComponent("el-form-item"),U=l.resolveComponent("el-col"),oe=l.resolveComponent("el-option"),Z=l.resolveComponent("el-select"),G=l.resolveComponent("el-row"),j=l.resolveComponent("el-button"),K=l.resolveComponent("el-divider"),de=l.resolveComponent("el-switch"),fe=l.resolveComponent("el-form"),he=l.resolveComponent("el-dialog"),v=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(he,{"model-value":c.visible,title:c.title,top:"5vh",width:"1200",draggable:"",overflow:"","append-to-body":"","append-to":"body","close-on-click-modal":!1,"before-close":_},{footer:l.withCtx(()=>[l.createElementVNode("span",h1,[l.createVNode(j,{loading:l.unref(f).btnLoading,onClick:A},{default:l.withCtx(()=>[...P[19]||(P[19]=[l.createTextVNode("取消",-1)])]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(j,{type:"primary",loading:l.unref(f).btnLoading,onClick:P[16]||(P[16]=N=>C(l.unref(g)))},{default:l.withCtx(()=>[...P[20]||(P[20]=[l.createTextVNode("保存",-1)])]),_:1},8,["loading"])),[[v]])])]),default:l.withCtx(()=>[l.createVNode(fe,{ref_key:"formRef",ref:g,model:l.unref(p),"label-suffix":":","label-position":"top"},{default:l.withCtx(()=>[l.createVNode(G,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮",prop:"btnName"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).btnName,"onUpdate:modelValue":P[0]||(P[0]=N=>l.unref(p).btnName=N),disabled:"",placeholder:"请输入按钮名称"},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(p).permissionCode),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮图标",prop:"btnIcon"},{default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(p).btnIcon,"onUpdate:modelValue":P[1]||(P[1]=N=>l.unref(p).btnIcon=N),icons:l.unref(w),props:{value:"name",type:"btn"}},null,8,["modelValue","icons"])]),_:1})]),_:1}),l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"接口地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"requestUrl"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).requestUrl,"onUpdate:modelValue":P[2]||(P[2]=N=>l.unref(p).requestUrl=N),placeholder:"请输入接口地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮位置",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnPostion"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).btnPostion,"onUpdate:modelValue":P[3]||(P[3]=N=>l.unref(p).btnPostion=N),placeholder:"请选择按钮位置",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(ky),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnType"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).btnType,"onUpdate:modelValue":P[4]||(P[4]=N=>l.unref(p).btnType=N),placeholder:"请选择按钮类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(wy),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮别名",prop:"btnAlias"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).btnAlias,"onUpdate:modelValue":P[5]||(P[5]=N=>l.unref(p).btnAlias=N),placeholder:"请输入按钮别名",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"按钮颜色",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"btnColor"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).btnColor,"onUpdate:modelValue":P[6]||(P[6]=N=>l.unref(p).btnColor=N),placeholder:"请选择按钮颜色",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(xy),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(U,{key:0,span:12},{default:l.withCtx(()=>[!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"?(l.openBlock(),l.createBlock(B,{key:0,label:"提交方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitWay"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).submitWay,"onUpdate:modelValue":P[7]||(P[7]=N=>l.unref(p).submitWay=N),placeholder:"请选择提交方式",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sy),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):l.createCommentVNode("",!0)]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["import","batchImport"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:1,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"导入提交文件字段",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"importFileName"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).importFileName,"onUpdate:modelValue":P[8]||(P[8]=N=>l.unref(p).importFileName=N),placeholder:"请输入导入提交文件字段",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),!l.unref(p).isCustomBtn&&l.unref(p).permissionCode!="1001"&&["messageBox","executeApi"].includes(l.unref(p).submitWay)?(l.openBlock(),l.createBlock(U,{key:2,span:12},{default:l.withCtx(()=>[l.createVNode(B,{label:"是否提示校验选择表格",rules:[{required:!1,message:"必填项",trigger:"change"}],prop:"isPromptVerificationSelectTable"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).isPromptVerificationSelectTable,"onUpdate:modelValue":P[9]||(P[9]=N=>l.unref(p).isPromptVerificationSelectTable=N),placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Dy),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1}),l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>[P[17]||(P[17]=l.createTextVNode(" 提交字段配置 ",-1)),l.createVNode(j,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:Q})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).submitFields,(N,q)=>(l.openBlock(),l.createBlock(G,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldName"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:N.submitFieldName,"onUpdate:modelValue":Y=>N.submitFieldName=Y,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:8},{default:l.withCtx(()=>[l.createVNode(B,{label:"方式","label-width":"80px",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(F,{placeholder:"请输入",modelValue:N.matchFieldName,"onUpdate:modelValue":Y=>N.matchFieldName=Y,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(Z,{modelValue:N.matchType,"onUpdate:modelValue":Y=>N.matchType=Y,placeholder:"请选择",style:{width:"120px"},onChange:Y=>$(N,Y)},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ty),(Y,Qe)=>(l.openBlock(),l.createBlock(oe,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),N.matchType==="match"?(l.openBlock(),l.createBlock(U,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配源",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"submitFields."+q+".submitFieldMatchOrigin"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:N.submitFieldMatchOrigin,"onUpdate:modelValue":Y=>N.submitFieldMatchOrigin=Y,placeholder:"请输入匹配源",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"submitFields."+q+".submitFieldType"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:N.submitFieldType,"onUpdate:modelValue":Y=>N.submitFieldType=Y,placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cy),(Y,Qe)=>(l.openBlock(),l.createBlock(oe,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(j,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:Y=>S(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128)),l.createVNode(K,{"content-position":"left"},{default:l.withCtx(()=>[P[18]||(P[18]=l.createTextVNode(" 匹配字段配置(表格操作列按钮显示/隐藏) ",-1)),l.createVNode(j,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:k})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(p).matchFields,(N,q)=>(l.openBlock(),l.createBlock(G,{gutter:24,key:q},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"matchFields."+q+".matchFieldName"},{default:l.withCtx(()=>[l.createVNode(F,{placeholder:"请输入",modelValue:N.matchFieldName,"onUpdate:modelValue":Y=>N.matchFieldName=Y,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(Z,{modelValue:N.matchType,"onUpdate:modelValue":Y=>N.matchType=Y,placeholder:"请选择",style:{width:"180px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Py),(Y,Qe)=>(l.openBlock(),l.createBlock(oe,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"matchFields."+q+".matchCondition"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:N.matchCondition,"onUpdate:modelValue":Y=>N.matchCondition=Y,placeholder:"请选择匹配条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(b),(Y,Qe)=>(l.openBlock(),l.createBlock(oe,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"字段值",prop:"matchFields."+q+".fieldValue"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:N.fieldValue,"onUpdate:modelValue":Y=>N.fieldValue=Y,placeholder:"请输入字段值",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(U,{class:"submit-operate",span:2},{default:l.withCtx(()=>[l.createVNode(j,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:Y=>T(q)},null,8,["onClick"])]),_:2},1024),q+1!==l.unref(p).matchFields.length?(l.openBlock(),l.createBlock(U,{key:0,span:24},{default:l.withCtx(()=>[l.createVNode(B,{class:"condition-box",label:"","label-width":"0",prop:"matchFields."+q+".spliceCondition"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:N.spliceCondition,"onUpdate:modelValue":Y=>N.spliceCondition=Y,placeholder:"请选择拼接条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ay),(Y,Qe)=>(l.openBlock(),l.createBlock(oe,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128)),l.createVNode(G,{gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:4},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义按钮",prop:"isCustomBtn"},{default:l.withCtx(()=>[l.createVNode(de,{modelValue:l.unref(p).isCustomBtn,"onUpdate:modelValue":P[10]||(P[10]=N=>l.unref(p).isCustomBtn=N),onChange:O},null,8,["modelValue"])]),_:1})]),_:1}),l.unref(p).isCustomBtn?(l.openBlock(),l.createBlock(U,{key:0,span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"自定义类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"customType"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).customType,"onUpdate:modelValue":P[11]||(P[11]=N=>l.unref(p).customType=N),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Qy),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(U,{span:6},{default:l.withCtx(()=>[l.createVNode(B,{label:"关联菜单"},{default:l.withCtx(()=>[l.createVNode(Z,{modelValue:l.unref(p).associationMenuId,"onUpdate:modelValue":P[12]||(P[12]=N=>l.unref(p).associationMenuId=N),placeholder:"请选择关联菜单",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(m),(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q,label:N.name,value:N.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l.unref(p).customType==="code"?(l.openBlock(),l.createBlock(G,{key:0,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:24},{default:l.withCtx(()=>[l.createVNode(B,{label:"代码片段",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"codeStr"},{default:l.withCtx(()=>[l.createVNode(l.unref(n),{modelValue:l.unref(p).codeStr,"onUpdate:modelValue":P[13]||(P[13]=N=>l.unref(p).codeStr=N)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.unref(p).customType==="component"?(l.openBlock(),l.createBlock(G,{key:1,gutter:24},{default:l.withCtx(()=>[l.createVNode(U,{span:10},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentName"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).customComponentName,"onUpdate:modelValue":P[14]||(P[14]=N=>l.unref(p).customComponentName=N),placeholder:"请输入组件名称",clearable:""},{prepend:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(u.value),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(U,{span:14},{default:l.withCtx(()=>[l.createVNode(B,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"customComponentUrl"},{default:l.withCtx(()=>[l.createVNode(F,{modelValue:l.unref(p).customComponentUrl,"onUpdate:modelValue":P[15]||(P[15]=N=>l.unref(p).customComponentUrl=N),placeholder:"请输入组件地址",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-1f256e39"]])},Symbol.toStringTag,{value:"Module"})),hE="",d1={slot:"prepend"},p1={class:"dialog-footer"},m1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"dialogAddField",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},data:{type:Object,default:()=>({})}},emits:["update:visible","refresh"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>kQ)),n=e,s=i,r=l.inject("pageKey")(),o=l.inject("conditionList")(),a=l.inject("configData")(),c=()=>({btnLoading:!1,showSiteComponentsParamsDialog:!1});let u=l.reactive(c());const h=()=>({sort:0,fieldName:void 0,fieldKey:void 0,fieldType:void 0,fieldUiProps:"",fieldSubmitType:"string",fieldRequestType:"GET",fieldRequestUrl:void 0,postRequestParams:[],useScenes:[],formColumnCol:12,formCustomComponentes:[],customTableHeaderName:"",customTableHeaderUrl:"",isFormFieldRequired:!0,isFormSetValue:!0,isFormDisabled:!1,tableQueryCondition:void 0,tableQueryDefaultValue:void 0,tableCellWidthType:"min",tableCellWidth:"120",tableCellAlignType:"center",tableCellContentType:"default",isTableCellOverflowTooltip:!0,isTableCellSort:!0}),f=of,d=l.ref(null),m=l.ref(h()),b=()=>["select","selectIcon","multipleSelect","treeSelect","provinceCascade","switch","virtualizedSelect","virtualizedMultipleSelect"].includes(m.value.fieldType),w=()=>m.value.useScenes.includes("tableSearch")&&m.value.fieldType!=="time",g=()=>m.value.useScenes.includes("tableShow"),p=()=>m.value.fieldType&&m.value.fieldType!=="implicit"&&m.value.useScenes.some(_=>!["tableSearch","tableShow"].some(A=>A==_));l.watch(()=>s.visible,async(_,A)=>{if(_){const C=(a.value.buttons||[]).filter(P=>P.permissionCode!=1001).map(P=>({key:P.btnName,value:P.permissionCode}));f.some(P=>{if(P.label==="表单配置")return P.options=C,!0});const{data:D}=s;if(!D.fieldName)return;Object.keys(m.value).forEach(P=>{if(P=="permissionCode")m.value[P]=D.unique;else if(P=="formCustomComponentes"){const F=D.useScenes.map(B=>D[P].find(oe=>oe.permissionCode==B)||{});m.value[P]=[...F]}else["postRequestParams","useScenes"].includes(P)?m.value[P]=[...D[P]||[]]:m.value[P]=D[P]})}});const y=()=>{m.value.postRequestParams.push({submitName:"",submitValue:"",submitType:"default",submitMatchType:"",paramsType:""})},x=_=>{m.value.postRequestParams.splice(_,1)},O=_=>{m.value.postRequestParams=[]},Q=_=>{const A=f.find(D=>D.label==="表格配置").options,C=f.find(D=>D.label==="表单配置").options;m.value.formCustomComponentes=[...A,...C].filter(D=>_.includes(D.value)).map(D=>{const P=m.value.formCustomComponentes.find(F=>F.permissionCode==D.value);return{btnName:D.key,permissionCode:D.value,pageKey:r,customComponentName:(P==null?void 0:P.customComponentName)||void 0,customComponentUrl:(P==null?void 0:P.customComponentUrl)||void 0,isFieldCustom:(P==null?void 0:P.isFieldCustom)||!1}})},S=(_,A)=>{A.customComponentName=void 0,A.customComponentUrl=void 0},k=_=>{T(),_()},T=()=>{m.value=h(),d.value.resetFields(),n("update:visible",!1)},$=_=>{_&&_.validate(A=>{A&&(u.btnLoading=!0,m.value.formCustomComponentes.forEach(C=>{delete C.isFiledCustom}),n("refresh",JSON.parse(JSON.stringify(m.value)),()=>{T()}),u.btnLoading=!1)})};return(_,A)=>{const C=l.resolveComponent("el-input"),D=l.resolveComponent("el-form-item"),P=l.resolveComponent("el-col"),F=l.resolveComponent("el-option"),B=l.resolveComponent("el-select"),U=l.resolveComponent("el-button"),oe=l.resolveComponent("el-row"),Z=l.resolveComponent("el-divider"),G=l.resolveComponent("el-option-group"),j=l.resolveComponent("el-switch"),K=l.resolveComponent("el-input-number"),de=l.resolveComponent("el-form"),fe=l.resolveComponent("el-scrollbar"),he=l.resolveComponent("el-dialog"),v=l.resolveDirective("debounce");return l.openBlock(),l.createBlock(he,{"model-value":s.visible,title:s.title,top:"5vh",width:"1400",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":k},{footer:l.withCtx(()=>[l.createElementVNode("span",p1,[l.createVNode(U,{onClick:T,loading:l.unref(u).btnLoading},{default:l.withCtx(()=>[...A[29]||(A[29]=[l.createTextVNode("取消",-1)])]),_:1},8,["loading"]),l.withDirectives((l.openBlock(),l.createBlock(U,{type:"primary",loading:l.unref(u).btnLoading,onClick:A[22]||(A[22]=N=>$(d.value))},{default:l.withCtx(()=>[...A[30]||(A[30]=[l.createTextVNode("保存",-1)])]),_:1},8,["loading"])),[[v]])])]),default:l.withCtx(()=>[l.createVNode(fe,{ref:"configFieldsScroll","max-height":"800px"},{default:l.withCtx(()=>[l.createVNode(de,{ref_key:"formRef",ref:d,model:m.value,"label-suffix":":","label-width":"120px"},{default:l.withCtx(()=>[l.createVNode(oe,null,{default:l.withCtx(()=>[l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"字段名称",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldName"},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:m.value.fieldName,"onUpdate:modelValue":A[0]||(A[0]=N=>m.value.fieldName=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"字段key",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"fieldKey"},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:m.value.fieldKey,"onUpdate:modelValue":A[1]||(A[1]=N=>m.value.fieldKey=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"字段类型",rules:[{required:!0,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldType,"onUpdate:modelValue":A[2]||(A[2]=N=>m.value.fieldType=N),placeholder:"请选择",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(sf),N=>(l.openBlock(),l.createBlock(F,{key:N.value,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:4},{default:l.withCtx(()=>[l.createVNode(D,{label:"组件参数",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"fieldType"},{default:l.withCtx(()=>[l.createVNode(U,{type:"primary",onClick:A[3]||(A[3]=N=>l.unref(u).showSiteComponentsParamsDialog=!0)},{default:l.withCtx(()=>[...A[23]||(A[23]=[l.createTextVNode("设置props",-1)])]),_:1}),l.createVNode(l.unref(t),{modelValue:m.value.fieldUiProps,"onUpdate:modelValue":A[4]||(A[4]=N=>m.value.fieldUiProps=N),visible:l.unref(u).showSiteComponentsParamsDialog,"onUpdate:visible":A[5]||(A[5]=N=>l.unref(u).showSiteComponentsParamsDialog=N),title:"设置组件参数"},null,8,["modelValue","visible"])]),_:1})]),_:1})]),_:1}),b()?(l.openBlock(),l.createBlock(oe,{key:0},{default:l.withCtx(()=>[l.createVNode(P,{span:24},{default:l.withCtx(()=>[l.createVNode(D,{label:"数据源",prop:"fieldRequestUrl"},{default:l.withCtx(()=>[l.createVNode(C,{placeholder:"请输入",modelValue:m.value.fieldRequestUrl,"onUpdate:modelValue":A[7]||(A[7]=N=>m.value.fieldRequestUrl=N),clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldRequestType,"onUpdate:modelValue":A[6]||(A[6]=N=>m.value.fieldRequestType=N),placeholder:"请选择",style:{width:"150px"},onChange:O},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ey),N=>(l.openBlock(),l.createBlock(F,{key:N.value,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),m.value.fieldRequestType=="POST"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(Z,{"content-position":"left"},{default:l.withCtx(()=>[A[24]||(A[24]=l.createTextVNode(" POST参数配置 ",-1)),l.createVNode(U,{class:"add-icon-btn",type:"primary",icon:"Plus",circle:"",onClick:y})]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.postRequestParams,(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q},{default:l.withCtx(()=>[l.createVNode(P,{span:5},{default:l.withCtx(()=>[l.createVNode(D,{label:"提交字段名",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitName"},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:N.submitName,"onUpdate:modelValue":Y=>N.submitName=Y,placeholder:"请输入提交字段名",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(P,{span:8},{default:l.withCtx(()=>[l.createVNode(D,{label:"方式",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitValue"},{default:l.withCtx(()=>[l.createVNode(C,{placeholder:"请输入值",modelValue:N.submitValue,"onUpdate:modelValue":Y=>N.submitValue=Y,clearable:""},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:N.submitType,"onUpdate:modelValue":Y=>N.submitType=Y,placeholder:"请选择方式",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref($y),(Y,Qe)=>(l.openBlock(),l.createBlock(F,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),N.submitType==="dynamic"?(l.openBlock(),l.createBlock(P,{key:0,span:5},{default:l.withCtx(()=>[l.createVNode(D,{label:"匹配条件",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"postRequestParams."+q+".submitMatchType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:N.submitMatchType,"onUpdate:modelValue":Y=>N.submitMatchType=Y,placeholder:"请选择方式",clearable:"",filterable:"",style:{width:"120px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(Y,Qe)=>(l.openBlock(),l.createBlock(F,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),l.createVNode(P,{span:5},{default:l.withCtx(()=>[l.createVNode(D,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"postRequestParams."+q+".paramsType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:N.paramsType,"onUpdate:modelValue":Y=>N.paramsType=Y,placeholder:"请选择",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(rf),(Y,Qe)=>(l.openBlock(),l.createBlock(F,{key:Qe,label:Y.key,value:Y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),l.createVNode(P,{class:"submit-operate",span:1},{default:l.withCtx(()=>[l.createVNode(U,{class:"match-opreate",type:"danger",icon:"Minus",circle:"",onClick:Y=>x(q)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))],64)):l.createCommentVNode("",!0),l.createVNode(oe,null,{default:l.withCtx(()=>[l.createVNode(P,{span:24},{default:l.withCtx(()=>[l.createVNode(D,{label:"使用场景",rules:[{required:!1,message:"必填项",trigger:["change"]}],prop:"useScenes"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.useScenes,"onUpdate:modelValue":A[8]||(A[8]=N=>m.value.useScenes=N),placeholder:"请选择",multiple:"",clearable:"",filterable:"",onChange:Q},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),N=>(l.openBlock(),l.createBlock(G,{key:N.label,label:N.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(N.options,q=>(l.openBlock(),l.createBlock(F,{key:q.key,label:q.key,value:q.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),w()?(l.openBlock(),l.createBlock(oe,{key:2},{default:l.withCtx(()=>[l.createVNode(Z,{"content-position":"left"},{default:l.withCtx(()=>[...A[25]||(A[25]=[l.createTextVNode("查询模块",-1)])]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"查询条件",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableQueryCondition"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableQueryCondition,"onUpdate:modelValue":A[9]||(A[9]=N=>m.value.tableQueryCondition=N),placeholder:"请选择查询条件",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(N,q)=>(l.openBlock(),l.createBlock(F,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"默认值",rules:[{required:!1,message:"必填项",trigger:"blur"}],prop:"tableQueryDefaultValue"},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:m.value.tableQueryDefaultValue,"onUpdate:modelValue":A[10]||(A[10]=N=>m.value.tableQueryDefaultValue=N),placeholder:"请输入",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),g()?(l.openBlock(),l.createBlock(oe,{key:3},{default:l.withCtx(()=>[l.createVNode(Z,{"content-position":"left"},{default:l.withCtx(()=>[...A[26]||(A[26]=[l.createTextVNode("表格模块",-1)])]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"列宽",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:"tableCellWidth"},{default:l.withCtx(()=>[l.createVNode(C,{placeholder:"请输入",modelValue:m.value.tableCellWidth,"onUpdate:modelValue":A[12]||(A[12]=N=>m.value.tableCellWidth=N)},{prepend:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellWidthType,"onUpdate:modelValue":A[11]||(A[11]=N=>m.value.tableCellWidthType=N),placeholder:"请选择",style:{width:"100px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ly),(N,q)=>(l.openBlock(),l.createBlock(F,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"对齐方式",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellAlignType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellAlignType,"onUpdate:modelValue":A[13]||(A[13]=N=>m.value.tableCellAlignType=N),placeholder:"请选择对齐方式",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ry),(N,q)=>(l.openBlock(),l.createBlock(F,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"内容类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"tableCellContentType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.tableCellContentType,"onUpdate:modelValue":A[14]||(A[14]=N=>m.value.tableCellContentType=N),placeholder:"请选择内容类型",clearable:"",filterable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Vy),(N,q)=>(l.openBlock(),l.createBlock(F,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:2},{default:l.withCtx(()=>[l.createVNode(D,{label:"溢出隐藏",prop:"isTableCellOverflowTooltip"},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:m.value.isTableCellOverflowTooltip,"onUpdate:modelValue":A[15]||(A[15]=N=>m.value.isTableCellOverflowTooltip=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:2},{default:l.withCtx(()=>[l.createVNode(D,{label:"排序",prop:"isTableCellSort"},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:m.value.isTableCellSort,"onUpdate:modelValue":A[16]||(A[16]=N=>m.value.isTableCellSort=N)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),p()?(l.openBlock(),l.createBlock(oe,{key:4},{default:l.withCtx(()=>[l.createVNode(Z,{"content-position":"left"},{default:l.withCtx(()=>[...A[27]||(A[27]=[l.createTextVNode("表单模块",-1)])]),_:1}),l.createVNode(P,{span:3},{default:l.withCtx(()=>[l.createVNode(D,{label:"是否必填",prop:"isFormFieldRequired"},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:m.value.isFormFieldRequired,"onUpdate:modelValue":A[17]||(A[17]=N=>m.value.isFormFieldRequired=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:3},{default:l.withCtx(()=>[l.createVNode(D,{label:"是否回显",prop:"isFormSetValue"},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:m.value.isFormSetValue,"onUpdate:modelValue":A[18]||(A[18]=N=>m.value.isFormSetValue=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:3},{default:l.withCtx(()=>[l.createVNode(D,{label:"是否禁用",prop:"isFormDisabled"},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:m.value.isFormDisabled,"onUpdate:modelValue":A[19]||(A[19]=N=>m.value.isFormDisabled=N)},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"提交类型",rules:[{required:!0,message:"必填项",trigger:"change"}],prop:"fieldSubmitType"},{default:l.withCtx(()=>[l.createVNode(B,{modelValue:m.value.fieldSubmitType,"onUpdate:modelValue":A[20]||(A[20]=N=>m.value.fieldSubmitType=N),placeholder:"请选择提交类型",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ny),(N,q)=>(l.openBlock(),l.createBlock(F,{key:q,label:N.key,value:N.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(P,{span:6},{default:l.withCtx(()=>[l.createVNode(D,{label:"栅格数",prop:"formColumnCol"},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:m.value.formColumnCol,"onUpdate:modelValue":A[21]||(A[21]=N=>m.value.formColumnCol=N),max:24},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(Z,{"content-position":"left"},{default:l.withCtx(()=>[...A[28]||(A[28]=[l.createTextVNode("不同场景自定义字段组件",-1)])]),_:1}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value.formCustomComponentes,(N,q)=>(l.openBlock(),l.createBlock(oe,{key:q},{default:l.withCtx(()=>[l.createVNode(P,{span:2},{default:l.withCtx(()=>[l.createVNode(D,{label:`${N.btnName}`,prop:`formCustomComponentes.${q}.isFieldCustom`},{default:l.withCtx(()=>[l.createVNode(j,{modelValue:N.isFieldCustom,"onUpdate:modelValue":Y=>N.isFieldCustom=Y,onChange:Y=>S(Y,N)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label","prop"])]),_:2},1024),N.isFieldCustom?(l.openBlock(),l.createBlock(P,{key:0,span:8},{default:l.withCtx(()=>[l.createVNode(D,{label:"组件名称","label-width":"220",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentName`},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:N.customComponentName,"onUpdate:modelValue":Y=>N.customComponentName=Y,placeholder:"请输入",clearable:""},{default:l.withCtx(()=>[l.createElementVNode("template",d1,[l.createTextVNode(l.toDisplayString(l.unref(r)),1)])]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0),N.isFieldCustom?(l.openBlock(),l.createBlock(P,{key:1,span:14},{default:l.withCtx(()=>[l.createVNode(D,{label:"组件地址",rules:[{required:!0,message:"必填项",trigger:"blur"}],prop:`formCustomComponentes.${q}.customComponentUrl`},{default:l.withCtx(()=>[l.createVNode(C,{modelValue:N.customComponentUrl,"onUpdate:modelValue":Y=>N.customComponentUrl=Y,placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)):l.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["model"])]),_:1},512)]),_:1},8,["model-value","title"])}}},[["__scopeId","data-v-f51a212e"]])},Symbol.toStringTag,{value:"Module"})),cf=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i,s=l.computed({get(){return n.modelValue},set(a){t("update:modelValue",a)}}),r=a=>{let c=a.charAt(0);return a=a.replace(/[^\d.]/g,""),a=a.replace(/^\./g,""),a=a.replace(/\.{2,}/g,"."),a=a.replace(".","$#$").replace(/\./g,"").replace("$#$","."),c=="-"&&(a="-"+a),a},o=a=>{s.value=r(a)};return(a,c)=>{const u=l.resolveComponent("el-input");return l.openBlock(),l.createBlock(u,l.mergeProps({modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=h=>s.value=h),modelModifiers:{number:!0},placeholder:"Please input"},a.$attrs,{onInput:o}),null,16,["modelValue"])}}}},Symbol.toStringTag,{value:"Module"})),mE="",gE="",g1={class:"select-icon-container"},O1={class:"icon-list"},_1=["onClick"],b1={class:"icon-value",slot:"reference"},uf=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},icons:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",type:"btn"})}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,n=i;let s=l.ref(!1),r=l.ref(-1),o=l.ref([]);const a=()=>r.value==-1?"":o.value[r.value];l.watch(()=>n.icons,(u,h)=>{u&&(o.value=(n.icons||[]).map(f=>{const{props:d}=n;return Reflect.has(f,d.value)?`${d.type}-${f[d.value]}`:`${d.type}-${f}`}))},{deep:!0,immediate:!0}),l.watch(()=>n.modelValue,(u,h)=>{if(!u){r.value=-1,t("update:modelValue","");return}const f=o.value.findIndex(d=>d===u);r.value=f},{deep:!0,immediate:!0});const c=(u,h)=>{r.value=h,t("update:modelValue",a()),s.value=!1};return(u,h)=>{const f=l.resolveComponent("a-svg-icon"),d=l.resolveComponent("el-button"),m=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",g1,[l.createVNode(m,{"popper-class":"select-icon-popover",placement:"bottom-start",visible:l.unref(s),"onUpdate:visible":h[0]||(h[0]=b=>l.isRef(s)?s.value=b:s=b),width:400,trigger:"click"},{reference:l.withCtx(()=>[l.createElementVNode("div",b1,[l.unref(r)>=0?(l.openBlock(),l.createBlock(f,{key:0,name:n.modelValue,width:"24",height:"24",color:"#000"},null,8,["name"])):l.createCommentVNode("",!0),l.createVNode(d,{class:"icon-btn",type:"primary"},{default:l.withCtx(()=>[...h[1]||(h[1]=[l.createTextVNode("选择图标",-1)])]),_:1})])]),default:l.withCtx(()=>[l.createElementVNode("ul",O1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(b,w)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["icon-item",{"icon-item-checked":l.unref(r)==w}]),key:w,onClick:g=>c(b,w)},[l.createVNode(f,{class:"icon-svg",name:b,width:"24",height:"24",color:"#999"},null,8,["name"])],10,_1))),128))])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-308d02d4"]])},Symbol.toStringTag,{value:"Module"}));let Qr;const y1=new Uint8Array(16);function w1(){if(!Qr&&(Qr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qr(y1)}const ut=[];for(let i=0;i<256;++i)ut.push((i+256).toString(16).slice(1));function k1(i,e=0){return ut[i[e+0]]+ut[i[e+1]]+ut[i[e+2]]+ut[i[e+3]]+"-"+ut[i[e+4]]+ut[i[e+5]]+"-"+ut[i[e+6]]+ut[i[e+7]]+"-"+ut[i[e+8]]+ut[i[e+9]]+"-"+ut[i[e+10]]+ut[i[e+11]]+ut[i[e+12]]+ut[i[e+13]]+ut[i[e+14]]+ut[i[e+15]]}const hf={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function x1(i,e,t){if(hf.randomUUID&&!e&&!i)return hf.randomUUID();i=i||{};const n=i.random||(i.rng||w1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=n[s];return e}return k1(n)}const yE="",S1={class:"upload-container"},C1={class:"el-upload__text"},A1={class:"tip-text"},T1={class:"file-list-l"},P1=["onMouseenter","onMouseleave"],Q1={class:"el-file-operate"},E1=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{request:{type:Function,required:!0,default:null},modelValue:{type:[Array,String],default:[]},action:{type:String,default:"/api/v1/utils/uploadFiles"},data:{type:Object,default:()=>({uploadFileType:1})},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},accept:{type:String,default:"*"},tipText:{type:String,default:""},fileMaxSize:{type:Number,default:100},autoUpload:{type:Boolean,default:!0}},emits:["update:modelValue","delete"],setup(i,{expose:e,emit:t}){const{getAssetsFileName:n,getAssetsFilePath:s,downloadFile:r}=Jh(),{t:o}=Gt(),a=t,c=i,u={image:/(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,word:/(doc|docx)$/,pdf:/(pdf)$/,excel:/(xls|xlsx)$/};let h=l.ref(!1),f=l.ref({}),d=l.ref(!1),m=l.ref(null),b=null,w=l.computed({get(){return x(c.modelValue)},set(P){a("update:modelValue",P)}});const g=P=>{const F=(w.value||[]).map(oe=>oe.filePath);if(P==0)return F;let B=F.splice(P),U=F.splice(0,P);return B.concat(U)},p=P=>{const F=P.substring(P.lastIndexOf(".")+1);let B=null;return Object.keys(u).some(U=>{if(u[U].test(F))return B=U,!0}),B===null&&(B="file"),B},y=P=>P.map(F=>({uid:F.uid??x1(),name:n(F),filePath:F,fileType:p(F),status:"success"})),x=P=>{const F=Array.isArray(P)?P.map(B=>B.filePath):P?P.split(";"):[];return y(F||[])},O=({name:P})=>{const F=P.lastIndexOf("."),B=P.slice(F),U=c.accept.trim().split(",");let oe=!1;return U.includes(B)&&(oe=!0),oe=U.some(Z=>Z=="image/*"?u.image.test(B):Z.startsWith(".")?P.endsWith(Z):Z===B),oe||Ve.ElNotification({title:`${o("act.tip")}`,message:`【${P}】${o("act.uploadErrorTip")}`,type:"warning",duration:2500}),oe},Q=(P,F,B)=>{b&&(clearTimeout(b),b=null),b=setTimeout(()=>{P.call(this,F)},B)},S=P=>c.request({url:c.action,method:"POST",data:P,headers:{"Content-Type":"application/x-www-form-urlencoded"}}),k=async P=>{try{const F=P.filter(G=>G.status=="ready"&&O(G)),B=w.value.length+F.length;if(F.length===0){m.value.clearFiles();return}if(B>c.limit){Ve.ElNotification({title:`${o("act.tip")}`,message:`${o("act.uploadLimitTip")}`,type:"warning",duration:2500}),m.value.clearFiles();return}if(!c.autoUpload){const G=F.map(j=>({...j,filePath:null,status:"success"}));a("update:modelValue",G),m.value.clearFiles();return}h.value=!0;const U=new FormData;Object.keys(c.data).forEach(G=>{U.append(G,c.data[G])}),F.forEach(G=>{U.append(c.name,G.raw)});let{data:oe}=await S(U);const Z=c.multiple?[...w.value.map(G=>G.filePath),...oe.filePaths||[]].join(";"):[...oe.filePaths||[]].join(";");m.value.clearFiles(),a("update:modelValue",Z),h.value=!1}catch(F){m.value.clearFiles(),h.value=!1,console.error(F)}},T=(P,F)=>{Q(k,F,500)},$=(P,F)=>{const B=f.value[`tooltipRef${F}`];d.value=B.scrollWidth<=Math.round(B.getBoundingClientRect().width)},_=({filePath:P,name:F,uid:B},U)=>{l.nextTick(()=>{document.querySelector(`.previewImage_${B}`).children[0].click()})},A=({filePath:P,name:F})=>{r(c.request,P)},C=(P,F)=>{w.value=w.value.filter((B,U)=>U!==F),a("delete",{data:P})};return e({clearFiles:()=>{w.value=[],m.value.clearFiles()}}),(P,F)=>{const B=l.resolveComponent("upload-filled"),U=l.resolveComponent("el-icon"),oe=l.resolveComponent("el-upload"),Z=l.resolveComponent("el-image"),G=l.resolveComponent("el-tooltip"),j=l.resolveComponent("el-button"),K=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",S1,[l.withDirectives((l.openBlock(),l.createBlock(oe,l.mergeProps({ref_key:"uploadRef",ref:m,action:"#",drag:"",accept:c.accept,multiple:c.multiple,"auto-upload":!1,"show-file-list":!1,"on-change":T},P.$attrs,{"element-loading-text":l.unref(o)("act.uploadLoading")}),{tip:l.withCtx(()=>[c.tipText?l.renderSlot(P.$slots,"default",{key:0},()=>[l.createElementVNode("p",A1,l.toDisplayString(c.tipText),1)],!0):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createVNode(U,{class:"el-icon--upload"},{default:l.withCtx(()=>[l.createVNode(B)]),_:1}),l.createElementVNode("div",C1,[l.createTextVNode(l.toDisplayString(l.unref(o)("act.uploadText")),1),l.createElementVNode("em",null,l.toDisplayString(l.unref(o)("act.clickUpload")),1)])]),_:3},16,["accept","multiple","element-loading-text"])),[[K,l.unref(h)]]),l.renderSlot(P.$slots,"default",{},()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(w),(de,fe)=>(l.openBlock(),l.createElementBlock("div",{class:"file-list",key:de.uid},[l.createElementVNode("div",T1,[de.fileType==="image"?(l.openBlock(),l.createBlock(Z,{key:0,class:l.normalizeClass(["file-list-image",{[`previewImage_${de.uid}`]:!0}]),fit:"cover","preview-src-list":g(fe),"preview-teleported":"",src:de.filePath},null,8,["class","preview-src-list","src"])):(l.openBlock(),l.createBlock(Z,{key:1,class:"file-list-icon",src:l.unref(s)(`images/upload-${de.fileType}.png`)},null,8,["src"])),l.createVNode(G,{effect:"dark",content:de.name,placement:"bottom-start",disabled:l.unref(d)},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"el-file-name",ref_for:!0,ref:he=>l.unref(f)[`tooltipRef${fe}`]=he,onMouseenter:he=>$(he,fe),onMouseleave:he=>$(he,fe)},l.toDisplayString(de.name),41,P1)]),_:2},1032,["content","disabled"])]),l.createElementVNode("div",Q1,[de.fileType==="image"?(l.openBlock(),l.createBlock(j,{key:0,type:"primary",size:"small",icon:l.unref(my),circle:"",onClick:he=>_(de)},null,8,["icon","onClick"])):l.createCommentVNode("",!0),l.createVNode(j,{type:"primary",size:"small",icon:l.unref(hy),circle:"",onClick:he=>A(de)},null,8,["icon","onClick"]),l.createVNode(j,{type:"danger",size:"small",icon:l.unref(cy),circle:"",onClick:he=>C(de,fe)},null,8,["icon","onClick"])])]))),128))],!0)])}}},[["__scopeId","data-v-ba74316a"]])},Symbol.toStringTag,{value:"Module"}));var $1=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCommentChange","onCompositionEnd","onCompositionStart","onCompositionUpdate","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onInput","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],N1=function(i){return $1.map(function(e){return e.toLowerCase()}).indexOf(i.toLowerCase())!==-1},R1=function(i,e,t){Object.keys(e).filter(N1).forEach(function(n){var s=e[n];typeof s=="function"&&(n==="onInit"?s(i,t):t.on(n.substring(2),function(r){return s(r,t)}))})},V1=function(i,e,t,n){var s=i.modelEvents?i.modelEvents:null,r=Array.isArray(s)?s.join(" "):s;l.watch(n,function(o,a){t&&typeof o=="string"&&o!==a&&o!==t.getContent({format:i.outputFormat})&&t.setContent(o)}),t.on(r||"change input undo redo",function(){e.emit("update:modelValue",t.getContent({format:i.outputFormat}))})},L1=function(i,e,t,n,s,r){n.setContent(r()),t.attrs["onUpdate:modelValue"]&&V1(e,t,n,s),R1(i,t.attrs,n)},ff=0,df=function(i){var e=Date.now(),t=Math.floor(Math.random()*1e9);return ff++,i+"_"+t+ff+String(e)},M1=function(i){return i!==null&&i.tagName.toLowerCase()==="textarea"},pf=function(i){return typeof i>"u"||i===""?[]:Array.isArray(i)?i:i.split(" ")},D1=function(i,e){return pf(i).concat(pf(e))},v1=function(i){return i==null},mf=function(i){var e;return typeof((e=i.options)===null||e===void 0?void 0:e.set)=="function"&&i.options.isRegistered("disabled")},gf=function(){return{listeners:[],scriptId:df("tiny-script"),scriptLoaded:!1}},B1=function(){var i=gf(),e=function(s,r,o,a){var c=r.createElement("script");c.referrerPolicy="origin",c.type="application/javascript",c.id=s,c.src=o;var u=function(){c.removeEventListener("load",u),a()};c.addEventListener("load",u),r.head&&r.head.appendChild(c)},t=function(s,r,o){i.scriptLoaded?o():(i.listeners.push(o),s.getElementById(i.scriptId)||e(i.scriptId,s,r,function(){i.listeners.forEach(function(a){return a()}),i.scriptLoaded=!0}))},n=function(){i=gf()};return{load:t,reinitialize:n}},I1=B1(),Z1=function(){return typeof window<"u"?window:global},un=function(){var i=Z1();return i&&i.tinymce?i.tinymce:null},F1={apiKey:String,licenseKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,readonly:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(i){return i==="html"||i==="text"}}},li=globalThis&&globalThis.__assign||function(){return li=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s])}return i},li.apply(this,arguments)},U1=function(i,e,t,n){return i(n||"div",{id:e,ref:t})},X1=function(i,e,t){return i("textarea",{id:e,visibility:"hidden",ref:t})},Ml={selector:void 0,target:void 0},Dl=function(i,e){var t;typeof((t=i.mode)===null||t===void 0?void 0:t.set)=="function"?i.mode.set(e):i.setMode(e)},W1=l.defineComponent({props:F1,setup:function(i,e){var t=i.init?li(li({},i.init),Ml):li({},Ml),n=l.toRefs(i),s=n.disabled,r=n.readonly,o=n.modelValue,a=n.tagName,c=l.ref(null),u=null,h=i.id||df("tiny-vue"),f=i.init&&i.init.inline||i.inline,d=!!e.attrs["onUpdate:modelValue"],m=!0,b=i.initialValue?i.initialValue:"",w="",g=function(x){return d?function(){return o!=null&&o.value?o.value:""}:function(){return x?b:w}},p=function(){var x=g(m),O=li(li({},t),{disabled:i.disabled,readonly:i.readonly,target:c.value,plugins:D1(t.plugins,i.plugins),toolbar:i.toolbar||t.toolbar,inline:f,license_key:i.licenseKey,setup:function(Q){u=Q,!mf(u)&&i.disabled===!0&&Dl(u,"readonly"),Q.on("init",function(S){return L1(S,i,e,Q,o,x)}),typeof t.setup=="function"&&t.setup(Q)}});M1(c.value)&&(c.value.style.visibility=""),un().init(O),m=!1};l.watch(r,function(x){u!==null&&Dl(u,x?"readonly":"design")}),l.watch(s,function(x){u!==null&&(mf(u)?u.options.set("disabled",x):Dl(u,x?"readonly":"design"))}),l.watch(a,function(x){var O;u&&(d||(w=u.getContent()),(O=un())===null||O===void 0||O.remove(u),l.nextTick(function(){return p()}))}),l.onMounted(function(){if(un()!==null)p();else if(c.value&&c.value.ownerDocument){var x=i.cloudChannel?i.cloudChannel:"8",O=i.apiKey?i.apiKey:"no-api-key",Q=v1(i.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/".concat(O,"/tinymce/").concat(x,"/tinymce.min.js"):i.tinymceScriptSrc;I1.load(c.value.ownerDocument,Q,p)}}),l.onBeforeUnmount(function(){un()!==null&&un().remove(u)}),f||(l.onActivated(function(){m||p()}),l.onDeactivated(function(){var x;u&&(d||(w=u.getContent()),(x=un())===null||x===void 0||x.remove(u))}));var y=function(x){var O;u&&(w=u.getContent(),(O=un())===null||O===void 0||O.remove(u),t=li(li(li({},t),x),Ml),l.nextTick(function(){return p()}))};return e.expose({rerender:y,getEditor:function(){return u}}),function(){return f?U1(l.h,h,c,i.tagName):X1(l.h,h,c)}}});const xE="",q1={style:{height:"100%",overflow:"hidden"}},j1=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",props:{modelValue:{type:String,default:""},value:{type:String,default:""},baseUrl:{type:String,default:""},width:{type:[Number,String],default:"100%"},height:{type:Number,default:500},disabled:{type:Boolean,default:!1},editableRoot:{type:Boolean,default:!0},placeholder:{type:String,default:"请输入"},plugins:{type:[String,Array],default:"importcss autoresize searchreplace autolink directionality code visualblocks visualchars fullscreen image link codesample table charmap nonbreaking anchor insertdatetime advlist lists wordcount charmap quickbars emoticons accordion"},toolbar:{type:[String,Array,Boolean],default:"undo redo | accordion accordionremove | blocks fontfamily fontsize| bold italic underline strikethrough ltr rtl | align numlist bullist | link image | table | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | anchor codesample"}},emits:["update:modelValue","setHtml"],setup(i,{expose:e,emit:t}){const n=t,s=i,r=l.ref("vue-tinymce-"+ +new Date+((Math.random()*1e3).toFixed(0)+"")),o=l.reactive({selector:"#"+r.value,language_url:"/tinymce/langs/zh_CN.js",language:"zh_CN",skin_url:"/tinymce/skins/ui/oxide",content_css:"/tinymce/skins/content/default/content.css",editable_root:s.editableRoot,width:s.width,max_height:s.height,branding:!1,promotion:!1,menubar:"edit view insert format tools table",paste_data_images:!0,image_dimensions:!1,plugins:s.plugins,toolbar:s.toolbar,convert_urls:!1,link_default_target:"_blank",link_context_toolbar:!0,quickbars_insert_toolbar:"",quickbars_image_toolbar:"alignleft aligncenter alignright | rotateleft rotateright | imageoptions",editimage_toolbar:"rotateleft rotateright | flipv fliph | editimage imageoptions",font_family_formats:"Arial=arial,helvetica,sans-serif; 宋体=SimSun; 微软雅黑=Microsoft Yahei; Impact=impact,chicago;",font_size_formats:"11px 12px 14px 16px 18px 24px 36px 48px 64px 72px",image_caption:!0,editimage_cors_hosts:["picsum.photos"],noneditable_class:"mceNonEditable",toolbar_mode:"wrap",content_style:"body {margin:12px; font-family:sans-serif; font-size:14px }p {margin:3px; line-height:24px;}",image_advtab:!0,importcss_append:!0,paste_webkit_styles:"all",paste_merge_formats:!0,nonbreaking_force_tab:!1,paste_auto_cleanup_on_paste:!1,file_picker_types:"file",quickbars_selection_toolbar:"bold italic | quicklink h2 h3 blockquote quickimage quicktable",images_upload_handler:function(h,f){}});console.log(o);const a=l.computed({get(){return s.modelValue},set(h){n("update:modelValue",h)}});return l.watch(()=>a.value,()=>{n("setHtml",dr.activeEditor.getContent({format:"text"}),a.value)}),l.onMounted(()=>{dr.init({})}),e({onGetContent:()=>dr.activeEditor.getContent(),onSetContent:h=>{dr.activeEditor.setContent(h)}}),(h,f)=>(l.openBlock(),l.createElementBlock("div",q1,[l.createVNode(l.unref(W1),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=d=>a.value=d),init:o,disabled:i.disabled,placeholder:i.placeholder,id:r.value},null,8,["modelValue","init","disabled","placeholder","id"])]))}}},Symbol.toStringTag,{value:"Module"}));let vl=[],Of=[];(()=>{let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,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seInt(e,36):1);for(let e=0,t=0;e<i.length;e++)(e%2?Of:vl).push(t=t+i[e])})();function z1(i){if(i<768)return!1;for(let e=0,t=vl.length;;){let n=e+t>>1;if(i<vl[n])t=n;else if(i>=Of[n])e=n+1;else return!0;if(e==t)return!1}}function _f(i){return i>=127462&&i<=127487}const bf=8205;function Y1(i,e,t=!0,n=!0){return(t?yf:G1)(i,e,n)}function yf(i,e,t){if(e==i.length)return e;e&&wf(i.charCodeAt(e))&&kf(i.charCodeAt(e-1))&&e--;let n=Bl(i,e);for(e+=xf(n);e<i.length;){let s=Bl(i,e);if(n==bf||s==bf||t&&z1(s))e+=xf(s),n=s;else if(_f(s)){let r=0,o=e-2;for(;o>=0&&_f(Bl(i,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function G1(i,e,t){for(;e>0;){let n=yf(i,e-2,t);if(n<e)return n;e--}return 0}function Bl(i,e){let t=i.charCodeAt(e);if(!kf(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return wf(n)?(t-55296<<10)+(n-56320)+65536:t}function wf(i){return i>=56320&&i<57344}function kf(i){return i>=55296&&i<56320}function xf(i){return i<65536?1:2}class Pe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Vn(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),ai.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Vn(this,e,t);let n=[];return this.decompose(e,t,n,0),ai.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),s=new gs(this),r=new gs(e);for(let o=t,a=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(a+=s.value.length,s.done||a>=n)return!0}}iter(e=1){return new gs(this,e)}iterRange(e,t=this.length){return new Cf(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Af(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Pe.empty:e.length<=32?new Ye(e):ai.from(Ye.split(e,[]))}}class Ye extends Pe{constructor(e,t=K1(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.text[r],a=s+o.length;if((t?n:a)>=e)return new H1(s,a,n,o);s=a+1,n++}}decompose(e,t,n,s){let r=e<=0&&t>=this.length?this:new Ye(Sf(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=n.pop(),a=Er(r.text,o.text.slice(),0,r.length);if(a.length<=32)n.push(new Ye(a,o.length+r.length));else{let c=a.length>>1;n.push(new Ye(a.slice(0,c)),new Ye(a.slice(c)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof Ye))return super.replace(e,t,n);[e,t]=Vn(this,e,t);let s=Er(this.text,Er(n.text,Sf(this.text,0,e)),t),r=this.length+n.length-(t-e);return s.length<=32?new Ye(s,r):ai.from(Ye.split(s,[]),r)}sliceString(e,t=this.length,n=`
22
+ `){[e,t]=Vn(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let a=this.text[o],c=r+a.length;r>e&&o&&(s+=n),e<c&&t>r&&(s+=a.slice(Math.max(0,e-r),t-r)),r=c+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let r of e)n.push(r),s+=r.length+1,n.length==32&&(t.push(new Ye(n,s)),n=[],s=-1);return s>-1&&t.push(new Ye(n,s)),t}}class ai extends Pe{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let r=0;;r++){let o=this.children[r],a=s+o.length,c=n+o.lines-1;if((t?c:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=c+1}}decompose(e,t,n,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let a=this.children[r],c=o+a.length;if(e<=c&&t>=o){let u=s&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!u?n.push(a):a.decompose(e-o,t-o,n,u)}o=c+1}}replace(e,t,n){if([e,t]=Vn(this,e,t),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],a=r+o.length;if(e>=r&&t<=a){let c=o.replace(e-r,t-r,n),u=this.lines-o.lines+c.lines;if(c.lines<u>>5-1&&c.lines>u>>5+1){let h=this.children.slice();return h[s]=c,new ai(h,this.length-(t-e)+n.length)}return super.replace(r,a,c)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
23
+ `){[e,t]=Vn(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let a=this.children[r],c=o+a.length;o>e&&r&&(s+=n),e<c&&t>o&&(s+=a.sliceString(e-o,t-o,n)),o=c+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ai))return 0;let n=0,[s,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==a)return n;let c=this.children[s],u=e.children[r];if(c!=u)return n+c.scanIdentical(u,t);n+=c.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let m of e)n+=m.lines;if(n<32){let m=[];for(let b of e)b.flatten(m);return new Ye(m,t)}let s=Math.max(32,n>>5),r=s<<1,o=s>>1,a=[],c=0,u=-1,h=[];function f(m){let b;if(m.lines>r&&m instanceof ai)for(let w of m.children)f(w);else m.lines>o&&(c>o||!c)?(d(),a.push(m)):m instanceof Ye&&c&&(b=h[h.length-1])instanceof Ye&&m.lines+b.lines<=32?(c+=m.lines,u+=m.length+1,h[h.length-1]=new Ye(b.text.concat(m.text),b.length+1+m.length)):(c+m.lines>s&&d(),c+=m.lines,u+=m.length+1,h.push(m))}function d(){c!=0&&(a.push(h.length==1?h[0]:ai.from(h,u)),u=-1,c=h.length=0)}for(let m of e)f(m);return d(),a.length==1?a[0]:new ai(a,t)}}Pe.empty=new Ye([""],0);function K1(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Er(i,e,t=0,n=1e9){for(let s=0,r=0,o=!0;r<i.length&&s<=n;r++){let a=i[r],c=s+a.length;c>=t&&(c>n&&(a=a.slice(0,n-s)),s<t&&(a=a.slice(t-s)),o?(e[e.length-1]+=a,o=!1):e.push(a)),s=c+1}return e}function Sf(i,e,t){return Er(i,[""],e,t)}class gs{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Ye?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],r=this.offsets[n],o=r>>1,a=s instanceof Ye?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
24
+ `,this;e--}else if(s instanceof Ye){let c=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=s.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof Ye?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Cf{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new gs(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Af{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Pe.prototype[Symbol.iterator]=function(){return this.iter()},gs.prototype[Symbol.iterator]=Cf.prototype[Symbol.iterator]=Af.prototype[Symbol.iterator]=function(){return this});class H1{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}}function Vn(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function ht(i,e,t=!0,n=!0){return Y1(i,e,t,n)}function J1(i){return i>=56320&&i<57344}function ew(i){return i>=55296&&i<56320}function At(i,e){let t=i.charCodeAt(e);if(!ew(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return J1(n)?(t-55296<<10)+(n-56320)+65536:t}function Il(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function ci(i){return i<65536?1:2}const Zl=/\r\n?|\n/;var ft=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(ft||(ft={}));class ui{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,s,r),s+=r):s+=o,n+=r}}iterChangedRanges(e,t=!1){Fl(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new ui(e)}composeDesc(e){return this.empty?e:e.empty?this:Tf(this,e)}mapDesc(e,t=!1){return e.empty?this:Ul(this,e,t)}mapPos(e,t=-1,n=ft.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],c=this.sections[o++],u=s+a;if(c<0){if(u>e)return r+(e-s);r+=a}else{if(n!=ft.Simple&&u>=e&&(n==ft.TrackDel&&s<e&&u>e||n==ft.TrackBefore&&s<e||n==ft.TrackAfter&&u>e))return null;if(u>e||u==e&&t<0&&!a)return e==s||t<0?r:r+c;r+=c}s=u}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let r=this.sections[n++],o=this.sections[n++],a=s+r;if(o>=0&&s<=t&&a>=e)return s<e&&a>t?"cover":!0;s=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ui(e)}static create(e){return new ui(e)}}class it extends ui{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Fl(this,(t,n,s,r,o)=>e=e.replace(s,s+(n-t),o),!1),e}mapDesc(e,t=!1){return Ul(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],a=t[s+1];if(a>=0){t[s]=a,t[s+1]=o;let c=s>>1;for(;n.length<c;)n.push(Pe.empty);n.push(o?e.slice(r,r+o):Pe.empty)}r+=o}return new it(t,n)}compose(e){return this.empty?e:e.empty?this:Tf(this,e,!0)}map(e,t=!1){return e.empty?this:Ul(this,e,t,!0)}iterChanges(e,t=!1){Fl(this,e,t)}get desc(){return ui.create(this.sections)}filter(e){let t=[],n=[],s=[],r=new Os(this);e:for(let o=0,a=0;;){let c=o==e.length?1e9:e[o++];for(;a<c||a==c&&r.len==0;){if(r.done)break e;let h=Math.min(r.len,c-a);gt(s,h,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;gt(t,h,f),f>0&&Ui(n,t,r.text),r.forward(h),a+=h}let u=e[o++];for(;a<u;){if(r.done)break e;let h=Math.min(r.len,u-a);gt(t,h,-1),gt(s,h,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(h),a+=h}}return{changes:new it(t,n),filtered:ui.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],r=[],o=0,a=null;function c(h=!1){if(!h&&!s.length)return;o<t&&gt(s,t-o,-1);let f=new it(s,r);a=a?a.compose(f.map(a)):f,s=[],r=[],o=0}function u(h){if(Array.isArray(h))for(let f of h)u(f);else if(h instanceof it){if(h.length!=t)throw new RangeError(`Mismatched change set length (got ${h.length}, expected ${t})`);c(),a=a?a.compose(h.map(a)):h}else{let{from:f,to:d=f,insert:m}=h;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let b=m?typeof m=="string"?Pe.of(m.split(n||Zl)):m:Pe.empty,w=b.length;if(f==d&&w==0)return;f<o&&c(),f>o&&gt(s,f-o,-1),gt(s,d-f,w),Ui(r,s,b),o=d}}return u(e),c(!a),a}static empty(e){return new it(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;n.length<s;)n.push(Pe.empty);n[s]=Pe.of(r.slice(1)),t.push(r[0],n[s].length)}}}return new it(t,n)}static createSet(e,t){return new it(e,t)}}function gt(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function Ui(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(Pe.empty);i.push(t)}}function Fl(i,e,t){let n=i.inserted;for(let s=0,r=0,o=0;o<i.sections.length;){let a=i.sections[o++],c=i.sections[o++];if(c<0)s+=a,r+=a;else{let u=s,h=r,f=Pe.empty;for(;u+=a,h+=c,c&&n&&(f=f.append(n[o-2>>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)a=i.sections[o++],c=i.sections[o++];e(s,u,r,h,f),s=u,r=h}}}function Ul(i,e,t,n=!1){let s=[],r=n?[]:null,o=new Os(i),a=new Os(e);for(let c=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let u=Math.min(o.len,a.len);gt(s,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let u=a.len;for(gt(s,a.ins,-1);u;){let h=Math.min(o.len,u);o.ins>=0&&c<o.i&&o.len<=h&&(gt(s,0,o.ins),r&&Ui(r,s,o.text),c=o.i),o.forward(h),u-=h}a.next()}else if(o.ins>=0){let u=0,h=o.len;for(;h;)if(a.ins==-1){let f=Math.min(h,a.len);u+=f,h-=f,a.forward(f)}else if(a.ins==0&&a.len<h)h-=a.len,a.next();else break;gt(s,u,c<o.i?o.ins:0),r&&c<o.i&&Ui(r,s,o.text),c=o.i,o.forward(o.len-h)}else{if(o.done&&a.done)return r?it.createSet(s,r):ui.create(s);throw new Error("Mismatched change set lengths")}}}function Tf(i,e,t=!1){let n=[],s=t?[]:null,r=new Os(i),o=new Os(e);for(let a=!1;;){if(r.done&&o.done)return s?it.createSet(n,s):ui.create(n);if(r.ins==0)gt(n,r.len,0,a),r.next();else if(o.len==0&&!o.done)gt(n,0,o.ins,a),s&&Ui(s,n,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(r.len2,o.len),u=n.length;if(r.ins==-1){let h=o.ins==-1?-1:o.off?0:o.ins;gt(n,c,h,a),s&&h&&Ui(s,n,o.text)}else o.ins==-1?(gt(n,r.off?0:r.len,c,a),s&&Ui(s,n,r.textBit(c))):(gt(n,r.off?0:r.len,o.off?0:o.ins,a),s&&!o.off&&Ui(s,n,o.text));a=(r.ins>c||o.ins>=0&&o.len>c)&&(a||n.length>u),r.forward2(c),o.forward(c)}}}}class Os{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Pe.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Pe.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class hn{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new hn(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return W.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return W.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return W.range(e.anchor,e.head)}static create(e,t,n){return new hn(e,t,n)}}class W{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:W.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new W([this.main],0)}addRange(e,t=!0){return W.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,W.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new W(e.ranges.map(t=>hn.fromJSON(t)),e.main)}static single(e,t=e){return new W([W.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=n:r.from<n)return W.normalized(e.slice(),t);n=r.to}return new W(e,t)}static cursor(e,t=0,n,s){return hn.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let r=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?hn.create(t,e,48|r):hn.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let n=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let a=o.from,c=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?W.range(c,a):W.range(a,c))}}return new W(e,t)}}function Pf(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Xl=0;class ae{constructor(e,t,n,s,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=Xl++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new ae(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Wl),!!e.static,e.enables)}of(e){return new $r([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new $r(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new $r(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function Wl(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class $r{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=Xl++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,a=this.type==2,c=!1,u=!1,h=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?u=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||h.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,d){if(c&&d.docChanged||u&&(d.docChanged||d.selection)||ql(f,h)){let m=n(f);if(a?!Qf(m,f.values[o],s):!s(m,f.values[o]))return f.values[o]=m,1}return 0},reconfigure:(f,d)=>{let m,b=d.config.address[r];if(b!=null){let w=Vr(d,b);if(this.dependencies.every(g=>g instanceof ae?d.facet(g)===f.facet(g):g instanceof rt?d.field(g,!1)==f.field(g,!1):!0)||(a?Qf(m=n(f),w,s):s(m=n(f),w)))return f.values[o]=w,0}else m=n(f);return f.values[o]=m,1}}}}function Qf(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function ql(i,e){let t=!1;for(let n of e)ys(i,n)&1&&(t=!0);return t}function tw(i,e,t){let n=t.map(c=>i[c.id]),s=t.map(c=>c.type),r=n.filter(c=>!(c&1)),o=i[e.id]>>1;function a(c){let u=[];for(let h=0;h<n.length;h++){let f=Vr(c,n[h]);if(s[h]==2)for(let d of f)u.push(d);else u.push(f)}return e.combine(u)}return{create(c){for(let u of n)ys(c,u);return c.values[o]=a(c),1},update(c,u){if(!ql(c,r))return 0;let h=a(c);return e.compare(h,c.values[o])?0:(c.values[o]=h,1)},reconfigure(c,u){let h=ql(c,n),f=u.config.facets[e.id],d=u.facet(e);if(f&&!h&&Wl(t,f))return c.values[o]=d,0;let m=a(c);return e.compare(m,d)?(c.values[o]=d,0):(c.values[o]=m,1)}}}const Nr=ae.define({static:!0});class rt{constructor(e,t,n,s,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new rt(Xl++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Nr).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let r=n.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(n.values[t]=o,1)},reconfigure:(n,s)=>{let r=n.facet(Nr),o=s.facet(Nr),a;return(a=r.find(c=>c.field==this))&&a!=o.find(c=>c.field==this)?(n.values[t]=a.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,Nr.of({field:this,create:e})]}get extension(){return this}}const fn={lowest:4,low:3,default:2,high:1,highest:0};function _s(i){return e=>new Ef(e,i)}const Xi={highest:_s(fn.highest),high:_s(fn.high),default:_s(fn.default),low:_s(fn.low),lowest:_s(fn.lowest)};class Ef{constructor(e,t){this.inner=e,this.prec=t}}class bs{of(e){return new jl(this,e)}reconfigure(e){return bs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class jl{constructor(e,t){this.compartment=e,this.inner=t}}class Rr{constructor(e,t,n,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let s=[],r=Object.create(null),o=new Map;for(let d of iw(e,t,o))d instanceof rt?s.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let a=Object.create(null),c=[],u=[];for(let d of s)a[d.id]=u.length<<1,u.push(m=>d.slot(m));let h=n==null?void 0:n.config.facets;for(let d in r){let m=r[d],b=m[0].facet,w=h&&h[d]||[];if(m.every(g=>g.type==0))if(a[b.id]=c.length<<1|1,Wl(w,m))c.push(n.facet(b));else{let g=b.combine(m.map(p=>p.value));c.push(n&&b.compare(g,n.facet(b))?n.facet(b):g)}else{for(let g of m)g.type==0?(a[g.id]=c.length<<1|1,c.push(g.value)):(a[g.id]=u.length<<1,u.push(p=>g.dynamicSlot(p)));a[b.id]=u.length<<1,u.push(g=>tw(g,b,m))}}let f=u.map(d=>d(a));return new Rr(e,o,f,a,c,r)}}function iw(i,e,t){let n=[[],[],[],[],[]],s=new Map;function r(o,a){let c=s.get(o);if(c!=null){if(c<=a)return;let u=n[c].indexOf(o);u>-1&&n[c].splice(u,1),o instanceof jl&&t.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let u of o)r(u,a);else if(o instanceof jl){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;t.set(o.compartment,u),r(u,a)}else if(o instanceof Ef)r(o.inner,o.prec);else if(o instanceof rt)n[a].push(o),o.provides&&r(o.provides,a);else if(o instanceof $r)n[a].push(o),o.facet.extensions&&r(o.facet.extensions,fn.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(u,a)}}return r(i,fn.default),n.reduce((o,a)=>o.concat(a))}function ys(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function Vr(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const $f=ae.define(),zl=ae.define({combine:i=>i.some(e=>e),static:!0}),Nf=ae.define({combine:i=>i.length?i[0]:void 0,static:!0}),Rf=ae.define(),Vf=ae.define(),Lf=ae.define(),Mf=ae.define({combine:i=>i.length?i[0]:!1});class Ai{constructor(e,t){this.type=e,this.value=t}static define(){return new nw}}class nw{of(e){return new Ai(this,e)}}class sw{constructor(e){this.map=e}of(e){return new ke(this,e)}}class ke{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ke(this.type,t)}is(e){return this.type==e}static define(e={}){return new sw(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let r=s.map(t);r&&n.push(r)}return n}}ke.reconfigure=ke.define(),ke.appendConfig=ke.define();class He{constructor(e,t,n,s,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&Pf(n,t.newLength),r.some(a=>a.type==He.time)||(this.annotations=r.concat(He.time.of(Date.now())))}static create(e,t,n,s,r,o){return new He(e,t,n,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(He.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}He.time=Ai.define(),He.userEvent=Ai.define(),He.addToHistory=Ai.define(),He.remote=Ai.define();function rw(i,e){let t=[];for(let n=0,s=0;;){let r,o;if(n<i.length&&(s==e.length||e[s]>=i[n]))r=i[n++],o=i[n++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Df(i,e,t){var n;let s,r,o;return t?(s=e.changes,r=it.empty(e.changes.length),o=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),r=i.changes.mapDesc(e.changes,!0),o=i.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:ke.mapEffects(i.effects,s).concat(ke.mapEffects(e.effects,r)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function Yl(i,e,t){let n=e.selection,s=Ln(e.annotations);return e.userEvent&&(s=s.concat(He.userEvent.of(e.userEvent))),{changes:e.changes instanceof it?e.changes:it.of(e.changes||[],t,i.facet(Nf)),selection:n&&(n instanceof W?n:W.single(n.anchor,n.head)),effects:Ln(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function vf(i,e,t){let n=Yl(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;n=Df(n,Yl(i,e[r],o?n.changes.newLength:i.doc.length),o)}let s=He.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return lw(t?ow(s):s)}function ow(i){let e=i.startState,t=!0;for(let s of e.facet(Rf)){let r=s(i);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:rw(t,r))}if(t!==!0){let s,r;if(t===!1)r=i.changes.invertedDesc,s=it.empty(e.doc.length);else{let o=i.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}i=He.create(e,s,i.selection&&i.selection.map(r),ke.mapEffects(i.effects,r),i.annotations,i.scrollIntoView)}let n=e.facet(Vf);for(let s=n.length-1;s>=0;s--){let r=n[s](i);r instanceof He?i=r:Array.isArray(r)&&r.length==1&&r[0]instanceof He?i=r[0]:i=vf(e,Ln(r),!1)}return i}function lw(i){let e=i.startState,t=e.facet(Lf),n=i;for(let s=t.length-1;s>=0;s--){let r=t[s](i);r&&Object.keys(r).length&&(n=Df(n,Yl(e,r,i.changes.newLength),!0))}return n==i?i:He.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const aw=[];function Ln(i){return i==null?aw:Array.isArray(i)?i:[i]}var We=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(We||(We={}));const cw=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Gl;try{Gl=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function uw(i){if(Gl)return Gl.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||cw.test(t)))return!0}return!1}function hw(i){return e=>{if(!/\S/.test(e))return We.Space;if(uw(e))return We.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return We.Word;return We.Other}}class Ce{constructor(e,t,n,s,r,o){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)ys(this,a<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return ys(this,n),Vr(this,n)}update(...e){return vf(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let a of e.effects)a.is(bs.reconfigure)?(t&&(s=new Map,t.compartments.forEach((c,u)=>s.set(u,c)),t=null),s.set(a.value.compartment,a.value.extension)):a.is(ke.reconfigure)?(t=null,n=a.value):a.is(ke.appendConfig)&&(t=null,n=Ln(n).concat(a.value));let r;t?r=e.startState.values.slice():(t=Rr.resolve(n,s,this),r=new Ce(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,u)=>u.reconfigure(c,this),null).values);let o=e.startState.facet(zl)?e.newSelection:e.newSelection.asSingle();new Ce(t,e.newDoc,o,r,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:W.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),r=[n.range],o=Ln(n.effects);for(let a=1;a<t.ranges.length;a++){let c=e(t.ranges[a]),u=this.changes(c.changes),h=u.map(s);for(let d=0;d<a;d++)r[d]=r[d].map(h);let f=s.mapDesc(u,!0);r.push(c.range.map(f)),s=s.compose(h),o=ke.mapEffects(o,h).concat(ke.mapEffects(Ln(c.effects),f))}return{changes:s,selection:W.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof it?e:it.of(e,this.doc.length,this.facet(Ce.lineSeparator))}toText(e){return Pe.of(e.split(this.facet(Ce.lineSeparator)||Zl))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ys(this,t),Vr(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof rt&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let r in n)if(Object.prototype.hasOwnProperty.call(e,r)){let o=n[r],a=e[r];s.push(o.init(c=>o.spec.fromJSON(a,c)))}}return Ce.create({doc:e.doc,selection:W.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Rr.resolve(e.extensions||[],new Map),n=e.doc instanceof Pe?e.doc:Pe.of((e.doc||"").split(t.staticFacet(Ce.lineSeparator)||Zl)),s=e.selection?e.selection instanceof W?e.selection:W.single(e.selection.anchor,e.selection.head):W.single(0);return Pf(s,n.length),t.staticFacet(zl)||(s=s.asSingle()),new Ce(t,n,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Ce.tabSize)}get lineBreak(){return this.facet(Ce.lineSeparator)||`
25
+ `}get readOnly(){return this.facet(Mf)}phrase(e,...t){for(let n of this.facet(Ce.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?n:t[r-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let r of this.facet($f))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return hw(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let c=ht(t,o,!1);if(r(t.slice(c,o))!=We.Word)break;o=c}for(;a<s;){let c=ht(t,a);if(r(t.slice(a,c))!=We.Word)break;a=c}return o==a?null:W.range(o+n,a+n)}}Ce.allowMultipleSelections=zl,Ce.tabSize=ae.define({combine:i=>i.length?i[0]:4}),Ce.lineSeparator=Nf,Ce.readOnly=Mf,Ce.phrases=ae.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}}),Ce.languageData=$f,Ce.changeFilter=Rf,Ce.transactionFilter=Vf,Ce.transactionExtender=Lf,bs.reconfigure=ke.define();function hi(i,e,t={}){let n={};for(let s of i)for(let r of Object.keys(s)){let o=s[r],a=n[r];if(a===void 0)n[r]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,r))n[r]=t[r](a,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class dn{eq(e){return this==e}range(e,t=e){return Kl.create(e,t,this)}}dn.prototype.startSide=dn.prototype.endSide=0,dn.prototype.point=!1,dn.prototype.mapMode=ft.TrackDel;let Kl=class d_{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new d_(e,t,n)}};function Hl(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class Jl{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let r=n?this.to:this.from;for(let o=s,a=r.length;;){if(o==a)return o;let c=o+a>>1,u=r[c]-e||(n?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return u>=0?o:a;u>=0?a=c:o=c+1}}between(e,t,n,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let n=[],s=[],r=[],o=-1,a=-1;for(let c=0;c<this.value.length;c++){let u=this.value[c],h=this.from[c]+e,f=this.to[c]+e,d,m;if(h==f){let b=t.mapPos(h,u.startSide,u.mapMode);if(b==null||(d=m=b,u.startSide!=u.endSide&&(m=t.mapPos(h,u.endSide),m<d)))continue}else if(d=t.mapPos(h,u.startSide),m=t.mapPos(f,u.endSide),d>m||d==m&&u.startSide>0&&u.endSide<=0)continue;(m-d||u.endSide-u.startSide)<0||(o<0&&(o=d),u.point&&(a=Math.max(a,m-d)),n.push(u),s.push(d-o),r.push(m-o))}return{mapped:n.length?new Jl(s,r,n,a):null,pos:o}}}class Re{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new Re(e,t,n,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(Hl)),this.isEmpty)return t.length?Re.of(t):this;let a=new If(this,null,-1).goto(0),c=0,u=[],h=new Ti;for(;a.value||c<t.length;)if(c<t.length&&(a.from-t[c].from||a.startSide-t[c].value.startSide)>=0){let f=t[c++];h.addInner(f.from,f.to,f.value)||u.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(a.chunkIndex)<t[c].from)&&(!o||s>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&h.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||s>a.to||r<a.from||o(a.from,a.to,a.value))&&(h.addInner(a.from,a.to,a.value)||u.push(Kl.create(a.from,a.to,a.value))),a.next());return h.finishInner(this.nextLayer.isEmpty&&!u.length?Re.empty:this.nextLayer.update({add:u,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],c=this.chunk[o],u=e.touchesRange(a,a+c.length);if(u===!1)s=Math.max(s,c.maxPoint),t.push(c),n.push(e.mapPos(a));else if(u===!0){let{mapped:h,pos:f}=c.map(a,e);h&&(s=Math.max(s,h.maxPoint),t.push(h),n.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Re(n,t,r||Re.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return ws.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ws.from(e).goto(t)}static compare(e,t,n,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),c=Bf(o,a,n),u=new ks(o,c,r),h=new ks(a,c,r);n.iterGaps((f,d,m)=>Zf(u,f,h,d,m,s)),n.empty&&n.length==0&&Zf(u,0,h,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let r=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),o=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let a=Bf(r,o),c=new ks(r,a,0).goto(n),u=new ks(o,a,0).goto(n);for(;;){if(c.to!=u.to||!ta(c.active,u.active)||c.point&&(!u.point||!c.point.eq(u.point)))return!1;if(c.to>s)return!0;c.next(),u.next()}}static spans(e,t,n,s,r=-1){let o=new ks(e,null,r).goto(t),a=t,c=o.openStart;for(;;){let u=Math.min(o.to,n);if(o.point){let h=o.activeForPoint(o.to),f=o.pointFrom<t?h.length+1:o.point.startSide<0?h.length:Math.min(h.length,c);s.point(a,u,o.point,h,f,o.pointRank),c=Math.min(o.openEnd(u),h.length)}else u>a&&(s.span(a,u,o.active,c),c=o.openEnd(u));if(o.to>n)return c+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Ti;for(let s of e instanceof Kl?[e]:t?fw(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return Re.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=Re.empty;s=s.nextLayer)t=new Re(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}Re.empty=new Re([],[],null,-1);function fw(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(Hl(e,n)>0)return i.slice().sort(Hl);e=n}return i}Re.empty.nextLayer=Re.empty;class Ti{finishChunk(e){this.chunks.push(new Jl(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ti)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Re.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Re.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Bf(i,e,t){let n=new Map;for(let r of i)for(let o=0;o<r.chunk.length;o++)r.chunk[o].maxPoint<=0&&n.set(r.chunk[o],r.chunkPos[o]);let s=new Set;for(let r of e)for(let o=0;o<r.chunk.length;o++){let a=n.get(r.chunk[o]);a!=null&&(t?t.mapPos(a):a)==r.chunkPos[o]&&!(t!=null&&t.touchesRange(a,a+r.chunk[o].length))&&s.add(r.chunk[o])}return s}class If{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class ws{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&s.push(new If(o,t,n,r));return s.length==1?s[0]:new ws(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)ea(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)ea(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ea(this.heap,0)}}}function ea(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class ks{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ws.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Lr(this.active,e),Lr(this.activeTo,e),Lr(this.activeRank,e),this.minActive=Ff(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||s-this.activeTo[t])>0;)t++;Mr(this.active,t,n),Mr(this.activeTo,t,s),Mr(this.activeRank,t,r),e&&Mr(e,t,this.cursor.from),this.minActive=Ff(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),n&&Lr(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Zf(i,e,t,n,s,r){i.goto(e),t.goto(n);let o=n+s,a=n,c=n-e;for(;;){let u=i.to+c-t.to,h=u||i.endSide-t.endSide,f=h<0?i.to+c:t.to,d=Math.min(f,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&ta(i.activeForPoint(i.to),t.activeForPoint(t.to))||r.comparePoint(a,d,i.point,t.point):d>a&&!ta(i.active,t.active)&&r.compareRange(a,d,i.active,t.active),f>o)break;(u||i.openEnd!=t.openEnd)&&r.boundChange&&r.boundChange(f),a=f,h<=0&&i.next(),h>=0&&t.next()}}function ta(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!i[t].eq(e[t]))return!1;return!0}function Lr(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function Mr(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function Ff(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function Mn(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=ht(i,s));return n}function ia(i,e,t,n){for(let s=0,r=0;;){if(r>=e)return s;if(s==i.length)break;r+=i.charCodeAt(s)==9?t-r%t:1,s=ht(i,s)}return n===!0?-1:i.length}const na="ͼ",Uf=typeof Symbol>"u"?"__"+na:Symbol.for(na),sa=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Xf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Wi{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,a,c,u){let h=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return c.push(o[0]+";");for(let m in a){let b=a[m];if(/&/.test(m))r(m.split(/,\s*/).map(w=>o.map(g=>w.replace(/&/,g))).reduce((w,g)=>w.concat(g)),b,c);else if(b&&typeof b=="object"){if(!f)throw new RangeError("The value of a property ("+m+") should be a primitive value.");r(s(m),b,h,d)}else b!=null&&h.push(m.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+b+";")}(h.length||d)&&c.push((n&&!f&&!u?o.map(n):o).join(", ")+" {"+h.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
26
+ `)}static newName(){let e=Xf[Uf]||1;return Xf[Uf]=e+1,na+e.toString(36)}static mount(e,t,n){let s=e[sa],r=n&&n.nonce;s?r&&s.setNonce(r):s=new dw(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let Wf=new Map;class dw{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Wf.get(n);if(r)return e[sa]=r;this.sheet=new s.CSSStyleSheet,Wf.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[sa]=this}mount(e,t){let n=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let a=e[o],c=this.modules.indexOf(a);if(c<r&&c>-1&&(this.modules.splice(c,1),r--,c=-1),c==-1){if(this.modules.splice(r++,0,a),n)for(let u=0;u<a.rules.length;u++)n.insertRule(a.rules[u],s++)}else{for(;r<c;)s+=this.modules[r++].rules.length;s+=a.rules.length,r++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
27
+ `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var qi={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:"'"},xs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},pw=typeof navigator<"u"&&/Mac/.test(navigator.platform),mw=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),dt=0;dt<10;dt++)qi[48+dt]=qi[96+dt]=String(dt);for(var dt=1;dt<=24;dt++)qi[dt+111]="F"+dt;for(var dt=65;dt<=90;dt++)qi[dt]=String.fromCharCode(dt+32),xs[dt]=String.fromCharCode(dt);for(var ra in qi)xs.hasOwnProperty(ra)||(xs[ra]=qi[ra]);function gw(i){var e=pw&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||mw&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?xs:qi)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ie(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)qf(i,arguments[e]);return i}function qf(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)qf(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}let wt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},oa=typeof document<"u"?document:{documentElement:{style:{}}};const la=/Edge\/(\d+)/.exec(wt.userAgent),jf=/MSIE \d/.test(wt.userAgent),aa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wt.userAgent),Dr=!!(jf||aa||la),zf=!Dr&&/gecko\/(\d+)/i.test(wt.userAgent),ca=!Dr&&/Chrome\/(\d+)/.exec(wt.userAgent),Yf="webkitFontSmoothing"in oa.documentElement.style,ua=!Dr&&/Apple Computer/.test(wt.vendor),Gf=ua&&(/Mobile\/\w+/.test(wt.userAgent)||wt.maxTouchPoints>2);var ne={mac:Gf||/Mac/.test(wt.platform),windows:/Win/.test(wt.platform),linux:/Linux|X11/.test(wt.platform),ie:Dr,ie_version:jf?oa.documentMode||6:aa?+aa[1]:la?+la[1]:0,gecko:zf,gecko_version:zf?+(/Firefox\/(\d+)/.exec(wt.userAgent)||[0,0])[1]:0,chrome:!!ca,chrome_version:ca?+ca[1]:0,ios:Gf,android:/Android\b/.test(wt.userAgent),webkit:Yf,webkit_version:Yf?+(/\bAppleWebKit\/(\d+)/.exec(wt.userAgent)||[0,0])[1]:0,safari:ua,safari_version:ua?+(/\bVersion\/(\d+(\.\d+)?)/.exec(wt.userAgent)||[0,0])[1]:0,tabSize:oa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Ss(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function ha(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function vr(i,e){if(!e.anchorNode)return!1;try{return ha(i,e.anchorNode)}catch{return!1}}function Dn(i){return i.nodeType==3?gn(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function Cs(i,e,t,n){return t?Kf(i,e,t,n,-1)||Kf(i,e,t,n,1):!1}function pn(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function Br(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Kf(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:fi(i))){if(i.nodeName=="DIV")return!1;let r=i.parentNode;if(!r||r.nodeType!=1)return!1;e=pn(i)+(s<0?0:1),i=r}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?fi(i):0}else return!1}}function fi(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function As(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function Ow(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function Hf(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function _w(i,e,t,n,s,r,o,a){let c=i.ownerDocument,u=c.defaultView||window;for(let h=i,f=!1;h&&!f;)if(h.nodeType==1){let d,m=h==c.body,b=1,w=1;if(m)d=Ow(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(f=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let y=h.getBoundingClientRect();({scaleX:b,scaleY:w}=Hf(h,y)),d={left:y.left,right:y.left+h.clientWidth*b,top:y.top,bottom:y.top+h.clientHeight*w}}let g=0,p=0;if(s=="nearest")e.top<d.top?(p=e.top-(d.top+o),t>0&&e.bottom>d.bottom+p&&(p=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(p=e.bottom-d.bottom+o,t<0&&e.top-p<d.top&&(p=e.top-(d.top+o)));else{let y=e.bottom-e.top,x=d.bottom-d.top;p=(s=="center"&&y<=x?e.top+y/2-x/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-x+o)-d.top}if(n=="nearest"?e.left<d.left?(g=e.left-(d.left+r),t>0&&e.right>d.right+g&&(g=e.right-d.right+r)):e.right>d.right&&(g=e.right-d.right+r,t<0&&e.left<d.left+g&&(g=e.left-(d.left+r))):g=(n=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:n=="start"==a?e.left-r:e.right-(d.right-d.left)+r)-d.left,g||p)if(m)u.scrollBy(g,p);else{let y=0,x=0;if(p){let O=h.scrollTop;h.scrollTop+=p/w,x=(h.scrollTop-O)*w}if(g){let O=h.scrollLeft;h.scrollLeft+=g/b,y=(h.scrollLeft-O)*b}e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x},y&&Math.abs(y-g)<1&&(n="nearest"),x&&Math.abs(x-p)<1&&(s="nearest")}if(m)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),h=h.assignedSlot||h.parentNode}else if(h.nodeType==11)h=h.host;else break}function bw(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:n}}class yw{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?fi(t):0),n,Math.min(e.focusOffset,n?fi(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let mn=null;ne.safari&&ne.safari_version>=26&&(mn=!1);function Jf(i){if(i.setActive)return i.setActive();if(mn)return i.focus(mn);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(mn==null?{get preventScroll(){return mn={preventScroll:!0},!0}}:void 0),!mn){mn=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],r=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=r&&(n.scrollLeft=r)}}}let ed;function gn(i,e,t=e){let n=ed||(ed=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function vn(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let r=new KeyboardEvent("keydown",s);r.synthetic=!0,i.dispatchEvent(r);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,i.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function ww(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function td(i){for(;i.attributes.length;)i.removeAttributeNode(i.attributes[0])}function kw(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,fi(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=fi(t))}else{if(t==i)return!0;n=pn(t),t=t.parentNode}}function id(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function nd(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=fi(t)}else if(t.parentNode&&!Br(t))n=pn(t),t=t.parentNode;else return null}}function sd(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!Br(t))n=pn(t)+1,t=t.parentNode;else return null}}class Ot{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Ot(e.parentNode,pn(e),t)}static after(e,t){return new Ot(e.parentNode,pn(e)+1,t)}}const fa=[];class De{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,s=null,r;for(let o of this.children){if(o.flags&7){if(!o.dom&&(r=s?s.nextSibling:n.firstChild)){let a=De.get(r);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(e,t),o.flags&=-8}if(r=s?s.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=rd(r);else n.insertBefore(o.dom,r);s=o.dom}for(r=s?s.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=rd(r)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let s=fi(e)==0?0:t==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;s==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?s=-1:s=1),e=r}s<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!De.get(n);)n=n.nextSibling;if(!n)return this.length;for(let s=0,r=0;;s++){let o=this.children[s];if(o.dom==n)return r;r+=o.length+o.breakAfter}}domBoundsAround(e,t,n=0){let s=-1,r=-1,o=-1,a=-1;for(let c=0,u=n,h=n;c<this.children.length;c++){let f=this.children[c],d=u+f.length;if(u<e&&d>t)return f.domBoundsAround(e,t,u);if(d>=e&&s==-1&&(s=c,r=u),u>t&&f.dom.parentNode==this.dom){o=c,a=h;break}h=d,u=d+f.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=fa){this.markDirty();for(let s=e;s<t;s++){let r=this.children[s];r.parent==this&&n.indexOf(r)<0&&r.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let s=0;s<n.length;s++)n[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new od(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,s,r,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}De.prototype.breakAfter=0;function rd(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class od{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function ld(i,e,t,n,s,r,o,a,c){let{children:u}=i,h=u.length?u[e]:null,f=r.length?r[r.length-1]:null,d=f?f.breakAfter:o;if(!(e==n&&h&&!o&&!d&&r.length<2&&h.merge(t,s,r.length?f:null,t==0,a,c))){if(n<u.length){let m=u[n];m&&(s<m.length||m.breakAfter&&(f!=null&&f.breakAfter))?(e==n&&(m=m.split(s),s=0),!d&&f&&m.merge(0,s,f,!0,0,c)?r[r.length-1]=m:((s||m.children.length&&!m.children[0].length)&&m.merge(0,s,null,!1,0,c),r.push(m))):m!=null&&m.breakAfter&&(f?f.breakAfter=1:o=1),n++}for(h&&(h.breakAfter=o,t>0&&(!o&&r.length&&h.merge(t,h.length,r[0],!1,a,0)?h.breakAfter=r.shift().breakAfter:(t<h.length||h.children.length&&h.children[h.children.length-1].length==0)&&h.merge(t,h.length,null,!1,a,0),e++));e<n&&r.length;)if(u[n-1].become(r[r.length-1]))n--,r.pop(),c=r.length?0:a;else if(u[e].become(r[0]))e++,r.shift(),a=r.length?0:c;else break;!r.length&&e&&n<u.length&&!u[e-1].breakAfter&&u[n].merge(0,0,u[e-1],!1,a,c)&&e--,(e<n||r.length)&&i.replaceChildren(e,n,r)}}function ad(i,e,t,n,s,r){let o=i.childCursor(),{i:a,off:c}=o.findPos(t,1),{i:u,off:h}=o.findPos(e,-1),f=e-t;for(let d of n)f+=d.length;i.length+=f,ld(i,u,h,a,c,n,0,s,r)}const xw=256;class Kt extends De{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Kt)||this.length-(t-e)+n.length>xw||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Kt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Ot(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return Sw(this.dom,e,t)}}class Pi extends De{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let s of t)s.setParent(this)}setAttrs(e){if(td(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,s,r,o){return n&&(!(n instanceof Pi&&n.mark.eq(this.mark))||e&&r<=0||t<this.length&&o<=0)?!1:(ad(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,s=-1,r=0;for(let a of this.children){let c=n+a.length;c>e&&t.push(n<e?a.split(e-n):a),s<0&&n>=e&&(s=r),n=c,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Pi(this.mark,t,o)}domAtPos(e){return cd(this,e)}coordsAt(e,t){return hd(this,e,t)}}function Sw(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;e==0&&t<0||e==n&&t>=0?ne.chrome||ne.gecko||(e?(s--,o=1):r<n&&(r++,o=-1)):t<0?s--:r<n&&r++;let a=gn(i,s,r).getClientRects();if(!a.length)return null;let c=a[(o?o<0:t>=0)?0:a.length-1];return ne.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(a,u=>u.width)||c),o?As(c,o<0):c||null}class Qi extends De{static create(e,t,n){return new Qi(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Qi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,s,r,o){return n&&(!(n instanceof Qi)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Qi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Pe.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,s=this.posAtStart;return n?n.slice(s,s+this.length):Pe.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;r=s[a],!(e>0?a==0:a==s.length-1||r.top<r.bottom);a+=o?-1:1);return As(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Bn extends De{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Bn&&e.side==this.side}split(){return new Bn(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Ot.before(this.dom):Ot.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Pe.empty}get isHidden(){return!0}}Kt.prototype.children=Qi.prototype.children=Bn.prototype.children=fa;function cd(i,e){let t=i.dom,{children:n}=i,s=0;for(let r=0;s<n.length;s++){let o=n[s],a=r+o.length;if(!(a==r&&o.getSide()<=0)){if(e>r&&e<a&&o.dom.parentNode==t)return o.domAtPos(e-r);if(e<=r)break;r=a}}for(let r=s;r>0;r--){let o=n[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r<n.length;r++){let o=n[r];if(o.dom.parentNode==t)return o.domAtPos(0)}return new Ot(t,0)}function ud(i,e,t){let n,{children:s}=i;t>0&&e instanceof Pi&&s.length&&(n=s[s.length-1])instanceof Pi&&n.mark.eq(e.mark)?ud(n,e.children[0],t-1):(s.push(e),e.setParent(i)),i.length+=e.length}function hd(i,e,t){let n=null,s=-1,r=null,o=-1;function a(u,h){for(let f=0,d=0;f<u.children.length&&d<=h;f++){let m=u.children[f],b=d+m.length;b>=h&&(m.children.length?a(m,h-d):(!r||r.isHidden&&(t>0||Aw(r,m)))&&(b>h||d==b&&m.getSide()>0)?(r=m,o=h-d):(d<h||d==b&&m.getSide()<0&&!m.isHidden)&&(n=m,s=h-d)),d=b}}a(i,e);let c=(t<0?n:r)||n||r;return c?c.coordsAt(Math.max(0,c==n?s:o),t):Cw(i)}function Cw(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=Dn(e);return t[t.length-1]||null}function Aw(i,e){let t=i.coordsAt(0,1),n=e.coordsAt(0,1);return t&&n&&n.top<t.bottom}function da(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const fd=Object.create(null);function Ir(i,e,t){if(i==e)return!0;i||(i=fd),e||(e=fd);let n=Object.keys(i),s=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of n)if(r!=t&&(s.indexOf(r)==-1||i[r]!==e[r]))return!1;return!0}function pa(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function Tw(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class di{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var kt=function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i}(kt||(kt={}));class me extends dn{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Ts(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new ji(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:r,end:o}=dd(e,t);n=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new ji(e,n,s,t,e.widget||null,!0)}static line(e){return new Ps(e)}static set(e,t=!1){return Re.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}me.none=Re.empty;class Ts extends me{constructor(e){let{start:t,end:n}=dd(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Ts&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Ir(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Ts.prototype.point=!1;class Ps extends me{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Ps&&this.spec.class==e.spec.class&&Ir(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Ps.prototype.mapMode=ft.TrackBefore,Ps.prototype.point=!0;class ji extends me{constructor(e,t,n,s,r,o){super(t,n,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ft.TrackBefore:ft.TrackAfter:ft.TrackDel}get type(){return this.startSide!=this.endSide?kt.WidgetRange:this.startSide<=0?kt.WidgetBefore:kt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ji&&Pw(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}ji.prototype.point=!0;function dd(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function Pw(i,e){return i==e||!!(i&&e&&i.compare(e))}function Zr(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class Je extends De{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,r,o){if(n){if(!(n instanceof Je))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),ad(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new Je;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:s}=this.childPos(e);s&&(t.append(this.children[n].split(s),0),this.children[n].merge(s,this.children[n].length,null,!1,0,0),n++);for(let r=n;r<this.children.length;r++)t.append(this.children[r],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ir(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){ud(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=da(t,this.attrs||{})),n&&(this.attrs=da({class:n},this.attrs||{}))}domAtPos(e){return cd(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(td(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(pa(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&De.get(s)instanceof Pi;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((n=De.get(s))===null||n===void 0?void 0:n.isEditable)==!1&&(!ne.ios||!this.children.some(r=>r instanceof Kt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Kt)||/[^ -~]/.test(n.text))return null;let s=Dn(n.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=hd(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=n.bottom-n.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight<r){let o=(r-s.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}become(e){return e instanceof Je&&this.children.length==0&&e.children.length==0&&Ir(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,s=0;n<e.children.length;n++){let r=e.children[n],o=s+r.length;if(o>=t){if(r instanceof Je)return r;if(o>t)break}s=o+r.breakAfter}return null}}class Ei extends De{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,r,o){return n&&(!(n instanceof Ei)||!this.widget.compare(n.widget)||e>0&&r<=0||t<this.length&&o<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Ot.before(this.dom):Ot.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Ei(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return fa}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Pe.empty}domBoundsAround(){return null}become(e){return e instanceof Ei&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof ma?null:As(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class ma extends di{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Qs{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ei&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Je),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Fr(new Bn(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Ei)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:c}=this.cursor.next(this.skip);if(this.skip=0,c)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e),r=Math.min(s,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Fr(new Kt(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=s<=r?0:t.length}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof ji){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof ji)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ei(n.widget||In.block,a,n));else{let c=Qi.create(n.widget||In.inline,a,a?0:n.startSide),u=this.atCursorPos&&!c.isEditable&&r<=s.length&&(e<t||n.startSide>0),h=!c.isEditable&&(e<t||r>s.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),u&&(f.append(Fr(new Bn(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Fr(c,s),r),this.atCursorPos=h,this.pendingBuffer=h?e<t||r>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,s,r){let o=new Qs(e,t,n,r);return o.openEnd=Re.spans(s,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Fr(i,e){for(let t of e)i=new Pi(t,[i],i.length);return i}class In extends di{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}In.inline=new In("span"),In.block=new In("div");var Fe=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Fe||(Fe={}));const On=Fe.LTR,ga=Fe.RTL;function pd(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const Qw=pd("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Ew=pd("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Oa=Object.create(null),pi=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);Oa[e]=t,Oa[t]=-e}function md(i){return i<=247?Qw[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?Ew[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const $w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class zi{get dir(){return this.level%2?ga:On}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let r=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(r<0||(s!=0?s<0?a.from<t:a.to>t:e[r].level>a.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function gd(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!gd(n.inner,s.inner))return!1}return!0}const Ze=[];function Nw(i,e,t,n,s){for(let r=0;r<=n.length;r++){let o=r?n[r-1].to:e,a=r<n.length?n[r].from:t,c=r?256:s;for(let u=o,h=c,f=c;u<a;u++){let d=md(i.charCodeAt(u));d==512?d=h:d==8&&f==4&&(d=16),Ze[u]=d==4?2:d,d&7&&(f=d),h=d}for(let u=o,h=c,f=c;u<a;u++){let d=Ze[u];if(d==128)u<a-1&&h==Ze[u+1]&&h&24?d=Ze[u]=h:Ze[u]=256;else if(d==64){let m=u+1;for(;m<a&&Ze[m]==64;)m++;let b=u&&h==8||m<t&&Ze[m]==8?f==1?1:8:256;for(let w=u;w<m;w++)Ze[w]=b;u=m-1}else d==8&&f==1&&(Ze[u]=1);h=d,d&7&&(f=d)}}}function Rw(i,e,t,n,s){let r=s==1?2:1;for(let o=0,a=0,c=0;o<=n.length;o++){let u=o?n[o-1].to:e,h=o<n.length?n[o].from:t;for(let f=u,d,m,b;f<h;f++)if(m=Oa[d=i.charCodeAt(f)])if(m<0){for(let w=a-3;w>=0;w-=3)if(pi[w+1]==-m){let g=pi[w+2],p=g&2?s:g&4?g&1?r:s:0;p&&(Ze[f]=Ze[pi[w]]=p),a=w;break}}else{if(pi.length==189)break;pi[a++]=f,pi[a++]=d,pi[a++]=c}else if((b=Ze[f])==2||b==1){let w=b==s;c=w?0:1;for(let g=a-3;g>=0;g-=3){let p=pi[g+2];if(p&2)break;if(w)pi[g+2]|=2;else{if(p&4)break;pi[g+2]|=4}}}}}function Vw(i,e,t,n){for(let s=0,r=n;s<=t.length;s++){let o=s?t[s-1].to:i,a=s<t.length?t[s].from:e;for(let c=o;c<a;){let u=Ze[c];if(u==256){let h=c+1;for(;;)if(h==a){if(s==t.length)break;h=t[s++].to,a=s<t.length?t[s].from:e}else if(Ze[h]==256)h++;else break;let f=r==1,d=(h<e?Ze[h]:n)==1,m=f==d?f?1:2:n;for(let b=h,w=s,g=w?t[w-1].to:i;b>c;)b==g&&(b=t[--w].from,g=w?t[w-1].to:i),Ze[--b]=m;c=h}else r=u,c++}}}function _a(i,e,t,n,s,r,o){let a=n%2?2:1;if(n%2==s%2)for(let c=e,u=0;c<t;){let h=!0,f=!1;if(u==r.length||c<r[u].from){let w=Ze[c];w!=a&&(h=!1,f=w==16)}let d=!h&&a==1?[]:null,m=h?n:n+1,b=c;e:for(;;)if(u<r.length&&b==r[u].from){if(f)break e;let w=r[u];if(!h)for(let g=w.to,p=u+1;;){if(g==t)break e;if(p<r.length&&r[p].from==g)g=r[p++].to;else{if(Ze[g]==a)break e;break}}if(u++,d)d.push(w);else{w.from>c&&o.push(new zi(c,w.from,m));let g=w.direction==On!=!(m%2);ba(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.to}b=w.to}else{if(b==t||(h?Ze[b]!=a:Ze[b]==a))break;b++}d?_a(i,c,b,n+1,s,d,o):c<b&&o.push(new zi(c,b,m)),c=b}else for(let c=t,u=r.length;c>e;){let h=!0,f=!1;if(!u||c>r[u-1].to){let w=Ze[c-1];w!=a&&(h=!1,f=w==16)}let d=!h&&a==1?[]:null,m=h?n:n+1,b=c;e:for(;;)if(u&&b==r[u-1].to){if(f)break e;let w=r[--u];if(!h)for(let g=w.from,p=u;;){if(g==e)break e;if(p&&r[p-1].to==g)g=r[--p].from;else{if(Ze[g-1]==a)break e;break}}if(d)d.push(w);else{w.to<c&&o.push(new zi(w.to,c,m));let g=w.direction==On!=!(m%2);ba(i,g?n+1:n,s,w.inner,w.from,w.to,o),c=w.from}b=w.from}else{if(b==e||(h?Ze[b-1]!=a:Ze[b-1]==a))break;b--}d?_a(i,b,c,n+1,s,d,o):b<c&&o.push(new zi(b,c,m)),c=b}}function ba(i,e,t,n,s,r,o){let a=e%2?2:1;Nw(i,s,r,n,a),Rw(i,s,r,n,a),Vw(s,r,n,a),_a(i,s,r,e,t,n,o)}function Lw(i,e,t){if(!i)return[new zi(0,0,e==ga?1:0)];if(e==On&&!t.length&&!$w.test(i))return Od(i.length);if(t.length)for(;i.length>Ze.length;)Ze[Ze.length]=256;let n=[],s=e==On?0:1;return ba(i,s,s,t,0,i.length,n),n}function Od(i){return[new zi(0,i,0)]}let _d="";function Mw(i,e,t,n,s){var r;let o=n.head-i.from,a=zi.find(e,o,(r=n.bidiLevel)!==null&&r!==void 0?r:-1,n.assoc),c=e[a],u=c.side(s,t);if(o==u){let d=a+=s?1:-1;if(d<0||d>=e.length)return null;c=e[a=d],o=c.side(!s,t),u=c.side(s,t)}let h=ht(i.text,o,c.forward(s,t));(h<c.from||h>c.to)&&(h=u),_d=i.text.slice(Math.min(o,h),Math.max(o,h));let f=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return f&&h==u&&f.level+(s?0:1)<c.level?W.cursor(f.side(!s,t)+i.from,f.forward(s,t)?1:-1,f.level):W.cursor(h+i.from,c.forward(s,t)?-1:1,c.level)}function Dw(i,e,t){for(let n=e;n<t;n++){let s=md(i.charCodeAt(n));if(s==1)return On;if(s==2||s==4)return ga}return On}const bd=ae.define(),yd=ae.define(),wd=ae.define(),kd=ae.define(),ya=ae.define(),xd=ae.define(),Sd=ae.define(),wa=ae.define(),ka=ae.define(),Cd=ae.define({combine:i=>i.some(e=>e)}),Ad=ae.define({combine:i=>i.some(e=>e)}),Td=ae.define();class Zn{constructor(e,t="nearest",n="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new Zn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Zn(W.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Ur=ke.define({map:(i,e)=>i.map(e)}),Pd=ke.define();function Tt(i,e,t){let n=i.facet(kd);n.length?n[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const $i=ae.define({combine:i=>i.length?i[0]:!0});let vw=0;const Fn=ae.define({combine(i){return i.filter((e,t)=>{for(let n=0;n<t;n++)if(i[n].plugin==e.plugin)return!1;return!0})}});class Ge{constructor(e,t,n,s,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(Fn.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Fn.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:r,decorations:o}=t||{};return new Ge(vw++,e,n,s,a=>{let c=[];return o&&c.push(Es.of(u=>{let h=u.plugin(a);return h?o(h):me.none})),r&&c.push(r(a)),c})}static fromClass(e,t){return Ge.define((n,s)=>new e(n,s),t)}}class xa{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Tt(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Tt(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Tt(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Qd=ae.define(),Sa=ae.define(),Es=ae.define(),Ed=ae.define(),$s=ae.define(),$d=ae.define();function Nd(i,e){let t=i.state.facet($d);if(!t.length)return t;let n=t.map(r=>r instanceof Function?r(i):r),s=[];return Re.spans(n,e.from,e.to,{point(){},span(r,o,a,c){let u=r-e.from,h=o-e.from,f=s;for(let d=a.length-1;d>=0;d--,c--){let m=a[d].spec.bidiIsolate,b;if(m==null&&(m=Dw(e.text,u,h)),c>0&&f.length&&(b=f[f.length-1]).to==u&&b.direction==m)b.to=h,f=b.inner;else{let w={from:u,to:h,direction:m,inner:[]};f.push(w),f=w.inner}}}}),s}const Rd=ae.define();function Ca(i){let e=0,t=0,n=0,s=0;for(let r of i.state.facet(Rd)){let o=r(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:n,bottom:s}}const Ns=ae.define();class Ft{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new Ft(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,r=0,o=0,a=0;;s++){let c=s==e.length?null:e[s],u=o-a,h=c?c.fromB:1e9;for(;r<t.length&&t[r]<h;){let f=t[r],d=t[r+1],m=Math.max(a,f),b=Math.min(h,d);if(m<=b&&new Ft(m+u,b+u,m,b).addToSet(n),d>h)break;r+=2}if(!c)return n;new Ft(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),o=c.toA,a=c.toB}}}class Xr{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=it.empty(this.startState.doc.length);for(let r of n)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,a,c)=>s.push(new Ft(r,o,a,c))),this.changedRanges=s}static create(e,t,n){return new Xr(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Vd extends De{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=me.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Je],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ft(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:u,toA:h})=>h<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!Ww(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?Iw(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:h}=this.hasComposition;n=new Ft(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(ne.ie||ne.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),c=Uw(o,a,e.changes);return n=Ft.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=ne.chrome||ne.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Ei&&o.widget instanceof ma&&r.push(o.dom);s.updateGaps(r)}updateChildren(e,t,n){let s=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let o=s.length-1;;o--){let a=o>=0?s[o]:null;if(!a)break;let{fromA:c,toA:u,fromB:h,toB:f}=a,d,m,b,w;if(n&&n.range.fromB<f&&n.range.toB>h){let O=Qs.build(this.view.state.doc,h,n.range.fromB,this.decorations,this.dynamicDecorationMap),Q=Qs.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);m=O.breakAtStart,b=O.openStart,w=Q.openEnd;let S=this.compositionView(n);Q.breakAtStart?S.breakAfter=1:Q.content.length&&S.merge(S.length,S.length,Q.content[0],!1,Q.openStart,0)&&(S.breakAfter=Q.content[0].breakAfter,Q.content.shift()),O.content.length&&S.merge(0,0,O.content[O.content.length-1],!0,0,O.openEnd)&&O.content.pop(),d=O.content.concat(S).concat(Q.content)}else({content:d,breakAtStart:m,openStart:b,openEnd:w}=Qs.build(this.view.state.doc,h,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:p}=r.findPos(u,1),{i:y,off:x}=r.findPos(c,-1);ld(this,y,x,g,p,d,m,b,w)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(Pd)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Kt(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Pi(s,[t],t.length);let n=new Je;return n.append(t,0),n}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(o);let a=De.get(r);a&&a!=o&&(a.dom=null),o.setDOM(r)},n=this.childPos(e.range.fromB,1),s=this.children[n.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)n=s.childPos(n.off,1),s=s.children[n.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,s=n==this.dom,r=!s&&!(this.view.state.facet($i)||this.dom.tabIndex>-1)&&vr(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(ne.gecko&&a.empty&&!this.hasComposition&&Bw(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=u=new Ot(f,0),o=!0}let h=this.view.observer.selectionRange;(o||!h.focusNode||(!Cs(c.node,c.offset,h.anchorNode,h.anchorOffset)||!Cs(u.node,u.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,a))&&(this.view.observer.ignore(()=>{ne.android&&ne.chrome&&this.dom.contains(h.focusNode)&&Xw(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Ss(this.view.root);if(f)if(a.empty){if(ne.gecko){let d=Zw(c.node,c.offset);if(d&&d!=3){let m=(d==1?nd:sd)(c.node,c.offset);m&&(c=new Ot(m.node,m.offset))}}f.collapse(c.node,c.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(u.node,u.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,u]=[u,c]),d.setEnd(u.node,u.offset),d.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new Ot(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new Ot(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Cs(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Ss(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=Je.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let c=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!c||!u||c.bottom>u.top)return;let h=this.domAtPos(t.head+t.assoc);n.collapse(h.node,h.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(s,r)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let s=e.offset;!n&&s<t.childNodes.length;s++){let r=De.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(0))}for(let s=e.offset-1;!n&&s>=0;s--){let r=De.get(t.childNodes[s]);r instanceof Je&&(n=r.domAtPos(r.length))}return n?new Ot(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=De.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(n<s.length||s instanceof Je)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,s=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],c=r-a.breakAfter,u=c-a.length;if(c<e)break;if(u<=e&&(u<e||a.covers(-1))&&(c>e||a.covers(1))&&(!n||a instanceof Je&&!(n instanceof Je&&t>=0)))n=a,s=u;else if(n&&u==e&&c==e&&a instanceof Ei&&Math.abs(t)<2){if(a.deco.startSide<0)break;o&&(n=null)}r=u}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),s=this.children[t];if(!(s instanceof Je))return null;for(;s.children.length;){let{i:a,off:c}=s.childPos(n,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}n=c}if(!(s instanceof Kt))return null;let r=ht(s.text,n);if(r==n)return null;let o=gn(s.dom,n,r).getClientRects();for(let a=0;a<o.length;a++){let c=o[a];if(a==o.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==Fe.LTR;for(let u=0,h=0;h<this.children.length;h++){let f=this.children[h],d=u+f.length;if(d>s)break;if(u>=n){let m=f.dom.getBoundingClientRect();if(t.push(m.height),o){let b=f.dom.lastChild,w=b?Dn(b):[];if(w.length){let g=w[w.length-1],p=c?g.right-m.left:m.right-g.left;p>a&&(a=p,this.minWidth=r,this.minWidthFrom=u,this.minWidthTo=d)}}}u=d+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Fe.RTL:Fe.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Je){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Dn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new od(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(me.replace({widget:new ma(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return me.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Es).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),n=!1,s=this.view.state.facet(Ed).map((r,o)=>{let a=typeof r=="function";return a&&(n=!0),a?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(Re.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let u of this.view.state.facet(Td))try{if(u(this.view,e.range,e))return!0}catch(h){Tt(this.view.state,h,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let r=Ca(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;_w(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Fe.LTR)}lineHasWidget(e){let{i:t}=this.childCursor().findPos(e);if(t==this.children.length)return!1;let n=s=>s instanceof Qi||s.children.some(n);return n(this.children[t])}}function Bw(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function Ld(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=nd(t.focusNode,t.focusOffset),s=sd(t.focusNode,t.focusOffset),r=n||s;if(s&&n&&s.node!=n.node){let a=De.get(s.node);if(!a||a instanceof Kt&&a.text!=s.node.nodeValue)r=s;else if(i.docView.lastCompositionAfterCursor){let c=De.get(n.node);!c||c instanceof Kt&&c.text!=n.node.nodeValue||(r=s)}}if(i.docView.lastCompositionAfterCursor=r!=n,!r)return null;let o=e-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}function Iw(i,e,t){let n=Ld(i,t);if(!n)return null;let{node:s,from:r,to:o}=n,a=s.nodeValue;if(/[\n\r]/.test(a)||i.state.doc.sliceString(n.from,n.to)!=a)return null;let c=e.invertedDesc,u=new Ft(c.mapPos(r),c.mapPos(o),r,o),h=[];for(let f=s.parentNode;;f=f.parentNode){let d=De.get(f);if(d instanceof Pi)h.push({node:f,deco:d.mark});else{if(d instanceof Je||f.nodeName=="DIV"&&f.parentNode==i.contentDOM)return{range:u,text:s,marks:h,line:f};if(f!=i.contentDOM)h.push({node:f,deco:new Ts({inclusive:!0,attributes:Tw(f),tagName:f.tagName.toLowerCase()})});else return null}}}function Zw(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let Fw=class{constructor(){this.changes=[]}compareRange(e,t){Zr(e,t,this.changes)}comparePoint(e,t){Zr(e,t,this.changes)}boundChange(e){Zr(e,e,this.changes)}};function Uw(i,e,t){let n=new Fw;return Re.compare(i,e,t,n),n.changes}function Xw(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function Ww(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}function qw(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),r=e-s.from;if(s.length==0)return W.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,a=r;t<0?o=ht(s.text,r,!1):a=ht(s.text,r);let c=n(s.text.slice(o,a));for(;o>0;){let u=ht(s.text,o,!1);if(n(s.text.slice(u,o))!=c)break;o=u}for(;a<s.length;){let u=ht(s.text,a);if(n(s.text.slice(a,u))!=c)break;a=u}return W.range(o+s.from,a+s.from)}function jw(i,e){return e.left>i?e.left-i:Math.max(0,i-e.right)}function zw(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Aa(i,e){return i.top<e.bottom-1&&i.bottom>e.top+1}function Md(i,e){return e<i.top?{top:e,left:i.left,right:i.right,bottom:i.bottom}:i}function Dd(i,e){return e>i.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function Ta(i,e,t){let n,s,r,o,a=!1,c,u,h,f;for(let b=i.firstChild;b;b=b.nextSibling){let w=Dn(b);for(let g=0;g<w.length;g++){let p=w[g];s&&Aa(s,p)&&(p=Md(Dd(p,s.bottom),s.top));let y=jw(e,p),x=zw(t,p);if(y==0&&x==0)return b.nodeType==3?vd(b,e,t):Ta(b,e,t);(!n||o>x||o==x&&r>y)&&(n=b,s=p,r=y,o=x,a=y?e<p.left?g>0:g<w.length-1:!0),y==0?t>p.bottom&&(!h||h.bottom<p.bottom)?(c=b,h=p):t<p.top&&(!f||f.top>p.top)&&(u=b,f=p):h&&Aa(h,p)?h=Dd(h,p.bottom):f&&Aa(f,p)&&(f=Md(f,p.top))}}if(h&&h.bottom>=t?(n=c,s=h):f&&f.top<=t&&(n=u,s=f),!n)return{node:i,offset:0};let d=Math.max(s.left,Math.min(s.right,e));if(n.nodeType==3)return vd(n,d,t);if(a&&n.contentEditable!="false")return Ta(n,d,t);let m=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(s.left+s.right)/2?1:0);return{node:i,offset:m}}function vd(i,e,t){let n=i.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;a<n;a++){let c=gn(i,a,a+1).getClientRects();for(let u=0;u<c.length;u++){let h=c[u];if(h.top==h.bottom)continue;o||(o=e-h.left);let f=(h.top>t?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&f<r){let d=e>=(h.left+h.right)/2,m=d;if(ne.chrome||ne.gecko){let b=gn(i,a).getBoundingClientRect();Math.abs(b.left-h.right)<.1&&(m=!d)}if(f<=0)return{node:i,offset:a+(m?1:0)};s=a+(m?1:0),r=f}}}return{node:i,offset:s>-1?s:o>0?i.nodeValue.length:0}}function Bd(i,e,t,n=-1){var s,r;let o=i.contentDOM.getBoundingClientRect(),a=o.top+i.viewState.paddingTop,c,{docHeight:u}=i.viewState,{x:h,y:f}=e,d=f-a;if(d<0)return 0;if(d>u)return i.state.doc.length;for(let O=i.viewState.heightOracle.textHeight/2,Q=!1;c=i.elementAtHeight(d),c.type!=kt.Text;)for(;d=n>0?c.bottom+O:c.top-O,!(d>=0&&d<=u);){if(Q)return t?null:0;Q=!0,n=-n}f=a+d;let m=c.from;if(m<i.viewport.from)return i.viewport.from==0?0:t?null:Id(i,o,c,h,f);if(m>i.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Id(i,o,c,h,f);let b=i.dom.ownerDocument,w=i.root.elementFromPoint?i.root:b,g=w.elementFromPoint(h,f);g&&!i.contentDOM.contains(g)&&(g=null),g||(h=Math.max(o.left+1,Math.min(o.right-1,h)),g=w.elementFromPoint(h,f),g&&!i.contentDOM.contains(g)&&(g=null));let p,y=-1;if(g&&((s=i.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(b.caretPositionFromPoint){let O=b.caretPositionFromPoint(h,f);O&&({offsetNode:p,offset:y}=O)}else if(b.caretRangeFromPoint){let O=b.caretRangeFromPoint(h,f);O&&({startContainer:p,startOffset:y}=O)}p&&(!i.contentDOM.contains(p)||ne.safari&&Yw(p,y,h)||ne.chrome&&Gw(p,y,h))&&(p=void 0),p&&(y=Math.min(fi(p),y))}if(!p||!i.docView.dom.contains(p)){let O=Je.find(i.docView,m);if(!O)return d>c.top+c.height/2?c.to:c.from;({node:p,offset:y}=Ta(O.dom,h,f))}let x=i.docView.nearest(p);if(!x)return null;if(x.isWidget&&((r=x.dom)===null||r===void 0?void 0:r.nodeType)==1){let O=x.dom.getBoundingClientRect();return e.y<O.top||e.y<=O.bottom&&e.x<=(O.left+O.right)/2?x.posAtStart:x.posAtEnd}else return x.localPosFromDOM(p,y)+x.posAtStart}function Id(i,e,t,n,s){let r=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let a=i.viewState.heightOracle.textHeight,c=Math.floor((s-t.top-(i.defaultLineHeight-a)*.5)/a);r+=c*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+ia(o,r,i.state.tabSize)}function Zd(i,e,t){let n,s=i;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(;;){let r=s.nextSibling;if(r){if(r.nodeName=="BR")break;return!1}else{let o=s.parentNode;if(!o||o.nodeName=="DIV")break;s=o}}return gn(i,n-1,n).getBoundingClientRect().right>t}function Yw(i,e,t){return Zd(i,e,t)}function Gw(i,e,t){if(e!=0)return Zd(i,e,t);for(let s=i;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let n=i.nodeType==1?i.getBoundingClientRect():gn(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function Pa(i,e,t){let n=i.lineBlockAt(e);if(Array.isArray(n.type)){let s;for(let r of n.type){if(r.from>e)break;if(!(r.to<e)){if(r.from<e&&r.to>e)return r;(!s||r.type==kt.Text&&(s.type!=r.type||(t<0?r.from<e:r.to>e)))&&(s=r)}}return s||n}return n}function Kw(i,e,t,n){let s=Pa(i,e.head,e.assoc||-1),r=!n||s.type!=kt.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=i.dom.getBoundingClientRect(),a=i.textDirectionAt(s.from),c=i.posAtCoords({x:t==(a==Fe.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(c!=null)return W.cursor(c,t?-1:1)}return W.cursor(t?s.to:s.from,t?-1:1)}function Fd(i,e,t,n){let s=i.state.doc.lineAt(e.head),r=i.bidiSpans(s),o=i.textDirectionAt(s.from);for(let a=e,c=null;;){let u=Mw(s,r,o,a,t),h=_d;if(!u){if(s.number==(t?i.state.doc.lines:1))return a;h=`
28
+ `,s=i.state.doc.line(s.number+(t?1:-1)),r=i.bidiSpans(s),u=i.visualLineSide(s,!t)}if(c){if(!c(h))return a}else{if(!n)return u;c=n(h)}a=u}}function Hw(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return r=>{let o=n(r);return s==We.Space&&(s=o),s==o}}function Jw(i,e,t,n){let s=e.head,r=t?1:-1;if(s==(t?i.state.doc.length:0))return W.cursor(s,e.assoc);let o=e.goalColumn,a,c=i.contentDOM.getBoundingClientRect(),u=i.coordsAtPos(s,e.assoc||-1),h=i.documentTop;if(u)o==null&&(o=u.left-c.left),a=r<0?u.top:u.bottom;else{let m=i.viewState.lineBlockAt(s);o==null&&(o=Math.min(c.right-c.left,i.defaultCharacterWidth*(s-m.from))),a=(r<0?m.top:m.bottom)+h}let f=c.left+o,d=n??i.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let b=a+(d+m)*r,w=Bd(i,{x:f,y:b},!1,r);if(b<c.top||b>c.bottom||(r<0?w<s:w>s)){let g=i.docView.coordsForChar(w),p=!g||b<g.top?-1:1;return W.cursor(w,p,void 0,o)}}}function Rs(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(r,o,a)=>{if(e>r&&e<o){let c=n||t||(e-r<o-e?-1:1);e=c<0?r:o,n=c}});if(!n)return e}}function Ud(i,e){let t=null;for(let n=0;n<e.ranges.length;n++){let s=e.ranges[n],r=null;if(s.empty){let o=Rs(i,s.from,0);o!=s.from&&(r=W.cursor(o,-1))}else{let o=Rs(i,s.from,-1),a=Rs(i,s.to,1);(o!=s.from||a!=s.to)&&(r=W.range(s.from==s.anchor?o:a,s.from==s.head?o:a))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?W.create(t,e.mainIndex):e}function Qa(i,e,t){let n=Rs(i.state.facet($s).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:W.cursor(n,n<t.from?1:-1)}const Vs="￿";class ek{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Ce.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Vs}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let r=this.text.length;this.readNode(s);let o=s.nextSibling;if(o==t)break;let a=De.get(s),c=De.get(o);(a&&c?a.breakAfter:(a?a.breakAfter:Br(s))||Br(o)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>r)&&!ik(o,t)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=s.exec(t))&&(r=a.index,o=a[0].length),this.append(t.slice(n,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);n=r+o}}readNode(e){if(e.cmIgnore)return;let t=De.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(tk(e,n.node,n.offset)?t:0))}}function tk(i,e,t){for(;;){if(!e||t<fi(e))return!1;if(e==i)return!0;t=pn(e)+1,e=e.parentNode}}function ik(i,e){let t;for(;!(i==e||!i);i=i.nextSibling){let n=De.get(i);if(!(n!=null&&n.isWidget||i.cmIgnore))return!1;n&&(t||(t=[])).push(n)}if(t)for(let n of t){let s=n.overrideDOMText;if(s!=null&&s.length)return!1}return!0}class Xd{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class nk{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=r||o?[]:rk(e),c=new ek(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=ok(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!ha(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!ha(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),h=e.viewport;if((ne.ios||ne.chrome)&&e.state.selection.main.empty&&c!=u&&(h.from>0||h.to<e.state.doc.length)){let f=Math.min(c,u),d=Math.max(c,u),m=h.from-f,b=h.to-d;(m==0||m==1||f==0)&&(b==0||b==-1||d==e.state.doc.length)&&(c=0,u=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(W.range(u,c)):this.newSel=W.single(u,c)}}}function Wd(i,e){let t,{newSel:n}=e,s=i.state.selection.main,r=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,c=s.from,u=null;(r===8||ne.android&&e.text.length<a-o)&&(c=s.to,u="end");let h=qd(i.state.doc.sliceString(o,a,Vs),e.text,c-o,u);h&&(ne.chrome&&r==13&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==Vs+Vs&&h.toB--,t={from:o+h.from,to:o+h.toA,insert:Pe.of(e.text.slice(h.from,h.toB).split(Vs))})}else n&&(!i.hasFocus&&i.state.facet($i)||n.main.eq(s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(ne.mac||ne.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=W.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:Pe.of([t.insert.toString().replace("."," ")])}):t&&t.from>=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:i.state.doc.lineAt(s.from).to<s.to&&i.docView.lineHasWidget(s.to)&&i.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.state.toText(i.inputState.insertingText)}:ne.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
29
+ `&&i.lineWrapping&&(n&&(n=W.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:Pe.of([" "])}),t)return Ea(i,t,n,r);if(n&&!n.main.eq(s)){let o=!1,a="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),a=i.inputState.lastSelectionOrigin,a=="select.pointer"&&(n=Ud(i.state.facet($s).map(c=>c(i)),n))),i.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}else return!1}function Ea(i,e,t,n=-1){if(ne.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(ne.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&vn(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&vn(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&vn(i.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,a=()=>o||(o=sk(i,e,t));return i.state.facet(xd).some(c=>c(i,e.from,e.to,r,a))||i.dispatch(a()),!0}function sk(i,e,t){let n,s=i.state,r=s.selection.main,o=-1;if(e.from==e.to&&e.from<r.from||e.from>r.to){let c=e.from<r.from?-1:1,u=c<0?r.from:r.to,h=Rs(s.facet($s).map(f=>f(i)),u,c);e.from==h&&(o=h)}if(o>-1)n={changes:e,selection:W.cursor(e.from+e.insert.length,-1)};else if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let c=r.from<e.from?s.sliceDoc(r.from,e.from):"",u=r.to>e.to?s.sliceDoc(e.to,r.to):"";n=s.replaceSelection(i.state.toText(c+e.insert.sliceString(0,void 0,i.state.lineBreak)+u))}else{let c=s.changes(e),u=t&&t.main.to<=c.newLength?t.main:void 0;if(s.selection.ranges.length>1&&(i.inputState.composing>=0||i.inputState.compositionPendingChange)&&e.to<=r.to+10&&e.to>=r.to-10){let h=i.state.sliceDoc(e.from,e.to),f,d=t&&Ld(i,t.main.head);if(d){let b=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-b}}else f=i.state.doc.lineAt(r.head);let m=r.to-e.to;n=s.changeByRange(b=>{if(b.from==r.from&&b.to==r.to)return{changes:c,range:u||b.map(c)};let w=b.to-m,g=w-h.length;if(i.state.sliceDoc(g,w)!=h||w>=f.from&&g<=f.to)return{range:b};let p=s.changes({from:g,to:w,insert:e.insert}),y=b.to-r.to;return{changes:p,range:u?W.range(Math.max(0,u.anchor+y),Math.max(0,u.head+y)):b.map(p)}})}else n={changes:c,selection:u&&s.selection.replaceRange(u)}}let a="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,a+=".compose",i.inputState.compositionFirstChange&&(a+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:a,scrollIntoView:!0})}function qd(i,e,t,n){let s=Math.min(i.length,e.length),r=0;for(;r<s&&i.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&i.length==e.length)return null;let o=i.length,a=e.length;for(;o>0&&a>0&&i.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(n=="end"){let c=Math.max(0,r-Math.min(o,a));t-=o+c-r}if(o<r&&i.length<e.length){let c=t<=r&&t>=o?r-t:0;r-=c,a=r+(a-o),o=r}else if(a<r){let c=t<=r&&t>=a?r-t:0;r-=c,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}function rk(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}=i.observer.selectionRange;return t&&(e.push(new Xd(t,n)),(s!=t||r!=n)&&e.push(new Xd(s,r))),e}function ok(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?W.single(t+e,n+e):null}class lk{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ne.safari&&e.contentDOM.addEventListener("input",()=>null),ne.gecko&&xk(e.contentDOM.ownerDocument)}handleEvent(e){!mk(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ak(e),n=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,a=n[r];a&&o!=!a.handlers.length&&(s.removeEventListener(r,this.handleEvent),a=null),a||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in n)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Yd.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ne.android&&ne.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return ne.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=zd.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||ck.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,vn(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ne.safari&&!ne.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function jd(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){Tt(t.state,s)}}}function ak(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec,r=s&&s.plugin.domEventHandlers,o=s&&s.plugin.domEventObservers;if(r)for(let a in r){let c=r[a];c&&t(a).handlers.push(jd(n.value,c))}if(o)for(let a in o){let c=o[a];c&&t(a).observers.push(jd(n.value,c))}}for(let n in Ht)t(n).handlers.push(Ht[n]);for(let n in Ut)t(n).observers.push(Ut[n]);return e}const zd=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ck="dthko",Yd=[16,17,18,20,91,92,224,225],Wr=6;function qr(i){return Math.max(0,i)*.7+8}function uk(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class hk{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=bw(e.contentDOM),this.atoms=e.state.facet($s).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Ce.allowMultipleSelections)&&fk(e,t),this.dragging=pk(e,t)&&sp(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&uk(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,r=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=Ca(this.view);e.clientX-c.left<=s+Wr?t=-qr(s-e.clientX):e.clientX+c.right>=o-Wr&&(t=qr(e.clientX-o)),e.clientY-c.top<=r+Wr?n=-qr(r-e.clientY):e.clientY+c.bottom>=a-Wr&&(n=qr(e.clientY-a)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Ud(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function fk(i,e){let t=i.state.facet(bd);return t.length?t[0](e):ne.mac?e.metaKey:e.ctrlKey}function dk(i,e){let t=i.state.facet(yd);return t.length?t[0](e):ne.mac?!e.altKey:!e.ctrlKey}function pk(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=Ss(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let r=0;r<s.length;r++){let o=s[r];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function mk(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=De.get(t))&&n.ignoreEvent(e))return!1;return!0}const Ht=Object.create(null),Ut=Object.create(null),Gd=ne.ie&&ne.ie_version<15||ne.ios&&ne.webkit_version<604;function gk(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),Kd(i,t.value)},50)}function jr(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function Kd(i,e){e=jr(i.state,wa,e);let{state:t}=i,n,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if($a!=null&&t.selection.ranges.every(c=>c.empty)&&$a==r.toString()){let c=-1;n=t.changeByRange(u=>{let h=t.doc.lineAt(u.from);if(h.from==c)return{range:u};c=h.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:f},range:W.cursor(u.from+f.length)}})}else o?n=t.changeByRange(c=>{let u=r.line(s++);return{changes:{from:c.from,to:c.to,insert:u.text},range:W.cursor(c.from+u.length)}}):n=t.replaceSelection(r);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ut.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft},Ht.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1),Ut.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")},Ut.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")},Ht.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(wd))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=bk(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new hk(i,e,t,n)),n&&i.observer.ignore(()=>{Jf(i.contentDOM);let r=i.root.activeElement;r&&!r.contains(i.contentDOM)&&r.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}else i.inputState.setSelectionOrigin("select.pointer");return!1};function Hd(i,e,t,n){if(n==1)return W.cursor(e,t);if(n==2)return qw(i.state,e,t);{let s=Je.find(i.docView,e),r=i.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,a=s?s.posAtEnd:r.to;return a<i.state.doc.length&&a==r.to&&a++,W.range(o,a)}}let Jd=(i,e,t)=>e>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function Ok(i,e,t,n){let s=Je.find(i.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Jd(t,n,o))return-1;let a=s.coordsAt(r,1);return a&&Jd(t,n,a)?1:o&&o.bottom>=n?-1:1}function ep(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:Ok(i,t,e.clientX,e.clientY)}}const _k=ne.ie&&ne.ie_version<=11;let tp=null,ip=0,np=0;function sp(i){if(!_k)return i.detail;let e=tp,t=np;return tp=i,np=Date.now(),ip=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(ip+1)%3:1}function bk(i,e){let t=ep(i,e),n=sp(e),s=i.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,a){let c=ep(i,r),u,h=Hd(i,c.pos,c.bias,n);if(t.pos!=c.pos&&!o){let f=Hd(i,t.pos,t.bias,n),d=Math.min(f.from,h.from),m=Math.max(f.to,h.to);h=d<h.from?W.range(d,m):W.range(m,d)}return o?s.replaceRange(s.main.extend(h.from,h.to)):a&&n==1&&s.ranges.length>1&&(u=yk(s,c.pos))?u:a?s.addRange(h):W.create([h])}}}function yk(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return W.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}Ht.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=W.range(r,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",jr(i.state,ka,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Ht.dragend=i=>(i.inputState.draggedContent=null,!1);function rp(i,e,t,n){if(t=jr(i.state,wa,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=i.inputState,o=n&&r&&dk(i,e)?{from:r.from,to:r.to}:null,a={from:s,insert:t},c=i.state.changes(o?[o,a]:a);i.focus(),i.dispatch({changes:c,selection:{anchor:c.mapPos(s,-1),head:c.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}Ht.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,r=()=>{++s==t.length&&rp(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=r,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),r()},a.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return rp(i,e,n,!0),!0}return!1},Ht.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=Gd?null:e.clipboardData;return t?(Kd(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(gk(i),!1)};function wk(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function kk(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of i.selection.ranges){let o=i.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),s=o.number}n=!0}return{text:jr(i,ka,e.join(i.lineBreak)),ranges:t,linewise:n}}let $a=null;Ht.copy=Ht.cut=(i,e)=>{let{text:t,ranges:n,linewise:s}=kk(i.state);if(!t&&!s)return!1;$a=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let r=Gd?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(wk(i,t),!1)};const op=Ai.define();function lp(i,e){let t=[];for(let n of i.facet(Sd)){let s=n(i,e);s&&t.push(s)}return t.length?i.update({effects:t,annotations:op.of(!0)}):null}function ap(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=lp(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ut.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),ap(i)},Ut.blur=i=>{i.observer.clearSelectionRange(),ap(i)},Ut.compositionstart=Ut.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))},Ut.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,ne.chrome&&ne.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))},Ut.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()},Ht.beforeinput=(i,e)=>{var t,n;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(i.inputState.insertingText=e.data,i.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&i.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let a=o[0],c=i.posAtDOM(a.startContainer,a.startOffset),u=i.posAtDOM(a.endContainer,a.endOffset);return Ea(i,{from:c,to:u,insert:i.state.toText(r)},null),!0}}let s;if(ne.chrome&&ne.android&&(s=zd.find(r=>r.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return ne.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),ne.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ut.compositionend(i,e),20),!1};const cp=new Set;function xk(i){cp.has(i)||(cp.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const up=["pre-wrap","normal","pre-line","break-spaces"];let Un=!1;function hp(){Un=!1}class Sk{constructor(e){this.lineWrapping=e,this.doc=Pe.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return up.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,r,o){let a=up.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=r,c){this.heightSamples={};for(let u=0;u<o.length;u++){let h=o[u];h<0?u++:this.heightSamples[Math.floor(h*10)]=!0}}return c}}class Ck{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class mi{constructor(e,t,n,s,r){this.from=e,this.length=t,this.top=n,this.height=s,this._content=r}get type(){return typeof this._content=="number"?kt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof ji?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new mi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ue=function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i}(Ue||(Ue={}));const zr=.001;class xt{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>zr&&(Un=!0),this.height=e)}replace(e,t,n){return xt.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let r=this,o=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:c,toA:u,fromB:h,toB:f}=s[a],d=r.lineAt(c,Ue.ByPosNoHeight,n.setDoc(t),0,0),m=d.to>=u?d:r.lineAt(u,Ue.ByPosNoHeight,n,0,0);for(f+=m.to-u,u=m.to;a>0&&d.from<=s[a-1].toA;)c=s[a-1].fromA,h=s[a-1].fromB,a--,c<d.from&&(d=r.lineAt(c,Ue.ByPosNoHeight,n,0,0));h+=d.from-c,c=d.from;let b=Na.build(n.setDoc(o),e,h,f);r=Yr(r,r.replace(c,u,b))}return r.updateHeight(n,0)}static empty(){return new Vt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,r=0;for(;;)if(t==n)if(s>r*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,s-=a.size}else if(r>s*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,r-=a.size}else break;else if(s<r){let a=e[t++];a&&(s+=a.size)}else{let a=e[--n];a&&(r+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new Ak(xt.of(e.slice(0,t)),o,xt.of(e.slice(n)))}}function Yr(i,e){return i==e?i:(i.constructor!=e.constructor&&(Un=!0),e)}xt.prototype.size=1;class fp extends xt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,s){return new mi(s,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,s,r){return this.blockAt(0,n,s,r)}forEachLine(e,t,n,s,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,s,r))}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Vt extends fp{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new mi(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Vt||s instanceof pt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof pt?s=new Vt(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):xt.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class pt extends xt{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-n+1,o,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*r);o=c/r,this.length>r+1&&(a=(this.height-c)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:s,perLine:o,perChar:a}}blockAt(e,t,n,s){let{firstLine:r,lastLine:o,perLine:a,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let u=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),h=t.doc.lineAt(u),f=a+h.length*c,d=Math.max(n,e-f/2);return new mi(h.from,h.length,d,f,0)}else{let u=Math.max(0,Math.min(o-r,Math.floor((e-n)/a))),{from:h,length:f}=t.doc.line(r+u);return new mi(h,f,n+a*u,a,0)}}lineAt(e,t,n,s,r){if(t==Ue.ByHeight)return this.blockAt(e,n,s,r);if(t==Ue.ByPosNoHeight){let{from:m,to:b}=n.doc.lineAt(e);return new mi(m,b-m,0,0,0)}let{firstLine:o,perLine:a,perChar:c}=this.heightMetrics(n,r),u=n.doc.lineAt(e),h=a+u.length*c,f=u.number-o,d=s+a*f+c*(u.from-r-f);return new mi(u.from,u.length,Math.max(s,Math.min(d,s+this.height-h)),h,0)}forEachLine(e,t,n,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:a,perLine:c,perChar:u}=this.heightMetrics(n,r);for(let h=e,f=s;h<=t;){let d=n.doc.lineAt(h);if(h==e){let b=d.number-a;f+=c*b+u*(e-r-b)}let m=c+u*d.length;o(new mi(d.from,d.length,f,m,0)),f+=m,h=d.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let r=n[n.length-1];r instanceof pt?n[n.length-1]=new pt(r.length+s):n.push(null,new pt(s-1))}if(e>0){let r=n[0];r instanceof pt?n[0]=new pt(e+r.length):n.unshift(new pt(e-1),null)}return xt.of(n)}decomposeLeft(e,t){t.push(new pt(e-1),null)}decomposeRight(e,t){t.push(null,new pt(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],a=Math.max(t,s.from),c=-1;for(s.from>t&&o.push(new pt(s.from-t-1).updateHeight(e,t));a<=r&&s.more;){let h=e.doc.lineAt(a).length;o.length&&o.push(null);let f=s.heights[s.index++];c==-1?c=f:Math.abs(f-c)>=zr&&(c=-2);let d=new Vt(h,f);d.outdated=!1,o.push(d),a+=h+1}a<=r&&o.push(null,new pt(r-a).updateHeight(e,a));let u=xt.of(o);return(c<0||Math.abs(u.height-this.height)>=zr||Math.abs(c-this.heightMetrics(e,t).perLine)>=zr)&&(Un=!0),Yr(this,u)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Ak extends xt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,r,s+this.left.length+this.break)}lineAt(e,t,n,s,r){let o=s+this.left.height,a=r+this.left.length+this.break,c=t==Ue.ByHeight?e<o:e<a,u=c?this.left.lineAt(e,t,n,s,r):this.right.lineAt(e,t,n,o,a);if(this.break||(c?u.to<a:u.from>a))return u;let h=t==Ue.ByPosNoHeight?Ue.ByPosNoHeight:Ue.ByPos;return c?u.join(this.right.lineAt(a,h,n,o,a)):this.left.lineAt(a,h,n,s,r).join(u)}forEachLine(e,t,n,s,r,o){let a=s+this.left.height,c=r+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,s,r,o),t>=c&&this.right.forEachLine(e,t,n,a,c,o);else{let u=this.lineAt(c,Ue.ByPos,n,s,r);e<u.from&&this.left.forEachLine(e,u.from-1,n,s,r,o),u.to>=e&&u.from<=t&&o(u),t>u.to&&this.right.forEachLine(u.to+1,t,n,a,c,o)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let a of n)r.push(a);if(e>0&&dp(r,o-1),t<this.length){let a=r.length;this.decomposeRight(t,r),dp(r,a)}return xt.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<s&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?xt.of(this.break?[e,null,t]:[e,t]):(this.left=Yr(this.left,e),this.right=Yr(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:r,right:o}=this,a=t+r.length+this.break,c=null;return s&&s.from<=t+r.length&&s.more?c=r=r.updateHeight(e,t,n,s):r.updateHeight(e,t,n),s&&s.from<=a+o.length&&s.more?c=o=o.updateHeight(e,a,n,s):o.updateHeight(e,a,n),c?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function dp(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof pt&&(n=i[e+1])instanceof pt&&i.splice(e-1,3,new pt(t.length+1+n.length))}const Tk=5;class Na{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Vt?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Vt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new fp(o,s,n)):(o||r||s>=Tk)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Vt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new pt(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Vt)return e;let t=new Vt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Vt)&&!this.isCovered?this.nodes.push(new Vt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Vt&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let r=new Na(n,e);return Re.spans(t,n,s,r,0),r.finish(n)}}function Pk(i,e,t){let n=new Qk;return Re.compare(i,e,t,n,0),n.changes}class Qk{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&Zr(e,t,this.changes,5)}}function Ek(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,r=Math.max(0,t.left),o=Math.min(s.innerWidth,t.right),a=Math.max(0,t.top),c=Math.min(s.innerHeight,t.bottom);for(let u=i.parentNode;u&&u!=n.body;)if(u.nodeType==1){let h=u,f=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&f.overflow!="visible"){let d=h.getBoundingClientRect();r=Math.max(r,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),c=Math.min(u==i.parentNode?s.innerHeight:c,d.bottom)}u=f.position=="absolute"||f.position=="fixed"?h.offsetParent:h.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,c)-(t.top+e)}}function $k(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function Nk(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Ra{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],r=t[n];if(s.from!=r.from||s.to!=r.to||s.size!=r.size)return!1}return!0}draw(e,t){return me.replace({widget:new Rk(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Rk extends di{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class pp{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=mp,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Fe.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Sa).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new Sk(t),this.stateDeco=e.facet(Es).filter(n=>typeof n!="function"),this.heightMap=xt.empty().applyChanges(this.stateDeco,Pe.empty,this.heightOracle.setDoc(e.doc),[new Ft(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=me.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Gr(r,o))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?mp:new Va(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ls(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Es).filter(h=>typeof h!="function");let s=e.changedRanges,r=Ft.extendWithRanges(s,Pk(n,this.stateDeco,e?e.changes:it.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);hp(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Un)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let c=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let u=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Ad)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,r=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Fe.RTL:Fe.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,h=0;if(a.width&&a.height){let{scaleX:O,scaleY:Q}=Hf(t,a);(O>.005&&Math.abs(this.scaleX-O)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=O,this.scaleY=Q,u|=16,o=c=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=id(e.scrollDOM);let b=(this.printing?Nk:Ek)(t,this.paddingTop),w=b.top-this.pixelViewport.top,g=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(c=!0)),!this.inView&&!this.scrollTarget&&!$k(e.dom))return 0;let y=a.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),c){let O=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(O)&&(o=!0),o||s.lineWrapping&&Math.abs(y-this.contentDOMWidth)>s.charWidth){let{lineHeight:Q,charWidth:S,textHeight:k}=e.docView.measureTextSize();o=Q>0&&s.refresh(r,Q,S,k,Math.max(5,y/S),O),o&&(e.docView.minWidth=0,u|=16)}w>0&&g>0?h=Math.max(w,g):w<0&&g<0&&(h=Math.min(w,g)),hp();for(let Q of this.viewports){let S=Q.from==this.viewport.from?O:e.docView.measureVisibleLineHeights(Q);this.heightMap=(o?xt.empty().applyChanges(this.stateDeco,Pe.empty,this.heightOracle,[new Ft(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new Ck(Q.from,S))}Un&&(u|=2)}let x=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),u|=this.updateForViewport()),(u&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,c=new Gr(s.lineAt(o-n*1e3,Ue.ByHeight,r,0,0).from,s.lineAt(a+(1-n)*1e3,Ue.ByHeight,r,0,0).to);if(t){let{head:u}=t.range;if(u<c.from||u>c.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(u,Ue.ByPos,r,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&u<c.from?d=f.top:d=f.bottom-h,c=new Gr(s.lineAt(d-1e3/2,Ue.ByHeight,r,0,0).from,s.lineAt(d+h+1e3/2,Ue.ByHeight,r,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new Gr(this.heightMap.lineAt(n,Ue.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,Ue.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,Ue.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,Ue.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||s<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&s>o-2*1e3&&r<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new Ra(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,r=s>>1,o=s<<1;if(this.defaultTextDirection!=Fe.LTR&&!n)return[];let a=[],c=(h,f,d,m)=>{if(f-h<r)return;let b=this.state.selection.main,w=[b.from];b.empty||w.push(b.to);for(let p of w)if(p>h&&p<f){c(h,p-10,d,m),c(p+10,f,d,m);return}let g=Lk(e,p=>p.from>=d.from&&p.to<=d.to&&Math.abs(p.from-h)<r&&Math.abs(p.to-f)<r&&!w.some(y=>p.from<y&&p.to>y));if(!g){if(f<d.to&&t&&n&&t.visibleRanges.some(x=>x.from<=f&&x.to>=f)){let x=t.moveToLineBoundary(W.cursor(f),!1,!0).head;x>h&&(f=x)}let p=this.gapSize(d,h,f,m),y=n||p<2e6?p:2e6;g=new Ra(h,f,p,y)}a.push(g)},u=h=>{if(h.length<o||h.type!=kt.Text)return;let f=Vk(h.from,h.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,m,b;if(n){let w=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,p;if(d!=null){let y=Hr(f,d),x=((this.visibleBottom-this.visibleTop)/2+w)/h.height;g=y-x,p=y+x}else g=(this.visibleTop-h.top-w)/h.height,p=(this.visibleBottom-h.top+w)/h.height;m=Kr(f,g),b=Kr(f,p)}else{let w=f.total*this.heightOracle.charWidth,g=s*this.heightOracle.charWidth,p=0;if(w>2e6)for(let S of e)S.from>=h.from&&S.from<h.to&&S.size!=S.displaySize&&S.from*this.heightOracle.charWidth+p<this.pixelViewport.left&&(p=S.size-S.displaySize);let y=this.pixelViewport.left+p,x=this.pixelViewport.right+p,O,Q;if(d!=null){let S=Hr(f,d),k=((x-y)/2+g)/w;O=S-k,Q=S+k}else O=(y-g)/w,Q=(x+g)/w;m=Kr(f,O),b=Kr(f,Q)}m>h.from&&c(h.from,m,h,f),b<h.to&&c(b,h.to,h,f)};for(let h of this.viewportLines)Array.isArray(h.type)?h.type.forEach(u):u(h);return a}gapSize(e,t,n,s){let r=Hr(s,n)-Hr(s,t);return this.heightOracle.lineWrapping?e.height*r:s.total*this.heightOracle.charWidth*r}updateLineGaps(e){Ra.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=me.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Re.spans(t,this.viewport.from,this.viewport.to,{span(r,o){n.push({from:r,to:o})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let r=0;r<n.length&&!(s&8);r++){let o=this.visibleRanges[r],a=n[r];(o.from!=a.from||o.to!=a.to)&&(s|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ls(this.heightMap.lineAt(e,Ue.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Ls(this.heightMap.lineAt(this.scaler.fromDOM(e),Ue.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ls(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Gr{constructor(e,t){this.from=e,this.to=t}}function Vk(i,e,t){let n=[],s=i,r=0;return Re.spans(t,i,e,{span(){},point(o,a){o>s&&(n.push({from:s,to:o}),r+=o-s),s=a}},20),s<e&&(n.push({from:s,to:e}),r+=e-s),{total:r,ranges:n}}function Kr({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:r,to:o}=e[s],a=o-r;if(n<=a)return r+n;n-=a}}function Hr(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function Lk(i,e){for(let t of i)if(e(t))return t}const mp={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};class Va{constructor(e,t,n){let s=0,r=0,o=0;this.viewports=n.map(({from:a,to:c})=>{let u=t.lineAt(a,Ue.ByPos,e,0,0).top,h=t.lineAt(c,Ue.ByPos,e,0,0).bottom;return s+=h-u,{from:a,to:c,top:u,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let a of this.viewports)a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return s+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,s=r.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-s)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,s=r.domBottom}}eq(e){return e instanceof Va?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Ls(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new mi(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>Ls(s,e)):i._content)}const Jr=ae.define({combine:i=>i.join(" ")}),La=ae.define({combine:i=>i.indexOf(!0)>-1}),Ma=Wi.newName(),gp=Wi.newName(),Op=Wi.newName(),_p={"&light":"."+gp,"&dark":"."+Op};function Da(i,e,t){return new Wi(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const Mk=Da("."+Ma,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},_p),Dk={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},va=ne.ie&&ne.ie_version<=11;class vk{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new yw,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(ne.ie&&ne.ie_version<=11||ne.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ne.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ne.chrome&&ne.chrome_version<126)&&(this.editContext=new Ik(e),e.state.facet($i)&&(e.contentDOM.editContext=this.editContext.editContext)),va&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,s=this.selectionRange;if(n.state.facet($i)?n.root.activeElement!=this.dom:!vr(this.dom,s))return;let r=s.anchorNode&&n.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(ne.ie&&ne.ie_version<=11||ne.android&&ne.chrome)&&!n.state.selection.main.empty&&s.focusNode&&Cs(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ss(e.root);if(!t)return!1;let n=ne.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Bk(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=vr(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&kw(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Dk),va&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),va&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&vn(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&vr(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new nk(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=Wd(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=bp(t,e.previousSibling||e.target.previousSibling,-1),s=bp(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet($i)!=e.state.facet($i)&&(e.view.contentDOM.editContext=e.state.facet($i)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function bp(i,e,t){for(;e;){let n=De.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function yp(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,r=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return Cs(o.node,o.offset,s,r)&&([t,n,s,r]=[s,r,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:r}}function Bk(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return yp(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?yp(i,t):null}class Ik{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let s=e.state.selection.main,{anchor:r,head:o}=s,a=this.toEditorPos(n.updateRangeStart),c=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let u=c-a>n.text.length;a==this.from&&r<this.from?a=r:c==this.to&&r>this.to&&(c=r);let h=qd(e.state.sliceDoc(a,c),n.text,(u?s.from:s.to)-a,u?"end":null);if(!h){let d=W.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));d.main.eq(s)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:h.from+a,to:h.toA+a,insert:Pe.of(n.text.slice(h.from,h.toB).split(`
30
+ `))};if((ne.mac||ne.android)&&f.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:c,insert:Pe.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);Ea(e,f,W.single(this.toEditorPos(n.selectionStart,d),this.toEditorPos(n.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let s=[],r=null;for(let o=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);o<a;o++){let c=e.coordsForChar(o);r=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let r of n.getTextFormats()){let o=r.underlineStyle,a=r.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let c=this.toEditorPos(r.rangeStart),u=this.toEditorPos(r.rangeEnd);if(c<u){let h=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;s.push(me.mark({attributes:{style:h}}).range(c,u))}}}e.dispatch({effects:Pd.of(me.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=Ss(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,a,c,u)=>{if(n)return;let h=u.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(u)){s=this.pendingContextChange=null,t+=h,this.to+=h;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=h,this.to+=h;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+u.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),u.toString()),this.to+=h}t+=h}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ie{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(r=>n(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ww(e.parent)||document,this.viewState=new pp(e.state||Ce.create(e)),e.scrollTo&&e.scrollTo.is(Ur)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Fn).map(s=>new xa(s));for(let s of this.plugins)s.update(this);this.observer=new vk(this),this.inputState=new lk(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Vd(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof He?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,s,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,c=null;e.some(d=>d.annotation(op))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=lp(r,o),c||(a=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(h=null)):this.observer.clear(),r.facet(Ce.phrases)!=this.state.facet(Ce.phrases))return this.setState(r);s=Xr.create(this,r,e),s.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:m}=d.state.selection;f=new Zn(m.empty?m:W.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of d.effects)m.is(Ur)&&(f=m.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=eo.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Ns)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Jr)!=s.state.facet(Jr)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let d of this.state.facet(ya))try{d(s)}catch(m){Tt(this.state,m,"update listener")}(c||h)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),h&&!Wd(this,h)&&u.force&&vn(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new pp(e),this.plugins=e.facet(Fn).map(n=>new xa(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new Vd(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Fn),n=e.state.facet(Fn);if(t!=n){let s=[];for(let r of n){let o=t.indexOf(r);if(o<0)s.push(new xa(r));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(n){Tt(this.state,n,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(id(n))r=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(s);r=m.from,o=m.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];c&4||([this.measureRequests,u]=[u,this.measureRequests]);let h=u.map(m=>{try{return m.read(this)}catch(b){return Tt(this.state,b),wp}}),f=Xr.create(this,this.state,[]),d=!1;f.flags|=c,t?t.flags|=c:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let m=0;m<u.length;m++)if(h[m]!=wp)try{let b=u[m];b.write&&b.write(h[m],this)}catch(b){Tt(this.state,b)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let b=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(b>1||b<-1){s=s+b,n.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(ya))a(t)}get themeClasses(){return Ma+" "+(this.state.facet(La)?Op:gp)+" "+this.state.facet(Jr)}updateAttrs(){let e=kp(this,Qd,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet($i)?"true":"false",class:"cm-content",style:`${ne.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),kp(this,Sa,t);let n=this.observer.ignore(()=>{let s=pa(this.contentDOM,this.contentAttrs,t),r=pa(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(ie.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Ns);let e=this.state.facet(ie.cspNonce);Wi.mount(this.root,this.styleModules.concat(Mk).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Qa(this,e,Fd(this,e,t,n))}moveByGroup(e,t){return Qa(this,e,Fd(this,e,t,n=>Hw(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return W.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return Kw(this,e,t,n)}moveVertically(e,t,n){return Qa(this,e,Jw(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Bd(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[zi.find(r,e-s.from,-1,t)];return As(n,o.dir==Fe.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Cd)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Zk)return Od(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||gd(r.isolates,n=Nd(this,e))))return r.order;n||(n=Nd(this,e));let s=Lw(e.text,t,n);return this.bidiCache.push(new eo(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ne.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Jf(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Ur.of(new Zn(typeof e=="number"?W.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Ur.of(new Zn(W.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ge.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ge.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Wi.newName(),s=[Jr.of(n),Ns.of(Da(`.${n}`,e))];return t&&t.dark&&s.push(La.of(!0)),s}static baseTheme(e){return Xi.lowest(Ns.of(Da("."+Ma,e,_p)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&De.get(n)||De.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}ie.styleModule=Ns,ie.inputHandler=xd,ie.clipboardInputFilter=wa,ie.clipboardOutputFilter=ka,ie.scrollHandler=Td,ie.focusChangeEffect=Sd,ie.perLineTextDirection=Cd,ie.exceptionSink=kd,ie.updateListener=ya,ie.editable=$i,ie.mouseSelectionStyle=wd,ie.dragMovesSelection=yd,ie.clickAddsSelectionRange=bd,ie.decorations=Es,ie.outerDecorations=Ed,ie.atomicRanges=$s,ie.bidiIsolatedRanges=$d,ie.scrollMargins=Rd,ie.darkTheme=La,ie.cspNonce=ae.define({combine:i=>i.length?i[0]:""}),ie.contentAttributes=Sa,ie.editorAttributes=Qd,ie.lineWrapping=ie.contentAttributes.of({class:"cm-lineWrapping"}),ie.announce=ke.define();const Zk=4096,wp={};class eo{constructor(e,t,n,s,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:Fe.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir==s&&!t.touchesRange(o.from,o.to)&&n.push(new eo(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function kp(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let r=n[s],o=typeof r=="function"?r(i):r;o&&da(o,t)}return t}const Fk=ne.mac?"mac":ne.windows?"win":ne.linux?"linux":"key";function Uk(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,r,o,a;for(let c=0;c<t.length-1;++c){const u=t[c];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))s=!0;else if(/^(c|ctrl|control)$/i.test(u))r=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))e=="mac"?a=!0:r=!0;else throw new Error("Unrecognized modifier name: "+u)}return s&&(n="Alt-"+n),r&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function to(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const Xk=Xi.default(ie.domEventHandlers({keydown(i,e){return Cp(Sp(e.state),i,e,"editor")}})),Ms=ae.define({enables:Xk}),xp=new WeakMap;function Sp(i){let e=i.facet(Ms),t=xp.get(e);return t||xp.set(e,t=jk(e.reduce((n,s)=>n.concat(s),[]))),t}function Wk(i,e,t){return Cp(Sp(i.state),e,i,t)}let Yi=null;const qk=4e3;function jk(i,e=Fk){let t=Object.create(null),n=Object.create(null),s=(o,a)=>{let c=n[o];if(c==null)n[o]=a;else if(c!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,a,c,u,h)=>{var f,d;let m=t[o]||(t[o]=Object.create(null)),b=a.split(/ (?!$)/).map(p=>Uk(p,e));for(let p=1;p<b.length;p++){let y=b.slice(0,p).join(" ");s(y,!0),m[y]||(m[y]={preventDefault:!0,stopPropagation:!1,run:[x=>{let O=Yi={view:x,prefix:y,scope:o};return setTimeout(()=>{Yi==O&&(Yi=null)},qk),!0}]})}let w=b.join(" ");s(w,!1);let g=m[w]||(m[w]={preventDefault:!1,stopPropagation:!1,run:((d=(f=m._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});c&&g.run.push(c),u&&(g.preventDefault=!0),h&&(g.stopPropagation=!0)};for(let o of i){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of a){let h=t[u]||(t[u]=Object.create(null));h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in h)h[d].run.push(m=>f(m,Ba))}let c=o[e]||o.key;if(c)for(let u of a)r(u,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(u,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let Ba=null;function Cp(i,e,t,n){Ba=e;let s=gw(e),r=At(s,0),o=ci(r)==s.length&&s!=" ",a="",c=!1,u=!1,h=!1;Yi&&Yi.view==t&&Yi.scope==n&&(a=Yi.prefix+" ",Yd.indexOf(e.keyCode)<0&&(u=!0,Yi=null));let f=new Set,d=g=>{if(g){for(let p of g.run)if(!f.has(p)&&(f.add(p),p(t)))return g.stopPropagation&&(h=!0),!0;g.preventDefault&&(g.stopPropagation&&(h=!0),u=!0)}return!1},m=i[n],b,w;return m&&(d(m[a+to(s,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ne.windows&&e.ctrlKey&&e.altKey)&&!(ne.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(b=qi[e.keyCode])&&b!=s?(d(m[a+to(b,e,!0)])||e.shiftKey&&(w=xs[e.keyCode])!=s&&w!=b&&d(m[a+to(w,e,!1)]))&&(c=!0):o&&e.shiftKey&&d(m[a+to(s,e,!0)])&&(c=!0),!c&&d(m._any)&&(c=!0)),u&&(c=!0),c&&h&&e.stopPropagation(),Ba=null,c}class Ds{constructor(e,t,n,s,r){this.className=e,this.left=t,this.top=n,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let r=Ap(e);return[new Ds(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return zk(e,t,n)}}function Ap(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Fe.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function Tp(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let r=i.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=i.posAtCoords({x:r.left+1,y:o}),c=i.posAtCoords({x:r.right-1,y:o});return a==null||c==null?n:{from:Math.max(n.from,Math.min(a,c)),to:Math.min(n.to,Math.max(a,c))}}function zk(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),r=i.textDirection==Fe.LTR,o=i.contentDOM,a=o.getBoundingClientRect(),c=Ap(i),u=o.querySelector(".cm-line"),h=u&&window.getComputedStyle(u),f=a.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),d=a.right-(h?parseInt(h.paddingRight):0),m=Pa(i,n,1),b=Pa(i,s,-1),w=m.type==kt.Text?m:null,g=b.type==kt.Text?b:null;if(w&&(i.lineWrapping||m.widgetLineBreaks)&&(w=Tp(i,n,1,w)),g&&(i.lineWrapping||b.widgetLineBreaks)&&(g=Tp(i,s,-1,g)),w&&g&&w.from==g.from&&w.to==g.to)return y(x(t.from,t.to,w));{let Q=w?x(t.from,null,w):O(m,!1),S=g?x(null,t.to,g):O(b,!0),k=[];return(w||m).to<(g||b).from-(w&&g?1:0)||m.widgetLineBreaks>1&&Q.bottom+i.defaultLineHeight/2<S.top?k.push(p(f,Q.bottom,d,S.top)):Q.bottom<S.top&&i.elementAtHeight((Q.bottom+S.top)/2).type==kt.Text&&(Q.bottom=S.top=(Q.bottom+S.top)/2),y(Q).concat(k).concat(y(S))}function p(Q,S,k,T){return new Ds(e,Q-c.left,S-c.top,k-Q,T-S)}function y({top:Q,bottom:S,horizontal:k}){let T=[];for(let $=0;$<k.length;$+=2)T.push(p(k[$],Q,k[$+1],S));return T}function x(Q,S,k){let T=1e9,$=-1e9,_=[];function A(P,F,B,U,oe){let Z=i.coordsAtPos(P,P==k.to?-2:2),G=i.coordsAtPos(B,B==k.from?2:-2);!Z||!G||(T=Math.min(Z.top,G.top,T),$=Math.max(Z.bottom,G.bottom,$),oe==Fe.LTR?_.push(r&&F?f:Z.left,r&&U?d:G.right):_.push(!r&&U?f:G.left,!r&&F?d:Z.right))}let C=Q??k.from,D=S??k.to;for(let P of i.visibleRanges)if(P.to>C&&P.from<D)for(let F=Math.max(P.from,C),B=Math.min(P.to,D);;){let U=i.state.doc.lineAt(F);for(let oe of i.bidiSpans(U)){let Z=oe.from+U.from,G=oe.to+U.from;if(Z>=B)break;G>F&&A(Math.max(Z,F),Q==null&&Z<=C,Math.min(G,B),S==null&&G>=D,oe.dir)}if(F=U.to+1,F>=B)break}return _.length==0&&A(C,Q==null,D,S==null,i.textDirection),{top:T,bottom:$,horizontal:_}}function O(Q,S){let k=a.top+(S?Q.top:Q.bottom);return{top:k,bottom:k,horizontal:[]}}}function Yk(i,e){return i.constructor==e.constructor&&i.eq(e)}class Gk{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(io)!=e.state.facet(io)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(io);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,n)=>!Yk(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e,ne.safari&&ne.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const io=ae.define();function Pp(i){return[Ge.define(e=>new Gk(e,i)),io.of(i)]}const vs=ae.define({combine(i){return hi(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Kk(i={}){return[vs.of(i),Hk,Jk,ex,Ad.of(!0)]}function Qp(i){return i.startState.facet(vs)!=i.state.facet(vs)}const Hk=Pp({above:!0,markers(i){let{state:e}=i,t=e.facet(vs),n=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty||t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=s.empty?s:W.cursor(s.head,s.head>s.anchor?-1:1);for(let c of Ds.forRange(i,o,a))n.push(c)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Qp(i);return t&&Ep(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){Ep(e.state,i)},class:"cm-cursorLayer"});function Ep(i,e){e.style.animationDuration=i.facet(vs).cursorBlinkRate+"ms"}const Jk=Pp({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Ds.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||Qp(i)},class:"cm-selectionLayer"}),ex=Xi.highest(ie.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),$p=ke.define({map(i,e){return i==null?null:e.mapPos(i)}}),Bs=rt.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is($p)?n.value:t,i)}}),tx=Ge.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(Bs);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(i.startState.field(Bs)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(Bs),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(Bs)!=i&&this.view.dispatch({effects:$p.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ix(){return[Bs,tx]}function Np(i,e,t,n,s){e.lastIndex=0;for(let r=i.iterRange(t,n),o=t,a;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;a=e.exec(r.value);)s(o+a.index,a)}function nx(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:r}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),r=Math.min(i.state.doc.lineAt(r).to,r+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}class sx{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(a,c,u,h)=>s(h,u,u+a[0].length,a,c);else if(typeof n=="function")this.addMatch=(a,c,u,h)=>{let f=n(a,c,u);f&&h(u,u+a[0].length,f)};else if(n)this.addMatch=(a,c,u,h)=>h(u,u+a[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new Ti,n=t.add.bind(t);for(let{from:s,to:r}of nx(e,this.maxLength))Np(e.state.doc,this.regexp,s,r,(o,a)=>this.addMatch(a,e,o,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),s=Math.max(c,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let r of e.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,s);if(a>=o){let c=e.state.doc.lineAt(o),u=c.to<a?e.state.doc.lineAt(a):c,h=Math.max(r.from,c.from),f=Math.min(r.to,u.to);if(this.boundary){for(;o>c.from;o--)if(this.boundary.test(c.text[o-1-c.from])){h=o;break}for(;a<u.to;a++)if(this.boundary.test(u.text[a-u.from])){f=a;break}}let d=[],m,b=(w,g,p)=>d.push(p.range(w,g));if(c==u)for(this.regexp.lastIndex=h-c.from;(m=this.regexp.exec(c.text))&&m.index<f-c.from;)this.addMatch(m,e,m.index+c.from,b);else Np(e.state.doc,this.regexp,h,f,(w,g)=>this.addMatch(g,e,w,b));t=t.update({filterFrom:h,filterTo:f,filter:(w,g)=>w<h||g>f,add:d})}}return t}}const Ia=/x/.unicode!=null?"gu":"g",rx=new RegExp(`[\0-\b
31
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ia),ox={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Za=null;function lx(){var i;if(Za==null&&typeof document<"u"&&document.body){let e=document.body.style;Za=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Za||!1}const no=ae.define({combine(i){let e=hi(i,{render:null,specialChars:rx,addSpecialChars:null});return(e.replaceTabs=!lx())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ia)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ia)),e}});function ax(i={}){return[no.of(i),cx()]}let Rp=null;function cx(){return Rp||(Rp=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=me.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(no)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new sx({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,r=At(e[0],0);if(r==9){let o=s.lineAt(n),a=t.state.tabSize,c=Mn(o.text,a,n-o.from);return me.replace({widget:new dx((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=me.replace({widget:new fx(i,r)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(no);i.startState.facet(no)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const ux="•";function hx(i){return i>=32?ux:i==10?"␤":String.fromCharCode(9216+i)}class fx extends di{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=hx(this.code),n=e.state.phrase("Control character")+" "+(ox[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=n,r.setAttribute("aria-label",n),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class dx extends di{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function px(){return gx}const mx=me.line({class:"cm-activeLine"}),gx=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(mx.range(s.from)),e=s.from)}return me.set(t)}},{decorations:i=>i.decorations});class Ox extends di{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Dn(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=As(t[0],n.direction!="rtl"),r=parseInt(n.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function _x(i){let e=Ge.fromClass(class{constructor(t){this.view=t,this.placeholder=i?me.set([me.widget({widget:new Ox(i),side:1}).range(0)]):me.none}get decorations(){return this.view.state.doc.length?me.none:this.placeholder}},{decorations:t=>t.decorations});return typeof i=="string"?[e,ie.contentAttributes.of({"aria-placeholder":i})]:e}const Fa=2e3;function bx(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Fa||t.off>Fa||e.col<0||t.col<0){let o=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let c=n;c<=s;c++){let u=i.doc.line(c);u.length<=a&&r.push(W.range(u.from+o,u.to+a))}}else{let o=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let c=n;c<=s;c++){let u=i.doc.line(c),h=ia(u.text,o,i.tabSize,!0);if(h<0)r.push(W.cursor(u.to));else{let f=ia(u.text,a,i.tabSize);r.push(W.range(u.from+h,u.from+f))}}}return r}function yx(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function Vp(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,r=s>Fa?-1:s==n.length?yx(i,e.clientX):Mn(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:r,off:s}}function wx(i,e){let t=Vp(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(s.changes)}},get(s,r,o){let a=Vp(i,s);if(!a)return n;let c=bx(i.state,t,a);return c.length?o?W.create(c.concat(n.ranges)):W.create(c):n}}:null}function kx(i){let e=(i==null?void 0:i.eventFilter)||(t=>t.altKey&&t.button==0);return ie.mouseSelectionStyle.of((t,n)=>e(n)?wx(t,n):null)}const xx={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},Sx={style:"cursor: crosshair"};function Cx(i={}){let[e,t]=xx[i.key||"Alt"],n=Ge.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,ie.contentAttributes.of(s=>{var r;return!((r=s.plugin(n))===null||r===void 0)&&r.isDown?Sx:null})]}const so="-10000px";class Lp{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=n(o,r))}update(e,t){var n;let s=e.state.facet(this.facet),r=s.filter(c=>c);if(s===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let o=[],a=t?[]:null;for(let c=0;c<r.length;c++){let u=r[c],h=-1;if(u){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==u.create&&(h=f)}if(h<0)o[c]=this.createTooltipView(u,c?o[c-1]:null),a&&(a[c]=!!u.above);else{let f=o[c]=this.tooltipViews[h];a&&(a[c]=t[h]),f.update&&f.update(e)}}}for(let c of this.tooltipViews)o.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(a.forEach((c,u)=>t[u]=c),t.length=a.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function Ax(i){let e=i.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Ua=ae.define({combine:i=>{var e,t,n;return{position:ne.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||Ax}}}),Mp=new WeakMap,Xa=Ge.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(Ua);this.position=e.position,this.parent=e.parent,this.classes=i.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Lp(i,Wa,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),i.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(Ua);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=so,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(ne.safari){let o=r.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else t=!!r.offsetParent&&r.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(i=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=Ca(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Ua).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:r}=i,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],u=this.manager.tooltipViews[a],{dom:h}=u,f=i.pos[a],d=i.size[a];if(!f||c.clip!==!1&&(f.bottom<=Math.max(t.top,n.top)||f.top>=Math.min(t.bottom,n.bottom)||f.right<Math.max(t.left,n.left)-.1||f.left>Math.min(t.right,n.right)+.1)){h.style.top=so;continue}let m=c.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,b=m?7:0,w=d.right-d.left,g=(e=Mp.get(u))!==null&&e!==void 0?e:d.bottom-d.top,p=u.offset||Px,y=this.view.textDirection==Fe.LTR,x=d.width>n.right-n.left?y?n.left:n.right-d.width:y?Math.max(n.left,Math.min(f.left-(m?14:0)+p.x,n.right-w)):Math.min(Math.max(n.left,f.left-w+(m?14:0)-p.x),n.right-w),O=this.above[a];!c.strictSide&&(O?f.top-g-b-p.y<n.top:f.bottom+g+b+p.y>n.bottom)&&O==n.bottom-f.bottom>f.top-n.top&&(O=this.above[a]=!O);let Q=(O?f.top-n.top:n.bottom-f.bottom)-b;if(Q<g&&u.resize!==!1){if(Q<this.view.defaultLineHeight){h.style.top=so;continue}Mp.set(u,g),h.style.height=(g=Q)/r+"px"}else h.style.height&&(h.style.height="");let S=O?f.top-g-b-p.y:f.bottom+b+p.y,k=x+w;if(u.overlap!==!0)for(let T of o)T.left<k&&T.right>x&&T.top<S+g&&T.bottom>S&&(S=O?T.top-g-2-b:T.bottom+b+2);if(this.position=="absolute"?(h.style.top=(S-i.parent.top)/r+"px",Dp(h,(x-i.parent.left)/s)):(h.style.top=S/r+"px",Dp(h,x/s)),m){let T=f.left+(y?p.x:-p.x)-(x+14-7);m.style.left=T/s+"px"}u.overlap!==!0&&o.push({left:x,top:S,right:k,bottom:S+g}),h.classList.toggle("cm-tooltip-above",O),h.classList.toggle("cm-tooltip-below",!O),u.positioned&&u.positioned(i.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let i of this.manager.tooltipViews)i.dom.style.top=so}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Dp(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const Tx=ie.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Px={x:0,y:0},Wa=ae.define({enables:[Xa,Tx]}),ro=ae.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class oo{static create(e){return new oo(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Lp(e,ro,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Qx=Wa.compute([ro],i=>{let e=i.facet(ro);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:oo.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Ex{constructor(e,t,n,s,r){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let s,r=1;if(n instanceof Qi)s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let a=e.coordsAtPos(s);if(!a||t.y<a.top||t.y>a.bottom||t.x<a.left-e.defaultCharacterWidth||t.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(s)).find(h=>h.from<=s&&h.to>=s),u=c&&c.dir==Fe.RTL?-1:1;r=t.x<a.left?-u:u}let o=this.source(e,s,r);if(o!=null&&o.then){let a=this.pending={pos:s};o.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>Tt(e.state,c,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Xa),t=e?e.manager.tooltips.findIndex(n=>n.create==oo.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!$x(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,a=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!Nx(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const lo=4;function $x(i,e){let{left:t,right:n,top:s,bottom:r}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();s=Math.min(a.top,s),r=Math.max(a.bottom,r)}return e.clientX>=t-lo&&e.clientX<=n+lo&&e.clientY>=s-lo&&e.clientY<=r+lo}function Nx(i,e,t,n,s,r){let o=i.scrollDOM.getBoundingClientRect(),a=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.right<n||o.top>s||Math.min(o.bottom,a)<s)return!1;let c=i.posAtCoords({x:n,y:s},!1);return c>=e&&c<=t}function Rx(i,e={}){let t=ke.define(),n=rt.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let a of s){let c=r.changes.mapPos(a.pos,-1,ft.TrackDel);if(c!=null){let u=Object.assign(Object.create(null),a);u.pos=c,u.end!=null&&(u.end=r.changes.mapPos(u.end)),o.push(u)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(Vx)&&(s=[]);return s},provide:s=>ro.from(s)});return{active:n,extension:[n,Ge.define(s=>new Ex(s,i,n,t,e.hoverTime||300)),Qx]}}function vp(i,e){let t=i.plugin(Xa);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const Vx=ke.define(),Bp=ae.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Is(i,e){let t=i.plugin(Ip),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const Ip=Ge.fromClass(class{constructor(i){this.input=i.state.facet(Zs),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(Bp);this.top=new ao(i,!0,e.topContainer),this.bottom=new ao(i,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(i){let e=i.state.facet(Bp);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ao(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ao(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(Zs);if(t!=this.input){let n=t.filter(c=>c),s=[],r=[],o=[],a=[];for(let c of n){let u=this.specs.indexOf(c),h;u<0?(h=c(i.view),a.push(h)):(h=this.panels[u],h.update&&h.update(i)),s.push(h),(h.top?r:o).push(h)}this.specs=n,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>ie.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ao{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Zp(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Zp(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Zp(i){let e=i.nextSibling;return i.remove(),e}const Zs=ae.define({enables:Ip});class Ni extends dn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ni.prototype.elementClass="",Ni.prototype.toDOM=void 0,Ni.prototype.mapMode=ft.TrackBefore,Ni.prototype.startSide=Ni.prototype.endSide=-1,Ni.prototype.point=!0;const co=ae.define(),Lx=ae.define(),Mx={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Re.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Fs=ae.define();function Dx(i){return[Fp(),Fs.of({...Mx,...i})]}const qa=ae.define({combine:i=>i.some(e=>e)});function Fp(i){let e=[vx];return i&&i.fixed===!1&&e.push(qa.of(!0)),e}const vx=Ge.fromClass(class{constructor(i){this.view=i,this.domAfter=null,this.prevViewport=i.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=i.state.facet(Fs).map(e=>new Xp(i,e)),this.fixed=!i.state.facet(qa);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}if(i.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(qa)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Re.iter(this.view.state.facet(co),this.view.viewport.from),n=[],s=this.gutters.map(r=>new Bx(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(r.type)){let o=!0;for(let a of r.type)if(a.type==kt.Text&&o){ja(t,n,a.from);for(let c of s)c.line(this.view,a,n);o=!1}else if(a.widget)for(let c of s)c.widget(this.view,a)}else if(r.type==kt.Text){ja(t,n,r.from);for(let o of s)o.line(this.view,r,n)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();i&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(i){let e=i.startState.facet(Fs),t=i.state.facet(Fs),n=i.docChanged||i.heightChanged||i.viewportChanged||!Re.eq(i.startState.facet(co),i.state.facet(co),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new Xp(this.view,r)):(this.gutters[o].update(i),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)r.config.side=="after"?this.getDOMAfter().appendChild(r.dom):this.dom.appendChild(r.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:i=>ie.scrollMargins.of(e=>{let t=e.plugin(i);if(!t||t.gutters.length==0||!t.fixed)return null;let n=t.dom.offsetWidth*e.scaleX,s=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Fe.LTR?{left:n,right:s}:{right:n,left:s}})});function Up(i){return Array.isArray(i)?i:[i]}function ja(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class Bx{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Re.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let a=new Wp(e,o,r,n);s.elements.push(a),s.dom.appendChild(a.dom)}else s.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];ja(this.cursor,s,t.from),n.length&&(s=s.concat(n));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let r of e.state.facet(Lx)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Xp{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let c=r.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=s.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Up(t.markers(e)),t.initialSpacer&&(this.spacer=new Wp(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Up(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!Re.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Wp{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Ix(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let a=o,c=r<t.length?t[r++]:null,u=!1;if(c){let h=c.elementClass;h&&(n+=" "+h);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(c)){a=f,u=!0;break}}else a=this.markers.length;for(;o<a;){let h=this.markers[o++];if(h.toDOM){h.destroy(s);let f=s.nextSibling;s.remove(),s=f}}if(!c)break;c.toDOM&&(u?s=s.nextSibling:this.dom.insertBefore(c.toDOM(e),s)),u&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function Ix(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const Zx=ae.define(),Fx=ae.define(),Xn=ae.define({combine(i){return hi(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let r=n[s],o=t[s];n[s]=r?(a,c,u)=>r(a,c,u)||o(a,c,u):o}return n}})}});class za extends Ni{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ya(i,e){return i.state.facet(Xn).formatNumber(e,i.state)}const Ux=Fs.compute([Xn],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Zx)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new za(Ya(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet(Fx)){let r=s(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Xn)!=e.state.facet(Xn),initialSpacer(e){return new za(Ya(e,qp(e.state.doc.lines)))},updateSpacer(e,t){let n=Ya(t.view,qp(t.view.state.doc.lines));return n==e.number?e:new za(n)},domEventHandlers:i.facet(Xn).domEventHandlers,side:"before"}));function Xx(i={}){return[Xn.of(i),Fp(),Ux]}function qp(i){let e=9;for(;e<i;)e=e*10+9;return e}const Wx=new class extends Ni{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},qx=co.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(Wx.range(s)))}return Re.of(e)});function jx(){return qx}const jp=1024;let zx=0;class Ga{constructor(e,t){this.from=e,this.to=t}}class Se{constructor(e={}){this.id=zx++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}Se.closedBy=new Se({deserialize:i=>i.split(" ")}),Se.openedBy=new Se({deserialize:i=>i.split(" ")}),Se.group=new Se({deserialize:i=>i.split(" ")}),Se.isolate=new Se({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}}),Se.contextHash=new Se({perNode:!0}),Se.lookAhead=new Se({perNode:!0}),Se.mounted=new Se({perNode:!0});class uo{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Se.mounted.id]}}const Yx=Object.create(null);class Pt{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):Yx,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Pt(e.name||"",t,e.id,n);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Se.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(Se.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?n.name:s[r]];if(o)return o}}}}Pt.none=new Pt("",Object.create(null),0,8);class Ka{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let s=null;for(let r of e){let o=r(n);if(o){s||(s=Object.assign({},n.props));let a=o[1],c=o[0];c.combine&&c.id in s&&(a=c.combine(s[c.id],a)),s[c.id]=a}}t.push(s?new Pt(n.name,s,n.id,n.flags):n)}return new Ka(t)}}const ho=new WeakMap,zp=new WeakMap;var nt;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays"})(nt||(nt={}));class et{constructor(e,t,n,s,r){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,r&&r.length){this.props=Object.create(null);for(let[o,a]of r)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=uo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.toString();s&&(t&&(t+=","),t+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ec(this.topNode,e)}cursorAt(e,t=0,n=0){let s=ho.get(this)||this.topNode,r=new ec(s);return r.moveTo(e,t),ho.set(this,r._tree),r}get topNode(){return new Qt(this,0,0,null)}resolve(e,t=0){let n=Us(ho.get(this)||this.topNode,e,t,!1);return ho.set(this,n),n}resolveInner(e,t=0){let n=Us(zp.get(this)||this.topNode,e,t,!0);return zp.set(this,n),n}resolveStack(e,t=0){return Hx(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:r=this.length}=e,o=e.mode||0,a=(o&nt.IncludeAnonymous)>0;for(let c=this.cursor(o|nt.IncludeAnonymous);;){let u=!1;if(c.from<=r&&c.to>=s&&(!a&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;u=!0}for(;u&&n&&(a||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:ic(Pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new et(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new et(Pt.none,t,n,s)))}static build(e){return Jx(e)}}et.empty=new et(Pt.none,[],[],0);class Ha{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Ha(this.buffer,this.index)}}class Gi{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],s=this.set.types[t],r=s.name;if(/\W/.test(r)&&!s.isError&&(r=JSON.stringify(r)),e+=4,n==e)return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,s,r){let{buffer:o}=this,a=-1;for(let c=e;c!=t&&!(Yp(r,s,o[c+1],o[c+2])&&(a=c,n>0));c=o[c+3]);return a}slice(e,t,n){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let a=e,c=0;a<t;){r[c++]=s[a++],r[c++]=s[a++]-n;let u=r[c++]=s[a++]-n;r[c++]=s[a++]-e,o=Math.max(o,u)}return new Gi(r,o,this.set)}}function Yp(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function Us(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let o=!n&&i instanceof Qt&&i.index<0?null:i.parent;if(!o)return i;i=o}let r=n?0:nt.IgnoreOverlays;if(n)for(let o=i,a=o.parent;a;o=a,a=o.parent)o instanceof Qt&&o.index<0&&((s=a.enter(e,t,r))===null||s===void 0?void 0:s.from)!=o.from&&(i=a);for(;;){let o=i.enter(e,t,r);if(!o)return i;i=o}}class Gp{cursor(e=0){return new ec(this,e)}getChild(e,t=null,n=null){let s=Kp(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return Kp(this,e,t,n)}resolve(e,t=0){return Us(this,e,t,!1)}resolveInner(e,t=0){return Us(this,e,t,!0)}matchContext(e){return Ja(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class Qt extends Gp{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,s,r=0){for(let o=this;;){for(let{children:a,positions:c}=o._tree,u=t>0?a.length:-1;e!=u;e+=t){let h=a[e],f=c[e]+o.from;if(Yp(s,n,f,f+h.length)){if(h instanceof Gi){if(r&nt.ExcludeBuffers)continue;let d=h.findChild(0,h.buffer.length,t,n-f,s);if(d>-1)return new gi(new Gx(o,h,e,f),null,d)}else if(r&nt.IncludeAnonymous||!h.type.isAnonymous||tc(h)){let d;if(!(r&nt.IgnoreMounts)&&(d=uo.get(h))&&!d.overlay)return new Qt(d.tree,f,e,o);let m=new Qt(h,f,e,o);return r&nt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(t<0?h.children.length-1:0,t,n,s)}}}if(r&nt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let s;if(!(n&nt.IgnoreOverlays)&&(s=uo.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:a}of s.overlay)if((t>0?o<=r:o<r)&&(t<0?a>=r:a>r))return new Qt(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Kp(i,e,t,n){let s=i.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(n!=null&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return n==null?r:[]}}function Ja(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class Gx{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class gi extends Gp{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new gi(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&nt.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new gi(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new gi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,r=n.buffer[this.index+3];if(r>s){let o=n.buffer[this.index+1];e.push(n.slice(s,r,o)),t.push(0)}return new et(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Hp(i){if(!i.length)return null;let e=0,t=i[0];for(let r=1;r<i.length;r++){let o=i[r];(o.from>t.from||o.to<t.to)&&(t=o,e=r)}let n=t instanceof Qt&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new Kx(s,t)}class Kx{constructor(e,t){this.heads=e,this.node=t}get next(){return Hp(this.heads)}}function Hx(i,e,t){let n=i.resolveInner(e,t),s=null;for(let r=n instanceof Qt?n:n.context.parent;r;r=r.parent)if(r.index<0){let o=r.parent;(s||(s=[n])).push(o.resolve(e,t)),r=o}else{let o=uo.get(r.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Qt(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[n])).push(Us(a,e,t,!1))}}return s?Hp(s):n}class ec{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Qt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof Qt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&nt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&nt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&nt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(s.buffer.buffer[r+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let a=n._tree.children[r];if(this.mode&nt.IncludeAnonymous||a instanceof Gi||!a.type.isAnonymous||tc(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,n=r+1;break e}s=this.stack[--r]}for(let s=n;s<this.stack.length;s++)t=new gi(this.buffer,t,this.stack[s]);return this.bufferNode=new gi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return Ja(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,r=this.stack.length-1;s>=0;r--){if(r<0)return Ja(this._tree,e,s);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function tc(i){return i.children.some(e=>e instanceof Gi||!e.type.isAnonymous||tc(e))}function Jx(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=jp,reused:r=[],minRepeatType:o=n.types.length}=i,a=Array.isArray(t)?new Ha(t,t.length):t,c=n.types,u=0,h=0;function f(Q,S,k,T,$,_){let{id:A,start:C,end:D,size:P}=a,F=h,B=u;if(P<0)if(a.next(),P==-1){let j=r[A];k.push(j),T.push(C-Q);return}else if(P==-3){u=A;return}else if(P==-4){h=A;return}else throw new RangeError(`Unrecognized record size: ${P}`);let U=c[A],oe,Z,G=C-Q;if(D-C<=s&&(Z=g(a.pos-S,$))){let j=new Uint16Array(Z.size-Z.skip),K=a.pos-Z.size,de=j.length;for(;a.pos>K;)de=p(Z.start,j,de);oe=new Gi(j,D-Z.start,n),G=Z.start-Q}else{let j=a.pos-P;a.next();let K=[],de=[],fe=A>=o?A:-1,he=0,v=D;for(;a.pos>j;)fe>=0&&a.id==fe&&a.size>=0?(a.end<=v-s&&(b(K,de,C,he,a.end,v,fe,F,B),he=K.length,v=a.end),a.next()):_>2500?d(C,j,K,de):f(C,j,K,de,fe,_+1);if(fe>=0&&he>0&&he<K.length&&b(K,de,C,he,C,v,fe,F,B),K.reverse(),de.reverse(),fe>-1&&he>0){let N=m(U,B);oe=ic(U,K,de,0,K.length,0,D-C,N,N)}else oe=w(U,K,de,D-C,F-D,B)}k.push(oe),T.push(G)}function d(Q,S,k,T){let $=[],_=0,A=-1;for(;a.pos>S;){let{id:C,start:D,end:P,size:F}=a;if(F>4)a.next();else{if(A>-1&&D<A)break;A<0&&(A=P-s),$.push(C,D,P),_++,a.next()}}if(_){let C=new Uint16Array(_*4),D=$[$.length-2];for(let P=$.length-3,F=0;P>=0;P-=3)C[F++]=$[P],C[F++]=$[P+1]-D,C[F++]=$[P+2]-D,C[F++]=F;k.push(new Gi(C,$[2]-D,n)),T.push(D-Q)}}function m(Q,S){return(k,T,$)=>{let _=0,A=k.length-1,C,D;if(A>=0&&(C=k[A])instanceof et){if(!A&&C.type==Q&&C.length==$)return C;(D=C.prop(Se.lookAhead))&&(_=T[A]+C.length+D)}return w(Q,k,T,$,_,S)}}function b(Q,S,k,T,$,_,A,C,D){let P=[],F=[];for(;Q.length>T;)P.push(Q.pop()),F.push(S.pop()+k-$);Q.push(w(n.types[A],P,F,_-$,C-_,D)),S.push($-k)}function w(Q,S,k,T,$,_,A){if(_){let C=[Se.contextHash,_];A=A?[C].concat(A):[C]}if($>25){let C=[Se.lookAhead,$];A=A?[C].concat(A):[C]}return new et(Q,S,k,T,A)}function g(Q,S){let k=a.fork(),T=0,$=0,_=0,A=k.end-s,C={size:0,start:0,skip:0};e:for(let D=k.pos-Q;k.pos>D;){let P=k.size;if(k.id==S&&P>=0){C.size=T,C.start=$,C.skip=_,_+=4,T+=4,k.next();continue}let F=k.pos-P;if(P<0||F<D||k.start<A)break;let B=k.id>=o?4:0,U=k.start;for(k.next();k.pos>F;){if(k.size<0)if(k.size==-3||k.size==-4)B+=4;else break e;else k.id>=o&&(B+=4);k.next()}$=U,T+=P,_+=B}return(S<0||T==Q)&&(C.size=T,C.start=$,C.skip=_),C.size>4?C:void 0}function p(Q,S,k){let{id:T,start:$,end:_,size:A}=a;if(a.next(),A>=0&&T<o){let C=k;if(A>4){let D=a.pos-(A-4);for(;a.pos>D;)k=p(Q,S,k)}S[--k]=C,S[--k]=_-Q,S[--k]=$-Q,S[--k]=T}else A==-3?u=T:A==-4&&(h=T);return k}let y=[],x=[];for(;a.pos>0;)f(i.start||0,i.bufferStart||0,y,x,-1,0);let O=(e=i.length)!==null&&e!==void 0?e:y.length?x[0]+y[0].length:0;return new et(c[i.topID],y.reverse(),x.reverse(),O)}const Jp=new WeakMap;function fo(i,e){if(!i.isAnonymous||e instanceof Gi||e.type!=i)return 1;let t=Jp.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof et)){t=1;break}t+=fo(i,n)}Jp.set(e,t)}return t}function ic(i,e,t,n,s,r,o,a,c){let u=0;for(let b=n;b<s;b++)u+=fo(i,e[b]);let h=Math.ceil(u*1.5/8),f=[],d=[];function m(b,w,g,p,y){for(let x=g;x<p;){let O=x,Q=w[x],S=fo(i,b[x]);for(x++;x<p;x++){let k=fo(i,b[x]);if(S+k>=h)break;S+=k}if(x==O+1){if(S>h){let k=b[O];m(k.children,k.positions,0,k.children.length,w[O]+y);continue}f.push(b[O])}else{let k=w[x-1]+b[x-1].length-Q;f.push(ic(i,b,w,O,x,Q,k,null,c))}d.push(Q+y-r)}}return m(e,t,n,s,0),(a||c)(f,d,o)}class eS{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof gi?this.setBuffer(e.context.buffer,e.index,t):e instanceof Qt&&this.map.set(e.tree,t)}get(e){return e instanceof gi?this.getBuffer(e.context.buffer,e.index):e instanceof Qt?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class _n{constructor(e,t,n,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new _n(0,e.length,e,0,!1,n)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let a=0,c=0,u=0;;a++){let h=a<t.length?t[a]:null,f=h?h.fromA:1e9;if(f-c>=n)for(;o&&o.from<f;){let d=o;if(c>=d.from||f<=d.to||u){let m=Math.max(d.from,c)-u,b=Math.min(d.to,f)-u;d=m>=b?null:new _n(m,b,d.tree,d.offset+u,a>0,!!h)}if(d&&s.push(d),o.to>f)break;o=r<e.length?e[r++]:null}if(!h)break;c=h.toA,u=h.toA-h.toB}return s}}class em{startParse(e,t,n){return typeof e=="string"&&(e=new tS(e)),n=n?n.length?n.map(s=>new Ga(s.from,s.to)):[new Ga(0,0)]:[new Ga(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let r=s.advance();if(r)return r}}}class tS{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new Se({perNode:!0});let iS=0;class Xt{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=iS++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Xt&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new Xt(n,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new po(e);return n=>n.modified.indexOf(t)>-1?n:po.get(n.base||n,n.modified.concat(t).sort((s,r)=>s.id-r.id))}}let nS=0;class po{constructor(e){this.name=e,this.instances=[],this.id=nS++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>a.base==e&&sS(t,a.modified));if(n)return n;let s=[],r=new Xt(e.name,s,e,t);for(let a of t)a.instances.push(r);let o=rS(t);for(let a of e.set)if(!a.modified.length)for(let c of o)s.push(po.get(a,c));return r}}function sS(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function rS(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function tm(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let r=[],o=2,a=s;for(let f=0;;){if(a=="..."&&f>0&&f+3==s.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+s);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);a=s.slice(f)}let c=r.length-1,u=r[c];if(!u)throw new RangeError("Invalid path: "+s);let h=new Xs(n,o,c>0?r.slice(0,c):null);e[u]=h.sort(e[u])}}return im.add(e)}const im=new Se({combine(i,e){let t,n,s;for(;i||e;){if(!i||e&&i.depth>=e.depth?(s=e,e=e.next):(s=i,i=i.next),t&&t.mode==s.mode&&!s.context&&!t.context)continue;let r=new Xs(s.tags,s.mode,s.context);t?t.next=r:n=r,t=r}return n}});class Xs{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Xs.empty=new Xs([],2,null);function nm(i,e){let t=Object.create(null);for(let r of i)if(!Array.isArray(r.tag))t[r.tag.id]=r.class;else for(let o of r.tag)t[o.id]=r.class;let{scope:n,all:s=null}=e||{};return{style:r=>{let o=s;for(let a of r)for(let c of a.set){let u=t[c.id];if(u){o=o?o+" "+u:u;break}}return o},scope:n}}function oS(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function lS(i,e,t,n=0,s=i.length){let r=new aS(n,Array.isArray(e)?e:[e],t);r.highlightRange(i.cursor(),n,s,"",r.highlighters),r.flush(s)}class aS{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,r){let{type:o,from:a,to:c}=e;if(a>=n||c<=t)return;o.isTop&&(r=this.highlighters.filter(m=>!m.scope||m.scope(o)));let u=s,h=cS(e)||Xs.empty,f=oS(r,h.tags);if(f&&(u&&(u+=" "),u+=f,h.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,a),u),h.opaque)return;let d=e.tree&&e.tree.prop(Se.mounted);if(d&&d.overlay){let m=e.node.enter(d.overlay[0].from+a,1),b=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),w=e.firstChild();for(let g=0,p=a;;g++){let y=g<d.overlay.length?d.overlay[g]:null,x=y?y.from+a:c,O=Math.max(t,p),Q=Math.min(n,x);if(O<Q&&w)for(;e.from<Q&&(this.highlightRange(e,O,Q,s,r),this.startSpan(Math.min(Q,e.to),u),!(e.to>=x||!e.nextSibling())););if(!y||x>n)break;p=y.to+a,p>t&&(this.highlightRange(m.cursor(),Math.max(t,y.from+a),Math.min(n,p),"",b),this.startSpan(Math.min(n,p),u))}w&&e.parent()}else if(e.firstChild()){d&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,r),this.startSpan(Math.min(n,e.to),u)}while(e.nextSibling());e.parent()}}}function cS(i){let e=i.type.prop(im);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const ee=Xt.define,mo=ee(),Ki=ee(),sm=ee(Ki),rm=ee(Ki),Hi=ee(),go=ee(Hi),nc=ee(Hi),Oi=ee(),bn=ee(Oi),_i=ee(),bi=ee(),sc=ee(),Ws=ee(sc),Oo=ee(),M={comment:mo,lineComment:ee(mo),blockComment:ee(mo),docComment:ee(mo),name:Ki,variableName:ee(Ki),typeName:sm,tagName:ee(sm),propertyName:rm,attributeName:ee(rm),className:ee(Ki),labelName:ee(Ki),namespace:ee(Ki),macroName:ee(Ki),literal:Hi,string:go,docString:ee(go),character:ee(go),attributeValue:ee(go),number:nc,integer:ee(nc),float:ee(nc),bool:ee(Hi),regexp:ee(Hi),escape:ee(Hi),color:ee(Hi),url:ee(Hi),keyword:_i,self:ee(_i),null:ee(_i),atom:ee(_i),unit:ee(_i),modifier:ee(_i),operatorKeyword:ee(_i),controlKeyword:ee(_i),definitionKeyword:ee(_i),moduleKeyword:ee(_i),operator:bi,derefOperator:ee(bi),arithmeticOperator:ee(bi),logicOperator:ee(bi),bitwiseOperator:ee(bi),compareOperator:ee(bi),updateOperator:ee(bi),definitionOperator:ee(bi),typeOperator:ee(bi),controlOperator:ee(bi),punctuation:sc,separator:ee(sc),bracket:Ws,angleBracket:ee(Ws),squareBracket:ee(Ws),paren:ee(Ws),brace:ee(Ws),content:Oi,heading:bn,heading1:ee(bn),heading2:ee(bn),heading3:ee(bn),heading4:ee(bn),heading5:ee(bn),heading6:ee(bn),contentSeparator:ee(Oi),list:ee(Oi),quote:ee(Oi),emphasis:ee(Oi),strong:ee(Oi),link:ee(Oi),monospace:ee(Oi),strikethrough:ee(Oi),inserted:ee(),deleted:ee(),changed:ee(),invalid:ee(),meta:Oo,documentMeta:ee(Oo),annotation:ee(Oo),processingInstruction:ee(Oo),definition:Xt.defineModifier("definition"),constant:Xt.defineModifier("constant"),function:Xt.defineModifier("function"),standard:Xt.defineModifier("standard"),local:Xt.defineModifier("local"),special:Xt.defineModifier("special")};for(let i in M){let e=M[i];e instanceof Xt&&(e.name=i)}nm([{tag:M.link,class:"tok-link"},{tag:M.heading,class:"tok-heading"},{tag:M.emphasis,class:"tok-emphasis"},{tag:M.strong,class:"tok-strong"},{tag:M.keyword,class:"tok-keyword"},{tag:M.atom,class:"tok-atom"},{tag:M.bool,class:"tok-bool"},{tag:M.url,class:"tok-url"},{tag:M.labelName,class:"tok-labelName"},{tag:M.inserted,class:"tok-inserted"},{tag:M.deleted,class:"tok-deleted"},{tag:M.literal,class:"tok-literal"},{tag:M.string,class:"tok-string"},{tag:M.number,class:"tok-number"},{tag:[M.regexp,M.escape,M.special(M.string)],class:"tok-string2"},{tag:M.variableName,class:"tok-variableName"},{tag:M.local(M.variableName),class:"tok-variableName tok-local"},{tag:M.definition(M.variableName),class:"tok-variableName tok-definition"},{tag:M.special(M.variableName),class:"tok-variableName2"},{tag:M.definition(M.propertyName),class:"tok-propertyName tok-definition"},{tag:M.typeName,class:"tok-typeName"},{tag:M.namespace,class:"tok-namespace"},{tag:M.className,class:"tok-className"},{tag:M.macroName,class:"tok-macroName"},{tag:M.propertyName,class:"tok-propertyName"},{tag:M.operator,class:"tok-operator"},{tag:M.comment,class:"tok-comment"},{tag:M.meta,class:"tok-meta"},{tag:M.invalid,class:"tok-invalid"},{tag:M.punctuation,class:"tok-punctuation"}]);var rc;const Wn=new Se;function om(i){return ae.define({combine:i?e=>e.concat(i):void 0})}const oc=new Se;class Jt{constructor(e,t,n=[],s=""){this.data=e,this.name=s,Ce.prototype.hasOwnProperty("tree")||Object.defineProperty(Ce.prototype,"tree",{get(){return st(this)}}),this.parser=t,this.extension=[Ji.of(this),Ce.languageData.of((r,o,a)=>{let c=lm(r,o,a),u=c.type.prop(Wn);if(!u)return[];let h=r.facet(u),f=c.type.prop(oc);if(f){let d=c.resolve(o-c.from,a);for(let m of f)if(m.test(d,r)){let b=r.facet(m.facet);return m.type=="replace"?b:b.concat(h)}}return h})].concat(n)}isActiveAt(e,t,n=-1){return lm(e,t,n).type.prop(Wn)==this.data}findRegions(e){let t=e.facet(Ji);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(r,o)=>{if(r.prop(Wn)==this.data){n.push({from:o,to:o+r.length});return}let a=r.prop(Se.mounted);if(a){if(a.tree.prop(Wn)==this.data){if(a.overlay)for(let c of a.overlay)n.push({from:c.from+o,to:c.to+o});else n.push({from:o,to:o+r.length});return}else if(a.overlay){let c=n.length;if(s(a.tree,a.overlay[0].from+o),n.length>c)return}}for(let c=0;c<r.children.length;c++){let u=r.children[c];u instanceof et&&s(u,r.positions[c]+o)}};return s(st(e),0),n}get allowsNesting(){return!0}}Jt.setState=ke.define();function lm(i,e,t){let n=i.facet(Ji),s=st(i).topNode;if(!n||n.allowsNesting)for(let r=s;r;r=r.enter(e,t,nt.ExcludeBuffers))r.type.isTop&&(s=r);return s}class _o extends Jt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=om(e.languageData);return new _o(t,e.parser.configure({props:[Wn.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new _o(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function st(i){let e=i.field(Jt.state,!1);return e?e.tree:et.empty}class uS{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let qs=null;class bo{constructor(e,t,n=[],s,r,o,a,c){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new bo(e,t,[],et.empty,0,n,[],null)}startParse(){return this.parser.startParse(new uS(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=et.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(_n.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(_n.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=qs;qs=this;try{return e()}finally{qs=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=am(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((u,h,f,d)=>c.push({fromA:u,toA:h,fromB:f,toB:d})),n=_n.applyChanges(n,c),s=et.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let h=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);h<f&&a.push({from:h,to:f})}}}return new bo(this.parser,t,n,s,r,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:r}=this.skipped[n];s<e.to&&r>e.from&&(this.fragments=am(this.fragments,s,r),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends em{createParse(t,n,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let c=qs;if(c){for(let u of s)c.tempSkipped.push(u);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new et(Pt.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return qs}}function am(i,e,t){return _n.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class qn{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new qn(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=bo.create(e.facet(Ji).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new qn(n)}}Jt.state=rt.define({create:qn.init,update(i,e){for(let t of e.effects)if(t.is(Jt.setState))return t.value;return e.startState.facet(Ji)!=e.state.facet(Ji)?qn.init(e.state):i.apply(e)}});let cm=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(cm=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const lc=typeof navigator<"u"&&(!((rc=navigator.scheduling)===null||rc===void 0)&&rc.isInputPending)?()=>navigator.scheduling.isInputPending():null,hS=Ge.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Jt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Jt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=cm(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,r=n.field(Jt.state);if(r.tree==r.context.tree&&r.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!lc?Math.max(25,e.timeRemaining()-5):1e9),a=r.context.treeLen<s&&n.doc.length>s+1e3,c=r.context.work(()=>lc&&lc()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Jt.setState.of(new qn(r.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Tt(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ji=ae.define({combine(i){return i.length?i[0]:null},enables:i=>[Jt.state,hS,ie.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class fS{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const dS=ae.define(),js=ae.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function yo(i){let e=i.facet(js);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function zs(i,e){let t="",n=i.tabSize,s=i.facet(js)[0];if(s==" "){for(;e>=n;)t+=" ",e-=n;s=" "}for(let r=0;r<e;r++)t+=s;return t}function ac(i,e){i instanceof Ce&&(i=new wo(i));for(let n of i.state.facet(dS)){let s=n(i,e);if(s!==void 0)return s}let t=st(i.state);return t.length>=e?pS(i,t,e):null}class wo{constructor(e,t={}){this.state=e,this.options=t,this.unit=yo(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=n.from&&s<=n.to?r&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.countColumn(n,e-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return Mn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const um=new Se;function pS(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let r=[];for(let o=s;o&&!(o.from<n.node.from||o.to>n.node.to||o.from==n.node.from&&o.type==n.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)n={node:r[o],next:n}}return hm(n,i,t)}function hm(i,e,t){for(let n=i;n;n=n.next){let s=gS(n.node);if(s)return s(cc.create(e,t,n))}return 0}function mS(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function gS(i){let e=i.type.prop(um);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(Se.closedBy))){let s=i.lastChild,r=s&&n.indexOf(s.name)>-1;return o=>fm(o,!0,1,void 0,r&&!mS(o)?s.from:void 0)}return i.parent==null?OS:null}function OS(){return 0}class cc extends wo{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new cc(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(_S(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return hm(this.context.next,this.base,this.pos)}}function _S(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function bS(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,r=i.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let a=t.to;;){let c=e.childAfter(a);if(!c||c==n)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let u=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+u}}a=c.to}}function yS({closing:i,align:e=!0,units:t=1}){return n=>fm(n,e,t,i)}function fm(i,e,t,n,s){let r=i.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==i.pos+o,c=e?bS(i):null;return c?a?i.column(c.from):i.column(c.to):i.baseIndent+(a?0:i.unit*t)}const wS=i=>i.baseIndent;function uc({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const kS=200;function xS(){return Ce.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+kS)return i;let r=t.sliceString(s.from,n);if(!e.some(u=>u.test(r)))return i;let{state:o}=i,a=-1,c=[];for(let{head:u}of o.selection.ranges){let h=o.doc.lineAt(u);if(h.from==a)continue;a=h.from;let f=ac(o,h.from);if(f==null)continue;let d=/^\s*/.exec(h.text)[0],m=zs(o,f);d!=m&&c.push({from:h.from,to:h.from+d.length,insert:m})}return c.length?[i,{changes:c,sequential:!0}]:i})}const SS=ae.define(),dm=new Se;function CS(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function AS(i,e,t){let n=st(i);if(n.length<t)return null;let s=n.resolveStack(t,1),r=null;for(let o=s;o;o=o.next){let a=o.node;if(a.to<=t||a.from>t)continue;if(r&&a.from<e)break;let c=a.type.prop(dm);if(c&&(a.to<n.length-50||n.length==i.doc.length||!TS(a))){let u=c(a,i);u&&u.from<=t&&u.from>=e&&u.to>t&&(r=u)}}return r}function TS(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function ko(i,e,t){for(let n of i.facet(SS)){let s=n(i,e,t);if(s)return s}return AS(i,e,t)}function pm(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const xo=ke.define({map:pm}),Ys=ke.define({map:pm});function mm(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const yn=rt.define({create(){return me.none},update(i,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,n)=>i=gm(i,t,n)),i=i.map(e.changes);for(let t of e.effects)if(t.is(xo)&&!PS(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(hc),s=n?me.replace({widget:new RS(n(e.state,t.value))}):wm;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Ys)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(i=gm(i,e.selection.main.head)),i},provide:i=>ie.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(wm.range(n,s))}return me.set(e,!0)}});function gm(i,e,t=e){let n=!1;return i.between(e,t,(s,r)=>{s<t&&r>e&&(n=!0)}),n?i.update({filterFrom:e,filterTo:t,filter:(s,r)=>s>=t||r<=e}):i}function So(i,e,t){var n;let s=null;return(n=i.field(yn,!1))===null||n===void 0||n.between(e,t,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function PS(i,e,t){let n=!1;return i.between(e,e,(s,r)=>{s==e&&r==t&&(n=!0)}),n}function Om(i,e){return i.field(yn,!1)?e:e.concat(ke.appendConfig.of(bm()))}const QS=i=>{for(let e of mm(i)){let t=ko(i.state,e.from,e.to);if(t)return i.dispatch({effects:Om(i.state,[xo.of(t),_m(i,t)])}),!0}return!1},ES=i=>{if(!i.state.field(yn,!1))return!1;let e=[];for(let t of mm(i)){let n=So(i.state,t.from,t.to);n&&e.push(Ys.of(n),_m(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function _m(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return ie.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const $S=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:QS},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ES},{key:"Ctrl-Alt-[",run:i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),r=ko(e,s.from,s.to);r&&t.push(xo.of(r)),n=(r?i.lineBlockAt(r.to):s).to+1}return t.length&&i.dispatch({effects:Om(i.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:i=>{let e=i.state.field(yn,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Ys.of({from:n,to:s}))}),i.dispatch({effects:t}),!0}}],NS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},hc=ae.define({combine(i){return hi(i,NS)}});function bm(i){let e=[yn,MS];return i&&e.push(hc.of(i)),e}function ym(i,e){let{state:t}=i,n=t.facet(hc),s=o=>{let a=i.lineBlockAt(i.posAtDOM(o.target)),c=So(i.state,a.from,a.to);c&&i.dispatch({effects:Ys.of(c)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const wm=me.replace({widget:new class extends di{toDOM(i){return ym(i,null)}}});class RS extends di{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ym(e,this.value)}}const VS={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class fc extends Ni{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function LS(i={}){let e={...VS,...i},t=new fc(e,!0),n=new fc(e,!1),s=Ge.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Ji)!=o.state.facet(Ji)||o.startState.field(yn,!1)!=o.state.field(yn,!1)||st(o.startState)!=st(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Ti;for(let c of o.viewportLineBlocks){let u=So(o.state,c.from,c.to)?n:ko(o.state,c.from,c.to)?t:null;u&&a.add(c.from,c.from,u)}return a.finish()}}),{domEventHandlers:r}=e;return[s,Dx({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(s))===null||a===void 0?void 0:a.markers)||Re.empty},initialSpacer(){return new fc(e,!1)},domEventHandlers:{...r,click:(o,a,c)=>{if(r.click&&r.click(o,a,c))return!0;let u=So(o.state,a.from,a.to);if(u)return o.dispatch({effects:Ys.of(u)}),!0;let h=ko(o.state,a.from,a.to);return h?(o.dispatch({effects:xo.of(h)}),!0):!1}}}),bm()]}const MS=ie.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Gs{constructor(e,t){this.specs=e;let n;function s(a){let c=Wi.newName();return(n||(n=Object.create(null)))["."+c]=a,c}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Jt?a=>a.prop(Wn)==o.data:o?a=>a==o:void 0,this.style=nm(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:r}).style,this.module=n?new Wi(n):null,this.themeType=t.themeType}static define(e,t){return new Gs(e,t||{})}}const dc=ae.define(),km=ae.define({combine(i){return i.length?[i[0]]:null}});function pc(i){let e=i.facet(dc);return e.length?e:i.facet(km)}function xm(i,e){let t=[vS],n;return i instanceof Gs&&(i.module&&t.push(ie.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(km.of(i)):n?t.push(dc.computeN([ie.darkTheme],s=>s.facet(ie.darkTheme)==(n=="dark")?[i]:[])):t.push(dc.of(i)),t}class DS{constructor(e){this.markCache=Object.create(null),this.tree=st(e.state),this.decorations=this.buildDeco(e,pc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=st(e.state),n=pc(e.state),s=n!=pc(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!s&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return me.none;let n=new Ti;for(let{from:s,to:r}of e.visibleRanges)lS(this.tree,t,(o,a,c)=>{n.add(o,a,this.markCache[c]||(this.markCache[c]=me.mark({class:c})))},s,r);return n.finish()}}const vS=Xi.high(Ge.fromClass(DS,{decorations:i=>i.decorations})),BS=Gs.define([{tag:M.meta,color:"#404740"},{tag:M.link,textDecoration:"underline"},{tag:M.heading,textDecoration:"underline",fontWeight:"bold"},{tag:M.emphasis,fontStyle:"italic"},{tag:M.strong,fontWeight:"bold"},{tag:M.strikethrough,textDecoration:"line-through"},{tag:M.keyword,color:"#708"},{tag:[M.atom,M.bool,M.url,M.contentSeparator,M.labelName],color:"#219"},{tag:[M.literal,M.inserted],color:"#164"},{tag:[M.string,M.deleted],color:"#a11"},{tag:[M.regexp,M.escape,M.special(M.string)],color:"#e40"},{tag:M.definition(M.variableName),color:"#00f"},{tag:M.local(M.variableName),color:"#30a"},{tag:[M.typeName,M.namespace],color:"#085"},{tag:M.className,color:"#167"},{tag:[M.special(M.variableName),M.macroName],color:"#256"},{tag:M.definition(M.propertyName),color:"#00c"},{tag:M.comment,color:"#940"},{tag:M.invalid,color:"#f00"}]),IS=ie.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Sm=1e4,Cm="()[]{}",Am=ae.define({combine(i){return hi(i,{afterCursor:!0,brackets:Cm,maxScanDistance:Sm,renderMatch:US})}}),ZS=me.mark({class:"cm-matchingBracket"}),FS=me.mark({class:"cm-nonmatchingBracket"});function US(i){let e=[],t=i.matched?ZS:FS;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const XS=[rt.define({create(){return me.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(Am);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=yi(e.state,s.head,-1,n)||s.head>0&&yi(e.state,s.head-1,1,n)||n.afterCursor&&(yi(e.state,s.head,1,n)||s.head<e.state.doc.length&&yi(e.state,s.head+1,-1,n));r&&(t=t.concat(n.renderMatch(r,e.state)))}return me.set(t,!0)},provide:i=>ie.decorations.from(i)}),IS];function WS(i={}){return[Am.of(i),XS]}const qS=new Se;function mc(i,e,t){let n=i.prop(e<0?Se.openedBy:Se.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function gc(i){let e=i.type.prop(qS);return e?e(i.node):i}function yi(i,e,t,n={}){let s=n.maxScanDistance||Sm,r=n.brackets||Cm,o=st(i),a=o.resolveInner(e,t);for(let c=a;c;c=c.parent){let u=mc(c.type,t,r);if(u&&c.from<c.to){let h=gc(c);if(h&&(t>0?e>=h.from&&e<h.to:e>h.from&&e<=h.to))return jS(i,e,t,c,h,u,r)}}return zS(i,e,t,o,a.type,s,r)}function jS(i,e,t,n,s,r,o){let a=n.parent,c={from:s.from,to:s.to},u=0,h=a==null?void 0:a.cursor();if(h&&(t<0?h.childBefore(n.from):h.childAfter(n.to)))do if(t<0?h.to<=n.from:h.from>=n.to){if(u==0&&r.indexOf(h.type.name)>-1&&h.from<h.to){let f=gc(h);return{start:c,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(mc(h.type,t,o))u++;else if(mc(h.type,-t,o)){if(u==0){let f=gc(h);return{start:c,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}u--}}while(t<0?h.prevSibling():h.nextSibling());return{start:c,matched:!1}}function zS(i,e,t,n,s,r,o){let a=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),c=o.indexOf(a);if(c<0||c%2==0!=t>0)return null;let u={from:t<0?e-1:e,to:t>0?e+1:e},h=i.doc.iterRange(e,t>0?i.doc.length:0),f=0;for(let d=0;!h.next().done&&d<=r;){let m=h.value;t<0&&(d+=m.length);let b=e+d*t;for(let w=t>0?0:m.length-1,g=t>0?m.length:-1;w!=g;w+=t){let p=o.indexOf(m[w]);if(!(p<0||n.resolveInner(b+w,1).type!=s))if(p%2==0==t>0)f++;else{if(f==1)return{start:u,end:{from:b+w,to:b+w+1},matched:p>>1==c>>1};f--}}t>0&&(d+=m.length)}return h.done?{start:u,matched:!1}:null}const YS=Object.create(null),Tm=[Pt.none],Pm=[],Qm=Object.create(null),GS=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])GS[i]=KS(YS,e);function Oc(i,e){Pm.indexOf(i)>-1||(Pm.push(i),console.warn(e))}function KS(i,e){let t=[];for(let a of e.split(" ")){let c=[];for(let u of a.split(".")){let h=i[u]||M[u];h?typeof h=="function"?c.length?c=c.map(h):Oc(u,`Modifier ${u} used at start of tag`):c.length?Oc(u,`Tag ${u} used as modifier`):c=Array.isArray(h)?h:[h]:Oc(u,`Unknown highlighting tag ${u}`)}for(let u of c)t.push(u)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(a=>a.id),r=Qm[s];if(r)return r.id;let o=Qm[s]=Pt.define({id:Tm.length,name:n,props:[tm({[n]:t})]});return Tm.push(o),o.id}Fe.RTL,Fe.LTR;const HS=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=bc(i.state,t.from);return n.line?JS(i):n.block?tC(i):!1};function _c(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const JS=_c(sC,0),eC=_c(Em,0),tC=_c((i,e)=>Em(i,e,nC(e)),0);function bc(i,e){let t=i.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const Ks=50;function iC(i,{open:e,close:t},n,s){let r=i.sliceDoc(n-Ks,n),o=i.sliceDoc(s,s+Ks),a=/\s*$/.exec(r)[0].length,c=/^\s*/.exec(o)[0].length,u=r.length-a;if(r.slice(u-e.length,u)==e&&o.slice(c,c+t.length)==t)return{open:{pos:n-a,margin:a&&1},close:{pos:s+c,margin:c&&1}};let h,f;s-n<=2*Ks?h=f=i.sliceDoc(n,s):(h=i.sliceDoc(n,n+Ks),f=i.sliceDoc(s-Ks,s));let d=/^\s*/.exec(h)[0].length,m=/\s*$/.exec(f)[0].length,b=f.length-m-t.length;return h.slice(d,d+e.length)==e&&f.slice(b,b+t.length)==t?{open:{pos:n+d+e.length,margin:/\s/.test(h.charAt(d+e.length))?1:0},close:{pos:s-m-t.length,margin:/\s/.test(f.charAt(b-1))?1:0}}:null}function nC(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let r=e.length-1;r>=0&&e[r].to>n.from?e[r].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function Em(i,e,t=e.selection.ranges){let n=t.map(r=>bc(e,r.from).block);if(!n.every(r=>r))return null;let s=t.map((r,o)=>iC(e,n[o],r.from,r.to));if(i!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:n[o].open+" "},{from:r.to,insert:" "+n[o].close}]))};if(i!=1&&s.some(r=>r)){let r=[];for(let o=0,a;o<s.length;o++)if(a=s[o]){let c=n[o],{open:u,close:h}=a;r.push({from:u.pos-c.open.length,to:u.pos+u.margin},{from:h.pos-h.margin,to:h.pos+c.close.length})}return{changes:r}}return null}function sC(i,e,t=e.selection.ranges){let n=[],s=-1;for(let{from:r,to:o}of t){let a=n.length,c=1e9,u=bc(e,r).line;if(u){for(let h=r;h<=o;){let f=e.doc.lineAt(h);if(f.from>s&&(r==o||o>f.from)){s=f.from;let d=/^\s*/.exec(f.text)[0].length,m=d==f.length,b=f.text.slice(d,d+u.length)==u?d:-1;d<f.text.length&&d<c&&(c=d),n.push({line:f,comment:b,token:u,indent:d,empty:m,single:!1})}h=f.to+1}if(c<1e9)for(let h=a;h<n.length;h++)n[h].indent<n[h].line.text.length&&(n[h].indent=c);n.length==a+1&&(n[a].single=!0)}}if(i!=2&&n.some(r=>r.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:a,token:c,indent:u,empty:h,single:f}of n)(f||!h)&&r.push({from:a.from+u,insert:c+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:a,token:c}of n)if(a>=0){let u=o.from+a,h=u+c.length;o.text[h-o.from]==" "&&h++,r.push({from:u,to:h})}return{changes:r}}return null}const yc=Ai.define(),rC=Ai.define(),oC=ae.define(),$m=ae.define({combine(i){return hi(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),Nm=rt.define({create(){return wi.empty},update(i,e){let t=e.state.facet($m),n=e.annotation(yc);if(n){let c=Et.fromTransaction(e,n.selection),u=n.side,h=u==0?i.undone:i.done;return c?h=Ao(h,h.length,t.minDepth,c):h=Lm(h,e.startState.selection),new wi(u==0?n.rest:h,u==0?h:n.rest)}let s=e.annotation(rC);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(He.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let r=Et.fromTransaction(e),o=e.annotation(He.time),a=e.annotation(He.userEvent);return r?i=i.addChanges(r,o,a,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new wi(i.done.map(Et.fromJSON),i.undone.map(Et.fromJSON))}});function lC(i={}){return[Nm,$m.of(i),ie.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Rm:e.inputType=="historyRedo"?wc:null;return n?(e.preventDefault(),n(t)):!1}})]}function Co(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(Nm,!1);if(!s)return!1;let r=s.pop(i,t,e);return r?(n(r),!0):!1}}const Rm=Co(0,!1),wc=Co(1,!1),aC=Co(0,!0),cC=Co(1,!0);class Et{constructor(e,t,n,s,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Et(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Et(e.changes&&it.fromJSON(e.changes),[],e.mapped&&ui.fromJSON(e.mapped),e.startSelection&&W.fromJSON(e.startSelection),e.selectionsAfter.map(W.fromJSON))}static fromTransaction(e,t){let n=Wt;for(let s of e.startState.facet(oC)){let r=s(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Et(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Wt)}static selection(e){return new Et(void 0,Wt,void 0,void 0,e)}}function Ao(i,e,t,n){let s=e+1>t+20?e-t-1:0,r=i.slice(s,e);return r.push(n),r}function uC(i,e){let t=[],n=!1;return i.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,a)=>{for(let c=0;c<t.length;){let u=t[c++],h=t[c++];a>=u&&o<=h&&(n=!0)}}),n}function hC(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function Vm(i,e){return i.length?e.length?i.concat(e):i:e}const Wt=[],fC=200;function Lm(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-fC));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),Ao(i,i.length-1,1e9,t.setSelAfter(n)))}else return[Et.selection([e])]}function dC(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function kc(i,e){if(!i.length)return i;let t=i.length,n=Wt;for(;t;){let s=pC(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let r=i.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[Et.selection(n)]:Wt}function pC(i,e,t){let n=Vm(i.selectionsAfter.length?i.selectionsAfter.map(a=>a.map(e)):Wt,t);if(!i.changes)return Et.selection(n);let s=i.changes.map(e),r=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(r):r;return new Et(s,ke.mapEffects(i.effects,e),o,i.startSelection.map(r),n)}const mC=/^(input\.type|delete)($|\.)/;class wi{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new wi(this.done,this.undone):this}addChanges(e,t,n,s,r){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||mC.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,uC(a.changes,e.changes))||n=="input.type.compose")?o=Ao(o,o.length-1,s.minDepth,new Et(e.changes.compose(a.changes),Vm(ke.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Wt)):o=Ao(o,o.length,s.minDepth,e),new wi(o,Wt,t,n)}addSelection(e,t,n,s){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:Wt;return r.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&hC(r[r.length-1],e)?this:new wi(Lm(this.done,e),this.undone,t,n)}addMapping(e){return new wi(kc(this.done,e),kc(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let r=s[s.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:yc.of({side:e,rest:dC(s),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let a=s.length==1?Wt:s.slice(0,s.length-1);return r.mapped&&(a=kc(a,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:yc.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}wi.empty=new wi(Wt,Wt);const gC=[{key:"Mod-z",run:Rm,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:wc,preventDefault:!0},{linux:"Ctrl-Shift-z",run:wc,preventDefault:!0},{key:"Mod-u",run:aC,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:cC,preventDefault:!0}];function jn(i,e){return W.create(i.ranges.map(e),i.mainIndex)}function ei(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ti({state:i,dispatch:e},t){let n=jn(i.selection,t);return n.eq(i.selection,!0)?!1:(e(ei(i,n)),!0)}function To(i,e){return W.cursor(e?i.to:i.from)}function Mm(i,e){return ti(i,t=>t.empty?i.moveByChar(t,e):To(t,e))}function _t(i){return i.textDirectionAt(i.state.selection.main.head)==Fe.LTR}const Dm=i=>Mm(i,!_t(i)),vm=i=>Mm(i,_t(i));function Bm(i,e){return ti(i,t=>t.empty?i.moveByGroup(t,e):To(t,e))}const OC=i=>Bm(i,!_t(i)),_C=i=>Bm(i,_t(i));function bC(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function Po(i,e,t){let n=st(i).resolveInner(e.head),s=t?Se.closedBy:Se.openedBy;for(let c=e.head;;){let u=t?n.childAfter(c):n.childBefore(c);if(!u)break;bC(i,u,s)?n=u:c=t?u.to:u.from}let r=n.type.prop(s),o,a;return r&&(o=t?yi(i,n.from,1):yi(i,n.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?n.to:n.from,W.cursor(a,t?-1:1)}const yC=i=>ti(i,e=>Po(i.state,e,!_t(i))),wC=i=>ti(i,e=>Po(i.state,e,_t(i)));function Im(i,e){return ti(i,t=>{if(!t.empty)return To(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const Zm=i=>Im(i,!1),Fm=i=>Im(i,!0);function Um(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let r of i.state.facet(ie.scrollMargins)){let o=r(i);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(n=Math.max(o==null?void 0:o.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function Xm(i,e){let t=Um(i),{state:n}=i,s=jn(n.selection,o=>o.empty?i.moveVertically(o,e,t.height):To(o,e));if(s.eq(n.selection))return!1;let r;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),a=i.scrollDOM.getBoundingClientRect(),c=a.top+t.marginTop,u=a.bottom-t.marginBottom;o&&o.top>c&&o.bottom<u&&(r=ie.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-c}))}return i.dispatch(ei(n,s),{effects:r}),!0}const Wm=i=>Xm(i,!1),xc=i=>Xm(i,!0);function en(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let r=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&e.head!=n.from+r&&(s=W.cursor(n.from+r))}return s}const kC=i=>ti(i,e=>en(i,e,!0)),xC=i=>ti(i,e=>en(i,e,!1)),SC=i=>ti(i,e=>en(i,e,!_t(i))),CC=i=>ti(i,e=>en(i,e,_t(i))),AC=i=>ti(i,e=>W.cursor(i.lineBlockAt(e.head).from,1)),TC=i=>ti(i,e=>W.cursor(i.lineBlockAt(e.head).to,-1));function PC(i,e,t){let n=!1,s=jn(i.selection,r=>{let o=yi(i,r.head,-1)||yi(i,r.head,1)||r.head>0&&yi(i,r.head-1,1)||r.head<i.doc.length&&yi(i,r.head+1,-1);if(!o||!o.end)return r;n=!0;let a=o.start.from==r.head?o.end.to:o.end.from;return t?W.range(r.anchor,a):W.cursor(a)});return n?(e(ei(i,s)),!0):!1}const QC=({state:i,dispatch:e})=>PC(i,e,!1);function qt(i,e){let t=jn(i.state.selection,n=>{let s=e(n);return W.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(ei(i.state,t)),!0)}function qm(i,e){return qt(i,t=>i.moveByChar(t,e))}const jm=i=>qm(i,!_t(i)),zm=i=>qm(i,_t(i));function Ym(i,e){return qt(i,t=>i.moveByGroup(t,e))}const EC=i=>Ym(i,!_t(i)),$C=i=>Ym(i,_t(i)),NC=i=>qt(i,e=>Po(i.state,e,!_t(i))),RC=i=>qt(i,e=>Po(i.state,e,_t(i)));function Gm(i,e){return qt(i,t=>i.moveVertically(t,e))}const Km=i=>Gm(i,!1),Hm=i=>Gm(i,!0);function Jm(i,e){return qt(i,t=>i.moveVertically(t,e,Um(i).height))}const eg=i=>Jm(i,!1),tg=i=>Jm(i,!0),VC=i=>qt(i,e=>en(i,e,!0)),LC=i=>qt(i,e=>en(i,e,!1)),MC=i=>qt(i,e=>en(i,e,!_t(i))),DC=i=>qt(i,e=>en(i,e,_t(i))),vC=i=>qt(i,e=>W.cursor(i.lineBlockAt(e.head).from)),BC=i=>qt(i,e=>W.cursor(i.lineBlockAt(e.head).to)),ig=({state:i,dispatch:e})=>(e(ei(i,{anchor:0})),!0),ng=({state:i,dispatch:e})=>(e(ei(i,{anchor:i.doc.length})),!0),sg=({state:i,dispatch:e})=>(e(ei(i,{anchor:i.selection.main.anchor,head:0})),!0),rg=({state:i,dispatch:e})=>(e(ei(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),IC=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),ZC=({state:i,dispatch:e})=>{let t=Eo(i).map(({from:n,to:s})=>W.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:W.create(t),userEvent:"select"})),!0},FC=({state:i,dispatch:e})=>{let t=jn(i.selection,n=>{let s=st(i),r=s.resolveStack(n.from,1);if(n.empty){let o=s.resolveStack(n.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:a}=o;if((a.from<n.from&&a.to>=n.to||a.to>n.to&&a.from<=n.from)&&o.next)return W.range(a.to,a.from)}return n});return t.eq(i.selection)?!1:(e(ei(i,t)),!0)};function og(i,e){let{state:t}=i,n=t.selection,s=t.selection.ranges.slice();for(let r of t.selection.ranges){let o=t.doc.lineAt(r.head);if(e?o.to<i.state.doc.length:o.from>0)for(let a=r;;){let c=i.moveVertically(a,e);if(c.head<o.from||c.head>o.to){s.some(u=>u.head==c.head)||s.push(c);break}else{if(c.head==a.head)break;a=c}}}return s.length==n.ranges.length?!1:(i.dispatch(ei(t,W.create(s,s.length-1))),!0)}const UC=i=>og(i,!1),XC=i=>og(i,!0),WC=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=W.create([t.main]):t.main.empty||(n=W.create([W.cursor(t.main.head)])),n?(e(ei(i,n)),!0):!1};function Hs(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(r=>{let{from:o,to:a}=r;if(o==a){let c=e(r);c<o?(t="delete.backward",c=Qo(i,c,!1)):c>o&&(t="delete.forward",c=Qo(i,c,!0)),o=Math.min(o,c),a=Math.max(a,c)}else o=Qo(i,o,!1),a=Qo(i,a,!0);return o==a?{range:r}:{changes:{from:o,to:a},range:W.cursor(o,o<r.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?ie.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Qo(i,e,t){if(i instanceof ie)for(let n of i.state.facet(ie.atomicRanges).map(s=>s(i)))n.between(e,e,(s,r)=>{s<e&&r>e&&(e=t?r:s)});return e}const lg=(i,e,t)=>Hs(i,n=>{let s=n.from,{state:r}=i,o=r.doc.lineAt(s),a,c;if(t&&!e&&s>o.from&&s<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,s-o.from))){if(a[a.length-1]==" ")return s-1;let u=Mn(a,r.tabSize),h=u%yo(r)||yo(r);for(let f=0;f<h&&a[a.length-1-f]==" ";f++)s--;c=s}else c=ht(o.text,s-o.from,e,e)+o.from,c==s&&o.number!=(e?r.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,s-o.from))&&(c=ht(o.text,c-o.from,!1,!1)+o.from);return c}),Sc=i=>lg(i,!1,!0),ag=i=>lg(i,!0,!1),cg=(i,e)=>Hs(i,t=>{let n=t.head,{state:s}=i,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let a=null;;){if(n==(e?r.to:r.from)){n==t.head&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let c=ht(r.text,n-r.from,e)+r.from,u=r.text.slice(Math.min(n,c)-r.from,Math.max(n,c)-r.from),h=o(u);if(a!=null&&h!=a)break;(u!=" "||n!=t.head)&&(a=h),n=c}return n}),ug=i=>cg(i,!1),qC=i=>cg(i,!0),jC=i=>Hs(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),zC=i=>Hs(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),YC=i=>Hs(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),GC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Pe.of(["",""])},range:W.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},KC=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,r=i.doc.lineAt(s),o=s==r.from?s-1:ht(r.text,s-r.from,!1)+r.from,a=s==r.to?s+1:ht(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:a,insert:i.doc.slice(s,a).append(i.doc.slice(o,s))},range:W.cursor(a)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Eo(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),r=i.doc.lineAt(n.to);if(!n.empty&&n.to==r.from&&(r=i.doc.lineAt(n.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(n)}else e.push({from:s.from,to:r.to,ranges:[n]});t=r.number+1}return e}function hg(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let r of Eo(i)){if(t?r.to==i.doc.length:r.from==0)continue;let o=i.doc.lineAt(t?r.to+1:r.from-1),a=o.length+1;if(t){n.push({from:r.to,to:o.to},{from:r.from,insert:o.text+i.lineBreak});for(let c of r.ranges)s.push(W.range(Math.min(i.doc.length,c.anchor+a),Math.min(i.doc.length,c.head+a)))}else{n.push({from:o.from,to:r.from},{from:r.to,insert:i.lineBreak+o.text});for(let c of r.ranges)s.push(W.range(c.anchor-a,c.head-a))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:W.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const HC=({state:i,dispatch:e})=>hg(i,e,!1),JC=({state:i,dispatch:e})=>hg(i,e,!0);function fg(i,e,t){if(i.readOnly)return!1;let n=[];for(let s of Eo(i))t?n.push({from:s.from,insert:i.doc.slice(s.from,s.to)+i.lineBreak}):n.push({from:s.to,insert:i.lineBreak+i.doc.slice(s.from,s.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const eA=({state:i,dispatch:e})=>fg(i,e,!1),tA=({state:i,dispatch:e})=>fg(i,e,!0),iA=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(Eo(e).map(({from:s,to:r})=>(s>0?s--:r<e.doc.length&&r++,{from:s,to:r}))),n=jn(e.selection,s=>{let r;if(i.lineWrapping){let o=i.lineBlockAt(s.head),a=i.coordsAtPos(s.head,s.assoc||1);a&&(r=o.bottom+i.documentTop-a.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,r)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function nA(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=st(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),r;return n&&s&&n.to<=e&&s.from>=e&&(r=n.type.prop(Se.closedBy))&&r.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const dg=pg(!1),sA=pg(!0);function pg(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:r,to:o}=s,a=e.doc.lineAt(r),c=!i&&r==o&&nA(e,r);i&&(r=o=(o<=a.to?a:e.doc.lineAt(o)).to);let u=new wo(e,{simulateBreak:r,simulateDoubleBreak:!!c}),h=ac(u,r);for(h==null&&(h=Mn(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;c?{from:r,to:o}=c:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let f=["",zs(e,h)];return c&&f.push(zs(e,u.lineIndent(a.from,-1))),{changes:{from:r,to:o,insert:Pe.of(f)},range:W.cursor(r+1+f[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Cc(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let a=i.doc.lineAt(o);a.number>t&&(n.empty||n.to>a.from)&&(e(a,s,n),t=a.number),o=a.to+1}let r=i.changes(s);return{changes:s,range:W.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}})}const rA=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new wo(i,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=Cc(i,(r,o,a)=>{let c=ac(n,r.from);if(c==null)return;/\S/.test(r.text)||(c=0);let u=/^\s*/.exec(r.text)[0],h=zs(i,c);(u!=h||a.from<r.from+u.length)&&(t[r.from]=c,o.push({from:r.from,to:r.from+u.length,insert:h}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},mg=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Cc(i,(t,n)=>{n.push({from:t.from,insert:i.facet(js)})}),{userEvent:"input.indent"})),!0),gg=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(Cc(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Mn(s,i.tabSize),o=0,a=zs(i,Math.max(0,r-yo(i)));for(;o<s.length&&o<a.length&&s.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+s.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),oA=i=>(i.setTabFocusMode(),!0),lA=[{key:"Ctrl-b",run:Dm,shift:jm,preventDefault:!0},{key:"Ctrl-f",run:vm,shift:zm},{key:"Ctrl-p",run:Zm,shift:Km},{key:"Ctrl-n",run:Fm,shift:Hm},{key:"Ctrl-a",run:AC,shift:vC},{key:"Ctrl-e",run:TC,shift:BC},{key:"Ctrl-d",run:ag},{key:"Ctrl-h",run:Sc},{key:"Ctrl-k",run:jC},{key:"Ctrl-Alt-h",run:ug},{key:"Ctrl-o",run:GC},{key:"Ctrl-t",run:KC},{key:"Ctrl-v",run:xc}],aA=[{key:"ArrowLeft",run:Dm,shift:jm,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:OC,shift:EC,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:SC,shift:MC,preventDefault:!0},{key:"ArrowRight",run:vm,shift:zm,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:_C,shift:$C,preventDefault:!0},{mac:"Cmd-ArrowRight",run:CC,shift:DC,preventDefault:!0},{key:"ArrowUp",run:Zm,shift:Km,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ig,shift:sg},{mac:"Ctrl-ArrowUp",run:Wm,shift:eg},{key:"ArrowDown",run:Fm,shift:Hm,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ng,shift:rg},{mac:"Ctrl-ArrowDown",run:xc,shift:tg},{key:"PageUp",run:Wm,shift:eg},{key:"PageDown",run:xc,shift:tg},{key:"Home",run:xC,shift:LC,preventDefault:!0},{key:"Mod-Home",run:ig,shift:sg},{key:"End",run:kC,shift:VC,preventDefault:!0},{key:"Mod-End",run:ng,shift:rg},{key:"Enter",run:dg,shift:dg},{key:"Mod-a",run:IC},{key:"Backspace",run:Sc,shift:Sc,preventDefault:!0},{key:"Delete",run:ag,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:ug,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:qC,preventDefault:!0},{mac:"Mod-Backspace",run:zC,preventDefault:!0},{mac:"Mod-Delete",run:YC,preventDefault:!0}].concat(lA.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),cA=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:yC,shift:NC},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:wC,shift:RC},{key:"Alt-ArrowUp",run:HC},{key:"Shift-Alt-ArrowUp",run:eA},{key:"Alt-ArrowDown",run:JC},{key:"Shift-Alt-ArrowDown",run:tA},{key:"Mod-Alt-ArrowUp",run:UC},{key:"Mod-Alt-ArrowDown",run:XC},{key:"Escape",run:WC},{key:"Mod-Enter",run:sA},{key:"Alt-l",mac:"Ctrl-l",run:ZC},{key:"Mod-i",run:FC,preventDefault:!0},{key:"Mod-[",run:gg},{key:"Mod-]",run:mg},{key:"Mod-Alt-\\",run:rA},{key:"Shift-Mod-k",run:iA},{key:"Shift-Mod-\\",run:QC},{key:"Mod-/",run:HS},{key:"Alt-A",run:eC},{key:"Ctrl-m",mac:"Shift-Alt-m",run:oA}].concat(aA),uA={key:"Tab",run:mg,shift:gg},Og=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class zn{constructor(e,t,n=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=r?a=>r(Og(a)):Og,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return At(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Il(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ci(e);let s=this.normalize(t);if(s.length)for(let r=0,o=n;;r++){let a=s.charCodeAt(r),c=this.match(a,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(c)return this.value=c,this;break}o==n&&r<t.length&&t.charCodeAt(r)==a&&o++}}}match(e,t,n){let s=null;for(let r=0;r<this.matches.length;r+=2){let o=this.matches[r],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?s={from:this.matches[r+1],to:n}:(this.matches[r]++,a=!0)),a||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(zn.prototype[Symbol.iterator]=function(){return this});const _g={from:-1,to:-1,match:/.*/.exec("")},Ac="gm"+(/x/.unicode==null?"":"u");class bg{constructor(e,t,n,s=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=_g,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new yg(e,t,n,s,r);this.re=new RegExp(t,Ac+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let o=e.lineAt(s);this.curLineStart=o.from,this.matchPos=$o(e,s),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=$o(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Tc=new WeakMap;class Yn{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=Tc.get(e);if(!s||s.from>=n||s.to<=t){let a=new Yn(t,e.sliceString(t,n));return Tc.set(e,a),a}if(s.from==t&&s.to==n)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to<n&&(r+=e.sliceString(s.to,n)),Tc.set(e,new Yn(o,r)),new Yn(t,r.slice(t-o,n-o))}}class yg{constructor(e,t,n,s,r){this.text=e,this.to=r,this.done=!1,this.value=_g,this.matchPos=$o(e,s),this.re=new RegExp(t,Ac+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Yn.get(e,s,this.chunkEnd(s+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=$o(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(bg.prototype[Symbol.iterator]=yg.prototype[Symbol.iterator]=function(){return this});function hA(i){try{return new RegExp(i,Ac),!0}catch{return!1}}function $o(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}function Pc(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=Ie("input",{class:"cm-textfield",name:"line",value:e}),n=Ie("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),i.dispatch({effects:Js.of(!1)}),i.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},Ie("label",i.state.phrase("Go to line"),": ",t)," ",Ie("button",{class:"cm-button",type:"submit"},i.state.phrase("go")),Ie("button",{name:"close",onclick:()=>{i.dispatch({effects:Js.of(!1)}),i.focus()},"aria-label":i.state.phrase("close"),type:"button"},["×"]));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=i,a=o.doc.lineAt(o.selection.main.head),[,c,u,h,f]=r,d=h?+h.slice(1):0,m=u?+u:a.number;if(u&&f){let g=m/100;c&&(g=g*(c=="-"?-1:1)+a.number/o.doc.lines),m=Math.round(o.doc.lines*g)}else u&&c&&(m=m*(c=="-"?-1:1)+a.number);let b=o.doc.line(Math.max(1,Math.min(o.doc.lines,m))),w=W.cursor(b.from+Math.max(0,Math.min(d,b.length)));i.dispatch({effects:[Js.of(!1),ie.scrollIntoView(w.from,{y:"center"})],selection:w}),i.focus()}return{dom:n}}const Js=ke.define(),wg=rt.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(Js)&&(i=t.value);return i},provide:i=>Zs.from(i,e=>e?Pc:null)}),fA=i=>{let e=Is(i,Pc);if(!e){let t=[Js.of(!0)];i.state.field(wg,!1)==null&&t.push(ke.appendConfig.of([wg,dA])),i.dispatch({effects:t}),e=Is(i,Pc)}return e&&e.dom.querySelector("input").select(),!0},dA=ie.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),pA={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},kg=ae.define({combine(i){return hi(i,pA,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function mA(i){let e=[yA,bA];return i&&e.push(kg.of(i)),e}const gA=me.mark({class:"cm-selectionMatch"}),OA=me.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function xg(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=We.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=We.Word)}function _A(i,e,t,n){return i(e.sliceDoc(t,t+1))==We.Word&&i(e.sliceDoc(n-1,n))==We.Word}const bA=Ge.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(kg),{state:t}=i,n=t.selection;if(n.ranges.length>1)return me.none;let s=n.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return me.none;let c=t.wordAt(s.head);if(!c)return me.none;o=t.charCategorizer(s.head),r=t.sliceDoc(c.from,c.to)}else{let c=s.to-s.from;if(c<e.minSelectionLength||c>200)return me.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(xg(o,t,s.from,s.to)&&_A(o,t,s.from,s.to)))return me.none}else if(r=t.sliceDoc(s.from,s.to),!r)return me.none}let a=[];for(let c of i.visibleRanges){let u=new zn(t.doc,r,c.from,c.to);for(;!u.next().done;){let{from:h,to:f}=u.value;if((!o||xg(o,t,h,f))&&(s.empty&&h<=s.from&&f>=s.to?a.push(OA.range(h,f)):(h>=s.to||f<=s.from)&&a.push(gA.range(h,f)),a.length>e.maxMatches))return me.none}}return me.set(a)}},{decorations:i=>i.decorations}),yA=ie.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),wA=({state:i,dispatch:e})=>{let{selection:t}=i,n=W.create(t.ranges.map(s=>i.wordAt(s.head)||W.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function kA(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,a=new zn(i.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new zn(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(c=>c.from==a.value.from))continue;if(r){let c=i.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const xA=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(r=>r.from===r.to))return wA({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(r=>i.sliceDoc(r.from,r.to)!=n))return!1;let s=kA(i,n);return s?(e(i.update({selection:i.selection.addRange(W.range(s.from,s.to),!1),effects:ie.scrollIntoView(s.to)})),!0):!1},Gn=ae.define({combine(i){return hi(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new LA(e),scrollToMatch:e=>ie.scrollIntoView(e)})}});class Sg{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||hA(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
32
+ `:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new TA(this):new CA(this)}getCursor(e,t=0,n){let s=e.doc?e:Ce.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Hn(this,s,t,n):Kn(this,s,t,n)}}class Cg{constructor(e){this.spec=e}}function Kn(i,e,t,n){return new zn(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:s=>s.toLowerCase(),i.wholeWord?SA(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function SA(i,e){return(t,n,s,r)=>((r>t||r+s.length<n)&&(r=Math.max(0,t-2),s=i.sliceString(r,Math.min(i.length,n+2))),(e(No(s,t-r))!=We.Word||e(Ro(s,t-r))!=We.Word)&&(e(Ro(s,n-r))!=We.Word||e(No(s,n-r))!=We.Word))}class CA extends Cg{constructor(e){super(e)}nextMatch(e,t,n){let s=Kn(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Kn(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Kn(this.spec,e,r,s),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(r==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Kn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Kn(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Hn(i,e,t,n){return new bg(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?AA(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function No(i,e){return i.slice(ht(i,e,!1),e)}function Ro(i,e){return i.slice(e,ht(i,e))}function AA(i){return(e,t,n)=>!n[0].length||(i(No(n.input,n.index))!=We.Word||i(Ro(n.input,n.index))!=We.Word)&&(i(Ro(n.input,n.index+n[0].length))!=We.Word||i(No(n.input,n.index+n[0].length))!=We.Word)}class TA extends Cg{nextMatch(e,t,n){let s=Hn(this.spec,e,n,e.doc.length).next();return s.done&&(s=Hn(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let r=Math.max(t,n-s*1e4),o=Hn(this.spec,e,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==t||a.from>r+10))return a;if(r==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let s=n.length;s>0;s--){let r=+n.slice(0,s);if(r>0&&r<e.match.length)return e.match[r]+n.slice(s)}return t})}matchAll(e,t){let n=Hn(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let r=Hn(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const er=ke.define(),Qc=ke.define(),tn=rt.define({create(i){return new Ec(Nc(i).create(),null)},update(i,e){for(let t of e.effects)t.is(er)?i=new Ec(t.value.create(),i.panel):t.is(Qc)&&(i=new Ec(i.query,t.value?$c:null));return i},provide:i=>Zs.from(i,e=>e.panel)});class Ec{constructor(e,t){this.query=e,this.panel=t}}const PA=me.mark({class:"cm-searchMatch"}),QA=me.mark({class:"cm-searchMatch cm-searchMatch-selected"}),EA=Ge.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(tn))}update(i){let e=i.state.field(tn);(e!=i.startState.field(tn)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return me.none;let{view:t}=this,n=new Ti;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:a,to:c}=r[s];for(;s<o-1&&c>r[s+1].from-2*250;)c=r[++s].to;i.highlight(t.state,a,c,(u,h)=>{let f=t.state.selection.ranges.some(d=>d.from==u&&d.to==h);n.add(u,h,f?QA:PA)})}return n.finish()}},{decorations:i=>i.decorations});function tr(i){return e=>{let t=e.state.field(tn,!1);return t&&t.query.spec.valid?i(e,t):Qg(e)}}const Vo=tr((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=W.single(n.from,n.to),r=i.state.facet(Gn);return i.dispatch({selection:s,effects:[Rc(i,n),r.scrollToMatch(s.main,i)],userEvent:"select.search"}),Pg(i),!0}),Lo=tr((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let r=W.single(s.from,s.to),o=i.state.facet(Gn);return i.dispatch({selection:r,effects:[Rc(i,s),o.scrollToMatch(r.main,i)],userEvent:"select.search"}),Pg(i),!0}),$A=tr((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:W.create(t.map(n=>W.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),NA=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,r=[],o=0;for(let a=new zn(i.doc,i.sliceDoc(n,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==n&&(o=r.length),r.push(W.range(a.value.from,a.value.to))}return e(i.update({selection:W.create(r,o),userEvent:"select.search.matches"})),!0},Ag=tr((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,n,n);if(!r)return!1;let o=r,a=[],c,u,h=[];o.from==n&&o.to==s&&(u=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(t,o.from,o.to),h.push(ie.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+".")));let f=i.state.changes(a);return o&&(c=W.single(o.from,o.to).map(f),h.push(Rc(i,o)),h.push(t.facet(Gn).scrollToMatch(c.main,i))),i.dispatch({changes:f,selection:c,effects:h,userEvent:"input.replace"}),!0}),RA=tr((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:ie.announce.of(n),userEvent:"input.replace.all"}),!0});function $c(i){return i.state.facet(Gn).createPanel(i)}function Nc(i,e){var t,n,s,r,o;let a=i.selection.main,c=a.empty||a.to>a.from+100?"":i.sliceDoc(a.from,a.to);if(e&&!c)return e;let u=i.facet(Gn);return new Sg({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:u.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:u.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:u.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function Tg(i){let e=Is(i,$c);return e&&e.dom.querySelector("[main-field]")}function Pg(i){let e=Tg(i);e&&e==i.root.activeElement&&e.select()}const Qg=i=>{let e=i.state.field(tn,!1);if(e&&e.panel){let t=Tg(i);if(t&&t!=i.root.activeElement){let n=Nc(i.state,e.query.spec);n.valid&&i.dispatch({effects:er.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[Qc.of(!0),e?er.of(Nc(i.state,e.query.spec)):ke.appendConfig.of(DA)]});return!0},Eg=i=>{let e=i.state.field(tn,!1);if(!e||!e.panel)return!1;let t=Is(i,$c);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:Qc.of(!1)}),!0},VA=[{key:"Mod-f",run:Qg,scope:"editor search-panel"},{key:"F3",run:Vo,shift:Lo,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Vo,shift:Lo,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Eg,scope:"editor search-panel"},{key:"Mod-Shift-l",run:NA},{key:"Mod-Alt-g",run:fA},{key:"Mod-d",run:xA,preventDefault:!0}];class LA{constructor(e){this.view=e;let t=this.query=e.state.field(tn).query.spec;this.commit=this.commit.bind(this),this.searchField=Ie("input",{value:t.search,placeholder:Lt(e,"Find"),"aria-label":Lt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ie("input",{value:t.replace,placeholder:Lt(e,"Replace"),"aria-label":Lt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ie("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ie("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ie("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,r,o){return Ie("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=Ie("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>Vo(e),[Lt(e,"next")]),n("prev",()=>Lo(e),[Lt(e,"previous")]),n("select",()=>$A(e),[Lt(e,"all")]),Ie("label",null,[this.caseField,Lt(e,"match case")]),Ie("label",null,[this.reField,Lt(e,"regexp")]),Ie("label",null,[this.wordField,Lt(e,"by word")]),...e.state.readOnly?[]:[Ie("br"),this.replaceField,n("replace",()=>Ag(e),[Lt(e,"replace")]),n("replaceAll",()=>RA(e),[Lt(e,"replace all")])],Ie("button",{name:"close",onclick:()=>Eg(e),"aria-label":Lt(e,"close"),type:"button"},["×"])])}commit(){let e=new Sg({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:er.of(e)}))}keydown(e){Wk(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Lo:Vo)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ag(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(er)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Gn).top}}function Lt(i,e){return i.state.phrase(e)}const Mo=30,Do=/[\s\.,:;?!]/;function Rc(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,r=Math.max(n.from,e-Mo),o=Math.min(s,t+Mo),a=i.state.sliceDoc(r,o);if(r!=n.from){for(let c=0;c<Mo;c++)if(!Do.test(a[c+1])&&Do.test(a[c])){a=a.slice(c);break}}if(o!=s){for(let c=a.length-1;c>a.length-Mo;c--)if(!Do.test(a[c-1])&&Do.test(a[c])){a=a.slice(0,c);break}}return ie.announce.of(`${i.state.phrase("current match")}. ${a} ${i.state.phrase("on line")} ${n.number}.`)}const MA=ie.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),DA=[tn,Xi.low(EA),MA];class $g{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=st(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),r=s.search(Lg(e,!1));return r<0?null:{from:n+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function Ng(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function vA(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let r=1;r<s.length;r++)t[s[r]]=!0}let n=Ng(e)+Ng(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Rg(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:vA(e);return s=>{let r=s.matchBefore(n);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function BA(i,e){return t=>{for(let n=st(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class Vg{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function wn(i){return i.selection.main.from}function Lg(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",r=n[n.length-1]!="$";return!s&&!r?i:new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const Vc=Ai.define();function IA(i,e,t,n){let{main:s}=i.selection,r=t-s.from,o=n-s.from;return{...i.changeByRange(a=>{if(a!=s&&t!=n&&i.sliceDoc(a.from+r,a.from+o)!=i.sliceDoc(t,n))return{range:a};let c=i.toText(e);return{changes:{from:a.from+r,to:n==s.from?a.to:a.from+o,insert:c},range:W.cursor(a.from+r+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const Mg=new WeakMap;function ZA(i){if(!Array.isArray(i))return i;let e=Mg.get(i);return e||Mg.set(i,e=Rg(i)),e}const vo=ke.define(),ir=ke.define();class FA{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=At(e,t),s=ci(n);this.chars.push(n);let r=e.slice(t,t+s),o=r.toUpperCase();this.folded.push(At(o==r?r.toLowerCase():o,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:r,byWord:o}=this;if(t.length==1){let y=At(e,0),x=ci(y),O=x==e.length?0:-100;if(y!=t[0])if(y==n[0])O+=-200;else return null;return this.ret(O,[0,x])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,u=0;if(a<0){for(let y=0,x=Math.min(e.length,200);y<x&&u<c;){let O=At(e,y);(O==t[u]||O==n[u])&&(s[u++]=y),y+=ci(O)}if(u<c)return null}let h=0,f=0,d=!1,m=0,b=-1,w=-1,g=/[a-z]/.test(e),p=!0;for(let y=0,x=Math.min(e.length,200),O=0;y<x&&f<c;){let Q=At(e,y);a<0&&(h<c&&Q==t[h]&&(r[h++]=y),m<c&&(Q==t[m]||Q==n[m]?(m==0&&(b=y),w=y+1,m++):m=0));let S,k=Q<255?Q>=48&&Q<=57||Q>=97&&Q<=122?2:Q>=65&&Q<=90?1:0:(S=Il(Q))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!y||k==1&&g||O==0&&k!=0)&&(t[f]==Q||n[f]==Q&&(d=!0)?o[f++]=y:o.length&&(p=!1)),O=k,y+=ci(Q)}return f==c&&o[0]==0&&p?this.result(-100+(d?-200:0),o,e):m==c&&b==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):m==c?this.ret(-200+-700-e.length,[b,w]):f==c?this.result(-100+(d?-200:0)+-700+(p?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],r=0;for(let o of t){let a=o+(this.astral?ci(At(n,o)):1);r&&s[r-1]==o?s[r-1]=a:(s[r++]=o,s[r++]=a)}return this.ret(e-n.length,s)}}class UA{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const ot=ae.define({combine(i){return hi(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:XA,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Dg(e(n),t(n)),optionClass:(e,t)=>n=>Dg(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Dg(i,e){return i?e?i+" "+e:i:e}function XA(i,e,t,n,s,r){let o=i.textDirection==Fe.RTL,a=o,c=!1,u="top",h,f,d=e.left-s.left,m=s.right-e.right,b=n.right-n.left,w=n.bottom-n.top;if(a&&d<Math.min(b,m)?a=!1:!a&&m<Math.min(b,d)&&(a=!0),b<=(a?d:m))h=Math.max(s.top,Math.min(t.top,s.bottom-w))-e.top,f=Math.min(400,a?d:m);else{c=!0,f=Math.min(400,(o?e.right:s.right-e.left)-30);let y=s.bottom-e.bottom;y>=w||y>e.top?h=t.bottom-e.top:(u="bottom",h=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,p=(e.right-e.left)/r.offsetWidth;return{style:`${u}: ${h/g}px; max-width: ${f/p}px`,class:"cm-completionInfo-"+(c?o?"left-narrow":"right-narrow":a?"left":"right")}}function WA(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,c=0;for(let u=0;u<r.length;){let h=r[u++],f=r[u++];h>c&&o.appendChild(document.createTextNode(a.slice(c,h)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(h,f))),d.className="cm-completionMatchedText",c=f}return c<a.length&&o.appendChild(document.createTextNode(a.slice(c))),o},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Lc(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class qA{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,a=e.state.facet(ot);this.optionContent=WA(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Lc(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:u}=e.state.field(t).open;for(let h=c.target,f;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(f=/-(\d+)$/.exec(h.id))&&+f[1]<u.length){this.applyCompletion(e,u[+f[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(ot).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:ir.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:r,selected:o,disabled:a}=n.open;(!s.open||s.open.options!=r)&&(this.range=Lc(r.length,o,e.state.facet(ot).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Lc(t.options.length,t.selected,this.view.state.facet(ot).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:s}=t.options[t.selected],{info:r}=s;if(!r)return;let o=typeof r=="string"?document.createTextNode(r):r(s);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,s)}).catch(a=>Tt(this.view.state,a,"completion info")):(this.addInfoPane(o,s),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;n.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&zA(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(ot).positionInfo(this.view,t,s,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",o=>{o.target==s&&o.preventDefault()});let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:c}=e[o],{section:u}=a;if(u){let d=typeof u=="string"?u:u.name;if(d!=r&&(o>n.from||n.from==0))if(r=d,typeof u!="string"&&u.header)s.appendChild(u.header(u));else{let m=s.appendChild(document.createElement("completion-section"));m.textContent=d}}const h=s.appendChild(document.createElement("li"));h.id=t+"-"+o,h.setAttribute("role","option");let f=this.optionClass(a);f&&(h.className=f);for(let d of this.optionContent){let m=d(a,this.view.state,this.view,c);m&&h.appendChild(m)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function jA(i,e){return t=>new qA(t,i,e)}function zA(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function vg(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function YA(i,e){let t=[],n=null,s=null,r=h=>{t.push(h);let{section:f}=h.completion;if(f){n||(n=[]);let d=typeof f=="string"?f:f.name;n.some(m=>m.name==d)||n.push(typeof f=="string"?{name:d}:f)}},o=e.facet(ot);for(let h of i)if(h.hasResult()){let f=h.result.getMatch;if(h.result.filter===!1)for(let d of h.result.options)r(new Vg(d,h.source,f?f(d):[],1e9-t.length));else{let d=e.sliceDoc(h.from,h.to),m,b=o.filterStrict?new UA(d):new FA(d);for(let w of h.result.options)if(m=b.match(w.label)){let g=w.displayLabel?f?f(w,m.matched):[]:m.matched,p=m.score+(w.boost||0);if(r(new Vg(w,h.source,g,p)),typeof w.section=="object"&&w.section.rank==="dynamic"){let{name:y}=w.section;s||(s=Object.create(null)),s[y]=Math.max(p,s[y]||-1e9)}}}}if(n){let h=Object.create(null),f=0,d=(m,b)=>(m.rank==="dynamic"&&b.rank==="dynamic"?s[b.name]-s[m.name]:0)||(typeof m.rank=="number"?m.rank:1e9)-(typeof b.rank=="number"?b.rank:1e9)||(m.name<b.name?-1:1);for(let m of n.sort(d))f-=1e5,h[m.name]=f;for(let m of t){let{section:b}=m.completion;b&&(m.score+=h[typeof b=="string"?b:b.name])}}let a=[],c=null,u=o.compareCompletions;for(let h of t.sort((f,d)=>d.score-f.score||u(f.completion,d.completion))){let f=h.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?a.push(h):vg(h.completion)>vg(c)&&(a[a.length-1]=h),c=h.completion}return a}class Jn{constructor(e,t,n,s,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Jn(this.options,Bg(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,r,o){if(s&&!o&&e.some(u=>u.isPending))return s.setDisabled();let a=YA(e,t);if(!a.length)return s&&e.some(u=>u.isPending)?s.setDisabled():null;let c=t.facet(ot).selectOnOpen?0:-1;if(s&&s.selected!=c&&s.selected!=-1){let u=s.options[s.selected].completion;for(let h=0;h<a.length;h++)if(a[h].completion==u){c=h;break}}return new Jn(a,Bg(n,c),{pos:e.reduce((u,h)=>h.hasResult()?Math.min(u,h.from):u,1e8),create:tT,above:r.aboveCursor},s?s.timestamp:Date.now(),c,!1)}map(e){return new Jn(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Jn(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Bo{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Bo(JA,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(ot),r=(n.override||t.languageDataAt("autocomplete",wn(t)).map(ZA)).map(c=>(this.active.find(h=>h.source==c)||new jt(c,this.active.some(h=>h.state!=0)?1:0)).update(e,n));r.length==this.active.length&&r.every((c,u)=>c==this.active[u])&&(r=this.active);let o=this.open,a=e.effects.some(c=>c.is(Mc));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!GA(r,this.active)||a?o=Jn.build(r,t,this.id,o,n,a):o&&o.disabled&&!r.some(c=>c.isPending)&&(o=null),!o&&r.every(c=>!c.isPending)&&r.some(c=>c.hasResult())&&(r=r.map(c=>c.hasResult()?new jt(c.source,0):c));for(let c of e.effects)c.is(Zg)&&(o=o&&o.setSelected(c.value,this.id));return r==this.active&&o==this.open?this:new Bo(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?KA:HA}}function GA(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,r=n==e.length;if(s||r)return s==r;if(i[t++].result!=e[n++].result)return!1}}const KA={"aria-autocomplete":"list"},HA={};function Bg(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const JA=[];function Ig(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(Vc);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class jt{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Ig(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new jt(s.source,0)),n&4&&s.state==0&&(s=new jt(this.source,1)),s=s.updateFor(e,n);for(let r of e.effects)if(r.is(vo))s=new jt(s.source,1,r.value);else if(r.is(ir))s=new jt(s.source,0);else if(r.is(Mc))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(wn(e.state))}}class es extends jt{constructor(e,t,n,s,r,o){super(e,3,t),this.limit=n,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=wn(e.state);if(a>o||!s||t&2&&(wn(e.startState)==this.from||a<this.limit))return new jt(this.source,t&4?1:0);let c=e.changes.mapPos(this.limit);return eT(s.validFor,e.state,r,o)?new es(this.source,this.explicit,c,s,r,o):s.update&&(s=s.update(s,r,o,new $g(e.state,a,!1)))?new es(this.source,this.explicit,c,s,s.from,(n=s.to)!==null&&n!==void 0?n:wn(e.state)):new jt(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new es(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new jt(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function eT(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):Lg(i,!0).test(s)}const Mc=ke.define({map(i,e){return i.map(t=>t.map(e))}}),Zg=ke.define(),$t=rt.define({create(){return Bo.start()},update(i,e){return i.update(e)},provide:i=>[Wa.from(i,e=>e.tooltip),ie.contentAttributes.from(i,e=>e.attrs)]});function Dc(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field($t).active.find(s=>s.source==e.source);return n instanceof es?(typeof t=="string"?i.dispatch({...IA(i.state,t,n.from,n.to),annotations:Vc.of(e.completion)}):t(i,e.completion,n.from,n.to),!0):!1}const tT=jA($t,Dc);function Io(i,e="option"){return t=>{let n=t.state.field($t,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(ot).interactionDelay)return!1;let s=1,r;e=="page"&&(r=vp(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:Zg.of(a)}),!0}}const iT=i=>{let e=i.state.field($t,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(ot).interactionDelay?!1:Dc(i,e.open.options[e.open.selected])},vc=i=>i.state.field($t,!1)?(i.dispatch({effects:vo.of(!0)}),!0):!1,nT=i=>{let e=i.state.field($t,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:ir.of(null)}),!0)};class sT{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const rT=50,oT=1e3,lT=Ge.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field($t).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field($t),t=i.state.facet(ot);if(!i.selectionSet&&!i.docChanged&&i.startState.field($t)==e)return;let n=i.transactions.some(r=>{let o=Ig(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;r<this.running.length;r++){let o=this.running[r];if(n||o.context.abortOnDocChange&&i.docChanged||o.updates.length+i.transactions.length>rT&&Date.now()-o.time>oT){for(let a of o.context.abortListeners)try{a()}catch(c){Tt(this.view.state,c)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(r=>r.effects.some(o=>o.is(vo)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of i.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field($t);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=wn(e),n=new $g(e,t,i.explicit,this.view),s=new sT(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:ir.of(null)}),Tt(this.view.state,r)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ot).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(ot),n=this.view.state.field($t);for(let s=0;s<this.running.length;s++){let r=this.running[s];if(r.done===void 0)continue;if(this.running.splice(s--,1),r.done){let a=wn(r.updates.length?r.updates[0].startState:this.view.state),c=Math.min(a,r.done.from+(r.active.explicit?0:1)),u=new es(r.active.source,r.active.explicit,c,r.done,r.done.from,(i=r.done.to)!==null&&i!==void 0?i:a);for(let h of r.updates)u=u.update(h,t);if(u.hasResult()){e.push(u);continue}}let o=n.active.find(a=>a.source==r.active.source);if(o&&o.isPending)if(r.done==null){let a=new jt(r.active.source,0);for(let c of r.updates)a=a.update(c,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Mc.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field($t,!1);if(e&&e.tooltip&&this.view.state.facet(ot).closeOnBlur){let t=e.open&&vp(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ir.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:vo.of(!1)}),20),this.composing=0}}}),aT=typeof navigator=="object"&&/Win/.test(navigator.platform),cT=Xi.highest(ie.domEventHandlers({keydown(i,e){let t=e.state.field($t,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(aT&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(o=>o.source==n.source),r=n.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(i.key)>-1&&Dc(e,n),!1}})),Fg=ie.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class uT{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class Bc{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,ft.TrackDel),n=e.mapPos(this.to,1,ft.TrackDel);return t==null||n==null?null:new Bc(this.field,t,n)}}class Ic{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let c of this.lines){if(n.length){let u=o,h=/^\t*/.exec(c)[0].length;for(let f=0;f<h;f++)u+=e.facet(js);s.push(t+u.length-h),c=u+c.slice(h)}n.push(c),t+=c.length+1}let a=this.fieldPositions.map(c=>new Bc(c.field,s[c.line]+c.from,s[c.line]+c.to));return{text:n,ranges:a}}static parse(e){let t=[],n=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=r[1]?+r[1]:null,c=r[2]||r[3]||"",u=-1,h=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:h&&t[f].name==h)&&(u=f);if(u<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:h}),u=f;for(let d of s)d.field>=u&&d.field++}for(let f of s)if(f.line==n.length&&f.from>r.index){let d=r[2]?3+(r[1]||"").length:2;f.from-=d,f.to-=d}s.push(new uT(u,n.length,r.index,r.index+h.length)),o=o.slice(0,r.index)+c+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(a,c,u)=>{for(let h of s)h.line==n.length&&h.from>u&&(h.from--,h.to--);return c}),n.push(o)}return new Ic(n,s)}}let hT=me.widget({widget:new class extends di{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),fT=me.mark({class:"cm-snippetField"});class ts{constructor(e,t){this.ranges=e,this.active=t,this.deco=me.set(e.map(n=>(n.from==n.to?hT:fT).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new ts(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const nr=ke.define({map(i,e){return i&&i.map(e)}}),dT=ke.define(),sr=rt.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(nr))return t.value;if(t.is(dT)&&i)return new ts(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>ie.decorations.from(i,e=>e?e.deco:me.none)});function Zc(i,e){return W.create(i.filter(t=>t.field==e).map(t=>W.range(t.from,t.to)))}function pT(i){let e=Ic.parse(i);return(t,n,s,r)=>{let{text:o,ranges:a}=e.instantiate(t.state,s),{main:c}=t.state.selection,u={changes:{from:s,to:r==c.from?c.to:r,insert:Pe.of(o)},scrollIntoView:!0,annotations:n?[Vc.of(n),He.userEvent.of("input.complete")]:void 0};if(a.length&&(u.selection=Zc(a,0)),a.some(h=>h.field>0)){let h=new ts(a,0),f=u.effects=[nr.of(h)];t.state.field(sr,!1)===void 0&&f.push(ke.appendConfig.of([sr,gT,OT,Fg]))}t.dispatch(t.state.update(u))}}function Ug(i){return({state:e,dispatch:t})=>{let n=e.field(sr,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,r=i>0&&!n.ranges.some(o=>o.field==s+i);return t(e.update({selection:Zc(n.ranges,s),effects:nr.of(r?null:new ts(n.ranges,s)),scrollIntoView:!0})),!0}}const mT=[{key:"Tab",run:Ug(1),shift:Ug(-1)},{key:"Escape",run:({state:i,dispatch:e})=>i.field(sr,!1)?(e(i.update({effects:nr.of(null)})),!0):!1}],Xg=ae.define({combine(i){return i.length?i[0]:mT}}),gT=Xi.highest(Ms.compute([Xg],i=>i.facet(Xg)));function Nt(i,e){return{...e,apply:pT(i)}}const OT=ie.domEventHandlers({mousedown(i,e){let t=e.state.field(sr,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=n&&r.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:Zc(t.ranges,s.field),effects:nr.of(t.ranges.some(r=>r.field>s.field)?new ts(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),rr={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},kn=ke.define({map(i,e){let t=e.mapPos(i,-1,ft.TrackAfter);return t??void 0}}),Fc=new class extends dn{};Fc.startSide=1,Fc.endSide=-1;const Wg=rt.define({create(){return Re.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(kn)&&(i=i.update({add:[Fc.range(t.value,t.value+1)]}));return i}});function _T(){return[yT,Wg]}const Uc="()[]{}<>«»»«[]{}";function qg(i){for(let e=0;e<Uc.length;e+=2)if(Uc.charCodeAt(e)==i)return Uc.charAt(e+1);return Il(i<128?i:i+1)}function jg(i,e){return i.languageDataAt("closeBrackets",e)[0]||rr}const bT=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),yT=ie.inputHandler.of((i,e,t,n)=>{if((bT?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&ci(At(n,0))==1||e!=s.from||t!=s.to)return!1;let r=kT(i.state,n);return r?(i.dispatch(r),!0):!1}),wT=[{key:"Backspace",run:({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=jg(i,i.selection.main.head).brackets||rr.brackets,s=null,r=i.changeByRange(o=>{if(o.empty){let a=xT(i.doc,o.head);for(let c of n)if(c==a&&Zo(i.doc,o.head)==qg(At(c,0)))return{changes:{from:o.head-c.length,to:o.head+c.length},range:W.cursor(o.head-c.length)}}return{range:s=o}});return s||e(i.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function kT(i,e){let t=jg(i,i.selection.main.head),n=t.brackets||rr.brackets;for(let s of n){let r=qg(At(s,0));if(e==s)return r==s?AT(i,s,n.indexOf(s+s+s)>-1,t):ST(i,s,r,t.before||rr.before);if(e==r&&zg(i,i.selection.main.from))return CT(i,s,r)}return null}function zg(i,e){let t=!1;return i.field(Wg).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function Zo(i,e){let t=i.sliceString(e,e+2);return t.slice(0,ci(At(t,0)))}function xT(i,e){let t=i.sliceString(e-2,e);return ci(At(t,0))==t.length?t:t.slice(1)}function ST(i,e,t,n){let s=null,r=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:kn.of(o.to+e.length),range:W.range(o.anchor+e.length,o.head+e.length)};let a=Zo(i.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:kn.of(o.head+e.length),range:W.cursor(o.head+e.length)}:{range:s=o}});return s?null:i.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function CT(i,e,t){let n=null,s=i.changeByRange(r=>r.empty&&Zo(i.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:W.cursor(r.head+t.length)}:n={range:r});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function AT(i,e,t,n){let s=n.stringPrefixes||rr.stringPrefixes,r=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:kn.of(a.to+e.length),range:W.range(a.anchor+e.length,a.head+e.length)};let c=a.head,u=Zo(i.doc,c),h;if(u==e){if(Yg(i,c))return{changes:{insert:e+e,from:c},effects:kn.of(c+e.length),range:W.cursor(c+e.length)};if(zg(i,c)){let d=t&&i.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+d.length,insert:d},range:W.cursor(c+d.length)}}}else{if(t&&i.sliceDoc(c-2*e.length,c)==e+e&&(h=Gg(i,c-2*e.length,s))>-1&&Yg(i,h))return{changes:{insert:e+e+e+e,from:c},effects:kn.of(c+e.length),range:W.cursor(c+e.length)};if(i.charCategorizer(c)(u)!=We.Word&&Gg(i,c,s)>-1&&!TT(i,c,e,s))return{changes:{insert:e+e,from:c},effects:kn.of(c+e.length),range:W.cursor(c+e.length)}}return{range:r=a}});return r?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Yg(i,e){let t=st(i).resolveInner(e+1);return t.parent&&t.from==e}function TT(i,e,t,n){let s=st(i).resolveInner(e,-1),r=n.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),c=a.indexOf(t);if(!c||c>-1&&n.indexOf(a.slice(0,c))>-1){let h=s.firstChild;for(;h&&h.from==s.from&&h.to-h.from>t.length+c;){if(i.sliceDoc(h.to-t.length,h.to)==t)return!1;h=h.firstChild}return!0}let u=s.to==e&&s.parent;if(!u)break;s=u}return!1}function Gg(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=We.Word)return e;for(let s of t){let r=e-s.length;if(i.sliceDoc(r,e)==s&&n(i.sliceDoc(r-1,r))!=We.Word)return r}return-1}function PT(i={}){return[cT,$t,ot.of(i),lT,QT,Fg]}const Kg=[{key:"Ctrl-Space",run:vc},{mac:"Alt-`",run:vc},{mac:"Alt-i",run:vc},{key:"Escape",run:nT},{key:"ArrowDown",run:Io(!0)},{key:"ArrowUp",run:Io(!1)},{key:"PageDown",run:Io(!0,"page")},{key:"PageUp",run:Io(!1,"page")},{key:"Enter",run:iT}],QT=Xi.highest(Ms.computeN([ot],i=>i.facet(ot).defaultKeymap?[Kg]:[]));class Hg{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class xn{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=n.facet(or).markerFilter;s&&(e=s(e,n));let r=e.slice().sort((m,b)=>m.from-b.from||m.to-b.to),o=new Ti,a=[],c=0,u=n.doc.iter(),h=0,f=n.doc.length;for(let m=0;;){let b=m==r.length?null:r[m];if(!b&&!a.length)break;let w,g;if(a.length)w=c,g=a.reduce((x,O)=>Math.min(x,O.to),b&&b.from>w?b.from:1e8);else{if(w=b.from,w>f)break;g=b.to,a.push(b),m++}for(;m<r.length;){let x=r[m];if(x.from==w&&(x.to>x.from||x.to==w))a.push(x),m++,g=Math.min(x.to,g);else{g=Math.min(x.from,g);break}}g=Math.min(g,f);let p=!1;if(a.some(x=>x.from==w&&(x.to==g||g==f))&&(p=w==g,!p&&g-w<10)){let x=w-(h+u.value.length);x>0&&(u.next(x),h=w);for(let O=w;;){if(O>=g){p=!0;break}if(!u.lineBreak&&h+u.value.length>O)break;O=h+u.value.length,h+=u.value.length,u.next()}}let y=ZT(a);if(p)o.add(w,w,me.widget({widget:new DT(y),diagnostics:a.slice()}));else{let x=a.reduce((O,Q)=>Q.markClass?O+" "+Q.markClass:O,"");o.add(w,g,me.mark({class:"cm-lintRange cm-lintRange-"+y+x,diagnostics:a.slice(),inclusiveEnd:a.some(O=>O.to>g)}))}if(c=g,c==f)break;for(let x=0;x<a.length;x++)a[x].to<=c&&a.splice(x--,1)}let d=o.finish();return new xn(d,t,is(d))}}function is(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,r,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!n)n=new Hg(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new Hg(n.from,r,n.diagnostic)}}),n}function ET(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(or).hideOn(i,t,n);if(s!=null)return s;let r=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(o=>o.is(Jg))||i.changes.touchesRange(r.from,Math.max(r.to,n)))}function $T(i,e){return i.field(Mt,!1)?e:e.concat(ke.appendConfig.of(FT))}const Jg=ke.define(),Xc=ke.define(),eO=ke.define(),Mt=rt.define({create(){return new xn(me.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let r=e.changes.mapPos(i.selected.from,1);n=is(t,i.selected.diagnostic,r)||is(t,null,r)}!t.size&&s&&e.state.facet(or).autoPanel&&(s=null),i=new xn(t,s,n)}for(let t of e.effects)if(t.is(Jg)){let n=e.state.facet(or).autoPanel?t.value.length?lr.open:null:i.panel;i=xn.init(t.value,n,e.state)}else t.is(Xc)?i=new xn(i.diagnostics,t.value?lr.open:null,i.selected):t.is(eO)&&(i=new xn(i.diagnostics,i.panel,t.value));return i},provide:i=>[Zs.from(i,e=>e.panel),ie.decorations.from(i,e=>e.diagnostics)]}),NT=me.mark({class:"cm-lintRange cm-lintRange-active"});function RT(i,e,t){let{diagnostics:n}=i.state.field(Mt),s,r=-1,o=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(c,u,{spec:h})=>{if(e>=c&&e<=u&&(c==u||(e>c||t>0)&&(e<u||t<0)))return s=h.diagnostics,r=c,o=u,!1});let a=i.state.facet(or).tooltipFilter;return s&&a&&(s=a(s,i.state)),s?{pos:r,end:o,above:i.state.doc.lineAt(r).to<o,create(){return{dom:VT(i,s)}}}:null}function VT(i,e){return Ie("ul",{class:"cm-tooltip-lint"},e.map(t=>sO(i,t,!1)))}const LT=i=>{let e=i.state.field(Mt,!1);(!e||!e.panel)&&i.dispatch({effects:$T(i.state,[Xc.of(!0)])});let t=Is(i,lr.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},tO=i=>{let e=i.state.field(Mt,!1);return!e||!e.panel?!1:(i.dispatch({effects:Xc.of(!1)}),!0)},MT=[{key:"Mod-Shift-m",run:LT,preventDefault:!0},{key:"F8",run:i=>{let e=i.state.field(Mt,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)}}],or=ae.define({combine(i){return{sources:i.map(e=>e.source).filter(e=>e!=null),...hi(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:iO,tooltipFilter:iO,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,s,r)=>e(n,s,r)||t(n,s,r):e:t,autoPanel:(e,t)=>e||t})}}});function iO(i,e){return i?e?(t,n)=>e(i(t,n),n):i:e}function nO(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(r=>r.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function sO(i,e,t){var n;let s=t?nO(e.actions):[];return Ie("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ie("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((r,o)=>{let a=!1,c=m=>{if(m.preventDefault(),a)return;a=!0;let b=is(i.state.field(Mt).diagnostics,e);b&&r.apply(i,b.from,b.to)},{name:u}=r,h=s[o]?u.indexOf(s[o]):-1,f=h<0?u:[u.slice(0,h),Ie("u",u.slice(h,h+1)),u.slice(h+1)],d=r.markClass?" "+r.markClass:"";return Ie("button",{type:"button",class:"cm-diagnosticAction"+d,onclick:c,onmousedown:c,"aria-label":` Action: ${u}${h<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&Ie("div",{class:"cm-diagnosticSource"},e.source))}class DT extends di{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ie("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class rO{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=sO(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class lr{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)tO(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=nO(r.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==s.keyCode){let c=is(this.view.state.field(Mt).diagnostics,r);c&&r.actions[a].apply(e,c.from,c.to)}}else return;s.preventDefault()},n=s=>{for(let r=0;r<this.items.length;r++)this.items[r].dom.contains(s.target)&&this.moveSelection(r)};this.list=Ie("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=Ie("div",{class:"cm-panel-lint"},this.list,Ie("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>tO(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mt).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Mt),n=0,s=!1,r=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:u})=>{for(let h of u.diagnostics){if(o.has(h))continue;o.add(h);let f=-1,d;for(let m=n;m<this.items.length;m++)if(this.items[m].diagnostic==h){f=m;break}f<0?(d=new rO(this.view,h),this.items.splice(n,0,d),s=!0):(d=this.items[f],f>n&&(this.items.splice(n,f-n),s=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),r=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new rO(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let u=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/u:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Mt),n=is(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:eO.of(n)})}static open(e){return new lr(e)}}function vT(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function Fo(i){return vT(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const BT=ie.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Fo("#d11")},".cm-lintRange-warning":{backgroundImage:Fo("orange")},".cm-lintRange-info":{backgroundImage:Fo("#999")},".cm-lintRange-hint":{backgroundImage:Fo("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function IT(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function ZT(i){let e="hint",t=1;for(let n of i){let s=IT(n.severity);s>t&&(t=s,e=n.severity)}return e}const FT=[Mt,ie.decorations.compute([Mt],i=>{let{selected:e,panel:t}=i.field(Mt);return!e||!t||e.from==e.to?me.none:me.set([NT.range(e.from,e.to)])}),Rx(RT,{hideOn:ET}),BT],UT=(()=>[Xx(),jx(),ax(),lC(),LS(),Kk(),ix(),Ce.allowMultipleSelections.of(!0),xS(),xm(BS,{fallback:!0}),WS(),_T(),PT(),kx(),Cx(),px(),mA(),Ms.of([...wT,...cA,...VA,...gC,...$S,...Kg,...MT])])();/*!
33
33
  * VueCodemirror v6.1.1
34
34
  * Copyright (c) Surmon. All rights reserved.
35
35
  * Released under the MIT License.
36
36
  * Surmon
37
- */var NQ=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[$Q]}),RQ=Symbol("vue-codemirror-global-config"),xt,VQ=function(i){var e=i.onUpdate,t=i.onChange,n=i.onFocus,s=i.onBlur,r=function(o,a){var c={};for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&a.indexOf(h)<0&&(c[h]=o[h]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(h=Object.getOwnPropertySymbols(o);u<h.length;u++)a.indexOf(h[u])<0&&Object.prototype.propertyIsEnumerable.call(o,h[u])&&(c[h[u]]=o[h[u]])}return c}(i,["onUpdate","onChange","onFocus","onBlur"]);return Se.create({doc:r.doc,selection:r.selection,extensions:(Array.isArray(r.extensions)?r.extensions:[r.extensions]).concat([se.updateListener.of(function(o){e(o),o.docChanged&&t(o.state.doc.toString(),o),o.focusChanged&&(o.view.hasFocus?n(o):s(o))})])})},is=function(i){var e=new _s;return{compartment:e,run:function(t){e.get(i.state)?i.dispatch({effects:e.reconfigure(t)}):i.dispatch({effects:we.appendConfig.of(e.of(t))})}}},jg=function(i,e){var t=is(i),n=t.compartment,s=t.run;return function(r){var o=n.get(i.state);s(r??o!==e?e:[])}},Uo={type:Boolean,default:void 0},LQ={autofocus:Uo,disabled:Uo,indentWithTab:Uo,tabSize:Number,placeholder:String,style:Object,autoDestroy:Uo,phrases:Object,root:Object,extensions:Array,selection:Object},MQ={modelValue:{type:String,default:""}},BQ=Object.assign(Object.assign({},LQ),MQ);(function(i){i.Change="change",i.Update="update",i.Focus="focus",i.Blur="blur",i.Ready="ready",i.ModelUpdate="update:modelValue"})(xt||(xt={}));var xn={};xn[xt.Change]=function(i,e){return!0},xn[xt.Update]=function(i){return!0},xn[xt.Focus]=function(i){return!0},xn[xt.Blur]=function(i){return!0},xn[xt.Ready]=function(i){return!0};var qg={};qg[xt.ModelUpdate]=xn[xt.Change];var DQ=Object.assign(Object.assign({},xn),qg),vQ=l.defineComponent({name:"VueCodemirror",props:Object.assign({},BQ),emits:Object.assign({},DQ),setup:function(i,e){var t=l.shallowRef(),n=l.shallowRef(),s=l.shallowRef(),r=Object.assign(Object.assign({},NQ),l.inject(RQ,{})),o=l.computed(function(){var a={};return Object.keys(l.toRaw(i)).forEach(function(c){var h;c!=="modelValue"&&(a[c]=(h=i[c])!==null&&h!==void 0?h:r[c])}),a});return l.onMounted(function(){var a;n.value=VQ({doc:i.modelValue,selection:o.value.selection,extensions:(a=r.extensions)!==null&&a!==void 0?a:[],onFocus:function(h){return e.emit(xt.Focus,h)},onBlur:function(h){return e.emit(xt.Blur,h)},onUpdate:function(h){return e.emit(xt.Update,h)},onChange:function(h,u){h!==i.modelValue&&(e.emit(xt.Change,h,u),e.emit(xt.ModelUpdate,h,u))}}),s.value=function(h){return new se(Object.assign({},h))}({state:n.value,parent:t.value,root:o.value.root});var c=function(h){var u=function(){return h.state.doc.toString()},f=is(h).run,d=jg(h,[se.editable.of(!1),Se.readOnly.of(!0)]),m=jg(h,Vs.of([KC])),b=is(h).run,w=is(h).run,g=is(h).run,p=is(h).run;return{focus:function(){return h.focus()},getDoc:u,setDoc:function(O){O!==u()&&h.dispatch({changes:{from:0,to:h.state.doc.length,insert:O}})},reExtensions:f,toggleDisabled:d,toggleIndentWithTab:m,setTabSize:function(O){b([Se.tabSize.of(O),qs.of(" ".repeat(O))])},setPhrases:function(O){w([Se.phrases.of(O)])},setPlaceholder:function(O){g(ax(O))},setStyle:function(O){O===void 0&&(O={}),p(se.theme({"&":Object.assign({},O)}))}}}(s.value);l.watch(function(){return i.modelValue},function(h){h!==c.getDoc()&&c.setDoc(h)}),l.watch(function(){return i.extensions},function(h){return c.reExtensions(h||[])},{immediate:!0}),l.watch(function(){return o.value.disabled},function(h){return c.toggleDisabled(h)},{immediate:!0}),l.watch(function(){return o.value.indentWithTab},function(h){return c.toggleIndentWithTab(h)},{immediate:!0}),l.watch(function(){return o.value.tabSize},function(h){return c.setTabSize(h)},{immediate:!0}),l.watch(function(){return o.value.phrases},function(h){return c.setPhrases(h||{})},{immediate:!0}),l.watch(function(){return o.value.placeholder},function(h){return c.setPlaceholder(h)},{immediate:!0}),l.watch(function(){return o.value.style},function(h){return c.setStyle(h)},{immediate:!0}),o.value.autofocus&&c.focus(),e.emit(xt.Ready,{state:n.value,view:s.value,container:t.value})}),l.onBeforeUnmount(function(){o.value.autoDestroy&&s.value&&function(a){a.destroy()}(s.value)}),function(){return l.h("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),ZQ=vQ;class Fo{constructor(e,t,n,s,r,o,a,c,h,u=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=r,this.score=o,this.buffer=a,this.bufferBase=c,this.curContext=h,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new Fo(e,[],t,n,n,0,[],0,s?new Xg(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=r.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(r.getGoto(this.state,s,!0),this.reducePos),s<r.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let c=this.stack.length-(n-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,u=this.reducePos-h;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=u));let f=c?this.stack[c-1]:0,d=this.bufferBase+this.buffer.length-f;if(s<r.minRepeatTerm||e&131072){let m=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,h,m,d+4,!0)}if(e&262144)this.state=this.stack[c];else{let m=this.stack[c-3];this.state=r.getGoto(m,s,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,n,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=n;return}}}if(!r||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let c=o;c>0&&this.buffer[c-2]>n;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Fo(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new IQ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let r=0,o;r<t.length;r+=2)(o=t[r+1])!=this.state&&this.p.parser.hasAction(o,e)&&s.push(t[r],o);if(this.stack.length<120)for(let r=0;s.length<8&&r<t.length;r+=2){let o=t[r+1];s.some((a,c)=>c&1&&a==o)||s.push(t[r],o)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let r=t[s+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,r=this.stack.length-n*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-r;if(a>1){let c=o&65535,h=this.stack.length-a*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return a<<19|65536|c}}else{let a=n(o,r+1);if(a!=null)return a}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Xg(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Xg{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class IQ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class jo{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new jo(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new jo(this.stack,this.pos,this.index)}}function rr(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let r=0;for(;;){let o=i.charCodeAt(n++),a=!1;if(o==126){r=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,a=!0),r+=c,a)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class qo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Wg=new qo;class UQ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Wg,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,s=this.rangeIndex,r=this.pos+e;for(;r<n.from;){if(!s)return null;let o=this.ranges[--s];r-=n.from-o.to,n=o}for(;t<0?r>n.to:r>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-n.to,n=o}return r}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let r=this.resolveOffset(e,1);if(r==null)return-1;if(n=r,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Wg,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class ns{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Yg(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}ns.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class Fc{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?rr(e):e}token(e,t){let n=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Yg(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}Fc.prototype.contextual=ns.prototype.fallback=ns.prototype.extend=!1;class or{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Yg(i,e,t,n,s,r){let o=0,a=1<<n,{dialect:c}=t.p.parser;e:for(;a&i[o];){let h=i[o+1];for(let m=o+3;m<h;m+=2)if((i[m+1]&a)>0){let b=i[m];if(c.allows(b)&&(e.token.value==-1||e.token.value==b||FQ(b,e.token.value,s,r))){e.acceptToken(b);break}}let u=e.next,f=0,d=i[o+2];if(e.next<0&&d>f&&i[h+d*3-3]==65535){o=i[h+d*3-1];continue e}for(;f<d;){let m=f+d>>1,b=h+m+(m<<1),w=i[b],g=i[b+1]||65536;if(u<w)d=m;else if(u>=g)f=m+1;else{o=i[b+2],e.advance();continue e}}break}}function zg(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function FQ(i,e,t,n){let s=zg(t,n,e);return s<0||zg(t,n,i)<s}const Bt=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let jc=null;function Gg(i,e,t){let n=i.cursor(nt.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class jQ{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Gg(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Gg(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[s],o=this.start[t]+n.positions[s];if(o>e)return this.nextStart=o,null;if(r instanceof et){if(o==e){if(o<this.safeFrom)return null;let a=o+r.length;if(a<=this.safeTo){let c=r.prop(xe.lookAhead);if(!c||a+c<this.fragment.to)return r}}this.index[t]++,o+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class qQ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new qo)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<r.length;h++){if(!(1<<h&o))continue;let u=r[h],f=this.tokens[h];if(!(n&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(n=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!n&&e.pos==this.stream.end&&(n=new qo,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new qo,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:r}=n.p;for(let o=0;o<r.specialized.length;o++)if(r.specialized[o]==e.value){let a=r.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let r=0;r<s;r+=3)if(this.actions[r]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:r}=e,{parser:o}=e.p,{data:a}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(r,c?2:1);;h+=3){if(a[h]==65535)if(a[h+1]==1)h=Ni(a,h+2);else{s==0&&a[h+1]==2&&(s=this.putAction(Ni(a,h+2),t,n,s));break}a[h]==t&&(s=this.putAction(Ni(a,h+1),t,n,s))}return s}}class XQ{constructor(e,t,n,s){this.parser=e,this.input=t,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new UQ(t,s),this.tokens=new qQ(e,this.stream),this.topTerm=e.top[1];let{from:r}=s[0];this.stacks=[Fo.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>e.bufferLength*4?new jQ(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)n.push(a);else{if(this.advanceStack(a,n,e))continue;{s||(s=[],r=[]),s.push(a);let c=this.tokens.getMainToken(a);r.push(c.value,c.end)}}break}}if(!n.length){let o=s&&zQ(s);if(o)return Bt&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Bt&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,n);if(o)return Bt&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,c)=>c.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let c=o+1;c<n.length;c++){let h=n[c];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500)if((a.score-h.score||a.buffer.length-h.buffer.length)>0)n.splice(c--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let s=e.pos,{parser:r}=this,o=Bt?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,u=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!h||(f.prop(xe.contextHash)||0)==u))return e.useNode(f,d),Bt&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof et)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof et&&f.positions[0]==0)f=m;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),Bt&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let u=c[h++],f=c[h++],d=c[h++],m=h==c.length||!n,b=m?e:e.split(),w=this.tokens.mainToken;if(b.apply(u,f,w?w.start:b.pos,d),Bt&&console.log(o+this.stackID(b)+` (via ${u&65536?`reduce of ${r.getName(u&65535)}`:"shift"} for ${r.getName(f)} @ ${s}${b==e?"":", split"})`),m)return!0;b.pos>s?t.push(b):n.push(b)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Hg(e,t),!0}}runRecovery(e,t,n){let s=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o],c=t[o<<1],h=t[(o<<1)+1],u=Bt?this.stackID(a)+" -> ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),Bt&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),d=u;for(let m=0;f.forceReduce()&&m<10&&(Bt&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));m++)Bt&&(d=this.stackID(f)+" -> ");for(let m of a.recoverByInsert(c))Bt&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(h==a.pos&&(h++,c=0),a.recoverByDelete(c,h),Bt&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),Hg(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(e){return e.close(),et.build({buffer:jo.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(jc||(jc=new WeakMap)).get(e);return t||jc.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Hg(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class WQ{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const qc=i=>i;class YQ{constructor(e){this.start=e.start,this.shift=e.shift||qc,this.reduce=e.reduce||qc,this.reuse=e.reuse||qc,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Xo extends vp{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),s=[];for(let a=0;a<t.length;a++)s.push([]);function r(a,c,h){s[a].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=xe[c]);for(let h=1;h<a.length;){let u=a[h++];if(u>=0)r(u,c,a[h++]);else{let f=a[h+-u];for(let d=-u;d>0;d--)r(a[h++],c,f);h++}}}this.nodeSet=new Ga(t.map((a,c)=>Pt.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:s[c],top:n.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Np;let o=rr(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(Kg),this.states=rr(e.states,Uint32Array),this.data=rr(e.stateData),this.goto=rr(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ns(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let s=new XQ(this,e,t,n);for(let r of this.wrappers)s=r(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],a=o&1,c=s[r++];if(a&&n)return c;for(let h=r+(o>>1);r<h;r++)if(s[r]==e)return c;if(a)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let r=this.stateSlot(e,s?2:1),o;;r+=3){if((o=n[r])==65535)if(n[r+1]==1)o=n[r=Ni(n,r+2)];else{if(n[r+1]==2)return Ni(n,r+2);break}if(o==t||o==0)return Ni(n,r+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ni(this.data,r+2);else break;s=t(Ni(this.data,r+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Ni(this.data,n+2);else break;if(!(this.data[n+2]&1)){let s=this.data[n+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(Xo.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(r=>r.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let r=e.specializers.find(a=>a.from==n.external);if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[s]=Kg(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(n[o]=!0)}let s=null;for(let r=0;r<t.length;r++)if(!n[r])for(let o=this.dialects[t[r]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new WQ(e,n,s)}static deserialize(e){return new Xo(e)}}function Ni(i,e){return i[e]|i[e+1]<<16}function zQ(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Kg(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const GQ=314,HQ=315,Jg=1,KQ=2,JQ=3,eP=4,tP=316,iP=318,nP=319,sP=5,rP=6,oP=0,Xc=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],eO=125,lP=59,Wc=47,aP=42,cP=43,hP=45,uP=60,fP=44,dP=63,pP=46,mP=91,gP=new YQ({start:!1,shift(i,e){return e==sP||e==rP||e==iP?i:e==nP},strict:!1}),OP=new or((i,e)=>{let{next:t}=i;(t==eO||t==-1||e.context)&&i.acceptToken(tP)},{contextual:!0,fallback:!0}),_P=new or((i,e)=>{let{next:t}=i,n;Xc.indexOf(t)>-1||t==Wc&&((n=i.peek(1))==Wc||n==aP)||t!=eO&&t!=lP&&t!=-1&&!e.context&&i.acceptToken(GQ)},{contextual:!0}),bP=new or((i,e)=>{i.next==mP&&!e.context&&i.acceptToken(HQ)},{contextual:!0}),yP=new or((i,e)=>{let{next:t}=i;if(t==cP||t==hP){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(Jg);i.acceptToken(n?Jg:KQ)}}else t==dP&&i.peek(1)==pP&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(JQ))},{contextual:!0});function Yc(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const wP=new or((i,e)=>{if(i.next!=uP||!e.dialectEnabled(oP)||(i.advance(),i.next==Wc))return;let t=0;for(;Xc.indexOf(i.next)>-1;)i.advance(),t++;if(Yc(i.next,!0)){for(i.advance(),t++;Yc(i.next,!1);)i.advance(),t++;for(;Xc.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==fP)return;for(let n=0;;n++){if(n==7){if(!Yc(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(eP,-t)}),kP=Zp({"get set async static":L.modifier,"for while do if else switch try catch finally return throw break continue default case":L.controlKeyword,"in of await yield void typeof delete instanceof":L.operatorKeyword,"let var const using function class extends":L.definitionKeyword,"import export from":L.moduleKeyword,"with debugger as new":L.keyword,TemplateString:L.special(L.string),super:L.atom,BooleanLiteral:L.bool,this:L.self,null:L.null,Star:L.modifier,VariableName:L.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":L.function(L.variableName),VariableDefinition:L.definition(L.variableName),Label:L.labelName,PropertyName:L.propertyName,PrivatePropertyName:L.special(L.propertyName),"CallExpression/MemberExpression/PropertyName":L.function(L.propertyName),"FunctionDeclaration/VariableDefinition":L.function(L.definition(L.variableName)),"ClassDeclaration/VariableDefinition":L.definition(L.className),"NewExpression/VariableName":L.className,PropertyDefinition:L.definition(L.propertyName),PrivatePropertyDefinition:L.definition(L.special(L.propertyName)),UpdateOp:L.updateOperator,"LineComment Hashbang":L.lineComment,BlockComment:L.blockComment,Number:L.number,String:L.string,Escape:L.escape,ArithOp:L.arithmeticOperator,LogicOp:L.logicOperator,BitOp:L.bitwiseOperator,CompareOp:L.compareOperator,RegExp:L.regexp,Equals:L.definitionOperator,Arrow:L.function(L.punctuation),": Spread":L.punctuation,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace,"InterpolationStart InterpolationEnd":L.special(L.brace),".":L.derefOperator,", ;":L.separator,"@":L.meta,TypeName:L.typeName,TypeDefinition:L.definition(L.typeName),"type enum interface implements namespace module declare":L.definitionKeyword,"abstract global Privacy readonly override":L.modifier,"is keyof unique infer asserts":L.operatorKeyword,JSXAttributeValue:L.attributeValue,JSXText:L.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":L.angleBracket,"JSXIdentifier JSXNameSpacedName":L.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":L.attributeName,"JSXBuiltin/JSXIdentifier":L.standard(L.tagName)}),xP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},SP={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},CP={__proto__:null,"<":189},AP=Xo.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#HQO<qQ`O'#HTO>YQ`O'#CeO>jQ`O'#HaO>r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:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c&gtmOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:378,context:gP,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[kP],skippedNodes:[0,5,6,276],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}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!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(a~~",141,338),new Fc("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:i=>xP[i]||-1},{term:341,get:i=>SP[i]||-1},{term:93,get:i=>CP[i]||-1}],tokenPrec:15116}),tO=[Nt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Nt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Nt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Nt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Nt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Nt(`try {
37
+ */var XT=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[UT]}),WT=Symbol("vue-codemirror-global-config"),St,qT=function(i){var e=i.onUpdate,t=i.onChange,n=i.onFocus,s=i.onBlur,r=function(o,a){var c={};for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&a.indexOf(u)<0&&(c[u]=o[u]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(u=Object.getOwnPropertySymbols(o);h<u.length;h++)a.indexOf(u[h])<0&&Object.prototype.propertyIsEnumerable.call(o,u[h])&&(c[u[h]]=o[u[h]])}return c}(i,["onUpdate","onChange","onFocus","onBlur"]);return Ce.create({doc:r.doc,selection:r.selection,extensions:(Array.isArray(r.extensions)?r.extensions:[r.extensions]).concat([ie.updateListener.of(function(o){e(o),o.docChanged&&t(o.state.doc.toString(),o),o.focusChanged&&(o.view.hasFocus?n(o):s(o))})])})},ns=function(i){var e=new bs;return{compartment:e,run:function(t){e.get(i.state)?i.dispatch({effects:e.reconfigure(t)}):i.dispatch({effects:ke.appendConfig.of(e.of(t))})}}},oO=function(i,e){var t=ns(i),n=t.compartment,s=t.run;return function(r){var o=n.get(i.state);s(r??o!==e?e:[])}},Uo={type:Boolean,default:void 0},jT={autofocus:Uo,disabled:Uo,indentWithTab:Uo,tabSize:Number,placeholder:String,style:Object,autoDestroy:Uo,phrases:Object,root:Object,extensions:Array,selection:Object},zT={modelValue:{type:String,default:""}},YT=Object.assign(Object.assign({},jT),zT);(function(i){i.Change="change",i.Update="update",i.Focus="focus",i.Blur="blur",i.Ready="ready",i.ModelUpdate="update:modelValue"})(St||(St={}));var Sn={};Sn[St.Change]=function(i,e){return!0},Sn[St.Update]=function(i){return!0},Sn[St.Focus]=function(i){return!0},Sn[St.Blur]=function(i){return!0},Sn[St.Ready]=function(i){return!0};var lO={};lO[St.ModelUpdate]=Sn[St.Change];var GT=Object.assign(Object.assign({},Sn),lO),KT=l.defineComponent({name:"VueCodemirror",props:Object.assign({},YT),emits:Object.assign({},GT),setup:function(i,e){var t=l.shallowRef(),n=l.shallowRef(),s=l.shallowRef(),r=Object.assign(Object.assign({},XT),l.inject(WT,{})),o=l.computed(function(){var a={};return Object.keys(l.toRaw(i)).forEach(function(c){var u;c!=="modelValue"&&(a[c]=(u=i[c])!==null&&u!==void 0?u:r[c])}),a});return l.onMounted(function(){var a;n.value=qT({doc:i.modelValue,selection:o.value.selection,extensions:(a=r.extensions)!==null&&a!==void 0?a:[],onFocus:function(u){return e.emit(St.Focus,u)},onBlur:function(u){return e.emit(St.Blur,u)},onUpdate:function(u){return e.emit(St.Update,u)},onChange:function(u,h){u!==i.modelValue&&(e.emit(St.Change,u,h),e.emit(St.ModelUpdate,u,h))}}),s.value=function(u){return new ie(Object.assign({},u))}({state:n.value,parent:t.value,root:o.value.root});var c=function(u){var h=function(){return u.state.doc.toString()},f=ns(u).run,d=oO(u,[ie.editable.of(!1),Ce.readOnly.of(!0)]),m=oO(u,Ms.of([uA])),b=ns(u).run,w=ns(u).run,g=ns(u).run,p=ns(u).run;return{focus:function(){return u.focus()},getDoc:h,setDoc:function(y){y!==h()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:y}})},reExtensions:f,toggleDisabled:d,toggleIndentWithTab:m,setTabSize:function(y){b([Ce.tabSize.of(y),js.of(" ".repeat(y))])},setPhrases:function(y){w([Ce.phrases.of(y)])},setPlaceholder:function(y){g(_x(y))},setStyle:function(y){y===void 0&&(y={}),p(ie.theme({"&":Object.assign({},y)}))}}}(s.value);l.watch(function(){return i.modelValue},function(u){u!==c.getDoc()&&c.setDoc(u)}),l.watch(function(){return i.extensions},function(u){return c.reExtensions(u||[])},{immediate:!0}),l.watch(function(){return o.value.disabled},function(u){return c.toggleDisabled(u)},{immediate:!0}),l.watch(function(){return o.value.indentWithTab},function(u){return c.toggleIndentWithTab(u)},{immediate:!0}),l.watch(function(){return o.value.tabSize},function(u){return c.setTabSize(u)},{immediate:!0}),l.watch(function(){return o.value.phrases},function(u){return c.setPhrases(u||{})},{immediate:!0}),l.watch(function(){return o.value.placeholder},function(u){return c.setPlaceholder(u)},{immediate:!0}),l.watch(function(){return o.value.style},function(u){return c.setStyle(u)},{immediate:!0}),o.value.autofocus&&c.focus(),e.emit(St.Ready,{state:n.value,view:s.value,container:t.value})}),l.onBeforeUnmount(function(){o.value.autoDestroy&&s.value&&function(a){a.destroy()}(s.value)}),function(){return l.h("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),HT=KT;class Xo{constructor(e,t,n,s,r,o,a,c,u,h=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=r,this.score=o,this.buffer=a,this.bufferBase=c,this.curContext=u,this.lookAhead=h,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new Xo(e,[],t,n,n,0,[],0,s?new aO(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(s);if(a&&(this.score+=a),n==0){this.pushState(r.getGoto(this.state,s,!0),this.reducePos),s<r.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let c=this.stack.length-(n-1)*3-(e&262144?6:0),u=c?this.stack[c-2]:this.p.ranges[0].from,h=this.reducePos-u;h>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=h));let f=c?this.stack[c-1]:0,d=this.bufferBase+this.buffer.length-f;if(s<r.minRepeatTerm||e&131072){let m=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,u,m,d+4,!0)}if(e&262144)this.state=this.stack[c];else{let m=this.stack[c-3];this.state=r.getGoto(m,s,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(s,u)}storeNode(e,t,n,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=n;return}}}if(!r||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let c=o;c>0&&this.buffer[c-2]>n;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4);else{let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Xo(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new JT(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let r=0,o;r<t.length;r+=2)(o=t[r+1])!=this.state&&this.p.parser.hasAction(o,e)&&s.push(t[r],o);if(this.stack.length<120)for(let r=0;s.length<8&&r<t.length;r+=2){let o=t[r+1];s.some((a,c)=>c&1&&a==o)||s.push(t[r],o)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let r=t[s+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,r=this.stack.length-n*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-r;if(a>1){let c=o&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],c,!1)>=0)return a<<19|65536|c}}else{let a=n(o,r+1);if(a!=null)return a}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new aO(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class aO{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class JT{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Wo{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Wo(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Wo(this.stack,this.pos,this.index)}}function ar(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let r=0;for(;;){let o=i.charCodeAt(n++),a=!1;if(o==126){r=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,a=!0),r+=c,a)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class qo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const cO=new qo;class eP{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,s=this.rangeIndex,r=this.pos+e;for(;r<n.from;){if(!s)return null;let o=this.ranges[--s];r-=n.from-o.to,n=o}for(;t<0?r>n.to:r>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-n.to,n=o}return r}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let r=this.resolveOffset(e,1);if(r==null)return-1;if(n=r,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=n;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=cO,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class ss{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;uO(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}ss.prototype.contextual=ss.prototype.fallback=ss.prototype.extend=!1;class Wc{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?ar(e):e}token(e,t){let n=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(uO(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}Wc.prototype.contextual=ss.prototype.fallback=ss.prototype.extend=!1;class cr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function uO(i,e,t,n,s,r){let o=0,a=1<<n,{dialect:c}=t.p.parser;e:for(;a&i[o];){let u=i[o+1];for(let m=o+3;m<u;m+=2)if((i[m+1]&a)>0){let b=i[m];if(c.allows(b)&&(e.token.value==-1||e.token.value==b||tP(b,e.token.value,s,r))){e.acceptToken(b);break}}let h=e.next,f=0,d=i[o+2];if(e.next<0&&d>f&&i[u+d*3-3]==65535){o=i[u+d*3-1];continue e}for(;f<d;){let m=f+d>>1,b=u+m+(m<<1),w=i[b],g=i[b+1]||65536;if(h<w)d=m;else if(h>=g)f=m+1;else{o=i[b+2],e.advance();continue e}}break}}function hO(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function tP(i,e,t,n){let s=hO(t,n,e);return s<0||hO(t,n,i)<s}const Dt=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let qc=null;function fO(i,e,t){let n=i.cursor(nt.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class iP{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?fO(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?fO(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[s],o=this.start[t]+n.positions[s];if(o>e)return this.nextStart=o,null;if(r instanceof et){if(o==e){if(o<this.safeFrom)return null;let a=o+r.length;if(a<=this.safeTo){let c=r.prop(Se.lookAhead);if(!c||a+c<this.fragment.to)return r}}this.index[t]++,o+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class nP{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new qo)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let u=0;u<r.length;u++){if(!(1<<u&o))continue;let h=r[u],f=this.tokens[u];if(!(n&&!h.fallback)&&((h.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,h,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!h.extend&&(n=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!n&&e.pos==this.stream.end&&(n=new qo,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new qo,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:r}=n.p;for(let o=0;o<r.specialized.length;o++)if(r.specialized[o]==e.value){let a=r.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let r=0;r<s;r+=3)if(this.actions[r]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:r}=e,{parser:o}=e.p,{data:a}=o;for(let c=0;c<2;c++)for(let u=o.stateSlot(r,c?2:1);;u+=3){if(a[u]==65535)if(a[u+1]==1)u=Ri(a,u+2);else{s==0&&a[u+1]==2&&(s=this.putAction(Ri(a,u+2),t,n,s));break}a[u]==t&&(s=this.putAction(Ri(a,u+1),t,n,s))}return s}}class sP{constructor(e,t,n,s){this.parser=e,this.input=t,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new eP(t,s),this.tokens=new nP(e,this.stream),this.topTerm=e.top[1];let{from:r}=s[0];this.stacks=[Xo.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>e.bufferLength*4?new iP(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)n.push(a);else{if(this.advanceStack(a,n,e))continue;{s||(s=[],r=[]),s.push(a);let c=this.tokens.getMainToken(a);r.push(c.value,c.end)}}break}}if(!n.length){let o=s&&lP(s);if(o)return Dt&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Dt&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,n);if(o)return Dt&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,c)=>c.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let a=n[o];for(let c=o+1;c<n.length;c++){let u=n[c];if(a.sameState(u)||a.buffer.length>500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)n.splice(c--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let s=e.pos,{parser:r}=this,o=Dt?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,h=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!u||(f.prop(Se.contextHash)||0)==h))return e.useNode(f,d),Dt&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof et)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof et&&f.positions[0]==0)f=m;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),Dt&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let u=0;u<c.length;){let h=c[u++],f=c[u++],d=c[u++],m=u==c.length||!n,b=m?e:e.split(),w=this.tokens.mainToken;if(b.apply(h,f,w?w.start:b.pos,d),Dt&&console.log(o+this.stackID(b)+` (via ${h&65536?`reduce of ${r.getName(h&65535)}`:"shift"} for ${r.getName(f)} @ ${s}${b==e?"":", split"})`),m)return!0;b.pos>s?t.push(b):n.push(b)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return dO(e,t),!0}}runRecovery(e,t,n){let s=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o],c=t[o<<1],u=t[(o<<1)+1],h=Dt?this.stackID(a)+" -> ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),Dt&&console.log(h+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),d=h;for(let m=0;m<10&&f.forceReduce()&&(Dt&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));m++)Dt&&(d=this.stackID(f)+" -> ");for(let m of a.recoverByInsert(c))Dt&&console.log(h+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,n);this.stream.end>a.pos?(u==a.pos&&(u++,c=0),a.recoverByDelete(c,u),Dt&&console.log(h+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),dO(a,n)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(e){return e.close(),et.build({buffer:Wo.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(qc||(qc=new WeakMap)).get(e);return t||qc.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function dO(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class rP{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const jc=i=>i;class oP{constructor(e){this.start=e.start,this.shift=e.shift||jc,this.reduce=e.reduce||jc,this.reuse=e.reuse||jc,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class jo extends em{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),s=[];for(let a=0;a<t.length;a++)s.push([]);function r(a,c,u){s[a].push([c,c.deserialize(String(u))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=Se[c]);for(let u=1;u<a.length;){let h=a[u++];if(h>=0)r(h,c,a[u++]);else{let f=a[u+-h];for(let d=-h;d>0;d--)r(a[u++],c,f);u++}}}this.nodeSet=new Ka(t.map((a,c)=>Pt.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:s[c],top:n.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=jp;let o=ar(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(pO),this.states=ar(e.states,Uint32Array),this.data=ar(e.stateData),this.goto=ar(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ss(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let s=new sP(this,e,t,n);for(let r of this.wrappers)s=r(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],a=o&1,c=s[r++];if(a&&n)return c;for(let u=r+(o>>1);r<u;r++)if(s[r]==e)return c;if(a)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let r=this.stateSlot(e,s?2:1),o;;r+=3){if((o=n[r])==65535)if(n[r+1]==1)o=n[r=Ri(n,r+2)];else{if(n[r+1]==2)return Ri(n,r+2);break}if(o==t||o==0)return Ri(n,r+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ri(this.data,r+2);else break;s=t(Ri(this.data,r+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Ri(this.data,n+2);else break;if(!(this.data[n+2]&1)){let s=this.data[n+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(jo.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(r=>r.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let r=e.specializers.find(a=>a.from==n.external);if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[s]=pO(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(n[o]=!0)}let s=null;for(let r=0;r<t.length;r++)if(!n[r])for(let o=this.dialects[t[r]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new rP(e,n,s)}static deserialize(e){return new jo(e)}}function Ri(i,e){return i[e]|i[e+1]<<16}function lP(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function pO(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const aP=316,cP=317,mO=1,uP=2,hP=3,fP=4,dP=318,pP=320,mP=321,gP=5,OP=6,_P=0,zc=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],gO=125,bP=59,Yc=47,yP=42,wP=43,kP=45,xP=60,SP=44,CP=63,AP=46,TP=91,PP=new oP({start:!1,shift(i,e){return e==gP||e==OP||e==pP?i:e==mP},strict:!1}),QP=new cr((i,e)=>{let{next:t}=i;(t==gO||t==-1||e.context)&&i.acceptToken(dP)},{contextual:!0,fallback:!0}),EP=new cr((i,e)=>{let{next:t}=i,n;zc.indexOf(t)>-1||t==Yc&&((n=i.peek(1))==Yc||n==yP)||t!=gO&&t!=bP&&t!=-1&&!e.context&&i.acceptToken(aP)},{contextual:!0}),$P=new cr((i,e)=>{i.next==TP&&!e.context&&i.acceptToken(cP)},{contextual:!0}),NP=new cr((i,e)=>{let{next:t}=i;if(t==wP||t==kP){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(mO);i.acceptToken(n?mO:uP)}}else t==CP&&i.peek(1)==AP&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(hP))},{contextual:!0});function Gc(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const RP=new cr((i,e)=>{if(i.next!=xP||!e.dialectEnabled(_P)||(i.advance(),i.next==Yc))return;let t=0;for(;zc.indexOf(i.next)>-1;)i.advance(),t++;if(Gc(i.next,!0)){for(i.advance(),t++;Gc(i.next,!1);)i.advance(),t++;for(;zc.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==SP)return;for(let n=0;;n++){if(n==7){if(!Gc(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(fP,-t)}),VP=tm({"get set async static":M.modifier,"for while do if else switch try catch finally return throw break continue default case defer":M.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":M.operatorKeyword,"let var const using function class extends":M.definitionKeyword,"import export from":M.moduleKeyword,"with debugger new":M.keyword,TemplateString:M.special(M.string),super:M.atom,BooleanLiteral:M.bool,this:M.self,null:M.null,Star:M.modifier,VariableName:M.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":M.function(M.variableName),VariableDefinition:M.definition(M.variableName),Label:M.labelName,PropertyName:M.propertyName,PrivatePropertyName:M.special(M.propertyName),"CallExpression/MemberExpression/PropertyName":M.function(M.propertyName),"FunctionDeclaration/VariableDefinition":M.function(M.definition(M.variableName)),"ClassDeclaration/VariableDefinition":M.definition(M.className),"NewExpression/VariableName":M.className,PropertyDefinition:M.definition(M.propertyName),PrivatePropertyDefinition:M.definition(M.special(M.propertyName)),UpdateOp:M.updateOperator,"LineComment Hashbang":M.lineComment,BlockComment:M.blockComment,Number:M.number,String:M.string,Escape:M.escape,ArithOp:M.arithmeticOperator,LogicOp:M.logicOperator,BitOp:M.bitwiseOperator,CompareOp:M.compareOperator,RegExp:M.regexp,Equals:M.definitionOperator,Arrow:M.function(M.punctuation),": Spread":M.punctuation,"( )":M.paren,"[ ]":M.squareBracket,"{ }":M.brace,"InterpolationStart InterpolationEnd":M.special(M.brace),".":M.derefOperator,", ;":M.separator,"@":M.meta,TypeName:M.typeName,TypeDefinition:M.definition(M.typeName),"type enum interface implements namespace module declare":M.definitionKeyword,"abstract global Privacy readonly override":M.modifier,"is keyof unique infer asserts":M.operatorKeyword,JSXAttributeValue:M.attributeValue,JSXText:M.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":M.angleBracket,"JSXIdentifier JSXNameSpacedName":M.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":M.attributeName,"JSXBuiltin/JSXIdentifier":M.standard(M.tagName)}),LP={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},MP={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},DP={__proto__:null,"<":193},vP=jo.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#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7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:PP,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[VP],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP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er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[EP,$P,NP,RP,2,3,4,5,6,7,8,9,10,11,12,13,14,QP,new Wc("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Wc("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:i=>LP[i]||-1},{term:343,get:i=>MP[i]||-1},{term:95,get:i=>DP[i]||-1}],tokenPrec:15201}),OO=[Nt("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Nt("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Nt("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Nt("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Nt("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Nt(`try {
38
38
  \${}
39
39
  } catch (\${error}) {
40
40
  \${}
@@ -46,41 +46,41 @@ ${h}`:c)}else throw o},onCacheKey:o=>JO(e,t,o)}}function F0(i){if(ne(i))return i
46
46
  constructor(\${params}) {
47
47
  \${}
48
48
  }
49
- }`,{label:"class",detail:"definition",type:"keyword"}),Nt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Nt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],QP=tO.concat([Nt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Nt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Nt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),iO=new jx,nO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function lr(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const PP=["FunctionDeclaration"],TP={FunctionDeclaration:lr("function"),ClassDeclaration:lr("class"),ClassExpression:()=>!0,EnumDeclaration:lr("constant"),TypeAliasDeclaration:lr("type"),NamespaceDeclaration:lr("namespace"),VariableDefinition(i,e){i.matchContext(PP)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function sO(i,e){let t=iO.get(e);if(t)return t;let n=[],s=!0;function r(o,a){let c=i.sliceString(o.from,o.to);n.push({label:c,type:a})}return e.cursor(nt.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let a=TP[o.name];if(a&&a(o,r)||nO.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of sO(i,o.node))n.push(a);return!1}}),iO.set(e,n),n}const rO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,oO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function EP(i){let e=st(i.state).resolveInner(i.pos,-1);if(oO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&rO.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)nO.has(s.name)&&(n=n.concat(sO(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:rO}}const Sn=go.define({name:"javascript",parser:AP.configure({props:[zp.add({IfStatement:cc({except:/^\s*({|else\b)/}),TryStatement:cc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:uS,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:hS({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":cc({except:/^{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),Kp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":mS,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),lO={test:i=>/^JSX/.test(i.name),facet:qp({commentTokens:{block:{open:"{/*",close:"*/}"}}})},$P=Sn.configure({dialect:"ts"},"typescript"),NP=Sn.configure({dialect:"jsx",props:[rc.add(i=>i.isTop?[lO]:void 0)]}),RP=Sn.configure({dialect:"jsx ts",props:[rc.add(i=>i.isTop?[lO]:void 0)]},"typescript");let aO=i=>({label:i,type:"keyword"});const cO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(aO),VP=cO.concat(["declare","implements","private","protected","public"].map(aO));function LP(i={}){let e=i.jsx?i.typescript?RP:NP:i.typescript?$P:Sn,t=i.typescript?QP.concat(VP):tO.concat(cO);return new iS(e,[Sn.data.of({autocomplete:QA(oO,Og(t))}),Sn.data.of({autocomplete:EP}),i.jsx?DP:[]])}function MP(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function hO(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const BP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),DP=se.inputHandler.of((i,e,t,n,s)=>{if((BP?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Sn.isActiveAt(i.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(c=>{var h;let{head:u}=c,f=st(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=n||f.name=="JSXAttributeValue"&&f.to>u)){if(n==">"&&f.name=="JSXFragmentTag")return{range:c,changes:{from:u,insert:"</>"}};if(n=="/"&&f.name=="JSXStartCloseTag"){let m=f.parent,b=m.parent;if(b&&m.from==u-2&&((d=hO(o.doc,b.firstChild,u))||((h=b.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let w=`${d}>`;return{range:j.cursor(u+w.length,-1),changes:{from:u,insert:w}}}}else if(n==">"){let m=MP(f);if(m&&m.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=hO(o.doc,m,u)))return{range:c,changes:{from:u,insert:`</${d}>`}}}}return{range:c}});return a.changes.empty?!1:(i.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),vP="#e5c07b",uO="#e06c75",ZP="#56b6c2",IP="#ffffff",Wo="#abb2bf",zc="#7d8799",UP="#61afef",FP="#98c379",fO="#d19a66",jP="#c678dd",qP="#21252b",dO="#2c313a",pO="#282c34",Gc="#353a42",XP="#3E4451",mO="#528bff",WP=se.theme({"&":{color:Wo,backgroundColor:pO},".cm-content":{caretColor:mO},".cm-cursor, .cm-dropCursor":{borderLeftColor:mO},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:XP},".cm-panels":{backgroundColor:qP,color:Wo},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:pO,color:zc,border:"none"},".cm-activeLineGutter":{backgroundColor:dO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gc,borderBottomColor:Gc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:dO,color:Wo}}},{dark:!0}),YP=Ys.define([{tag:L.keyword,color:jP},{tag:[L.name,L.deleted,L.character,L.propertyName,L.macroName],color:uO},{tag:[L.function(L.variableName),L.labelName],color:UP},{tag:[L.color,L.constant(L.name),L.standard(L.name)],color:fO},{tag:[L.definition(L.name),L.separator],color:Wo},{tag:[L.typeName,L.className,L.number,L.changed,L.annotation,L.modifier,L.self,L.namespace],color:vP},{tag:[L.operator,L.operatorKeyword,L.url,L.escape,L.regexp,L.link,L.special(L.string)],color:ZP},{tag:[L.meta,L.comment],color:zc},{tag:L.strong,fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.link,color:zc,textDecoration:"underline"},{tag:L.heading,fontWeight:"bold",color:uO},{tag:[L.atom,L.bool,L.special(L.variableName)],color:fO},{tag:[L.processingInstruction,L.string,L.inserted],color:FP},{tag:L.invalid,color:IP}]),zP=[WP,lm(YP)];function GP(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var gO={exports:{}},ar={},Yo={exports:{}},Hc={},Kc={},OO;function Jc(){if(OO)return Kc;OO=1;function i(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}i.prototype.clone_empty=function(){var n=new i(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},i.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},i.prototype.has_match=function(n){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(n))return!0;return!1},i.prototype.set_indent=function(n,s){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},i.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(n){this.__items.push(n);var s=n.lastIndexOf(`
49
+ }`,{label:"class",detail:"definition",type:"keyword"}),Nt('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Nt('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],BP=OO.concat([Nt("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Nt("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Nt("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),_O=new eS,bO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ur(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const IP=["FunctionDeclaration"],ZP={FunctionDeclaration:ur("function"),ClassDeclaration:ur("class"),ClassExpression:()=>!0,EnumDeclaration:ur("constant"),TypeAliasDeclaration:ur("type"),NamespaceDeclaration:ur("namespace"),VariableDefinition(i,e){i.matchContext(IP)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function yO(i,e){let t=_O.get(e);if(t)return t;let n=[],s=!0;function r(o,a){let c=i.sliceString(o.from,o.to);n.push({label:c,type:a})}return e.cursor(nt.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let a=ZP[o.name];if(a&&a(o,r)||bO.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of yO(i,o.node))n.push(a);return!1}}),_O.set(e,n),n}const wO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,kO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function FP(i){let e=st(i.state).resolveInner(i.pos,-1);if(kO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&wO.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)bO.has(s.name)&&(n=n.concat(yO(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:wO}}const Cn=_o.define({name:"javascript",parser:vP.configure({props:[um.add({IfStatement:uc({except:/^\s*({|else\b)/}),TryStatement:uc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:wS,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:yS({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":uc({except:/^\s*{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),dm.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":CS,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),xO={test:i=>/^JSX/.test(i.name),facet:om({commentTokens:{block:{open:"{/*",close:"*/}"}}})},UP=Cn.configure({dialect:"ts"},"typescript"),XP=Cn.configure({dialect:"jsx",props:[oc.add(i=>i.isTop?[xO]:void 0)]}),WP=Cn.configure({dialect:"jsx ts",props:[oc.add(i=>i.isTop?[xO]:void 0)]},"typescript");let SO=i=>({label:i,type:"keyword"});const CO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(SO),qP=CO.concat(["declare","implements","private","protected","public"].map(SO));function jP(i={}){let e=i.jsx?i.typescript?WP:XP:i.typescript?UP:Cn,t=i.typescript?BP.concat(qP):OO.concat(CO);return new fS(e,[Cn.data.of({autocomplete:BA(kO,Rg(t))}),Cn.data.of({autocomplete:FP}),i.jsx?GP:[]])}function zP(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function AO(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const YP=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),GP=ie.inputHandler.of((i,e,t,n,s)=>{if((YP?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Cn.isActiveAt(i.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(c=>{var u;let{head:h}=c,f=st(o).resolveInner(h-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(h-1,h)!=n||f.name=="JSXAttributeValue"&&f.to>h)){if(n==">"&&f.name=="JSXFragmentTag")return{range:c,changes:{from:h,insert:"</>"}};if(n=="/"&&f.name=="JSXStartCloseTag"){let m=f.parent,b=m.parent;if(b&&m.from==h-2&&((d=AO(o.doc,b.firstChild,h))||((u=b.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let w=`${d}>`;return{range:W.cursor(h+w.length,-1),changes:{from:h,insert:w}}}}else if(n==">"){let m=zP(f);if(m&&m.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(h,h+2))&&(d=AO(o.doc,m,h)))return{range:c,changes:{from:h,insert:`</${d}>`}}}}return{range:c}});return a.changes.empty?!1:(i.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),KP="#e5c07b",TO="#e06c75",HP="#56b6c2",JP="#ffffff",zo="#abb2bf",Kc="#7d8799",eQ="#61afef",tQ="#98c379",PO="#d19a66",iQ="#c678dd",nQ="#21252b",QO="#2c313a",EO="#282c34",Hc="#353a42",sQ="#3E4451",$O="#528bff",rQ=ie.theme({"&":{color:zo,backgroundColor:EO},".cm-content":{caretColor:$O},".cm-cursor, .cm-dropCursor":{borderLeftColor:$O},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:sQ},".cm-panels":{backgroundColor:nQ,color:zo},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:EO,color:Kc,border:"none"},".cm-activeLineGutter":{backgroundColor:QO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Hc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Hc,borderBottomColor:Hc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:QO,color:zo}}},{dark:!0}),oQ=Gs.define([{tag:M.keyword,color:iQ},{tag:[M.name,M.deleted,M.character,M.propertyName,M.macroName],color:TO},{tag:[M.function(M.variableName),M.labelName],color:eQ},{tag:[M.color,M.constant(M.name),M.standard(M.name)],color:PO},{tag:[M.definition(M.name),M.separator],color:zo},{tag:[M.typeName,M.className,M.number,M.changed,M.annotation,M.modifier,M.self,M.namespace],color:KP},{tag:[M.operator,M.operatorKeyword,M.url,M.escape,M.regexp,M.link,M.special(M.string)],color:HP},{tag:[M.meta,M.comment],color:Kc},{tag:M.strong,fontWeight:"bold"},{tag:M.emphasis,fontStyle:"italic"},{tag:M.strikethrough,textDecoration:"line-through"},{tag:M.link,color:Kc,textDecoration:"underline"},{tag:M.heading,fontWeight:"bold",color:TO},{tag:[M.atom,M.bool,M.special(M.variableName)],color:PO},{tag:[M.processingInstruction,M.string,M.inserted],color:tQ},{tag:M.invalid,color:JP}]),lQ=[rQ,xm(oQ)];function aQ(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var NO={exports:{}},hr={},Yo={exports:{}},Jc={},eu={},RO;function tu(){if(RO)return eu;RO=1;function i(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}i.prototype.clone_empty=function(){var n=new i(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},i.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},i.prototype.has_match=function(n){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(n))return!0;return!1},i.prototype.set_indent=function(n,s){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},i.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(n){this.__items.push(n);var s=n.lastIndexOf(`
50
50
  `);s!==-1?this.__character_count=n.length-s:this.__character_count+=n.length},i.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function e(n,s){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),s=s||"",n.indent_level>0&&(s=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}e.prototype.get_indent_size=function(n,s){var r=this.__base_string_length;return s=s||0,n<0&&(r=0),r+=n*this.__indent_size,r+=s,r},e.prototype.get_indent_string=function(n,s){var r=this.__base_string;return s=s||0,n<0&&(n=0,r=""),s+=n*this.__indent_size,this.__ensure_cache(s),r+=this.__cache[s],r},e.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},e.prototype.__add_column=function(){var n=this.__cache.length,s=0,r="";this.__indent_size&&n>=this.__indent_size&&(s=Math.floor(n/this.__indent_size),n-=s*this.__indent_size,r=new Array(s+1).join(this.__indent_string)),n&&(r+=new Array(n+1).join(" ")),this.__cache.push(r)};function t(n,s){this.__indent_cache=new e(n,s),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return t.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},t.prototype.get_line_number=function(){return this.__lines.length},t.prototype.get_indent_string=function(n,s){return this.__indent_cache.get_indent_string(n,s)},t.prototype.get_indent_size=function(n,s){return this.__indent_cache.get_indent_size(n,s)},t.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},t.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},t.prototype.get_code=function(n){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
51
51
  `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
52
52
  `);return n!==`
53
- `&&(r=r.replace(/[\n]/g,n)),r},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(n,s){return n=n||0,s=s||0,this.next_line.set_indent(n,s),this.__lines.length>1?(this.current_line.set_indent(n,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(n){for(var s=0;s<n.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},t.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},t.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},t.prototype.remove_indent=function(n){for(var s=this.__lines.length;n<s;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},t.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(n,s){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(n)!==0&&o.item(-1)!==s){this.__lines.splice(r+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},Kc.Output=t,Kc}var eh={},_O;function bO(){if(_O)return eh;_O=1;function i(e,t,n,s){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return eh.Token=i,eh}var th={},yO;function wO(){return yO||(yO=1,function(i){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\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\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\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\\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-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\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-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\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-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\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",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",o="(?:"+r+"|["+e+n+"])",a="(?:"+r+"|["+t+n+s+"])*";i.identifier=new RegExp(o+a,"g"),i.identifierStart=new RegExp(o),i.identifierMatch=new RegExp("(?:"+r+"|["+t+n+s+"])+"),i.newline=/[\n\r\u2028\u2029]/,i.lineBreak=new RegExp(`\r
54
- |`+i.newline.source),i.allLineBreaks=new RegExp(i.lineBreak.source,"g")}(th)),th}var ih={},cr={},kO;function nh(){if(kO)return cr;kO=1;function i(n,s){this.raw_options=e(n,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}i.prototype._get_array=function(n,s){var r=this.raw_options[n],o=s||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},i.prototype._get_boolean=function(n,s){var r=this.raw_options[n],o=r===void 0?!!s:!!r;return o},i.prototype._get_characters=function(n,s){var r=this.raw_options[n],o=s||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
53
+ `&&(r=r.replace(/[\n]/g,n)),r},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(n,s){return n=n||0,s=s||0,this.next_line.set_indent(n,s),this.__lines.length>1?(this.current_line.set_indent(n,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(n){for(var s=0;s<n.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},t.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},t.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},t.prototype.remove_indent=function(n){for(var s=this.__lines.length;n<s;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},t.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(n,s){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(n)!==0&&o.item(-1)!==s){this.__lines.splice(r+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},eu.Output=t,eu}var iu={},VO;function LO(){if(VO)return iu;VO=1;function i(e,t,n,s){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}return iu.Token=i,iu}var nu={},MO;function DO(){return MO||(MO=1,function(i){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\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\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\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\\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-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\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-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\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-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\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",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",o="(?:"+r+"|["+e+n+"])",a="(?:"+r+"|["+t+n+s+"])*";i.identifier=new RegExp(o+a,"g"),i.identifierStart=new RegExp(o),i.identifierMatch=new RegExp("(?:"+r+"|["+t+n+s+"])+"),i.newline=/[\n\r\u2028\u2029]/,i.lineBreak=new RegExp(`\r
54
+ |`+i.newline.source),i.allLineBreaks=new RegExp(i.lineBreak.source,"g")}(nu)),nu}var su={},fr={},vO;function ru(){if(vO)return fr;vO=1;function i(n,s){this.raw_options=e(n,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}i.prototype._get_array=function(n,s){var r=this.raw_options[n],o=s||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},i.prototype._get_boolean=function(n,s){var r=this.raw_options[n],o=r===void 0?!!s:!!r;return o},i.prototype._get_characters=function(n,s){var r=this.raw_options[n],o=s||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
55
55
  `).replace(/\\t/," ")),o},i.prototype._get_number=function(n,s){var r=this.raw_options[n];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(r,10);return isNaN(o)&&(o=s),o},i.prototype._get_selection=function(n,s,r){var o=this._get_selection_list(n,s,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
56
56
  `+s+`
57
57
  You passed in: '`+this.raw_options[n]+"'");return o[0]},i.prototype._get_selection_list=function(n,s,r){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[s[0]],!this._is_valid_selection(r,s))throw new Error("Invalid Default Value!");var o=this._get_array(n,r);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
58
58
  `+s+`
59
- You passed in: '`+this.raw_options[n]+"'");return o},i.prototype._is_valid_selection=function(n,s){return n.length&&s.length&&!n.some(function(r){return s.indexOf(r)===-1})};function e(n,s){var r={};n=t(n);var o;for(o in n)o!==s&&(r[o]=n[o]);if(s&&n[s])for(o in n[s])r[o]=n[s][o];return r}function t(n){var s={},r;for(r in n){var o=r.replace(/-/g,"_");s[o]=n[r]}return s}return cr.Options=i,cr.normalizeOpts=t,cr.mergeOpts=e,cr}var xO;function SO(){if(xO)return ih;xO=1;var i=nh().Options,e=["before-newline","after-newline","preserve-newline"];function t(n){i.call(this,n,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<r.length;o++)r[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=r[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",e),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return t.prototype=new i,ih.Options=t,ih}var ss={},sh={},CO;function rh(){if(CO)return sh;CO=1;var i=RegExp.prototype.hasOwnProperty("sticky");function e(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}return e.prototype.restart=function(){this.__position=0},e.prototype.back=function(){this.__position>0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position<this.__input_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},e.prototype.peek=function(t){var n=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(n=this.__input.charAt(t)),n},e.prototype.__match=function(t,n){t.lastIndex=n;var s=t.exec(this.__input);return s&&!(i&&t.sticky)&&s.index!==n&&(s=null),s},e.prototype.test=function(t,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(t,n):!1},e.prototype.testChar=function(t,n){var s=this.peek(n);return t.lastIndex=0,s!==null&&t.test(s)},e.prototype.match=function(t){var n=this.__match(t,this.__position);return n?this.__position+=n[0].length:n=null,n},e.prototype.read=function(t,n,s){var r="",o;return t&&(o=this.match(t),o&&(r+=o[0])),n&&(o||!t)&&(r+=this.readUntil(n,s)),r},e.prototype.readUntil=function(t,n){var s="",r=this.__position;t.lastIndex=this.__position;var o=t.exec(this.__input);return o?(r=o.index,n&&(r+=o[0].length)):r=this.__input_length,s=this.__input.substring(this.__position,r),this.__position=r,s},e.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},e.prototype.get_regexp=function(t,n){var s=null,r="g";return n&&i&&(r="y"),typeof t=="string"&&t!==""?s=new RegExp(t,r):t&&(s=new RegExp(t.source,r)),s},e.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},e.prototype.peekUntilAfter=function(t){var n=this.__position,s=this.readUntilAfter(t);return this.__position=n,s},e.prototype.lookBack=function(t){var n=this.__position-1;return n>=t.length&&this.__input.substring(n-t.length,n).toLowerCase()===t},sh.InputScanner=e,sh}var zo={},oh={},AO;function HP(){if(AO)return oh;AO=1;function i(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return this.__tokens_length===0},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},i.prototype.peek=function(e){var t=null;return e=e||0,e+=this.__position,e>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},i.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},oh.TokenStream=i,oh}var lh={},ah={},QO;function Go(){if(QO)return ah;QO=1;function i(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return i.prototype.read=function(){var e=this._input.read(this._starting_pattern);return(!this._starting_pattern||e)&&(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},ah.Pattern=i,ah}var PO;function KP(){if(PO)return lh;PO=1;var i=Go().Pattern;function e(t,n){i.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return e.prototype=new i,e.prototype.__set_whitespace_patterns=function(t,n){t+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var n=this.__split(this._newline_regexp,t);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return t},e.prototype.matching=function(t,n){var s=this._create();return s.__set_whitespace_patterns(t,n),s._update(),s},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(t,n){t.lastIndex=0;for(var s=0,r=[],o=t.exec(n);o;)r.push(n.substring(s,o.index)),s=o.index+o[0].length,o=t.exec(n);return s<n.length?r.push(n.substring(s,n.length)):r.push(""),r},lh.WhitespacePattern=e,lh}var TO;function Ho(){if(TO)return zo;TO=1;var i=rh().InputScanner,e=bO().Token,t=HP().TokenStream,n=KP().WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(o,a){this._input=new i(o),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};return r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new t,this._reset();for(var o,a=new e(s.START,""),c=null,h=[],u=new t;a.type!==s.EOF;){for(o=this._get_next_token(a,c);this._is_comment(o);)u.add(o),o=this._get_next_token(a,c);u.isEmpty()||(o.comments_before=u,u=new t),o.parent=c,this._is_opening(o)?(h.push(c),c=o):c&&this._is_closing(o,c)&&(o.opened=c,c.closed=o,c=h.pop(),o.parent=c),o.previous=a,a.next=o,this.__tokens.add(o),a=o}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(o,a){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(s.RAW,c):this._create_token(s.EOF,"")},r.prototype._is_comment=function(o){return!1},r.prototype._is_opening=function(o){return!1},r.prototype._is_closing=function(o,a){return!1},r.prototype._create_token=function(o,a){var c=new e(o,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},zo.Tokenizer=r,zo.TOKEN=s,zo}var ch={},EO;function hh(){if(EO)return ch;EO=1;function i(e,t){e=typeof e=="string"?e:e.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return i.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},i.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},ch.Directives=i,ch}var uh={},$O;function NO(){if($O)return uh;$O=1;var i=Go().Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function t(n,s){i.call(this,n,s),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var r=new i(n);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}return t.prototype=new i,t.prototype._create=function(){return new t(this._input,this)},t.prototype._update=function(){this.__set_templated_pattern()},t.prototype.disable=function(n){var s=this._create();return s._disabled[n]=!0,s._update(),s},t.prototype.read_options=function(n){var s=this._create();for(var r in e)s._disabled[r]=n.templating.indexOf(r)===-1;return s._update(),s},t.prototype.exclude=function(n){var s=this._create();return s._excluded[n]=!0,s._update(),s},t.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),n+=s,s=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},t.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},t.prototype._read_template=function(){var n="",s=this._input.peek();if(s==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(n=n||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},uh.TemplatablePattern=t,uh}var RO;function Ko(){if(RO)return ss;RO=1;var i=rh().InputScanner,e=Ho().Tokenizer,t=Ho().TOKEN,n=hh().Directives,s=wO(),r=Go().Pattern,o=NO().TemplatablePattern;function a(x,k){return k.indexOf(x)!==-1}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},h=new n(/\/\*/,/\*\//),u=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,f=/[0-9]/,d=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var w=new RegExp(b),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),O=new RegExp("^(?:"+p.join("|")+")$"),C,y=function(x,k){e.call(this,x,k),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new r(this._input),N=new o(this._input).read_options(this._options);this.__patterns={template:N,identifier:N.starting_with(s.identifier).matching(s.identifierMatch),number:P.matching(u),punct:P.matching(w),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(/<!--/),html_comment_end:P.matching(/-->/),include:P.starting_with(/#include/).until_after(s.lineBreak),shebang:P.starting_with(/#!/).until_after(s.lineBreak),xml:P.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:N.until(/['\\\n\r\u2028\u2029]/),double_quote:N.until(/["\\\n\r\u2028\u2029]/),template_text:N.until(/[`\\$]/),template_expression:N.until(/[`}\\]/)}};y.prototype=new e,y.prototype._is_comment=function(x){return x.type===c.COMMENT||x.type===c.BLOCK_COMMENT||x.type===c.UNKNOWN},y.prototype._is_opening=function(x){return x.type===c.START_BLOCK||x.type===c.START_EXPR},y.prototype._is_closing=function(x,k){return(x.type===c.END_BLOCK||x.type===c.END_EXPR)&&k&&(x.text==="]"&&k.text==="["||x.text===")"&&k.text==="("||x.text==="}"&&k.text==="{")},y.prototype._reset=function(){C=!1},y.prototype._get_next_token=function(x,k){var P=null;this._readWhitespace();var N=this._input.peek();return N===null?this._create_token(c.EOF,""):(P=P||this._read_non_javascript(N),P=P||this._read_string(N),P=P||this._read_pair(N,this._input.peek(1)),P=P||this._read_word(x),P=P||this._read_singles(N),P=P||this._read_comment(N),P=P||this._read_regexp(N,x),P=P||this._read_xml(N,x),P=P||this._read_punctuation(),P=P||this._create_token(c.UNKNOWN,this._input.next()),P)},y.prototype._read_word=function(x){var k;if(k=this.__patterns.identifier.read(),k!=="")return k=k.replace(s.allLineBreaks,`
60
- `),!(x.type===c.DOT||x.type===c.RESERVED&&(x.text==="set"||x.text==="get"))&&O.test(k)?(k==="in"||k==="of")&&(x.type===c.WORD||x.type===c.STRING)?this._create_token(c.OPERATOR,k):this._create_token(c.RESERVED,k):this._create_token(c.WORD,k);if(k=this.__patterns.number.read(),k!=="")return this._create_token(c.WORD,k)},y.prototype._read_singles=function(x){var k=null;return x==="("||x==="["?k=this._create_token(c.START_EXPR,x):x===")"||x==="]"?k=this._create_token(c.END_EXPR,x):x==="{"?k=this._create_token(c.START_BLOCK,x):x==="}"?k=this._create_token(c.END_BLOCK,x):x===";"?k=this._create_token(c.SEMICOLON,x):x==="."&&d.test(this._input.peek(1))?k=this._create_token(c.DOT,x):x===","&&(k=this._create_token(c.COMMA,x)),k&&this._input.next(),k},y.prototype._read_pair=function(x,k){var P=null;return x==="#"&&k==="{"&&(P=this._create_token(c.START_BLOCK,x+k)),P&&(this._input.next(),this._input.next()),P},y.prototype._read_punctuation=function(){var x=this.__patterns.punct.read();if(x!=="")return x==="="?this._create_token(c.EQUALS,x):x==="?."?this._create_token(c.DOT,x):this._create_token(c.OPERATOR,x)},y.prototype._read_non_javascript=function(x){var k="";if(x==="#"){if(this._is_first_token()&&(k=this.__patterns.shebang.read(),k))return this._create_token(c.UNKNOWN,k.trim()+`
59
+ You passed in: '`+this.raw_options[n]+"'");return o},i.prototype._is_valid_selection=function(n,s){return n.length&&s.length&&!n.some(function(r){return s.indexOf(r)===-1})};function e(n,s){var r={};n=t(n);var o;for(o in n)o!==s&&(r[o]=n[o]);if(s&&n[s])for(o in n[s])r[o]=n[s][o];return r}function t(n){var s={},r;for(r in n){var o=r.replace(/-/g,"_");s[o]=n[r]}return s}return fr.Options=i,fr.normalizeOpts=t,fr.mergeOpts=e,fr}var BO;function IO(){if(BO)return su;BO=1;var i=ru().Options,e=["before-newline","after-newline","preserve-newline"];function t(n){i.call(this,n,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<r.length;o++)r[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=r[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",e),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return t.prototype=new i,su.Options=t,su}var rs={},ou={},ZO;function lu(){if(ZO)return ou;ZO=1;var i=RegExp.prototype.hasOwnProperty("sticky");function e(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}return e.prototype.restart=function(){this.__position=0},e.prototype.back=function(){this.__position>0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position<this.__input_length},e.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t},e.prototype.peek=function(t){var n=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(n=this.__input.charAt(t)),n},e.prototype.__match=function(t,n){t.lastIndex=n;var s=t.exec(this.__input);return s&&!(i&&t.sticky)&&s.index!==n&&(s=null),s},e.prototype.test=function(t,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(t,n):!1},e.prototype.testChar=function(t,n){var s=this.peek(n);return t.lastIndex=0,s!==null&&t.test(s)},e.prototype.match=function(t){var n=this.__match(t,this.__position);return n?this.__position+=n[0].length:n=null,n},e.prototype.read=function(t,n,s){var r="",o;return t&&(o=this.match(t),o&&(r+=o[0])),n&&(o||!t)&&(r+=this.readUntil(n,s)),r},e.prototype.readUntil=function(t,n){var s="",r=this.__position;t.lastIndex=this.__position;var o=t.exec(this.__input);return o?(r=o.index,n&&(r+=o[0].length)):r=this.__input_length,s=this.__input.substring(this.__position,r),this.__position=r,s},e.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)},e.prototype.get_regexp=function(t,n){var s=null,r="g";return n&&i&&(r="y"),typeof t=="string"&&t!==""?s=new RegExp(t,r):t&&(s=new RegExp(t.source,r)),s},e.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},e.prototype.peekUntilAfter=function(t){var n=this.__position,s=this.readUntilAfter(t);return this.__position=n,s},e.prototype.lookBack=function(t){var n=this.__position-1;return n>=t.length&&this.__input.substring(n-t.length,n).toLowerCase()===t},ou.InputScanner=e,ou}var Go={},au={},FO;function cQ(){if(FO)return au;FO=1;function i(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return this.__tokens_length===0},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},i.prototype.peek=function(e){var t=null;return e=e||0,e+=this.__position,e>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},i.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},au.TokenStream=i,au}var cu={},uu={},UO;function Ko(){if(UO)return uu;UO=1;function i(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return i.prototype.read=function(){var e=this._input.read(this._starting_pattern);return(!this._starting_pattern||e)&&(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},i.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},uu.Pattern=i,uu}var XO;function uQ(){if(XO)return cu;XO=1;var i=Ko().Pattern;function e(t,n){i.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return e.prototype=new i,e.prototype.__set_whitespace_patterns=function(t,n){t+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var n=this.__split(this._newline_regexp,t);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return t},e.prototype.matching=function(t,n){var s=this._create();return s.__set_whitespace_patterns(t,n),s._update(),s},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(t,n){t.lastIndex=0;for(var s=0,r=[],o=t.exec(n);o;)r.push(n.substring(s,o.index)),s=o.index+o[0].length,o=t.exec(n);return s<n.length?r.push(n.substring(s,n.length)):r.push(""),r},cu.WhitespacePattern=e,cu}var WO;function Ho(){if(WO)return Go;WO=1;var i=lu().InputScanner,e=LO().Token,t=cQ().TokenStream,n=uQ().WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(o,a){this._input=new i(o),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};return r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new t,this._reset();for(var o,a=new e(s.START,""),c=null,u=[],h=new t;a.type!==s.EOF;){for(o=this._get_next_token(a,c);this._is_comment(o);)h.add(o),o=this._get_next_token(a,c);h.isEmpty()||(o.comments_before=h,h=new t),o.parent=c,this._is_opening(o)?(u.push(c),c=o):c&&this._is_closing(o,c)&&(o.opened=c,c.closed=o,c=u.pop(),o.parent=c),o.previous=a,a.next=o,this.__tokens.add(o),a=o}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(o,a){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(s.RAW,c):this._create_token(s.EOF,"")},r.prototype._is_comment=function(o){return!1},r.prototype._is_opening=function(o){return!1},r.prototype._is_closing=function(o,a){return!1},r.prototype._create_token=function(o,a){var c=new e(o,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Go.Tokenizer=r,Go.TOKEN=s,Go}var hu={},qO;function fu(){if(qO)return hu;qO=1;function i(e,t){e=typeof e=="string"?e:e.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return i.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},i.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},hu.Directives=i,hu}var du={},jO;function zO(){if(jO)return du;jO=1;var i=Ko().Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function t(n,s){i.call(this,n,s),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var r=new i(n);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}return t.prototype=new i,t.prototype._create=function(){return new t(this._input,this)},t.prototype._update=function(){this.__set_templated_pattern()},t.prototype.disable=function(n){var s=this._create();return s._disabled[n]=!0,s._update(),s},t.prototype.read_options=function(n){var s=this._create();for(var r in e)s._disabled[r]=n.templating.indexOf(r)===-1;return s._update(),s},t.prototype.exclude=function(n){var s=this._create();return s._excluded[n]=!0,s._update(),s},t.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),n+=s,s=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},t.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},t.prototype._read_template=function(){var n="",s=this._input.peek();if(s==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(n=n||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},du.TemplatablePattern=t,du}var YO;function Jo(){if(YO)return rs;YO=1;var i=lu().InputScanner,e=Ho().Tokenizer,t=Ho().TOKEN,n=fu().Directives,s=DO(),r=Ko().Pattern,o=zO().TemplatablePattern;function a(S,k){return k.indexOf(S)!==-1}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},u=new n(/\/\*/,/\*\//),h=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,f=/[0-9]/,d=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var w=new RegExp(b),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),p=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+p.join("|")+")$"),x,O=function(S,k){e.call(this,S,k),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var T=new r(this._input),$=new o(this._input).read_options(this._options);this.__patterns={template:$,identifier:$.starting_with(s.identifier).matching(s.identifierMatch),number:T.matching(h),punct:T.matching(w),comment:T.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:T.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:T.matching(/<!--/),html_comment_end:T.matching(/-->/),include:T.starting_with(/#include/).until_after(s.lineBreak),shebang:T.starting_with(/#!/).until_after(s.lineBreak),xml:T.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:$.until(/['\\\n\r\u2028\u2029]/),double_quote:$.until(/["\\\n\r\u2028\u2029]/),template_text:$.until(/[`\\$]/),template_expression:$.until(/[`}\\]/)}};O.prototype=new e,O.prototype._is_comment=function(S){return S.type===c.COMMENT||S.type===c.BLOCK_COMMENT||S.type===c.UNKNOWN},O.prototype._is_opening=function(S){return S.type===c.START_BLOCK||S.type===c.START_EXPR},O.prototype._is_closing=function(S,k){return(S.type===c.END_BLOCK||S.type===c.END_EXPR)&&k&&(S.text==="]"&&k.text==="["||S.text===")"&&k.text==="("||S.text==="}"&&k.text==="{")},O.prototype._reset=function(){x=!1},O.prototype._get_next_token=function(S,k){var T=null;this._readWhitespace();var $=this._input.peek();return $===null?this._create_token(c.EOF,""):(T=T||this._read_non_javascript($),T=T||this._read_string($),T=T||this._read_pair($,this._input.peek(1)),T=T||this._read_word(S),T=T||this._read_singles($),T=T||this._read_comment($),T=T||this._read_regexp($,S),T=T||this._read_xml($,S),T=T||this._read_punctuation(),T=T||this._create_token(c.UNKNOWN,this._input.next()),T)},O.prototype._read_word=function(S){var k;if(k=this.__patterns.identifier.read(),k!=="")return k=k.replace(s.allLineBreaks,`
60
+ `),!(S.type===c.DOT||S.type===c.RESERVED&&(S.text==="set"||S.text==="get"))&&y.test(k)?(k==="in"||k==="of")&&(S.type===c.WORD||S.type===c.STRING)?this._create_token(c.OPERATOR,k):this._create_token(c.RESERVED,k):this._create_token(c.WORD,k);if(k=this.__patterns.number.read(),k!=="")return this._create_token(c.WORD,k)},O.prototype._read_singles=function(S){var k=null;return S==="("||S==="["?k=this._create_token(c.START_EXPR,S):S===")"||S==="]"?k=this._create_token(c.END_EXPR,S):S==="{"?k=this._create_token(c.START_BLOCK,S):S==="}"?k=this._create_token(c.END_BLOCK,S):S===";"?k=this._create_token(c.SEMICOLON,S):S==="."&&d.test(this._input.peek(1))?k=this._create_token(c.DOT,S):S===","&&(k=this._create_token(c.COMMA,S)),k&&this._input.next(),k},O.prototype._read_pair=function(S,k){var T=null;return S==="#"&&k==="{"&&(T=this._create_token(c.START_BLOCK,S+k)),T&&(this._input.next(),this._input.next()),T},O.prototype._read_punctuation=function(){var S=this.__patterns.punct.read();if(S!=="")return S==="="?this._create_token(c.EQUALS,S):S==="?."?this._create_token(c.DOT,S):this._create_token(c.OPERATOR,S)},O.prototype._read_non_javascript=function(S){var k="";if(S==="#"){if(this._is_first_token()&&(k=this.__patterns.shebang.read(),k))return this._create_token(c.UNKNOWN,k.trim()+`
61
61
  `);if(k=this.__patterns.include.read(),k)return this._create_token(c.UNKNOWN,k.trim()+`
62
- `);x=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(f)){do x=this._input.next(),P+=x;while(this._input.hasNext()&&x!=="#"&&x!=="=");return x==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,P)}this._input.back()}else if(x==="<"&&this._is_first_token()){if(k=this.__patterns.html_comment_start.read(),k){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)k+=this._input.next();return C=!0,this._create_token(c.COMMENT,k)}}else if(C&&x==="-"&&(k=this.__patterns.html_comment_end.read(),k))return C=!1,this._create_token(c.COMMENT,k);return null},y.prototype._read_comment=function(x){var k=null;if(x==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var N=h.get_directives(P);N&&N.ignore==="start"&&(P+=h.readIgnored(this._input)),P=P.replace(s.allLineBreaks,`
63
- `),k=this._create_token(c.BLOCK_COMMENT,P),k.directives=N}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),k=this._create_token(c.COMMENT,P))}return k},y.prototype._read_string=function(x){if(x==="`"||x==="'"||x==='"'){var k=this._input.next();return this.has_char_escapes=!1,x==="`"?k+=this._read_string_recursive("`",!0,"${"):k+=this._read_string_recursive(x),this.has_char_escapes&&this._options.unescape_strings&&(k=E(k)),this._input.peek()===x&&(k+=this._input.next()),k=k.replace(s.allLineBreaks,`
64
- `),this._create_token(c.STRING,k)}return null},y.prototype._allow_regexp_or_xml=function(x){return x.type===c.RESERVED&&a(x.text,["return","case","throw","else","do","typeof","yield"])||x.type===c.END_EXPR&&x.text===")"&&x.opened.previous.type===c.RESERVED&&a(x.opened.previous.text,["if","while","for"])||a(x.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},y.prototype._read_regexp=function(x,k){if(x==="/"&&this._allow_regexp_or_xml(k)){for(var P=this._input.next(),N=!1,_=!1;this._input.hasNext()&&(N||_||this._input.peek()!==x)&&!this._input.testChar(s.newline);)P+=this._input.peek(),N?N=!1:(N=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===x&&(P+=this._input.next(),P+=this._input.read(s.identifier)),this._create_token(c.STRING,P)}return null},y.prototype._read_xml=function(x,k){if(this._options.e4x&&x==="<"&&this._allow_regexp_or_xml(k)){var P="",N=this.__patterns.xml.read_match();if(N){for(var _=N[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),A=_.indexOf("{")===0,S=0;N;){var M=!!N[1],T=N[2],I=!!N[N.length-1]||T.slice(0,8)==="![CDATA[";if(!I&&(T===_||A&&T.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(M?--S:++S),P+=N[0],S<=0)break;N=this.__patterns.xml.read_match()}return N||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(s.allLineBreaks,`
65
- `),this._create_token(c.STRING,P)}}return null};function E(x){for(var k="",P=0,N=new i(x),_=null;N.hasNext();)if(_=N.match(/([\s]|[^\\]|\\\\)+/g),_&&(k+=_[0]),N.peek()==="\\"){if(N.next(),N.peek()==="x")_=N.match(/x([0-9A-Fa-f]{2})/g);else if(N.peek()==="u")_=N.match(/u([0-9A-Fa-f]{4})/g),_||(_=N.match(/u\{([0-9A-Fa-f]+)\}/g));else{k+="\\",N.hasNext()&&(k+=N.next());continue}if(!_||(P=parseInt(_[1],16),P>126&&P<=255&&_[0].indexOf("x")===0))return x;P>=0&&P<32||P>1114111?k+="\\"+_[0]:P===34||P===39||P===92?k+="\\"+String.fromCharCode(P):k+=String.fromCharCode(P)}return k}return y.prototype._read_string_recursive=function(x,k,P){var N,_;x==="'"?_=this.__patterns.single_quote:x==='"'?_=this.__patterns.double_quote:x==="`"?_=this.__patterns.template_text:x==="}"&&(_=this.__patterns.template_expression);for(var A=_.read(),S="";this._input.hasNext();){if(S=this._input.next(),S===x||!k&&s.newline.test(S)){this._input.back();break}else S==="\\"&&this._input.hasNext()?(N=this._input.peek(),N==="x"||N==="u"?this.has_char_escapes=!0:N==="\r"&&this._input.peek(1)===`
66
- `&&this._input.next(),S+=this._input.next()):P&&(P==="${"&&S==="$"&&this._input.peek()==="{"&&(S+=this._input.next()),P===S&&(x==="`"?S+=this._read_string_recursive("}",k,"`"):S+=this._read_string_recursive("`",k,"${"),this._input.hasNext()&&(S+=this._input.next())));S+=_.read(),A+=S}return A},ss.Tokenizer=y,ss.TOKEN=c,ss.positionable_operators=m.slice(),ss.line_starters=g.slice(),ss}var VO;function JP(){if(VO)return Hc;VO=1;var i=Jc().Output,e=bO().Token,t=wO(),n=SO().Options,s=Ko().Tokenizer,r=Ko().line_starters,o=Ko().positionable_operators,a=Ko().TOKEN;function c(_,A){return A.indexOf(_)!==-1}function h(_){return _.replace(/^\s+/g,"")}function u(_){for(var A={},S=0;S<_.length;S++)A[_[S].replace(/-/g,"_")]=_[S];return A}function f(_,A){return _&&_.type===a.RESERVED&&_.text===A}function d(_,A){return _&&_.type===a.RESERVED&&c(_.text,A)}var m=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],w=u(b),g=[w.before_newline,w.preserve_newline],p={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function O(_,A){A.multiline_frame||A.mode===p.ForInitializer||A.mode===p.Conditional||_.remove_indent(A.start_line_index)}function C(_){_=_.replace(t.allLineBreaks,`
67
- `);for(var A=[],S=_.indexOf(`
68
- `);S!==-1;)A.push(_.substring(0,S)),_=_.substring(S+1),S=_.indexOf(`
69
- `);return _.length&&A.push(_),A}function y(_){return _===p.ArrayLiteral}function E(_){return c(_,[p.Expression,p.ForInitializer,p.Conditional])}function x(_,A){for(var S=0;S<_.length;S++){var M=_[S].trim();if(M.charAt(0)!==A)return!1}return!0}function k(_,A){for(var S=0,M=_.length,T;S<M;S++)if(T=_[S],T&&T.indexOf(A)!==0)return!1;return!0}function P(_,A){A=A||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(A)}P.prototype.create_flags=function(_,A){var S=0;_&&(S=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>S&&(S=_.line_indent_level));var M={mode:A,parent:_,last_token:_?_.last_token:new e(a.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:S,alignment:0,line_indent_level:_?_.line_indent_level:S,start_line_index:this._output.get_line_number(),ternary_depth:0};return M},P.prototype._reset=function(_){var A=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,A),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var S=new s(_,this._options);return this._tokens=S.tokenize(),_},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,A=this._reset(this._source_text),S=this._options.eol;this._options.eol==="auto"&&(S=`
70
- `,A&&t.lineBreak.test(A||"")&&(S=A.match(t.lineBreak)[0]));for(var M=this._tokens.next();M;)this.handle_token(M),this._last_last_text=this._flags.last_token.text,this._flags.last_token=M,M=this._tokens.next();return _=this._output.get_code(S),_},P.prototype.handle_token=function(_,A){_.type===a.START_EXPR?this.handle_start_expr(_):_.type===a.END_EXPR?this.handle_end_expr(_):_.type===a.START_BLOCK?this.handle_start_block(_):_.type===a.END_BLOCK?this.handle_end_block(_):_.type===a.WORD?this.handle_word(_):_.type===a.RESERVED?this.handle_word(_):_.type===a.SEMICOLON?this.handle_semicolon(_):_.type===a.STRING?this.handle_string(_):_.type===a.EQUALS?this.handle_equals(_):_.type===a.OPERATOR?this.handle_operator(_):_.type===a.COMMA?this.handle_comma(_):_.type===a.BLOCK_COMMENT?this.handle_block_comment(_,A):_.type===a.COMMENT?this.handle_comment(_,A):_.type===a.DOT?this.handle_dot(_):_.type===a.EOF?this.handle_eof(_):_.type===a.UNKNOWN?this.handle_unknown(_,A):this.handle_unknown(_,A)},P.prototype.handle_whitespace_and_comments=function(_,A){var S=_.newlines,M=this._options.keep_array_indentation&&y(this._flags.mode);if(_.comments_before)for(var T=_.comments_before.next();T;)this.handle_whitespace_and_comments(T,A),this.handle_token(T,A),T=_.comments_before.next();if(M)for(var I=0;I<S;I+=1)this.print_newline(I>0,A);else if(this._options.max_preserve_newlines&&S>this._options.max_preserve_newlines&&(S=this._options.max_preserve_newlines),this._options.preserve_newlines&&S>1){this.print_newline(!1,A);for(var B=1;B<S;B+=1)this.print_newline(!0,A)}};var N=["async","break","continue","return","throw","yield"];return P.prototype.allow_wrap_or_preserved_newline=function(_,A){if(A=A===void 0?!1:A,!this._output.just_added_newline()){var S=this._options.preserve_newlines&&_.newlines||A,M=c(this._flags.last_token.text,o)||c(_.text,o);if(M){var T=c(this._flags.last_token.text,o)&&c(this._options.operator_position,g)||c(_.text,o);S=S&&T}if(S)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,N))return;this._output.set_wrap_point()}}},P.prototype.print_newline=function(_,A){if(!A&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var S=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(S,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},P.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||y(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},P.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var A=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(A),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},P.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&O(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(_){var A=!1;return A=A||d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD,A=A||f(this._flags.last_token,"do"),A=A||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&d(this._flags.last_token,N)&&!_.newlines,A=A||f(this._flags.last_token,"else")&&!(f(_,"if")&&!_.comments_before),A=A||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),A=A||this._flags.last_token.type===a.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==a.WORD&&_.type!==a.RESERVED,A=A||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"])),A?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,d(_,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var A=p.Expression;if(_.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){d(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(A),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}A=p.ArrayLiteral,y(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,A=p.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,A=p.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var S=this._tokens.peek(-3);if(this._options.space_after_named_function&&S){var M=this._tokens.peek(-4);d(S,["async","function"])||S.text==="*"&&d(M,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(S.text==="{"||S.text===","||S.text==="*"&&(M.text==="{"||M.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(A),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&y(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),O(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var A=this._tokens.peek(),S=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):S&&(c(S.text,[":",","])&&c(A.type,[a.STRING,a.WORD,a.RESERVED])||c(A.text,["get","set","..."])&&c(S.type,[a.WORD,a.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(S.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):c(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var M=!A.comments_before&&A.text==="}",T=M&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var I=0,B=null;this._flags.inline_frame=!0;do if(I+=1,B=this._tokens.peek(I-1),B.newlines){this._flags.inline_frame=!1;break}while(B.type!==a.EOF&&!(B.type===a.END_BLOCK&&B.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(T||this._flags.last_token.type===a.EQUALS||d(this._flags.last_token,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(y(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(c(this._flags.last_token.type,[a.START_BLOCK,a.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!M&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===p.Statement;)this.restore_mode();var A=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!A?this._output.space_before_token=!0:this._options.brace_style==="expand"?A||this.print_newline():A||(y(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},P.prototype.handle_word=function(_){if(_.type===a.RESERVED){if(c(_.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)_.type=a.WORD;else if(_.text==="import"&&c(this._tokens.peek().text,["(","."]))_.type=a.WORD;else if(c(_.text,["as","from"])&&!this._flags.import_block)_.type=a.WORD;else if(this._flags.mode===p.ObjectLiteral){var A=this._tokens.peek();A.text===":"&&(_.type=a.WORD)}}if(this.start_of_statement(_)?d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!E(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!d(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(f(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&f(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&!this.start_of_object_property()&&!(c(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===p.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(_),f(_,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,N)?this._output.space_before_token=!0:f(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(E(this._flags.mode)||y(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var S="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?S="SPACE":d(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?S="NEWLINE":(S="SPACE",this._output.space_before_token=!0):S="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===p.BlockStatement?S="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&E(this._flags.mode)?S="SPACE":this._flags.last_token.type===a.STRING?S="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","]))?S="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?S="SPACE":S="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,S="NEWLINE"),d(_,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?S="SPACE":S="NEWLINE"),d(_,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var M=this._output.current_line;M.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else S==="NEWLINE"?d(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&d(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!d(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(_,"if")&&f(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(_,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&y(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():S==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===a.WORD||_.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===a.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&f(_,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var A=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(A,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},P.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},P.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},P.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(E(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},P.prototype.handle_operator=function(_){var A=_.text==="*"&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),S=c(_.text,["-","+"])&&(c(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||c(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var M=!A;this.handle_whitespace_and_comments(_,M)}if(_.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(c(_.text,["-","+"])&&this.start_of_object_property()){this.print_token(_);return}if(this._flags.last_token.type===a.OPERATOR&&c(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var T=!0,I=!0,B=!1;if(_.text===":"?this._flags.ternary_depth===0?T=!1:(this._flags.ternary_depth-=1,B=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!S&&!A&&this._options.preserve_newlines&&c(_.text,o)){var U=_.text===":",Z=U&&B,K=U&&!B;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!K,this.print_token(_),(!U||Z)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!U||Z?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case w.preserve_newline:K||this.allow_wrap_or_preserved_newline(_),T=!(this._output.just_added_newline()||K),this._output.space_before_token=T,this.print_token(_),this._output.space_before_token=!0;return}}if(A){this.allow_wrap_or_preserved_newline(_),T=!1;var X=this._tokens.peek();I=X&&c(X.type,[a.WORD,a.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),T=this._flags.last_token.type===a.START_BLOCK,I=!1;else if(c(_.text,["--","++","!","~"])||S){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),T=!1,I=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var J=d(this._flags.last_token,m)&&_.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&E(this._flags.mode)&&(T=!0),this._flags.last_token.type===a.RESERVED?T=!0:this._flags.last_token.type===a.END_EXPR?T=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===a.OPERATOR&&(T=c(_.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(_.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(I=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||T,this.print_token(_),this._output.space_before_token=I},P.prototype.handle_block_comment=function(_,A){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,A),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!t.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,A)},P.prototype.print_block_commment=function(_,A){var S=C(_.text),M,T=!1,I=!1,B=_.whitespace_before,U=B.length;if(this.print_newline(!1,A),this.print_token_line_indentation(_),this._output.add_token(S[0]),this.print_newline(!1,A),S.length>1){for(S=S.slice(1),T=x(S,"*"),I=k(S,B),T&&(this._flags.alignment=1),M=0;M<S.length;M++)T?(this.print_token_line_indentation(_),this._output.add_token(h(S[M]))):I&&S[M]?(this.print_token_line_indentation(_),this._output.add_token(S[M].substring(U))):(this._output.current_line.set_indent(-1),this._output.add_token(S[M])),this.print_newline(!1,A);this._flags.alignment=0}},P.prototype.handle_comment=function(_,A){_.newlines?this.print_newline(!1,A):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,A)},P.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),d(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},P.prototype.handle_unknown=function(_,A){this.print_token(_),_.text[_.text.length-1]===`
71
- `&&this.print_newline(!1,A)},P.prototype.handle_eof=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},Hc.Beautifier=P,Hc}var LO;function eT(){if(LO)return Yo.exports;LO=1;var i=JP().Beautifier,e=SO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Yo.exports=t,Yo.exports.defaultOptions=function(){return new e},Yo.exports}var Jo={exports:{}},fh={},dh={},MO;function BO(){if(MO)return dh;MO=1;var i=nh().Options;function e(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<s.length;r++)s[r]!=="expand"?this.brace_style="collapse":this.brace_style=s[r]}return e.prototype=new i,dh.Options=e,dh}var DO;function tT(){if(DO)return fh;DO=1;var i=BO().Options,e=Jc().Output,t=rh().InputScanner,n=hh().Directives,s=new n(/\/\*/,/\*\//),r=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,c=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(d,m){this._source_text=d||"",this._options=new i(m),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return f.prototype.eatString=function(d){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(d.indexOf(this._ch)!==-1||this._ch===`
62
+ `);S=this._input.next();var T="#";if(this._input.hasNext()&&this._input.testChar(f)){do S=this._input.next(),T+=S;while(this._input.hasNext()&&S!=="#"&&S!=="=");return S==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(T+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(T+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,T)}this._input.back()}else if(S==="<"&&this._is_first_token()){if(k=this.__patterns.html_comment_start.read(),k){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)k+=this._input.next();return x=!0,this._create_token(c.COMMENT,k)}}else if(x&&S==="-"&&(k=this.__patterns.html_comment_end.read(),k))return x=!1,this._create_token(c.COMMENT,k);return null},O.prototype._read_comment=function(S){var k=null;if(S==="/"){var T="";if(this._input.peek(1)==="*"){T=this.__patterns.block_comment.read();var $=u.get_directives(T);$&&$.ignore==="start"&&(T+=u.readIgnored(this._input)),T=T.replace(s.allLineBreaks,`
63
+ `),k=this._create_token(c.BLOCK_COMMENT,T),k.directives=$}else this._input.peek(1)==="/"&&(T=this.__patterns.comment.read(),k=this._create_token(c.COMMENT,T))}return k},O.prototype._read_string=function(S){if(S==="`"||S==="'"||S==='"'){var k=this._input.next();return this.has_char_escapes=!1,S==="`"?k+=this._read_string_recursive("`",!0,"${"):k+=this._read_string_recursive(S),this.has_char_escapes&&this._options.unescape_strings&&(k=Q(k)),this._input.peek()===S&&(k+=this._input.next()),k=k.replace(s.allLineBreaks,`
64
+ `),this._create_token(c.STRING,k)}return null},O.prototype._allow_regexp_or_xml=function(S){return S.type===c.RESERVED&&a(S.text,["return","case","throw","else","do","typeof","yield"])||S.type===c.END_EXPR&&S.text===")"&&S.opened.previous.type===c.RESERVED&&a(S.opened.previous.text,["if","while","for"])||a(S.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},O.prototype._read_regexp=function(S,k){if(S==="/"&&this._allow_regexp_or_xml(k)){for(var T=this._input.next(),$=!1,_=!1;this._input.hasNext()&&($||_||this._input.peek()!==S)&&!this._input.testChar(s.newline);)T+=this._input.peek(),$?$=!1:($=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===S&&(T+=this._input.next(),T+=this._input.read(s.identifier)),this._create_token(c.STRING,T)}return null},O.prototype._read_xml=function(S,k){if(this._options.e4x&&S==="<"&&this._allow_regexp_or_xml(k)){var T="",$=this.__patterns.xml.read_match();if($){for(var _=$[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),A=_.indexOf("{")===0,C=0;$;){var D=!!$[1],P=$[2],F=!!$[$.length-1]||P.slice(0,8)==="![CDATA[";if(!F&&(P===_||A&&P.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(D?--C:++C),T+=$[0],C<=0)break;$=this.__patterns.xml.read_match()}return $||(T+=this._input.match(/[\s\S]*/g)[0]),T=T.replace(s.allLineBreaks,`
65
+ `),this._create_token(c.STRING,T)}}return null};function Q(S){for(var k="",T=0,$=new i(S),_=null;$.hasNext();)if(_=$.match(/([\s]|[^\\]|\\\\)+/g),_&&(k+=_[0]),$.peek()==="\\"){if($.next(),$.peek()==="x")_=$.match(/x([0-9A-Fa-f]{2})/g);else if($.peek()==="u")_=$.match(/u([0-9A-Fa-f]{4})/g),_||(_=$.match(/u\{([0-9A-Fa-f]+)\}/g));else{k+="\\",$.hasNext()&&(k+=$.next());continue}if(!_||(T=parseInt(_[1],16),T>126&&T<=255&&_[0].indexOf("x")===0))return S;T>=0&&T<32||T>1114111?k+="\\"+_[0]:T===34||T===39||T===92?k+="\\"+String.fromCharCode(T):k+=String.fromCharCode(T)}return k}return O.prototype._read_string_recursive=function(S,k,T){var $,_;S==="'"?_=this.__patterns.single_quote:S==='"'?_=this.__patterns.double_quote:S==="`"?_=this.__patterns.template_text:S==="}"&&(_=this.__patterns.template_expression);for(var A=_.read(),C="";this._input.hasNext();){if(C=this._input.next(),C===S||!k&&s.newline.test(C)){this._input.back();break}else C==="\\"&&this._input.hasNext()?($=this._input.peek(),$==="x"||$==="u"?this.has_char_escapes=!0:$==="\r"&&this._input.peek(1)===`
66
+ `&&this._input.next(),C+=this._input.next()):T&&(T==="${"&&C==="$"&&this._input.peek()==="{"&&(C+=this._input.next()),T===C&&(S==="`"?C+=this._read_string_recursive("}",k,"`"):C+=this._read_string_recursive("`",k,"${"),this._input.hasNext()&&(C+=this._input.next())));C+=_.read(),A+=C}return A},rs.Tokenizer=O,rs.TOKEN=c,rs.positionable_operators=m.slice(),rs.line_starters=g.slice(),rs}var GO;function hQ(){if(GO)return Jc;GO=1;var i=tu().Output,e=LO().Token,t=DO(),n=IO().Options,s=Jo().Tokenizer,r=Jo().line_starters,o=Jo().positionable_operators,a=Jo().TOKEN;function c(_,A){return A.indexOf(_)!==-1}function u(_){return _.replace(/^\s+/g,"")}function h(_){for(var A={},C=0;C<_.length;C++)A[_[C].replace(/-/g,"_")]=_[C];return A}function f(_,A){return _&&_.type===a.RESERVED&&_.text===A}function d(_,A){return _&&_.type===a.RESERVED&&c(_.text,A)}var m=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],w=h(b),g=[w.before_newline,w.preserve_newline],p={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function y(_,A){A.multiline_frame||A.mode===p.ForInitializer||A.mode===p.Conditional||_.remove_indent(A.start_line_index)}function x(_){_=_.replace(t.allLineBreaks,`
67
+ `);for(var A=[],C=_.indexOf(`
68
+ `);C!==-1;)A.push(_.substring(0,C)),_=_.substring(C+1),C=_.indexOf(`
69
+ `);return _.length&&A.push(_),A}function O(_){return _===p.ArrayLiteral}function Q(_){return c(_,[p.Expression,p.ForInitializer,p.Conditional])}function S(_,A){for(var C=0;C<_.length;C++){var D=_[C].trim();if(D.charAt(0)!==A)return!1}return!0}function k(_,A){for(var C=0,D=_.length,P;C<D;C++)if(P=_[C],P&&P.indexOf(A)!==0)return!1;return!0}function T(_,A){A=A||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(A)}T.prototype.create_flags=function(_,A){var C=0;_&&(C=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>C&&(C=_.line_indent_level));var D={mode:A,parent:_,last_token:_?_.last_token:new e(a.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:C,alignment:0,line_indent_level:_?_.line_indent_level:C,start_line_index:this._output.get_line_number(),ternary_depth:0};return D},T.prototype._reset=function(_){var A=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,A),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(p.BlockStatement);var C=new s(_,this._options);return this._tokens=C.tokenize(),_},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,A=this._reset(this._source_text),C=this._options.eol;this._options.eol==="auto"&&(C=`
70
+ `,A&&t.lineBreak.test(A||"")&&(C=A.match(t.lineBreak)[0]));for(var D=this._tokens.next();D;)this.handle_token(D),this._last_last_text=this._flags.last_token.text,this._flags.last_token=D,D=this._tokens.next();return _=this._output.get_code(C),_},T.prototype.handle_token=function(_,A){_.type===a.START_EXPR?this.handle_start_expr(_):_.type===a.END_EXPR?this.handle_end_expr(_):_.type===a.START_BLOCK?this.handle_start_block(_):_.type===a.END_BLOCK?this.handle_end_block(_):_.type===a.WORD?this.handle_word(_):_.type===a.RESERVED?this.handle_word(_):_.type===a.SEMICOLON?this.handle_semicolon(_):_.type===a.STRING?this.handle_string(_):_.type===a.EQUALS?this.handle_equals(_):_.type===a.OPERATOR?this.handle_operator(_):_.type===a.COMMA?this.handle_comma(_):_.type===a.BLOCK_COMMENT?this.handle_block_comment(_,A):_.type===a.COMMENT?this.handle_comment(_,A):_.type===a.DOT?this.handle_dot(_):_.type===a.EOF?this.handle_eof(_):_.type===a.UNKNOWN?this.handle_unknown(_,A):this.handle_unknown(_,A)},T.prototype.handle_whitespace_and_comments=function(_,A){var C=_.newlines,D=this._options.keep_array_indentation&&O(this._flags.mode);if(_.comments_before)for(var P=_.comments_before.next();P;)this.handle_whitespace_and_comments(P,A),this.handle_token(P,A),P=_.comments_before.next();if(D)for(var F=0;F<C;F+=1)this.print_newline(F>0,A);else if(this._options.max_preserve_newlines&&C>this._options.max_preserve_newlines&&(C=this._options.max_preserve_newlines),this._options.preserve_newlines&&C>1){this.print_newline(!1,A);for(var B=1;B<C;B+=1)this.print_newline(!0,A)}};var $=["async","break","continue","return","throw","yield"];return T.prototype.allow_wrap_or_preserved_newline=function(_,A){if(A=A===void 0?!1:A,!this._output.just_added_newline()){var C=this._options.preserve_newlines&&_.newlines||A,D=c(this._flags.last_token.text,o)||c(_.text,o);if(D){var P=c(this._flags.last_token.text,o)&&c(this._options.operator_position,g)||c(_.text,o);C=C&&P}if(C)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,$))return;this._output.set_wrap_point()}}},T.prototype.print_newline=function(_,A){if(!A&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var C=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(C,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},T.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||O(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},T.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var A=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(A),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},T.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===p.Statement&&y(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.start_of_object_property=function(){return this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"]))},T.prototype.start_of_statement=function(_){var A=!1;return A=A||d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD,A=A||f(this._flags.last_token,"do"),A=A||!(this._flags.parent.mode===p.ObjectLiteral&&this._flags.mode===p.Statement)&&d(this._flags.last_token,$)&&!_.newlines,A=A||f(this._flags.last_token,"else")&&!(f(_,"if")&&!_.comments_before),A=A||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===p.ForInitializer||this._previous_flags.mode===p.Conditional),A=A||this._flags.last_token.type===a.WORD&&this._flags.mode===p.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==a.WORD&&_.type!==a.RESERVED,A=A||this._flags.mode===p.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||d(this._flags.last_token,["get","set"])),A?(this.set_mode(p.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,d(_,["do","for","if","while"])),!0):!1},T.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var A=p.Expression;if(_.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){d(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(A),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}A=p.ArrayLiteral,O(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,A=p.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,A=p.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var C=this._tokens.peek(-3);if(this._options.space_after_named_function&&C){var D=this._tokens.peek(-4);d(C,["async","function"])||C.text==="*"&&d(D,["async","function"])?this._output.space_before_token=!0:this._flags.mode===p.ObjectLiteral?(C.text==="{"||C.text===","||C.text==="*"&&(D.text==="{"||D.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(A),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},T.prototype.handle_end_expr=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&O(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===p.Conditional&&(this._previous_flags.mode=p.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},T.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var A=this._tokens.peek(),C=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(p.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(p.BlockStatement):C&&(c(C.text,[":",","])&&c(A.type,[a.STRING,a.WORD,a.RESERVED])||c(A.text,["get","set","..."])&&c(C.type,[a.WORD,a.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(C.text,[":",","])?this.set_mode(p.BlockStatement):this.set_mode(p.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(p.BlockStatement):c(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(p.ObjectLiteral):this.set_mode(p.BlockStatement),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var D=!A.comments_before&&A.text==="}",P=D&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var F=0,B=null;this._flags.inline_frame=!0;do if(F+=1,B=this._tokens.peek(F-1),B.newlines){this._flags.inline_frame=!1;break}while(B.type!==a.EOF&&!(B.type===a.END_BLOCK&&B.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(P||this._flags.last_token.type===a.EQUALS||d(this._flags.last_token,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(O(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(c(this._flags.last_token.type,[a.START_BLOCK,a.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!D&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},T.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===p.Statement;)this.restore_mode();var A=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!A?this._output.space_before_token=!0:this._options.brace_style==="expand"?A||this.print_newline():A||(O(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},T.prototype.handle_word=function(_){if(_.type===a.RESERVED){if(c(_.text,["set","get"])&&this._flags.mode!==p.ObjectLiteral)_.type=a.WORD;else if(_.text==="import"&&c(this._tokens.peek().text,["(","."]))_.type=a.WORD;else if(c(_.text,["as","from"])&&!this._flags.import_block)_.type=a.WORD;else if(this._flags.mode===p.ObjectLiteral){var A=this._tokens.peek();A.text===":"&&(_.type=a.WORD)}}if(this.start_of_statement(_)?d(this._flags.last_token,["var","let","const"])&&_.type===a.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!Q(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!d(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(f(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&f(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===p.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&!this.start_of_object_property()&&!(c(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===p.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(_),f(_,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,$)?this._output.space_before_token=!0:f(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Q(this._flags.mode)||O(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var C="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?C="SPACE":d(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?C="NEWLINE":(C="SPACE",this._output.space_before_token=!0):C="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===p.BlockStatement?C="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&Q(this._flags.mode)?C="SPACE":this._flags.last_token.type===a.STRING?C="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===p.ObjectLiteral&&c(this._last_last_text,["{",","]))?C="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?C="SPACE":C="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,C="NEWLINE"),d(_,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?C="SPACE":C="NEWLINE"),d(_,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===p.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var D=this._output.current_line;D.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else C==="NEWLINE"?d(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&d(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!d(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(f(_,"if")&&f(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(_,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&O(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():C==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===a.WORD||_.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===a.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&f(_,"from")&&(this._flags.import_block=!1))},T.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var A=this._tokens.peek();this._flags.mode===p.Statement&&!(this._flags.if_block&&f(A,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},T.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},T.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},T.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(Q(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===p.ObjectLiteral||this._flags.mode===p.Statement&&this._flags.parent.mode===p.ObjectLiteral?(this._flags.mode===p.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},T.prototype.handle_operator=function(_){var A=_.text==="*"&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),C=c(_.text,["-","+"])&&(c(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||c(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var D=!A;this.handle_whitespace_and_comments(_,D)}if(_.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(c(_.text,["-","+"])&&this.start_of_object_property()){this.print_token(_);return}if(this._flags.last_token.type===a.OPERATOR&&c(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var P=!0,F=!0,B=!1;if(_.text===":"?this._flags.ternary_depth===0?P=!1:(this._flags.ternary_depth-=1,B=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!C&&!A&&this._options.preserve_newlines&&c(_.text,o)){var U=_.text===":",oe=U&&B,Z=U&&!B;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!Z,this.print_token(_),(!U||oe)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!U||oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case w.preserve_newline:Z||this.allow_wrap_or_preserved_newline(_),P=!(this._output.just_added_newline()||Z),this._output.space_before_token=P,this.print_token(_),this._output.space_before_token=!0;return}}if(A){this.allow_wrap_or_preserved_newline(_),P=!1;var G=this._tokens.peek();F=G&&c(G.type,[a.WORD,a.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),P=this._flags.last_token.type===a.START_BLOCK,F=!1;else if(c(_.text,["--","++","!","~"])||C){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),P=!1,F=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var j=d(this._flags.last_token,m)&&_.newlines;j&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(j,!0)}this._flags.last_token.text===";"&&Q(this._flags.mode)&&(P=!0),this._flags.last_token.type===a.RESERVED?P=!0:this._flags.last_token.type===a.END_EXPR?P=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===a.OPERATOR&&(P=c(_.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(_.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(F=!0)),(this._flags.mode===p.BlockStatement&&!this._flags.inline_frame||this._flags.mode===p.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||P,this.print_token(_),this._output.space_before_token=F},T.prototype.handle_block_comment=function(_,A){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,A),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!t.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,A)},T.prototype.print_block_commment=function(_,A){var C=x(_.text),D,P=!1,F=!1,B=_.whitespace_before,U=B.length;if(this.print_newline(!1,A),this.print_token_line_indentation(_),this._output.add_token(C[0]),this.print_newline(!1,A),C.length>1){for(C=C.slice(1),P=S(C,"*"),F=k(C,B),P&&(this._flags.alignment=1),D=0;D<C.length;D++)P?(this.print_token_line_indentation(_),this._output.add_token(u(C[D]))):F&&C[D]?(this.print_token_line_indentation(_),this._output.add_token(C[D].substring(U))):(this._output.current_line.set_indent(-1),this._output.add_token(C[D])),this.print_newline(!1,A);this._flags.alignment=0}},T.prototype.handle_comment=function(_,A){_.newlines?this.print_newline(!1,A):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,A)},T.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),d(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},T.prototype.handle_unknown=function(_,A){this.print_token(_),_.text[_.text.length-1]===`
71
+ `&&this.print_newline(!1,A)},T.prototype.handle_eof=function(_){for(;this._flags.mode===p.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},Jc.Beautifier=T,Jc}var KO;function fQ(){if(KO)return Yo.exports;KO=1;var i=hQ().Beautifier,e=IO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Yo.exports=t,Yo.exports.defaultOptions=function(){return new e},Yo.exports}var el={exports:{}},pu={},mu={},HO;function JO(){if(HO)return mu;HO=1;var i=ru().Options;function e(t){i.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<s.length;r++)s[r]!=="expand"?this.brace_style="collapse":this.brace_style=s[r]}return e.prototype=new i,mu.Options=e,mu}var e_;function dQ(){if(e_)return pu;e_=1;var i=JO().Options,e=tu().Output,t=lu().InputScanner,n=fu().Directives,s=new n(/\/\*/,/\*\//),r=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,c=/(?:\s|\n)+/g,u=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,h=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(d,m){this._source_text=d||"",this._options=new i(m),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return f.prototype.eatString=function(d){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(d.indexOf(this._ch)!==-1||this._ch===`
72
72
  `)break;this._ch=this._input.next()}return m},f.prototype.eatWhitespace=function(d){for(var m=a.test(this._input.peek()),b=0;a.test(this._input.peek());)this._ch=this._input.next(),d&&this._ch===`
73
73
  `&&(b===0||b<this._options.max_preserve_newlines)&&(b++,this._output.add_new_line(!0));return m},f.prototype.foundNestedPseudoClass=function(){for(var d=0,m=1,b=this._input.peek(m);b;){if(b==="{")return!0;if(b==="(")d+=1;else if(b===")"){if(d===0)return!1;d-=1}else if(b===";"||b==="}")return!1;m++,b=this._input.peek(m)}return!1},f.prototype.print_string=function(d){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(d)},f.prototype.preserveSingleSpace=function(d){d&&(this._output.space_before_token=!0)},f.prototype.indent=function(){this._indentLevel++},f.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var d=this._source_text,m=this._options.eol;m==="auto"&&(m=`
74
74
  `,d&&r.test(d||"")&&(m=d.match(r)[0])),d=d.replace(o,`
75
- `);var b=d.match(/^[\t ]*/)[0];this._output=new e(this._options,b),this._input=new t(d),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,g=!1,p=!1,O=!1,C=!1,y=!1,E=this._ch,x=!1,k,P,N;k=this._input.read(c),P=k!=="",N=E,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),E=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var _=this._input.read(h),A=s.get_directives(_);A&&A.ignore==="start"&&(_+=s.readIgnored(this._input)),this.print_string(_),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(u)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(P),this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,""),this.print_string(S),this._output.space_before_token=!0),w===0&&S.indexOf(":")!==-1&&(p=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var M=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);M.match(/[ :]$/)&&(M=this.eatString(": ").replace(/\s+$/,""),this.print_string(M),this._output.space_before_token=!0),w===0&&M.indexOf(":")!==-1?(p=!0,this.indent()):M in this.NESTED_AT_RULE?(this._nestedLevel+=1,M in this.CONDITIONAL_GROUP_RULE&&(O=!0)):w===0&&!p&&(C=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")p&&(p=!1,this.outdent()),C=!1,O?(O=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(N==="("?this._output.space_before_token=!1:N!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),N==="{"&&this._output.trim(!0),p&&(this.outdent(),p=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var T=0;T<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;T++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[T])){x=!0;break}(g||O)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!C&&w===0?(this.print_string(":"),p||(p=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var I=N==='"'||N==="'";this.preserveSingleSpace(I||P),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")x=!1,w===0?(p&&(this.outdent(),p=!1),C=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),w++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),w&&(w--,this.outdent()));else{var B=!1;this._input.lookBack("with")&&(B=!0),this.preserveSingleSpace(P||B),this.print_string(this._ch),p&&N==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!p||y)&&w===0&&!C?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!p&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(P),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var U=N==='"'||N==="'";this.preserveSingleSpace(U||P),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
76
- `&&x&&this._output.add_new_line()}var Z=this._output.get_code(m);return Z},fh.Beautifier=f,fh}var vO;function iT(){if(vO)return Jo.exports;vO=1;var i=tT().Beautifier,e=BO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return Jo.exports=t,Jo.exports.defaultOptions=function(){return new e},Jo.exports}var el={exports:{}},ph={},mh={},ZO;function IO(){if(ZO)return mh;ZO=1;var i=nh().Options;function e(t){i.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new i,mh.Options=e,mh}var tl={},UO;function FO(){if(UO)return tl;UO=1;var i=Ho().Tokenizer,e=Ho().TOKEN,t=hh().Directives,n=NO().TemplatablePattern,s=Go().Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},o=new t(/<\!--/,/-->/),a=function(c,h){i.call(this,c,h),this._current_tag_name="";var u=new n(this._input).read_options(this._options),f=new s(this._input);if(this.__patterns={word:u.until(/[\n\r\t <]/),word_control_flow_close_excluded:u.until(/[\n\r\t <}]/),single_quote:u.until_after(/'/),double_quote:u.until_after(/"/),attribute:u.until(/[\n\r\t =>]|\/>/),element_name:u.until(/[\n\r\t >\/]/),angular_control_flow_start:f.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(/<!--/).until_after(/-->/),cdata:f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:f.starting_with(/<!\[/).until_after(/]>/),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(d).until_after(d)}};return a.prototype=new i,a.prototype._is_comment=function(c){return!1},a.prototype._is_opening=function(c){return c.type===r.TAG_OPEN||c.type===r.CONTROL_FLOW_OPEN},a.prototype._is_closing=function(c,h){return c.type===r.TAG_CLOSE&&h&&((c.text===">"||c.text==="/>")&&h.text[0]==="<"||c.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")||c.type===r.CONTROL_FLOW_CLOSE&&c.text==="}"&&h.text.endsWith("{")},a.prototype._reset=function(){this._current_tag_name=""},a.prototype._get_next_token=function(c,h){var u=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(r.EOF,""):(u=u||this._read_open_handlebars(f,h),u=u||this._read_attribute(f,c,h),u=u||this._read_close(f,h),u=u||this._read_script_and_style(f,c),u=u||this._read_control_flows(f,h),u=u||this._read_raw_content(f,c,h),u=u||this._read_content_word(f,h),u=u||this._read_comment_or_cdata(f),u=u||this._read_processing(f),u=u||this._read_open(f,h),u=u||this._create_token(r.UNKNOWN,this._input.next()),u)},a.prototype._read_comment_or_cdata=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);d==="!"&&(u=this.__patterns.comment.read(),u?(f=o.get_directives(u),f&&f.ignore==="start"&&(u+=o.readIgnored(this._input))):u=this.__patterns.cdata.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_processing=function(c){var h=null,u=null,f=null;if(c==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(u=this.__patterns.conditional_comment.read(),u=u||this.__patterns.processing.read()),u&&(h=this._create_token(r.COMMENT,u),h.directives=f)}return h},a.prototype._read_open=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&c==="<"&&(u=this._input.next(),this._input.peek()==="/"&&(u+=this._input.next()),u+=this.__patterns.element_name.read(),f=this._create_token(r.TAG_OPEN,u)),f},a.prototype._read_open_handlebars=function(c,h){var u=null,f=null;return(!h||h.type===r.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&c==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(u=this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars.read(),f=this._create_token(r.COMMENT,u)):(u=this.__patterns.handlebars_open.read(),f=this._create_token(r.TAG_OPEN,u))),f},a.prototype._read_control_flows=function(c,h){var u="",f=null;if(!this._options.templating.includes("angular"))return f;if(c==="@"){if(u=this.__patterns.angular_control_flow_start.read(),u==="")return f;for(var d=u.endsWith("(")?1:0,m=0;!(u.endsWith("{")&&d===m);){var b=this._input.next();if(b===null)break;b==="("?d++:b===")"&&m++,u+=b}f=this._create_token(r.CONTROL_FLOW_OPEN,u)}else c==="}"&&h&&h.type===r.CONTROL_FLOW_OPEN&&(u=this._input.next(),f=this._create_token(r.CONTROL_FLOW_CLOSE,u));return f},a.prototype._read_close=function(c,h){var u=null,f=null;return h&&h.type===r.TAG_OPEN&&(h.text[0]==="<"&&(c===">"||c==="/"&&this._input.peek(1)===">")?(u=this._input.next(),c==="/"&&(u+=this._input.next()),f=this._create_token(r.TAG_CLOSE,u)):h.text[0]==="{"&&c==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(r.TAG_CLOSE,"}}"))),f},a.prototype._read_attribute=function(c,h,u){var f=null,d="";if(u&&u.text[0]==="<")if(c==="=")f=this._create_token(r.EQUALS,this._input.next());else if(c==='"'||c==="'"){var m=this._input.next();c==='"'?m+=this.__patterns.double_quote.read():m+=this.__patterns.single_quote.read(),f=this._create_token(r.VALUE,m)}else d=this.__patterns.attribute.read(),d&&(h.type===r.EQUALS?f=this._create_token(r.VALUE,d):f=this._create_token(r.ATTRIBUTE,d));return f},a.prototype._is_content_unformatted=function(c){return this._options.void_elements.indexOf(c)===-1&&(this._options.content_unformatted.indexOf(c)!==-1||this._options.unformatted.indexOf(c)!==-1)},a.prototype._read_raw_content=function(c,h,u){var f="";if(u&&u.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var d=h.opened.text.substr(1).toLowerCase();this._is_content_unformatted(d)&&(f=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return f?this._create_token(r.TEXT,f):null},a.prototype._read_script_and_style=function(c,h){if(h.type===r.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var u=h.opened.text.substr(1).toLowerCase();if(u==="script"||u==="style"){var f=this._read_comment_or_cdata(c);if(f)return f.type=r.TEXT,f;var d=this._input.readUntil(new RegExp("</"+u+"[\\n\\r\\t ]*?>","ig"));if(d)return this._create_token(r.TEXT,d)}}return null},a.prototype._read_content_word=function(c,h){var u="";return this._options.unformatted_content_delimiter&&c===this._options.unformatted_content_delimiter[0]&&(u=this.__patterns.unformatted_content_delimiter.read()),u||(u=h&&h.type===r.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),u?this._create_token(r.TEXT,u):null},tl.Tokenizer=a,tl.TOKEN=r,tl}var jO;function nT(){if(jO)return ph;jO=1;var i=IO().Options,e=Jc().Output,t=FO().Tokenizer,n=FO().TOKEN,s=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,o=function(g,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new e(g,p)};o.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},o.prototype.set_space_before_token=function(g,p){this._output.space_before_token=g,this._output.non_breaking_space=p},o.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},o.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},o.prototype.print_preserved_newlines=function(g){var p=0;g.type!==n.TEXT&&g.previous.type!==n.TEXT&&(p=g.newlines?1:0),this.preserve_newlines&&(p=g.newlines<this.max_preserve_newlines+1?g.newlines:this.max_preserve_newlines+1);for(var O=0;O<p;O++)this.print_newline(O>0);return p!==0},o.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},o.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},o.prototype.print_newline=function(g){this._output.add_new_line(g)},o.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},o.prototype.indent=function(){this.indent_level++},o.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},o.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var a=function(g){for(var p=null,O=g.next;O.type!==n.EOF&&g.closed!==O;){if(O.type===n.ATTRIBUTE&&O.text==="type"){O.next&&O.next.type===n.EQUALS&&O.next.next&&O.next.next.type===n.VALUE&&(p=O.next.next.text);break}O=O.next}return p},c=function(g,p){var O=null,C=null;return p.closed?(g==="script"?O="text/javascript":g==="style"&&(O="text/css"),O=a(p)||O,O.search("text/css")>-1?C="css":O.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?C="javascript":O.search(/(text|application|dojo)\/(x-)?(html)/)>-1?C="html":O.search(/test\/null/)>-1&&(C="null"),C):null};function h(g,p){return p.indexOf(g)!==-1}function u(g,p,O){this.parent=g||null,this.tag=p?p.tag_name:"",this.indent_level=O||0,this.parser_token=p||null}function f(g){this._printer=g,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(g){var p=new u(this._current_frame,g,this._printer.indent_level);this._current_frame=p},f.prototype._try_pop_frame=function(g){var p=null;return g&&(p=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),p},f.prototype._get_frame=function(g,p){for(var O=this._current_frame;O&&g.indexOf(O.tag)===-1;){if(p&&p.indexOf(O.tag)!==-1){O=null;break}O=O.parent}return O},f.prototype.try_pop=function(g,p){var O=this._get_frame([g],p);return this._try_pop_frame(O)},f.prototype.indent_to_tag=function(g){var p=this._get_frame(g);p&&(this._printer.indent_level=p.indent_level)};function d(g,p,O,C){this._source_text=g||"",p=p||{},this._js_beautify=O,this._css_beautify=C,this._tag_stack=null;var y=new i(p,"html");this._options=y,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
75
+ `);var b=d.match(/^[\t ]*/)[0];this._output=new e(this._options,b),this._input=new t(d),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,g=!1,p=!1,y=!1,x=!1,O=!1,Q=this._ch,S=!1,k,T,$;k=this._input.read(c),T=k!=="",$=Q,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Q=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var _=this._input.read(u),A=s.get_directives(_);A&&A.ignore==="start"&&(_+=s.readIgnored(this._input)),this.print_string(_),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(h)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(T),this.print_string(this._ch);var C=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);C.match(/[ :]$/)&&(C=this.eatString(": ").replace(/\s+$/,""),this.print_string(C),this._output.space_before_token=!0),w===0&&C.indexOf(":")!==-1&&(p=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(T),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var D=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);D.match(/[ :]$/)&&(D=this.eatString(": ").replace(/\s+$/,""),this.print_string(D),this._output.space_before_token=!0),w===0&&D.indexOf(":")!==-1?(p=!0,this.indent()):D in this.NESTED_AT_RULE?(this._nestedLevel+=1,D in this.CONDITIONAL_GROUP_RULE&&(y=!0)):w===0&&!p&&(x=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(T),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")p&&(p=!1,this.outdent()),x=!1,y?(y=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):($==="("?this._output.space_before_token=!1:$!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),$==="{"&&this._output.trim(!0),p&&(this.outdent(),p=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var P=0;P<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;P++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[P])){S=!0;break}(g||y)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!x&&w===0?(this.print_string(":"),p||(p=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var F=$==='"'||$==="'";this.preserveSingleSpace(F||T),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")S=!1,w===0?(p&&(this.outdent(),p=!1),x=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),w++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),w&&(w--,this.outdent()));else{var B=!1;this._input.lookBack("with")&&(B=!0),this.preserveSingleSpace(T||B),this.print_string(this._ch),p&&$==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),O=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),O&&this._input.peek()===";"&&this._options.selector_separator_newline&&(O=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!p||O)&&w===0&&!x?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!p&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(T),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var U=$==='"'||$==="'";this.preserveSingleSpace(U||T),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
76
+ `&&S&&this._output.add_new_line()}var oe=this._output.get_code(m);return oe},pu.Beautifier=f,pu}var t_;function pQ(){if(t_)return el.exports;t_=1;var i=dQ().Beautifier,e=JO().Options;function t(n,s){var r=new i(n,s);return r.beautify()}return el.exports=t,el.exports.defaultOptions=function(){return new e},el.exports}var tl={exports:{}},gu={},Ou={},i_;function n_(){if(i_)return Ou;i_=1;var i=ru().Options;function e(t){i.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new i,Ou.Options=e,Ou}var il={},s_;function r_(){if(s_)return il;s_=1;var i=Ho().Tokenizer,e=Ho().TOKEN,t=fu().Directives,n=zO().TemplatablePattern,s=Ko().Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},o=new t(/<\!--/,/-->/),a=function(c,u){i.call(this,c,u),this._current_tag_name="";var h=new n(this._input).read_options(this._options),f=new s(this._input);if(this.__patterns={word:h.until(/[\n\r\t <]/),word_control_flow_close_excluded:h.until(/[\n\r\t <}]/),single_quote:h.until_after(/'/),double_quote:h.until_after(/"/),attribute:h.until(/[\n\r\t =>]|\/>/),element_name:h.until(/[\n\r\t >\/]/),angular_control_flow_start:f.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(/<!--/).until_after(/-->/),cdata:f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:f.starting_with(/<!\[/).until_after(/]>/),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(d).until_after(d)}};return a.prototype=new i,a.prototype._is_comment=function(c){return!1},a.prototype._is_opening=function(c){return c.type===r.TAG_OPEN||c.type===r.CONTROL_FLOW_OPEN},a.prototype._is_closing=function(c,u){return c.type===r.TAG_CLOSE&&u&&((c.text===">"||c.text==="/>")&&u.text[0]==="<"||c.text==="}}"&&u.text[0]==="{"&&u.text[1]==="{")||c.type===r.CONTROL_FLOW_CLOSE&&c.text==="}"&&u.text.endsWith("{")},a.prototype._reset=function(){this._current_tag_name=""},a.prototype._get_next_token=function(c,u){var h=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(r.EOF,""):(h=h||this._read_open_handlebars(f,u),h=h||this._read_attribute(f,c,u),h=h||this._read_close(f,u),h=h||this._read_script_and_style(f,c),h=h||this._read_control_flows(f,u),h=h||this._read_raw_content(f,c,u),h=h||this._read_content_word(f,u),h=h||this._read_comment_or_cdata(f),h=h||this._read_processing(f),h=h||this._read_open(f,u),h=h||this._create_token(r.UNKNOWN,this._input.next()),h)},a.prototype._read_comment_or_cdata=function(c){var u=null,h=null,f=null;if(c==="<"){var d=this._input.peek(1);d==="!"&&(h=this.__patterns.comment.read(),h?(f=o.get_directives(h),f&&f.ignore==="start"&&(h+=o.readIgnored(this._input))):h=this.__patterns.cdata.read()),h&&(u=this._create_token(r.COMMENT,h),u.directives=f)}return u},a.prototype._read_processing=function(c){var u=null,h=null,f=null;if(c==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(h=this.__patterns.conditional_comment.read(),h=h||this.__patterns.processing.read()),h&&(u=this._create_token(r.COMMENT,h),u.directives=f)}return u},a.prototype._read_open=function(c,u){var h=null,f=null;return(!u||u.type===r.CONTROL_FLOW_OPEN)&&c==="<"&&(h=this._input.next(),this._input.peek()==="/"&&(h+=this._input.next()),h+=this.__patterns.element_name.read(),f=this._create_token(r.TAG_OPEN,h)),f},a.prototype._read_open_handlebars=function(c,u){var h=null,f=null;return(!u||u.type===r.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&c==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(h=this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars.read(),f=this._create_token(r.COMMENT,h)):(h=this.__patterns.handlebars_open.read(),f=this._create_token(r.TAG_OPEN,h))),f},a.prototype._read_control_flows=function(c,u){var h="",f=null;if(!this._options.templating.includes("angular"))return f;if(c==="@"){if(h=this.__patterns.angular_control_flow_start.read(),h==="")return f;for(var d=h.endsWith("(")?1:0,m=0;!(h.endsWith("{")&&d===m);){var b=this._input.next();if(b===null)break;b==="("?d++:b===")"&&m++,h+=b}f=this._create_token(r.CONTROL_FLOW_OPEN,h)}else c==="}"&&u&&u.type===r.CONTROL_FLOW_OPEN&&(h=this._input.next(),f=this._create_token(r.CONTROL_FLOW_CLOSE,h));return f},a.prototype._read_close=function(c,u){var h=null,f=null;return u&&u.type===r.TAG_OPEN&&(u.text[0]==="<"&&(c===">"||c==="/"&&this._input.peek(1)===">")?(h=this._input.next(),c==="/"&&(h+=this._input.next()),f=this._create_token(r.TAG_CLOSE,h)):u.text[0]==="{"&&c==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(r.TAG_CLOSE,"}}"))),f},a.prototype._read_attribute=function(c,u,h){var f=null,d="";if(h&&h.text[0]==="<")if(c==="=")f=this._create_token(r.EQUALS,this._input.next());else if(c==='"'||c==="'"){var m=this._input.next();c==='"'?m+=this.__patterns.double_quote.read():m+=this.__patterns.single_quote.read(),f=this._create_token(r.VALUE,m)}else d=this.__patterns.attribute.read(),d&&(u.type===r.EQUALS?f=this._create_token(r.VALUE,d):f=this._create_token(r.ATTRIBUTE,d));return f},a.prototype._is_content_unformatted=function(c){return this._options.void_elements.indexOf(c)===-1&&(this._options.content_unformatted.indexOf(c)!==-1||this._options.unformatted.indexOf(c)!==-1)},a.prototype._read_raw_content=function(c,u,h){var f="";if(h&&h.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(u.type===r.TAG_CLOSE&&u.opened.text[0]==="<"&&u.text[0]!=="/"){var d=u.opened.text.substr(1).toLowerCase();this._is_content_unformatted(d)&&(f=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return f?this._create_token(r.TEXT,f):null},a.prototype._read_script_and_style=function(c,u){if(u.type===r.TAG_CLOSE&&u.opened.text[0]==="<"&&u.text[0]!=="/"){var h=u.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var f=this._read_comment_or_cdata(c);if(f)return f.type=r.TEXT,f;var d=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"));if(d)return this._create_token(r.TEXT,d)}}return null},a.prototype._read_content_word=function(c,u){var h="";return this._options.unformatted_content_delimiter&&c===this._options.unformatted_content_delimiter[0]&&(h=this.__patterns.unformatted_content_delimiter.read()),h||(h=u&&u.type===r.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),h?this._create_token(r.TEXT,h):null},il.Tokenizer=a,il.TOKEN=r,il}var o_;function mQ(){if(o_)return gu;o_=1;var i=n_().Options,e=tu().Output,t=r_().Tokenizer,n=r_().TOKEN,s=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,o=function(g,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new e(g,p)};o.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},o.prototype.set_space_before_token=function(g,p){this._output.space_before_token=g,this._output.non_breaking_space=p},o.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},o.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},o.prototype.print_preserved_newlines=function(g){var p=0;g.type!==n.TEXT&&g.previous.type!==n.TEXT&&(p=g.newlines?1:0),this.preserve_newlines&&(p=g.newlines<this.max_preserve_newlines+1?g.newlines:this.max_preserve_newlines+1);for(var y=0;y<p;y++)this.print_newline(y>0);return p!==0},o.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},o.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},o.prototype.print_newline=function(g){this._output.add_new_line(g)},o.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},o.prototype.indent=function(){this.indent_level++},o.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},o.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var a=function(g){for(var p=null,y=g.next;y.type!==n.EOF&&g.closed!==y;){if(y.type===n.ATTRIBUTE&&y.text==="type"){y.next&&y.next.type===n.EQUALS&&y.next.next&&y.next.next.type===n.VALUE&&(p=y.next.next.text);break}y=y.next}return p},c=function(g,p){var y=null,x=null;return p.closed?(g==="script"?y="text/javascript":g==="style"&&(y="text/css"),y=a(p)||y,y.search("text/css")>-1?x="css":y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?x="javascript":y.search(/(text|application|dojo)\/(x-)?(html)/)>-1?x="html":y.search(/test\/null/)>-1&&(x="null"),x):null};function u(g,p){return p.indexOf(g)!==-1}function h(g,p,y){this.parent=g||null,this.tag=p?p.tag_name:"",this.indent_level=y||0,this.parser_token=p||null}function f(g){this._printer=g,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(g){var p=new h(this._current_frame,g,this._printer.indent_level);this._current_frame=p},f.prototype._try_pop_frame=function(g){var p=null;return g&&(p=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),p},f.prototype._get_frame=function(g,p){for(var y=this._current_frame;y&&g.indexOf(y.tag)===-1;){if(p&&p.indexOf(y.tag)!==-1){y=null;break}y=y.parent}return y},f.prototype.try_pop=function(g,p){var y=this._get_frame([g],p);return this._try_pop_frame(y)},f.prototype.indent_to_tag=function(g){var p=this._get_frame(g);p&&(this._printer.indent_level=p.indent_level)};function d(g,p,y,x){this._source_text=g||"",p=p||{},this._js_beautify=y,this._css_beautify=x,this._tag_stack=null;var O=new i(p,"html");this._options=O,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
77
77
  `,g&&s.test(g)&&(p=g.match(s)[0])),g=g.replace(r,`
78
- `);var O=g.match(/^[\t ]*/)[0],C={text:"",type:""},y=new m(this._options),E=new o(this._options,O),x=new t(g,this._options).tokenize();this._tag_stack=new f(E);for(var k=null,P=x.next();P.type!==n.EOF;)P.type===n.TAG_OPEN||P.type===n.COMMENT?(k=this._handle_tag_open(E,P,y,C,x),y=k):P.type===n.ATTRIBUTE||P.type===n.EQUALS||P.type===n.VALUE||P.type===n.TEXT&&!y.tag_complete?k=this._handle_inside_tag(E,P,y,C):P.type===n.TAG_CLOSE?k=this._handle_tag_close(E,P,y):P.type===n.TEXT?k=this._handle_text(E,P,y):P.type===n.CONTROL_FLOW_OPEN?k=this._handle_control_flow_open(E,P):P.type===n.CONTROL_FLOW_CLOSE?k=this._handle_control_flow_close(E,P):E.add_raw_token(P),C=k,P=x.next();var N=E._output.get_code(p);return N},d.prototype._handle_control_flow_open=function(g,p){var O={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),g.indent(),O},d.prototype._handle_control_flow_close=function(g,p){var O={text:p.text,type:p.type};return g.deindent(),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),O},d.prototype._handle_tag_close=function(g,p,O){var C={text:p.text,type:p.type};return g.alignment_size=0,O.tag_complete=!0,g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):(O.tag_start_char==="<"&&(g.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&O.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(p)),O.indent_content&&!(O.is_unformatted||O.is_content_unformatted)&&(g.indent(),O.indent_content=!1),!O.is_inline_element&&!(O.is_unformatted||O.is_content_unformatted)&&g.set_wrap_point(),C},d.prototype._handle_inside_tag=function(g,p,O,C){var y=O.has_wrapped_attrs,E={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),O.is_unformatted?g.add_raw_token(p):O.tag_start_char==="{"&&p.type===n.TEXT?g.print_preserved_newlines(p)?(p.newlines=0,g.add_raw_token(p)):g.print_token(p):(p.type===n.ATTRIBUTE?g.set_space_before_token(!0):(p.type===n.EQUALS||p.type===n.VALUE&&p.previous.type===n.EQUALS)&&g.set_space_before_token(!1),p.type===n.ATTRIBUTE&&O.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(p),y=y||p.newlines!==0),this._is_wrap_attributes_force&&O.attr_count>=this._options.wrap_attributes_min_attrs&&(C.type!==n.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(g.print_newline(!1),y=!0)),g.print_token(p),y=y||g.previous_token_wrapped(),O.has_wrapped_attrs=y),E},d.prototype._handle_text=function(g,p,O){var C={text:p.text,type:"TK_CONTENT"};return O.custom_beautifier_name?this._print_custom_beatifier_text(g,p,O):O.is_unformatted||O.is_content_unformatted?g.add_raw_token(p):(g.traverse_whitespace(p),g.print_token(p)),C},d.prototype._print_custom_beatifier_text=function(g,p,O){var C=this;if(p.text!==""){var y=p.text,E,x=1,k="",P="";O.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?E=this._js_beautify:O.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?E=this._css_beautify:O.custom_beautifier_name==="html"&&(E=function(T,I){var B=new d(T,I,C._js_beautify,C._css_beautify);return B.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-g.indent_level);var N=g.get_full_indent(x);if(y=y.replace(/\n[ \t]*$/,""),O.custom_beautifier_name!=="html"&&y[0]==="<"&&y.match(/^(<!--|<!\[CDATA\[)/)){var _=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(y);if(!_){g.add_raw_token(p);return}k=N+_[1]+`
79
- `,y=_[4],_[5]&&(P=N+_[5]),y=y.replace(/\n[ \t]*$/,""),(_[2]||_[3].indexOf(`
80
- `)!==-1)&&(_=_[3].match(/[ \t]+$/),_&&(p.whitespace_before=_[0]))}if(y)if(E){var A=function(){this.eol=`
81
- `};A.prototype=this._options.raw_options;var S=new A;y=E(N+y,S)}else{var M=p.whitespace_before;M&&(y=y.replace(new RegExp(`
82
- (`+M+")?","g"),`
83
- `)),y=N+y.replace(/\n/g,`
84
- `+N)}k&&(y?y=k+y+`
85
- `+P:y=k+P),g.print_newline(!1),y&&(p.text=y,p.whitespace_before="",p.newlines=0,g.add_raw_token(p),g.print_newline(!0))}},d.prototype._handle_tag_open=function(g,p,O,C,y){var E=this._get_tag_open_token(p);if((O.is_unformatted||O.is_content_unformatted)&&!O.is_empty_element&&p.type===n.TAG_OPEN&&!E.is_start_tag?(g.add_raw_token(p),E.start_tag_token=this._tag_stack.try_pop(E.tag_name)):(g.traverse_whitespace(p),this._set_tag_position(g,p,E,O,C),E.is_inline_element||g.set_wrap_point(),g.print_token(p)),E.is_start_tag&&this._is_wrap_attributes_force){var x=0,k;do k=y.peek(x),k.type===n.ATTRIBUTE&&(E.attr_count+=1),x+=1;while(k.type!==n.EOF&&k.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(E.alignment_size=p.text.length+1),!E.tag_complete&&!E.is_unformatted&&(g.alignment_size=E.alignment_size),E};var m=function(g,p,O){if(this.parent=p||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!O)this.tag_complete=!0;else{var C;this.tag_start_char=O.text[0],this.text=O.text,this.tag_start_char==="<"?(C=O.text.match(/^<([^\s>]*)/),this.tag_check=C?C[1]:""):(C=O.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=C?C[1]:"",(O.text.startsWith("{{#>")||O.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&O.next!==null?this.tag_check=O.next.text.split(" ")[0]:this.tag_check=O.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),O.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||O.closed&&O.closed.text==="/>";var y=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(y=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!g.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(y)))}};d.prototype._get_tag_open_token=function(g){var p=new m(this._options,this._tag_stack.get_parser_token(),g);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||h(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&h(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&h(p.tag_check,this._options.content_unformatted),p.is_inline_element=h(p.tag_name,this._options.inline)||this._options.inline_custom_elements&&p.tag_name.includes("-")||p.tag_start_char==="{",p},d.prototype._set_tag_position=function(g,p,O,C,y){if(O.is_empty_element||(O.is_end_tag?O.start_tag_token=this._tag_stack.try_pop(O.tag_name):(this._do_optional_end_element(O)&&(O.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(O),(O.tag_name==="script"||O.tag_name==="style")&&!(O.is_unformatted||O.is_content_unformatted)&&(O.custom_beautifier_name=c(O.tag_check,p)))),h(O.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),O.is_empty_element){if(O.tag_start_char==="{"&&O.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),O.indent_content=!0;var E=g.current_line_has_match(/{{#if/);E||g.print_newline(!1)}O.tag_name==="!--"&&y.type===n.TAG_CLOSE&&C.is_end_tag&&O.text.indexOf(`
86
- `)===-1||(O.is_inline_element||O.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,O))}else if(O.is_end_tag){var x=!1;x=O.start_tag_token&&O.start_tag_token.multiline_content,x=x||!O.is_inline_element&&!(C.is_inline_element||C.is_unformatted)&&!(y.type===n.TAG_CLOSE&&O.start_tag_token===C)&&y.type!=="TK_CONTENT",(O.is_content_unformatted||O.is_unformatted)&&(x=!1),x&&g.print_newline(!1)}else O.indent_content=!O.custom_beautifier_name,O.tag_start_char==="<"&&(O.tag_name==="html"?O.indent_content=this._options.indent_inner_html:O.tag_name==="head"?O.indent_content=this._options.indent_head_inner_html:O.tag_name==="body"&&(O.indent_content=this._options.indent_body_inner_html)),!(O.is_inline_element||O.is_unformatted)&&(y.type!=="TK_CONTENT"||O.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,O)},d.prototype._calcluate_parent_multiline=function(g,p){p.parent&&g._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var b=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(g){var p=null;if(!(g.is_empty_element||!g.is_start_tag||!g.parent)){if(g.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(g.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(g.tag_name==="dd"||g.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&b.indexOf(g.tag_name)!==-1){var O=g.parent.parent;(!O||w.indexOf(O.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),p}},ph.Beautifier=d,ph}var qO;function sT(){if(qO)return el.exports;qO=1;var i=nT().Beautifier,e=IO().Options;function t(n,s,r,o){var a=new i(n,s,r,o);return a.beautify()}return el.exports=t,el.exports.defaultOptions=function(){return new e},el.exports}var XO;function rT(){if(XO)return ar;XO=1;var i=eT(),e=iT(),t=sT();function n(s,r,o,a){return o=o||i,a=a||e,t(s,r,o,a)}return n.defaultOptions=t.defaultOptions,ar.js=i,ar.css=e,ar.html=n,ar}(function(i){function e(t,n,s){var r=function(o,a){return t.js_beautify(o,a)};return r.js=t.js_beautify,r.css=n.css_beautify,r.html=s.html_beautify,r.js_beautify=t.js_beautify,r.css_beautify=n.css_beautify,r.html_beautify=s.html_beautify,r}(function(t){var n=rT();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,t.exports=e(n,n,n)})(i)})(gO);var oT=gO.exports;const lT=GP(oT),wE="",aT={class:"act-code-mirror"},WO=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"300px"},theme:{type:String,default:"vs-dark"},editorOption:{type:Object,default:()=>({})}},emits:["update:modelValue","blur"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=l.computed(()=>({width:typeof s.width=="string"?s.width:s.width+"px",height:typeof s.height=="string"?s.height:s.height+"px"})),o=l.ref(!1),a=l.ref(),c=[LP(),zP],h=(f,d)=>{n("update:modelValue",d)};l.watch(()=>s.modelValue,(f,d)=>{a.value=f},{immediate:!0});const u=()=>{o.value=!0;try{a.value=lT.js(a.value,{indent_size:2})}catch(f){console.error("代码格式化失败:",f)}finally{o.value=!1}};return(f,d)=>{const m=l.resolveComponent("el-button"),b=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",aT,[l.withDirectives((l.openBlock(),l.createBlock(m,{class:"format-code-btn",type:"primary",loading:o.value,onClick:d[0]||(d[0]=w=>u(f.formRef))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.formatCode")),1)]),_:1},8,["loading"])),[[b]]),l.createVNode(l.unref(ZQ),{class:"code",modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=w=>a.value=w),style:l.normalizeStyle(r.value),extensions:c,autofocus:!1,disabled:!1,onChange:d[2]||(d[2]=w=>h("change",w))},null,8,["modelValue","style"])])}}},[["__scopeId","data-v-451d513f"]])},Symbol.toStringTag,{value:"Module"})),cT={class:"dialog-footer"},hT=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"dialogSiteComponentsParams",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},modelValue:{type:String,default:""}},emits:["update:visible","refresh","update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>WO)),n=e,s=i;let r=l.ref();l.watch(()=>s.visible,async(h,u)=>{h&&(r.value=s.modelValue)});const o=h=>{a(),h()},a=()=>{r.value="",n("update:visible",!1)},c=()=>{n("update:modelValue",r.value),n("update:visible",!1)};return(h,u)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:"800",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":o},{footer:l.withCtx(()=>[l.createElementVNode("span",cT,[l.createVNode(f,{onClick:a},{default:l.withCtx(()=>u[2]||(u[2]=[l.createTextVNode("取消")])),_:1}),l.createVNode(f,{type:"primary",onClick:u[1]||(u[1]=m=>c())},{default:l.withCtx(()=>u[3]||(u[3]=[l.createTextVNode("保存")])),_:1})])]),default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(r),"onUpdate:modelValue":u[0]||(u[0]=m=>l.isRef(r)?r.value=m:r=m),height:600},null,8,["modelValue"])]),_:1},8,["model-value","title"])}}}},Symbol.toStringTag,{value:"Module"}));vt.ActPlus=Zy,vt.actPlusComponents=Iy,vt.changeActI18n=Uy,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});
78
+ `);var y=g.match(/^[\t ]*/)[0],x={text:"",type:""},O=new m(this._options),Q=new o(this._options,y),S=new t(g,this._options).tokenize();this._tag_stack=new f(Q);for(var k=null,T=S.next();T.type!==n.EOF;)T.type===n.TAG_OPEN||T.type===n.COMMENT?(k=this._handle_tag_open(Q,T,O,x,S),O=k):T.type===n.ATTRIBUTE||T.type===n.EQUALS||T.type===n.VALUE||T.type===n.TEXT&&!O.tag_complete?k=this._handle_inside_tag(Q,T,O,x):T.type===n.TAG_CLOSE?k=this._handle_tag_close(Q,T,O):T.type===n.TEXT?k=this._handle_text(Q,T,O):T.type===n.CONTROL_FLOW_OPEN?k=this._handle_control_flow_open(Q,T):T.type===n.CONTROL_FLOW_CLOSE?k=this._handle_control_flow_close(Q,T):Q.add_raw_token(T),x=k,T=S.next();var $=Q._output.get_code(p);return $},d.prototype._handle_control_flow_open=function(g,p){var y={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),g.indent(),y},d.prototype._handle_control_flow_close=function(g,p){var y={text:p.text,type:p.type};return g.deindent(),p.newlines?g.print_preserved_newlines(p):g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),g.print_token(p),y},d.prototype._handle_tag_close=function(g,p,y){var x={text:p.text,type:p.type};return g.alignment_size=0,y.tag_complete=!0,g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),y.is_unformatted?g.add_raw_token(p):(y.tag_start_char==="<"&&(g.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&y.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(p)),y.indent_content&&!(y.is_unformatted||y.is_content_unformatted)&&(g.indent(),y.indent_content=!1),!y.is_inline_element&&!(y.is_unformatted||y.is_content_unformatted)&&g.set_wrap_point(),x},d.prototype._handle_inside_tag=function(g,p,y,x){var O=y.has_wrapped_attrs,Q={text:p.text,type:p.type};return g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),y.is_unformatted?g.add_raw_token(p):y.tag_start_char==="{"&&p.type===n.TEXT?g.print_preserved_newlines(p)?(p.newlines=0,g.add_raw_token(p)):g.print_token(p):(p.type===n.ATTRIBUTE?g.set_space_before_token(!0):(p.type===n.EQUALS||p.type===n.VALUE&&p.previous.type===n.EQUALS)&&g.set_space_before_token(!1),p.type===n.ATTRIBUTE&&y.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(p),O=O||p.newlines!==0),this._is_wrap_attributes_force&&y.attr_count>=this._options.wrap_attributes_min_attrs&&(x.type!==n.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(g.print_newline(!1),O=!0)),g.print_token(p),O=O||g.previous_token_wrapped(),y.has_wrapped_attrs=O),Q},d.prototype._handle_text=function(g,p,y){var x={text:p.text,type:"TK_CONTENT"};return y.custom_beautifier_name?this._print_custom_beatifier_text(g,p,y):y.is_unformatted||y.is_content_unformatted?g.add_raw_token(p):(g.traverse_whitespace(p),g.print_token(p)),x},d.prototype._print_custom_beatifier_text=function(g,p,y){var x=this;if(p.text!==""){var O=p.text,Q,S=1,k="",T="";y.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Q=this._js_beautify:y.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Q=this._css_beautify:y.custom_beautifier_name==="html"&&(Q=function(P,F){var B=new d(P,F,x._js_beautify,x._css_beautify);return B.beautify()}),this._options.indent_scripts==="keep"?S=0:this._options.indent_scripts==="separate"&&(S=-g.indent_level);var $=g.get_full_indent(S);if(O=O.replace(/\n[ \t]*$/,""),y.custom_beautifier_name!=="html"&&O[0]==="<"&&O.match(/^(<!--|<!\[CDATA\[)/)){var _=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);if(!_){g.add_raw_token(p);return}k=$+_[1]+`
79
+ `,O=_[4],_[5]&&(T=$+_[5]),O=O.replace(/\n[ \t]*$/,""),(_[2]||_[3].indexOf(`
80
+ `)!==-1)&&(_=_[3].match(/[ \t]+$/),_&&(p.whitespace_before=_[0]))}if(O)if(Q){var A=function(){this.eol=`
81
+ `};A.prototype=this._options.raw_options;var C=new A;O=Q($+O,C)}else{var D=p.whitespace_before;D&&(O=O.replace(new RegExp(`
82
+ (`+D+")?","g"),`
83
+ `)),O=$+O.replace(/\n/g,`
84
+ `+$)}k&&(O?O=k+O+`
85
+ `+T:O=k+T),g.print_newline(!1),O&&(p.text=O,p.whitespace_before="",p.newlines=0,g.add_raw_token(p),g.print_newline(!0))}},d.prototype._handle_tag_open=function(g,p,y,x,O){var Q=this._get_tag_open_token(p);if((y.is_unformatted||y.is_content_unformatted)&&!y.is_empty_element&&p.type===n.TAG_OPEN&&!Q.is_start_tag?(g.add_raw_token(p),Q.start_tag_token=this._tag_stack.try_pop(Q.tag_name)):(g.traverse_whitespace(p),this._set_tag_position(g,p,Q,y,x),Q.is_inline_element||g.set_wrap_point(),g.print_token(p)),Q.is_start_tag&&this._is_wrap_attributes_force){var S=0,k;do k=O.peek(S),k.type===n.ATTRIBUTE&&(Q.attr_count+=1),S+=1;while(k.type!==n.EOF&&k.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Q.alignment_size=p.text.length+1),!Q.tag_complete&&!Q.is_unformatted&&(g.alignment_size=Q.alignment_size),Q};var m=function(g,p,y){if(this.parent=p||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!y)this.tag_complete=!0;else{var x;this.tag_start_char=y.text[0],this.text=y.text,this.tag_start_char==="<"?(x=y.text.match(/^<([^\s>]*)/),this.tag_check=x?x[1]:""):(x=y.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=x?x[1]:"",(y.text.startsWith("{{#>")||y.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&y.next!==null?this.tag_check=y.next.text.split(" ")[0]:this.tag_check=y.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),y.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||y.closed&&y.closed.text==="/>";var O=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(O=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!g.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(O)))}};d.prototype._get_tag_open_token=function(g){var p=new m(this._options,this._tag_stack.get_parser_token(),g);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||u(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&u(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&u(p.tag_check,this._options.content_unformatted),p.is_inline_element=u(p.tag_name,this._options.inline)||this._options.inline_custom_elements&&p.tag_name.includes("-")||p.tag_start_char==="{",p},d.prototype._set_tag_position=function(g,p,y,x,O){if(y.is_empty_element||(y.is_end_tag?y.start_tag_token=this._tag_stack.try_pop(y.tag_name):(this._do_optional_end_element(y)&&(y.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(y),(y.tag_name==="script"||y.tag_name==="style")&&!(y.is_unformatted||y.is_content_unformatted)&&(y.custom_beautifier_name=c(y.tag_check,p)))),u(y.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),y.is_empty_element){if(y.tag_start_char==="{"&&y.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),y.indent_content=!0;var Q=g.current_line_has_match(/{{#if/);Q||g.print_newline(!1)}y.tag_name==="!--"&&O.type===n.TAG_CLOSE&&x.is_end_tag&&y.text.indexOf(`
86
+ `)===-1||(y.is_inline_element||y.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,y))}else if(y.is_end_tag){var S=!1;S=y.start_tag_token&&y.start_tag_token.multiline_content,S=S||!y.is_inline_element&&!(x.is_inline_element||x.is_unformatted)&&!(O.type===n.TAG_CLOSE&&y.start_tag_token===x)&&O.type!=="TK_CONTENT",(y.is_content_unformatted||y.is_unformatted)&&(S=!1),S&&g.print_newline(!1)}else y.indent_content=!y.custom_beautifier_name,y.tag_start_char==="<"&&(y.tag_name==="html"?y.indent_content=this._options.indent_inner_html:y.tag_name==="head"?y.indent_content=this._options.indent_head_inner_html:y.tag_name==="body"&&(y.indent_content=this._options.indent_body_inner_html)),!(y.is_inline_element||y.is_unformatted)&&(O.type!=="TK_CONTENT"||y.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,y)},d.prototype._calcluate_parent_multiline=function(g,p){p.parent&&g._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var b=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(g){var p=null;if(!(g.is_empty_element||!g.is_start_tag||!g.parent)){if(g.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(g.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(g.tag_name==="dd"||g.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&b.indexOf(g.tag_name)!==-1){var y=g.parent.parent;(!y||w.indexOf(y.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),p}},gu.Beautifier=d,gu}var l_;function gQ(){if(l_)return tl.exports;l_=1;var i=mQ().Beautifier,e=n_().Options;function t(n,s,r,o){var a=new i(n,s,r,o);return a.beautify()}return tl.exports=t,tl.exports.defaultOptions=function(){return new e},tl.exports}var a_;function OQ(){if(a_)return hr;a_=1;var i=fQ(),e=pQ(),t=gQ();function n(s,r,o,a){return o=o||i,a=a||e,t(s,r,o,a)}return n.defaultOptions=t.defaultOptions,hr.js=i,hr.css=e,hr.html=n,hr}(function(i){function e(t,n,s){var r=function(o,a){return t.js_beautify(o,a)};return r.js=t.js_beautify,r.css=n.css_beautify,r.html=s.html_beautify,r.js_beautify=t.js_beautify,r.css_beautify=n.css_beautify,r.html_beautify=s.html_beautify,r}(function(t){var n=OQ();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,t.exports=e(n,n,n)})(i)})(NO);var _Q=NO.exports;const bQ=aQ(_Q),RE="",yQ={class:"act-code-mirror"},c_=Object.freeze(Object.defineProperty({__proto__:null,default:ct({__name:"index",props:{modelValue:{type:String,default:""},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"300px"},theme:{type:String,default:"vs-dark"},editorOption:{type:Object,default:()=>({})}},emits:["update:modelValue","blur"],setup(i,{emit:e}){const{t}=Gt(),n=e,s=i,r=l.computed(()=>({width:typeof s.width=="string"?s.width:s.width+"px",height:typeof s.height=="string"?s.height:s.height+"px"})),o=l.ref(!1),a=l.ref(),c=[jP(),lQ],u=(f,d)=>{n("update:modelValue",d)};l.watch(()=>s.modelValue,(f,d)=>{a.value=f},{immediate:!0});const h=()=>{o.value=!0;try{a.value=bQ.js(a.value,{indent_size:2})}catch(f){console.error("代码格式化失败:",f)}finally{o.value=!1}};return(f,d)=>{const m=l.resolveComponent("el-button"),b=l.resolveDirective("debounce");return l.openBlock(),l.createElementBlock("div",yQ,[l.withDirectives((l.openBlock(),l.createBlock(m,{class:"format-code-btn",type:"primary",loading:o.value,onClick:d[0]||(d[0]=w=>h(f.formRef))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(t)("act.formatCode")),1)]),_:1},8,["loading"])),[[b]]),l.createVNode(l.unref(HT),{class:"code",modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=w=>a.value=w),style:l.normalizeStyle(r.value),extensions:c,autofocus:!1,disabled:!1,onChange:d[2]||(d[2]=w=>u("change",w))},null,8,["modelValue","style"])])}}},[["__scopeId","data-v-23982507"]])},Symbol.toStringTag,{value:"Module"})),wQ={class:"dialog-footer"},kQ=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"dialogSiteComponentsParams",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},modelValue:{type:String,default:""}},emits:["update:visible","refresh","update:modelValue"],setup(i,{emit:e}){const t=l.defineAsyncComponent(()=>Promise.resolve().then(()=>c_)),n=e,s=i;let r=l.ref();l.watch(()=>s.visible,async(u,h)=>{u&&(r.value=s.modelValue)});const o=u=>{a(),u()},a=()=>{r.value="",n("update:visible",!1)},c=()=>{n("update:modelValue",r.value),n("update:visible",!1)};return(u,h)=>{const f=l.resolveComponent("el-button"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createBlock(d,{"model-value":s.visible,title:s.title,top:"5vh",width:"800",draggable:"",overflow:"","close-on-click-modal":!1,"before-close":o},{footer:l.withCtx(()=>[l.createElementVNode("span",wQ,[l.createVNode(f,{onClick:a},{default:l.withCtx(()=>[...h[2]||(h[2]=[l.createTextVNode("取消",-1)])]),_:1}),l.createVNode(f,{type:"primary",onClick:h[1]||(h[1]=m=>c())},{default:l.withCtx(()=>[...h[3]||(h[3]=[l.createTextVNode("保存",-1)])]),_:1})])]),default:l.withCtx(()=>[l.createVNode(l.unref(t),{modelValue:l.unref(r),"onUpdate:modelValue":h[0]||(h[0]=m=>l.isRef(r)?r.value=m:r=m),height:600},null,8,["modelValue"])]),_:1},8,["model-value","title"])}}}},Symbol.toStringTag,{value:"Module"}));Bt.ActPlus=Yy,Bt.actPlusComponents=Gy,Bt.changeActI18n=Ky,Object.defineProperty(Bt,Symbol.toStringTag,{value:"Module"})});