prettier
Version:
Prettier is an opinionated code formatter
30 lines • 84.7 kB
JavaScript
var Mu=Object.defineProperty;var xt=(t,e)=>{for(var r in e)Mu(t,r,{get:e[r],enumerable:!0})};var Iu={};xt(Iu,{__debug:()=>Ji,check:()=>Ki,doc:()=>lr,format:()=>ku,formatWithCursor:()=>bu,getSupportInfo:()=>Hi,util:()=>pr,version:()=>Au});var Q=(t,e)=>(r,n,...o)=>r|1&&n==null?void 0:(e.call(n)??n[t]).apply(n,o);var Yu=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},ju=Q("replaceAll",function(){if(typeof this=="string")return Yu}),ue=ju;var we=class{diff(e,r,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);let u=this.castInput(e,n),i=this.castInput(r,n),a=this.removeEmpty(this.tokenize(u,n)),s=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(a,s,n,o)}diffWithOptionsObj(e,r,n,o){var u;let i=C=>{if(C=this.postProcess(C,n),o){setTimeout(function(){o(C)},0);return}else return C},a=r.length,s=e.length,D=1,c=a+s;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let p=(u=n.timeout)!==null&&u!==void 0?u:1/0,f=Date.now()+p,m=[{oldPos:-1,lastComponent:void 0}],l=this.extractCommon(m[0],r,e,0,n);if(m[0].oldPos+1>=s&&l+1>=a)return i(this.buildValues(m[0].lastComponent,r,e));let F=-1/0,d=1/0,E=()=>{for(let C=Math.max(F,-D);C<=Math.min(d,D);C+=2){let g,_=m[C-1],P=m[C+1];_&&(m[C-1]=void 0);let x=!1;if(P){let q=P.oldPos-C;x=P&&0<=q&&q<a}let N=_&&_.oldPos+1<s;if(!x&&!N){m[C]=void 0;continue}if(!N||x&&_.oldPos<P.oldPos?g=this.addToPath(P,!0,!1,0,n):g=this.addToPath(_,!1,!0,1,n),l=this.extractCommon(g,r,e,C,n),g.oldPos+1>=s&&l+1>=a)return i(this.buildValues(g.lastComponent,r,e))||!0;m[C]=g,g.oldPos+1>=s&&(d=Math.min(d,C-1)),l+1>=a&&(F=Math.max(F,C+1))}D++};if(o)(function C(){setTimeout(function(){if(D>c||Date.now()>f)return o(void 0);E()||C()},0)})();else for(;D<=c&&Date.now()<=f;){let C=E();if(C)return C}}addToPath(e,r,n,o,u){let i=e.lastComponent;return i&&!u.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(e,r,n,o,u){let i=r.length,a=n.length,s=e.oldPos,D=s-o,c=0;for(;D+1<i&&s+1<a&&this.equals(n[s+1],r[D+1],u);)D++,s++,c++,u.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!u.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,D}equals(e,r,n){return n.comparator?n.comparator(e,r):e===r||!!n.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,n){let o=[],u;for(;e;)o.push(e),u=e.previousComponent,delete e.previousComponent,e=u;o.reverse();let i=o.length,a=0,s=0,D=0;for(;a<i;a++){let c=o[a];if(c.removed)c.value=this.join(n.slice(D,D+c.count)),D+=c.count;else{if(!c.added&&this.useLongestToken){let p=r.slice(s,s+c.count);p=p.map(function(f,m){let l=n[D+m];return l.length>f.length?l:f}),c.value=this.join(p)}else c.value=this.join(r.slice(s,s+c.count));s+=c.count,c.added||(D+=c.count)}}return o}};var Tt=class extends we{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},dr=new Tt;function Nt(t,e,r){return dr.diff(t,e,r)}var Uu=()=>{},I=Uu;var Er="cr",Cr="crlf",Vu="lf",Wu=Vu,Bt="\r",hr=`\r
`,ze=`
`,$u=ze;function gr(t){let e=t.indexOf(Bt);return e!==-1?t.charAt(e+1)===ze?Cr:Er:Wu}function Se(t){return t===Er?Bt:t===Cr?hr:$u}var zu=new Map([[ze,/\n/g],[Bt,/\r/g],[hr,/\r\n/g]]);function wt(t,e){let r=zu.get(e);return t.match(r)?.length??0}var Gu=/\r\n?/g;function yr(t){return ue(0,t,Gu,ze)}var oe=Symbol.for("comments");function Ku(t){return this[t<0?this.length+t:t]}var Hu=Q("at",function(){if(Array.isArray(this)||typeof this=="string")return Ku}),A=Hu;var K="string",V="array",W="cursor",R="indent",L="align",v="trim",T="group",b="fill",B="if-break",M="indent-if-break",Y="line-suffix",j="line-suffix-boundary",y="line",k="label",w="break-parent",Ge=new Set([W,R,L,v,T,b,B,M,Y,j,y,k,w]);function _r(t){let e=t.length;for(;e>0&&(t[e-1]==="\r"||t[e-1]===`
`);)e--;return e<t.length?t.slice(0,e):t}function Ee(t,e,r){if(!t.has(e)){let n=r(e);t.set(e,n)}return t.get(e)}function Ju(t){if(typeof t=="string")return K;if(Array.isArray(t))return V;if(!t)return;let{type:e}=t;if(Ge.has(e))return e}var X=Ju;var qu=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Xu(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(X(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=qu([...Ge].map(o=>`'${o}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${n}.`}var St=class extends Error{name="InvalidDocError";constructor(e){super(Xu(e)),this.doc=e}},ee=St;var Ar={};function Qu(t,e,r,n){let o=[t];for(;o.length>0;){let u=o.pop();if(u===Ar){r(o.pop());continue}r&&o.push(u,Ar);let i=X(u);if(!i)throw new ee(u);if(e?.(u)!==!1)switch(i){case V:case b:{let a=i===V?u:u.parts;for(let s=a.length,D=s-1;D>=0;--D)o.push(a[D]);break}case B:o.push(u.flatContents,u.breakContents);break;case T:if(n&&u.expandedStates)for(let a=u.expandedStates.length,s=a-1;s>=0;--s)o.push(u.expandedStates[s]);else o.push(u.contents);break;case L:case R:case M:case k:case Y:o.push(u.contents);break;case K:case W:case v:case j:case y:case w:break;default:throw new ee(u)}}}var Oe=Qu;function be(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(u){return Ee(r,u,o)}function o(u){switch(X(u)){case V:return e(u.map(n));case b:return e({...u,parts:u.parts.map(n)});case B:return e({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case T:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),e({...u,contents:a,expandedStates:i})}case L:case R:case M:case k:case Y:return e({...u,contents:n(u.contents)});case K:case W:case v:case j:case y:case w:return e(u);default:throw new ee(u)}}}function Ke(t,e,r){let n=r,o=!1;function u(i){if(o)return!1;let a=e(i);a!==void 0&&(o=!0,n=a)}return Oe(t,u),n}function Zu(t){if(t.type===T&&t.break||t.type===y&&t.hard||t.type===w)return!0}function Nr(t){return Ke(t,Zu,!1)}function xr(t){if(t.length>0){let e=A(0,t,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function Br(t){let e=new Set,r=[];function n(u){if(u.type===w&&xr(r),u.type===T){if(r.push(u),e.has(u))return!1;e.add(u)}}function o(u){u.type===T&&r.pop().break&&xr(r)}Oe(t,n,o,!0)}function eo(t){return t.type===y&&!t.hard?t.soft?"":" ":t.type===B?t.flatContents:t}function wr(t){return be(t,eo)}function Tr(t){for(t=[...t];t.length>=2&&A(0,t,-2).type===y&&A(0,t,-1).type===w;)t.length-=2;if(t.length>0){let e=Pe(A(0,t,-1));t[t.length-1]=e}return t}function Pe(t){switch(X(t)){case R:case M:case T:case Y:case k:{let e=Pe(t.contents);return{...t,contents:e}}case B:return{...t,breakContents:Pe(t.breakContents),flatContents:Pe(t.flatContents)};case b:return{...t,parts:Tr(t.parts)};case V:return Tr(t);case K:return _r(t);case L:case W:case v:case j:case y:case w:break;default:throw new ee(t)}return t}function He(t){return Pe(ro(t))}function to(t){switch(X(t)){case b:{let{parts:e}=t;if(e.every(r=>r===""))return"";if(e.length===1)return e[0];break}case T:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===T&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case L:case R:case M:case Y:if(!t.contents)return"";break;case B:if(!t.flatContents&&!t.breakContents)return"";break;case V:{let e=[];for(let r of t){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof A(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...o)}return e.length===0?"":e.length===1?e[0]:e}case K:case W:case v:case j:case y:case k:case w:break;default:throw new ee(t)}return t}function ro(t){return be(t,e=>to(e))}function Sr(t,e=qe){return be(t,r=>typeof r=="string"?Je(e,r.split(`
`)):r)}function no(t){if(t.type===y)return!0}function Or(t){return Ke(t,no,!1)}function Ce(t,e){return t.type===k?{...t,contents:e(t.contents)}:e(t)}var S=I,Xe=I,Pr=I,br=I;function ie(t){return S(t),{type:R,contents:t}}function De(t,e){return br(t),S(e),{type:L,contents:e,n:t}}function kr(t){return De(Number.NEGATIVE_INFINITY,t)}function Qe(t){return De({type:"root"},t)}function Ir(t){return De(-1,t)}function Ze(t,e,r){S(t);let n=t;if(e>0){for(let o=0;o<Math.floor(e/r);++o)n=ie(n);n=De(e%r,n),n=De(Number.NEGATIVE_INFINITY,n)}return n}var ce={type:w};var te={type:W};function Rr(t){return Pr(t),{type:b,parts:t}}function Ot(t,e={}){return S(t),Xe(e.expandedStates,!0),{type:T,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Lr(t,e){return Ot(t[0],{...e,expandedStates:t})}function vr(t,e="",r={}){return S(t),e!==""&&S(e),{type:B,breakContents:t,flatContents:e,groupId:r.groupId}}function Mr(t,e){return S(t),{type:M,contents:t,groupId:e.groupId,negate:e.negate}}function Je(t,e){S(t),Xe(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}function Yr(t,e){return S(e),t?{type:k,label:t,contents:e}:e}var et={type:y},jr={type:y,soft:!0},ke={type:y,hard:!0},$=[ke,ce],Pt={type:y,hard:!0,literal:!0},qe=[Pt,ce];function Ie(t){return S(t),{type:Y,contents:t}}var Ur={type:j};var Vr={type:v};function re(t){if(!t)return"";if(Array.isArray(t)){let e=[];for(let r of t)if(Array.isArray(r))e.push(...re(r));else{let n=re(r);n!==""&&e.push(n)}return e}return t.type===B?{...t,breakContents:re(t.breakContents),flatContents:re(t.flatContents)}:t.type===T?{...t,contents:re(t.contents),expandedStates:t.expandedStates?.map(re)}:t.type===b?{type:"fill",parts:t.parts.map(re)}:t.contents?{...t,contents:re(t.contents)}:t}function Wr(t){let e=Object.create(null),r=new Set;return n(re(t));function n(u,i,a){if(typeof u=="string")return JSON.stringify(u);if(Array.isArray(u)){let s=u.map(n).filter(Boolean);return s.length===1?s[0]:`[${s.join(", ")}]`}if(u.type===y){let s=a?.[i+1]?.type===w;return u.literal?s?"literalline":"literallineWithoutBreakParent":u.hard?s?"hardline":"hardlineWithoutBreakParent":u.soft?"softline":"line"}if(u.type===w)return a?.[i-1]?.type===y&&a[i-1].hard?void 0:"breakParent";if(u.type===v)return"trim";if(u.type===R)return"indent("+n(u.contents)+")";if(u.type===L)return u.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(u.contents)+")":u.n<0?"dedent("+n(u.contents)+")":u.n.type==="root"?"markAsRoot("+n(u.contents)+")":"align("+JSON.stringify(u.n)+", "+n(u.contents)+")";if(u.type===B)return"ifBreak("+n(u.breakContents)+(u.flatContents?", "+n(u.flatContents):"")+(u.groupId?(u.flatContents?"":', ""')+`, { groupId: ${o(u.groupId)} }`:"")+")";if(u.type===M){let s=[];u.negate&&s.push("negate: true"),u.groupId&&s.push(`groupId: ${o(u.groupId)}`);let D=s.length>0?`, { ${s.join(", ")} }`:"";return`indentIfBreak(${n(u.contents)}${D})`}if(u.type===T){let s=[];u.break&&u.break!=="propagated"&&s.push("shouldBreak: true"),u.id&&s.push(`id: ${o(u.id)}`);let D=s.length>0?`, { ${s.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(c=>n(c)).join(",")}]${D})`:`group(${n(u.contents)}${D})`}if(u.type===b)return`fill([${u.parts.map(s=>n(s)).join(", ")}])`;if(u.type===Y)return"lineSuffix("+n(u.contents)+")";if(u.type===j)return"lineSuffixBoundary";if(u.type===k)return`label(${JSON.stringify(u.label)}, ${n(u.contents)})`;if(u.type===W)return"cursor";throw new Error("Unknown doc type "+u.type)}function o(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in e)return e[u];let i=u.description||"symbol";for(let a=0;;a++){let s=i+(a>0?` #${a}`:"");if(!r.has(s))return r.add(s),e[u]=`Symbol.for(${JSON.stringify(s)})`}}}var $r=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED9\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEFA](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDEC2\uDEC6\uDEC8\uDECC-\uDEDD\uDEDF-\uDEEB\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var zr=12288,Gr=65510,Kr=[12288,12288,65281,65376,65504,65510];var Hr=4352,Jr=262141,bt=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101594,101631,101664,101760,101874,101888,102801,102816,102866,110576,110579,110581,110587,110589,110590,110592,110888,110898,110898,110928,110930,110933,110933,110948,110952,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127406,127406,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128729,128732,128735,128747,128748,128756,128764,128986,128986,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129734,129736,129736,129740,129757,129759,129771,129775,129786,131072,196605,196608,262141];var kt=(t,e)=>{let r=0,n=Math.floor(t.length/2)-1;for(;r<=n;){let o=Math.floor((r+n)/2),u=o*2;if(e<t[u])n=o-1;else if(e>t[u+1])r=o+1;else return!0}return!1};var qr=19968,[uo,oo]=io(bt);function io(t){let e=t[0],r=t[1];for(let n=0;n<t.length;n+=2){let o=t[n],u=t[n+1];if(qr>=o&&qr<=u)return[o,u];u-o>r-e&&(e=o,r=u)}return[e,r]}var tt=t=>t<zr||t>Gr?!1:kt(Kr,t);var It=t=>t>=uo&&t<=oo?!0:t<Hr||t>Jr?!1:kt(bt,t);var so=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,Xr=t=>so.test(t);var ao=/[^\x20-\x7F]/,Do=/[\p{Nonspacing_Mark}\p{Enclosing_Mark}]/u;function co(t){if(!t)return 0;if(!ao.test(t))return t.length;let e=0;t=t.replace($r(),r=>(e+=Xr(r)?1:2,""));for(let r of t){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||Do.test(r)||(e+=tt(n)||It(n)?2:1)}return e}var Re=co;var lo={type:0},fo={type:1},Rt={value:"",length:0,queue:[],get root(){return Rt}};function Qr(t,e,r){let n=e.type===1?t.queue.slice(0,-1):[...t.queue,e],o="",u=0,i=0,a=0;for(let l of n)switch(l.type){case 0:c(),r.useTabs?s(1):D(r.tabWidth);break;case 3:{let{string:F}=l;c(),o+=F,u+=F.length;break}case 2:{let{width:F}=l;i+=1,a+=F;break}default:throw new Error(`Unexpected indent comment '${l.type}'.`)}return f(),{...t,value:o,length:u,queue:n};function s(l){o+=" ".repeat(l),u+=r.tabWidth*l}function D(l){o+=" ".repeat(l),u+=l}function c(){r.useTabs?p():f()}function p(){i>0&&s(i),m()}function f(){a>0&&D(a),m()}function m(){i=0,a=0}}function Zr(t,e,r){if(!e)return t;if(e.type==="root")return{...t,root:t};if(e===Number.NEGATIVE_INFINITY)return t.root;let n;return typeof e=="number"?e<0?n=fo:n={type:2,width:e}:n={type:3,string:e},Qr(t,n,r)}function en(t,e){return Qr(t,lo,e)}function po(t){let e=0;for(let r=t.length-1;r>=0;r--){let n=t[r];if(n===" "||n===" ")e++;else break}return e}function rt(t){let e=po(t);return{text:e===0?t:t.slice(0,t.length-e),count:e}}var Lt=class{#t=[];#e="";#n=0;#u=[];#r=[];#o(){let e=this.#e;e!==""&&(this.#t.push(e),this.#n+=e.length,this.#e="");for(let r of this.#r)this.#u.push(Math.min(r,this.#n));this.#r.length=0}markPosition(){if(this.#u.length+this.#r.length>=2)throw new Error("There are too many 'cursor' in doc.");this.#r.push(this.#n+this.#e.length)}write(e){this.#e+=e}trim(){let{text:e,count:r}=rt(this.#e);return this.#e=e,this.#o(),r}finish(){return this.#o(),{text:this.#t.join(""),positions:this.#u}}},tn=Lt;var H=Symbol("MODE_BREAK"),Z=Symbol("MODE_FLAT"),vt=Symbol("DOC_FILL_PRINTED_LENGTH");function nt(t,e,r,n,o,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=e.length,a=!1,s=[t],D="";for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(e[--i]);continue}let{mode:c,doc:p}=s.pop(),f=X(p);switch(f){case K:p&&(a&&(D+=" ",r-=1,a=!1),D+=p,r-=Re(p));break;case V:case b:{let m=f===V?p:p.parts,l=p[vt]??0;for(let F=m.length-1;F>=l;F--)s.push({mode:c,doc:m[F]});break}case R:case L:case M:case k:s.push({mode:c,doc:p.contents});break;case v:{let{text:m,count:l}=rt(D);D=m,r+=l;break}case T:{if(u&&p.break)return!1;let m=p.break?H:c,l=p.expandedStates&&m===H?A(0,p.expandedStates,-1):p.contents;s.push({mode:m,doc:l});break}case B:{let l=(p.groupId?o[p.groupId]||Z:c)===H?p.breakContents:p.flatContents;l&&s.push({mode:c,doc:l});break}case y:if(c===H||p.hard)return!0;p.soft||(a=!0);break;case Y:n=!0;break;case j:if(n)return!1;break}}return!1}function he(t,e){let r=Object.create(null),n=e.printWidth,o=Se(e.endOfLine),u=0,i=[{indent:Rt,mode:H,doc:t}],a=!1,s=[],D=new tn;for(Br(t);i.length>0;){let{indent:l,mode:F,doc:d}=i.pop();switch(X(d)){case K:{let E=o!==`
`?ue(0,d,`
`,o):d;E&&(D.write(E),i.length>0&&(u+=Re(E)));break}case V:for(let E=d.length-1;E>=0;E--)i.push({indent:l,mode:F,doc:d[E]});break;case W:D.markPosition();break;case R:i.push({indent:en(l,e),mode:F,doc:d.contents});break;case L:i.push({indent:Zr(l,d.n,e),mode:F,doc:d.contents});break;case v:u-=D.trim();break;case T:{let E=(function(){if(F===Z&&!a)return{indent:l,mode:d.break?H:Z,doc:d.contents};a=!1;let g=n-u,_=s.length>0,P={indent:l,mode:Z,doc:d.contents};if(!d.break&&nt(P,i,g,_,r))return P;if(!d.expandedStates)return{indent:l,mode:H,doc:d.contents};if(!d.break)for(let x=1;x<d.expandedStates.length-1;x++){let N={indent:l,mode:Z,doc:d.expandedStates[x]};if(nt(N,i,g,_,r))return N}return{indent:l,mode:H,doc:A(0,d.expandedStates,-1)}})();i.push(E),d.id&&(r[d.id]=E.mode);break}case b:{let E=n-u,C=d[vt]??0,{parts:g}=d,_=g.length-C;if(_===0)break;let P=g[C+0],x=g[C+1],N={indent:l,mode:Z,doc:P},q={indent:l,mode:H,doc:P},$e=nt(N,[],E,s.length>0,r,!0);if(_===1){$e?i.push(N):i.push(q);break}let mr={indent:l,mode:Z,doc:x},At={indent:l,mode:H,doc:x};if(_===2){$e?i.push(mr,N):i.push(At,q);break}let Ru=g[C+2],Lu={indent:l,mode:F,doc:{...d,[vt]:C+2}},vu=nt({indent:l,mode:Z,doc:[P,x,Ru]},[],E,s.length>0,r,!0);i.push(Lu),vu?i.push(mr,N):$e?i.push(At,N):i.push(At,q);break}case B:case M:{let E=d.groupId?r[d.groupId]:F;if(E===H){let C=d.type===B?d.breakContents:d.negate?d.contents:ie(d.contents);C&&i.push({indent:l,mode:F,doc:C})}if(E===Z){let C=d.type===B?d.flatContents:d.negate?ie(d.contents):d.contents;C&&i.push({indent:l,mode:F,doc:C})}break}case Y:s.push({indent:l,mode:F,doc:d.contents});break;case j:s.length>0&&i.push({indent:l,mode:F,doc:ke});break;case y:switch(F){case Z:if(!d.hard){d.soft||(D.write(" "),u+=1);break}a=!0;case H:if(s.length>0){i.push({indent:l,mode:F,doc:d},...s.reverse()),s.length=0;break}d.literal?(D.write(o),u=0,l.root&&(l.root.value&&D.write(l.root.value),u=l.root.length)):(D.trim(),D.write(o+l.value),u=l.length);break}break;case k:i.push({indent:l,mode:F,doc:d.contents});break;case w:break;default:throw new ee(d)}i.length===0&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let{text:c,positions:p}=D.finish();if(p.length!==2)return{formatted:c};let[f,m]=p;return{formatted:c,cursorNodeStart:f,cursorNodeText:c.slice(f,m)}}var rn=t=>t.charAt(0)==="\uFEFF";var nn=t=>"\uFEFF"+t;function mo(t,e,r=0){let n=0;for(let o=r;o<t.length;++o)t[o]===" "?n=n+e-n%e:n++;return n}var ge=mo;var Mt=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:r}=this;return A(0,e,r===null?-2:-4)??null}get index(){return this.siblings===null?null:A(0,this.stack,-2)}get node(){return A(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,r=A(0,e,-3);return Array.isArray(r)?r:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:r}=this;return e!==null&&r===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#e()]}getName(){let{stack:e}=this,{length:r}=e;return r>1?A(0,e,-2):null}getValue(){return A(0,this.stack,-1)}getNode(e=0){let r=this.#t(e);return r===-1?null:this.stack[r]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--e<0)return n;return-1}call(e,...r){let{stack:n}=this,{length:o}=n,u=A(0,n,-1);for(let i of r)u=u?.[i],n.push(i,u);try{return e(this)}finally{n.length=o}}callParent(e,r=0){let n=this.#t(r+1),o=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...o)}}each(e,...r){let{stack:n}=this,{length:o}=n,u=A(0,n,-1);for(let i of r)u=u[i],n.push(i,u);try{for(let i=0;i<u.length;++i)n.push(i,u[i]),e(this,i,u),n.length-=2}finally{n.length=o}}map(e,...r){let n=[];return this.each((o,u,i)=>{n[u]=e(o,u,i)},...r),n}match(...e){let r=this.stack.length-1,n=null,o=this.stack[r--];for(let u of e){if(o===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],o=this.stack[r--]),u&&!u(o,n,i))return!1;n=this.stack[r--],o=this.stack[r--]}return!0}findAncestor(e){for(let r of this.#e())if(e(r))return r}hasAncestor(e){for(let r of this.#e())if(e(r))return!0;return!1}*#e(){let{stack:e}=this;for(let r=e.length-3;r>=0;r-=2){let n=e[r];Array.isArray(n)||(yield n)}}},un=Mt;function Fo(t){return Array.isArray(t)&&t.length>0}var ut=Fo;function Eo(t){return t!==null&&typeof t=="object"}var ye=Eo;function _e(t){return(e,r,n)=>{if(r===!1)return!1;let o=!!n?.backwards,{length:u}=e,i=r;for(;i>=0&&i<u;){let a=e.charAt(i);if(t instanceof RegExp){if(!t.test(a))return i}else if(!t.includes(a))return i;o?i--:i++}return i===-1||i===u?i:!1}}var on=_e(/\s/),U=_e(" "),ot=_e(",; "),it=_e(/[^\n\r]/);var sn=t=>t===`
`||t==="\r"||t==="\u2028"||t==="\u2029";function Co(t,e,r){if(e===!1)return!1;let n=!!r?.backwards,o=t.charAt(e);if(n){if(t.charAt(e-1)==="\r"&&o===`
`)return e-2;if(sn(o))return e-1}else{if(o==="\r"&&t.charAt(e+1)===`
`)return e+2;if(sn(o))return e+1}return e}var z=Co;function ho(t,e,r={}){let n=U(t,r.backwards?e-1:e,r),o=z(t,n,r);return n!==o}var J=ho;function*Ae(t,e){let{getVisitorKeys:r,filter:n=()=>!0}=e,o=u=>ye(u)&&n(u);for(let u of r(t)){let i=t[u];if(Array.isArray(i))for(let a of i)o(a)&&(yield a);else o(i)&&(yield i)}}function*an(t,e){let r=[t];for(let n=0;n<r.length;n++){let o=r[n];for(let u of Ae(o,e))yield u,r.push(u)}}function Dn(t,e){return Ae(t,e).next().done}function go(t,e,r){let{filter:n}=r;if(!n)return[];let o,u=(r.getChildren?.(t,r)??[...Ae(t,{getVisitorKeys:r.getVisitorKeys})]).flatMap(s=>(o??(o=[t,...e]),n(s,o)?[s]:cn(s,o,r))),{locStart:i,locEnd:a}=r;return u.sort((s,D)=>i(s)-i(D)||a(s)-a(D)),u}function cn(t,e,r){return Ee(r.cache,t,n=>go(n,e,r))}var st=cn;function yo(t){let e=t.type||t.kind||"(unknown type)",r=String(t.name||t.id&&(typeof t.id=="object"?t.id.name:t.id)||t.key&&(typeof t.key=="object"?t.key.name:t.key)||t.value&&(typeof t.value=="object"?"":String(t.value))||t.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),e+(r?" "+r:"")}function Yt(t,e){return(t.comments??(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=yo(t),!0}function le(t,e){return e.leading=!0,e.trailing=!1,Yt(t,e)}function ne(t,e,r){return e.leading=!1,e.trailing=!1,r&&(e.marker=r),Yt(t,e)}function fe(t,e){return e.leading=!1,e.trailing=!0,Yt(t,e)}var Vt=new WeakMap;function fn(t,e,r,n,o=[]){let{locStart:u,locEnd:i}=r,a=u(e),s=i(e),D=st(t,o,{cache:Vt,locStart:u,locEnd:i,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes}),c,p,f=0,m=D.length;for(;f<m;){let l=f+m>>1,F=D[l],d=u(F),E=i(F);if(d<=a&&s<=E)return fn(F,e,r,F,[F,...o]);if(E<=a){c=F,f=l+1;continue}if(s<=d){p=F,m=l;continue}throw new Error("Comment location overlaps with node location")}if(n?.type==="TemplateLiteral"){let{quasis:l}=n,F=Ut(l,e,r);c&&Ut(l,c,r)!==F&&(c=null),p&&Ut(l,p,r)!==F&&(p=null)}return{enclosingNode:n,precedingNode:c,followingNode:p,ancestors:o}}var jt=()=>!1;function pn(t,e){let{comments:r}=t;if(delete t.comments,!ut(r)||!e.printer.canAttachComment)return;let n=[],{printer:{features:{experimental_avoidAstMutation:o},handleComments:u={}},originalText:i}=e,{ownLine:a=jt,endOfLine:s=jt,remaining:D=jt}=u,c=r.map((f,m)=>({...fn(t,f,e),comment:f,text:i,options:e,ast:t,isLastComment:r.length-1===m,placement:void 0})),p=!o;for(let[f,m]of c.entries()){let{comment:l,precedingNode:F,enclosingNode:d,followingNode:E,text:C,options:g,ast:_,isLastComment:P}=m,x=_o(C,g,c,f)?"ownLine":Ao(C,g,c,f)?"endOfLine":"remaining",N;if(o?(m.placement=x,N=[m]):N=[l,C,g,_,P],p&&(l.enclosingNode=d,l.precedingNode=F,l.followingNode=E),l.placement=x,x==="ownLine")a(...N)||(E?le(E,l):F?fe(F,l):d?ne(d,l):ne(_,l));else if(x==="endOfLine")s(...N)||(F?fe(F,l):E?le(E,l):d?ne(d,l):ne(_,l));else if(!D(...N))if(F&&E){let q=n.length;q>0&&n[q-1].followingNode!==E&&ln(n,g),n.push(m)}else F?fe(F,l):E?le(E,l):d?ne(d,l):ne(_,l)}if(ln(n,e),p)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var mn=t=>!/[\S\n\u2028\u2029]/.test(t);function _o(t,e,r,n){let{comment:o,precedingNode:u}=r[n],{locStart:i,locEnd:a}=e,s=i(o);if(u)for(let D=n-1;D>=0;D--){let{comment:c,precedingNode:p}=r[D];if(p!==u||!mn(t.slice(a(c),s)))break;s=i(c)}return J(t,s,{backwards:!0})}function Ao(t,e,r,n){let{comment:o,followingNode:u}=r[n],{locStart:i,locEnd:a}=e,s=a(o);if(u)for(let D=n+1;D<r.length;D++){let{comment:c,followingNode:p}=r[D];if(p!==u||!mn(t.slice(s,i(c))))break;s=a(c)}return J(t,s)}function ln(t,e){let r=t.length;if(r===0)return;let{precedingNode:n,followingNode:o}=t[0],u=e.locStart(o),i;for(i=r;i>0;--i){let{comment:a,precedingNode:s,followingNode:D}=t[i-1];I(s,n),I(D,o);let c=e.originalText.slice(e.locEnd(a),u);if(e.printer.isGap?.(c,e)??/^[\s(]*$/.test(c))u=e.locStart(a);else break}for(let[a,{comment:s}]of t.entries())a<i?fe(n,s):le(o,s);for(let a of[n,o])a.comments&&a.comments.length>1&&a.comments.sort((s,D)=>e.locStart(s)-e.locStart(D));t.length=0}function Ut(t,e,r){let n=r.locStart(e)-1;for(let o=1;o<t.length;++o)if(n<r.locStart(t[o]))return o-1;return 0}function xo(t,e){let r=e-1;r=U(t,r,{backwards:!0}),r=z(t,r,{backwards:!0}),r=U(t,r,{backwards:!0});let n=z(t,r,{backwards:!0});return r!==n}var Le=xo;var dn=()=>!0;function Fn(t,e){let r=t.node;return r.printed=!0,e.printer.printComment(t,e)}function To(t,e){let r=t.node,n=[Fn(t,e)],{printer:o,originalText:u,locStart:i,locEnd:a}=e;if(o.isBlockComment?.(r)){let c=" ";J(u,a(r))&&(J(u,i(r),{backwards:!0})?c=$:c=et),n.push(c)}else n.push($);let D=z(u,U(u,a(r)));return D!==!1&&J(u,D)&&n.push($),n}function No(t,e,r){let n=t.node,o=Fn(t,e),{printer:u,originalText:i,locStart:a}=e,s=u.isBlockComment?.(n);if(r?.hasLineSuffix&&!r?.isBlock||J(i,a(n),{backwards:!0})){let D=Le(i,a(n));return{doc:Ie([$,D?$:"",o]),isBlock:s,hasLineSuffix:!0}}return!s||r?.hasLineSuffix?{doc:[Ie([" ",o]),ce],isBlock:s,hasLineSuffix:!0}:{doc:[" ",o],isBlock:s,hasLineSuffix:!1}}function Bo(t,e,r){let n=e[Symbol.for("printedComments")],o=r?.filter??dn,u=new Set(t.node?.comments?.filter(i=>!n?.has(i)&&i.leading&&o(i)));return u.size===0?"":t.map(({node:i})=>u.has(i)?To(t,e):"","comments").filter(Boolean)}function wo(t,e,r){let n=t.node?.comments,o=new Set(n?.filter(c=>c.trailing)),u=e[Symbol.for("printedComments")],i=r?.filter??dn,a=new Set(n?.filter(c=>o.has(c)&&!u?.has(c)&&i(c)));if(a.size===0)return"";let s=[],D;return t.each(({node:c})=>{o.has(c)&&(D=No(t,e,D),a.has(c)&&s.push(D.doc))},"comments"),s}function En(t,e,r,n){let o=Bo(t,r,n),u=wo(t,r,n);return o||u?Ce(e,i=>[o,i,u]):e}function Cn(t){let{[oe]:e,[Symbol.for("printedComments")]:r}=t;for(let n of e){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var hn=()=>I;var ve=class extends Error{name="ConfigError"},Me=class extends Error{name="UndefinedParserError"};var So=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),pe=So;var gn={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:t=>typeof t=="string"||typeof t=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:t=>typeof t=="string"||typeof t=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function at({plugins:t=[],showDeprecated:e=!1}={}){let r=t.flatMap(o=>o.languages??[]),n=[];for(let o of Po(Object.assign({},...t.map(({options:u})=>u),gn)))!e&&o.deprecated||(Array.isArray(o.choices)&&(e||(o.choices=o.choices.filter(u=>!u.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...Oo(o.choices,r,t)])),o.pluginDefaults=Object.fromEntries(t.filter(u=>u.defaultOptions?.[o.name]!==void 0).map(u=>[u.name,u.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*Oo(t,e,r){let n=new Set(t.map(o=>o.value));for(let o of e)if(o.parsers){for(let u of o.parsers)if(!n.has(u)){n.add(u);let i=r.find(s=>s.parsers&&pe(s.parsers,u)),a=o.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:u,description:a}}}}function Po(t){let e=[];for(let[r,n]of Object.entries(t)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=A(0,o.default,-1).value),e.push(o)}return e}var bo=Array.prototype.toReversed??function(){return[...this].reverse()},ko=Q("toReversed",function(){if(Array.isArray(this))return bo}),yn=ko;function Io(){let t=globalThis,e=t.process?.platform;if(typeof e=="string")return e.startsWith("win");let r=t.Deno?.build?.os;return typeof r=="string"?r==="windows":t.navigator?.platform?.startsWith("Win")??!1}var Ro=Io();function _n(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Lo(t){return t=_n(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function vo(t){t=_n(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Wt(t){return Ro?vo(t):Lo(t)}var An=t=>String(t).split(/[/\\]/).pop(),xn=t=>String(t).startsWith("file:");function Tn(t,e){if(!e)return;let r=An(e).toLowerCase();return t.find(({filenames:n})=>n?.some(o=>o.toLowerCase()===r))??t.find(({extensions:n})=>n?.some(o=>r.endsWith(o)))}function Mo(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r?.includes(e))??t.find(({extensions:r})=>r?.includes(`.${e}`))}var Yo=void 0;function Nn(t,e){if(e){if(xn(e))try{e=Wt(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r?.({filepath:e}))}}function jo(t,e){let r=yn(0,t.plugins).flatMap(o=>o.languages??[]);return(Mo(r,e.language)??Tn(r,e.physicalFile)??Tn(r,e.file)??Nn(r,e.physicalFile)??Nn(r,e.file)??Yo?.(r,e.physicalFile))?.parsers[0]}var Dt=jo;var se={key:t=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?t:JSON.stringify(t),value(t){if(t===null||typeof t!="object")return JSON.stringify(t);if(Array.isArray(t))return`[${t.map(r=>se.value(r)).join(", ")}]`;let e=Object.keys(t);return e.length===0?"{}":`{ ${e.map(r=>`${se.key(r)}: ${se.value(t[r])}`).join(", ")} }`},pair:({key:t,value:e})=>se.value({[t]:e})};var Bn=new Proxy(String,{get:()=>Bn}),G=Bn;var wn=(t,e,{descriptor:r})=>{let n=[`${G.yellow(typeof t=="string"?r.key(t):r.pair(t))} is deprecated`];return e&&n.push(`we now treat it as ${G.blue(typeof e=="string"?r.key(e):r.pair(e))}`),n.join("; ")+"."};var ct=Symbol.for("vnopts.VALUE_NOT_EXIST"),xe=Symbol.for("vnopts.VALUE_UNCHANGED");var Sn=" ".repeat(2),Pn=(t,e,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[t].expected(r)),u=[];return n&&u.push(On(t,e,n,r.descriptor)),o&&u.push([On(t,e,o.title,r.descriptor)].concat(o.values.map(i=>bn(i,r.loggerPrintWidth))).join(`
`)),kn(u,r.loggerPrintWidth)};function On(t,e,r,n){return[`Invalid ${G.red(n.key(t))} value.`,`Expected ${G.blue(r)},`,`but received ${e===ct?G.gray("nothing"):G.red(n.value(e))}.`].join(" ")}function bn({text:t,list:e},r){let n=[];return t&&n.push(`- ${G.blue(t)}`),e&&n.push([`- ${G.blue(e.title)}:`].concat(e.values.map(o=>bn(o,r-Sn.length).replace(/^|\n/g,`$&${Sn}`))).join(`
`)),kn(n,r)}function kn(t,e){if(t.length===1)return t[0];let[r,n]=t,[o,u]=t.map(i=>i.split(`
`,1)[0].length);return o>e&&o>u?n:r}var Te=[],$t=[];function lt(t,e,r){if(t===e)return 0;let n=r?.maxDistance,o=t;t.length>e.length&&(t=e,e=o);let u=t.length,i=e.length;for(;u>0&&t.charCodeAt(~-u)===e.charCodeAt(~-i);)u--,i--;let a=0;for(;a<u&&t.charCodeAt(a)===e.charCodeAt(a);)a++;if(u-=a,i-=a,n!==void 0&&i-u>n)return n;if(u===0)return n!==void 0&&i>n?n:i;let s,D,c,p,f=0,m=0;for(;f<u;)$t[f]=t.charCodeAt(a+f),Te[f]=++f;for(;m<i;){for(s=e.charCodeAt(a+m),c=m++,D=m,f=0;f<u;f++)p=s===$t[f]?c:c+1,c=Te[f],D=Te[f]=c>D?p>D?D+1:p:p>c?c+1:p;if(n!==void 0){let l=D;for(f=0;f<u;f++)Te[f]<l&&(l=Te[f]);if(l>n)return n}}return Te.length=u,$t.length=u,n!==void 0&&D>n?n:D}function In(t,e,r){if(!Array.isArray(e)||e.length===0)return;let n=r?.maxDistance,o=t.length;for(let s of e)if(s===t)return s;if(n===0)return;let u,i=Number.POSITIVE_INFINITY,a=new Set;for(let s of e){if(a.has(s))continue;a.add(s);let D=Math.abs(s.length-o);if(D>=i||n!==void 0&&D>n)continue;let c=Number.isFinite(i)?n===void 0?i:Math.min(i,n):n,p=c===void 0?lt(t,s):lt(t,s,{maxDistance:c});if(n!==void 0&&p>n)continue;let f=p;if(c!==void 0&&p===c&&c===n&&(f=lt(t,s)),f<i&&(i=f,u=s,i===0))break}if(!(n!==void 0&&i>n))return u}var ft=(t,e,{descriptor:r,logger:n,schemas:o})=>{let u=[`Ignored unknown option ${G.yellow(r.pair({key:t,value:e}))}.`],i=In(t,Object.keys(o),{maxDistance:3});i&&u.push(`Did you mean ${G.blue(r.key(i))}?`),n.warn(u.join(" "))};var Uo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Vo(t,e){let r=new t(e),n=Object.create(r);for(let o of Uo)o in e&&(n[o]=Wo(e[o],r,O.prototype[o].length));return n}var O=class{static create(e){return Vo(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,r){return!1}deprecated(e,r){return!1}forward(e,r){}redirect(e,r){}overlap(e,r,n){return e}preprocess(e,r){return e}postprocess(e,r){return xe}};function Wo(t,e,r){return typeof t=="function"?(...n)=>t(...n.slice(0,r-1),e,...n.slice(r-1)):()=>t}var pt=class extends O{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,r){return r.schemas[this._sourceName].validate(e,r)}redirect(e,r){return this._sourceName}};var mt=class extends O{expected(){return"anything"}validate(){return!0}};var dt=class extends O{constructor({valueSchema:e,name:r=e.name,...n}){super({...n,name:r}),this._valueSchema=e}expected(e){let{text:r,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,r){if(!Array.isArray(e))return!1;let n=[];for(let o of e){let u=r.normalizeValidateResult(this._valueSchema.validate(o,r),o);u!==!0&&n.push(u.value)}return n.length===0?!0:{value:n}}deprecated(e,r){let n=[];for(let o of e){let u=r.normalizeDeprecatedResult(this._valueSchema.deprecated(o,r),o);u!==!1&&n.push(...u.map(({value:i})=>({value:[i]})))}return n}forward(e,r){let n=[];for(let o of e){let u=r.normalizeForwardResult(this._valueSchema.forward(o,r),o);n.push(...u.map(Rn))}return n}redirect(e,r){let n=[],o=[];for(let u of e){let i=r.normalizeRedirectResult(this._valueSchema.redirect(u,r),u);"remain"in i&&n.push(i.remain),o.push(...i.redirect.map(Rn))}return n.length===0?{redirect:o}:{redirect:o,remain:n}}overlap(e,r){return e.concat(r)}};function Rn({from:t,to:e}){return{from:[t],to:e}}var Ft=class extends O{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function vn(t,e){let r=Object.create(null);for(let n of t){let o=n[e];if(r[o])throw new Error(`Duplicate ${e} ${JSON.stringify(o)}`);r[o]=n}return r}function Mn(t,e){let r=new Map;for(let n of t){let o=n[e];if(r.has(o))throw new Error(`Duplicate ${e} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Yn(){let t=Object.create(null);return e=>{let r=JSON.stringify(e);return t[r]?!0:(t[r]=!0,!1)}}function jn(t,e){let r=[],n=[];for(let o of t)e(o)?r.push(o):n.push(o);return[r,n]}function Un(t){return t===Math.floor(t)}function Vn(t,e){if(t===e)return 0;let r=typeof t,n=typeof e,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(t)-Number(e):t.localeCompare(e)}function Wn(t){return(...e)=>{let r=t(...e);return typeof r=="string"?new Error(r):r}}function zt(t){return t===void 0?{}:t}function Gt(t){if(typeof t=="string")return{text:t};let{text:e,list:r}=t;return $o((e||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:e,list:{title:r.title,values:r.values.map(Gt)}}:{text:e}}function Kt(t,e){return t===!0?!0:t===!1?{value:e}:t}function Ht(t,e,r=!1){return t===!1?!1:t===!0?r?!0:[{value:e}]:"value"in t?[t]:t.length===0?!1:t}function Ln(t,e){return typeof t=="string"||"key"in t?{from:e,to:t}:"from"in t?{from:t.from,to:t.to}:{from:e,to:t.to}}function Et(t,e){return t===void 0?[]:Array.isArray(t)?t.map(r=>Ln(r,e)):[Ln(t,e)]}function Jt(t,e){let r=Et(typeof t=="object"&&"redirect"in t?t.redirect:t,e);return r.length===0?{remain:e,redirect:r}:typeof t=="object"&&"remain"in t?{remain:t.remain,redirect:r}:{redirect:r}}function $o(t,e){if(!t)throw new Error(e)}var Ct=class extends O{constructor(e){super(e),this._choices=Mn(e.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:e}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(Vn).map(e.value),n=r.slice(0,-2),o=r.slice(-2);return{text:n.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(e){return this._choices.has(e)}deprecated(e){let r=this._choices.get(e);return r&&r.deprecated?{value:e}:!1}forward(e){let r=this._choices.get(e);return r?r.forward:void 0}redirect(e){let r=this._choices.get(e);return r?r.redirect:void 0}};var ht=class extends O{expected(){return"a number"}validate(e,r){return typeof e=="number"}};var gt=class extends ht{expected(){return"an integer"}validate(e,r){return r.normalizeValidateResult(super.validate(e,r),e)===!0&&Un(e)}};var Ye=class extends O{expected(){return"a string"}validate(e){return typeof e=="string"}};var $n=se,zn=ft,Gn=Pn,Kn=wn;var yt=class{constructor(e,r){let{logger:n=console,loggerPrintWidth:o=80,descriptor:u=$n,unknown:i=zn,invalid:a=Gn,deprecated:s=Kn,missing:D=()=>!1,required:c=()=>!1,preprocess:p=m=>m,postprocess:f=()=>xe}=r||{};this._utils={descriptor:u,logger:n||{warn:()=>{}},loggerPrintWidth:o,schemas:vn(e,"name"),normalizeDefaultResult:zt,normalizeExpectedResult:Gt,normalizeDeprecatedResult:Ht,normalizeForwardResult:Et,normalizeRedirectResult:Jt,normalizeValidateResult:Kt},this._unknownHandler=i,this._invalidHandler=Wn(a),this._deprecatedHandler=s,this._identifyMissing=(m,l)=>!(m in l)||D(m,l),this._identifyRequired=c,this._preprocess=p,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Yn()}normalize(e){let r={},o=[this._preprocess(e,this._utils)],u=()=>{for(;o.length!==0;){let i=o.shift(),a=this._applyNormalization(i,r);o.push(...a)}};u();for(let i of Object.keys(this._utils.schemas)){let a=this._utils.schemas[i];if(!(i in r)){let s=zt(a.default(this._utils));"value"in s&&o.push({[i]:s.value})}}u();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let a=this._utils.schemas[i],s=r[i],D=a.postprocess(s,this._utils);D!==xe&&(this._applyValidation(D,i,a),r[i]=D)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(e,r){let n=[],{knownKeys:o,unknownKeys:u}=this._partitionOptionKeys(e);for(let i of o){let a=this._utils.schemas[i],s=a.preprocess(e[i],this._utils);this._applyValidation(s,i,a);let D=({from:m,to:l})=>{n.push(typeof l=="string"?{[l]:m}:{[l.key]:l.value})},c=({value:m,redirectTo:l})=>{let F=Ht(a.deprecated(m,this._utils),s,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,l,this._utils));else for(let{value:d}of F){let E={key:i,value:d};if(!this._hasDeprecationWarned(E)){let C=typeof l=="string"?{key:l,value:d}:l;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};Et(a.forward(s,this._utils),s).forEach(D);let f=Jt(a.redirect(s,this._utils),s);if(f.redirect.forEach(D),"remain"in f){let m=f.remain;r[i]=i in r?a.overlap(r[i],m,this._utils):m,c({value:m})}for(let{from:m,to:l}of f.redirect)c({value:m,redirectTo:l})}for(let i of u){let a=e[i];this._applyUnknownHandler(i,a,r,(s,D)=>{n.push({[s]:D})})}return n}_applyRequiredCheck(e){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,e)&&this._identifyRequired(r))throw this._invalidHandler(r,ct,this._utils)}_partitionOptionKeys(e){let[r,n]=jn(Object.keys(e).filter(o=>!this._identifyMissing(o,e)),o=>o in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(e,r,n){let o=Kt(n.validate(e,this._utils),e);if(o!==!0)throw this._invalidHandler(r,o.value,this._utils)}_applyUnknownHandler(e,r,n,o){let u=this._unknownHandler(e,r,this._utils);if(u)for(let i of Object.keys(u)){if(this._identifyMissing(i,u))continue;let a=u[i];i in this._utils.schemas?o(i,a):n[i]=a}}_applyPostprocess(e){let r=this._postprocess(e,this._utils);if(r!==xe){if(r.delete)for(let n of r.delete)delete e[n];if(r.override){let{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(r.override);for(let u of n){let i=r.override[u];this._applyValidation(i,u,this._utils.schemas[u]),e[u]=i}for(let u of o){let i=r.override[u];this._applyUnknownHandler(u,i,e,(a,s)=>{let D=this._utils.schemas[a];this._applyValidation(s,a,D),e[a]=s})}}}}};var qt;function zo(t,e,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:u,descriptor:i}={}){if(n){if(!u)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=se;let a=o?Array.isArray(o)?(f,m)=>o.includes(f)?{[f]:m}:void 0:(f,m)=>({[f]:m}):(f,m,l)=>{let{_:F,...d}=l.schemas;return ft(f,m,{...l,schemas:d})},s=Go(e,{isCLI:n,FlagSchema:u}),D=new yt(s,{logger:r,unknown:a,descriptor:i}),c=r!==!1;c&&qt&&(D._hasDeprecationWarned=qt);let p=D.normalize(t);return c&&(qt=D._hasDeprecationWarned),p}function Go(t,{isCLI:e,FlagSchema:r}){let n=[];e&&n.push(mt.create({name:"_"}));for(let o of t)n.push(Ko(o,{isCLI:e,optionInfos:t,FlagSchema:r})),o.alias&&e&&n.push(pt.create({name:o.alias,sourceName:o.name}));return n}function Ko(t,{isCLI:e,optionInfos:r,FlagSchema:n}){let{name:o}=t,u={name:o},i,a={};switch(t.type){case"int":i=gt,e&&(u.preprocess=Number);break;case"string":i=Ye;break;case"choice":i=Ct,u.choices=t.choices.map(s=>s?.redirect?{...s,redirect:{to:{key:t.name,value:s.redirect}}}:s);break;case"boolean":i=Ft;break;case"flag":i=n,u.flags=r.flatMap(s=>[s.alias,s.description&&s.name,s.oppositeDescription&&`no-${s.name}`].filter(Boolean));break;case"path":i=Ye;break;default:throw new Error(`Unexpected type ${t.type}`)}if(t.exception?u.validate=(s,D,c)=>t.exception(s)||D.validate(s,c):u.validate=(s,D,c)=>s===void 0||D.validate(s,c),t.redirect&&(a.redirect=s=>s?{to:typeof t.redirect=="string"?t.redirect:{key:t.redirect.option,value:t.redirect.value}}:void 0),t.deprecated&&(a.deprecated=!0),e&&!t.array){let s=u.preprocess||(D=>D);u.preprocess=(D,c,p)=>c.preprocess(s(Array.isArray(D)?A(0,D,-1):D),p)}return t.array?dt.create({...e?{preprocess:s=>Array.isArray(s)?s:[s]}:{},...a,valueSchema:i.create(u)}):i.create({...u,...a})}var Hn=zo;var Ho=Array.prototype.findLast??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return r}},Jo=Q("findLast",function(){if(Array.isArray(this))return Ho}),Xt=Jo;var Jn=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Qt=[];function qo(t){return!!t?.[Jn]}var me=qo;var qn=new Set(["yaml","toml"]),je=({node:t})=>me(t)&&qn.has(t.language);async function Zt(t,e,r,n){let{node:o}=r,{language:u}=o;if(!qn.has(u))return;let i=o.value.trim(),a;if(i){let s=u==="yaml"?u:Dt(n,{language:u});if(!s)return;a=i?await t(i,{parser:s}):""}else a=i;return Qe([o.startDelimiter,o.explicitLanguage??"",$,a,a?$:"",o.endDelimiter])}function Xo(t,e){return je({node:t})&&(delete e.end,delete e.raw,delete e.value),e}var er=Xo;function Qo({node:t}){return t.raw}var tr=Qo;var Xn=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Zo=t=>Object.keys(t).filter(e=>!Xn.has(e));function ei(t,e){let r=t?n=>t(n,Xn):Zo;return e?new Proxy(r,{apply:(n,o,u)=>me(u[0])?Qt:Reflect.apply(n,o,u)}):r}var rr=ei;function nr(t,e){if(!e)throw new Error("parserName is required.");let r=Xt(0,t,o=>o.parsers&&pe(o.parsers,e));if(r)return r;let n=`Couldn't resolve parser "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new ve(n)}function Qn(t,e){if(!e)throw new Error("astFormat is required.");let r=Xt(0,t,o=>o.printers&&pe(o.printers,e));if(r)return r;let n=`Couldn't find plugin for AST format "${e}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new ve(n)}function Ue({plugins:t,parser:e}){let r=nr(t,e);return ur(r,e)}function ur(t,e){let r=t.parsers[e];return typeof r=="function"?r():r}async function Zn(t,e){let r=t.printers[e],n=typeof r=="function"?await r():r;return ni(n)}function ti(t){let{features:e,getVisitorKeys:r,embed:n,massageAstNode:o,print:u,...i}=t;e=si(e);let a=e.experimental_frontMatterSupport;r=rr(r,a.massageAstNode||a.embed||a.print);let s=o;o&&a.massageAstNode&&(s=new Proxy(o,{apply(f,m,l){return er(...l),Reflect.apply(f,m,l)}}));let D=n;if(n){let f;D=new Proxy(n,{get(m,l,F){return l==="getVisitorKeys"?(f??(f=n.getVisitorKeys?rr(n.getVisitorKeys,a.massageAstNode||a.embed):r),f):Reflect.get(m,l,F)},apply:(m,l,F)=>a.embed&&je(...F)?Zt:Reflect.apply(m,l,F)})}let c=u;return a.print&&(c=new Proxy(u,{apply(f,m,l){let[F]=l;return me(F.node)?tr(F):Reflect.apply(f,m,l)}})),{features:e,getVisitorKeys:r,embed:D,massageAstNode:s,print:c,...i}}var ri=new WeakMap;function ni(t){return Ee(ri,t,ti)}var ui=["clean","embed","print"],oi=Object.fromEntries(ui.map(t=>[t,!1]));function ii(t){return{...oi,...t}}function si(t){return{experimental_avoidAstMutation:!1,...t,experimental_frontMatterSupport:ii(t?.experimental_frontMatterSupport)}}var eu={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function ai(t,e={}){let r={...t};if(!r.parser){if(!r.filepath)throw new Me("No parser and no file path given, couldn't infer a parser.");if(r.parser=Dt(r,{physicalFile:r.filepath}),!r.parser)throw new Me(`No parser could be inferred for file "${r.filepath}".`)}let n=at({plugins:t.plugins,showDeprecated:!0}).options,o={...eu,...Object.fromEntries(n.filter(p=>p.default!==void 0).map(p=>[p.name,p.default]))},u=nr(r.plugins,r.parser),i=await ur(u,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let a=u.printers?.[i.astFormat]?u:Qn(r.plugins,i.astFormat),s=await Zn(a,i.astFormat);r.printer=s,r.getVisitorKeys=s.getVisitorKeys;let D=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,p])=>p!==void 0)):{},c={...o,...D};for(let[p,f]of Object.entries(c))r[p]??(r[p]=f);return r.parser==="json"&&(r.trailingComma="none"),Hn(r,n,{passThrough:Object.keys(eu),...e})}var ae=ai;var tu=/\r\n|[\n\r\u2028\u2029]/;function Di(t,e,r,n){let o={column:null,line:-1,...t.start},u={...o,...t.end},{linesAbove:i=2,linesBelow:a=3}=r||{},s=o.line-n,D=o.column,c=u.line-n,p=u.column,f=Math.max(s-(i+1),0),m=Math.min(e.length,c+a);s===-1&&(f=0),c===-1&&(m=e.length);let l=c-s,F={};if(l)for(let d=0;d<=l;d++){let E=d+s;if(D==null)F[E]=!0;else if(d===0){let C=e[E-1].length;F[E]=[D,C-D]}else if(d===l)F[E]=[0,p];else{let C=e[E-1].length;F[E]=[0,C]}}else if(D===p)D!=null?F[s]=[D,0]:F[s]=!0;else{let d=D??0,E=p??d;F[s]=[d,E-d]}return{start:f,end:m,markerLines:F}}function ru(t,e,r={},n){let{defs:o,highlight:u}=n||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},i=(r.startLine||1)-1,a=t.split(tu),{start:s,end:D,markerLines:c}=Di(e,a,r,i),p=e.start&&typeof e.start.column=="number",f=String(D+i).length,l=u(t).split(tu,D).slice(s,D).map((F,d)=>{let E=s+1+d,g=` ${` ${E+i}`.slice(-f)} |`,_=c[E],P=!c[E+1];if(_){let x="";if(Array.isArray(_)){let N=F.slice(0,_[0]).replace(/[^\t]/g," "),q=_[1]||1;x=[`
`,o.gutter(g.replace(/\d/g," "))," ",N,o.marker("^").repeat(q)].join(""),P&&r.message&&(x+=" "+o.message(r.message))}return[o.marker(">"),o.gutter(g),F.length>0?` ${F}`:"",x].join("")}else return` ${o.gutter(g)}${F.length>0?` ${F}`:""}`}).join(`
`);return r.message&&!p&&(l=`${" ".repeat(f+1)}${r.message}
${l}`),o.reset(l)}function nu(t,e,r={}){return ru(t,e,r)}async function ci(t,e){let r=await Ue(e),n=r.preprocess?await r.preprocess(t,e):t;e.originalText=n;let o;try{o=await r.parse(n,e,e)}catch(u){li(u,t)}return{text:n,ast:o}}function li(t,e){let{loc:r}=t;if(r){let{start:n,end:o}=r;n&&(n={line:n.line,column:n.column-1}),o&&(o={line:o.line,column:o.column-1});let u=nu(e,{start:n,end:o},{highlightCode:!0});t.message+=`
`+u,t.codeFrame=u}throw t}var de=ci;async function uu(t,e,r,n,o){if(r.embeddedLanguageFormatting!=="auto")return;let{printer:u}=r,{embed:i}=u;if(!i)return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:a}=u,{getVisitorKeys:s}=i,D=[];f();let c=t.stack;for(let{print:m,node:l,pathStack:F}of D)try{t.stack=F;let d=await m(p,e,t,r);d&&o.set(l,d)}catch(d){if(globalThis.PRETTIER_DEBUG)throw d}t.stack=c;function p(m,l){return fi(m,l,r,n)}function f(){let{node:m}=t;if(m===null||typeof m!="object"||a?.(t))return;for(let F of s(m))Array.isArray(m[F])?t.each(f,F):t.call(f,F);let l=i(t,r);if(l){if(typeof l=="function"){D.push({print:l,node:m,pathStack:[...t.stack]});return}o.set(m,l)}}}async function fi(t,e,r,n){let o=await ae({...r,...e,parentParser:r.parser,originalText:t,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:u}=await de(t,o),i=await n(u,o);return He(i)}function pi(t,e,r,n){let{originalText:o,[oe]:u,locStart:i,locEnd:a,[Symbol.for("printedComments")]:s}=e,{node:D}=t,c=i(D),p=a(D);for(let m of u)i(m)>=c&&a(m)<=p&&s.add(m);let{printPrettierIgnored:f}=e.printer;return f?f(t,e,r,n):o.slice(c,p)}var ou=pi;async function Ve(t,e){({ast:t}=await or(t,e));let r=new Map,n=new un(t),o=hn(e),u=new Map;await uu(n,a,e,Ve,u);let i=await iu(n,e,a,void 0,u);if(Cn(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[te,i];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[i,te]}return i;function a(D,c){return D===void 0||D===n?s(c):Array.isArray(D)?n.call(()=>s(c),...D):n.call(()=>s(c),D)}function s(D){o(n);let c=n.node;if(c==null)return"";let p=ye(c)&&D===void 0;if(p&&r.has(c))return r.get(c);let f=iu(n,e,a,D,u);return p&&r.set(c,f),f}}function iu(t,e,r,n,o){let{node:u}=t,{printer:i}=e,a;switch(i.hasPrettierIgnore?.(t)?a=ou(t,e,r,n):o.has(u)?a=o.get(u):a=i.print(t,e,r,n),u){case e.cursorNode:a=Ce(a,s=>[te,s,te]);break;case e.nodeBeforeCursor:a=Ce(a,s=>[s,te]);break;case e.nodeAfterCursor:a=Ce(a,s=>[te,s]);break}return i.printComment&&ut(u.comments)&&!i.willPrintOwnComments?.(t,e)&&(a=En(t,a,e)),a}async function or(t,e){let r=t.comments??[];e[oe]=r,e[Symbol.for("printedComments")]=new Set,pn(t,e);let{printer:{preprocess:n}}=e;return t=n?await n(t,e):t,{ast:t,comments:r}}function mi(t,e){let{cursorOffset:r,locStart:n,locEnd:o,getVisitorKeys:u}=e,i=m=>n(m)<=r&&o(m)>=r,a=t,s=[t];for(let m of an(t,{getVisitorKeys:u,filter:i}))s.push(m),a=m;if(Dn(a,{getVisitorKeys:u}))return{cursorNode:a};let D,c,p=-1,f=Number.POSITIVE_INFINITY;for(;s.length>0&&(D===void 0||c===void 0);){a=s.pop();let m=D!==void 0,l=c!==void 0;for(let F of Ae(a,{getVisitorKeys:u})){if(!m){let d=o(F);d<=r&&d>p&&(D=F,p=d)}if(!l){let d=n(F);d>=r&&d<f&&(c=F,f=d)}}}return{nodeBeforeCursor:D,nodeAfterCursor:c}}var ir=mi;function di(t,e){let{printer:r}=e,n=r.massageAstNode;if(!n)return t;let{getVisitorKeys:o}=r,{ignoredProperties:u}=n;return i(t);function i(a,s){if(!ye(a))return a;if(Array.isArray(a))return a.map(f=>i(f,s)).filter(Boolean);let D={},c=new Set(o(a));for(let f in a)!pe(a,f)||u?.has(f)||(c.has(f)?D[f]=i(a[f],a):D[f]=a[f]);let p=n(a,D,s);if(p!==null)return p??D}}var su=di;var Fi=Array.prototype.findLastIndex??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return e}return-1},Ei=Q("findLastIndex",function(){if(Array.isArray(this))return Fi}),au=Ei;function h(t){let e=new Set(t);return r=>e.has(r?.type)}var hf=h(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),gf=h(["SatisfiesExpression","TSSatisfiesExpression"]),yf=h(["TSUnionType","UnionTypeAnnotation"]),_f=h(["TSIntersectionType","IntersectionTypeAnnotation"]),Af=h(["TupleTypeAnnotation","TSTupleType"]),xf=h(["TSConditionalType","ConditionalTypeAnnotation"]),Tf=h(["TSTemplateLiteralType","TemplateLiteralTypeAnnotation"]),Nf=h(["TSImportType","ImportType"]),Bf=h(["TSExternalModuleReference","ExternalModuleReference"]),wf=h(["TSTypeAliasDeclaration","TypeAlias"]),Sf=h(["ReturnStatement","ThrowStatement"]),Of=h(["ReturnStatement","ThrowStatement","YieldExpression","UnaryExpression"]),Pf=h(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Du=h(["TSExportAssignment","ExportAssignment"]),bf=h(["AbstractMethodDefinition","TSAbstractMethodDefinition"]),kf=h(["AbstractPropertyDefinition","TSAbstractPropertyDefinition"]),If=h(["TSParameterProperty","ParameterProperty"]),Rf=h(["TSNonNullExpression","NonNullExpression"]);var Lf=h(["ArrayExpression"]),vf=h(["ObjectExpression"]),Mf=h(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),Yf=h(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),jf=h(["FunctionExpression","ArrowFunctionExpression"]),Uf=h(["JSXElement","JSXFragment"]),Vf=h(["BinaryExpression","LogicalExpression","NGPipeExpression"]),Wf=h(["CallExpression","OptionalCallExpression"]),$f=h(["MemberExpression","OptionalMemberExpression"]),zf=h(["CallExpression","OptionalCallExpression","NewExpression"]),Gf=h(["CallExpression","OptionalCallExpression","NewExpression","ImportExpression"]),Kf=h(["ChainExpression","TSNonNullExpression","NonNullExpression"]),Hf=h(["TSArrayType","ArrayTypeAnnotation"]),Jf=h(["TSTypeParameterInstantiation","TypeParameterInstantiation"]),qf=h(["TSTypeAnnotation","TypeAnnotation"]),Xf=h(["TSModuleDeclaration","DeclareModule","DeclareNamespace"]),Qf=h(["TSConstructorType","ConstructorTypeAnnotation"]),Zf=h(["ClassDeclaration","ClassExpression"]),ep=h(["ImportNamespaceSpecifier","ExportNamespaceSpecifier"]),tp=h(["TSEnumDeclaration","EnumDeclaration","DeclareEnum"]),rp=h(["TSEnumBody","EnumBody"]);function Ci(t,e){return e=new Set(e),t.find(r=>lu.has(r.type)&&e.has(r))}function cu(t){let e=au(0,t,r=>r.type!=="Program"&&r.type!=="File");return e===-1?t:t.slice(0,e+1)}function hi(t,e,r){let{locStart:n,locEnd:o}=r,[u,...i]=t,[a,...s]=e;if(u===a)return[u,a];let D=n(u);for(let p of cu(s))if(n(p)>=D)a=p;else break;let c=o(a);for(let p of cu(i)){if(o(p)<=c)ar(r,p)&&(u=p);else break;if(u===a)break}return[u,a]}function sr(t,e,r,n,o=[],u,i){let{locStart:a,locEnd:s}=i,D=a(t),c=s(t);if(e>c||e<D||u==="rangeEnd"&&e===D||u==="rangeStart"&&e===c)return;let p=[t,...o],f=st(t,p,{cache:Vt,locStart:a,locEnd:s,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes});for(let m of f){let l=sr(m,e,r,n,p,u,i);if(l)return l}if(n(t,o[0]))return p}function gi(t,e){return e?.type==="ForStatement"&&e.init===t||(e?.type==="ForInStatement"||e?.type==="ForOfStatement")&&e.left===t}function yi(t,e){let{type:r}=t;return e?.type!=="DeclareExportDeclaration"&&r!=="TypeParameterDeclaration"&&r!=="TSTypeParameterDeclaration"&&!(r==="VariableDeclaration"&&gi(t,e))&&(r==="Directive"||r==="TypeAlias"||Du(t)||r.startsWith("Declare")||r.startsWith("TSDeclare")||r.endsWith("Statement")||r.endsWith("Declaration"))}var lu=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),_i=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function ar(t,e,r){if(!e)return!1;switch(t.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"yuku":case"yuku-ts":case"__babel_estree":return yi(e,r);case"json":case"json5":case"jsonc":case"json-stringify":return lu.has(e.type);case"graphql":return _i.has(e.kind);case"vue":return e.tag!=="root"}return!1}function fu(t,e,r){let{rangeStart:n,rangeEnd:o}=e;I(o>n);let u=t.slice(n,o).search(/\S/),i=u===-1;if(!i)for(n+=u;o>n&&!/\S/.test(t[o-1]);--o);let a=e.printer.features?.experimental_locForRangeFormat??e,s=sr(r,n,e,(l,F)=>ar(e,l,F),[],"rangeStart",a);if(!s)return;let D=i?s:sr(r,o,e,l=>ar(e,l),[],"rangeEnd",a);if(!D)return;let c,p;if(r.type==="JsonRoot"){let l=Ci(s,D);c=l,p=l}else[c,p]=hi(s,D,e);let{locStart:f,locEnd:m}=a;return[Math.min(f(c),f(p)),Math.max(m(c),m(p))]}var pu=Symbol("cursor");async function Fu(t,e,r=0){if(!t||t.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await de(t,e);e.cursorOffset>=0&&(e={...e,...ir(n,e)});let u=await Ve(n,e,r);r>0&&(u=Ze([$,u],r,e.tabWidth));let i=he(u,e);if(r>0){let s=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(s),i.cursorNodeStart<0&&(i.cursorNodeStart=0,i.cursorNodeText=i.cursorNodeText.trimStart()),i.cursorNodeStart+i.cursorNodeText.length>s.length&&(i.cursorNodeText=i.cursorNodeText.trimEnd())),i.formatted=s+Se(e.endOfLine)}let a=e[oe];if(e.cursorOffset>=0){let s,D,c,p;if((e.cursorNode||e.nodeBeforeCursor||e.nodeAfterCursor)&&i.cursorNodeText)if(c=i.cursorNodeStart,p=i.cursorNodeText,e.cursorNode)s=e.locStart(e.cursorNode),D=o.slice(s,e.locEnd(e.cursorNode));else{if(!e.nodeBeforeCursor&&!e.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");s=e.nodeBeforeCursor?e.locEnd(e.nodeBeforeCursor):0;let E=e.nodeAfterCursor?e.locStart(e.nodeAfterCursor):o.length;D=o.slice(s,E)}else s=0,D=o,c=0,p=i.formatted;let f=e.cursorOffset-s;if(D===p)return{formatted:i.formatted,cursorOffset:c+f,comments:a};let m=D.split("");m.splice(f,0,pu);let l=p.split(""),F=Nt(m,l),d=c;for(let E of F)if(E.removed){if(E.value.includes(pu))break}else d+=E.count;return{formatted:i.formatted,cursorOffset:d,comments:a}}return{formatted:i.formatted,cursorOffset:-1,comments:a}}async function Ai(t,e){let{ast:r,text:n}=await de(t,e),[o,u]=fu(n,e,r)??[0,0],i=n.slice(o,u),a=Math.min(o,n.lastIndexOf(`
`,o)+1),s=n.slice(a,o).match(/^\s*/)[0],D=ge(s,e.tabWidth),c=await Fu(i,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>o&&e.cursorOffset<=u?e.cursorOffset-o:-1,endOfLine:"lf"},D),p=c.formatted.trimEnd(),{cursorOffset:f}=e;f>u?f+=p.length-i.length:c.cursorOffset>=0&&(f=c.cursorOffset+o);let m=n.slice(0,o)+p+n.slice(u);if(e.endOfLine!=="lf"){let l=Se(e.endOfLine);f>=0&&l===`\r
`&&(f+=wt(m.slice(0,f),`
`)),m=ue(0,m,`
`,l)}return{formatted:m,cursorOffset:f,comments:c.comments}}function Dr(t,e,r){return typeof e!="number"||Number.isNaN(e)||e<0||e>t.length?r:e}function mu(t,e){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=e;return r=Dr(t,r,-1),n=Dr(t,n,0),o=Dr(t,o,t.length),{...e,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Eu(t,e){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u}=mu(t,e),i=rn(t);if(i&&(t=t.slice(1),r--,n--,o--),u==="auto"&&(u=gr(t)),t.includes("\r")){let a=s=>wt(t.slice(0,Math.max(s,0)),`\r
`);r-=a(r),n-=a(n),o-=a(o),t=yr(t)}return{hasBom:i,text:t,options:mu(t,{...e,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u})}}async function du(t,e){let r=await Ue(e);return!r.hasPragma||r.hasPragma(t)}async function xi(t,e){return(await Ue(e)).hasIgnorePragma?.(t)}async function cr(t,e){let{hasBom:r,text:n,options:o}=Eu(t,await ae(e));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await du(n,o)||o.checkIgnorePragma&&await xi(n,o))return{formatted:t,cursorOffset:e.cursorOffset,comments:[]};let u;return o.rangeStart>0||o.rangeEnd<n.length?u=await Ai(n,o):(!o.requirePragma&&o.insertPragma&&o.printer.insertPragma&&!await du(n,o)&&(n=o.printer.insertPragma(n)),u=await Fu(n,o)),r&&(u.formatted=nn(u.formatted),u.cursorOffset>=0&&u.cursorOffset++),u}async function Cu(t,e,r){let{text:n,options:o}=Eu(t,await ae(e)),u=await de(n,o);return r&&(r.preprocessForPrint&&(u.ast=await or(u.ast,o)),r.massage&&(u.ast=su(u.ast,o))),u}async function hu(t,e){e=await ae(e);let r=await Ve(t,e);return he(r,e)}async function gu(t,e){let r=Wr(t),{formatted:n}=await cr(r,{...e,parser:"__js_expression"});return n}async function yu(t,e){e=await ae(e);let{ast:r}=await de(t,e);return e.cursorOffset>=0&&(e={...e,...ir(r,e)}),Ve(r,e)}async function _u(t,e){return he(t,await ae(e))}var lr={};xt(lr,{builders:()=>Ni,printer:()=>Bi,utils:()=>wi});var Ni={join:Je,line:et,softline:jr,hardline:$,literalline:qe,group:Ot,conditionalGroup:Lr,fill:Rr,lineSuffix:Ie,lineSuffixBoundary:Ur,cursor:te,breakParent:ce,ifBreak:vr,trim:Vr,indent:ie,indentIfBreak:Mr,align:De,addAlignmentToDoc:Ze,markAsRoot:Qe,dedentToRoot:kr,dedent:Ir,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:Pt,label:Yr,concat:t=>t},Bi={printDocToString:he},wi={willBreak:Nr,traverseDoc:Oe,findInDoc:Ke,mapDoc:be,removeLines:wr,stripTrailingHardline:He,replaceEndOfLine:Sr,canBreak:Or};var Au="3.10.1";var pr={};xt(pr,{addDanglingComment:()=>ne,addLeadingComment:()=>le,addTrailingComment:()=>fe,getAlignmentSize:()=>ge,getIndentSize:()=>xu,getMaxContinuousCount:()=>Tu,getNextNonSpaceNonCommentCharacter:()=>Nu,getNextNonSpaceNonCommentCharacterIndex:()=>Ui,getPreferredQuote:()=>Su,getStringWidth:()=>Re,hasNewline:()=>J,hasNewlineInRange:()=>Ou,hasSpaces:()=>Pu,isNextLineEmpty:()=>Gi,isNextLineEmptyAfterIndex:()=>_t,isPreviousLineEmpty:()=>Wi,makeString:()=>zi,skip:()=>_e,skipEverythingButNewLine:()=>it,skipInlineComment:()=>Ne,skipNewline:()=>z,skipSpaces:()=>U,skipToLineEnd:()=>ot,skipTrailingComment:()=>Be,skipWhitespace:()=>on});function Si(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let r=e+2;r<t.length;++r)if(t.charAt(r)==="*"&&t.charAt(r+1)==="/")return r+2}return e}var Ne=Si;function Oi(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?it(t,e):e}var Be=Oi;function Pi(t,e){let r=null,n=e;for(;n!==r;)r=n,n=U(t,n),n=Ne(t,n),n=Be(t,n),n=z(t,n);return n}var We=Pi;function bi(t,e){let r=null,n=e;for(;n!==r;)r=n,n=ot(t,n),n=Ne(t,n),n=U(t,n);return n=Be(t,n),n=z(t,n),n!==!1&&J(t,n)}var _t=bi;function ki(t,e){let r=t.lastIndexOf(`
`);return r===-1?0:ge(t.slice(r+1).match(/^[\t ]*/)[0],e)}var xu=ki;function fr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ii(t,e){let r=t.matchAll(new RegExp(`(?:${fr(e)})+`,"g"));return r.reduce||(r=[...r]),r.reduce((n,[o])=>Math.max(n,o.length),0)/e.length}var Tu=Ii;function Ri(t,e){let r=We(t,e);return r===!1?"":t.charAt(r)}var Nu=Ri;var Bu=Object.freeze({character:"'",codePoint:39}),wu=Object.freeze({character:'"',codePoint:34}),Li=Object.freeze({preferred:Bu,alternate:wu}),vi=Object.freeze({preferred:wu,alternate:Bu});function Su(t,e){let{preferred:r,alternate:n}=e===!0||e==="'"?Li:vi,{length:o}=t,u=0,i=0;for(let a=0;a<o;a++){let s=t.charCodeAt(a);s===r.codePoint?u++:s===n.codePoint&&i++}return(u>i?n:r).character}function Mi(t,e,r){for(let n=e;n<r;++n)if(t.charAt(n)===`
`)return!0;return!1}var Ou=Mi;function Yi(t,e,r={}){return U(t,r.backwards?e-1:e,r)!==e}var Pu=Yi;function ji(t,e,r){return We(t,r(e))}function Ui(t,e){return arguments.length===2||typeof e=="number"?We(t,e):ji(...arguments)}function Vi(t,e,r){return Le(t,r(e))}function Wi(t,e){return arguments.length===2||typeof e=="number"?Le(t,e):Vi(...arguments)}function $i(t,e,r){return _t(t,r(e))}function zi(t,e,r){let n=e==='"'?"'":'"',u=ue(0,t,/\\(.)|(["'])/gs,(i,a,s)=>a===n?a:s===e?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return e+u+e}function Gi(t,e){return arguments.length===2||typeof e=="number"?_t(t,e):$i(...arguments)}function Fe(t,e=1){return async(...r)=>{let n=r[e]??{},o=n.plugins??[];return r[e]={...n,plugins:Array.isArray(o)?o:Object.values(o)},await t(...r)}}var bu=Fe(cr);async function ku(t,e){let{formatted:r}=await bu(t,{...e,cursorOffset:-1});return r}async function Ki(t,e){return await ku(t,e)===t}var Hi=Fe(at,0),Ji={parse:Fe(Cu),formatAST:Fe(hu),formatDoc:Fe(gu),printToDoc:Fe(yu),printDocToString:Fe(_u)};export{Ji as __debug,Ki as check,Iu as default,lr as doc,ku as format,bu as formatWithCursor,Hi as getSupportInfo,pr as util,Au as version};