var Fu=Object.defineProperty;var gu=(e,t,n)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>(gu(e,typeof t!="symbol"?t+"":t,n),n);import{Y as Eu,Z as yu,_ as _t,$ as vu,s as ye,u as X,D as M,E as V,h as $,d as E,j as H,F as Fe,i as k,G as I,H as A,A as ge,C as Ee,l as ae,m as se,n as Pe,f as Ge,a as G,g as ze,c as z,B as Vr,e as le,k as Cu,p as bu,N as _u,R as Au}from"./scheduler.88297443.js";import{g as $e,t as b,c as xe,a as v,S as ve,i as Ce,b as T,d as S,m as B,e as O,f as ku}from"./index.012ade26.js";import{g as Et,_ as re,F as wu,G as bn,H as Ot,k as Ur,I as qr,i as Nu,h as Tu,J as _n,j as Dn,d as Gr,f as zr,o as Su,t as Bu,e as Gn}from"./pages.a6863b67.js";import{w as Ou}from"./index.82bbb632.js";import{a as Iu,T as $u,b as Xt,c as Zt,d as xu,I as Lu,C as Kr,A as It}from"./PreviousNextPage.dbfec624.js";import"./prism-json.106361a3.js";import{B as At}from"./Button.0d9683f9.js";import{A as Ru,T as Pu}from"./ArgsList.07a91056.js";import{D as ju}from"./DirectiveTag.78b05bb9.js";function $t(e,t){const n=t.token={};function r(i,u,a,s){if(t.token!==n)return;t.resolved=s;let o=t.ctx;a!==void 0&&(o=o.slice(),o[a]=s);const l=i&&(t.current=i)(o);let c=!1;t.block&&(t.blocks?t.blocks.forEach((d,D)=>{D!==u&&d&&($e(),b(d,1,1,()=>{t.blocks[D]===d&&(t.blocks[D]=null)}),xe())}):t.block.d(1),l.c(),v(l,1),l.m(t.mount(),t.anchor),c=!0),t.block=l,t.blocks&&(t.blocks[u]=l),c&&vu()}if(Eu(e)){const i=yu();if(e.then(u=>{_t(i),r(t.then,1,t.value,u),_t(null)},u=>{if(_t(i),r(t.catch,2,t.error,u),_t(null),!t.hasCatch)throw u}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function Yr(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}function zn(e){let t,n;return{c(){t=M("title"),n=ae(e[1])},l(r){t=V(r,"title",{});var i=$(t);n=se(i,e[1]),i.forEach(E)},m(r,i){k(r,t,i),I(t,n)},p(r,i){i&2&&Pe(n,r[1])},d(r){r&&E(t)}}}function Mu(e){let t,n,r=e[1]&&zn(e),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:e[0]},{height:e[0]},e[2],e[3]],u={};for(let a=0;a{n(5,t=X(X({},t),Ee(l))),n(3,a=ge(t,u)),"size"in l&&n(0,s=l.size),"title"in l&&n(1,o=l.title)},e.$$.update=()=>{n(4,r=t["aria-label"]||t["aria-labelledby"]||o),n(2,i={"aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})},t=Ee(t),[s,o,i,a,r]}class Uu extends ve{constructor(t){super(),Ce(this,t,Vu,Mu,ye,{size:0,title:1})}}function Kn(e){let t,n;return{c(){t=M("title"),n=ae(e[1])},l(r){t=V(r,"title",{});var i=$(t);n=se(i,e[1]),i.forEach(E)},m(r,i){k(r,t,i),I(t,n)},p(r,i){i&2&&Pe(n,r[1])},d(r){r&&E(t)}}}function qu(e){let t,n,r,i=e[1]&&Kn(e),u=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:e[0]},{height:e[0]},e[2],e[3]],a={};for(let s=0;s{n(5,t=X(X({},t),Ee(l))),n(3,a=ge(t,u)),"size"in l&&n(0,s=l.size),"title"in l&&n(1,o=l.title)},e.$$.update=()=>{n(4,r=t["aria-label"]||t["aria-labelledby"]||o),n(2,i={"aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})},t=Ee(t),[s,o,i,a,r]}class zu extends ve{constructor(t){super(),Ce(this,t,Gu,qu,ye,{size:0,title:1})}}function Yn(e){let t,n;return{c(){t=M("title"),n=ae(e[1])},l(r){t=V(r,"title",{});var i=$(t);n=se(i,e[1]),i.forEach(E)},m(r,i){k(r,t,i),I(t,n)},p(r,i){i&2&&Pe(n,r[1])},d(r){r&&E(t)}}}function Ku(e){let t,n,r,i=e[1]&&Yn(e),u=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:e[0]},{height:e[0]},e[2],e[3]],a={};for(let s=0;s{n(5,t=X(X({},t),Ee(l))),n(3,a=ge(t,u)),"size"in l&&n(0,s=l.size),"title"in l&&n(1,o=l.title)},e.$$.update=()=>{n(4,r=t["aria-label"]||t["aria-labelledby"]||o),n(2,i={"aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})},t=Ee(t),[s,o,i,a,r]}class Jn extends ve{constructor(t){super(),Ce(this,t,Yu,Ku,ye,{size:0,title:1})}}function Wn(e){let t,n;return{c(){t=M("title"),n=ae(e[1])},l(r){t=V(r,"title",{});var i=$(t);n=se(i,e[1]),i.forEach(E)},m(r,i){k(r,t,i),I(t,n)},p(r,i){i&2&&Pe(n,r[1])},d(r){r&&E(t)}}}function Ju(e){let t,n,r,i,u=e[1]&&Wn(e),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:e[0]},{height:e[0]},e[2],e[3]],s={};for(let o=0;o{n(5,t=X(X({},t),Ee(l))),n(3,a=ge(t,u)),"size"in l&&n(0,s=l.size),"title"in l&&n(1,o=l.title)},e.$$.update=()=>{n(4,r=t["aria-label"]||t["aria-labelledby"]||o),n(2,i={"aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})},t=Ee(t),[s,o,i,a,r]}class Hn extends ve{constructor(t){super(),Ce(this,t,Wu,Ju,ye,{size:0,title:1})}}function Qn(e){let t,n;return{c(){t=M("title"),n=ae(e[1])},l(r){t=V(r,"title",{});var i=$(t);n=se(i,e[1]),i.forEach(E)},m(r,i){k(r,t,i),I(t,n)},p(r,i){i&2&&Pe(n,r[1])},d(r){r&&E(t)}}}function Hu(e){let t,n,r=e[1]&&Qn(e),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:e[0]},{height:e[0]},e[2],e[3]],u={};for(let a=0;a{n(5,t=X(X({},t),Ee(l))),n(3,a=ge(t,u)),"size"in l&&n(0,s=l.size),"title"in l&&n(1,o=l.title)},e.$$.update=()=>{n(4,r=t["aria-label"]||t["aria-labelledby"]||o),n(2,i={"aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})},t=Ee(t),[s,o,i,a,r]}class Xu extends ve{constructor(t){super(),Ce(this,t,Qu,Hu,ye,{size:0,title:1})}}var Q;(function(e){e.NEVER_NULL="never",e.ALWAYS_NULL="always",e.SOMETIMES_NULL="sometimes"})(Q||(Q={}));class Jr extends Error{constructor(n,r){super(r);ee(this,"type");this.type=n}}var Zu=Object.defineProperty,Wr=(e,t)=>{for(var n in t)Zu(e,n,{get:t[n],enumerable:!0})},Hr={};Wr(Hr,{languages:()=>Ma,options:()=>qa,parsers:()=>ui,printers:()=>ws});var ea=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},en=ea,ta="indent",na="group",ra="if-break",An="line",ia="break-parent",ua=()=>{},aa=ua;function te(e){return{type:ta,contents:e}}function oe(e,t={}){return aa(t.expandedStates),{type:na,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function he(e,t="",n={}){return{type:ra,breakContents:e,flatContents:t,groupId:n.groupId}}var sa={type:ia},oa={type:An,hard:!0},it={type:An},x={type:An,soft:!0},R=[oa,sa];function K(e,t){let n=[];for(let r=0;r{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:u}=t,a=n;for(;a>=0&&a0}var Zr=ya,va=class extends Error{constructor(n,r,i="type"){super(`Unexpected ${r} node ${i}: ${JSON.stringify(n[i])}.`);ee(this,"name","UnexpectedNodeError");this.node=n}},Ca=va,lt=null;function dt(e){if(lt!==null&&typeof lt.property){let t=lt;return lt=dt.prototype=null,t}return lt=dt.prototype=e??Object.create(null),new dt}var ba=10;for(let e=0;e<=ba;e++)dt();function _a(e){return dt(e)}function Aa(e,t="type"){_a(e);function n(r){let i=r[t],u=e[i];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return u}return n}var ka=Aa,wa=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ei=class{constructor(t,n,r,i,u,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=u,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ti={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};new Set(Object.keys(ti));var Xe;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Xe||(Xe={}));var Na=ka(ti,"kind"),Ta=Na;function ni(e){return e.loc.start}function ri(e){return e.loc.end}function Sa(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function Ba(e){return`# @format `+e}function Oa(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(it):i.push(R),i}var _e=Oa;function Ia(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...K(R,de(e,t,n,"definitions")),R];case"OperationDefinition":{let i=t.originalText[ni(r)]!=="{",u=!!r.name;return[i?r.operation:"",i&&u?[" ",n("name")]:"",i&&!u&&Zr(r.variableDefinitions)?" ":"",Xn(e,n),W(e,n,r),!i&&!u?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),Xn(e,n)," on ",n("typeCondition"),W(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",te([R,K(R,de(e,t,n,"selections"))]),R,"}"];case"Field":return oe([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?oe(["(",te([x,K([he("",", "),x],de(e,t,n,"arguments"))]),x,")"]):"",W(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=en(!1,r.value,'"""','\\"""').split(` `);return i.length===1&&(i[0]=i[0].trim()),i.every(u=>u==="")&&(i.length=0),K(R,['"""',...i,'"""'])}return['"',en(!1,en(!1,r.value,/["\\]/g,"\\$&"),` `,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return oe(["[",te([x,K([he("",", "),x],e.map(n,"values"))]),x,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return oe(["{",i,te([x,K([he("",", "),x],e.map(n,"fields"))]),x,he("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?oe(["(",te([x,K([he("",", "),x],de(e,t,n,"arguments"))]),x,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",W(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,u=[];return i.endsWith("TypeDefinition")?u.push(_e(e,t,n)):u.push("extend "),i.startsWith("ObjectType")?u.push("type"):i.startsWith("InputObjectType")?u.push("input"):u.push("interface"),u.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&u.push(" implements ",...La(e,t,n)),u.push(W(e,n,r)),r.fields.length>0&&u.push([" {",te([R,K(R,de(e,t,n,"fields"))]),R,"}"]),u}case"FieldDefinition":return[_e(e,t,n),n("name"),r.arguments.length>0?oe(["(",te([x,K([he("",", "),x],de(e,t,n,"arguments"))]),x,")"]):"",": ",n("type"),W(e,n,r)];case"DirectiveDefinition":return[_e(e,t,n),"directive ","@",n("name"),r.arguments.length>0?oe(["(",te([x,K([he("",", "),x],de(e,t,n,"arguments"))]),x,")"]):"",r.repeatable?" repeatable":""," on ",...K(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[_e(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),W(e,n,r),r.values.length>0?[" {",te([R,K(R,de(e,t,n,"values"))]),R,"}"]:""];case"EnumValueDefinition":return[_e(e,t,n),n("name"),W(e,n,r)];case"InputValueDefinition":return[_e(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",W(e,n,r)];case"SchemaExtension":return["extend schema",W(e,n,r),...r.operationTypes.length>0?[" {",te([R,K(R,de(e,t,n,"operationTypes"))]),R,"}"]:[]];case"SchemaDefinition":return[_e(e,t,n),"schema",W(e,n,r)," {",r.operationTypes.length>0?te([R,K(R,de(e,t,n,"operationTypes"))]):"",R,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),W(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",W(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return oe([_e(e,t,n),oe([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),W(e,n,r),r.types.length>0?[" =",he(""," "),te([he([it,"| "]),K([it,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[_e(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),W(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ca(r,"Graphql","kind")}}function W(e,t,n){if(n.directives.length===0)return"";let r=K(it,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?oe([it,r]):[" ",oe(te([x,r]))]}function de(e,t,n,r){return e.map(({isLast:i,node:u})=>{let a=n();return!i&&Ea(t.originalText,ri(u))?[a,R]:a},r)}function $a(e){return e.kind!=="Comment"}function xa(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function La(e,t,n){let{node:r}=e,i=[],{interfaces:u}=r,a=e.map(n,"interfaces");for(let s=0;sr.value.trim()==="prettier-ignore")}var Pa={print:Ia,massageAstNode:ii,hasPrettierIgnore:Ra,insertPragma:Ba,printComment:xa,canAttachComment:$a,getVisitorKeys:Ta},ja=Pa,Ma=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}],Va={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Ua={bracketSpacing:Va.bracketSpacing},qa=Ua,ui={};Wr(ui,{graphql:()=>ks});function Ga(e){return typeof e=="object"&&e!==null}function za(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var Ka=/\r\n|[\n\r]/g;function fn(e,t){let n=0,r=1;for(let i of e.body.matchAll(Ka)){if(typeof i.index=="number"||za(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ya(e){return ai(e.source,fn(e.source,e.start))}function ai(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,u=e.locationOffset.line-1,a=t.line+u,s=t.line===1?n:0,o=t.column+s,l=`${e.name}:${a}:${o} `,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){let D=Math.floor(o/80),p=o%80,f=[];for(let h=0;h["|",h]),["|","^".padStart(p)],["|",f[D+1]]])}return l+Zn([[`${a-1} |`,c[i-1]],[`${a} |`,d],["|","^".padStart(o)],[`${a+1} |`,c[i+1]]])}function Zn(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` `)}function Ja(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Wa=class si extends Error{constructor(t,...n){var r,i,u;let{nodes:a,source:s,positions:o,path:l,originalError:c,extensions:d}=Ja(n);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=c??void 0,this.nodes=er(Array.isArray(a)?a:a?[a]:void 0);let D=er((r=this.nodes)===null||r===void 0?void 0:r.map(f=>f.loc).filter(f=>f!=null));this.source=s??(D==null||(i=D[0])===null||i===void 0?void 0:i.source),this.positions=o??(D==null?void 0:D.map(f=>f.start)),this.locations=o&&s?o.map(f=>fn(s,f)):D==null?void 0:D.map(f=>fn(f.source,f.start));let p=Ga(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(u=d??p)!==null&&u!==void 0?u:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,si):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` `+Ya(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` `+ai(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function er(e){return e===void 0||e.length===0?void 0:e}function q(e,t,n){return new Wa(`Syntax Error: ${n}`,{source:e,positions:[t]})}var pn;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(pn||(pn={}));var C;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(C||(C={}));function Ha(e){return e===9||e===32}function gt(e){return e>=48&&e<=57}function oi(e){return e>=97&&e<=122||e>=65&&e<=90}function li(e){return oi(e)||e===95}function Qa(e){return oi(e)||gt(e)||e===95}function Xa(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;as===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Za(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function jt(e,t){return ci(e.charCodeAt(t))&&Di(e.charCodeAt(t+1))}function ci(e){return e>=55296&&e<=56319}function Di(e){return e>=56320&&e<=57343}function Ye(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return m.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function P(e,t,n,r,i){let u=e.line,a=1+n-e.lineStart;return new ei(t,n,r,u,a,i)}function ns(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function os(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw q(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function ls(e,t){let n=e.source.body,r=n.length,i=e.lineStart,u=t+3,a=u,s="",o=[];for(;u2?"["+hs(e)+"]":"{ "+n.map(([r,i])=>r+": "+Mt(i,t)).join(", ")+" }"}function ds(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let u=0;u1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function hs(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var ms=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var n;let r=t.prototype[Symbol.toStringTag],i=Symbol.toStringTag in e?e[Symbol.toStringTag]:(n=e.constructor)===null||n===void 0?void 0:n.name;if(r===i){let u=fi(e);throw new Error(`Cannot use ${r} "${u}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`)}}return!1},pi=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||nn(!1,`Body must be a string. Received: ${fi(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||nn(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||nn(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Fs(e){return ms(e,pi)}function gs(e,t){return new Es(e,t).parseDocument()}var Es=class{constructor(t,n={}){let r=Fs(t)?t:new pi(t);this._lexer=new es(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(m.NAME);return this.node(t,{kind:C.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:C.DOCUMENT,definitions:this.many(m.SOF,this.parseDefinition,m.EOF)})}parseDefinition(){if(this.peek(m.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===m.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw q(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(m.BRACE_L))return this.node(t,{kind:C.OPERATION_DEFINITION,operation:Xe.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(m.NAME)&&(r=this.parseName()),this.node(t,{kind:C.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(m.NAME);switch(t.value){case"query":return Xe.QUERY;case"mutation":return Xe.MUTATION;case"subscription":return Xe.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(m.PAREN_L,this.parseVariableDefinition,m.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:C.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(m.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(m.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(m.DOLLAR),this.node(t,{kind:C.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:C.SELECTION_SET,selections:this.many(m.BRACE_L,this.parseSelection,m.BRACE_R)})}parseSelection(){return this.peek(m.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(m.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:C.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(m.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(m.PAREN_L,n,m.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(m.COLON),this.node(n,{kind:C.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(m.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(m.NAME)?this.node(t,{kind:C.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:C.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case m.BRACKET_L:return this.parseList(t);case m.BRACE_L:return this.parseObject(t);case m.INT:return this.advanceLexer(),this.node(n,{kind:C.INT,value:n.value});case m.FLOAT:return this.advanceLexer(),this.node(n,{kind:C.FLOAT,value:n.value});case m.STRING:case m.BLOCK_STRING:return this.parseStringLiteral();case m.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:C.BOOLEAN,value:!0});case"false":return this.node(n,{kind:C.BOOLEAN,value:!1});case"null":return this.node(n,{kind:C.NULL});default:return this.node(n,{kind:C.ENUM,value:n.value})}case m.DOLLAR:if(t)if(this.expectToken(m.DOLLAR),this._lexer.token.kind===m.NAME){let r=this._lexer.token.value;throw q(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:C.STRING,value:t.value,block:t.kind===m.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:C.LIST,values:this.any(m.BRACKET_L,n,m.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:C.OBJECT,fields:this.any(m.BRACE_L,n,m.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(m.COLON),this.node(n,{kind:C.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(m.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(m.AT),this.node(n,{kind:C.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(m.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(m.BRACKET_R),n=this.node(t,{kind:C.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(m.BANG)?this.node(t,{kind:C.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:C.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(m.STRING)||this.peek(m.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(m.BRACE_L,this.parseOperationTypeDefinition,m.BRACE_R);return this.node(t,{kind:C.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(m.COLON);let r=this.parseNamedType();return this.node(t,{kind:C.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:C.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:C.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:u,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(m.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(m.BRACE_L,this.parseFieldDefinition,m.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(m.COLON);let u=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:C.FIELD_DEFINITION,description:n,name:r,arguments:i,type:u,directives:a})}parseArgumentDefs(){return this.optionalMany(m.PAREN_L,this.parseInputValueDef,m.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(m.COLON);let i=this.parseTypeReference(),u;this.expectOptionalToken(m.EQUALS)&&(u=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:C.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:u,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:C.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:u,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),u=this.parseUnionMemberTypes();return this.node(t,{kind:C.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:u})}parseUnionMemberTypes(){return this.expectOptionalToken(m.EQUALS)?this.delimitedMany(m.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),u=this.parseEnumValuesDefinition();return this.node(t,{kind:C.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:u})}parseEnumValuesDefinition(){return this.optionalMany(m.BRACE_L,this.parseEnumValueDefinition,m.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:C.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw q(this._lexer.source,this._lexer.token.start,`${kt(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),u=this.parseInputFieldsDefinition();return this.node(t,{kind:C.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:u})}parseInputFieldsDefinition(){return this.optionalMany(m.BRACE_L,this.parseInputValueDef,m.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===m.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(m.BRACE_L,this.parseOperationTypeDefinition,m.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:C.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:C.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),u=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:C.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:u})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),u=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:C.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:u})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:C.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:C.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:C.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(m.AT);let r=this.parseName(),i=this.parseArgumentDefs(),u=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:C.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:u,locations:a})}parseDirectiveLocations(){return this.delimitedMany(m.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(pn,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new wa(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw q(this._lexer.source,n.start,`Expected ${di(t)}, found ${kt(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===m.NAME&&n.value===t)this.advanceLexer();else throw q(this._lexer.source,n.start,`Expected "${t}", found ${kt(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===m.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return q(this._lexer.source,n.start,`Unexpected ${kt(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==m.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw q(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function kt(e){let t=e.value;return di(e.kind)+(t!=null?` "${t}"`:"")}function di(e){return ts(e)?`"${e}"`:e}function ys(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var vs=ys;function Cs(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var bs={allowLegacyFragmentVariables:!0};function _s(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return vs(t,{loc:{start:n},cause:e})}return e}function As(e){let t;try{t=gs(e,bs)}catch(n){throw _s(n)}return t.comments=Cs(t),t}var ks={parse:As,astFormat:"graphql",hasPragma:Sa,locStart:ni,locEnd:ri},ws={graphql:ja},Ns=Hr,Ts=Object.create,Vt=Object.defineProperty,Ss=Object.getOwnPropertyDescriptor,Bs=Object.getOwnPropertyNames,Os=Object.getPrototypeOf,Is=Object.prototype.hasOwnProperty,$s=(e,t)=>()=>(e&&(t=e(e=0)),t),Ut=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qt=(e,t)=>{for(var n in t)Vt(e,n,{get:t[n],enumerable:!0})},hi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bs(t))!Is.call(e,i)&&i!==n&&Vt(e,i,{get:()=>t[i],enumerable:!(r=Ss(t,i))||r.enumerable});return e},yt=(e,t,n)=>(n=e!=null?Ts(Os(e)):{},hi(t||!e||!e.__esModule?Vt(n,"default",{value:e,enumerable:!0}):n,e)),xs=e=>hi(Vt({},"__esModule",{value:!0}),e),Ls=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},nr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ct=(e,t,n)=>(Ls(e,t,"access private method"),n),Rs=Ut(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}t.prototype={diff:function(i,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=a.callback;typeof a=="function"&&(s=a,a={}),this.options=a;var o=this;function l(y){return s?(setTimeout(function(){s(void 0,y)},0),!0):y}i=this.castInput(i),u=this.castInput(u),i=this.removeEmpty(this.tokenize(i)),u=this.removeEmpty(this.tokenize(u));var c=u.length,d=i.length,D=1,p=c+d;a.maxEditLength&&(p=Math.min(p,a.maxEditLength));var f=[{newPos:-1,components:[]}],h=this.extractCommon(f[0],u,i,0);if(f[0].newPos+1>=c&&h+1>=d)return l([{value:this.join(u),count:u.length}]);function F(){for(var y=-1*D;y<=D;y+=2){var _=void 0,w=f[y-1],N=f[y+1],L=(N?N.newPos:0)-y;w&&(f[y-1]=void 0);var j=w&&w.newPos+1=c&&L+1>=d)return l(n(o,_.components,u,i,o.useLongestToken));f[y]=_}D++}if(s)(function y(){setTimeout(function(){if(D>p)return s();F()||y()},0)})();else for(;D<=p;){var g=F();if(g)return g}},pushComponent:function(i,u,a){var s=i[i.length-1];s&&s.added===u&&s.removed===a?i[i.length-1]={count:s.count+1,added:u,removed:a}:i.push({count:1,added:u,removed:a})},extractCommon:function(i,u,a,s){for(var o=u.length,l=a.length,c=i.newPos,d=c-s,D=0;c+1g.length?_:g}),p.value=i.join(h)}else p.value=i.join(a.slice(d,d+p.count));d+=p.count,p.added||(D+=p.count)}}var F=u[c-1];return c>1&&typeof F.value=="string"&&(F.added||F.removed)&&i.equals("",F.value)&&(u[c-2].value+=F.value,u.pop()),u}function r(i){return{newPos:i.newPos,components:i.components.slice(0)}}}),Ps=Ut(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=i,e.arrayDiff=void 0;var t=n(Rs());function n(u){return u&&u.__esModule?u:{default:u}}var r=new t.default;e.arrayDiff=r,r.tokenize=function(u){return u.slice()},r.join=r.removeEmpty=function(u){return u};function i(u,a,s){return r.diff(u,a,s)}}),Gt=Ut((e,t)=>{var n=new Proxy(String,{get:()=>n});t.exports=n}),mi={};qt(mi,{default:()=>gi,shouldHighlight:()=>Fi});var Fi,gi,js=$s(()=>{Fi=()=>!1,gi=String}),Ms=Ut(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=d,e.default=D;var t=(js(),xs(mi)),n=i(Gt(),!0);function r(p){if(typeof WeakMap!="function")return null;var f=new WeakMap,h=new WeakMap;return(r=function(F){return F?h:f})(p)}function i(p,f){if(!f&&p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var h=r(f);if(h&&h.has(p))return h.get(p);var F={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in p)if(y!=="default"&&Object.prototype.hasOwnProperty.call(p,y)){var _=g?Object.getOwnPropertyDescriptor(p,y):null;_&&(_.get||_.set)?Object.defineProperty(F,y,_):F[y]=p[y]}return F.default=p,h&&h.set(p,F),F}var u;function a(p){return p?(u!=null||(u=new n.default.constructor({enabled:!0,level:1})),u):n.default}var s=!1;function o(p){return{gutter:p.grey,marker:p.red.bold,message:p.red.bold}}var l=/\r\n|[\n\r\u2028\u2029]/;function c(p,f,h){let F=Object.assign({column:0,line:-1},p.start),g=Object.assign({},F,p.end),{linesAbove:y=2,linesBelow:_=3}=h||{},w=F.line,N=F.column,L=g.line,j=g.column,Z=Math.max(w-(y+1),0),Me=Math.min(f.length,L+_);w===-1&&(Z=0),L===-1&&(Me=f.length);let Oe=L-w,J={};if(Oe)for(let fe=0;fe<=Oe;fe++){let pe=fe+w;if(!N)J[pe]=!0;else if(fe===0){let Ve=f[pe-1].length;J[pe]=[N,Ve-N+1]}else if(fe===Oe)J[pe]=[0,j];else{let Ve=f[pe-fe].length;J[pe]=[0,Ve]}}else N===j?N?J[w]=[N,0]:J[w]=!0:J[w]=[N,j-N];return{start:Z,end:Me,markerLines:J}}function d(p,f,h={}){let F=(h.highlightCode||h.forceColor)&&(0,t.shouldHighlight)(h),g=a(h.forceColor),y=o(g),_=(J,fe)=>F?J(fe):fe,w=p.split(l),{start:N,end:L,markerLines:j}=c(f,w,h),Z=f.start&&typeof f.start.column=="number",Me=String(L).length,Oe=(F?(0,t.default)(p,h):p).split(l,L).slice(N,L).map((J,fe)=>{let pe=N+1+fe,Ve=` ${` ${pe}`.slice(-Me)} |`,bt=j[pe],du=!j[pe+1];if(bt){let Qt="";if(Array.isArray(bt)){let hu=J.slice(0,Math.max(bt[0]-1,0)).replace(/[^\t]/g," "),mu=bt[1]||1;Qt=[` `,_(y.gutter,Ve.replace(/\d/g," "))," ",hu,_(y.marker,"^").repeat(mu)].join(""),du&&h.message&&(Qt+=" "+_(y.message,h.message))}return[_(y.marker,">"),_(y.gutter,Ve),J.length>0?` ${J}`:"",Qt].join("")}else return` ${_(y.gutter,Ve)}${J.length>0?` ${J}`:""}`}).join(` `);return h.message&&!Z&&(Oe=`${" ".repeat(Me+1)}${h.message} ${Oe}`),F?g.reset(Oe):Oe}function D(p,f,h,F={}){if(!s){s=!0;let g="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let y=new Error(g);y.name="DeprecationWarning",console.warn(new Error(g))}}return h=Math.max(h,0),d(p,{start:{column:h,line:f}},F)}}),Ei={};qt(Ei,{__debug:()=>Pc,check:()=>Lc,doc:()=>ru,format:()=>au,formatWithCursor:()=>uu,getSupportInfo:()=>Rc,util:()=>iu,version:()=>fc});var Vs=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},zt=Vs,Us=yt(Ps(),1);function qs(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` `?"crlf":"cr":"lf"}function wn(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` `}}function yi(e,t){let n;switch(t){case` `:n=/\n/g;break;case"\r":n=/\r/g;break;case`\r `:n=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let r=e.match(n);return r?r.length:0}function Gs(e){return zt(!1,e,/\r\n?/g,` `)}var We="string",Le="array",He="cursor",ke="indent",we="align",Ne="trim",ie="group",ce="fill",ue="if-break",Te="indent-if-break",Se="line-suffix",Be="line-suffix-boundary",Y="line",be="label",De="break-parent",vi=new Set([He,ke,we,Ne,ie,ce,ue,Te,Se,Be,Y,be,De]);function zs(e){if(typeof e=="string")return We;if(Array.isArray(e))return Le;if(!e)return;let{type:t}=e;if(vi.has(t))return t}var Qe=zs,Ks=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Ys(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(Qe(e))throw new Error("doc is valid.");let n=Object.prototype.toString.call(e);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Ks([...vi].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${r}.`}var Js=class extends Error{constructor(t){super(Ys(t));ee(this,"name","InvalidDocError");this.doc=t}},ut=Js,rr={};function Ws(e,t,n,r){let i=[e];for(;i.length>0;){let u=i.pop();if(u===rr){n(i.pop());continue}n&&i.push(u,rr);let a=Qe(u);if(!a)throw new ut(u);if((t==null?void 0:t(u))!==!1)switch(a){case Le:case ce:{let s=a===Le?u:u.parts;for(let o=s.length,l=o-1;l>=0;--l)i.push(s[l]);break}case ue:i.push(u.flatContents,u.breakContents);break;case ie:if(r&&u.expandedStates)for(let s=u.expandedStates.length,o=s-1;o>=0;--o)i.push(u.expandedStates[o]);else i.push(u.contents);break;case we:case ke:case Te:case be:case Se:i.push(u.contents);break;case We:case He:case Ne:case Be:case Y:case De:break;default:throw new ut(u)}}}var Nn=Ws,Hs=()=>{},Qs=Hs;function xt(e){return{type:ke,contents:e}}function at(e,t){return{type:we,contents:t,n:e}}function Ci(e,t={}){return Qs(t.expandedStates),{type:ie,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Xs(e){return at(Number.NEGATIVE_INFINITY,e)}function Zs(e){return at({type:"root"},e)}function eo(e){return at(-1,e)}function to(e,t){return Ci(e[0],{...t,expandedStates:e})}function bi(e){return{type:ce,parts:e}}function no(e,t="",n={}){return{type:ue,breakContents:e,flatContents:t,groupId:n.groupId}}function ro(e,t){return{type:Te,contents:e,groupId:t.groupId,negate:t.negate}}function dn(e){return{type:Se,contents:e}}var io={type:Be},Kt={type:De},uo={type:Ne},Tn={type:Y,hard:!0},_i={type:Y,hard:!0,literal:!0},Ai={type:Y},ao={type:Y,soft:!0},Ke=[Tn,Kt],ki=[_i,Kt],hn={type:He};function wi(e,t){let n=[];for(let r=0;r0){for(let i=0;i0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${r(u.contents)}${d})`}if(u.type===ie){let c=[];u.break&&u.break!=="propagated"&&c.push("shouldBreak: true"),u.id&&c.push(`id: ${i(u.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(D=>r(D)).join(",")}]${d})`:`group(${r(u.contents)}${d})`}if(u.type===ce)return`fill([${u.parts.map(c=>r(c)).join(", ")}])`;if(u.type===Se)return"lineSuffix("+r(u.contents)+")";if(u.type===Be)return"lineSuffixBoundary";if(u.type===be)return`label(${JSON.stringify(u.label)}, ${r(u.contents)})`;throw new Error("Unknown doc type "+u.type)}function i(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in t)return t[u];let a=u.description||"symbol";for(let s=0;;s++){let o=a+(s>0?` #${s}`:"");if(!n.has(o))return n.add(o),t[u]=`Symbol.for(${JSON.stringify(o)})`}}}var lo=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},U=lo,co=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Do(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function fo(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var po=e=>!(Do(e)||fo(e)),ho=/[^\x20-\x7F]/;function mo(e){if(!e)return 0;if(!ho.test(e))return e.length;e=e.replace(co()," ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||(t+=po(r)?1:2)}return t}var Sn=mo,Fo=e=>{if(Array.isArray(e))return e;if(e.type!==ce)throw new Error(`Expect doc to be 'array' or '${ce}'.`);return e.parts};function Yt(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(u){if(n.has(u))return n.get(u);let a=i(u);return n.set(u,a),a}function i(u){switch(Qe(u)){case Le:return t(u.map(r));case ce:return t({...u,parts:u.parts.map(r)});case ue:return t({...u,breakContents:r(u.breakContents),flatContents:r(u.flatContents)});case ie:{let{expandedStates:a,contents:s}=u;return a?(a=a.map(r),s=a[0]):s=r(s),t({...u,contents:s,expandedStates:a})}case we:case ke:case Te:case be:case Se:return t({...u,contents:r(u.contents)});case We:case He:case Ne:case Be:case Y:case De:return t(u);default:throw new ut(u)}}}function Bn(e,t,n){let r=n,i=!1;function u(a){if(i)return!1;let s=t(a);s!==void 0&&(i=!0,r=s)}return Nn(e,u),r}function go(e){if(e.type===ie&&e.break||e.type===Y&&e.hard||e.type===De)return!0}function Eo(e){return Bn(e,go,!1)}function ir(e){if(e.length>0){let t=U(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function yo(e){let t=new Set,n=[];function r(u){if(u.type===De&&ir(n),u.type===ie){if(n.push(u),t.has(u))return!1;t.add(u)}}function i(u){u.type===ie&&n.pop().break&&ir(n)}Nn(e,r,i,!0)}function vo(e){return e.type===Y&&!e.hard?e.soft?"":" ":e.type===ue?e.flatContents:e}function Co(e){return Yt(e,vo)}function ur(e){for(e=[...e];e.length>=2&&U(!1,e,-2).type===Y&&U(!1,e,-1).type===De;)e.length-=2;if(e.length>0){let t=ht(U(!1,e,-1));e[e.length-1]=t}return e}function ht(e){switch(Qe(e)){case we:case ke:case Te:case ie:case Se:case be:{let t=ht(e.contents);return{...e,contents:t}}case ue:return{...e,breakContents:ht(e.breakContents),flatContents:ht(e.flatContents)};case ce:return{...e,parts:ur(e.parts)};case Le:return ur(e);case We:return e.replace(/[\n\r]*$/,"");case He:case Ne:case Be:case Y:case De:break;default:throw new ut(e)}return e}function Ti(e){return ht(_o(e))}function bo(e){switch(Qe(e)){case ce:if(e.parts.every(t=>t===""))return"";break;case ie:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ie&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case we:case ke:case Te:case Se:if(!e.contents)return"";break;case ue:if(!e.flatContents&&!e.breakContents)return"";break;case Le:{let t=[];for(let n of e){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof U(!1,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case We:case He:case Ne:case Be:case Y:case be:case De:break;default:throw new ut(e)}return e}function _o(e){return Yt(e,t=>bo(t))}function Ao(e,t=ki){return Yt(e,n=>typeof n=="string"?wi(t,n.split(` `)):n)}function ko(e){if(e.type===Y)return!0}function wo(e){return Bn(e,ko,!1)}function Si(e,t){return e.type===be?{...e,contents:t(e.contents)}:t(e)}var ne=Symbol("MODE_BREAK"),me=Symbol("MODE_FLAT"),mt=Symbol("cursor");function Bi(){return{value:"",length:0,queue:[]}}function No(e,t){return mn(e,{type:"indent"},t)}function To(e,t,n){return t===Number.NEGATIVE_INFINITY?e.root||Bi():t<0?mn(e,{type:"dedent"},n):t?t.type==="root"?{...e,root:e}:mn(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},n):e}function mn(e,t,n){let r=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",u=0,a=0,s=0;for(let f of r)switch(f.type){case"indent":c(),n.useTabs?o(1):l(n.tabWidth);break;case"stringAlign":c(),i+=f.n,u+=f.n.length;break;case"numberAlign":a+=1,s+=f.n;break;default:throw new Error(`Unexpected type '${f.type}'`)}return D(),{...e,value:i,length:u,queue:r};function o(f){i+=" ".repeat(f),u+=n.tabWidth*f}function l(f){i+=" ".repeat(f),u+=f}function c(){n.useTabs?d():D()}function d(){a>0&&o(a),p()}function D(){s>0&&l(s),p()}function p(){a=0,s=0}}function Fn(e){let t=0,n=0,r=e.length;e:for(;r--;){let i=e[r];if(i===mt){n++;continue}for(let u=i.length-1;u>=0;u--){let a=i[u];if(a===" "||a===" ")t++;else{e[r]=i.slice(0,u+1);break e}}}if(t>0||n>0)for(e.length=r+1;n-- >0;)e.push(mt);return t}function wt(e,t,n,r,i,u){if(n===Number.POSITIVE_INFINITY)return!0;let a=t.length,s=[e],o=[];for(;n>=0;){if(s.length===0){if(a===0)return!0;s.push(t[--a]);continue}let{mode:l,doc:c}=s.pop();switch(Qe(c)){case We:o.push(c),n-=Sn(c);break;case Le:case ce:{let d=Fo(c);for(let D=d.length-1;D>=0;D--)s.push({mode:l,doc:d[D]});break}case ke:case we:case Te:case be:s.push({mode:l,doc:c.contents});break;case Ne:n+=Fn(o);break;case ie:{if(u&&c.break)return!1;let d=c.break?ne:l,D=c.expandedStates&&d===ne?U(!1,c.expandedStates,-1):c.contents;s.push({mode:d,doc:D});break}case ue:{let d=(c.groupId?i[c.groupId]||me:l)===ne?c.breakContents:c.flatContents;d&&s.push({mode:l,doc:d});break}case Y:if(l===ne||c.hard)return!0;c.soft||(o.push(" "),n--);break;case Se:r=!0;break;case Be:if(r)return!1;break}}return!1}function Jt(e,t){let n={},r=t.printWidth,i=wn(t.endOfLine),u=0,a=[{ind:Bi(),mode:ne,doc:e}],s=[],o=!1,l=[],c=0;for(yo(e);a.length>0;){let{ind:D,mode:p,doc:f}=a.pop();switch(Qe(f)){case We:{let h=i!==` `?zt(!1,f,` `,i):f;s.push(h),a.length>0&&(u+=Sn(h));break}case Le:for(let h=f.length-1;h>=0;h--)a.push({ind:D,mode:p,doc:f[h]});break;case He:if(c>=2)throw new Error("There are too many 'cursor' in doc.");s.push(mt),c++;break;case ke:a.push({ind:No(D,t),mode:p,doc:f.contents});break;case we:a.push({ind:To(D,f.n,t),mode:p,doc:f.contents});break;case Ne:u-=Fn(s);break;case ie:switch(p){case me:if(!o){a.push({ind:D,mode:f.break?ne:me,doc:f.contents});break}case ne:{o=!1;let h={ind:D,mode:me,doc:f.contents},F=r-u,g=l.length>0;if(!f.break&&wt(h,a,F,g,n))a.push(h);else if(f.expandedStates){let y=U(!1,f.expandedStates,-1);if(f.break){a.push({ind:D,mode:ne,doc:y});break}else for(let _=1;_=f.expandedStates.length){a.push({ind:D,mode:ne,doc:y});break}else{let w=f.expandedStates[_],N={ind:D,mode:me,doc:w};if(wt(N,a,F,g,n)){a.push(N);break}}}else a.push({ind:D,mode:ne,doc:f.contents});break}}f.id&&(n[f.id]=U(!1,a,-1).mode);break;case ce:{let h=r-u,{parts:F}=f;if(F.length===0)break;let[g,y]=F,_={ind:D,mode:me,doc:g},w={ind:D,mode:ne,doc:g},N=wt(_,[],h,l.length>0,n,!0);if(F.length===1){N?a.push(_):a.push(w);break}let L={ind:D,mode:me,doc:y},j={ind:D,mode:ne,doc:y};if(F.length===2){N?a.push(L,_):a.push(j,w);break}F.splice(0,2);let Z={ind:D,mode:p,doc:bi(F)},Me=F[0];wt({ind:D,mode:me,doc:[g,y,Me]},[],h,l.length>0,n,!0)?a.push(Z,L,_):N?a.push(Z,j,_):a.push(Z,j,w);break}case ue:case Te:{let h=f.groupId?n[f.groupId]:p;if(h===ne){let F=f.type===ue?f.breakContents:f.negate?f.contents:xt(f.contents);F&&a.push({ind:D,mode:p,doc:F})}if(h===me){let F=f.type===ue?f.flatContents:f.negate?xt(f.contents):f.contents;F&&a.push({ind:D,mode:p,doc:F})}break}case Se:l.push({ind:D,mode:p,doc:f.contents});break;case Be:l.length>0&&a.push({ind:D,mode:p,doc:Tn});break;case Y:switch(p){case me:if(f.hard)o=!0;else{f.soft||(s.push(" "),u+=1);break}case ne:if(l.length>0){a.push({ind:D,mode:p,doc:f},...l.reverse()),l.length=0;break}f.literal?D.root?(s.push(i,D.root.value),u=D.root.length):(s.push(i),u=0):(u-=Fn(s),s.push(i+D.value),u=D.length);break}break;case be:a.push({ind:D,mode:p,doc:f.contents});break;case De:break;default:throw new ut(f)}a.length===0&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let d=s.indexOf(mt);if(d!==-1){let D=s.indexOf(mt,d+1),p=s.slice(0,d).join(""),f=s.slice(d+1,D).join(""),h=s.slice(D+1).join("");return{formatted:p+f+h,cursorNodeStart:p.length,cursorNodeText:f}}return{formatted:s.join("")}}function So(e,t,n=0){let r=0;for(let i=n;i1?U(!1,e,-2):null}getValue(){return U(!1,this.stack,-1)}getNode(e=0){let t=ct(this,Tt,gn).call(this,e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:n}=this,{length:r}=n,i=U(!1,n,-1);for(let u of t)i=i[u],n.push(u,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=ct(this,Tt,gn).call(this,t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=U(!1,n,-1);for(let u of t)i=i[u],n.push(u,i);try{for(let u=0;u{n[i]=e(r,i,u)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let u=null;if(typeof n=="number"&&(u=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,u))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of ct(this,pt,St).call(this))if(e(t))return t}hasAncestor(e){for(let t of ct(this,pt,St).call(this))if(e(t))return!0;return!1}};Tt=new WeakSet,gn=function(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1},pt=new WeakSet,St=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}};var Oo=Bo,Oi=new Proxy(()=>{},{get:()=>Oi}),En=Oi;function Io(e){return e!==null&&typeof e=="object"}var $o=Io;function*Ii(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=u=>$o(u)&&r(u);for(let u of n(e)){let a=e[u];if(Array.isArray(a))for(let s of a)i(s)&&(yield s);else i(a)&&(yield a)}}function*xo(e,t){let n=[e];for(let r=0;r{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:u}=t,a=n;for(;a>=0&&a0}var Mo=jo,Li=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Vo=e=>Object.keys(e).filter(t=>!Li.has(t));function Uo(e){return e?t=>e(t,Li):Vo}var Wt=Uo;function qo(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"…"),t+(n?" "+n:"")}function In(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=qo(e)}function Ze(e,t){t.leading=!0,t.trailing=!1,In(e,t)}function Ue(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),In(e,t)}function et(e,t){t.leading=!1,t.trailing=!0,In(e,t)}var rn=new WeakMap;function $n(e,t){if(rn.has(e))return rn.get(e);let{printer:{getCommentChildNodes:n,canAttachComment:r,getVisitorKeys:i},locStart:u,locEnd:a}=t;if(!r)return[];let s=((n==null?void 0:n(e,t))??[...Ii(e,{getVisitorKeys:Wt(i)})]).flatMap(o=>r(o)?[o]:$n(o,t));return s.sort((o,l)=>u(o)-u(l)||a(o)-a(l)),rn.set(e,s),s}function Ri(e,t,n,r){let{locStart:i,locEnd:u}=n,a=i(t),s=u(t),o=$n(e,n),l,c,d=0,D=o.length;for(;d>1,f=o[p],h=i(f),F=u(f);if(h<=a&&s<=F)return Ri(f,t,n,f);if(F<=a){l=f,d=p+1;continue}if(s<=h){c=f,D=p;continue}throw new Error("Comment location overlaps with node location")}if((r==null?void 0:r.type)==="TemplateLiteral"){let{quasis:p}=r,f=an(p,t,n);l&&an(p,l,n)!==f&&(l=null),c&&an(p,c,n)!==f&&(c=null)}return{enclosingNode:r,precedingNode:l,followingNode:c}}var un=()=>!1;function Go(e,t){let{comments:n}=e;if(delete e.comments,!Mo(n)||!t.printer.canAttachComment)return;let r=[],{locStart:i,locEnd:u,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:s={}},originalText:o}=t,{ownLine:l=un,endOfLine:c=un,remaining:d=un}=s,D=n.map((p,f)=>({...Ri(e,p,t),comment:p,text:o,options:t,ast:e,isLastComment:n.length-1===f}));for(let[p,f]of D.entries()){let{comment:h,precedingNode:F,enclosingNode:g,followingNode:y,text:_,options:w,ast:N,isLastComment:L}=f;if(w.parser==="json"||w.parser==="json5"||w.parser==="jsonc"||w.parser==="__js_expression"||w.parser==="__ts_expression"||w.parser==="__vue_expression"||w.parser==="__vue_ts_expression"){if(i(h)-i(N)<=0){Ze(N,h);continue}if(u(h)-u(N)>=0){et(N,h);continue}}let j;if(a?j=[f]:(h.enclosingNode=g,h.precedingNode=F,h.followingNode=y,j=[h,_,w,N,L]),zo(_,w,D,p))h.placement="ownLine",l(...j)||(y?Ze(y,h):F?et(F,h):Ue(g||N,h));else if(Ko(_,w,D,p))h.placement="endOfLine",c(...j)||(F?et(F,h):y?Ze(y,h):Ue(g||N,h));else if(h.placement="remaining",!d(...j))if(F&&y){let Z=r.length;Z>0&&r[Z-1].followingNode!==y&&ar(r,w),r.push(f)}else F?et(F,h):y?Ze(y,h):Ue(g||N,h)}if(ar(r,t),!a)for(let p of n)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var Pi=e=>!/[\S\n\u2028\u2029]/.test(e);function zo(e,t,n,r){let{comment:i,precedingNode:u}=n[r],{locStart:a,locEnd:s}=t,o=a(i);if(u)for(let l=r-1;l>=0;l--){let{comment:c,precedingNode:d}=n[l];if(d!==u||!Pi(e.slice(s(c),o)))break;o=a(c)}return Ie(e,o,{backwards:!0})}function Ko(e,t,n,r){let{comment:i,followingNode:u}=n[r],{locStart:a,locEnd:s}=t,o=s(i);if(u)for(let l=r+1;l0;--o){let{comment:l,precedingNode:c,followingNode:d}=e[o-1];En.strictEqual(c,u),En.strictEqual(d,a);let D=t.originalText.slice(t.locEnd(l),s);if(((r=(n=t.printer).isGap)==null?void 0:r.call(n,D,t))??/^[\s(]*$/.test(D))s=t.locStart(l);else break}for(let[l,{comment:c}]of e.entries())l1&&l.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function an(e,t,n){let r=n.locStart(t)-1;for(let i=1;i!r.has(s)).length===0)return{leading:"",trailing:""};let i=[],u=[],a;return e.each(()=>{let s=e.node;if(r!=null&&r.has(s))return;let{leading:o,trailing:l}=s;o?i.push(Jo(e,t)):l&&(a=Wo(e,t,a),u.push(a.doc))},"comments"),{leading:i,trailing:u}}function Qo(e,t,n){let{leading:r,trailing:i}=Ho(e,n);return!r&&!i?t:Si(t,u=>[r,u,i])}function Xo(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}var Mi=class extends Error{constructor(){super(...arguments);ee(this,"name","ConfigError")}},sr=class extends Error{constructor(){super(...arguments);ee(this,"name","UndefinedParserError")}},Zo={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function Vi({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(i=>i.languages??[]),r=[];for(let i of tl(Object.assign({},...e.map(({options:u})=>u),Zo)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(u=>!u.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...el(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(u=>{var a;return((a=u.defaultOptions)==null?void 0:a[i.name])!==void 0}).map(u=>[u.name,u.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*el(e,t,n){let r=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let u of i.parsers)if(!r.has(u)){r.add(u);let a=n.find(o=>o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,u)),s=i.name;a!=null&&a.name&&(s+=` (plugin: ${a.name})`),yield{value:u,description:s}}}}function tl(e){let t=[];for(let[n,r]of Object.entries(e)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=U(!1,i.default,-1).value),t.push(i)}return t}var nl=e=>String(e).split(/[/\\]/).pop();function or(e,t){if(!t)return;let n=nl(t).toLowerCase();return e.find(({filenames:r})=>r==null?void 0:r.some(i=>i.toLowerCase()===n))??e.find(({extensions:r})=>r==null?void 0:r.some(i=>n.endsWith(i)))}function rl(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n==null?void 0:n.includes(t))??e.find(({extensions:n})=>n==null?void 0:n.includes(`.${t}`))}function il(e,t){let n=e.plugins.flatMap(i=>i.languages??[]),r=rl(n,t.language)??or(n,t.physicalFile)??or(n,t.file)??(t.physicalFile,void 0);return r==null?void 0:r.parsers[0]}var ul=il,tt={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>tt.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${tt.key(n)}: ${tt.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>tt.value({[e]:t})},lr=yt(Gt(),1),al=(e,t,{descriptor:n})=>{let r=[`${lr.default.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${lr.default.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},nt=yt(Gt(),1),Ui=Symbol.for("vnopts.VALUE_NOT_EXIST"),Bt=Symbol.for("vnopts.VALUE_UNCHANGED"),cr=" ".repeat(2),sl=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),u=[];return r&&u.push(Dr(e,t,r,n.descriptor)),i&&u.push([Dr(e,t,i.title,n.descriptor)].concat(i.values.map(a=>qi(a,n.loggerPrintWidth))).join(` `)),Gi(u,n.loggerPrintWidth)};function Dr(e,t,n,r){return[`Invalid ${nt.default.red(r.key(e))} value.`,`Expected ${nt.default.blue(n)},`,`but received ${t===Ui?nt.default.gray("nothing"):nt.default.red(r.value(t))}.`].join(" ")}function qi({text:e,list:t},n){let r=[];return e&&r.push(`- ${nt.default.blue(e)}`),t&&r.push([`- ${nt.default.blue(t.title)}:`].concat(t.values.map(i=>qi(i,n-cr.length).replace(/^|\n/g,`$&${cr}`))).join(` `)),Gi(r,n)}function Gi(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,u]=e.map(a=>a.split(` `,1)[0].length);return i>t&&i>u?r:n}var fr=yt(Gt(),1),sn=[],pr=[];function ol(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let u=0;for(;us?l>s?s+1:l:l>o?o+1:l;return s}var zi=(e,t,{descriptor:n,logger:r,schemas:i})=>{let u=[`Ignored unknown option ${fr.default.yellow(n.pair({key:e,value:t}))}.`],a=Object.keys(i).sort().find(s=>ol(e,s)<3);a&&u.push(`Did you mean ${fr.default.blue(n.key(a))}?`),r.warn(u.join(" "))},ll=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function cl(e,t){let n=new e(t),r=Object.create(n);for(let i of ll)i in t&&(r[i]=Dl(t[i],n,je.prototype[i].length));return r}var je=class{static create(e){return cl(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Bt}};function Dl(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var fl=class extends je{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},pl=class extends je{expected(){return"anything"}validate(){return!0}},dl=class extends je{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let i=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let i=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);i!==!1&&n.push(...i.map(({value:u})=>({value:[u]})))}return n}forward(e,t){let n=[];for(let r of e){let i=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...i.map(dr))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let u=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in u&&n.push(u.remain),r.push(...u.redirect.map(dr))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function dr({from:e,to:t}){return{from:[e],to:t}}var hl=class extends je{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function ml(e,t){let n=Object.create(null);for(let r of e){let i=r[t];if(n[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n[i]=r}return n}function Fl(e,t){let n=new Map;for(let r of e){let i=r[t];if(n.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n.set(i,r)}return n}function gl(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function El(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function yl(e){return e===Math.floor(e)}function vl(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Cl(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function hr(e){return e===void 0?{}:e}function Ki(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return bl((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(Ki)}}:{text:t}}function mr(e,t){return e===!0?!0:e===!1?{value:t}:e}function Fr(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function gr(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 yn(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>gr(n,t)):[gr(e,t)]}function Er(e,t){let n=yn(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function bl(e,t){if(!e)throw new Error(t)}var _l=class extends je{constructor(e){super(e),this._choices=Fl(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(vl).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},Al=class extends je{expected(){return"a number"}validate(e,t){return typeof e=="number"}},kl=class extends Al{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&yl(e)}},yr=class extends je{expected(){return"a string"}validate(e){return typeof e=="string"}},wl=tt,Nl=zi,Tl=sl,Sl=al,Bl=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=wl,unknown:u=Nl,invalid:a=Tl,deprecated:s=Sl,missing:o=()=>!1,required:l=()=>!1,preprocess:c=D=>D,postprocess:d=()=>Bt}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:ml(e,"name"),normalizeDefaultResult:hr,normalizeExpectedResult:Ki,normalizeDeprecatedResult:Fr,normalizeForwardResult:yn,normalizeRedirectResult:Er,normalizeValidateResult:mr},this._unknownHandler=u,this._invalidHandler=Cl(a),this._deprecatedHandler=s,this._identifyMissing=(D,p)=>!(D in p)||o(D,p),this._identifyRequired=l,this._preprocess=c,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=gl()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),u=this._applyNormalization(i,t);n.push(...u)}};r();for(let i of Object.keys(this._utils.schemas)){let u=this._utils.schemas[i];if(!(i in t)){let a=hr(u.default(this._utils));"value"in a&&n.push({[i]:a.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in t))continue;let u=this._utils.schemas[i],a=t[i],s=u.postprocess(a,this._utils);s!==Bt&&(this._applyValidation(s,i,u),t[i]=s)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let u of r){let a=this._utils.schemas[u],s=a.preprocess(e[u],this._utils);this._applyValidation(s,u,a);let o=({from:d,to:D})=>{n.push(typeof D=="string"?{[D]:d}:{[D.key]:D.value})},l=({value:d,redirectTo:D})=>{let p=Fr(a.deprecated(d,this._utils),s,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(u)||this._utils.logger.warn(this._deprecatedHandler(u,D,this._utils));else for(let{value:f}of p){let h={key:u,value:f};if(!this._hasDeprecationWarned(h)){let F=typeof D=="string"?{key:D,value:f}:D;this._utils.logger.warn(this._deprecatedHandler(h,F,this._utils))}}};yn(a.forward(s,this._utils),s).forEach(o);let c=Er(a.redirect(s,this._utils),s);if(c.redirect.forEach(o),"remain"in c){let d=c.remain;t[u]=u in t?a.overlap(t[u],d,this._utils):d,l({value:d})}for(let{from:d,to:D}of c.redirect)l({value:d,redirectTo:D})}for(let u of i){let a=e[u];this._applyUnknownHandler(u,a,t,(s,o)=>{n.push({[s]:o})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,Ui,this._utils)}_partitionOptionKeys(e){let[t,n]=El(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=mr(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let u of Object.keys(i)){if(this._identifyMissing(u,i))continue;let a=i[u];u in this._utils.schemas?r(u,a):n[u]=a}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Bt){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let i of n){let u=t.override[i];this._applyValidation(u,i,this._utils.schemas[i]),e[i]=u}for(let i of r){let u=t.override[i];this._applyUnknownHandler(i,u,e,(a,s)=>{let o=this._utils.schemas[a];this._applyValidation(s,a,o),e[a]=s})}}}}},on;function Ol(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:u,descriptor:a}={}){if(r){if(!u)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=tt;let s=i?Array.isArray(i)?(D,p)=>i.includes(D)?{[D]:p}:void 0:(D,p)=>({[D]:p}):(D,p,f)=>{let{_:h,...F}=f.schemas;return zi(D,p,{...f,schemas:F})},o=Il(t,{isCLI:r,FlagSchema:u}),l=new Bl(o,{logger:n,unknown:s,descriptor:a}),c=n!==!1;c&&on&&(l._hasDeprecationWarned=on);let d=l.normalize(e);return c&&(on=l._hasDeprecationWarned),d}function Il(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(pl.create({name:"_"}));for(let i of e)r.push($l(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(fl.create({name:i.alias,sourceName:i.name}));return r}function $l(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,u={name:i},a,s={};switch(e.type){case"int":a=kl,t&&(u.preprocess=Number);break;case"string":a=yr;break;case"choice":a=_l,u.choices=e.choices.map(o=>o!=null&&o.redirect?{...o,redirect:{to:{key:e.name,value:o.redirect}}}:o);break;case"boolean":a=hl;break;case"flag":a=r,u.flags=n.flatMap(o=>[o.alias,o.description&&o.name,o.oppositeDescription&&`no-${o.name}`].filter(Boolean));break;case"path":a=yr;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(o,l,c)=>e.exception(o)||l.validate(o,c):u.validate=(o,l,c)=>o===void 0||l.validate(o,c),e.redirect&&(s.redirect=o=>o?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let o=u.preprocess||(l=>l);u.preprocess=(l,c,d)=>c.preprocess(o(Array.isArray(l)?U(!1,l,-1):l),d)}return e.array?dl.create({...t?{preprocess:o=>Array.isArray(o)?o:[o]}:{},...s,valueSchema:a.create(u)}):a.create({...u,...s})}var xl=Ol,Ll=(e,t,n)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(n);for(let r=t.length-1;r>=0;r--){let i=t[r];if(n(i,r,t))return i}}},Yi=Ll;function Ji(e,t){if(!t)throw new Error("parserName is required.");let n=Yi(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Mi(r)}function Rl(e,t){if(!t)throw new Error("astFormat is required.");let n=Yi(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Mi(r)}function Wi({plugins:e,parser:t}){let n=Ji(e,t);return Hi(n,t)}function Hi(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}function Pl(e,t){let n=e.printers[t];return typeof n=="function"?n():n}var vr={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function jl(e,t={}){var n;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=ul(r,{physicalFile:r.filepath}),!r.parser)throw new sr(`No parser could be inferred for file "${r.filepath}".`)}else throw new sr("No parser and no file path given, couldn't infer a parser.");let i=Vi({plugins:e.plugins,showDeprecated:!0}).options,u={...vr,...Object.fromEntries(i.filter(D=>D.default!==void 0).map(D=>[D.name,D.default]))},a=Ji(r.plugins,r.parser),s=await Hi(a,r.parser);r.astFormat=s.astFormat,r.locEnd=s.locEnd,r.locStart=s.locStart;let o=(n=a.printers)!=null&&n[s.astFormat]?a:Rl(r.plugins,s.astFormat),l=await Pl(o,s.astFormat);r.printer=l;let c=o.defaultOptions?Object.fromEntries(Object.entries(o.defaultOptions).filter(([,D])=>D!==void 0)):{},d={...u,...c};for(let[D,p]of Object.entries(d))(r[D]===null||r[D]===void 0)&&(r[D]=p);return r.parser==="json"&&(r.trailingComma="none"),xl(r,i,{passThrough:Object.keys(vr),...t})}var ot=jl,Ml=yt(Ms(),1);async function Vl(e,t){let n=await Wi(t),r=n.preprocess?n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(u){Ul(u,e)}return{text:r,ast:i}}function Ul(e,t){let{loc:n}=e;if(n){let r=(0,Ml.codeFrameColumns)(t,n,{highlightCode:!0});throw e.message+=` `+r,e.codeFrame=r,e}throw e}var Ct=Vl;async function ql(e,t,n,r,i){let{embeddedLanguageFormatting:u,printer:{embed:a,hasPrettierIgnore:s=()=>!1,getVisitorKeys:o}}=n;if(!a||u!=="auto")return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=Wt(a.getVisitorKeys??o),c=[];p();let d=e.stack;for(let{print:f,node:h,pathStack:F}of c)try{e.stack=F;let g=await f(D,t,e,n);g&&i.set(h,g)}catch(g){if(globalThis.PRETTIER_DEBUG)throw g}e.stack=d;function D(f,h){return Gl(f,h,n,r)}function p(){let{node:f}=e;if(f===null||typeof f!="object"||s(e))return;for(let F of l(f))Array.isArray(f[F])?e.each(p,F):e.call(p,F);let h=a(e,n);if(h){if(typeof h=="function"){c.push({print:h,node:f,pathStack:[...e.stack]});return}i.set(f,h)}}}async function Gl(e,t,n,r){let i=await ot({...n,...t,parentParser:n.parser,originalText:e},{passThrough:!0}),{ast:u}=await Ct(e,i),a=await r(u,i);return Ti(a)}function zl(e,t){let{originalText:n,[Symbol.for("comments")]:r,locStart:i,locEnd:u,[Symbol.for("printedComments")]:a}=t,{node:s}=e,o=i(s),l=u(s);for(let c of r)i(c)>=o&&u(c)<=l&&a.add(c);return n.slice(o,l)}var Kl=zl;async function Ht(e,t){({ast:e}=await Qi(e,t));let n=new Map,r=new Oo(e),i=new Map;await ql(r,a,t,Ht,i);let u=await Cr(r,t,a,void 0,i);return Xo(t),u;function a(o,l){return o===void 0||o===r?s(l):Array.isArray(o)?r.call(()=>s(l),...o):r.call(()=>s(l),o)}function s(o){let l=r.node;if(l==null)return"";let c=l&&typeof l=="object"&&o===void 0;if(c&&n.has(l))return n.get(l);let d=Cr(r,t,a,o,i);return c&&n.set(l,d),d}}function Cr(e,t,n,r,i){var u;let{node:a}=e,{printer:s}=t,o;return(u=s.hasPrettierIgnore)!=null&&u.call(s,e)?o=Kl(e,t):i.has(a)?o=i.get(a):o=s.print(e,t,n,r),a===t.cursorNode&&(o=Si(o,l=>[hn,l,hn])),s.printComment&&(!s.willPrintOwnComments||!s.willPrintOwnComments(e,t))&&(o=Qo(e,o,t)),o}async function Qi(e,t){let n=e.comments??[];t[Symbol.for("comments")]=n,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Go(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function Yl(e,t){let{cursorOffset:n,locStart:r,locEnd:i}=t,u=Wt(t.printer.getVisitorKeys),a=o=>r(o)<=n&&i(o)>=n,s=e;for(let o of xo(e,{getVisitorKeys:u,filter:a}))s=o;return s}var Jl=Yl;function Wl(e,t){let{printer:{massageAstNode:n,getVisitorKeys:r}}=t;if(!n)return e;let i=Wt(r),u=n.ignoredProperties??new Set;return a(e);function a(s,o){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(D=>a(D,o)).filter(Boolean);let l={},c=new Set(i(s));for(let D in s)!Object.prototype.hasOwnProperty.call(s,D)||u.has(D)||(c.has(D)?l[D]=a(s[D],s):l[D]=s[D]);let d=n(s,l,o);if(d!==null)return d??l}}var Hl=Wl,Ql=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Xl(e,t){let n=[e.node,...e.parentNodes],r=new Set([t.node,...t.parentNodes]);return n.find(i=>Xi.has(i.type)&&r.has(i))}function br(e){let t=e.length-1;for(;;){let n=e[t];if((n==null?void 0:n.type)==="Program"||(n==null?void 0:n.type)==="File")t--;else break}return e.slice(0,t+1)}function Zl(e,t,{locStart:n,locEnd:r}){let i=e.node,u=t.node;if(i===u)return{startNode:i,endNode:u};let a=n(e.node);for(let o of br(t.parentNodes))if(n(o)>=a)u=o;else break;let s=r(t.node);for(let o of br(e.parentNodes)){if(r(o)<=s)i=o;else break;if(i===u)break}return{startNode:i,endNode:u}}function vn(e,t,n,r,i=[],u){let{locStart:a,locEnd:s}=n,o=a(e),l=s(e);if(!(t>l||tr);let s=e.slice(r,i).search(/\S/),o=s===-1;if(!o)for(r+=s;i>r&&!/\S/.test(e[i-1]);--i);let l=vn(n,r,t,(p,f)=>_r(t,p,f),[],"rangeStart"),c=o?l:vn(n,i,t,p=>_r(t,p),[],"rangeEnd");if(!l||!c)return{rangeStart:0,rangeEnd:0};let d,D;if(Ql(t)){let p=Xl(l,c);d=p,D=p}else({startNode:d,endNode:D}=Zl(l,c,t));return{rangeStart:Math.min(u(d),u(D)),rangeEnd:Math.max(a(d),a(D))}}var Zi="\uFEFF",Ar=Symbol("cursor");async function eu(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await Ct(e,t);t.cursorOffset>=0&&(t.cursorNode=Jl(r,t));let u=await Ht(r,t);n>0&&(u=Ni([Ke,u],n,t.tabWidth));let a=Jt(u,t);if(n>0){let o=a.formatted.trim();a.cursorNodeStart!==void 0&&(a.cursorNodeStart-=a.formatted.indexOf(o)),a.formatted=o+wn(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let o,l,c,d,D;if(t.cursorNode&&a.cursorNodeText?(o=t.locStart(t.cursorNode),l=i.slice(o,t.locEnd(t.cursorNode)),c=t.cursorOffset-o,d=a.cursorNodeStart,D=a.cursorNodeText):(o=0,l=i,c=t.cursorOffset,d=0,D=a.formatted),l===D)return{formatted:a.formatted,cursorOffset:d+c,comments:s};let p=l.split("");p.splice(c,0,Ar);let f=D.split(""),h=(0,Us.diffArrays)(p,f),F=d;for(let g of h)if(g.removed){if(g.value.includes(Ar))break}else F+=g.count;return{formatted:a.formatted,cursorOffset:F,comments:s}}return{formatted:a.formatted,cursorOffset:-1,comments:s}}async function rc(e,t){let{ast:n,text:r}=await Ct(e,t),{rangeStart:i,rangeEnd:u}=nc(r,t,n),a=r.slice(i,u),s=Math.min(i,r.lastIndexOf(` `,i)+1),o=r.slice(s,i).match(/^\s*/)[0],l=On(o,t.tabWidth),c=await eu(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=u?t.cursorOffset-i:-1,endOfLine:"lf"},l),d=c.formatted.trimEnd(),{cursorOffset:D}=t;D>u?D+=d.length-a.length:c.cursorOffset>=0&&(D=c.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(u);if(t.endOfLine!=="lf"){let f=wn(t.endOfLine);D>=0&&f===`\r `&&(D+=yi(p.slice(0,D),` `)),p=zt(!1,p,` `,f)}return{formatted:p,cursorOffset:D,comments:c.comments}}function ln(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function kr(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=ln(e,n,-1),r=ln(e,r,0),i=ln(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function tu(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:u}=kr(e,t),a=e.charAt(0)===Zi;if(a&&(e=e.slice(1),n--,r--,i--),u==="auto"&&(u=qs(e)),e.includes("\r")){let s=o=>yi(e.slice(0,Math.max(o,0)),`\r `);n-=s(n),r-=s(r),i-=s(i),e=Gs(e)}return{hasBOM:a,text:e,options:kr(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:u})}}async function wr(e,t){let n=await Wi(t);return!n.hasPragma||n.hasPragma(e)}async function nu(e,t){let{hasBOM:n,text:r,options:i}=tu(e,await ot(t));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await wr(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let u;return i.rangeStart>0||i.rangeEnd=0&&u.cursorOffset++),u}async function ic(e,t,n){let{text:r,options:i}=tu(e,await ot(t)),u=await Ct(r,i);return n&&(n.preprocessForPrint&&(u.ast=await Qi(u.ast,i)),n.massage&&(u.ast=Hl(u.ast,i))),u}async function uc(e,t){t=await ot(t);let n=await Ht(e,t);return Jt(n,t)}async function ac(e,t){let n=oo(e),{formatted:r}=await nu(n,{...t,parser:"__js_expression"});return r}async function sc(e,t){t=await ot(t);let{ast:n}=await Ct(e,t);return Ht(n,t)}async function oc(e,t){return Jt(e,await ot(t))}var ru={};qt(ru,{builders:()=>lc,printer:()=>cc,utils:()=>Dc});var lc={join:wi,line:Ai,softline:ao,hardline:Ke,literalline:ki,group:Ci,conditionalGroup:to,fill:bi,lineSuffix:dn,lineSuffixBoundary:io,cursor:hn,breakParent:Kt,ifBreak:no,trim:uo,indent:xt,indentIfBreak:ro,align:at,addAlignmentToDoc:Ni,markAsRoot:Zs,dedentToRoot:Xs,dedent:eo,hardlineWithoutBreakParent:Tn,literallineWithoutBreakParent:_i,label:so,concat:e=>e},cc={printDocToString:Jt},Dc={willBreak:Eo,traverseDoc:Nn,findInDoc:Bn,mapDoc:Yt,removeLines:Co,stripTrailingHardline:Ti,replaceEndOfLine:Ao,canBreak:wo},fc="3.2.4",iu={};qt(iu,{addDanglingComment:()=>Ue,addLeadingComment:()=>Ze,addTrailingComment:()=>et,getAlignmentSize:()=>On,getIndentSize:()=>gc,getMaxContinuousCount:()=>vc,getNextNonSpaceNonCommentCharacter:()=>bc,getNextNonSpaceNonCommentCharacterIndex:()=>Bc,getStringWidth:()=>Sn,hasNewline:()=>Ie,hasNewlineInRange:()=>Ac,hasSpaces:()=>wc,isNextLineEmpty:()=>xc,isNextLineEmptyAfterIndex:()=>jn,isPreviousLineEmpty:()=>Ic,makeString:()=>Tc,skip:()=>vt,skipEverythingButNewLine:()=>xi,skipInlineComment:()=>Ln,skipNewline:()=>Je,skipSpaces:()=>Re,skipToLineEnd:()=>$i,skipTrailingComment:()=>Rn,skipWhitespace:()=>Lo});function pc(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;nMath.max(r,i.length/t.length),0)}var vc=yc;function Cc(e,t){let n=Pn(e,t);return n===!1?"":e.charAt(n)}var bc=Cc;function _c(e,t,n){for(let r=t;ra===r?a:s===t?"\\"+s:s||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+i+t}var Tc=Nc;function Sc(e,t,n){return Pn(e,n(t))}function Bc(e,t){return arguments.length===2||typeof t=="number"?Pn(e,t):Sc(...arguments)}function Oc(e,t,n){return xn(e,n(t))}function Ic(e,t){return arguments.length===2||typeof t=="number"?xn(e,t):Oc(...arguments)}function $c(e,t,n){return jn(e,n(t))}function xc(e,t){return arguments.length===2||typeof t=="number"?jn(e,t):$c(...arguments)}function qe(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}var uu=qe(nu);async function au(e,t){let{formatted:n}=await uu(e,{...t,cursorOffset:-1});return n}async function Lc(e,t){return await au(e,t)===e}var Rc=qe(Vi,0),Pc={parse:qe(ic),formatAST:qe(uc),formatDoc:qe(ac),printToDoc:qe(sc),printDocToString:qe(oc)},jc=Ei;function Mc(e){return jc.format(e,{parser:"graphql",plugins:[Ns],tabWidth:2})}var Lt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Lt||(Lt={}));class Ft{constructor(t,n,r){ee(this,"name","");ee(this,"type");ee(this,"fields",{});this.name=n,this.type=t,this.fields=r}withInlineFragment(t,n){return this.withField(`... on ${t}`,[],n)}withType(t){return new Ft(t,this.name,this.fields)}withName(t){return new Ft(this.type,t??"",this.fields)}withField(t,n,r){return t=t.trim(),new Ft(this.type,this.name,{...this.fields,[t]:{parameters:n,subSelection:r}})}async build(){const t=this.buildSelection(new Set),n=this.generateArgumentPlaceholder(t.variables);return{query:await Mc(`${this.type} ${this.name}${n}${t.query}`),variables:re.mapValues(re.keyBy(t.variables,r=>r.variableName),r=>r.value)}}buildSelection(t){if(!this.hasFields())throw new Error("Cannot generate a sub-selection with no fields in it. A minimum of one field must be queried if the sub-selection is defined.");const n=re.mapValues(this.fields,u=>{var a;return{parameters:u.parameters.map(s=>this.asUniquelyNamedParameter(s,t)),subSelection:(a=u.subSelection)==null?void 0:a.buildSelection(t)}}),r=Object.keys(n).map(u=>{var l;const a=n[u],s=a.parameters.map(c=>`${c.name}: $${c.variableName}`).join(", "),o=s.length===0?"":`(${s})`;return`${u}${o}${((l=a.subSelection)==null?void 0:l.query)??""}`}),i=re.flatMap(Object.keys(n).map(u=>{var s;const a=n[u];return[...a.parameters,...((s=a.subSelection)==null?void 0:s.variables)||[]]}));return{query:` { ${r.join(" ")} } `,variables:i}}generateArgumentPlaceholder(t){const n=t.map(r=>`$${r.variableName}:${r.type}`).join(", ");return n.length===0?"":`(${n})`}asUniquelyNamedParameter(t,n,r=1){const i=r===1?t.name:t.name+r.toString();return n.has(i)?this.asUniquelyNamedParameter(t,n,r+1):(n.add(i),{variableName:i,...t})}hasFields(){return re.size(this.fields)!==0}}function su(){return new Ft(Lt.QUERY,"",{})}function Nr(){return su()}function Mn(e){return wu(e)}function Rt(e){return bn(e)?`${Rt(e.ofType)}!`:Ot(e)?`[${Rt(e.ofType)}]`:e.name}function Vc(e){let t="",n;for(let r=0,i=e.length;r{switch(e.targetName.toLowerCase()){case"email":case"emails":case"mail":case"mails":return"test-email@yourcompany.com";case"fullname":case"fullnames":return"John Doe";case"firstname":case"firstnames":return"John";case"lastname":case"lastnames":return"Doe";case"job":case"jobs":case"jobtitle":case"jobtitles":return"Engineer";case"jobarea":return"Engineering";case"phone":case"phones":return"1+ 418-323-4236";case"country":case"countries":return"Canada";case"address":case"addresses":return"2832 Sesame Street";case"state":case"states":case"province":case"provinces":return"Quebec";case"city":case"cities":case"town":case"towns":return"Montreal";case"zipcode":case"zipcodes":return"G1G 43F";case"company":case"companies":return"Acme Inc";case"department":case"departments":return"Engineering";case"datetime":case"datetimes":case"timestamp":case"timestamps":case"timestampz":case"instant":case"instants":return Sr;case"date":case"dates":return Tr;case"price":case"prices":return"$1,234.56";case"color":case"colors":case"paint":case"paints":return"#e10098";case"product":case"products":return"Soup";case"material":case"materials":return"Wood";case"id":case"ids":case"identifier":case"identifiers":case"uuid":case"uuids":return Br;case"size":case"sizes":return"Large";case"url":case"urls":return Or;case"name":case"names":return"A name";case"description":case"descriptions":return"A description";default:return e.targetName}},ID:()=>Br,Boolean:()=>!0,Int:e=>{switch(e.targetName.toLocaleLowerCase()){case"salary":case"salaries":return 7e4;case"age":case"ages":return 36;default:return 42}},Float:()=>Uc,Date:()=>Tr,DateTime:()=>Sr,URL:()=>Or,JSON:()=>({})}));function qc(e){return{...re.reduce(e,(t,n,r)=>({...t,[r.toLowerCase()]:n,[r[0].toLowerCase()+r.slice(1)]:n}),{}),...e}}function Gc(e){return{...e,Instant:e.DateTime,Id:e.ID,BigInteger:e.Int,BigNumber:e.Int,Long:e.Int,Url:e.URL,_text:e.String,Float8:e.Float,Numeric:e.Int,SmallInt:e.Int,Timestamp:e.DateTime,Timestamptz:e.DateTime,JsonB:e.JSON}}function zc(e,t,n){return e.args.map(r=>Yc(r,t,n))}function Kc(e,t,n,r){return Pt(t,n,{...r,defaultValue:null,generatedInputObjects:new Set,targetName:e})({...r,targetName:e,path:r.path})}function Yc(e,t,n){return{name:e.name,type:Rt(e.type),value:lu(e.type,t,{...n,generatedInputObjects:new Set,path:`${n.path}$`,defaultValue:e.defaultValue,targetName:e.name})}}function lu(e,t,n){const r=Mn(e),i=ou[r.name];if(Ur(r)){if(n.generatedInputObjects.has(r.name)&&qr(e))return null;n.generatedInputObjects.add(r.name)}const u=`${n.path}${n.path.endsWith("$")?"":"."}${n.targetName}`,a={targetName:n.targetName,path:u,defaultValue:n.defaultValue,depth:n.depth};return Pt(e,t,{...n,path:u})({...a,defaultFactory:i?{provide:()=>i(a)}:void 0,randomFactory:{provide:()=>cu(r,t,n)(a)}})}function Pt(e,t,n,r=!0){var o;const{factories:i}=t,u=i[n.path]??i[`${((o=n.parentType)==null?void 0:o.name)||""}.${n.targetName}`]??i[n.targetName]??i[Rt(e)];if(u)return l=>{const c=u(l);return Ot(e)&&!Array.isArray(c)?[c]:c};if(bn(e))return Pt(e.ofType,t,n,!1);if(r&&(t.nullGenerationStrategy==Q.ALWAYS_NULL||t.nullGenerationStrategy==Q.SOMETIMES_NULL&&Math.random()>.5))return()=>null;if(Ot(e)){const l=Pt(e.ofType,t,n);return c=>[l(c)]}const a=Mn(e),s=Jc(a.name,t);return s||cu(a,t,n)}function cu(e,t,n){if(Nu(e))return()=>e.getValues()[0].value;if(Tu(e)){const r=ou[e.name];if(r===void 0)throw new Jr(e,` Cannot generate a random value for scalar '${e.name}'. The random generator is not able to randomly generate a value for non-standard GraphQL scalars. You have to provide a custom factory by providing this in your config: { '${e.name}': () => generateRandomCustomScalar() }`);return r}if(Ur(e)){const r=e.getFields()||{};return()=>re.mapValues(r,i=>lu(i.type,t,{...n,parentType:e,generatedInputObjects:new Set(n.generatedInputObjects),targetName:i.name,defaultValue:i.defaultValue}))}throw new Error(`this portion of the fake generator should be unreachable... if you ever see this error, please open an issue: ${e.toJSON()}`)}function Jc(e,t){const n=Object.keys(t.factories).find(r=>Vc(r).test(e));if(n)return t.factories[n]}class Wc{constructor(t,n){ee(this,"target");ee(this,"value");this.target=t,this.value=n}build(){return{[this.target.name]:this.value.build()}}}class Vn{constructor(t){ee(this,"fields");this.fields=t}withField(t,n){return new Vn({...this.fields,[t]:n})}build(){return{...re.entries(this.fields).reduce((t,[n,r])=>({...t,[n]:r.build()}),{})}}}class Un{constructor(t){ee(this,"values");this.values=t}withValue(t){return new Un([...this.values,t])}build(){return this.values.map(t=>t.build())}}class Hc{constructor(t){ee(this,"value");this.value=t}build(){return this.value}}function Qc(e,t){return new Wc(e,t)}function cn(e){return new Hc(e)}function Xc(){return new Vn({})}function Zc(){return new Un([])}const Du={queryType:Lt.QUERY,queryName:void 0,maxDepth:5,nullGenerationStrategy:Q.NEVER_NULL,factories:{}};async function eD(e,t){const n=Object.assign({},Du,t),r=su(),i=fu(r,e,n,{depth:1,path:e.name});return i===r?null:await i.withType(n.queryType).withName(n.queryName).build()}function tD(e,t){const n=Object.assign({},Du,t),r=Cn(e.name,e.type,n,{depth:1,path:e.name});return r===null?null:Qc(e,r).build()}function fu(e,t,n,r){const i=zc(t,n,r),u=Mn(t.type);if(_n(u))return e.withField(t.name,i);const s=pu(u,n,{...r,depth:r.depth+1});return s===null?e:e.withField(t.name,i,s)}function pu(e,t,n){if(n.depth>t.maxDepth||_n(e))return null;if(Dn(e)){const r=Nr().withField("__typename",[]),i=e.getTypes();return re.reduce(i,(a,s)=>{const o=pu(s,t,n);return o?a.withInlineFragment(s.name,o):a},r)}else if(Gr(e)||zr(e)){const r=Nr(),i=e.getFields(),u=re.reduce(i,(a,s)=>fu(a,s,t,{depth:n.depth,path:`${n.path}.${s.name}`}),r);return u===r?null:u}throw new Error(`this portion of the query generator should be unreachable... if you ever see this error, please open an issue: ${JSON.stringify(e)}`)}function Cn(e,t,n,r){if(r.depth>n.maxDepth)return null;if(qr(t)&&n.nullGenerationStrategy===Q.ALWAYS_NULL)return cn(null);if(bn(t)&&(t=t.ofType),_n(t))return cn(Kc(e,t,{...n,nullGenerationStrategy:Q.NEVER_NULL},r));if(Ot(t)){const i=Cn(e,t.ofType,n,r);return i?Zc().withValue(i):null}if(Dn(t)||Gr(t)||zr(t)){let i=Xc(),u=t;Dn(u)&&(u=u.getTypes()[0],i=i.withField("__typename",cn(u.name)));const a=re.reduce(u.getFields(),(s,o)=>{const l=Cn(o.name,o.type,n,{...r,parentType:u,path:`${r.path}.${o.name}`,depth:r.depth+1});return l===null?s:s.withField(o.name,l)},i);return a===i?null:a}throw new Error(`this portion of the query generator should be unreachable... if you ever see this error, please open an issue: ${JSON.stringify(t)}`)}const nD=8,rD=2,iD=3,Dt=Ou(Promise.resolve(null)),Nt=async e=>{const t={queryType:e.type,maxDepth:e.depth,nullGenerationStrategy:e.nullGenerationStrategy,factories:re.reduce(Su(Bu.QUERY_GENERATION_FACTORIES),(n,r,i)=>({...n,[i]:()=>r}),{})};try{const n=await eD(e.field,t),r=tD(e.field,t);return{value:n??null,response:r,depth:e.depth,field:e.field,type:e.type,nullGenerationStrategy:e.nullGenerationStrategy}}catch(n){throw n instanceof Jr?new Error(` Cannot generate a random value for scalar '${n.type.name}'. The random generator is not able to randomly generate a value for non-standard GraphQL scalars. You have to provide a custom factory by providing this in your magidoc config: { website: { options: { queryGenerationFactories: { '${n.type.name}': '' } } } } To learn more about how to generate a custom scalar value, see: https://magidoc.js.org/cli/magidoc-configuration#querygenerationfactories `):n}},rt={subscribe:Dt.subscribe,increaseDepth:()=>Dt.update(async e=>{const t=await e;return t&&t.depthDt.update(async e=>{const t=await e;return t&&t.depth>rD?Nt({...t,depth:t.depth-1}):e}),toggleNullGenerationStrategy:()=>Dt.update(async e=>{const t=await e;return t?await Nt({...t,nullGenerationStrategy:t.nullGenerationStrategy===Q.NEVER_NULL?Q.ALWAYS_NULL:Q.NEVER_NULL}):e}),setField:(e,t)=>Dt.update(async n=>{const r=await n;return await Nt({field:e,type:t,depth:iD,nullGenerationStrategy:(r==null?void 0:r.nullGenerationStrategy)??Q.NEVER_NULL})})};function uD(e){return{c:A,l:A,m:A,p:A,i:A,o:A,d:A}}function aD(e){let t,n,r=e[9]&&Ir(e);return{c(){r&&r.c(),t=le()},l(i){r&&r.l(i),t=le()},m(i,u){r&&r.m(i,u),k(i,t,u),n=!0},p(i,u){i[9]?r?(r.p(i,u),u&16&&v(r,1)):(r=Ir(i),r.c(),v(r,1),r.m(t.parentNode,t)):r&&($e(),b(r,1,1,()=>{r=null}),xe())},i(i){n||(v(r),n=!0)},o(i){b(r),n=!1},d(i){i&&E(t),r&&r.d(i)}}}function Ir(e){let t,n,r,i,u,a,s,o=e[9].depth+"",l,c,d,D;return t=new At({props:{kind:"ghost",icon:zu,iconDescription:e[3],tooltipPosition:"left",size:"field"}}),t.$on("click",e[5]),r=new At({props:{kind:"ghost",icon:e[9].nullGenerationStrategy===Q.NEVER_NULL?Hn:Jn,iconDescription:e[9].nullGenerationStrategy===Q.NEVER_NULL?"Never null fields":"Always null fields",tooltipPosition:"left",size:"field"}}),r.$on("click",e[6]),u=new At({props:{kind:"ghost",icon:Uu,iconDescription:"Increase query depth",tooltipPosition:"left",size:"field"}}),u.$on("click",e[7]),d=new At({props:{kind:"ghost",icon:Xu,iconDescription:"Decrease query depth",tooltipPosition:"left",size:"field"}}),d.$on("click",e[8]),{c(){T(t.$$.fragment),n=G(),T(r.$$.fragment),i=G(),T(u.$$.fragment),a=G(),s=Ge("p"),l=ae(o),c=G(),T(d.$$.fragment),this.h()},l(p){S(t.$$.fragment,p),n=z(p),S(r.$$.fragment,p),i=z(p),S(u.$$.fragment,p),a=z(p),s=ze(p,"P",{style:!0});var f=$(s);l=se(f,o),f.forEach(E),c=z(p),S(d.$$.fragment,p),this.h()},h(){Cu(s,"text-align","center")},m(p,f){B(t,p,f),k(p,n,f),B(r,p,f),k(p,i,f),B(u,p,f),k(p,a,f),k(p,s,f),I(s,l),k(p,c,f),B(d,p,f),D=!0},p(p,f){const h={};f&8&&(h.iconDescription=p[3]),t.$set(h);const F={};f&16&&(F.icon=p[9].nullGenerationStrategy===Q.NEVER_NULL?Hn:Jn),f&16&&(F.iconDescription=p[9].nullGenerationStrategy===Q.NEVER_NULL?"Never null fields":"Always null fields"),r.$set(F),(!D||f&16)&&o!==(o=p[9].depth+"")&&Pe(l,o)},i(p){D||(v(t.$$.fragment,p),v(r.$$.fragment,p),v(u.$$.fragment,p),v(d.$$.fragment,p),D=!0)},o(p){b(t.$$.fragment,p),b(r.$$.fragment,p),b(u.$$.fragment,p),b(d.$$.fragment,p),D=!1},d(p){p&&(E(n),E(i),E(a),E(s),E(c)),O(t,p),O(r,p),O(u,p),O(d,p)}}}function sD(e){return{c:A,l:A,m:A,p:A,i:A,o:A,d:A}}function oD(e){let t,n,r,i,u,a,s;r=new Iu({props:{source:e[0],language:e[1],maxHeight:"20rem",minHeight:"12rem"}});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:sD,then:aD,catch:uD,value:9,blocks:[,,,]};return $t(a=e[4],o),{c(){t=Ge("div"),n=Ge("div"),T(r.$$.fragment),i=G(),u=Ge("div"),o.block.c(),this.h()},l(l){t=ze(l,"DIV",{class:!0});var c=$(t);n=ze(c,"DIV",{class:!0});var d=$(n);S(r.$$.fragment,d),d.forEach(E),i=z(c),u=ze(c,"DIV",{class:!0});var D=$(u);o.block.l(D),D.forEach(E),c.forEach(E),this.h()},h(){H(n,"class","code-section svelte-1gk78cu"),H(u,"class","button-bar svelte-1gk78cu"),H(t,"class","wrapper svelte-1gk78cu")},m(l,c){k(l,t,c),I(t,n),B(r,n,null),I(t,i),I(t,u),o.block.m(u,o.anchor=null),o.mount=()=>u,o.anchor=null,s=!0},p(l,[c]){e=l;const d={};c&1&&(d.source=e[0]),c&2&&(d.language=e[1]),r.$set(d),o.ctx=e,c&16&&a!==(a=e[4])&&$t(a,o)||Yr(o,e,c)},i(l){s||(v(r.$$.fragment,l),v(o.block),s=!0)},o(l){b(r.$$.fragment,l);for(let c=0;c<3;c+=1){const d=o.blocks[c];b(d)}s=!1},d(l){l&&E(t),O(r),o.block.d(),o.token=null,o=null}}}function lD(e,t,n){let r;Vr(e,rt,D=>n(4,r=D));let{code:i}=t,{language:u}=t,a="Copy query",{copy:s=async D=>{try{n(3,a="Copied!"),await navigator.clipboard.writeText(D),setTimeout(()=>{n(3,a="Copy query")},1500)}catch(p){console.error(p)}}}=t;const o=()=>s(i),l=()=>rt.toggleNullGenerationStrategy(),c=()=>rt.increaseDepth(),d=()=>rt.decreaseDepth();return e.$$set=D=>{"code"in D&&n(0,i=D.code),"language"in D&&n(1,u=D.language),"copy"in D&&n(2,s=D.copy)},[i,u,s,a,r,o,l,c,d]}class qn extends ve{constructor(t){super(),Ce(this,t,lD,oD,ye,{code:0,language:1,copy:2})}}function cD(e){return{c:A,l:A,m:A,p:A,i:A,o:A,d:A}}function DD(e){let t,n,r=e[5]&&$r(e);return{c(){r&&r.c(),t=le()},l(i){r&&r.l(i),t=le()},m(i,u){r&&r.m(i,u),k(i,t,u),n=!0},p(i,u){i[5]?r?(r.p(i,u),u&2&&v(r,1)):(r=$r(i),r.c(),v(r,1),r.m(t.parentNode,t)):r&&($e(),b(r,1,1,()=>{r=null}),xe())},i(i){n||(v(r),n=!0)},o(i){b(r),n=!1},d(i){i&&E(t),r&&r.d(i)}}}function $r(e){let t,n,r;function i(a){e[4](a)}let u={autoWidth:!0,$$slots:{content:[mD],default:[fD]},$$scope:{ctx:e}};return e[0]!==void 0&&(u.selected=e[0]),t=new $u({props:u}),bu.push(()=>ku(t,"selected",i)),{c(){T(t.$$.fragment)},l(a){S(t.$$.fragment,a)},m(a,s){B(t,a,s),r=!0},p(a,s){const o={};s&66&&(o.$$scope={dirty:s,ctx:a}),!n&&s&1&&(n=!0,o.selected=a[0],_u(()=>n=!1)),t.$set(o)},i(a){r||(v(t.$$.fragment,a),r=!0)},o(a){b(t.$$.fragment,a),r=!1},d(a){O(t,a)}}}function fD(e){let t,n,r,i,u,a;return t=new Xt({props:{label:"Query"}}),r=new Xt({props:{label:"Variables"}}),u=new Xt({props:{label:"Response"}}),{c(){T(t.$$.fragment),n=G(),T(r.$$.fragment),i=G(),T(u.$$.fragment)},l(s){S(t.$$.fragment,s),n=z(s),S(r.$$.fragment,s),i=z(s),S(u.$$.fragment,s)},m(s,o){B(t,s,o),k(s,n,o),B(r,s,o),k(s,i,o),B(u,s,o),a=!0},p:A,i(s){a||(v(t.$$.fragment,s),v(r.$$.fragment,s),v(u.$$.fragment,s),a=!0)},o(s){b(t.$$.fragment,s),b(r.$$.fragment,s),b(u.$$.fragment,s),a=!1},d(s){s&&(E(n),E(i)),O(t,s),O(r,s),O(u,s)}}}function pD(e){var r;let t,n;return t=new qn({props:{code:((r=e[5].value)==null?void 0:r.query)??"# No query generated. Try increasing the depth",language:"graphql"}}),{c(){T(t.$$.fragment)},l(i){S(t.$$.fragment,i)},m(i,u){B(t,i,u),n=!0},p(i,u){var s;const a={};u&2&&(a.code=((s=i[5].value)==null?void 0:s.query)??"# No query generated. Try increasing the depth"),t.$set(a)},i(i){n||(v(t.$$.fragment,i),n=!0)},o(i){b(t.$$.fragment,i),n=!1},d(i){O(t,i)}}}function dD(e){var r,i;let t,n;return t=new qn({props:{code:(r=e[5].value)!=null&&r.variables?JSON.stringify(((i=e[5].value)==null?void 0:i.variables)||{},null,2):"",language:"json"}}),{c(){T(t.$$.fragment)},l(u){S(t.$$.fragment,u)},m(u,a){B(t,u,a),n=!0},p(u,a){var o,l;const s={};a&2&&(s.code=(o=u[5].value)!=null&&o.variables?JSON.stringify(((l=u[5].value)==null?void 0:l.variables)||{},null,2):""),t.$set(s)},i(u){n||(v(t.$$.fragment,u),n=!0)},o(u){b(t.$$.fragment,u),n=!1},d(u){O(t,u)}}}function hD(e){let t,n;return t=new qn({props:{code:e[5].response?JSON.stringify(e[5].response||{},null,2):"",language:"json"}}),{c(){T(t.$$.fragment)},l(r){S(t.$$.fragment,r)},m(r,i){B(t,r,i),n=!0},p(r,i){const u={};i&2&&(u.code=r[5].response?JSON.stringify(r[5].response||{},null,2):""),t.$set(u)},i(r){n||(v(t.$$.fragment,r),n=!0)},o(r){b(t.$$.fragment,r),n=!1},d(r){O(t,r)}}}function mD(e){let t,n,r,i,u,a;return t=new Zt({props:{style:"padding:0",$$slots:{default:[pD]},$$scope:{ctx:e}}}),r=new Zt({props:{style:"padding:0",$$slots:{default:[dD]},$$scope:{ctx:e}}}),u=new Zt({props:{id:"third",style:"padding:0",$$slots:{default:[hD]},$$scope:{ctx:e}}}),{c(){T(t.$$.fragment),n=G(),T(r.$$.fragment),i=G(),T(u.$$.fragment)},l(s){S(t.$$.fragment,s),n=z(s),S(r.$$.fragment,s),i=z(s),S(u.$$.fragment,s)},m(s,o){B(t,s,o),k(s,n,o),B(r,s,o),k(s,i,o),B(u,s,o),a=!0},p(s,o){const l={};o&66&&(l.$$scope={dirty:o,ctx:s}),t.$set(l);const c={};o&66&&(c.$$scope={dirty:o,ctx:s}),r.$set(c);const d={};o&66&&(d.$$scope={dirty:o,ctx:s}),u.$set(d)},i(s){a||(v(t.$$.fragment,s),v(r.$$.fragment,s),v(u.$$.fragment,s),a=!0)},o(s){b(t.$$.fragment,s),b(r.$$.fragment,s),b(u.$$.fragment,s),a=!1},d(s){s&&(E(n),E(i)),O(t,s),O(r,s),O(u,s)}}}function FD(e){return{c:A,l:A,m:A,p:A,i:A,o:A,d:A}}function gD(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:FD,then:DD,catch:cD,value:5,blocks:[,,,]};return $t(n=e[1],i),{c(){t=le(),i.block.c()},l(u){t=le(),i.block.l(u)},m(u,a){k(u,t,a),i.block.m(u,i.anchor=a),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(u,[a]){e=u,i.ctx=e,a&2&&n!==(n=e[1])&&$t(n,i)||Yr(i,e,a)},i(u){r||(v(i.block),r=!0)},o(u){for(let a=0;a<3;a+=1){const s=i.blocks[a];b(s)}r=!1},d(u){u&&E(t),i.block.d(u),i.token=null,i=null}}}function ED(e,t,n){let r;Vr(e,rt,o=>n(1,r=o));let{type:i}=t,{field:u}=t,a=0;function s(o){a=o,n(0,a)}return e.$$set=o=>{"type"in o&&n(2,i=o.type),"field"in o&&n(3,u=o.field)},e.$$.update=()=>{e.$$.dirty&12&&rt.setField(u,i)},[a,r,i,u,s]}class yD extends ve{constructor(t){super(),Ce(this,t,ED,gD,ye,{type:2,field:3})}}function vD(e){let t=re.capitalize(e[0].toLowerCase())+"",n;return{c(){n=ae(t)},l(r){n=se(r,t)},m(r,i){k(r,n,i)},p(r,i){i&1&&t!==(t=re.capitalize(r[0].toLowerCase())+"")&&Pe(n,t)},d(r){r&&E(n)}}}function CD(e){let t,n;return t=new xu({props:{type:"green",$$slots:{default:[vD]},$$scope:{ctx:e}}}),{c(){T(t.$$.fragment)},l(r){S(t.$$.fragment,r)},m(r,i){B(t,r,i),n=!0},p(r,[i]){const u={};i&3&&(u.$$scope={dirty:i,ctx:r}),t.$set(u)},i(r){n||(v(t.$$.fragment,r),n=!0)},o(r){b(t.$$.fragment,r),n=!1},d(r){O(t,r)}}}function bD(e,t,n){let{type:r}=t;return e.$$set=i=>{"type"in i&&n(0,r=i.type)},[r]}class _D extends ve{constructor(t){super(),Ce(this,t,bD,CD,ye,{type:0})}}function xr(e){let t,n;return t=new Lu({props:{hideCloseButton:!0,lowContrast:!0,kind:"warning",$$slots:{default:[AD]},$$scope:{ctx:e}}}),{c(){T(t.$$.fragment)},l(r){S(t.$$.fragment,r)},m(r,i){B(t,r,i),n=!0},p(r,i){const u={};i&3&&(u.$$scope={dirty:i,ctx:r}),t.$set(u)},i(r){n||(v(t.$$.fragment,r),n=!0)},o(r){b(t.$$.fragment,r),n=!1},d(r){O(t,r)}}}function AD(e){let t,n,r;return n=new Kr({props:{source:`**Deprecated**: ${String(e[0])}`}}),{c(){t=Ge("div"),T(n.$$.fragment)},l(i){t=ze(i,"DIV",{});var u=$(t);S(n.$$.fragment,u),u.forEach(E)},m(i,u){k(i,t,u),B(n,t,null),r=!0},p(i,u){const a={};u&1&&(a.source=`**Deprecated**: ${String(i[0])}`),n.$set(a)},i(i){r||(v(n.$$.fragment,i),r=!0)},o(i){b(n.$$.fragment,i),r=!1},d(i){i&&E(t),O(n)}}}function kD(e){let t,n,r=e[0]&&xr(e);return{c(){r&&r.c(),t=le()},l(i){r&&r.l(i),t=le()},m(i,u){r&&r.m(i,u),k(i,t,u),n=!0},p(i,[u]){i[0]?r?(r.p(i,u),u&1&&v(r,1)):(r=xr(i),r.c(),v(r,1),r.m(t.parentNode,t)):r&&($e(),b(r,1,1,()=>{r=null}),xe())},i(i){n||(v(r),n=!0)},o(i){b(r),n=!1},d(i){i&&E(t),r&&r.d(i)}}}function wD(e,t,n){let{deprecationReason:r}=t;return e.$$set=i=>{"deprecationReason"in i&&n(0,r=i.deprecationReason)},[r]}class ND extends ve{constructor(t){super(),Ce(this,t,wD,kD,ye,{deprecationReason:0})}}function Lr(e,t,n){const r=e.slice();return r[2]=t[n],r}function Rr(e){let t,n,r=Gn(e[1].astNode.directives),i=[];for(let a=0;ab(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a{s=null}),xe())},i(l){a||(v(r.$$.fragment,l),v(s),a=!0)},o(l){b(r.$$.fragment,l),b(s),a=!1},d(l){l&&(E(n),E(i),E(u)),O(r,l),s&&s.d(l)}}}function jr(e){let t,n,r,i;return t=new It({props:{id:"arguments",depth:2,$$slots:{default:[SD]},$$scope:{ctx:e}}}),r=new Ru({props:{data:e[1].args}}),{c(){T(t.$$.fragment),n=G(),T(r.$$.fragment)},l(u){S(t.$$.fragment,u),n=z(u),S(r.$$.fragment,u)},m(u,a){B(t,u,a),k(u,n,a),B(r,u,a),i=!0},p(u,a){const s={};a&32&&(s.$$scope={dirty:a,ctx:u}),t.$set(s);const o={};a&2&&(o.data=u[1].args),r.$set(o)},i(u){i||(v(t.$$.fragment,u),v(r.$$.fragment,u),i=!0)},o(u){b(t.$$.fragment,u),b(r.$$.fragment,u),i=!1},d(u){u&&E(n),O(t,u),O(r,u)}}}function SD(e){let t;return{c(){t=ae("Arguments")},l(n){t=se(n,"Arguments")},m(n,r){k(n,t,r)},d(n){n&&E(t)}}}function Mr(e){let t,n,r,i,u,a,s;return t=new It({props:{id:"response",depth:2,$$slots:{default:[BD]},$$scope:{ctx:e}}}),u=new Pu({props:{type:e[1].type}}),{c(){T(t.$$.fragment),n=G(),r=Ge("p"),i=ae("Returns "),T(u.$$.fragment),a=ae(".")},l(o){S(t.$$.fragment,o),n=z(o),r=ze(o,"P",{});var l=$(r);i=se(l,"Returns "),S(u.$$.fragment,l),a=se(l,"."),l.forEach(E)},m(o,l){B(t,o,l),k(o,n,l),k(o,r,l),I(r,i),B(u,r,null),I(r,a),s=!0},p(o,l){const c={};l&32&&(c.$$scope={dirty:l,ctx:o}),t.$set(c);const d={};l&2&&(d.type=o[1].type),u.$set(d)},i(o){s||(v(t.$$.fragment,o),v(u.$$.fragment,o),s=!0)},o(o){b(t.$$.fragment,o),b(u.$$.fragment,o),s=!1},d(o){o&&(E(n),E(r)),O(t,o),O(u)}}}function BD(e){let t;return{c(){t=ae("Response")},l(n){t=se(n,"Response")},m(n,r){k(n,t,r)},d(n){n&&E(t)}}}function OD(e){let t;return{c(){t=ae("Example")},l(n){t=se(n,"Example")},m(n,r){k(n,t,r)},d(n){n&&E(t)}}}function ID(e){let t,n,r,i,u,a,s,o,l,c,d,D,p;n=new ND({props:{deprecationReason:e[1].deprecationReason}}),i=new It({props:{id:"title",depth:1,$$slots:{default:[TD]},$$scope:{ctx:e}}}),a=new Kr({props:{source:e[1].description}});let f=e[1].args.length>0&&jr(e),h=e[1].type&&Mr(e);return c=new It({props:{id:"example",depth:4,$$slots:{default:[OD]},$$scope:{ctx:e}}}),D=new yD({props:{type:e[0],field:e[1]}}),{c(){t=Ge("section"),T(n.$$.fragment),r=G(),T(i.$$.fragment),u=G(),T(a.$$.fragment),s=G(),f&&f.c(),o=G(),h&&h.c(),l=G(),T(c.$$.fragment),d=G(),T(D.$$.fragment)},l(F){t=ze(F,"SECTION",{});var g=$(t);S(n.$$.fragment,g),r=z(g),S(i.$$.fragment,g),u=z(g),S(a.$$.fragment,g),s=z(g),f&&f.l(g),o=z(g),h&&h.l(g),l=z(g),S(c.$$.fragment,g),d=z(g),S(D.$$.fragment,g),g.forEach(E)},m(F,g){k(F,t,g),B(n,t,null),I(t,r),B(i,t,null),I(t,u),B(a,t,null),I(t,s),f&&f.m(t,null),I(t,o),h&&h.m(t,null),I(t,l),B(c,t,null),I(t,d),B(D,t,null),p=!0},p(F,[g]){const y={};g&2&&(y.deprecationReason=F[1].deprecationReason),n.$set(y);const _={};g&35&&(_.$$scope={dirty:g,ctx:F}),i.$set(_);const w={};g&2&&(w.source=F[1].description),a.$set(w),F[1].args.length>0?f?(f.p(F,g),g&2&&v(f,1)):(f=jr(F),f.c(),v(f,1),f.m(t,o)):f&&($e(),b(f,1,1,()=>{f=null}),xe()),F[1].type?h?(h.p(F,g),g&2&&v(h,1)):(h=Mr(F),h.c(),v(h,1),h.m(t,l)):h&&($e(),b(h,1,1,()=>{h=null}),xe());const N={};g&32&&(N.$$scope={dirty:g,ctx:F}),c.$set(N);const L={};g&1&&(L.type=F[0]),g&2&&(L.field=F[1]),D.$set(L)},i(F){p||(v(n.$$.fragment,F),v(i.$$.fragment,F),v(a.$$.fragment,F),v(f),v(h),v(c.$$.fragment,F),v(D.$$.fragment,F),p=!0)},o(F){b(n.$$.fragment,F),b(i.$$.fragment,F),b(a.$$.fragment,F),b(f),b(h),b(c.$$.fragment,F),b(D.$$.fragment,F),p=!1},d(F){F&&E(t),O(n),O(i),O(a),f&&f.d(),h&&h.d(),O(c),O(D)}}}function $D(e,t,n){let{type:r}=t,{field:i}=t;return e.$$set=u=>{"type"in u&&n(0,r=u.type),"field"in u&&n(1,i=u.field)},[r,i]}class HD extends ve{constructor(t){super(),Ce(this,t,$D,ID,ye,{type:0,field:1})}}export{HD as F,Lt as Q};