prettier 3.8.4 → 3.9.0
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/THIRD-PARTY-NOTICES.md +2233 -279
- package/bin/prettier.cjs +5 -1
- package/doc.js +206 -142
- package/doc.mjs +206 -142
- package/index.cjs +103 -33
- package/index.d.ts +9 -2
- package/index.mjs +8056 -7776
- package/internal/experimental-cli-worker.mjs +22 -107
- package/internal/experimental-cli.mjs +3747 -3965
- package/internal/legacy-cli.mjs +488 -120
- package/package.json +11 -7
- package/plugins/acorn.js +11 -10
- package/plugins/acorn.mjs +11 -10
- package/plugins/angular.js +5 -4
- package/plugins/angular.mjs +5 -4
- package/plugins/babel.js +14 -13
- package/plugins/babel.mjs +14 -13
- package/plugins/estree.js +36 -36
- package/plugins/estree.mjs +36 -36
- package/plugins/flow.js +6 -19
- package/plugins/flow.mjs +6 -19
- package/plugins/glimmer.js +17 -17
- package/plugins/glimmer.mjs +15 -15
- package/plugins/graphql.js +14 -25
- package/plugins/graphql.mjs +14 -25
- package/plugins/html.js +18 -18
- package/plugins/html.mjs +18 -18
- package/plugins/markdown.js +63 -55
- package/plugins/markdown.mjs +63 -55
- package/plugins/meriyah.js +5 -4
- package/plugins/meriyah.mjs +5 -4
- package/plugins/postcss.js +40 -39
- package/plugins/postcss.mjs +40 -39
- package/plugins/typescript.js +16 -15
- package/plugins/typescript.mjs +16 -15
- package/plugins/yaml.js +136 -154
- package/plugins/yaml.mjs +149 -154
- package/standalone.js +28 -28
- package/standalone.mjs +28 -28
package/standalone.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
`,
|
|
3
|
-
`,
|
|
4
|
-
`);)
|
|
5
|
-
Expected it to be 'string' or 'object'.`;if(
|
|
6
|
-
Expected it to be ${
|
|
7
|
-
`)):u)}function Bo(e){if(e.type===_)return!0}function Hu(e){return Xe(e,Bo,!1)}function Ee(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var N=P,Ze=P,Xu=P,qu=P;function ae(e){return N(e),{type:I,contents:e}}function De(e,t){return qu(e),N(t),{type:k,contents:t,n:e}}function Qu(e){return De(Number.NEGATIVE_INFINITY,e)}function et(e){return De({type:"root"},e)}function Zu(e){return De(-1,e)}function tt(e,t,u){N(e);let r=e;if(t>0){for(let o=0;o<Math.floor(t/u);++o)r=ae(r);r=De(t%u,r),r=De(Number.NEGATIVE_INFINITY,r)}return r}var ce={type:T};var ee={type:U};function er(e){return Xu(e),{type:w,parts:e}}function Kt(e,t={}){return N(e),Ze(t.expandedStates,!0),{type:x,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function tr(e,t){return Kt(e[0],{...t,expandedStates:e})}function ur(e,t="",u={}){return N(e),t!==""&&N(t),{type:B,breakContents:e,flatContents:t,groupId:u.groupId}}function rr(e,t){return N(e),{type:R,contents:e,groupId:t.groupId,negate:t.negate}}function Ie(e,t){N(e),Ze(t);let u=[];for(let r=0;r<t.length;r++)r!==0&&u.push(e),u.push(t[r]);return u}function nr(e,t){return N(t),e?{type:O,label:e,contents:t}:t}var ut={type:_},or={type:_,soft:!0},ke={type:_,hard:!0},V=[ke,ce],Gt={type:_,hard:!0,literal:!0},Qe=[Gt,ce];function ve(e){return N(e),{type:L,contents:e}}var ar={type:M};var ir={type:v};function te(e){if(!e)return"";if(Array.isArray(e)){let t=[];for(let u of e)if(Array.isArray(u))t.push(...te(u));else{let r=te(u);r!==""&&t.push(r)}return t}return e.type===B?{...e,breakContents:te(e.breakContents),flatContents:te(e.flatContents)}:e.type===x?{...e,contents:te(e.contents),expandedStates:e.expandedStates?.map(te)}:e.type===w?{type:"fill",parts:e.parts.map(te)}:e.contents?{...e,contents:te(e.contents)}:e}function sr(e){let t=Object.create(null),u=new Set;return r(te(e));function r(n,a,s){if(typeof n=="string")return JSON.stringify(n);if(Array.isArray(n)){let i=n.map(r).filter(Boolean);return i.length===1?i[0]:`[${i.join(", ")}]`}if(n.type===_){let i=s?.[a+1]?.type===T;return n.literal?i?"literalline":"literallineWithoutBreakParent":n.hard?i?"hardline":"hardlineWithoutBreakParent":n.soft?"softline":"line"}if(n.type===T)return s?.[a-1]?.type===_&&s[a-1].hard?void 0:"breakParent";if(n.type===v)return"trim";if(n.type===I)return"indent("+r(n.contents)+")";if(n.type===k)return n.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+r(n.contents)+")":n.n<0?"dedent("+r(n.contents)+")":n.n.type==="root"?"markAsRoot("+r(n.contents)+")":"align("+JSON.stringify(n.n)+", "+r(n.contents)+")";if(n.type===B)return"ifBreak("+r(n.breakContents)+(n.flatContents?", "+r(n.flatContents):"")+(n.groupId?(n.flatContents?"":', ""')+`, { groupId: ${o(n.groupId)} }`:"")+")";if(n.type===R){let i=[];n.negate&&i.push("negate: true"),n.groupId&&i.push(`groupId: ${o(n.groupId)}`);let D=i.length>0?`, { ${i.join(", ")} }`:"";return`indentIfBreak(${r(n.contents)}${D})`}if(n.type===x){let i=[];n.break&&n.break!=="propagated"&&i.push("shouldBreak: true"),n.id&&i.push(`id: ${o(n.id)}`);let D=i.length>0?`, { ${i.join(", ")} }`:"";return n.expandedStates?`conditionalGroup([${n.expandedStates.map(f=>r(f)).join(",")}]${D})`:`group(${r(n.contents)}${D})`}if(n.type===w)return`fill([${n.parts.map(i=>r(i)).join(", ")}])`;if(n.type===L)return"lineSuffix("+r(n.contents)+")";if(n.type===M)return"lineSuffixBoundary";if(n.type===O)return`label(${JSON.stringify(n.label)}, ${r(n.contents)})`;if(n.type===U)return"cursor";throw new Error("Unknown doc type "+n.type)}function o(n){if(typeof n!="symbol")return JSON.stringify(String(n));if(n in t)return t[n];let a=n.description||"symbol";for(let s=0;;s++){let i=a+(s>0?` #${s}`:"");if(!u.has(i))return u.add(i),t[n]=`Symbol.for(${JSON.stringify(i)})`}}}var Dr=()=>/[#*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-\uDED8\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-\uDEF8](?:\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\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;function zt(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Jt(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var cr="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07";var To=/[^\x20-\x7F]/u,No=new Set(cr);function So(e){if(!e)return 0;if(!To.test(e))return e.length;e=e.replace(Dr(),u=>No.has(u)?" ":" ");let t=0;for(let u of e){let r=u.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=zt(r)||Jt(r)?2:1)}return t}var Re=So;var wo={type:0},Oo={type:1},Ht={value:"",length:0,queue:[],get root(){return Ht}};function fr(e,t,u){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],o="",n=0,a=0,s=0;for(let p of r)switch(p.type){case 0:f(),u.useTabs?i(1):D(u.tabWidth);break;case 3:{let{string:F}=p;f(),o+=F,n+=F.length;break}case 2:{let{width:F}=p;a+=1,s+=F;break}default:throw new Error(`Unexpected indent comment '${p.type}'.`)}return d(),{...e,value:o,length:n,queue:r};function i(p){o+=" ".repeat(p),n+=u.tabWidth*p}function D(p){o+=" ".repeat(p),n+=p}function f(){u.useTabs?l():d()}function l(){a>0&&i(a),c()}function d(){s>0&&D(s),c()}function c(){a=0,s=0}}function lr(e,t,u){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let r;return typeof t=="number"?t<0?r=Oo:r={type:2,width:t}:r={type:3,string:t},fr(e,r,u)}function dr(e,t){return fr(e,wo,t)}function Po(e){let t=0;for(let u=e.length-1;u>=0;u--){let r=e[u];if(r===" "||r===" ")t++;else break}return t}function Xt(e){let t=Po(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var W=Symbol("MODE_BREAK"),q=Symbol("MODE_FLAT"),qt=Symbol("DOC_FILL_PRINTED_LENGTH");function rt(e,t,u,r,o,n){if(u===Number.POSITIVE_INFINITY)return!0;let a=t.length,s=!1,i=[e],D="";for(;u>=0;){if(i.length===0){if(a===0)return!0;i.push(t[--a]);continue}let{mode:f,doc:l}=i.pop(),d=H(l);switch(d){case G:l&&(s&&(D+=" ",u-=1,s=!1),D+=l,u-=Re(l));break;case j:case w:{let c=d===j?l:l.parts,p=l[qt]??0;for(let F=c.length-1;F>=p;F--)i.push({mode:f,doc:c[F]});break}case I:case k:case R:case O:i.push({mode:f,doc:l.contents});break;case v:{let{text:c,count:p}=Xt(D);D=c,u+=p;break}case x:{if(n&&l.break)return!1;let c=l.break?W:f,p=l.expandedStates&&c===W?b(0,l.expandedStates,-1):l.contents;i.push({mode:c,doc:p});break}case B:{let p=(l.groupId?o[l.groupId]||q:f)===W?l.breakContents:l.flatContents;p&&i.push({mode:f,doc:p});break}case _:if(f===W||l.hard)return!0;l.soft||(s=!0);break;case L:r=!0;break;case M:if(r)return!1;break}}return!1}function Ce(e,t){let u=Object.create(null),r=t.printWidth,o=Se(t.endOfLine),n=0,a=[{indent:Ht,mode:W,doc:e}],s="",i=!1,D=[],f=[],l=[],d=[],c=0;for(Gu(e);a.length>0;){let{indent:m,mode:h,doc:E}=a.pop();switch(H(E)){case G:{let g=o!==`
|
|
8
|
-
`?
|
|
9
|
-
`,
|
|
10
|
-
`||
|
|
11
|
-
`)return
|
|
12
|
-
`)return
|
|
13
|
-
(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:
|
|
1
|
+
var Ru=Object.defineProperty;var yt=(t,e)=>{for(var r in e)Ru(t,r,{get:e[r],enumerable:!0})};var Su={};yt(Su,{__debug:()=>$i,check:()=>Vi,doc:()=>ar,format:()=>Pu,formatWithCursor:()=>Ou,getSupportInfo:()=>Wi,util:()=>fr,version:()=>gu});var X=(t,e)=>(r,n,...u)=>r|1&&n==null?void 0:(e.call(n)??n[t]).apply(n,u);var vu=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},Lu=X("replaceAll",function(){if(typeof this=="string")return vu}),ne=Lu;var Ne=class{diff(e,r,n={}){let u;typeof n=="function"?(u=n,n={}):"callback"in n&&(u=n.callback);let o=this.castInput(e,n),i=this.castInput(r,n),D=this.removeEmpty(this.tokenize(o,n)),s=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(D,s,n,u)}diffWithOptionsObj(e,r,n,u){var o;let i=C=>{if(C=this.postProcess(C,n),u){setTimeout(function(){u(C)},0);return}else return C},D=r.length,s=e.length,a=1,c=D+s;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let p=(o=n.timeout)!==null&&o!==void 0?o:1/0,l=Date.now()+p,m=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(m[0],r,e,0,n);if(m[0].oldPos+1>=s&&f+1>=D)return i(this.buildValues(m[0].lastComponent,r,e));let F=-1/0,d=1/0,E=()=>{for(let C=Math.max(F,-a);C<=Math.min(d,a);C+=2){let h,_=m[C-1],P=m[C+1];_&&(m[C-1]=void 0);let A=!1;if(P){let J=P.oldPos-C;A=P&&0<=J&&J<D}let B=_&&_.oldPos+1<s;if(!A&&!B){m[C]=void 0;continue}if(!B||A&&_.oldPos<P.oldPos?h=this.addToPath(P,!0,!1,0,n):h=this.addToPath(_,!1,!0,1,n),f=this.extractCommon(h,r,e,C,n),h.oldPos+1>=s&&f+1>=D)return i(this.buildValues(h.lastComponent,r,e))||!0;m[C]=h,h.oldPos+1>=s&&(d=Math.min(d,C-1)),f+1>=D&&(F=Math.max(F,C+1))}a++};if(u)(function C(){setTimeout(function(){if(a>c||Date.now()>l)return u(void 0);E()||C()},0)})();else for(;a<=c&&Date.now()<=l;){let C=E();if(C)return C}}addToPath(e,r,n,u,o){let i=e.lastComponent;return i&&!o.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:e.oldPos+u,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+u,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(e,r,n,u,o){let i=r.length,D=n.length,s=e.oldPos,a=s-u,c=0;for(;a+1<i&&s+1<D&&this.equals(n[s+1],r[a+1],o);)a++,s++,c++,o.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!o.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,a}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 u=[],o;for(;e;)u.push(e),o=e.previousComponent,delete e.previousComponent,e=o;u.reverse();let i=u.length,D=0,s=0,a=0;for(;D<i;D++){let c=u[D];if(c.removed)c.value=this.join(n.slice(a,a+c.count)),a+=c.count;else{if(!c.added&&this.useLongestToken){let p=r.slice(s,s+c.count);p=p.map(function(l,m){let f=n[a+m];return f.length>l.length?f:l}),c.value=this.join(p)}else c.value=this.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}return u}};var At=class extends Ne{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},pr=new At;function xt(t,e,r){return pr.diff(t,e,r)}var Mu=()=>{},k=Mu;var dr="cr",Fr="crlf",Yu="lf",ju=Yu,Bt="\r",Er=`\r
|
|
2
|
+
`,ze=`
|
|
3
|
+
`,Uu=ze;function Cr(t){let e=t.indexOf(Bt);return e!==-1?t.charAt(e+1)===ze?Fr:dr:ju}function we(t){return t===dr?Bt:t===Fr?Er:Uu}var Vu=new Map([[ze,/\n/g],[Bt,/\r/g],[Er,/\r\n/g]]);function Tt(t,e){let r=Vu.get(e);return t.match(r)?.length??0}var Wu=/\r\n?/g;function hr(t){return ne(0,t,Wu,ze)}var ue=Symbol.for("comments");function $u(t){return this[t<0?this.length+t:t]}var zu=X("at",function(){if(Array.isArray(this)||typeof this=="string")return $u}),y=zu;var G="string",U="array",V="cursor",I="indent",R="align",v="trim",x="group",S="fill",T="if-break",L="indent-if-break",M="line-suffix",Y="line-suffix-boundary",g="line",b="label",N="break-parent",Ge=new Set([V,I,R,v,x,S,T,L,M,Y,g,b,N]);function gr(t){let e=t.length;for(;e>0&&(t[e-1]==="\r"||t[e-1]===`
|
|
4
|
+
`);)e--;return e<t.length?t.slice(0,e):t}function Fe(t,e,r){if(!t.has(e)){let n=r(e);t.set(e,n)}return t.get(e)}function Gu(t){if(typeof t=="string")return G;if(Array.isArray(t))return U;if(!t)return;let{type:e}=t;if(Ge.has(e))return e}var q=Gu;var Ku=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Hu(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
5
|
+
Expected it to be 'string' or 'object'.`;if(q(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ku([...Ge].map(u=>`'${u}'`));return`Unexpected doc.type '${t.type}'.
|
|
6
|
+
Expected it to be ${n}.`}var Nt=class extends Error{name="InvalidDocError";constructor(e){super(Hu(e)),this.doc=e}},Z=Nt;var _r={};function Ju(t,e,r,n){let u=[t];for(;u.length>0;){let o=u.pop();if(o===_r){r(u.pop());continue}r&&u.push(o,_r);let i=q(o);if(!i)throw new Z(o);if(e?.(o)!==!1)switch(i){case U:case S:{let D=i===U?o:o.parts;for(let s=D.length,a=s-1;a>=0;--a)u.push(D[a]);break}case T:u.push(o.flatContents,o.breakContents);break;case x:if(n&&o.expandedStates)for(let D=o.expandedStates.length,s=D-1;s>=0;--s)u.push(o.expandedStates[s]);else u.push(o.contents);break;case R:case I:case L:case b:case M:u.push(o.contents);break;case G:case V:case v:case Y:case g:case N:break;default:throw new Z(o)}}}var Oe=Ju;function Se(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(o){return Fe(r,o,u)}function u(o){switch(q(o)){case U:return e(o.map(n));case S:return e({...o,parts:o.parts.map(n)});case T:return e({...o,breakContents:n(o.breakContents),flatContents:n(o.flatContents)});case x:{let{expandedStates:i,contents:D}=o;return i?(i=i.map(n),D=i[0]):D=n(D),e({...o,contents:D,expandedStates:i})}case R:case I:case L:case b:case M:return e({...o,contents:n(o.contents)});case G:case V:case v:case Y:case g:case N:return e(o);default:throw new Z(o)}}}function Ke(t,e,r){let n=r,u=!1;function o(i){if(u)return!1;let D=e(i);D!==void 0&&(u=!0,n=D)}return Oe(t,o),n}function qu(t){if(t.type===x&&t.break||t.type===g&&t.hard||t.type===N)return!0}function xr(t){return Ke(t,qu,!1)}function yr(t){if(t.length>0){let e=y(0,t,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function Br(t){let e=new Set,r=[];function n(o){if(o.type===N&&yr(r),o.type===x){if(r.push(o),e.has(o))return!1;e.add(o)}}function u(o){o.type===x&&r.pop().break&&yr(r)}Oe(t,n,u,!0)}function Xu(t){return t.type===g&&!t.hard?t.soft?"":" ":t.type===T?t.flatContents:t}function Tr(t){return Se(t,Xu)}function Ar(t){for(t=[...t];t.length>=2&&y(0,t,-2).type===g&&y(0,t,-1).type===N;)t.length-=2;if(t.length>0){let e=Pe(y(0,t,-1));t[t.length-1]=e}return t}function Pe(t){switch(q(t)){case I:case L:case x:case M:case b:{let e=Pe(t.contents);return{...t,contents:e}}case T:return{...t,breakContents:Pe(t.breakContents),flatContents:Pe(t.flatContents)};case S:return{...t,parts:Ar(t.parts)};case U:return Ar(t);case G:return gr(t);case R:case V:case v:case Y:case g:case N:break;default:throw new Z(t)}return t}function He(t){return Pe(Zu(t))}function Qu(t){switch(q(t)){case S:{let{parts:e}=t;if(e.every(r=>r===""))return"";if(e.length===1)return e[0];break}case x:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===x&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case R:case I:case L:case M:if(!t.contents)return"";break;case T:if(!t.flatContents&&!t.breakContents)return"";break;case U:{let e=[];for(let r of t){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(0,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...u)}return e.length===0?"":e.length===1?e[0]:e}case G:case V:case v:case Y:case g:case b:case N:break;default:throw new Z(t)}return t}function Zu(t){return Se(t,e=>Qu(e))}function Nr(t,e=Je){return Se(t,r=>typeof r=="string"?be(e,r.split(`
|
|
7
|
+
`)):r)}function eo(t){if(t.type===g)return!0}function wr(t){return Ke(t,eo,!1)}function Ee(t,e){return t.type===b?{...t,contents:e(t.contents)}:e(t)}var w=k,qe=k,Or=k,Pr=k;function oe(t){return w(t),{type:I,contents:t}}function De(t,e){return Pr(t),w(e),{type:R,contents:e,n:t}}function Sr(t){return De(Number.NEGATIVE_INFINITY,t)}function Xe(t){return De({type:"root"},t)}function br(t){return De(-1,t)}function Qe(t,e,r){w(t);let n=t;if(e>0){for(let u=0;u<Math.floor(e/r);++u)n=oe(n);n=De(e%r,n),n=De(Number.NEGATIVE_INFINITY,n)}return n}var ae={type:N};var ee={type:V};function kr(t){return Or(t),{type:S,parts:t}}function wt(t,e={}){return w(t),qe(e.expandedStates,!0),{type:x,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Ir(t,e){return wt(t[0],{...e,expandedStates:t})}function Rr(t,e="",r={}){return w(t),e!==""&&w(e),{type:T,breakContents:t,flatContents:e,groupId:r.groupId}}function vr(t,e){return w(t),{type:L,contents:t,groupId:e.groupId,negate:e.negate}}function be(t,e){w(t),qe(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}function Lr(t,e){return w(e),t?{type:b,label:t,contents:e}:e}var Ze={type:g},Mr={type:g,soft:!0},ke={type:g,hard:!0},W=[ke,ae],Ot={type:g,hard:!0,literal:!0},Je=[Ot,ae];function Ie(t){return w(t),{type:M,contents:t}}var Yr={type:Y};var jr={type:v};function te(t){if(!t)return"";if(Array.isArray(t)){let e=[];for(let r of t)if(Array.isArray(r))e.push(...te(r));else{let n=te(r);n!==""&&e.push(n)}return e}return t.type===T?{...t,breakContents:te(t.breakContents),flatContents:te(t.flatContents)}:t.type===x?{...t,contents:te(t.contents),expandedStates:t.expandedStates?.map(te)}:t.type===S?{type:"fill",parts:t.parts.map(te)}:t.contents?{...t,contents:te(t.contents)}:t}function Ur(t){let e=Object.create(null),r=new Set;return n(te(t));function n(o,i,D){if(typeof o=="string")return JSON.stringify(o);if(Array.isArray(o)){let s=o.map(n).filter(Boolean);return s.length===1?s[0]:`[${s.join(", ")}]`}if(o.type===g){let s=D?.[i+1]?.type===N;return o.literal?s?"literalline":"literallineWithoutBreakParent":o.hard?s?"hardline":"hardlineWithoutBreakParent":o.soft?"softline":"line"}if(o.type===N)return D?.[i-1]?.type===g&&D[i-1].hard?void 0:"breakParent";if(o.type===v)return"trim";if(o.type===I)return"indent("+n(o.contents)+")";if(o.type===R)return o.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(o.contents)+")":o.n<0?"dedent("+n(o.contents)+")":o.n.type==="root"?"markAsRoot("+n(o.contents)+")":"align("+JSON.stringify(o.n)+", "+n(o.contents)+")";if(o.type===T)return"ifBreak("+n(o.breakContents)+(o.flatContents?", "+n(o.flatContents):"")+(o.groupId?(o.flatContents?"":', ""')+`, { groupId: ${u(o.groupId)} }`:"")+")";if(o.type===L){let s=[];o.negate&&s.push("negate: true"),o.groupId&&s.push(`groupId: ${u(o.groupId)}`);let a=s.length>0?`, { ${s.join(", ")} }`:"";return`indentIfBreak(${n(o.contents)}${a})`}if(o.type===x){let s=[];o.break&&o.break!=="propagated"&&s.push("shouldBreak: true"),o.id&&s.push(`id: ${u(o.id)}`);let a=s.length>0?`, { ${s.join(", ")} }`:"";return o.expandedStates?`conditionalGroup([${o.expandedStates.map(c=>n(c)).join(",")}]${a})`:`group(${n(o.contents)}${a})`}if(o.type===S)return`fill([${o.parts.map(s=>n(s)).join(", ")}])`;if(o.type===M)return"lineSuffix("+n(o.contents)+")";if(o.type===Y)return"lineSuffixBoundary";if(o.type===b)return`label(${JSON.stringify(o.label)}, ${n(o.contents)})`;if(o.type===V)return"cursor";throw new Error("Unknown doc type "+o.type)}function u(o){if(typeof o!="symbol")return JSON.stringify(String(o));if(o in e)return e[o];let i=o.description||"symbol";for(let D=0;;D++){let s=i+(D>0?` #${D}`:"");if(!r.has(s))return r.add(s),e[o]=`Symbol.for(${JSON.stringify(s)})`}}}var Vr=()=>/[#*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-\uDED8\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-\uDEF8](?:\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\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 Wr=12288,$r=65510,zr=[12288,12288,65281,65376,65504,65510];var Gr=4352,Kr=262141,Pt=[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,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,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,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var St=(t,e)=>{let r=0,n=Math.floor(t.length/2)-1;for(;r<=n;){let u=Math.floor((r+n)/2),o=u*2;if(e<t[o])n=u-1;else if(e>t[o+1])r=u+1;else return!0}return!1};var Hr=19968,[to,ro]=no(Pt);function no(t){let e=t[0],r=t[1];for(let n=0;n<t.length;n+=2){let u=t[n],o=t[n+1];if(Hr>=u&&Hr<=o)return[u,o];o-u>r-e&&(e=u,r=o)}return[e,r]}var bt=t=>t<Wr||t>$r?!1:St(zr,t);var kt=t=>t>=to&&t<=ro?!0:t<Gr||t>Kr?!1:St(Pt,t);var uo=/^(?:[\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])$/,Jr=t=>uo.test(t);var oo=/[^\x20-\x7F]/;function io(t){if(!t)return 0;if(!oo.test(t))return t.length;let e=0;t=t.replace(Vr(),r=>(e+=Jr(r)?1:2,""));for(let r of t){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(e+=bt(n)||kt(n)?2:1)}return e}var Re=io;var so={type:0},Do={type:1},It={value:"",length:0,queue:[],get root(){return It}};function qr(t,e,r){let n=e.type===1?t.queue.slice(0,-1):[...t.queue,e],u="",o=0,i=0,D=0;for(let f of n)switch(f.type){case 0:c(),r.useTabs?s(1):a(r.tabWidth);break;case 3:{let{string:F}=f;c(),u+=F,o+=F.length;break}case 2:{let{width:F}=f;i+=1,D+=F;break}default:throw new Error(`Unexpected indent comment '${f.type}'.`)}return l(),{...t,value:u,length:o,queue:n};function s(f){u+=" ".repeat(f),o+=r.tabWidth*f}function a(f){u+=" ".repeat(f),o+=f}function c(){r.useTabs?p():l()}function p(){i>0&&s(i),m()}function l(){D>0&&a(D),m()}function m(){i=0,D=0}}function Xr(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=Do:n={type:2,width:e}:n={type:3,string:e},qr(t,n,r)}function Qr(t,e){return qr(t,so,e)}function ao(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 et(t){let e=ao(t);return{text:e===0?t:t.slice(0,t.length-e),count:e}}var Rt=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}=et(this.#e);return this.#e=e,this.#o(),r}finish(){return this.#o(),{text:this.#t.join(""),positions:this.#u}}},Zr=Rt;var K=Symbol("MODE_BREAK"),Q=Symbol("MODE_FLAT"),vt=Symbol("DOC_FILL_PRINTED_LENGTH");function tt(t,e,r,n,u,o){if(r===Number.POSITIVE_INFINITY)return!0;let i=e.length,D=!1,s=[t],a="";for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(e[--i]);continue}let{mode:c,doc:p}=s.pop(),l=q(p);switch(l){case G:p&&(D&&(a+=" ",r-=1,D=!1),a+=p,r-=Re(p));break;case U:case S:{let m=l===U?p:p.parts,f=p[vt]??0;for(let F=m.length-1;F>=f;F--)s.push({mode:c,doc:m[F]});break}case I:case R:case L:case b:s.push({mode:c,doc:p.contents});break;case v:{let{text:m,count:f}=et(a);a=m,r+=f;break}case x:{if(o&&p.break)return!1;let m=p.break?K:c,f=p.expandedStates&&m===K?y(0,p.expandedStates,-1):p.contents;s.push({mode:m,doc:f});break}case T:{let f=(p.groupId?u[p.groupId]||Q:c)===K?p.breakContents:p.flatContents;f&&s.push({mode:c,doc:f});break}case g:if(c===K||p.hard)return!0;p.soft||(D=!0);break;case M:n=!0;break;case Y:if(n)return!1;break}}return!1}function Ce(t,e){let r=Object.create(null),n=e.printWidth,u=we(e.endOfLine),o=0,i=[{indent:It,mode:K,doc:t}],D=!1,s=[],a=new Zr;for(Br(t);i.length>0;){let{indent:f,mode:F,doc:d}=i.pop();switch(q(d)){case G:{let E=u!==`
|
|
8
|
+
`?ne(0,d,`
|
|
9
|
+
`,u):d;E&&(a.write(E),i.length>0&&(o+=Re(E)));break}case U:for(let E=d.length-1;E>=0;E--)i.push({indent:f,mode:F,doc:d[E]});break;case V:a.markPosition();break;case I:i.push({indent:Qr(f,e),mode:F,doc:d.contents});break;case R:i.push({indent:Xr(f,d.n,e),mode:F,doc:d.contents});break;case v:o-=a.trim();break;case x:{let E=(function(){if(F===Q&&!D)return{indent:f,mode:d.break?K:Q,doc:d.contents};D=!1;let h=n-o,_=s.length>0,P={indent:f,mode:Q,doc:d.contents};if(!d.break&&tt(P,i,h,_,r))return P;if(!d.expandedStates)return{indent:f,mode:K,doc:d.contents};if(!d.break)for(let A=1;A<d.expandedStates.length-1;A++){let B={indent:f,mode:Q,doc:d.expandedStates[A]};if(tt(B,i,h,_,r))return B}return{indent:f,mode:K,doc:y(0,d.expandedStates,-1)}})();i.push(E),d.id&&(r[d.id]=E.mode);break}case S:{let E=n-o,C=d[vt]??0,{parts:h}=d,_=h.length-C;if(_===0)break;let P=h[C+0],A=h[C+1],B={indent:f,mode:Q,doc:P},J={indent:f,mode:K,doc:P},$e=tt(B,[],E,s.length>0,r,!0);if(_===1){$e?i.push(B):i.push(J);break}let lr={indent:f,mode:Q,doc:A},_t={indent:f,mode:K,doc:A};if(_===2){$e?i.push(lr,B):i.push(_t,J);break}let bu=h[C+2],ku={indent:f,mode:F,doc:{...d,[vt]:C+2}},Iu=tt({indent:f,mode:Q,doc:[P,A,bu]},[],E,s.length>0,r,!0);i.push(ku),Iu?i.push(lr,B):$e?i.push(_t,B):i.push(_t,J);break}case T:case L:{let E=d.groupId?r[d.groupId]:F;if(E===K){let C=d.type===T?d.breakContents:d.negate?d.contents:oe(d.contents);C&&i.push({indent:f,mode:F,doc:C})}if(E===Q){let C=d.type===T?d.flatContents:d.negate?oe(d.contents):d.contents;C&&i.push({indent:f,mode:F,doc:C})}break}case M:s.push({indent:f,mode:F,doc:d.contents});break;case Y:s.length>0&&i.push({indent:f,mode:F,doc:ke});break;case g:switch(F){case Q:if(!d.hard){d.soft||(a.write(" "),o+=1);break}D=!0;case K:if(s.length>0){i.push({indent:f,mode:F,doc:d},...s.reverse()),s.length=0;break}d.literal?(a.write(u),o=0,f.root&&(f.root.value&&a.write(f.root.value),o=f.root.length)):(a.trim(),a.write(u+f.value),o=f.length);break}break;case b:i.push({indent:f,mode:F,doc:d.contents});break;case N:break;default:throw new Z(d)}i.length===0&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let{text:c,positions:p}=a.finish();if(p.length!==2)return{formatted:c};let[l,m]=p;return{formatted:c,cursorNodeStart:l,cursorNodeText:c.slice(l,m)}}function co(t,e,r=0){let n=0;for(let u=r;u<t.length;++u)t[u]===" "?n=n+e-n%e:n++;return n}var he=co;var Lt=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:r}=this;return y(0,e,r===null?-2:-4)??null}get index(){return this.siblings===null?null:y(0,this.stack,-2)}get node(){return y(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=y(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?y(0,e,-2):null}getValue(){return y(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:u}=n,o=y(0,n,-1);for(let i of r)o=o?.[i],n.push(i,o);try{return e(this)}finally{n.length=u}}callParent(e,r=0){let n=this.#t(r+1),u=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...u)}}each(e,...r){let{stack:n}=this,{length:u}=n,o=y(0,n,-1);for(let i of r)o=o[i],n.push(i,o);try{for(let i=0;i<o.length;++i)n.push(i,o[i]),e(this,i,o),n.length-=2}finally{n.length=u}}map(e,...r){let n=[];return this.each((u,o,i)=>{n[o]=e(u,o,i)},...r),n}match(...e){let r=this.stack.length-1,n=null,u=this.stack[r--];for(let o of e){if(u===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],u=this.stack[r--]),o&&!o(u,n,i))return!1;n=this.stack[r--],u=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)}}},en=Lt;function fo(t){return Array.isArray(t)&&t.length>0}var rt=fo;function lo(t){return t!==null&&typeof t=="object"}var ge=lo;function _e(t){return(e,r,n)=>{if(r===!1)return!1;let u=!!n?.backwards,{length:o}=e,i=r;for(;i>=0&&i<o;){let D=e.charAt(i);if(t instanceof RegExp){if(!t.test(D))return i}else if(!t.includes(D))return i;u?i--:i++}return i===-1||i===o?i:!1}}var tn=_e(/\s/),j=_e(" "),nt=_e(",; "),ut=_e(/[^\n\r]/);var rn=t=>t===`
|
|
10
|
+
`||t==="\r"||t==="\u2028"||t==="\u2029";function po(t,e,r){if(e===!1)return!1;let n=!!r?.backwards,u=t.charAt(e);if(n){if(t.charAt(e-1)==="\r"&&u===`
|
|
11
|
+
`)return e-2;if(rn(u))return e-1}else{if(u==="\r"&&t.charAt(e+1)===`
|
|
12
|
+
`)return e+2;if(rn(u))return e+1}return e}var $=po;function mo(t,e,r={}){let n=j(t,r.backwards?e-1:e,r),u=$(t,n,r);return n!==u}var H=mo;function*ye(t,e){let{getVisitorKeys:r,filter:n=()=>!0}=e,u=o=>ge(o)&&n(o);for(let o of r(t)){let i=t[o];if(Array.isArray(i))for(let D of i)u(D)&&(yield D);else u(i)&&(yield i)}}function*nn(t,e){let r=[t];for(let n=0;n<r.length;n++){let u=r[n];for(let o of ye(u,e))yield o,r.push(o)}}function un(t,e){return ye(t,e).next().done}function Fo(t,e,r){let{filter:n}=r;if(!n)return[];let u,o=(r.getChildren?.(t,r)??[...ye(t,{getVisitorKeys:r.getVisitorKeys})]).flatMap(s=>(u??(u=[t,...e]),n(s,u)?[s]:on(s,u,r))),{locStart:i,locEnd:D}=r;return o.sort((s,a)=>i(s)-i(a)||D(s)-D(a)),o}function on(t,e,r){return Fe(r.cache,t,n=>Fo(n,e,r))}var ot=on;function Eo(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 Mt(t,e){(t.comments??(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=Eo(t)}function ce(t,e){e.leading=!0,e.trailing=!1,Mt(t,e)}function re(t,e,r){e.leading=!1,e.trailing=!1,r&&(e.marker=r),Mt(t,e)}function fe(t,e){e.leading=!1,e.trailing=!0,Mt(t,e)}var Ut=new WeakMap;function Dn(t,e,r,n,u=[]){let{locStart:o,locEnd:i}=r,D=o(e),s=i(e),a=ot(t,u,{cache:Ut,locStart:o,locEnd:i,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes}),c,p,l=0,m=a.length;for(;l<m;){let f=l+m>>1,F=a[f],d=o(F),E=i(F);if(d<=D&&s<=E)return Dn(F,e,r,F,[F,...u]);if(E<=D){c=F,l=f+1;continue}if(s<=d){p=F,m=f;continue}throw new Error("Comment location overlaps with node location")}if(n?.type==="TemplateLiteral"){let{quasis:f}=n,F=jt(f,e,r);c&&jt(f,c,r)!==F&&(c=null),p&&jt(f,p,r)!==F&&(p=null)}return{enclosingNode:n,precedingNode:c,followingNode:p}}var Yt=()=>!1;function an(t,e){let{comments:r}=t;if(delete t.comments,!rt(r)||!e.printer.canAttachComment)return;let n=[],{printer:{features:{experimental_avoidAstMutation:u},handleComments:o={}},originalText:i}=e,{ownLine:D=Yt,endOfLine:s=Yt,remaining:a=Yt}=o,c=r.map((l,m)=>({...Dn(t,l,e),comment:l,text:i,options:e,ast:t,isLastComment:r.length-1===m,placement:void 0})),p=!u;for(let[l,m]of c.entries()){let{comment:f,precedingNode:F,enclosingNode:d,followingNode:E,text:C,options:h,ast:_,isLastComment:P}=m,A=Co(C,h,c,l)?"ownLine":ho(C,h,c,l)?"endOfLine":"remaining",B;if(u?(m.placement=A,B=[m]):B=[f,C,h,_,P],p&&(f.placement=A,f.enclosingNode=d,f.precedingNode=F,f.followingNode=E),A==="ownLine")D(...B)||(E?ce(E,f):F?fe(F,f):d?re(d,f):re(_,f));else if(A==="endOfLine")s(...B)||(F?fe(F,f):E?ce(E,f):d?re(d,f):re(_,f));else if(!a(...B))if(F&&E){let J=n.length;J>0&&n[J-1].followingNode!==E&&sn(n,h),n.push(m)}else F?fe(F,f):E?ce(E,f):d?re(d,f):re(_,f)}if(sn(n,e),p)for(let l of r)delete l.precedingNode,delete l.enclosingNode,delete l.followingNode,delete l.placement}var cn=t=>!/[\S\n\u2028\u2029]/.test(t);function Co(t,e,r,n){let{comment:u,precedingNode:o}=r[n],{locStart:i,locEnd:D}=e,s=i(u);if(o)for(let a=n-1;a>=0;a--){let{comment:c,precedingNode:p}=r[a];if(p!==o||!cn(t.slice(D(c),s)))break;s=i(c)}return H(t,s,{backwards:!0})}function ho(t,e,r,n){let{comment:u,followingNode:o}=r[n],{locStart:i,locEnd:D}=e,s=D(u);if(o)for(let a=n+1;a<r.length;a++){let{comment:c,followingNode:p}=r[a];if(p!==o||!cn(t.slice(s,i(c))))break;s=D(c)}return H(t,s)}function sn(t,e){let r=t.length;if(r===0)return;let{precedingNode:n,followingNode:u}=t[0],o=e.locStart(u),i;for(i=r;i>0;--i){let{comment:D,precedingNode:s,followingNode:a}=t[i-1];k(s,n),k(a,u);let c=e.originalText.slice(e.locEnd(D),o);if(e.printer.isGap?.(c,e)??/^[\s(]*$/.test(c))o=e.locStart(D);else break}for(let[D,{comment:s}]of t.entries())D<i?fe(n,s):ce(u,s);for(let D of[n,u])D.comments&&D.comments.length>1&&D.comments.sort((s,a)=>e.locStart(s)-e.locStart(a));t.length=0}function jt(t,e,r){let n=r.locStart(e)-1;for(let u=1;u<t.length;++u)if(n<r.locStart(t[u]))return u-1;return 0}function go(t,e){let r=e-1;r=j(t,r,{backwards:!0}),r=$(t,r,{backwards:!0}),r=j(t,r,{backwards:!0});let n=$(t,r,{backwards:!0});return r!==n}var ve=go;var fn=()=>!0;function ln(t,e){let r=t.node;return r.printed=!0,e.printer.printComment(t,e)}function _o(t,e){let r=t.node,n=[ln(t,e)],{printer:u,originalText:o,locStart:i,locEnd:D}=e;if(u.isBlockComment?.(r)){let c=" ";H(o,D(r))&&(H(o,i(r),{backwards:!0})?c=W:c=Ze),n.push(c)}else n.push(W);let a=$(o,j(o,D(r)));return a!==!1&&H(o,a)&&n.push(W),n}function yo(t,e,r){let n=t.node,u=ln(t,e),{printer:o,originalText:i,locStart:D}=e,s=o.isBlockComment?.(n);if(r?.hasLineSuffix&&!r?.isBlock||H(i,D(n),{backwards:!0})){let a=ve(i,D(n));return{doc:Ie([W,a?W:"",u]),isBlock:s,hasLineSuffix:!0}}return!s||r?.hasLineSuffix?{doc:[Ie([" ",u]),ae],isBlock:s,hasLineSuffix:!0}:{doc:[" ",u],isBlock:s,hasLineSuffix:!1}}function Ao(t,e,r){let n=e[Symbol.for("printedComments")],u=r?.filter??fn,o=new Set(t.node?.comments?.filter(i=>!n?.has(i)&&i.leading&&u(i)));return o.size===0?"":t.map(({node:i})=>o.has(i)?_o(t,e):"","comments").filter(Boolean)}function xo(t,e,r){let n=t.node?.comments,u=new Set(n?.filter(c=>c.trailing)),o=e[Symbol.for("printedComments")],i=r?.filter??fn,D=new Set(n?.filter(c=>u.has(c)&&!o?.has(c)&&i(c)));if(D.size===0)return"";let s=[],a;return t.each(({node:c})=>{u.has(c)&&(a=yo(t,e,a),D.has(c)&&s.push(a.doc))},"comments"),s}function pn(t,e,r,n){let u=Ao(t,r,n),o=xo(t,r,n);return u||o?Ee(e,i=>[u,i,o]):e}function mn(t){let{[ue]: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 dn=()=>k;var Le=class extends Error{name="ConfigError"},Me=class extends Error{name="UndefinedParserError"};var Bo=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),le=Bo;var Fn={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
|
|
13
|
+
(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).
|
|
14
14
|
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.
|
|
15
|
-
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 it({plugins:
|
|
16
|
-
`)),
|
|
17
|
-
`)),
|
|
18
|
-
`,1)[0].length);return o>t&&o>n?r:u}var _e=[],au=[];function ct(e,t,u){if(e===t)return 0;let r=u?.maxDistance,o=e;e.length>t.length&&(e=t,t=o);let n=e.length,a=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-a);)n--,a--;let s=0;for(;s<n&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,a-=s,r!==void 0&&a-n>r)return r;if(n===0)return r!==void 0&&a>r?r:a;let i,D,f,l,d=0,c=0;for(;d<n;)au[d]=e.charCodeAt(s+d),_e[d]=++d;for(;c<a;){for(i=t.charCodeAt(s+c),f=c++,D=c,d=0;d<n;d++)l=i===au[d]?f:f+1,f=_e[d],D=_e[d]=f>D?l>D?D+1:l:l>f?f+1:l;if(r!==void 0){let p=D;for(d=0;d<n;d++)_e[d]<p&&(p=_e[d]);if(p>r)return r}}return _e.length=n,au.length=n,r!==void 0&&D>r?r:D}function Wr(e,t,u){if(!Array.isArray(t)||t.length===0)return;let r=u?.maxDistance,o=e.length;for(let i of t)if(i===e)return i;if(r===0)return;let n,a=Number.POSITIVE_INFINITY,s=new Set;for(let i of t){if(s.has(i))continue;s.add(i);let D=Math.abs(i.length-o);if(D>=a||r!==void 0&&D>r)continue;let f=Number.isFinite(a)?r===void 0?a:Math.min(a,r):r,l=f===void 0?ct(e,i):ct(e,i,{maxDistance:f});if(r!==void 0&&l>r)continue;let d=l;if(f!==void 0&&l===f&&f===r&&(d=ct(e,i)),d<a&&(a=d,n=i,a===0))break}if(!(r!==void 0&&a>r))return n}var ft=(e,t,{descriptor:u,logger:r,schemas:o})=>{let n=[`Ignored unknown option ${$.yellow(u.pair({key:e,value:t}))}.`],a=Wr(e,Object.keys(o),{maxDistance:3});a&&n.push(`Did you mean ${$.blue(u.key(a))}?`),r.warn(n.join(" "))};var ua=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function ra(e,t){let u=new e(t),r=Object.create(u);for(let o of ua)o in t&&(r[o]=na(t[o],u,S.prototype[o].length));return r}var S=class{static create(t){return ra(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,u){return!1}deprecated(t,u){return!1}forward(t,u){}redirect(t,u){}overlap(t,u,r){return t}preprocess(t,u){return t}postprocess(t,u){return Ae}};function na(e,t,u){return typeof e=="function"?(...r)=>e(...r.slice(0,u-1),t,...r.slice(u-1)):()=>e}var lt=class extends S{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,u){return u.schemas[this._sourceName].validate(t,u)}redirect(t,u){return this._sourceName}};var dt=class extends S{expected(){return"anything"}validate(){return!0}};var pt=class extends S{constructor({valueSchema:t,name:u=t.name,...r}){super({...r,name:u}),this._valueSchema=t}expected(t){let{text:u,list:r}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:u&&`an array of ${u}`,list:r&&{title:"an array of the following values",values:[{list:r}]}}}validate(t,u){if(!Array.isArray(t))return!1;let r=[];for(let o of t){let n=u.normalizeValidateResult(this._valueSchema.validate(o,u),o);n!==!0&&r.push(n.value)}return r.length===0?!0:{value:r}}deprecated(t,u){let r=[];for(let o of t){let n=u.normalizeDeprecatedResult(this._valueSchema.deprecated(o,u),o);n!==!1&&r.push(...n.map(({value:a})=>({value:[a]})))}return r}forward(t,u){let r=[];for(let o of t){let n=u.normalizeForwardResult(this._valueSchema.forward(o,u),o);r.push(...n.map($r))}return r}redirect(t,u){let r=[],o=[];for(let n of t){let a=u.normalizeRedirectResult(this._valueSchema.redirect(n,u),n);"remain"in a&&r.push(a.remain),o.push(...a.redirect.map($r))}return r.length===0?{redirect:o}:{redirect:o,remain:r}}overlap(t,u){return t.concat(u)}};function $r({from:e,to:t}){return{from:[e],to:t}}var Ft=class extends S{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function Kr(e,t){let u=Object.create(null);for(let r of e){let o=r[t];if(u[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);u[o]=r}return u}function Gr(e,t){let u=new Map;for(let r of e){let o=r[t];if(u.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);u.set(o,r)}return u}function zr(){let e=Object.create(null);return t=>{let u=JSON.stringify(t);return e[u]?!0:(e[u]=!0,!1)}}function Jr(e,t){let u=[],r=[];for(let o of e)t(o)?u.push(o):r.push(o);return[u,r]}function Hr(e){return e===Math.floor(e)}function Xr(e,t){if(e===t)return 0;let u=typeof e,r=typeof t,o=["undefined","object","boolean","number","string"];return u!==r?o.indexOf(u)-o.indexOf(r):u!=="string"?Number(e)-Number(t):e.localeCompare(t)}function qr(e){return(...t)=>{let u=e(...t);return typeof u=="string"?new Error(u):u}}function iu(e){return e===void 0?{}:e}function su(e){if(typeof e=="string")return{text:e};let{text:t,list:u}=e;return oa((t||u)!==void 0,"Unexpected `expected` result, there should be at least one field."),u?{text:t,list:{title:u.title,values:u.values.map(su)}}:{text:t}}function Du(e,t){return e===!0?!0:e===!1?{value:t}:e}function cu(e,t,u=!1){return e===!1?!1:e===!0?u?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Vr(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function mt(e,t){return e===void 0?[]:Array.isArray(e)?e.map(u=>Vr(u,t)):[Vr(e,t)]}function fu(e,t){let u=mt(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return u.length===0?{remain:t,redirect:u}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:u}:{redirect:u}}function oa(e,t){if(!e)throw new Error(t)}var Et=class extends S{constructor(t){super(t),this._choices=Gr(t.choices.map(u=>u&&typeof u=="object"?u:{value:u}),"value")}expected({descriptor:t}){let u=Array.from(this._choices.keys()).map(a=>this._choices.get(a)).filter(({hidden:a})=>!a).map(a=>a.value).sort(Xr).map(t.value),r=u.slice(0,-2),o=u.slice(-2);return{text:r.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:u}}}validate(t){return this._choices.has(t)}deprecated(t){let u=this._choices.get(t);return u&&u.deprecated?{value:t}:!1}forward(t){let u=this._choices.get(t);return u?u.forward:void 0}redirect(t){let u=this._choices.get(t);return u?u.redirect:void 0}};var Ct=class extends S{expected(){return"a number"}validate(t,u){return typeof t=="number"}};var ht=class extends Ct{expected(){return"an integer"}validate(t,u){return u.normalizeValidateResult(super.validate(t,u),t)===!0&&Hr(t)}};var je=class extends S{expected(){return"a string"}validate(t){return typeof t=="string"}};var Qr=ie,Zr=ft,en=Yr,tn=Rr;var gt=class{constructor(t,u){let{logger:r=console,loggerPrintWidth:o=80,descriptor:n=Qr,unknown:a=Zr,invalid:s=en,deprecated:i=tn,missing:D=()=>!1,required:f=()=>!1,preprocess:l=c=>c,postprocess:d=()=>Ae}=u||{};this._utils={descriptor:n,logger:r||{warn:()=>{}},loggerPrintWidth:o,schemas:Kr(t,"name"),normalizeDefaultResult:iu,normalizeExpectedResult:su,normalizeDeprecatedResult:cu,normalizeForwardResult:mt,normalizeRedirectResult:fu,normalizeValidateResult:Du},this._unknownHandler=a,this._invalidHandler=qr(s),this._deprecatedHandler=i,this._identifyMissing=(c,p)=>!(c in p)||D(c,p),this._identifyRequired=f,this._preprocess=l,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=zr()}normalize(t){let u={},o=[this._preprocess(t,this._utils)],n=()=>{for(;o.length!==0;){let a=o.shift(),s=this._applyNormalization(a,u);o.push(...s)}};n();for(let a of Object.keys(this._utils.schemas)){let s=this._utils.schemas[a];if(!(a in u)){let i=iu(s.default(this._utils));"value"in i&&o.push({[a]:i.value})}}n();for(let a of Object.keys(this._utils.schemas)){if(!(a in u))continue;let s=this._utils.schemas[a],i=u[a],D=s.postprocess(i,this._utils);D!==Ae&&(this._applyValidation(D,a,s),u[a]=D)}return this._applyPostprocess(u),this._applyRequiredCheck(u),u}_applyNormalization(t,u){let r=[],{knownKeys:o,unknownKeys:n}=this._partitionOptionKeys(t);for(let a of o){let s=this._utils.schemas[a],i=s.preprocess(t[a],this._utils);this._applyValidation(i,a,s);let D=({from:c,to:p})=>{r.push(typeof p=="string"?{[p]:c}:{[p.key]:p.value})},f=({value:c,redirectTo:p})=>{let F=cu(s.deprecated(c,this._utils),i,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(a)||this._utils.logger.warn(this._deprecatedHandler(a,p,this._utils));else for(let{value:C}of F){let y={key:a,value:C};if(!this._hasDeprecationWarned(y)){let m=typeof p=="string"?{key:p,value:C}:p;this._utils.logger.warn(this._deprecatedHandler(y,m,this._utils))}}};mt(s.forward(i,this._utils),i).forEach(D);let d=fu(s.redirect(i,this._utils),i);if(d.redirect.forEach(D),"remain"in d){let c=d.remain;u[a]=a in u?s.overlap(u[a],c,this._utils):c,f({value:c})}for(let{from:c,to:p}of d.redirect)f({value:c,redirectTo:p})}for(let a of n){let s=t[a];this._applyUnknownHandler(a,s,u,(i,D)=>{r.push({[i]:D})})}return r}_applyRequiredCheck(t){for(let u of Object.keys(this._utils.schemas))if(this._identifyMissing(u,t)&&this._identifyRequired(u))throw this._invalidHandler(u,Dt,this._utils)}_partitionOptionKeys(t){let[u,r]=Jr(Object.keys(t).filter(o=>!this._identifyMissing(o,t)),o=>o in this._utils.schemas);return{knownKeys:u,unknownKeys:r}}_applyValidation(t,u,r){let o=Du(r.validate(t,this._utils),t);if(o!==!0)throw this._invalidHandler(u,o.value,this._utils)}_applyUnknownHandler(t,u,r,o){let n=this._unknownHandler(t,u,this._utils);if(n)for(let a of Object.keys(n)){if(this._identifyMissing(a,n))continue;let s=n[a];a in this._utils.schemas?o(a,s):r[a]=s}}_applyPostprocess(t){let u=this._postprocess(t,this._utils);if(u!==Ae){if(u.delete)for(let r of u.delete)delete t[r];if(u.override){let{knownKeys:r,unknownKeys:o}=this._partitionOptionKeys(u.override);for(let n of r){let a=u.override[n];this._applyValidation(a,n,this._utils.schemas[n]),t[n]=a}for(let n of o){let a=u.override[n];this._applyUnknownHandler(n,a,t,(s,i)=>{let D=this._utils.schemas[s];this._applyValidation(i,s,D),t[s]=i})}}}}};var lu;function ia(e,t,{logger:u=!1,isCLI:r=!1,passThrough:o=!1,FlagSchema:n,descriptor:a}={}){if(r){if(!n)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=ie;let s=o?Array.isArray(o)?(d,c)=>o.includes(d)?{[d]:c}:void 0:(d,c)=>({[d]:c}):(d,c,p)=>{let{_:F,...C}=p.schemas;return ft(d,c,{...p,schemas:C})},i=sa(t,{isCLI:r,FlagSchema:n}),D=new gt(i,{logger:u,unknown:s,descriptor:a}),f=u!==!1;f&&lu&&(D._hasDeprecationWarned=lu);let l=D.normalize(e);return f&&(lu=D._hasDeprecationWarned),l}function sa(e,{isCLI:t,FlagSchema:u}){let r=[];t&&r.push(dt.create({name:"_"}));for(let o of e)r.push(Da(o,{isCLI:t,optionInfos:e,FlagSchema:u})),o.alias&&t&&r.push(lt.create({name:o.alias,sourceName:o.name}));return r}function Da(e,{isCLI:t,optionInfos:u,FlagSchema:r}){let{name:o}=e,n={name:o},a,s={};switch(e.type){case"int":a=ht,t&&(n.preprocess=Number);break;case"string":a=je;break;case"choice":a=Et,n.choices=e.choices.map(i=>i?.redirect?{...i,redirect:{to:{key:e.name,value:i.redirect}}}:i);break;case"boolean":a=Ft;break;case"flag":a=r,n.flags=u.flatMap(i=>[i.alias,i.description&&i.name,i.oppositeDescription&&`no-${i.name}`].filter(Boolean));break;case"path":a=je;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?n.validate=(i,D,f)=>e.exception(i)||D.validate(i,f):n.validate=(i,D,f)=>i===void 0||D.validate(i,f),e.redirect&&(s.redirect=i=>i?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let i=n.preprocess||(D=>D);n.preprocess=(D,f,l)=>f.preprocess(i(Array.isArray(D)?b(0,D,-1):D),l)}return e.array?pt.create({...t?{preprocess:i=>Array.isArray(i)?i:[i]}:{},...s,valueSchema:a.create(n)}):a.create({...n,...s})}var un=ia;var ca=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return u}},fa=X("findLast",function(){if(Array.isArray(this))return ca}),du=fa;var rn=Symbol.for("PRETTIER_IS_FRONT_MATTER"),pu=[];function la(e){return!!e?.[rn]}var de=la;var nn=new Set(["yaml","toml"]),Ue=({node:e})=>de(e)&&nn.has(e.language);async function Fu(e,t,u,r){let{node:o}=u,{language:n}=o;if(!nn.has(n))return;let a=o.value.trim(),s;if(a){let i=n==="yaml"?n:st(r,{language:n});if(!i)return;s=a?await e(a,{parser:i}):""}else s=a;return et([o.startDelimiter,o.explicitLanguage??"",V,s,s?V:"",o.endDelimiter])}function da(e,t){return Ue({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var mu=da;function pa({node:e}){return e.raw}var Eu=pa;var on=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Fa=e=>Object.keys(e).filter(t=>!on.has(t));function ma(e,t){let u=e?r=>e(r,on):Fa;return t?new Proxy(u,{apply:(r,o,n)=>de(n[0])?pu:Reflect.apply(r,o,n)}):u}var Cu=ma;function gu(e,t){if(!t)throw new Error("parserName is required.");let u=du(0,e,o=>o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t));if(u)return u;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Me(r)}function an(e,t){if(!t)throw new Error("astFormat is required.");let u=du(0,e,o=>o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t));if(u)return u;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Me(r)}function We({plugins:e,parser:t}){let u=gu(e,t);return yu(u,t)}function yu(e,t){let u=e.parsers[t];return typeof u=="function"?u():u}async function sn(e,t){let u=e.printers[t],r=typeof u=="function"?await u():u;return Ea(r)}var hu=new WeakMap,q0=Symbol("PRINTER_NORMALIZED_MARK");function Ea(e){if(hu.has(e))return hu.get(e);let{features:t,getVisitorKeys:u,embed:r,massageAstNode:o,print:n,...a}=e;t=ya(t);let s=t.experimental_frontMatterSupport;u=Cu(u,s.massageAstNode||s.embed||s.print);let i=o;o&&s.massageAstNode&&(i=new Proxy(o,{apply(d,c,p){return mu(...p),Reflect.apply(d,c,p)}}));let D=r;if(r){let d;D=new Proxy(r,{get(c,p,F){return p==="getVisitorKeys"?(d??(d=r.getVisitorKeys?Cu(r.getVisitorKeys,s.massageAstNode||s.embed):u),d):Reflect.get(c,p,F)},apply:(c,p,F)=>s.embed&&Ue(...F)?Fu:Reflect.apply(c,p,F)})}let f=n;s.print&&(f=new Proxy(n,{apply(d,c,p){let[F]=p;return de(F.node)?Eu(F):Reflect.apply(d,c,p)}}));let l={features:t,getVisitorKeys:u,embed:D,massageAstNode:i,print:f,...a};return hu.set(e,l),l}var Ca=["clean","embed","print"],ha=Object.fromEntries(Ca.map(e=>[e,!1]));function ga(e){return{...ha,...e}}function ya(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:ga(e?.experimental_frontMatterSupport)}}var Dn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function ba(e,t={}){let u={...e};if(!u.parser)if(u.filepath){if(u.parser=st(u,{physicalFile:u.filepath}),!u.parser)throw new Ye(`No parser could be inferred for file "${u.filepath}".`)}else throw new Ye("No parser and no file path given, couldn't infer a parser.");let r=it({plugins:e.plugins,showDeprecated:!0}).options,o={...Dn,...Object.fromEntries(r.filter(l=>l.default!==void 0).map(l=>[l.name,l.default]))},n=gu(u.plugins,u.parser),a=await yu(n,u.parser);u.astFormat=a.astFormat,u.locEnd=a.locEnd,u.locStart=a.locStart;let s=n.printers?.[a.astFormat]?n:an(u.plugins,a.astFormat),i=await sn(s,a.astFormat);u.printer=i,u.getVisitorKeys=i.getVisitorKeys;let D=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,l])=>l!==void 0)):{},f={...o,...D};for(let[l,d]of Object.entries(f))(u[l]===null||u[l]===void 0)&&(u[l]=d);return u.parser==="json"&&(u.trailingComma="none"),un(u,r,{passThrough:Object.keys(Dn),...t})}var se=ba;var pf=ao(dn(),1);var Au="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\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\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",pn="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\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\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",af=new RegExp("["+Au+"]"),sf=new RegExp("["+Au+pn+"]");Au=pn=null;var _u={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Df=new Set(_u.keyword),cf=new Set(_u.strict),ff=new Set(_u.strictBind);var It=(e,t)=>u=>e(t(u));function mn(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:It(It(e.white,e.bgRed),e.bold),gutter:e.gray,marker:It(e.red,e.bold),message:It(e.red,e.bold),reset:e.reset}}var hf=mn(ou(!0)),gf=mn(ou(!1));function _a(){return new Proxy({},{get:()=>e=>e})}var Fn=/\r\n|[\n\r\u2028\u2029]/;function xa(e,t,u){let r=Object.assign({column:0,line:-1},e.start),o=Object.assign({},r,e.end),{linesAbove:n=2,linesBelow:a=3}=u||{},s=r.line,i=r.column,D=o.line,f=o.column,l=Math.max(s-(n+1),0),d=Math.min(t.length,D+a);s===-1&&(l=0),D===-1&&(d=t.length);let c=D-s,p={};if(c)for(let F=0;F<=c;F++){let C=F+s;if(!i)p[C]=!0;else if(F===0){let y=t[C-1].length;p[C]=[i,y-i+1]}else if(F===c)p[C]=[0,f];else{let y=t[C-F].length;p[C]=[0,y]}}else i===f?i?p[s]=[i,0]:p[s]=!0:p[s]=[i,f-i];return{start:l,end:d,markerLines:p}}function En(e,t,u={}){let o=_a(!1),n=e.split(Fn),{start:a,end:s,markerLines:i}=xa(t,n,u),D=t.start&&typeof t.start.column=="number",f=String(s).length,d=e.split(Fn,s).slice(a,s).map((c,p)=>{let F=a+1+p,y=` ${` ${F}`.slice(-f)} |`,m=i[F],h=!i[F+1];if(m){let E="";if(Array.isArray(m)){let g=c.slice(0,Math.max(m[0]-1,0)).replace(/[^\t]/g," "),A=m[1]||1;E=[`
|
|
19
|
-
`,
|
|
20
|
-
`);return
|
|
21
|
-
${
|
|
22
|
-
`+
|
|
23
|
-
`,
|
|
24
|
-
`&&(
|
|
25
|
-
`)),
|
|
26
|
-
`,
|
|
27
|
-
`);
|
|
28
|
-
`);return
|
|
29
|
-
`)return!0;return!1}var
|
|
15
|
+
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 it({plugins:t=[],showDeprecated:e=!1}={}){let r=t.flatMap(u=>u.languages??[]),n=[];for(let u of No(Object.assign({},...t.map(({options:o})=>o),Fn)))!e&&u.deprecated||(Array.isArray(u.choices)&&(e||(u.choices=u.choices.filter(o=>!o.deprecated)),u.name==="parser"&&(u.choices=[...u.choices,...To(u.choices,r,t)])),u.pluginDefaults=Object.fromEntries(t.filter(o=>o.defaultOptions?.[u.name]!==void 0).map(o=>[o.name,o.defaultOptions[u.name]])),n.push(u));return{languages:r,options:n}}function*To(t,e,r){let n=new Set(t.map(u=>u.value));for(let u of e)if(u.parsers){for(let o of u.parsers)if(!n.has(o)){n.add(o);let i=r.find(s=>s.parsers&&le(s.parsers,o)),D=u.name;i?.name&&(D+=` (plugin: ${i.name})`),yield{value:o,description:D}}}}function No(t){let e=[];for(let[r,n]of Object.entries(t)){let u={name:r,...n};Array.isArray(u.default)&&(u.default=y(0,u.default,-1).value),e.push(u)}return e}var wo=Array.prototype.toReversed??function(){return[...this].reverse()},Oo=X("toReversed",function(){if(Array.isArray(this))return wo}),En=Oo;function Po(){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 So=Po();function Cn(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 bo(t){return t=Cn(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function ko(t){t=Cn(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 Vt(t){return So?ko(t):bo(t)}var hn=t=>String(t).split(/[/\\]/).pop(),gn=t=>String(t).startsWith("file:");function _n(t,e){if(!e)return;let r=hn(e).toLowerCase();return t.find(({filenames:n})=>n?.some(u=>u.toLowerCase()===r))??t.find(({extensions:n})=>n?.some(u=>r.endsWith(u)))}function Io(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 Ro=void 0;function yn(t,e){if(e){if(gn(e))try{e=Vt(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r?.({filepath:e}))}}function vo(t,e){let r=En(0,t.plugins).flatMap(u=>u.languages??[]);return(Io(r,e.language)??_n(r,e.physicalFile)??_n(r,e.file)??yn(r,e.physicalFile)??yn(r,e.file)??Ro?.(r,e.physicalFile))?.parsers[0]}var st=vo;var ie={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=>ie.value(r)).join(", ")}]`;let e=Object.keys(t);return e.length===0?"{}":`{ ${e.map(r=>`${ie.key(r)}: ${ie.value(t[r])}`).join(", ")} }`},pair:({key:t,value:e})=>ie.value({[t]:e})};var An=new Proxy(String,{get:()=>An}),z=An;var xn=(t,e,{descriptor:r})=>{let n=[`${z.yellow(typeof t=="string"?r.key(t):r.pair(t))} is deprecated`];return e&&n.push(`we now treat it as ${z.blue(typeof e=="string"?r.key(e):r.pair(e))}`),n.join("; ")+"."};var Dt=Symbol.for("vnopts.VALUE_NOT_EXIST"),Ae=Symbol.for("vnopts.VALUE_UNCHANGED");var Bn=" ".repeat(2),Nn=(t,e,r)=>{let{text:n,list:u}=r.normalizeExpectedResult(r.schemas[t].expected(r)),o=[];return n&&o.push(Tn(t,e,n,r.descriptor)),u&&o.push([Tn(t,e,u.title,r.descriptor)].concat(u.values.map(i=>wn(i,r.loggerPrintWidth))).join(`
|
|
16
|
+
`)),On(o,r.loggerPrintWidth)};function Tn(t,e,r,n){return[`Invalid ${z.red(n.key(t))} value.`,`Expected ${z.blue(r)},`,`but received ${e===Dt?z.gray("nothing"):z.red(n.value(e))}.`].join(" ")}function wn({text:t,list:e},r){let n=[];return t&&n.push(`- ${z.blue(t)}`),e&&n.push([`- ${z.blue(e.title)}:`].concat(e.values.map(u=>wn(u,r-Bn.length).replace(/^|\n/g,`$&${Bn}`))).join(`
|
|
17
|
+
`)),On(n,r)}function On(t,e){if(t.length===1)return t[0];let[r,n]=t,[u,o]=t.map(i=>i.split(`
|
|
18
|
+
`,1)[0].length);return u>e&&u>o?n:r}var xe=[],Wt=[];function at(t,e,r){if(t===e)return 0;let n=r?.maxDistance,u=t;t.length>e.length&&(t=e,e=u);let o=t.length,i=e.length;for(;o>0&&t.charCodeAt(~-o)===e.charCodeAt(~-i);)o--,i--;let D=0;for(;D<o&&t.charCodeAt(D)===e.charCodeAt(D);)D++;if(o-=D,i-=D,n!==void 0&&i-o>n)return n;if(o===0)return n!==void 0&&i>n?n:i;let s,a,c,p,l=0,m=0;for(;l<o;)Wt[l]=t.charCodeAt(D+l),xe[l]=++l;for(;m<i;){for(s=e.charCodeAt(D+m),c=m++,a=m,l=0;l<o;l++)p=s===Wt[l]?c:c+1,c=xe[l],a=xe[l]=c>a?p>a?a+1:p:p>c?c+1:p;if(n!==void 0){let f=a;for(l=0;l<o;l++)xe[l]<f&&(f=xe[l]);if(f>n)return n}}return xe.length=o,Wt.length=o,n!==void 0&&a>n?n:a}function Pn(t,e,r){if(!Array.isArray(e)||e.length===0)return;let n=r?.maxDistance,u=t.length;for(let s of e)if(s===t)return s;if(n===0)return;let o,i=Number.POSITIVE_INFINITY,D=new Set;for(let s of e){if(D.has(s))continue;D.add(s);let a=Math.abs(s.length-u);if(a>=i||n!==void 0&&a>n)continue;let c=Number.isFinite(i)?n===void 0?i:Math.min(i,n):n,p=c===void 0?at(t,s):at(t,s,{maxDistance:c});if(n!==void 0&&p>n)continue;let l=p;if(c!==void 0&&p===c&&c===n&&(l=at(t,s)),l<i&&(i=l,o=s,i===0))break}if(!(n!==void 0&&i>n))return o}var ct=(t,e,{descriptor:r,logger:n,schemas:u})=>{let o=[`Ignored unknown option ${z.yellow(r.pair({key:t,value:e}))}.`],i=Pn(t,Object.keys(u),{maxDistance:3});i&&o.push(`Did you mean ${z.blue(r.key(i))}?`),n.warn(o.join(" "))};var Lo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Mo(t,e){let r=new t(e),n=Object.create(r);for(let u of Lo)u in e&&(n[u]=Yo(e[u],r,O.prototype[u].length));return n}var O=class{static create(e){return Mo(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 Ae}};function Yo(t,e,r){return typeof t=="function"?(...n)=>t(...n.slice(0,r-1),e,...n.slice(r-1)):()=>t}var ft=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 lt=class extends O{expected(){return"anything"}validate(){return!0}};var pt=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 u of e){let o=r.normalizeValidateResult(this._valueSchema.validate(u,r),u);o!==!0&&n.push(o.value)}return n.length===0?!0:{value:n}}deprecated(e,r){let n=[];for(let u of e){let o=r.normalizeDeprecatedResult(this._valueSchema.deprecated(u,r),u);o!==!1&&n.push(...o.map(({value:i})=>({value:[i]})))}return n}forward(e,r){let n=[];for(let u of e){let o=r.normalizeForwardResult(this._valueSchema.forward(u,r),u);n.push(...o.map(Sn))}return n}redirect(e,r){let n=[],u=[];for(let o of e){let i=r.normalizeRedirectResult(this._valueSchema.redirect(o,r),o);"remain"in i&&n.push(i.remain),u.push(...i.redirect.map(Sn))}return n.length===0?{redirect:u}:{redirect:u,remain:n}}overlap(e,r){return e.concat(r)}};function Sn({from:t,to:e}){return{from:[t],to:e}}var mt=class extends O{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function kn(t,e){let r=Object.create(null);for(let n of t){let u=n[e];if(r[u])throw new Error(`Duplicate ${e} ${JSON.stringify(u)}`);r[u]=n}return r}function In(t,e){let r=new Map;for(let n of t){let u=n[e];if(r.has(u))throw new Error(`Duplicate ${e} ${JSON.stringify(u)}`);r.set(u,n)}return r}function Rn(){let t=Object.create(null);return e=>{let r=JSON.stringify(e);return t[r]?!0:(t[r]=!0,!1)}}function vn(t,e){let r=[],n=[];for(let u of t)e(u)?r.push(u):n.push(u);return[r,n]}function Ln(t){return t===Math.floor(t)}function Mn(t,e){if(t===e)return 0;let r=typeof t,n=typeof e,u=["undefined","object","boolean","number","string"];return r!==n?u.indexOf(r)-u.indexOf(n):r!=="string"?Number(t)-Number(e):t.localeCompare(e)}function Yn(t){return(...e)=>{let r=t(...e);return typeof r=="string"?new Error(r):r}}function $t(t){return t===void 0?{}:t}function zt(t){if(typeof t=="string")return{text:t};let{text:e,list:r}=t;return jo((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(zt)}}:{text:e}}function Gt(t,e){return t===!0?!0:t===!1?{value:e}:t}function Kt(t,e,r=!1){return t===!1?!1:t===!0?r?!0:[{value:e}]:"value"in t?[t]:t.length===0?!1:t}function bn(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 dt(t,e){return t===void 0?[]:Array.isArray(t)?t.map(r=>bn(r,e)):[bn(t,e)]}function Ht(t,e){let r=dt(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 jo(t,e){if(!t)throw new Error(e)}var Ft=class extends O{constructor(e){super(e),this._choices=In(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(Mn).map(e.value),n=r.slice(0,-2),u=r.slice(-2);return{text:n.concat(u.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 Et=class extends O{expected(){return"a number"}validate(e,r){return typeof e=="number"}};var Ct=class extends Et{expected(){return"an integer"}validate(e,r){return r.normalizeValidateResult(super.validate(e,r),e)===!0&&Ln(e)}};var Ye=class extends O{expected(){return"a string"}validate(e){return typeof e=="string"}};var jn=ie,Un=ct,Vn=Nn,Wn=xn;var ht=class{constructor(e,r){let{logger:n=console,loggerPrintWidth:u=80,descriptor:o=jn,unknown:i=Un,invalid:D=Vn,deprecated:s=Wn,missing:a=()=>!1,required:c=()=>!1,preprocess:p=m=>m,postprocess:l=()=>Ae}=r||{};this._utils={descriptor:o,logger:n||{warn:()=>{}},loggerPrintWidth:u,schemas:kn(e,"name"),normalizeDefaultResult:$t,normalizeExpectedResult:zt,normalizeDeprecatedResult:Kt,normalizeForwardResult:dt,normalizeRedirectResult:Ht,normalizeValidateResult:Gt},this._unknownHandler=i,this._invalidHandler=Yn(D),this._deprecatedHandler=s,this._identifyMissing=(m,f)=>!(m in f)||a(m,f),this._identifyRequired=c,this._preprocess=p,this._postprocess=l,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Rn()}normalize(e){let r={},u=[this._preprocess(e,this._utils)],o=()=>{for(;u.length!==0;){let i=u.shift(),D=this._applyNormalization(i,r);u.push(...D)}};o();for(let i of Object.keys(this._utils.schemas)){let D=this._utils.schemas[i];if(!(i in r)){let s=$t(D.default(this._utils));"value"in s&&u.push({[i]:s.value})}}o();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let D=this._utils.schemas[i],s=r[i],a=D.postprocess(s,this._utils);a!==Ae&&(this._applyValidation(a,i,D),r[i]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(e,r){let n=[],{knownKeys:u,unknownKeys:o}=this._partitionOptionKeys(e);for(let i of u){let D=this._utils.schemas[i],s=D.preprocess(e[i],this._utils);this._applyValidation(s,i,D);let a=({from:m,to:f})=>{n.push(typeof f=="string"?{[f]:m}:{[f.key]:f.value})},c=({value:m,redirectTo:f})=>{let F=Kt(D.deprecated(m,this._utils),s,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,f,this._utils));else for(let{value:d}of F){let E={key:i,value:d};if(!this._hasDeprecationWarned(E)){let C=typeof f=="string"?{key:f,value:d}:f;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};dt(D.forward(s,this._utils),s).forEach(a);let l=Ht(D.redirect(s,this._utils),s);if(l.redirect.forEach(a),"remain"in l){let m=l.remain;r[i]=i in r?D.overlap(r[i],m,this._utils):m,c({value:m})}for(let{from:m,to:f}of l.redirect)c({value:m,redirectTo:f})}for(let i of o){let D=e[i];this._applyUnknownHandler(i,D,r,(s,a)=>{n.push({[s]:a})})}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,Dt,this._utils)}_partitionOptionKeys(e){let[r,n]=vn(Object.keys(e).filter(u=>!this._identifyMissing(u,e)),u=>u in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(e,r,n){let u=Gt(n.validate(e,this._utils),e);if(u!==!0)throw this._invalidHandler(r,u.value,this._utils)}_applyUnknownHandler(e,r,n,u){let o=this._unknownHandler(e,r,this._utils);if(o)for(let i of Object.keys(o)){if(this._identifyMissing(i,o))continue;let D=o[i];i in this._utils.schemas?u(i,D):n[i]=D}}_applyPostprocess(e){let r=this._postprocess(e,this._utils);if(r!==Ae){if(r.delete)for(let n of r.delete)delete e[n];if(r.override){let{knownKeys:n,unknownKeys:u}=this._partitionOptionKeys(r.override);for(let o of n){let i=r.override[o];this._applyValidation(i,o,this._utils.schemas[o]),e[o]=i}for(let o of u){let i=r.override[o];this._applyUnknownHandler(o,i,e,(D,s)=>{let a=this._utils.schemas[D];this._applyValidation(s,D,a),e[D]=s})}}}}};var Jt;function Uo(t,e,{logger:r=!1,isCLI:n=!1,passThrough:u=!1,FlagSchema:o,descriptor:i}={}){if(n){if(!o)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=ie;let D=u?Array.isArray(u)?(l,m)=>u.includes(l)?{[l]:m}:void 0:(l,m)=>({[l]:m}):(l,m,f)=>{let{_:F,...d}=f.schemas;return ct(l,m,{...f,schemas:d})},s=Vo(e,{isCLI:n,FlagSchema:o}),a=new ht(s,{logger:r,unknown:D,descriptor:i}),c=r!==!1;c&&Jt&&(a._hasDeprecationWarned=Jt);let p=a.normalize(t);return c&&(Jt=a._hasDeprecationWarned),p}function Vo(t,{isCLI:e,FlagSchema:r}){let n=[];e&&n.push(lt.create({name:"_"}));for(let u of t)n.push(Wo(u,{isCLI:e,optionInfos:t,FlagSchema:r})),u.alias&&e&&n.push(ft.create({name:u.alias,sourceName:u.name}));return n}function Wo(t,{isCLI:e,optionInfos:r,FlagSchema:n}){let{name:u}=t,o={name:u},i,D={};switch(t.type){case"int":i=Ct,e&&(o.preprocess=Number);break;case"string":i=Ye;break;case"choice":i=Ft,o.choices=t.choices.map(s=>s?.redirect?{...s,redirect:{to:{key:t.name,value:s.redirect}}}:s);break;case"boolean":i=mt;break;case"flag":i=n,o.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?o.validate=(s,a,c)=>t.exception(s)||a.validate(s,c):o.validate=(s,a,c)=>s===void 0||a.validate(s,c),t.redirect&&(D.redirect=s=>s?{to:typeof t.redirect=="string"?t.redirect:{key:t.redirect.option,value:t.redirect.value}}:void 0),t.deprecated&&(D.deprecated=!0),e&&!t.array){let s=o.preprocess||(a=>a);o.preprocess=(a,c,p)=>c.preprocess(s(Array.isArray(a)?y(0,a,-1):a),p)}return t.array?pt.create({...e?{preprocess:s=>Array.isArray(s)?s:[s]}:{},...D,valueSchema:i.create(o)}):i.create({...o,...D})}var $n=Uo;var $o=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}},zo=X("findLast",function(){if(Array.isArray(this))return $o}),qt=zo;var zn=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Xt=[];function Go(t){return!!t?.[zn]}var pe=Go;var Gn=new Set(["yaml","toml"]),je=({node:t})=>pe(t)&&Gn.has(t.language);async function Qt(t,e,r,n){let{node:u}=r,{language:o}=u;if(!Gn.has(o))return;let i=u.value.trim(),D;if(i){let s=o==="yaml"?o:st(n,{language:o});if(!s)return;D=i?await t(i,{parser:s}):""}else D=i;return Xe([u.startDelimiter,u.explicitLanguage??"",W,D,D?W:"",u.endDelimiter])}function Ko(t,e){return je({node:t})&&(delete e.end,delete e.raw,delete e.value),e}var Zt=Ko;function Ho({node:t}){return t.raw}var er=Ho;var Kn=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Jo=t=>Object.keys(t).filter(e=>!Kn.has(e));function qo(t,e){let r=t?n=>t(n,Kn):Jo;return e?new Proxy(r,{apply:(n,u,o)=>pe(o[0])?Xt:Reflect.apply(n,u,o)}):r}var tr=qo;function rr(t,e){if(!e)throw new Error("parserName is required.");let r=qt(0,t,u=>u.parsers&&le(u.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 Le(n)}function Hn(t,e){if(!e)throw new Error("astFormat is required.");let r=qt(0,t,u=>u.printers&&le(u.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 Le(n)}function Ue({plugins:t,parser:e}){let r=rr(t,e);return nr(r,e)}function nr(t,e){let r=t.parsers[e];return typeof r=="function"?r():r}async function Jn(t,e){let r=t.printers[e],n=typeof r=="function"?await r():r;return Zo(n)}function Xo(t){let{features:e,getVisitorKeys:r,embed:n,massageAstNode:u,print:o,...i}=t;e=ni(e);let D=e.experimental_frontMatterSupport;r=tr(r,D.massageAstNode||D.embed||D.print);let s=u;u&&D.massageAstNode&&(s=new Proxy(u,{apply(l,m,f){return Zt(...f),Reflect.apply(l,m,f)}}));let a=n;if(n){let l;a=new Proxy(n,{get(m,f,F){return f==="getVisitorKeys"?(l??(l=n.getVisitorKeys?tr(n.getVisitorKeys,D.massageAstNode||D.embed):r),l):Reflect.get(m,f,F)},apply:(m,f,F)=>D.embed&&je(...F)?Qt:Reflect.apply(m,f,F)})}let c=o;return D.print&&(c=new Proxy(o,{apply(l,m,f){let[F]=f;return pe(F.node)?er(F):Reflect.apply(l,m,f)}})),{features:e,getVisitorKeys:r,embed:a,massageAstNode:s,print:c,...i}}var Qo=new WeakMap;function Zo(t){return Fe(Qo,t,Xo)}var ei=["clean","embed","print"],ti=Object.fromEntries(ei.map(t=>[t,!1]));function ri(t){return{...ti,...t}}function ni(t){return{experimental_avoidAstMutation:!1,...t,experimental_frontMatterSupport:ri(t?.experimental_frontMatterSupport)}}var qn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function ui(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=st(r,{physicalFile:r.filepath}),!r.parser)throw new Me(`No parser could be inferred for file "${r.filepath}".`)}let n=it({plugins:t.plugins,showDeprecated:!0}).options,u={...qn,...Object.fromEntries(n.filter(p=>p.default!==void 0).map(p=>[p.name,p.default]))},o=rr(r.plugins,r.parser),i=await nr(o,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let D=o.printers?.[i.astFormat]?o:Hn(r.plugins,i.astFormat),s=await Jn(D,i.astFormat);r.printer=s,r.getVisitorKeys=s.getVisitorKeys;let a=D.defaultOptions?Object.fromEntries(Object.entries(D.defaultOptions).filter(([,p])=>p!==void 0)):{},c={...u,...a};for(let[p,l]of Object.entries(c))r[p]??(r[p]=l);return r.parser==="json"&&(r.trailingComma="none"),$n(r,n,{passThrough:Object.keys(qn),...e})}var se=ui;var Xn=/\r\n|[\n\r\u2028\u2029]/;function oi(t,e,r,n){let u={column:null,line:-1,...t.start},o={...u,...t.end},{linesAbove:i=2,linesBelow:D=3}=r||{},s=u.line-n,a=u.column,c=o.line-n,p=o.column,l=Math.max(s-(i+1),0),m=Math.min(e.length,c+D);s===-1&&(l=0),c===-1&&(m=e.length);let f=c-s,F={};if(f)for(let d=0;d<=f;d++){let E=d+s;if(a==null)F[E]=!0;else if(d===0){let C=e[E-1].length;F[E]=[a,C-a]}else if(d===f)F[E]=[0,p];else{let C=e[E-1].length;F[E]=[0,C]}}else if(a===p)a!=null?F[s]=[a,0]:F[s]=!0;else{let d=a??0,E=p??d;F[s]=[d,E-d]}return{start:l,end:m,markerLines:F}}function Qn(t,e,r={},n){let{defs:u,highlight:o}=n||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},i=(r.startLine||1)-1,D=t.split(Xn),{start:s,end:a,markerLines:c}=oi(e,D,r,i),p=e.start&&typeof e.start.column=="number",l=String(a+i).length,f=o(t).split(Xn,a).slice(s,a).map((F,d)=>{let E=s+1+d,h=` ${` ${E+i}`.slice(-l)} |`,_=c[E],P=!c[E+1];if(_){let A="";if(Array.isArray(_)){let B=F.slice(0,_[0]).replace(/[^\t]/g," "),J=_[1]||1;A=[`
|
|
19
|
+
`,u.gutter(h.replace(/\d/g," "))," ",B,u.marker("^").repeat(J)].join(""),P&&r.message&&(A+=" "+u.message(r.message))}return[u.marker(">"),u.gutter(h),F.length>0?` ${F}`:"",A].join("")}else return` ${u.gutter(h)}${F.length>0?` ${F}`:""}`}).join(`
|
|
20
|
+
`);return r.message&&!p&&(f=`${" ".repeat(l+1)}${r.message}
|
|
21
|
+
${f}`),u.reset(f)}function Zn(t,e,r={}){return Qn(t,e,r)}async function ii(t,e){let r=await Ue(e),n=r.preprocess?await r.preprocess(t,e):t;e.originalText=n;let u;try{u=await r.parse(n,e,e)}catch(o){si(o,t)}return{text:n,ast:u}}function si(t,e){let{loc:r}=t;if(r){let{start:n,end:u}=r;n&&(n={line:n.line,column:n.column-1}),u&&(u={line:u.line,column:u.column-1});let o=Zn(e,{start:n,end:u},{highlightCode:!0});t.message+=`
|
|
22
|
+
`+o,t.codeFrame=o}throw t}var me=ii;async function eu(t,e,r,n,u){if(r.embeddedLanguageFormatting!=="auto")return;let{printer:o}=r,{embed:i}=o;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:D}=o,{getVisitorKeys:s}=i,a=[];l();let c=t.stack;for(let{print:m,node:f,pathStack:F}of a)try{t.stack=F;let d=await m(p,e,t,r);d&&u.set(f,d)}catch(d){if(globalThis.PRETTIER_DEBUG)throw d}t.stack=c;function p(m,f){return Di(m,f,r,n)}function l(){let{node:m}=t;if(m===null||typeof m!="object"||D?.(t))return;for(let F of s(m))Array.isArray(m[F])?t.each(l,F):t.call(l,F);let f=i(t,r);if(f){if(typeof f=="function"){a.push({print:f,node:m,pathStack:[...t.stack]});return}u.set(m,f)}}}async function Di(t,e,r,n){let u=await se({...r,...e,parentParser:r.parser,originalText:t,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:o}=await me(t,u),i=await n(o,u);return He(i)}function ai(t,e,r,n){let{originalText:u,[ue]:o,locStart:i,locEnd:D,[Symbol.for("printedComments")]:s}=e,{node:a}=t,c=i(a),p=D(a);for(let m of o)i(m)>=c&&D(m)<=p&&s.add(m);let{printPrettierIgnored:l}=e.printer;return l?l(t,e,r,n):u.slice(c,p)}var tu=ai;async function Ve(t,e){({ast:t}=await ur(t,e));let r=new Map,n=new en(t),u=dn(e),o=new Map;await eu(n,D,e,Ve,o);let i=await ru(n,e,D,void 0,o);if(mn(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[ee,i];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[i,ee]}return i;function D(a,c){return a===void 0||a===n?s(c):Array.isArray(a)?n.call(()=>s(c),...a):n.call(()=>s(c),a)}function s(a){u(n);let c=n.node;if(c==null)return"";let p=ge(c)&&a===void 0;if(p&&r.has(c))return r.get(c);let l=ru(n,e,D,a,o);return p&&r.set(c,l),l}}function ru(t,e,r,n,u){let{node:o}=t,{printer:i}=e,D;switch(i.hasPrettierIgnore?.(t)?D=tu(t,e,r,n):u.has(o)?D=u.get(o):D=i.print(t,e,r,n),o){case e.cursorNode:D=Ee(D,s=>[ee,s,ee]);break;case e.nodeBeforeCursor:D=Ee(D,s=>[s,ee]);break;case e.nodeAfterCursor:D=Ee(D,s=>[ee,s]);break}return i.printComment&&rt(o.comments)&&!i.willPrintOwnComments?.(t,e)&&(D=pn(t,D,e)),D}async function ur(t,e){let r=t.comments??[];e[ue]=r,e[Symbol.for("printedComments")]=new Set,an(t,e);let{printer:{preprocess:n}}=e;return t=n?await n(t,e):t,{ast:t,comments:r}}function ci(t,e){let{cursorOffset:r,locStart:n,locEnd:u,getVisitorKeys:o}=e,i=m=>n(m)<=r&&u(m)>=r,D=t,s=[t];for(let m of nn(t,{getVisitorKeys:o,filter:i}))s.push(m),D=m;if(un(D,{getVisitorKeys:o}))return{cursorNode:D};let a,c,p=-1,l=Number.POSITIVE_INFINITY;for(;s.length>0&&(a===void 0||c===void 0);){D=s.pop();let m=a!==void 0,f=c!==void 0;for(let F of ye(D,{getVisitorKeys:o})){if(!m){let d=u(F);d<=r&&d>p&&(a=F,p=d)}if(!f){let d=n(F);d>=r&&d<l&&(c=F,l=d)}}}return{nodeBeforeCursor:a,nodeAfterCursor:c}}var or=ci;function fi(t,e){let{printer:r}=e,n=r.massageAstNode;if(!n)return t;let{getVisitorKeys:u}=r,{ignoredProperties:o}=n;return i(t);function i(D,s){if(!ge(D))return D;if(Array.isArray(D))return D.map(l=>i(l,s)).filter(Boolean);let a={},c=new Set(u(D));for(let l in D)!le(D,l)||o?.has(l)||(c.has(l)?a[l]=i(D[l],D):a[l]=D[l]);let p=n(D,a,s);if(p!==null)return p??a}}var nu=fi;var li=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},pi=X("findLastIndex",function(){if(Array.isArray(this))return li}),uu=pi;function mi(t,e){return e=new Set(e),t.find(r=>su.has(r.type)&&e.has(r))}function ou(t){let e=uu(0,t,r=>r.type!=="Program"&&r.type!=="File");return e===-1?t:t.slice(0,e+1)}function di(t,e,{locStart:r,locEnd:n}){let[u,...o]=t,[i,...D]=e;if(u===i)return[u,i];let s=r(u);for(let c of ou(D))if(r(c)>=s)i=c;else break;let a=n(i);for(let c of ou(o)){if(n(c)<=a)u=c;else break;if(u===i)break}return[u,i]}function ir(t,e,r,n,u=[],o,i){let{locStart:D,locEnd:s}=i,a=D(t),c=s(t);if(e>c||e<a||o==="rangeEnd"&&e===a||o==="rangeStart"&&e===c)return;let p=[t,...u],l=ot(t,p,{cache:Ut,locStart:D,locEnd:s,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes});for(let m of l){let f=ir(m,e,r,n,p,o,i);if(f)return f}if(n(t,u[0]))return p}function Fi(t,e){return e!=="DeclareExportDeclaration"&&t!=="TypeParameterDeclaration"&&(t==="Directive"||t==="TypeAlias"||t==="TSExportAssignment"||t.startsWith("Declare")||t.startsWith("TSDeclare")||t.endsWith("Statement")||t.endsWith("Declaration"))}var su=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Ei=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function iu(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"__babel_estree":return Fi(e.type,r?.type);case"json":case"json5":case"jsonc":case"json-stringify":return su.has(e.type);case"graphql":return Ei.has(e.kind);case"vue":return e.tag!=="root"}return!1}function Du(t,e,r){let{rangeStart:n,rangeEnd:u}=e;k(u>n);let o=t.slice(n,u).search(/\S/),i=o===-1;if(!i)for(n+=o;u>n&&!/\S/.test(t[u-1]);--u);let D=e.printer.features?.experimental_locForRangeFormat??e,s=ir(r,n,e,(f,F)=>iu(e,f,F),[],"rangeStart",D);if(!s)return;let a=i?s:ir(r,u,e,f=>iu(e,f),[],"rangeEnd",D);if(!a)return;let c,p;if(r.type==="JsonRoot"){let f=mi(s,a);c=f,p=f}else[c,p]=di(s,a,e);let{locStart:l,locEnd:m}=D;return[Math.min(l(c),l(p)),Math.max(m(c),m(p))]}var lu="\uFEFF",au=Symbol("cursor");async function pu(t,e,r=0){if(!t||t.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:u}=await me(t,e);e.cursorOffset>=0&&(e={...e,...or(n,e)});let o=await Ve(n,e,r);r>0&&(o=Qe([W,o],r,e.tabWidth));let i=Ce(o,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+we(e.endOfLine)}let D=e[ue];if(e.cursorOffset>=0){let s,a,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),a=u.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):u.length;a=u.slice(s,E)}else s=0,a=u,c=0,p=i.formatted;let l=e.cursorOffset-s;if(a===p)return{formatted:i.formatted,cursorOffset:c+l,comments:D};let m=a.split("");m.splice(l,0,au);let f=p.split(""),F=xt(m,f),d=c;for(let E of F)if(E.removed){if(E.value.includes(au))break}else d+=E.count;return{formatted:i.formatted,cursorOffset:d,comments:D}}return{formatted:i.formatted,cursorOffset:-1,comments:D}}async function Ci(t,e){let{ast:r,text:n}=await me(t,e),[u,o]=Du(n,e,r)??[0,0],i=n.slice(u,o),D=Math.min(u,n.lastIndexOf(`
|
|
23
|
+
`,u)+1),s=n.slice(D,u).match(/^\s*/)[0],a=he(s,e.tabWidth),c=await pu(i,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>u&&e.cursorOffset<=o?e.cursorOffset-u:-1,endOfLine:"lf"},a),p=c.formatted.trimEnd(),{cursorOffset:l}=e;l>o?l+=p.length-i.length:c.cursorOffset>=0&&(l=c.cursorOffset+u);let m=n.slice(0,u)+p+n.slice(o);if(e.endOfLine!=="lf"){let f=we(e.endOfLine);l>=0&&f===`\r
|
|
24
|
+
`&&(l+=Tt(m.slice(0,l),`
|
|
25
|
+
`)),m=ne(0,m,`
|
|
26
|
+
`,f)}return{formatted:m,cursorOffset:l,comments:c.comments}}function sr(t,e,r){return typeof e!="number"||Number.isNaN(e)||e<0||e>t.length?r:e}function cu(t,e){let{cursorOffset:r,rangeStart:n,rangeEnd:u}=e;return r=sr(t,r,-1),n=sr(t,n,0),u=sr(t,u,t.length),{...e,cursorOffset:r,rangeStart:n,rangeEnd:u}}function mu(t,e){let{cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o}=cu(t,e),i=t.charAt(0)===lu;if(i&&(t=t.slice(1),r--,n--,u--),o==="auto"&&(o=Cr(t)),t.includes("\r")){let D=s=>Tt(t.slice(0,Math.max(s,0)),`\r
|
|
27
|
+
`);r-=D(r),n-=D(n),u-=D(u),t=hr(t)}return{hasBOM:i,text:t,options:cu(t,{...e,cursorOffset:r,rangeStart:n,rangeEnd:u,endOfLine:o})}}async function fu(t,e){let r=await Ue(e);return!r.hasPragma||r.hasPragma(t)}async function hi(t,e){return(await Ue(e)).hasIgnorePragma?.(t)}async function Dr(t,e){let{hasBOM:r,text:n,options:u}=mu(t,await se(e));if(u.rangeStart>=u.rangeEnd&&n!==""||u.requirePragma&&!await fu(n,u)||u.checkIgnorePragma&&await hi(n,u))return{formatted:t,cursorOffset:e.cursorOffset,comments:[]};let o;return u.rangeStart>0||u.rangeEnd<n.length?o=await Ci(n,u):(!u.requirePragma&&u.insertPragma&&u.printer.insertPragma&&!await fu(n,u)&&(n=u.printer.insertPragma(n)),o=await pu(n,u)),r&&(o.formatted=lu+o.formatted,o.cursorOffset>=0&&o.cursorOffset++),o}async function du(t,e,r){let{text:n,options:u}=mu(t,await se(e)),o=await me(n,u);return r&&(r.preprocessForPrint&&(o.ast=await ur(o.ast,u)),r.massage&&(o.ast=nu(o.ast,u))),o}async function Fu(t,e){e=await se(e);let r=await Ve(t,e);return Ce(r,e)}async function Eu(t,e){let r=Ur(t),{formatted:n}=await Dr(r,{...e,parser:"__js_expression"});return n}async function Cu(t,e){e=await se(e);let{ast:r}=await me(t,e);return e.cursorOffset>=0&&(e={...e,...or(r,e)}),Ve(r,e)}async function hu(t,e){return Ce(t,await se(e))}var ar={};yt(ar,{builders:()=>_i,printer:()=>yi,utils:()=>Ai});var _i={join:be,line:Ze,softline:Mr,hardline:W,literalline:Je,group:wt,conditionalGroup:Ir,fill:kr,lineSuffix:Ie,lineSuffixBoundary:Yr,cursor:ee,breakParent:ae,ifBreak:Rr,trim:jr,indent:oe,indentIfBreak:vr,align:De,addAlignmentToDoc:Qe,markAsRoot:Xe,dedentToRoot:Sr,dedent:br,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:Ot,label:Lr,concat:t=>t},yi={printDocToString:Ce},Ai={willBreak:xr,traverseDoc:Oe,findInDoc:Ke,mapDoc:Se,removeLines:Tr,stripTrailingHardline:He,replaceEndOfLine:Nr,canBreak:wr};var gu="3.9.0";var fr={};yt(fr,{addDanglingComment:()=>re,addLeadingComment:()=>ce,addTrailingComment:()=>fe,getAlignmentSize:()=>he,getIndentSize:()=>_u,getMaxContinuousCount:()=>yu,getNextNonSpaceNonCommentCharacter:()=>Au,getNextNonSpaceNonCommentCharacterIndex:()=>vi,getPreferredQuote:()=>Tu,getStringWidth:()=>Re,hasNewline:()=>H,hasNewlineInRange:()=>Nu,hasSpaces:()=>wu,isNextLineEmpty:()=>Ui,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>Mi,makeString:()=>ji,skip:()=>_e,skipEverythingButNewLine:()=>ut,skipInlineComment:()=>Be,skipNewline:()=>$,skipSpaces:()=>j,skipToLineEnd:()=>nt,skipTrailingComment:()=>Te,skipWhitespace:()=>tn});function xi(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 Be=xi;function Bi(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?ut(t,e):e}var Te=Bi;function Ti(t,e){let r=null,n=e;for(;n!==r;)r=n,n=j(t,n),n=Be(t,n),n=Te(t,n),n=$(t,n);return n}var We=Ti;function Ni(t,e){let r=null,n=e;for(;n!==r;)r=n,n=nt(t,n),n=Be(t,n),n=j(t,n);return n=Te(t,n),n=$(t,n),n!==!1&&H(t,n)}var gt=Ni;function wi(t,e){let r=t.lastIndexOf(`
|
|
28
|
+
`);return r===-1?0:he(t.slice(r+1).match(/^[\t ]*/)[0],e)}var _u=wi;function cr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Oi(t,e){let r=t.matchAll(new RegExp(`(?:${cr(e)})+`,"g"));return r.reduce||(r=[...r]),r.reduce((n,[u])=>Math.max(n,u.length),0)/e.length}var yu=Oi;function Pi(t,e){let r=We(t,e);return r===!1?"":t.charAt(r)}var Au=Pi;var xu=Object.freeze({character:"'",codePoint:39}),Bu=Object.freeze({character:'"',codePoint:34}),Si=Object.freeze({preferred:xu,alternate:Bu}),bi=Object.freeze({preferred:Bu,alternate:xu});function Tu(t,e){let{preferred:r,alternate:n}=e===!0||e==="'"?Si:bi,{length:u}=t,o=0,i=0;for(let D=0;D<u;D++){let s=t.charCodeAt(D);s===r.codePoint?o++:s===n.codePoint&&i++}return(o>i?n:r).character}function ki(t,e,r){for(let n=e;n<r;++n)if(t.charAt(n)===`
|
|
29
|
+
`)return!0;return!1}var Nu=ki;function Ii(t,e,r={}){return j(t,r.backwards?e-1:e,r)!==e}var wu=Ii;function Ri(t,e,r){return We(t,r(e))}function vi(t,e){return arguments.length===2||typeof e=="number"?We(t,e):Ri(...arguments)}function Li(t,e,r){return ve(t,r(e))}function Mi(t,e){return arguments.length===2||typeof e=="number"?ve(t,e):Li(...arguments)}function Yi(t,e,r){return gt(t,r(e))}function ji(t,e,r){let n=e==='"'?"'":'"',o=ne(0,t,/\\(.)|(["'])/gs,(i,D,s)=>D===n?D:s===e?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(D)?D:"\\"+D));return e+o+e}function Ui(t,e){return arguments.length===2||typeof e=="number"?gt(t,e):Yi(...arguments)}function de(t,e=1){return async(...r)=>{let n=r[e]??{},u=n.plugins??[];return r[e]={...n,plugins:Array.isArray(u)?u:Object.values(u)},await t(...r)}}var Ou=de(Dr);async function Pu(t,e){let{formatted:r}=await Ou(t,{...e,cursorOffset:-1});return r}async function Vi(t,e){return await Pu(t,e)===t}var Wi=de(it,0),$i={parse:de(du),formatAST:de(Fu),formatDoc:de(Eu),printToDoc:de(Cu),printDocToString:de(hu)};export{$i as __debug,Vi as check,Su as default,ar as doc,Pu as format,Ou as formatWithCursor,Wi as getSupportInfo,fr as util,gu as version};
|