@muxcodecli/cli 1.15.16 → 1.15.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/bip-bop-01-ga21wr3r.mp3 +0 -0
  2. package/dist/bip-bop-03-kgfd4rq4.mp3 +0 -0
  3. package/dist/chunk-0hqmdrjr.js +3 -0
  4. package/dist/chunk-0npjzye0.js +2 -0
  5. package/dist/chunk-0pe6y883.js +2 -0
  6. package/dist/chunk-0qqpjj2h.js +3 -0
  7. package/dist/chunk-0r3h8jgj.js +2 -0
  8. package/dist/chunk-11285jfy.js +3 -0
  9. package/dist/chunk-11ant2kk.js +3 -0
  10. package/dist/chunk-124qmktt.js +18 -0
  11. package/dist/chunk-138ntz3h.js +2 -0
  12. package/dist/chunk-1e73ypg5.js +3 -0
  13. package/dist/chunk-1evcc54z.js +3 -0
  14. package/dist/chunk-1mqsg5s7.js +75 -0
  15. package/dist/chunk-1pv2317e.js +7 -0
  16. package/dist/chunk-1y3ssxx6.js +2 -0
  17. package/dist/chunk-20x8vsdn.js +7 -0
  18. package/dist/chunk-21x3anp4.js +9 -0
  19. package/dist/chunk-22qpzg37.js +212 -0
  20. package/dist/chunk-2bt5mtgm.js +3 -0
  21. package/dist/chunk-2d95ene8.js +2 -0
  22. package/dist/chunk-2h2zq5cp.js +2 -0
  23. package/dist/chunk-2pc63est.js +2 -0
  24. package/dist/chunk-33gs9z8d.js +2 -0
  25. package/dist/chunk-33vwwxjk.js +2 -0
  26. package/dist/chunk-3dq7hfxc.js +9 -0
  27. package/dist/chunk-3jvft1k1.js +2 -0
  28. package/dist/chunk-4jqh4mpm.js +2 -0
  29. package/dist/chunk-4mgyaytc.js +672 -0
  30. package/dist/chunk-4va8fzq1.js +2 -0
  31. package/dist/chunk-4wkq9y2z.js +7 -0
  32. package/dist/chunk-526nbm9e.js +2 -0
  33. package/dist/chunk-5a6895cv.js +37 -0
  34. package/dist/chunk-5e9dq2av.js +2 -0
  35. package/dist/chunk-5jn2z3nf.js +3 -0
  36. package/dist/chunk-5npr1qyq.js +574 -0
  37. package/dist/chunk-5sfky0gz.js +8 -0
  38. package/dist/chunk-5t7xqdvk.js +3 -0
  39. package/dist/chunk-5tpqj6ag.js +10 -0
  40. package/dist/chunk-5v5015am.js +12 -0
  41. package/dist/chunk-5wawdxv2.js +7 -0
  42. package/dist/chunk-6btrg3ff.js +2 -0
  43. package/dist/chunk-6skbzman.js +6 -0
  44. package/dist/chunk-6sz698ew.js +11 -0
  45. package/dist/chunk-6xzrzmsr.js +2 -0
  46. package/dist/chunk-7848rf5q.js +63 -0
  47. package/dist/chunk-7ep2edcv.js +12 -0
  48. package/dist/chunk-7svw66kw.js +13 -0
  49. package/dist/chunk-7xgr8vx6.js +2 -0
  50. package/dist/chunk-7zjn6m1m.js +2 -0
  51. package/dist/chunk-8atqb297.js +12 -0
  52. package/dist/chunk-8ebkxjar.js +7 -0
  53. package/dist/chunk-8j3aw4qg.js +3 -0
  54. package/dist/chunk-8jy0dvcn.js +3 -0
  55. package/dist/chunk-8refh038.js +2 -0
  56. package/dist/chunk-93cszp8k.js +3 -0
  57. package/dist/chunk-93ze3gcb.js +2 -0
  58. package/dist/chunk-98yxzxtd.js +2 -0
  59. package/dist/chunk-9g64kggy.js +3 -0
  60. package/dist/chunk-9h1pwxb2.js +8 -0
  61. package/dist/chunk-9j4j9nrm.js +2 -0
  62. package/dist/chunk-9kzczwh0.js +3 -0
  63. package/dist/chunk-9n629gtn.js +3 -0
  64. package/dist/chunk-9y59sxde.js +2 -0
  65. package/dist/chunk-a2m5jyd8.js +2 -0
  66. package/dist/chunk-a595cp8s.js +2 -0
  67. package/dist/chunk-ak0k3m4q.js +3 -0
  68. package/dist/chunk-apksmrz9.js +3 -0
  69. package/dist/chunk-b05r09sj.js +10 -0
  70. package/dist/chunk-b47e563q.js +2 -0
  71. package/dist/chunk-b57avnse.js +2 -0
  72. package/dist/chunk-bfjq7w7k.js +2 -0
  73. package/dist/chunk-bhc70qet.js +3 -0
  74. package/dist/chunk-bvtscj68.js +2 -0
  75. package/dist/chunk-bw2cy5v0.js +8 -0
  76. package/dist/chunk-c7dvyh2x.js +2 -0
  77. package/dist/chunk-cbz8b7g5.js +3 -0
  78. package/dist/chunk-cw4vbnet.js +3 -0
  79. package/dist/chunk-czcj3j9y.js +2 -0
  80. package/dist/chunk-dg466kdp.js +2 -0
  81. package/dist/chunk-dmscgnhq.js +2 -0
  82. package/dist/chunk-dtk4m8rm.js +3 -0
  83. package/dist/chunk-dy7akyj3.js +2 -0
  84. package/dist/chunk-e2wv2sp4.js +2 -0
  85. package/dist/chunk-e8j03wnd.js +3 -0
  86. package/dist/chunk-egkp6tct.js +2 -0
  87. package/dist/chunk-emfc800a.js +2 -0
  88. package/dist/chunk-envnht72.js +4 -0
  89. package/dist/chunk-eskw1cj2.js +3 -0
  90. package/dist/chunk-ezz15tyg.js +2 -0
  91. package/dist/chunk-fkmzj0qt.js +16 -0
  92. package/dist/chunk-fqt3c3g5.js +4 -0
  93. package/dist/chunk-frbht418.js +19 -0
  94. package/dist/chunk-ftz8cqfq.js +2 -0
  95. package/dist/chunk-g4jxdrr6.js +2 -0
  96. package/dist/chunk-g52xzmrr.js +2 -0
  97. package/dist/chunk-gbtvkje9.js +4 -0
  98. package/dist/chunk-gm9msqq5.js +8 -0
  99. package/dist/chunk-gxat3dpd.js +3 -0
  100. package/dist/chunk-hfppq1w5.js +4 -0
  101. package/dist/chunk-jdg870gy.js +1683 -0
  102. package/dist/chunk-jfz77m78.js +3 -0
  103. package/dist/chunk-jg9r58pf.js +16 -0
  104. package/dist/chunk-jgzt4945.js +2 -0
  105. package/dist/chunk-jh2epywq.js +2 -0
  106. package/dist/chunk-jpj6a56k.js +2 -0
  107. package/dist/chunk-jw4sgq23.js +2 -0
  108. package/dist/chunk-jws11ngd.js +2 -0
  109. package/dist/chunk-jxhz82qt.js +2 -0
  110. package/dist/chunk-k19y2psf.js +4 -0
  111. package/dist/chunk-k6cj14zk.js +2 -0
  112. package/dist/chunk-kktm0pdc.js +3 -0
  113. package/dist/chunk-kmr27ake.js +160 -0
  114. package/dist/chunk-kyhwvbvq.js +2 -0
  115. package/dist/chunk-mgn5pejx.js +2 -0
  116. package/dist/chunk-mskyzxb3.js +3 -0
  117. package/dist/chunk-my9cfmvt.js +5 -0
  118. package/dist/chunk-n4vx7kvs.js +389 -0
  119. package/dist/chunk-nc44rvs7.js +23 -0
  120. package/dist/chunk-ng3vbpmy.js +3 -0
  121. package/dist/chunk-nmnp5g5p.js +228 -0
  122. package/dist/chunk-nn0t3xmn.js +2 -0
  123. package/dist/chunk-npr41z9a.js +19 -0
  124. package/dist/chunk-ntvr3177.js +25 -0
  125. package/dist/chunk-pkc5hkha.js +2 -0
  126. package/dist/chunk-ppg6zhae.js +3 -0
  127. package/dist/chunk-pqwm9zk1.js +6 -0
  128. package/dist/chunk-ptvjmfqx.js +2 -0
  129. package/dist/chunk-q1r48y0y.js +34 -0
  130. package/dist/chunk-q9yddd1r.js +3 -0
  131. package/dist/chunk-qavtgsrh.js +2 -0
  132. package/dist/chunk-qvh8ghjw.js +7 -0
  133. package/dist/chunk-qx6r187q.js +2 -0
  134. package/dist/chunk-r093mfa8.js +32 -0
  135. package/dist/chunk-rbaj9ktq.js +2 -0
  136. package/dist/chunk-rkf9ynkx.js +3 -0
  137. package/dist/chunk-rpp44jtx.js +3 -0
  138. package/dist/chunk-rrvwp351.js +2 -0
  139. package/dist/chunk-rs8fsgqt.js +81 -0
  140. package/dist/chunk-s4gy87ft.js +8 -0
  141. package/dist/chunk-s5qq2ch2.js +12 -0
  142. package/dist/chunk-s92578qx.js +71 -0
  143. package/dist/chunk-snsb760m.js +2 -0
  144. package/dist/chunk-sp1cvejp.js +2 -0
  145. package/dist/chunk-spb3tm25.js +4 -0
  146. package/dist/chunk-srnmswkj.js +2 -0
  147. package/dist/chunk-sxgbzwrs.js +2 -0
  148. package/dist/chunk-t2s6m9t2.js +35 -0
  149. package/dist/chunk-t98sdxty.js +2 -0
  150. package/dist/chunk-tbnxx5na.js +2 -0
  151. package/dist/chunk-tfxm3qz4.js +2 -0
  152. package/dist/chunk-treb38pz.js +3 -0
  153. package/dist/chunk-tvw8tfpr.js +6 -0
  154. package/dist/chunk-v107htgw.js +101 -0
  155. package/dist/chunk-v8at4gnt.js +2 -0
  156. package/dist/chunk-vmr3get8.js +2 -0
  157. package/dist/chunk-vqrnejgj.js +71 -0
  158. package/dist/chunk-vvwy955j.js +3 -0
  159. package/dist/chunk-w5jxffnq.js +2 -0
  160. package/dist/chunk-wcbh5jqy.js +3 -0
  161. package/dist/chunk-wfmrnep1.js +2 -0
  162. package/dist/chunk-wk11yy8h.js +3 -0
  163. package/dist/chunk-wn5f1tfj.js +2 -0
  164. package/dist/chunk-wpm2p1gq.js +3 -0
  165. package/dist/chunk-wxkyv5gj.js +2 -0
  166. package/dist/chunk-wyed730e.js +2 -0
  167. package/dist/chunk-x65zs89t.js +3 -0
  168. package/dist/chunk-x6zjq78z.js +2 -0
  169. package/dist/chunk-xedav0qx.js +3 -0
  170. package/dist/chunk-xmftb9ad.js +38 -0
  171. package/dist/chunk-xvtkw7hj.js +3 -0
  172. package/dist/chunk-xy0txg0n.js +2 -0
  173. package/dist/chunk-y7s5cpwr.js +34 -0
  174. package/dist/chunk-yg48tfvv.js +16 -0
  175. package/dist/chunk-ygpen625.js +3 -0
  176. package/dist/chunk-ymb45bt6.js +2 -0
  177. package/dist/chunk-yp2zfcvh.js +8 -0
  178. package/dist/chunk-z3mx7n44.js +3 -0
  179. package/dist/chunk-zaj612bw.js +3 -0
  180. package/dist/chunk-zb3179f9.js +3 -0
  181. package/dist/chunk-zhd8f4pc.js +759 -0
  182. package/dist/chunk-zjpnyah2.js +3 -0
  183. package/dist/cli/cmd/tui/worker.js +2 -0
  184. package/dist/highlights-eq9cgrbb.scm +604 -0
  185. package/dist/highlights-ghv9g403.scm +205 -0
  186. package/dist/highlights-hk7bwhj4.scm +284 -0
  187. package/dist/highlights-r812a2qc.scm +150 -0
  188. package/dist/highlights-x6tmsnaa.scm +115 -0
  189. package/dist/index.js +146 -5742
  190. package/dist/injections-73j83es3.scm +27 -0
  191. package/dist/muxcode-linux-x64 +0 -0
  192. package/dist/nope-03-2z8weyjw.mp3 +0 -0
  193. package/dist/photon_rs_bg-bq08arze.wasm +0 -0
  194. package/dist/staplebops-06-rz29m246.mp3 +0 -0
  195. package/dist/tree-sitter-3jzf13jk.wasm +0 -0
  196. package/dist/tree-sitter-bash-hq5s6fxb.wasm +0 -0
  197. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  198. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  199. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  200. package/dist/tree-sitter-powershell-ryb2ffqs.wasm +0 -0
  201. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  202. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  203. package/dist/yup-01-30ecpeh9.mp3 +0 -0
  204. package/package.json +8 -7
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ja as a,ka as b,la as c,ma as d,na as e,oa as f,pa as g,qa as h,ra as i,sa as j,ta as k,ua as l,va as m}from"./chunk-hfppq1w5.js";import"./chunk-4wkq9y2z.js";import"./chunk-s92578qx.js";import"./chunk-7848rf5q.js";import"./chunk-my9cfmvt.js";import"./chunk-8jy0dvcn.js";import"./chunk-1mqsg5s7.js";import"./chunk-8j3aw4qg.js";export{h as useTheme,f as upsertTheme,j as tint,a as selectedForeground,g as resolveTheme,d as hasTheme,k as generateSystem,l as generateSyntax,m as generateSubtleSyntax,c as allThemes,e as addTheme,i as ThemeProvider,b as DEFAULT_THEMES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ft as b,Gt as R,Ht as XG,It as I,Lt as d,Ps as V,Rs as l,Vs as e,Ws as t,dt as a,ht as o,it as GG,lt as JG,ot as NG,rt as QG,wt as g,yt as v,zt as k}from"./chunk-1pv2317e.js";import{Nt as f,Tt as C,Xt as m,_t as O}from"./chunk-21x3anp4.js";import{Du as G}from"./chunk-ntvr3177.js";import"./chunk-8j3aw4qg.js";function c(J){var Q,$,K,j,z,q;if(J==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let A=(Q=J.prompt_tokens)!=null?Q:0,Z=($=J.completion_tokens)!=null?$:0,N=(j=(K=J.prompt_tokens_details)==null?void 0:K.cached_tokens)!=null?j:0,X=(q=(z=J.completion_tokens_details)==null?void 0:z.reasoning_tokens)!=null?q:0;return{inputTokens:{total:A,noCache:A-N,cacheRead:N,cacheWrite:void 0},outputTokens:{total:Z,text:Z-X,reasoning:X},raw:J}}function _(J){switch(J){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function u({id:J,model:Q,created:$}){return{id:J!=null?J:void 0,modelId:Q!=null?Q:void 0,timestamp:$!=null?new Date($*1000):void 0}}function i({tools:J,toolChoice:Q}){J=(J==null?void 0:J.length)?J:void 0;let $=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:$};let K=[];for(let z of J)if(z.type==="provider")$.push({type:"unsupported",feature:`provider-defined tool ${z.id}`});else K.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(Q==null)return{tools:K,toolChoice:void 0,toolWarnings:$};let j=Q.type;switch(j){case"auto":case"none":case"required":return{tools:K,toolChoice:j,toolWarnings:$};case"tool":return{tools:K,toolChoice:{type:"function",function:{name:Q.toolName}},toolWarnings:$};default:throw new O({functionality:`tool choice type: ${j}`})}}var $G=G.object({enableThinking:G.boolean().optional(),thinkingBudget:G.number().positive().optional(),parallelToolCalls:G.boolean().optional()});function p(J){var Q,$,K,j;let z=c(J),q=($=(Q=J==null?void 0:J.prompt_tokens_details)==null?void 0:Q.cache_creation_input_tokens)!=null?$:0,A=((K=z.inputTokens.total)!=null?K:0)-((j=z.inputTokens.cacheRead)!=null?j:0)-q;return{...z,inputTokens:{...z.inputTokens,cacheWrite:q,noCache:A}}}function zG({data:J,mediaType:Q}){return J instanceof URL?J.toString():`data:${Q};base64,${t(J)}`}function BG({prompt:J,cacheControlValidator:Q}){var $,K;let j=[];for(let{role:z,content:q,...A}of J){let Z=Q==null?void 0:Q.getCacheControl(A.providerOptions);switch(z){case"system":{if(Z)j.push({role:"system",content:[{type:"text",text:q,cache_control:Z}]});else j.push({role:"system",content:q});break}case"user":{j.push({role:"user",content:q.map((N,X)=>{var E;let L=X===q.length-1,B=(E=Q==null?void 0:Q.getCacheControl(N.providerOptions))!=null?E:L?Z:void 0;switch(N.type){case"text":return{type:"text",text:N.text,...B?{cache_control:B}:{}};case"file":if(N.mediaType.startsWith("image/")){let U=N.mediaType==="image/*"?"image/jpeg":N.mediaType;return{type:"image_url",image_url:{url:zG({data:N.data,mediaType:U})},...B?{cache_control:B}:{}}}else throw new O({functionality:"Only image file parts are supported"})}})});break}case"assistant":{let N="",X=[];for(let E of q)switch(E.type){case"text":{N+=E.text;break}case"tool-call":{X.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)}});break}case"reasoning":{N+=E.text;break}}j.push({role:"assistant",content:Z?[{type:"text",text:N,cache_control:Z}]:N||null,tool_calls:X.length>0?X:void 0});break}case"tool":{let N=q.filter((X)=>X.type!=="tool-approval-response");for(let X=0;X<N.length;X++){let E=N[X],L=E.output,B=X===N.length-1,U=($=Q==null?void 0:Q.getCacheControl(E.providerOptions))!=null?$:B?Z:void 0,Y;switch(L.type){case"text":case"error-text":Y=L.value;break;case"execution-denied":Y=(K=L.reason)!=null?K:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(L.value);break}j.push({role:"tool",tool_call_id:E.toolCallId,content:U?[{type:"text",text:Y,cache_control:U}]:Y})}break}default:throw Error(`Unsupported role: ${z}`)}}return j}var r=4;function EG(J){var Q;let $=J==null?void 0:J.alibaba;return(Q=$==null?void 0:$.cacheControl)!=null?Q:$==null?void 0:$.cache_control}var jG=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl(J){let Q=EG(J);if(!Q)return;if(this.breakpointCount++,this.breakpointCount>r)this.warnings.push({type:"other",message:`Max breakpoint limit exceeded. Only the last ${r} cache markers will take effect.`});return Q}getWarnings(){return this.warnings}},KG=class{constructor(J,Q){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=Q}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:Q,temperature:$,topP:K,topK:j,frequencyPenalty:z,presencePenalty:q,stopSequences:A,responseFormat:Z,seed:N,providerOptions:X,tools:E,toolChoice:L}){var B;let U=[],Y=new jG,P=await v({provider:"alibaba",providerOptions:X,schema:$G});if(z!=null)U.push({type:"unsupported",feature:"frequencyPenalty"});let w={model:this.modelId,max_tokens:Q,temperature:$,top_p:K,top_k:j,presence_penalty:q,stop:A,seed:N,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,name:(B=Z.name)!=null?B:"response",description:Z.description}}:{type:"json_object"}:void 0,...(P==null?void 0:P.enableThinking)!=null?{enable_thinking:P.enableThinking}:{},...(P==null?void 0:P.thinkingBudget)!=null?{thinking_budget:P.thinkingBudget}:{},messages:BG({prompt:J,cacheControlValidator:Y})},{tools:y,toolChoice:S,toolWarnings:F}=i({tools:E,toolChoice:L});return U.push(...Y.getWarnings()),{args:{...w,tools:y,tool_choice:S,...y!=null&&(P==null?void 0:P.parallelToolCalls)!==void 0?{parallel_tool_calls:P.parallelToolCalls}:{}},warnings:[...U,...F]}}async doGenerate(J){var Q;let{args:$,warnings:K}=await this.getArgs(J),{responseHeaders:j,value:z,rawValue:q}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:$,failedResponseHandler:s,successfulResponseHandler:I(qG),abortSignal:J.abortSignal,fetch:this.config.fetch}),A=z.choices[0],Z=[],N=A.message.content;if(N!=null&&N.length>0)Z.push({type:"text",text:N});let X=A.message.reasoning_content;if(X!=null&&X.length>0)Z.push({type:"reasoning",text:X});if(A.message.tool_calls!=null)for(let E of A.message.tool_calls)Z.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});return{content:Z,finishReason:{unified:_(A.finish_reason),raw:(Q=A.finish_reason)!=null?Q:void 0},usage:p(z.usage),request:{body:JSON.stringify($)},response:{...u(z),headers:j,body:q},warnings:K}}async doStream(J){let{args:Q,warnings:$}=await this.getArgs(J),K={...Q,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:j,value:z}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:K,failedResponseHandler:s,successfulResponseHandler:XG(AG),abortSignal:J.abortSignal,fetch:this.config.fetch}),q={unified:"other",raw:void 0},A=void 0,Z=!0,N=!1,X=null,E=[];return{stream:z.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:$})},transform(L,B){var U,Y,P,w;if(J.includeRawChunks)B.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){B.enqueue({type:"error",error:L.error});return}let y=L.value;if(Z)Z=!1,B.enqueue({type:"response-metadata",...u(y)});if(y.usage!=null)A=y.usage;if(y.choices.length===0)return;let S=y.choices[0],F=S.delta;if(F.reasoning_content!=null&&F.reasoning_content.length>0){if(X==null){if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;X=a(),B.enqueue({type:"reasoning-start",id:X})}B.enqueue({type:"reasoning-delta",id:X,delta:F.reasoning_content})}if(F.content!=null&&F.content.length>0){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(!N)B.enqueue({type:"text-start",id:"0"}),N=!0;B.enqueue({type:"text-delta",id:"0",delta:F.content})}if(F.tool_calls!=null){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;for(let W of F.tool_calls){let M=(U=W.index)!=null?U:E.length;if(E[M]==null){if(W.id==null)throw new C({data:W,message:"Expected 'id' to be a string."});if(((Y=W.function)==null?void 0:Y.name)==null)throw new C({data:W,message:"Expected 'function.name' to be a string."});B.enqueue({type:"tool-input-start",id:W.id,toolName:W.function.name}),E[M]={id:W.id,type:"function",function:{name:W.function.name,arguments:(P=W.function.arguments)!=null?P:""},hasFinished:!1};let D=E[M];if(D.function.arguments.length>0)B.enqueue({type:"tool-input-delta",id:D.id,delta:D.function.arguments});if(g(D.function.arguments))B.enqueue({type:"tool-input-end",id:D.id}),B.enqueue({type:"tool-call",toolCallId:D.id,toolName:D.function.name,input:D.function.arguments}),D.hasFinished=!0;continue}let H=E[M];if(H.hasFinished)continue;if(((w=W.function)==null?void 0:w.arguments)!=null)H.function.arguments+=W.function.arguments,B.enqueue({type:"tool-input-delta",id:H.id,delta:W.function.arguments});if(g(H.function.arguments))B.enqueue({type:"tool-input-end",id:H.id}),B.enqueue({type:"tool-call",toolCallId:H.id,toolName:H.function.name,input:H.function.arguments}),H.hasFinished=!0}}if(S.finish_reason!=null)q={unified:_(S.finish_reason),raw:S.finish_reason}},flush(L){if(X!=null)L.enqueue({type:"reasoning-end",id:X});if(N)L.enqueue({type:"text-end",id:"0"});L.enqueue({type:"finish",finishReason:q,usage:p(A)})}})),request:{body:JSON.stringify(K)},response:{headers:j}}}},YG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({cached_tokens:G.number().nullish(),cache_creation_input_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish()}).nullish()}),qG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant").nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),AG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({index:G.number().nullish(),id:G.string().nullish(),type:G.literal("function").nullish(),function:G.object({name:G.string().nullish(),arguments:G.string().nullish()}).nullish()})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),HG=NG(()=>QG(G.object({negativePrompt:G.string().nullish(),audioUrl:G.string().nullish(),promptExtend:G.boolean().nullish(),shotType:G.enum(["single","multi"]).nullish(),watermark:G.boolean().nullish(),audio:G.boolean().nullish(),referenceUrls:G.array(G.string()).nullish(),pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish()}).passthrough())),LG=G.object({code:G.string().nullish(),message:G.string(),request_id:G.string().nullish()}),n=R({errorSchema:LG,errorToMessage:(J)=>J.message}),PG=G.object({output:G.object({task_status:G.string(),task_id:G.string()}).nullish(),request_id:G.string().nullish()}),WG=G.object({output:G.object({task_id:G.string(),task_status:G.string(),video_url:G.string().nullish(),submit_time:G.string().nullish(),scheduled_time:G.string().nullish(),end_time:G.string().nullish(),orig_prompt:G.string().nullish(),actual_prompt:G.string().nullish(),code:G.string().nullish(),message:G.string().nullish()}).nullish(),usage:G.object({duration:G.number().nullish(),output_video_duration:G.number().nullish(),SR:G.number().nullish(),size:G.string().nullish()}).nullish(),request_id:G.string().nullish()});function UG(J){if(J.includes("-i2v"))return"i2v";if(J.includes("-r2v"))return"r2v";return"t2v"}var wG=class{constructor(J,Q){this.modelId=J,this.config=Q,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var Q,$,K,j,z,q,A,Z,N,X,E;let L=(K=($=(Q=this.config._internal)==null?void 0:Q.currentDate)==null?void 0:$.call(Q))!=null?K:new Date,B=[],U=UG(this.modelId),Y=await v({provider:"alibaba",providerOptions:J.providerOptions,schema:HG}),P={};if(J.prompt!=null)P.prompt=J.prompt;if((Y==null?void 0:Y.negativePrompt)!=null)P.negative_prompt=Y.negativePrompt;if((Y==null?void 0:Y.audioUrl)!=null)P.audio_url=Y.audioUrl;if(U==="i2v"&&J.image!=null)if(J.image.type==="url")P.img_url=J.image.url;else{let x=typeof J.image.data==="string"?J.image.data:e(J.image.data);P.img_url=x}if(U==="r2v"&&(Y==null?void 0:Y.referenceUrls)!=null)P.reference_urls=Y.referenceUrls;let w={};if(J.duration!=null)w.duration=J.duration;if(J.seed!=null)w.seed=J.seed;if(J.resolution!=null)if(U==="i2v"){let x={"1280x720":"720P","720x1280":"720P","960x960":"720P","1088x832":"720P","832x1088":"720P","1920x1080":"1080P","1080x1920":"1080P","1440x1440":"1080P","1632x1248":"1080P","1248x1632":"1080P","832x480":"480P","480x832":"480P","624x624":"480P"};w.resolution=x[J.resolution]||J.resolution}else w.size=J.resolution.replace("x","*");if((Y==null?void 0:Y.promptExtend)!=null)w.prompt_extend=Y.promptExtend;if((Y==null?void 0:Y.shotType)!=null)w.shot_type=Y.shotType;if((Y==null?void 0:Y.watermark)!=null)w.watermark=Y.watermark;if((Y==null?void 0:Y.audio)!=null)w.audio=Y.audio;if(J.aspectRatio)B.push({type:"unsupported",feature:"aspectRatio",details:"Alibaba video models use explicit size/resolution dimensions. Use the resolution option or providerOptions.alibaba for size control."});if(J.fps)B.push({type:"unsupported",feature:"fps",details:"Alibaba video models do not support custom FPS."});if(J.n!=null&&J.n>1)B.push({type:"unsupported",feature:"n",details:"Alibaba video models only support generating 1 video per call."});let{value:y}=await k({url:`${this.config.baseURL}/api/v1/services/aigc/video-generation/video-synthesis`,headers:V(await b(this.config.headers),J.headers,{"X-DashScope-Async":"enable"}),body:{model:this.modelId,input:P,parameters:w},successfulResponseHandler:I(PG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch}),S=(j=y.output)==null?void 0:j.task_id;if(!S)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No task_id returned from Alibaba API. Response: ${JSON.stringify(y)}`});let F=(z=Y==null?void 0:Y.pollIntervalMs)!=null?z:5000,W=(q=Y==null?void 0:Y.pollTimeoutMs)!=null?q:600000,M=Date.now(),H,D;while(!0){if(await l(F,{abortSignal:J.abortSignal}),Date.now()-M>W)throw new f({name:"ALIBABA_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${W}ms`});let{value:x,responseHeaders:ZG}=await GG({url:`${this.config.baseURL}/api/v1/tasks/${S}`,headers:V(await b(this.config.headers),J.headers),successfulResponseHandler:I(WG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch});D=ZG;let T=(A=x.output)==null?void 0:A.task_status;if(T==="SUCCEEDED"){H=x;break}if(T==="FAILED"||T==="CANCELED")throw new f({name:"ALIBABA_VIDEO_GENERATION_FAILED",message:`Video generation ${T.toLowerCase()}. Task ID: ${S}. ${(N=(Z=x.output)==null?void 0:Z.message)!=null?N:""}`})}let h=(X=H==null?void 0:H.output)==null?void 0:X.video_url;if(!h)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No video URL in response. Task ID: ${S}`});return{videos:[{type:"url",url:h,mediaType:"video/mp4"}],warnings:B,response:{timestamp:L,modelId:this.modelId,headers:D},providerMetadata:{alibaba:{taskId:S,videoUrl:h,...((E=H==null?void 0:H.output)==null?void 0:E.actual_prompt)?{actualPrompt:H.output.actual_prompt}:{},...(H==null?void 0:H.usage)?{usage:{duration:H.usage.duration,outputVideoDuration:H.usage.output_video_duration,resolution:H.usage.SR,size:H.usage.size}}:{}}}}}},SG="1.0.17",FG=G.object({error:G.object({message:G.string(),code:G.string().nullish(),type:G.string().nullish()})}),s=R({errorSchema:FG,errorToMessage:(J)=>J.error.message});function DG(J={}){var Q,$;let K=(Q=d(J.baseURL))!=null?Q:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",j=($=d(J.videoBaseURL))!=null?$:"https://dashscope-intl.aliyuncs.com",z=()=>o({Authorization:`Bearer ${JG({apiKey:J.apiKey,environmentVariableName:"ALIBABA_API_KEY",description:"Alibaba Cloud (DashScope)"})}`,...J.headers},`ai-sdk/alibaba/${SG}`),q=(N)=>{var X;return new KG(N,{provider:"alibaba.chat",baseURL:K,headers:z,fetch:J.fetch,includeUsage:(X=J.includeUsage)!=null?X:!0})},A=(N)=>new wG(N,{provider:"alibaba.video",baseURL:j,headers:z,fetch:J.fetch}),Z=function(N){if(new.target)throw Error("The Alibaba model function cannot be called with the new keyword.");return q(N)};return Z.specificationVersion="v3",Z.languageModel=q,Z.chatModel=q,Z.video=A,Z.videoModel=A,Z.imageModel=(N)=>{throw new m({modelId:N,modelType:"imageModel"})},Z.embeddingModel=(N)=>{throw new m({modelId:N,modelType:"embeddingModel"})},Z}var gG=DG();export{DG as createAlibaba,gG as alibaba,SG as VERSION};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Gg as C,Pg as Bc}from"./chunk-npr41z9a.js";import{Rg as Wc}from"./chunk-e8j03wnd.js";import{Tg as F}from"./chunk-rkf9ynkx.js";import{RF as O}from"./chunk-8j3aw4qg.js";var ae=O((Fc)=>{var A=F(),M=Wc(),P=C(),Jc=Bc(),Mc=(c)=>c[A.SMITHY_CONTEXT_KEY]||(c[A.SMITHY_CONTEXT_KEY]={}),Xc=(c,e)=>{if(!e||e.length===0)return c;let r=[];for(let f of e)for(let t of c)if(t.schemeId.split("#")[1]===f)r.push(t);for(let f of c)if(!r.find(({schemeId:t})=>t===f.schemeId))r.push(f);return r};function jc(c){let e=new Map;for(let r of c)e.set(r.schemeId,r);return e}var X=(c,e)=>(r,f)=>async(t)=>{let l=c.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(c,f,t.input)),s=c.authSchemePreference?await c.authSchemePreference():[],w=Xc(l,s),$=jc(c.httpAuthSchemes),u=P.getSmithyContext(f),d=[];for(let a of w){let h=$.get(a.schemeId);if(!h){d.push(`HttpAuthScheme \`${a.schemeId}\` was not enabled for this service.`);continue}let U=h.identityProvider(await e.identityProviderConfigProvider(c));if(!U){d.push(`HttpAuthScheme \`${a.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:R={},signingProperties:I={}}=a.propertiesExtractor?.(c,f)||{};a.identityProperties=Object.assign(a.identityProperties||{},R),a.signingProperties=Object.assign(a.signingProperties||{},I),u.selectedHttpAuthScheme={httpAuthOption:a,identity:await U(a.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw Error(d.join(`
3
+ `));return r(t)},m={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Sc=(c,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:(f)=>{f.addRelativeTo(X(c,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),m)}}),o={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},Zc=(c,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:(f)=>{f.addRelativeTo(X(c,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),o)}}),Gc=(c)=>(e)=>{throw e},Qc=(c,e)=>{},E=(c)=>(e,r)=>async(f)=>{if(!M.HttpRequest.isInstance(f.request))return e(f);let l=P.getSmithyContext(r).selectedHttpAuthScheme;if(!l)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:s={}},identity:w,signer:$}=l,u=await e({...f,request:await $.sign(f.request,w,s)}).catch(($.errorHandler||Gc)(s));return($.successHandler||Qc)(u.response,s),u},H={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Yc=(c)=>({applyToStack:(e)=>{e.addRelativeTo(E(),H)}}),zc=(c)=>{if(typeof c==="function")return c;let e=Promise.resolve(c);return()=>e},Kc=async(c,e,r,f=(l)=>l,...t)=>{let l=new c(r);return l=f(l)??l,await e.send(l,...t)};function qc(c,e,r,f,t){return async function*(s,w,...$){let u=w,d=s.startingToken??u[r],a=!0,h;while(a){if(u[r]=d,t)u[t]=u[t]??s.pageSize;if(s.client instanceof c)h=await Kc(e,s.client,w,s.withCommand,...$);else throw Error(`Invalid client, expected instance of ${c.name}`);yield h;let U=d;d=Tc(h,f),a=!!(d&&(!s.stopOnSameToken||d!==U))}return}}var Tc=(c,e)=>{let r=c,f=e.split(".");for(let t of f){if(!r||typeof r!=="object")return;r=r[t]}return r};function _c(c,e,r){if(!c.__smithy_context)c.__smithy_context={features:{}};else if(!c.__smithy_context.features)c.__smithy_context.features={};c.__smithy_context.features[e]=r}class k{authSchemes=new Map;constructor(c){for(let[e,r]of Object.entries(c))if(r!==void 0)this.authSchemes.set(e,r)}getIdentityProvider(c){return this.authSchemes.get(c)}}class v{async sign(c,e,r){if(!r)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!r.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!r.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!e.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let f=M.HttpRequest.clone(c);if(r.in===A.HttpApiKeyAuthLocation.QUERY)f.query[r.name]=e.apiKey;else if(r.in===A.HttpApiKeyAuthLocation.HEADER)f.headers[r.name]=r.scheme?`${r.scheme} ${e.apiKey}`:e.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+r.in+"`");return f}}class g{async sign(c,e,r){let f=M.HttpRequest.clone(c);if(!e.token)throw Error("request could not be signed with `token` since the `token` is not defined");return f.headers.Authorization=`Bearer ${e.token}`,f}}class p{async sign(c,e,r){return c}}var i=(c)=>function(r){return ec(r)&&r.expiration.getTime()-Date.now()<c},cc=300000,Nc=i(cc),ec=(c)=>c.expiration!==void 0,Dc=(c,e,r)=>{if(c===void 0)return;let f=typeof c!=="function"?async()=>Promise.resolve(c):c,t,l,s,w=!1,$=async(u)=>{if(!l)l=f(u);try{t=await l,s=!0,w=!1}finally{l=void 0}return t};if(e===void 0)return async(u)=>{if(!s||u?.forceRefresh)t=await $(u);return t};return async(u)=>{if(!s||u?.forceRefresh)t=await $(u);if(w)return t;if(!r(t))return w=!0,t;if(e(t))return await $(u),t;return t}};Fc.requestBuilder=Jc.requestBuilder;Fc.DefaultIdentityProviderConfig=k;Fc.EXPIRATION_MS=cc;Fc.HttpApiKeyAuthSigner=v;Fc.HttpBearerAuthSigner=g;Fc.NoAuthSigner=p;Fc.createIsIdentityExpiredFunction=i;Fc.createPaginator=qc;Fc.doesIdentityRequireRefresh=ec;Fc.getHttpAuthSchemeEndpointRuleSetPlugin=Sc;Fc.getHttpAuthSchemePlugin=Zc;Fc.getHttpSigningPlugin=Yc;Fc.getSmithyContext=Mc;Fc.httpAuthSchemeEndpointRuleSetMiddlewareOptions=m;Fc.httpAuthSchemeMiddleware=X;Fc.httpAuthSchemeMiddlewareOptions=o;Fc.httpSigningMiddleware=E;Fc.httpSigningMiddlewareOptions=H;Fc.isIdentityExpired=Nc;Fc.memoizeIdentityProvider=Dc;Fc.normalizeProvider=zc;Fc.setFeature=_c});var rc=O((ne)=>{var he=(c,e,r)=>{if(!(e in c))return;if(c[e]==="true")return!0;if(c[e]==="false")return!1;throw Error(`Cannot load ${r} "${e}". Expected "true" or "false", got ${c[e]}.`)},be=(c,e,r)=>{if(!(e in c))return;let f=parseInt(c[e],10);if(Number.isNaN(f))throw TypeError(`Cannot load ${r} '${e}'. Expected number, got '${c[e]}'.`);return f};ne.SelectorType=void 0;(function(c){c.ENV="env",c.CONFIG="shared config entry"})(ne.SelectorType||(ne.SelectorType={}));ne.booleanSelector=he;ne.numberSelector=be});var Rc=O((Ke)=>{var G=F();class Y{nodes;root;conditions;results;constructor(c,e,r,f){this.nodes=c,this.root=e,this.conditions=r,this.results=f}static from(c,e,r,f){return new Y(c,e,r,f)}}class tc{capacity;data=new Map;parameters=[];constructor({size:c,params:e}){if(this.capacity=c??50,e)this.parameters=e}get(c,e){let r=this.hash(c);if(r===!1)return e();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let f=this.data.keys(),t=0;while(!0){let{value:l,done:s}=f.next();if(this.data.delete(l),s||++t>10)break}}this.data.set(r,e())}return this.data.get(r)}size(){return this.data.size}hash(c){let e="",{parameters:r}=this;if(r.length===0)return!1;for(let f of r){let t=String(c[f]??"");if(t.includes("|;"))return!1;e+=t+"|;"}return e}}class b extends Error{constructor(c){super(c);this.name="EndpointError"}}var y="endpoints";function L(c){if(typeof c!=="object"||c==null)return c;if("ref"in c)return`$${L(c.ref)}`;if("fn"in c)return`${c.fn}(${(c.argv||[]).map(L).join(", ")})`;return JSON.stringify(c,null,2)}var Q={},Re=(c,e)=>c===e;function Ie(...c){for(let e of c)if(e!=null)return e;return}var Ve=(c)=>{let e=c.split("."),r=[];for(let f of e){let t=f.indexOf("[");if(t!==-1){if(f.indexOf("]")!==f.length-1)throw new b(`Path: '${c}' does not end with ']'`);let l=f.slice(t+1,-1);if(Number.isNaN(parseInt(l)))throw new b(`Invalid array index: '${l}' in path: '${c}'`);if(t!==0)r.push(f.slice(0,t));r.push(l)}else r.push(f)}return r},lc=(c,e)=>Ve(e).reduce((r,f)=>{if(typeof r!=="object")throw new b(`Index '${f}' in '${e}' not found in '${JSON.stringify(c)}'`);else if(Array.isArray(r))return r[parseInt(f)];return r[f]},c),ye=(c)=>c!=null,xe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),z=(c,e=!1)=>{if(!e)return xe.test(c);let r=c.split(".");for(let f of r)if(!z(f))return!1;return!0};function Ae(c,e,r){return c?e:r}var Oe=(c)=>!c,We=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),sc=(c)=>We.test(c)||c.startsWith("[")&&c.endsWith("]"),S={[G.EndpointURLScheme.HTTP]:80,[G.EndpointURLScheme.HTTPS]:443},Be=(c)=>{let e=(()=>{try{if(c instanceof URL)return c;if(typeof c==="object"&&"hostname"in c){let{hostname:h,port:U,protocol:R="",path:I="",query:V={}}=c,x=new URL(`${R}//${h}${U?`:${U}`:""}${I}`);return x.search=Object.entries(V).map(([J,Oc])=>`${J}=${Oc}`).join("&"),x}return new URL(c)}catch(h){return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(c)} as a whatwg URL.`),null;let r=e.href,{host:f,hostname:t,pathname:l,protocol:s,search:w}=e;if(w)return null;let $=s.slice(0,-1);if(!Object.values(G.EndpointURLScheme).includes($))return null;let u=sc(t),d=r.includes(`${f}:${S[$]}`)||typeof c==="string"&&c.includes(`${f}:${S[$]}`),a=`${f}${d?`:${S[$]}`:""}`;return{scheme:$,authority:a,path:l,normalizedPath:l.endsWith("/")?l:`${l}/`,isIp:u}};function Je(c,e,r){if(r===1)return[c];if(c==="")return[""];let f=c.split(e);if(r===0)return f;return f.slice(0,r-1).concat(f.slice(1).join(e))}var Me=(c,e)=>c===e,Xe=(c,e,r,f)=>{if(c==null||e>=r||c.length<r||/[^\u0000-\u007f]/.test(c))return null;if(!f)return c.substring(e,r);return c.substring(c.length-r,c.length-e)},je=(c)=>encodeURIComponent(c).replace(/[!*'()]/g,(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),fc={booleanEquals:Re,coalesce:Ie,getAttr:lc,isSet:ye,isValidHostLabel:z,ite:Ae,not:Oe,parseURL:Be,split:Je,stringEquals:Me,substring:Xe,uriEncode:je},uc=(c,e)=>{let r=[],{referenceRecord:f,endpointParams:t}=e,l=0;while(l<c.length){let s=c.indexOf("{",l);if(s===-1){r.push(c.slice(l));break}r.push(c.slice(l,s));let w=c.indexOf("}",s);if(w===-1){r.push(c.slice(s));break}if(c[s+1]==="{"&&c[w+1]==="}")r.push(c.slice(s+1,w)),l=w+2;let $=c.substring(s+1,w);if($.includes("#")){let[u,d]=$.split("#");r.push(lc(f[u]??t[u],d))}else r.push(f[$]??t[$]);l=w+1}return r.join("")},Se=({ref:c},e)=>{return e.referenceRecord[c]??e.endpointParams[c]},W=(c,e,r)=>{if(typeof c==="string")return uc(c,r);else if(c.fn)return wc.callFunction(c,r);else if(c.ref)return Se(c,r);throw new b(`'${e}': ${String(c)} is not a string, function or reference.`)},$c=({fn:c,argv:e},r)=>{let f=Array(e.length);for(let l=0;l<f.length;++l){let s=e[l];if(typeof s==="boolean"||typeof s==="number")f[l]=s;else f[l]=wc.evaluateExpression(s,"arg",r)}if(c.includes(".")){let l=c.split(".");if(l[0]in Q&&l[1]!=null)return Q[l[0]][l[1]](...f)}if(typeof fc[c]!=="function")throw Error(`function ${c} not loaded in endpointFunctions.`);let t=fc[c];return t(...f)},wc={evaluateExpression:W,callFunction:$c},dc=({assign:c,...e},r)=>{if(c&&c in r.referenceRecord)throw new b(`'${c}' is already defined in Reference Record.`);let f=$c(e,r);return r.logger?.debug?.(`${y} evaluateCondition: ${L(e)} = ${L(f)}`),{result:f===""?!0:!!f,...c!=null&&{toAssign:{name:c,value:f}}}},ac=(c,e)=>Object.entries(c).reduce((r,[f,t])=>({...r,[f]:t.map((l)=>{let s=W(l,"Header value entry",e);if(typeof s!=="string")throw new b(`Header '${f}' value '${s}' is not a string`);return s})}),{}),K=(c,e)=>Object.entries(c).reduce((r,[f,t])=>({...r,[f]:bc.getEndpointProperty(t,e)}),{}),hc=(c,e)=>{if(Array.isArray(c))return c.map((r)=>hc(r,e));switch(typeof c){case"string":return uc(c,e);case"object":if(c===null)throw new b(`Unexpected endpoint property: ${c}`);return bc.getEndpointProperties(c,e);case"boolean":return c;default:throw new b(`Unexpected endpoint property type: ${typeof c}`)}},bc={getEndpointProperty:hc,getEndpointProperties:K},nc=(c,e)=>{let r=W(c,"Endpoint URL",e);if(typeof r==="string")try{return new URL(r)}catch(f){throw console.error(`Failed to construct URL with ${r}`,f),f}throw new b(`Endpoint URL must be a string, got ${typeof r}`)},Z=1e8,Ze=(c,e)=>{let{nodes:r,root:f,results:t,conditions:l}=c,s=f,w={},$={referenceRecord:w,endpointParams:e.endpointParams,logger:e.logger};while(s!==1&&s!==-1&&s<Z){let u=3*(Math.abs(s)-1),[d,a,h]=[r[u],r[u+1],r[u+2]],[U,R,I]=l[d],V=dc({fn:U,assign:I,argv:R},$);if(V.toAssign){let{name:x,value:J}=V.toAssign;w[x]=J}s=s>=0===V.result?a:h}if(s>=Z){let u=t[s-Z];if(u[0]===-1){let[,U]=u;throw new b(U)}let[d,a,h]=u;return{url:nc(d,$),properties:K(a,$),headers:ac(h,$)}}throw new b("No matching endpoint.")},q=(c=[],e)=>{let r={};for(let f of c){let{result:t,toAssign:l}=dc(f,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!t)return{result:t};if(l)r[l.name]=l.value,e.logger?.debug?.(`${y} assign: ${l.name} := ${L(l.value)}`)}return{result:!0,referenceRecord:r}},Ge=(c,e)=>{let{conditions:r,endpoint:f}=c,{result:t,referenceRecord:l}=q(r,e);if(!t)return;let s={...e,referenceRecord:{...e.referenceRecord,...l}},{url:w,properties:$,headers:u}=f;return e.logger?.debug?.(`${y} Resolving endpoint from template: ${L(f)}`),{...u!=null&&{headers:ac(u,s)},...$!=null&&{properties:K($,s)},url:nc(w,s)}},Qe=(c,e)=>{let{conditions:r,error:f}=c,{result:t,referenceRecord:l}=q(r,e);if(!t)return;throw new b(W(f,"Error",{...e,referenceRecord:{...e.referenceRecord,...l}}))},Uc=(c,e)=>{for(let r of c)if(r.type==="endpoint"){let f=Ge(r,e);if(f)return f}else if(r.type==="error")Qe(r,e);else if(r.type==="tree"){let f=Lc.evaluateTreeRule(r,e);if(f)return f}else throw new b(`Unknown endpoint rule: ${r}`);throw new b("Rules evaluation failed")},Ye=(c,e)=>{let{conditions:r,rules:f}=c,{result:t,referenceRecord:l}=q(r,e);if(!t)return;return Lc.evaluateRules(f,{...e,referenceRecord:{...e.referenceRecord,...l}})},Lc={evaluateRules:Uc,evaluateTreeRule:Ye},ze=(c,e)=>{let{endpointParams:r,logger:f}=e,{parameters:t,rules:l}=c;e.logger?.debug?.(`${y} Initial EndpointParams: ${L(r)}`);let s=Object.entries(t).filter(([,u])=>u.default!=null).map(([u,d])=>[u,d.default]);if(s.length>0)for(let[u,d]of s)r[u]=r[u]??d;let w=Object.entries(t).filter(([,u])=>u.required).map(([u])=>u);for(let u of w)if(r[u]==null)throw new b(`Missing required parameter: '${u}'`);let $=Uc(l,{endpointParams:r,logger:f,referenceRecord:{}});return e.logger?.debug?.(`${y} Resolved endpoint: ${L($)}`),$};Ke.BinaryDecisionDiagram=Y;Ke.EndpointCache=tc;Ke.EndpointError=b;Ke.customEndpointFunctions=Q;Ke.decideEndpoint=Ze;Ke.isIpAddress=sc;Ke.isValidHostLabel=z;Ke.resolveEndpoint=ze});var jr=O((dr)=>{var n=rc(),B=C(),me=Rc(),T="AWS_USE_DUALSTACK_ENDPOINT",_="use_dualstack_endpoint",oe=!1,Ee={environmentVariableSelector:(c)=>n.booleanSelector(c,T,n.SelectorType.ENV),configFileSelector:(c)=>n.booleanSelector(c,_,n.SelectorType.CONFIG),default:!1},He={environmentVariableSelector:(c)=>n.booleanSelector(c,T,n.SelectorType.ENV),configFileSelector:(c)=>n.booleanSelector(c,_,n.SelectorType.CONFIG),default:void 0},N="AWS_USE_FIPS_ENDPOINT",D="use_fips_endpoint",ke=!1,ve={environmentVariableSelector:(c)=>n.booleanSelector(c,N,n.SelectorType.ENV),configFileSelector:(c)=>n.booleanSelector(c,D,n.SelectorType.CONFIG),default:!1},ge={environmentVariableSelector:(c)=>n.booleanSelector(c,N,n.SelectorType.ENV),configFileSelector:(c)=>n.booleanSelector(c,D,n.SelectorType.CONFIG),default:void 0},pe=(c)=>{let{tls:e,endpoint:r,urlParser:f,useDualstackEndpoint:t}=c;return Object.assign(c,{tls:e??!0,endpoint:B.normalizeProvider(typeof r==="string"?f(r):r),isCustomEndpoint:!0,useDualstackEndpoint:B.normalizeProvider(t??!1)})},ie=async(c)=>{let{tls:e=!0}=c,r=await c.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw Error("Invalid region in client config");let t=await c.useDualstackEndpoint(),l=await c.useFipsEndpoint(),{hostname:s}=await c.regionInfoProvider(r,{useDualstackEndpoint:t,useFipsEndpoint:l})??{};if(!s)throw Error("Cannot resolve hostname from client config");return c.urlParser(`${e?"https:":"http:"}//${s}`)},cr=(c)=>{let e=B.normalizeProvider(c.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:f,urlParser:t,tls:l}=c;return Object.assign(c,{tls:l??!0,endpoint:r?B.normalizeProvider(typeof r==="string"?t(r):r):()=>ie({...c,useDualstackEndpoint:e,useFipsEndpoint:f}),isCustomEndpoint:!!r,useDualstackEndpoint:e})},yc="AWS_REGION",xc="region",er={environmentVariableSelector:(c)=>c[yc],configFileSelector:(c)=>c[xc],default:()=>{throw Error("Region is missing")}},rr={preferredFile:"credentials"},Ic=new Set,fr=(c,e=me.isValidHostLabel)=>{if(!Ic.has(c)&&!e(c))if(c==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw Error(`Region not accepted: region="${c}" is not a valid hostname component.`);else Ic.add(c)},Ac=(c)=>typeof c==="string"&&(c.startsWith("fips-")||c.endsWith("-fips")),tr=(c)=>Ac(c)?["fips-aws-global","aws-fips"].includes(c)?"us-east-1":c.replace(/fips-(dkr-|prod-)?|-fips/,""):c,lr=(c)=>{let{region:e,useFipsEndpoint:r}=c;if(!e)throw Error("Region is missing");return Object.assign(c,{region:async()=>{let f=typeof e==="function"?await e():e,t=tr(f);return fr(t),t},useFipsEndpoint:async()=>{let f=typeof e==="string"?e:await e();if(Ac(f))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}})},Vc=(c=[],{useFipsEndpoint:e,useDualstackEndpoint:r})=>c.find(({tags:f})=>e===f.includes("fips")&&r===f.includes("dualstack"))?.hostname,sr=(c,{regionHostname:e,partitionHostname:r})=>e?e:r?r.replace("{region}",c):void 0,ur=(c,{partitionHash:e})=>Object.keys(e||{}).find((r)=>e[r].regions.includes(c))??"aws",$r=(c,{signingRegion:e,regionRegex:r,useFipsEndpoint:f})=>{if(e)return e;else if(f){let t=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),l=c.match(t);if(l)return l[0].slice(1,-1)}},wr=(c,{useFipsEndpoint:e=!1,useDualstackEndpoint:r=!1,signingService:f,regionHash:t,partitionHash:l})=>{let s=ur(c,{partitionHash:l}),w=c in t?c:l[s]?.endpoint??c,$={useFipsEndpoint:e,useDualstackEndpoint:r},u=Vc(t[w]?.variants,$),d=Vc(l[s]?.variants,$),a=sr(w,{regionHostname:u,partitionHostname:d});if(a===void 0)throw Error(`Endpoint resolution failed for: ${{resolvedRegion:w,useFipsEndpoint:e,useDualstackEndpoint:r}}`);let h=$r(a,{signingRegion:t[w]?.signingRegion,regionRegex:l[s].regionRegex,useFipsEndpoint:e});return{partition:s,signingService:f,hostname:a,...h&&{signingRegion:h},...t[w]?.signingService&&{signingService:t[w].signingService}}};dr.CONFIG_USE_DUALSTACK_ENDPOINT=_;dr.CONFIG_USE_FIPS_ENDPOINT=D;dr.DEFAULT_USE_DUALSTACK_ENDPOINT=oe;dr.DEFAULT_USE_FIPS_ENDPOINT=ke;dr.ENV_USE_DUALSTACK_ENDPOINT=T;dr.ENV_USE_FIPS_ENDPOINT=N;dr.NODE_REGION_CONFIG_FILE_OPTIONS=rr;dr.NODE_REGION_CONFIG_OPTIONS=er;dr.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=Ee;dr.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=ve;dr.REGION_ENV_NAME=yc;dr.REGION_INI_NAME=xc;dr.getRegionInfo=wr;dr.nodeDualstackConfigSelectors=He;dr.nodeFipsConfigSelectors=ge;dr.resolveCustomEndpointsConfig=pe;dr.resolveEndpointsConfig=cr;dr.resolveRegionConfig=lr});
4
+ export{ae as zg,Rc as Ag,rc as Bg,jr as Cg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nv as D}from"./chunk-1e73ypg5.js";import{PF as C}from"./chunk-9g64kggy.js";import{RF as z,UF as B}from"./chunk-8j3aw4qg.js";var H=z((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var E=B("fs"),F=D(),q=C();async function G(){try{return(await E.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}try{return(await(0,F.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}return}v.getMachineId=G});export default H();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{OF as R}from"./chunk-0qqpjj2h.js";import{PF as j}from"./chunk-9g64kggy.js";import{QF as v,RF as X,UF as N}from"./chunk-8j3aw4qg.js";var l=X((u)=>{Object.defineProperty(u,"__esModule",{value:!0});u.OTLPExporterBase=void 0;class c{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}u.OTLPExporterBase=c});var S=X((a)=>{Object.defineProperty(a,"__esModule",{value:!0});a.OTLPExporterError=void 0;class i extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}a.OTLPExporterError=i});var H=X((s)=>{Object.defineProperty(s,"__esModule",{value:!0});s.getSharedConfigurationDefaults=s.mergeOtlpSharedConfigurationWithDefaults=s.wrapStaticHeadersInFunction=s.validateTimeoutMillis=void 0;function t(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}s.validateTimeoutMillis=t;function L0(Z){if(Z==null)return;return async()=>Z}s.wrapStaticHeadersInFunction=L0;function A0(Z,$,Y){return{timeoutMillis:t(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}s.mergeOtlpSharedConfigurationWithDefaults=A0;function H0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}s.getSharedConfigurationDefaults=H0});var e=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.CompressionAlgorithm=void 0;var R0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(R0=r.CompressionAlgorithm||(r.CompressionAlgorithm={}))});var x=X(($Z)=>{Object.defineProperty($Z,"__esModule",{value:!0});$Z.createBoundedQueueExportPromiseHandler=void 0;class ZZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function M0(Z){return new ZZ(Z.concurrencyLimit)}$Z.createBoundedQueueExportPromiseHandler=M0});var WZ=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createLoggingPartialSuccessResponseHandler=void 0;var b0=j();function T0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function k0(){return{handleResponse(Z){if(Z==null||!T0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;b0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}GZ.createLoggingPartialSuccessResponseHandler=k0});var C=X((KZ)=>{Object.defineProperty(KZ,"__esModule",{value:!0});KZ.createOtlpExportDelegate=void 0;var q=R(),JZ=S(),E0=WZ(),y0=j();class XZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=y0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new JZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new JZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function h0(Z,$){return new XZ(Z.transport,Z.serializer,(0,E0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}KZ.createOtlpExportDelegate=h0});var FZ=X((wZ)=>{Object.defineProperty(wZ,"__esModule",{value:!0});wZ.createOtlpNetworkExportDelegate=void 0;var x0=x(),C0=C();function _0(Z,$,Y){return(0,C0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,x0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}wZ.createOtlpNetworkExportDelegate=_0});var NZ=X((B)=>{Object.defineProperty(B,"__esModule",{value:!0});B.createOtlpNetworkExportDelegate=B.CompressionAlgorithm=B.getSharedConfigurationDefaults=B.mergeOtlpSharedConfigurationWithDefaults=B.OTLPExporterError=B.OTLPExporterBase=void 0;var v0=l();Object.defineProperty(B,"OTLPExporterBase",{enumerable:!0,get:function(){return v0.OTLPExporterBase}});var m0=S();Object.defineProperty(B,"OTLPExporterError",{enumerable:!0,get:function(){return m0.OTLPExporterError}});var BZ=H();Object.defineProperty(B,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return BZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(B,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return BZ.getSharedConfigurationDefaults}});var f0=e();Object.defineProperty(B,"CompressionAlgorithm",{enumerable:!0,get:function(){return f0.CompressionAlgorithm}});var g0=FZ();Object.defineProperty(B,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return g0.createOtlpNetworkExportDelegate}})});var PZ=X((HZ)=>{Object.defineProperty(HZ,"__esModule",{value:!0});HZ.validateAndNormalizeHeaders=void 0;var e0=j();function Z3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else e0.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}HZ.validateAndNormalizeHeaders=Z3});var bZ=X((RZ)=>{Object.defineProperty(RZ,"__esModule",{value:!0});RZ.getHttpConfigurationDefaults=RZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var SZ=H(),$3=PZ();function Y3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,$3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function G3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function Q3(Z,$,Y){return{...(0,SZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:Y3(Z.headers,$.headers,Y.headers),url:G3(Z.url)??$.url??Y.url}}RZ.mergeOtlpHttpConfigurationWithDefaults=Q3;function W3(Z,$){return{...(0,SZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}RZ.getHttpConfigurationDefaults=W3});var b=X((EZ)=>{Object.defineProperty(EZ,"__esModule",{value:!0});EZ.getNodeHttpConfigurationDefaults=EZ.mergeOtlpNodeHttpConfigurationWithDefaults=EZ.httpAgentFactoryFromOptions=void 0;var TZ=bZ();function kZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:O,key:w,...K}=Z;return new Q(K)}return new Q(Z)}}EZ.httpAgentFactoryFromOptions=kZ;function X3(Z,$,Y){return{...(0,TZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}EZ.mergeOtlpNodeHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,TZ.getHttpConfigurationDefaults)(Z,$),agentFactory:kZ({keepAlive:!0})}}EZ.getNodeHttpConfigurationDefaults=K3});var CZ=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.parseRetryAfterToMills=hZ.isExportHTTPErrorRetryable=void 0;function D3(Z){return Z===429||Z===502||Z===503||Z===504}hZ.isExportHTTPErrorRetryable=D3;function F3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}hZ.parseRetryAfterToMills=F3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.VERSION=void 0;_Z.VERSION="0.214.0"});var uZ=X((dZ)=>{Object.defineProperty(dZ,"__esModule",{value:!0});dZ.compressAndSend=dZ.sendWithHttp=void 0;var N3=N("zlib"),V3=N("stream"),T=CZ(),j3=S(),q3=mZ(),fZ=`OTel-OTLP-Exporter-JavaScript/${q3.VERSION}`;function O3(Z,$,Y,G,Q,W,O,w){return new Promise((K)=>{let U=new URL($);if(Q)Y["User-Agent"]=`${Q} ${fZ}`;else Y["User-Agent"]=fZ;let A={hostname:U.hostname,port:U.port,path:U.pathname,method:"POST",headers:Y,agent:W},V=Z(A,(J)=>{let D=[];J.on("data",(F)=>D.push(F)),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(D)});else if(J.statusCode&&(0,T.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,T.parseRetryAfterToMills)(J.headers["retry-after"])});else{let F=new j3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(D).toString());K({status:"failure",error:F})}}),J.on("error",(F)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,T.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:F,retryInMillis:(0,T.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:F})})});V.setTimeout(w,()=>{V.destroy(),K({status:"retryable",error:Error("Request timed out")})}),V.on("error",(J)=>{if(L3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),gZ(V,G,O,(J)=>{K({status:"failure",error:J})})})}dZ.sendWithHttp=O3;function gZ(Z,$,Y,G){let Q=U3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(N3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}dZ.compressAndSend=gZ;function U3(Z){let $=new V3.Readable;return $.push(Z),$.push(null),$}function L3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var aZ=X((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.createHttpExporterTransport=void 0;var H3=uZ();class pZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,H3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),I3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function I3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function P3(Z){return new pZ(Z)}lZ.createHttpExporterTransport=P3});var rZ=X((sZ)=>{Object.defineProperty(sZ,"__esModule",{value:!0});sZ.createRetryingTransport=void 0;var P=j(),m=5,S3=1000,R3=5000,M3=1.5,nZ=0.2;function b3(){return Math.random()*(2*nZ)-nZ}class tZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=m,G=S3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let O=Math.max(Math.min(G*(1+b3()),R3),0);G=G*M3;let w=W.retryInMillis??O,K=Q-Date.now();if(w>K)return P.diag.info(`Export retry time ${Math.round(w)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;P.diag.verbose(`Scheduling export retry in ${Math.round(w)}ms`),W=await this.retry(Z,K,w)}if(W.status==="success")P.diag.verbose(`Export succeeded after ${m-Y} retry attempts.`);else if(W.status==="retryable")P.diag.info(`Export failed after maximum retry attempts (${m}).`);else P.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function T3(Z){return new tZ(Z.transport)}sZ.createRetryingTransport=T3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createOtlpHttpExportDelegate=void 0;var k3=C(),E3=aZ(),y3=x(),h3=rZ();function x3(Z,$){return(0,k3.createOtlpExportDelegate)({transport:(0,h3.createRetryingTransport)({transport:(0,E3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,y3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}eZ.createOtlpHttpExportDelegate=x3});var f=X((J0)=>{Object.defineProperty(J0,"__esModule",{value:!0});J0.getSharedConfigurationFromEnvironment=void 0;var Q0=R(),W0=j();function Y0(Z){let $=(0,Q0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;W0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function C3(Z){let $=Y0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=Y0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function G0(Z){let $=(0,Q0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;W0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function _3(Z){let $=G0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=G0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function v3(Z){return{timeoutMillis:C3(Z),compression:_3(Z)}}J0.getSharedConfigurationFromEnvironment=v3});var w0=X((K0)=>{Object.defineProperty(K0,"__esModule",{value:!0});K0.getNodeHttpConfigurationFromEnvironment=void 0;var m3=N("fs"),f3=N("path"),z=R(),k=j(),g3=f(),d3=H(),c3=b();function u3(Z){let $=(0,z.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,z.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,z.parseKeyPairsIntoRecord)($),Q=(0,z.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,z.parseKeyPairsIntoRecord)(Y),(0,z.parseKeyPairsIntoRecord)($))}function p3(Z){try{return new URL(Z).toString()}catch{k.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function l3(Z,$){try{new URL(Z)}catch{k.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{k.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function i3(Z){let $=(0,z.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return l3($,Z)}function a3(Z){let $=(0,z.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return p3($)}function g(Z,$,Y){let G=(0,z.getStringFromEnv)(Z),Q=(0,z.getStringFromEnv)($),W=G??Q;if(W!=null)try{return m3.readFileSync(f3.resolve(process.cwd(),W))}catch{k.diag.warn(Y);return}else return}function n3(Z){return g(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function t3(Z){return g(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function s3(Z){return g(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function o3(Z,$){return{...(0,g3.getSharedConfigurationFromEnvironment)(Z),url:a3(Z)??i3($),headers:(0,d3.wrapStaticHeadersInFunction)(u3(Z)),agentFactory:(0,c3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:s3(Z),cert:n3(Z),key:t3(Z)})}}K0.getNodeHttpConfigurationFromEnvironment=o3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.convertLegacyHeaders=void 0;var r3=H();function e3(Z){if(typeof Z.headers==="function")return Z.headers;return(0,r3.wrapStaticHeadersInFunction)(Z.headers)}D0.convertLegacyHeaders=e3});var q0=X((V0)=>{Object.defineProperty(V0,"__esModule",{value:!0});V0.convertLegacyHttpOptions=void 0;var Z4=j(),N0=b(),$4=d(),Y4=w0(),G4=B0();function Q4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,$4.httpAgentFactoryFromOptions)($);else return}function W4(Z,$,Y,G){if(Z.metadata)Z4.diag.warn("Metadata cannot be set when using http");return(0,N0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,G4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:Q4(Z),userAgent:Z.userAgent},(0,Y4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,N0.getNodeHttpConfigurationDefaults)(G,Y))}V0.convertLegacyHttpOptions=W4});var d=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var J4=b();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return J4.httpAgentFactoryFromOptions}});var X4=$0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return X4.createOtlpHttpExportDelegate}});var K4=f();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return K4.getSharedConfigurationFromEnvironment}});var z4=q0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return z4.convertLegacyHttpOptions}})});var O0=v(NZ(),1);function VZ(Z,$){let Y={attributes:I(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function jZ(Z){return{name:Z.name,version:Z.version}}function I(Z,$){return Object.keys(Z).map((Y)=>c0(Y,Z[Y],$))}function c0(Z,$,Y){return{key:Z,value:_($,Y)}}function _(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=_(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:_(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var u0=256,p0=512;function qZ(Z,$){let Y=Z&255|u0;if($)Y|=p0;return Y}function l0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:I(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>a0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>i0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:qZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function i0(Z,$){return{attributes:Z.attributes?I(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:qZ(Z.context.traceFlags,Z.context.isRemote)}}function a0(Z,$){return{attributes:Z.attributes?I(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function OZ(Z,$){return{resourceSpans:t0(Z,$)}}function n0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function t0(Z,$){let Y=n0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[O,w]=W.value,K=[],U=w.values(),A=U.next();while(!A.done){let D=A.value;if(D.length>0){let F=D.map((U0)=>l0(U0,$));K.push({scope:jZ(D[0].instrumentationScope),spans:F,schemaUrl:D[0].instrumentationScope.schemaUrl})}A=U.next()}let V=VZ(O,$),J={resource:V,scopeSpans:K,schemaUrl:V.schemaUrl};G.push(J),W=Q.next()}return G}var LZ=v(R(),1);function s0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function o0(Z){return s0(Z).toString()}var r0=typeof BigInt<"u"?o0:LZ.hrTimeToNanoseconds;function UZ(Z){return Z}var AZ={encodeHrTime:r0,encodeSpanContext:UZ,encodeOptionalSpanContext:UZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var M={serializeRequest:(Z)=>{let $=OZ(Z,AZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};return JSON.parse(new TextDecoder().decode(Z))}};var E=v(d(),1);class y extends O0.OTLPExporterBase{constructor(Z={}){super(E.createOtlpHttpExportDelegate(E.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),M))}}export{y as OTLPTraceExporter};
@@ -0,0 +1,35 @@
1
+ // @bun
2
+ import"./chunk-8j3aw4qg.js";var{create:At,defineProperty:Ve,getOwnPropertyDescriptor:wt,getOwnPropertyNames:kt,getPrototypeOf:St}=Object,xt=Object.prototype.hasOwnProperty,Iu=(e)=>{throw TypeError(e)},Nt=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),ze=(e,u)=>{for(var t in u)Ve(e,t,{get:u[t],enumerable:!0})},Ot=(e,u,t,r)=>{if(u&&typeof u=="object"||typeof u=="function")for(let n of kt(u))!xt.call(e,n)&&n!==t&&Ve(e,n,{get:()=>u[n],enumerable:!(r=wt(u,n))||r.enumerable});return e},_t=(e,u,t)=>(t=e!=null?At(St(e)):{},Ot(u||!e||!e.__esModule?Ve(t,"default",{value:e,enumerable:!0}):t,e)),jt=(e,u,t)=>u.has(e)||Iu("Cannot "+t),Tt=(e,u,t)=>u.has(e)?Iu("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(e):u.set(e,t),ie=(e,u,t)=>(jt(e,u,"access private method"),t),It=Nt((e)=>{Object.defineProperty(e,"__esModule",{value:!0});function u(){return new Proxy({},{get:()=>(D)=>D})}var t=/\r\n|[\n\r\u2028\u2029]/;function r(D,i,o){let a=Object.assign({column:0,line:-1},D.start),s=Object.assign({},a,D.end),{linesAbove:l=2,linesBelow:F=3}=o||{},c=a.line,d=a.column,f=s.line,h=s.column,p=Math.max(c-(l+1),0),C=Math.min(i.length,f+F);c===-1&&(p=0),f===-1&&(C=i.length);let E=f-c,m={};if(E)for(let y=0;y<=E;y++){let g=y+c;if(!d)m[g]=!0;else if(y===0){let B=i[g-1].length;m[g]=[d,B-d+1]}else if(y===E)m[g]=[0,h];else{let B=i[g-y].length;m[g]=[0,B]}}else d===h?d?m[c]=[d,0]:m[c]=!0:m[c]=[d,h-d];return{start:p,end:C,markerLines:m}}function n(D,i,o={}){let a=u(!1),s=D.split(t),{start:l,end:F,markerLines:c}=r(i,s,o),d=i.start&&typeof i.start.column=="number",f=String(F).length,h=D.split(t,F).slice(l,F).map((p,C)=>{let E=l+1+C,m=` ${` ${E}`.slice(-f)} |`,y=c[E],g=!c[E+1];if(y){let B="";if(Array.isArray(y)){let V=p.slice(0,Math.max(y[0]-1,0)).replace(/[^\t]/g," "),fe=y[1]||1;B=[`
3
+ `,a.gutter(m.replace(/\d/g," "))," ",V,a.marker("^").repeat(fe)].join(""),g&&o.message&&(B+=" "+a.message(o.message))}return[a.marker(">"),a.gutter(m),p.length>0?` ${p}`:"",B].join("")}else return` ${a.gutter(m)}${p.length>0?` ${p}`:""}`}).join(`
4
+ `);return o.message&&!d&&(h=`${" ".repeat(f+1)}${o.message}
5
+ ${h}`),h}e.codeFrameColumns=n}),Pu={};ze(Pu,{__debug:()=>YD,check:()=>GD,doc:()=>gt,format:()=>Bt,formatWithCursor:()=>vt,getSupportInfo:()=>HD,util:()=>yt,version:()=>vD});var Pt=(e,u,t,r)=>{if(!(e&&u==null))return u.replaceAll?u.replaceAll(t,r):t.global?u.replace(t,r):u.split(t).join(r)},Ee=Pt,$t=class{diff(e,u,t={}){let r;typeof t=="function"?(r=t,t={}):("callback"in t)&&(r=t.callback);let n=this.castInput(e,t),D=this.castInput(u,t),i=this.removeEmpty(this.tokenize(n,t)),o=this.removeEmpty(this.tokenize(D,t));return this.diffWithOptionsObj(i,o,t,r)}diffWithOptionsObj(e,u,t,r){var n;let D=(C)=>{if(C=this.postProcess(C,t),r){setTimeout(function(){r(C)},0);return}else return C},i=u.length,o=e.length,a=1,s=i+o;t.maxEditLength!=null&&(s=Math.min(s,t.maxEditLength));let l=(n=t.timeout)!==null&&n!==void 0?n:1/0,F=Date.now()+l,c=[{oldPos:-1,lastComponent:void 0}],d=this.extractCommon(c[0],u,e,0,t);if(c[0].oldPos+1>=o&&d+1>=i)return D(this.buildValues(c[0].lastComponent,u,e));let f=-1/0,h=1/0,p=()=>{for(let C=Math.max(f,-a);C<=Math.min(h,a);C+=2){let E,m=c[C-1],y=c[C+1];m&&(c[C-1]=void 0);let g=!1;if(y){let V=y.oldPos-C;g=y&&0<=V&&V<i}let B=m&&m.oldPos+1<o;if(!g&&!B){c[C]=void 0;continue}if(!B||g&&m.oldPos<y.oldPos?E=this.addToPath(y,!0,!1,0,t):E=this.addToPath(m,!1,!0,1,t),d=this.extractCommon(E,u,e,C,t),E.oldPos+1>=o&&d+1>=i)return D(this.buildValues(E.lastComponent,u,e))||!0;c[C]=E,E.oldPos+1>=o&&(h=Math.min(h,C-1)),d+1>=i&&(f=Math.max(f,C+1))}a++};if(r)(function C(){setTimeout(function(){if(a>s||Date.now()>F)return r(void 0);p()||C()},0)})();else for(;a<=s&&Date.now()<=F;){let C=p();if(C)return C}}addToPath(e,u,t,r,n){let D=e.lastComponent;return D&&!n.oneChangePerToken&&D.added===u&&D.removed===t?{oldPos:e.oldPos+r,lastComponent:{count:D.count+1,added:u,removed:t,previousComponent:D.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:u,removed:t,previousComponent:D}}}extractCommon(e,u,t,r,n){let D=u.length,i=t.length,o=e.oldPos,a=o-r,s=0;for(;a+1<D&&o+1<i&&this.equals(t[o+1],u[a+1],n);)a++,o++,s++,n.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return s&&!n.oneChangePerToken&&(e.lastComponent={count:s,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=o,a}equals(e,u,t){return t.comparator?t.comparator(e,u):e===u||!!t.ignoreCase&&e.toLowerCase()===u.toLowerCase()}removeEmpty(e){let u=[];for(let t=0;t<e.length;t++)e[t]&&u.push(e[t]);return u}castInput(e,u){return e}tokenize(e,u){return Array.from(e)}join(e){return e.join("")}postProcess(e,u){return e}get useLongestToken(){return!1}buildValues(e,u,t){let r=[],n;for(;e;)r.push(e),n=e.previousComponent,delete e.previousComponent,e=n;r.reverse();let D=r.length,i=0,o=0,a=0;for(;i<D;i++){let s=r[i];if(s.removed)s.value=this.join(t.slice(a,a+s.count)),a+=s.count;else{if(!s.added&&this.useLongestToken){let l=u.slice(o,o+s.count);l=l.map(function(F,c){let d=t[a+c];return d.length>F.length?d:F}),s.value=this.join(l)}else s.value=this.join(u.slice(o,o+s.count));o+=s.count,s.added||(a+=s.count)}}return r}},Lt=class extends $t{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},Rt=new Lt;function Mt(e,u,t){return Rt.diff(e,u,t)}function Wt(e){let u=e.indexOf("\r");return u!==-1?e.charAt(u+1)===`
6
+ `?"crlf":"cr":"lf"}function qe(e){switch(e){case"cr":return"\r";case"crlf":return`\r
7
+ `;default:return`
8
+ `}}function $u(e,u){let t;switch(u){case`
9
+ `:t=/\n/gu;break;case"\r":t=/\r/gu;break;case`\r
10
+ `:t=/\r\n/gu;break;default:throw Error(`Unexpected "eol" ${JSON.stringify(u)}.`)}let r=e.match(t);return r?r.length:0}function Vt(e){return Ee(!1,e,/\r\n?/gu,`
11
+ `)}var X="string",I="array",U="cursor",P="indent",$="align",L="trim",w="group",_="fill",k="if-break",R="indent-if-break",M="line-suffix",W="line-suffix-boundary",b="line",j="label",S="break-parent",Lu=new Set([U,P,$,L,w,_,k,R,M,W,b,j,S]),zt=(e,u,t)=>{if(!(e&&u==null))return Array.isArray(u)||typeof u=="string"?u[t<0?u.length+t:t]:u.at(t)},v=zt;function qt(e){let u=e.length;for(;u>0&&(e[u-1]==="\r"||e[u-1]===`
12
+ `);)u--;return u<e.length?e.slice(0,u):e}function Ut(e){if(typeof e=="string")return X;if(Array.isArray(e))return I;if(!e)return;let{type:u}=e;if(Lu.has(u))return u}var ee=Ut,Jt=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Kt(e){let u=e===null?"null":typeof e;if(u!=="string"&&u!=="object")return`Unexpected doc '${u}',
13
+ Expected it to be 'string' or 'object'.`;if(ee(e))throw Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let r=Jt([...Lu].map((n)=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
14
+ Expected it to be ${r}.`}var Gt=class extends Error{name="InvalidDocError";constructor(e){super(Kt(e)),this.doc=e}},re=Gt,Du={};function Ht(e,u,t,r){let n=[e];for(;n.length>0;){let D=n.pop();if(D===Du){t(n.pop());continue}t&&n.push(D,Du);let i=ee(D);if(!i)throw new re(D);if((u==null?void 0:u(D))!==!1)switch(i){case I:case _:{let o=i===I?D:D.parts;for(let a=o.length,s=a-1;s>=0;--s)n.push(o[s]);break}case k:n.push(D.flatContents,D.breakContents);break;case w:if(r&&D.expandedStates)for(let o=D.expandedStates.length,a=o-1;a>=0;--a)n.push(D.expandedStates[a]);else n.push(D.contents);break;case $:case P:case R:case j:case M:n.push(D.contents);break;case X:case U:case L:case W:case b:case S:break;default:throw new re(D)}}}var Ue=Ht;function ge(e,u){if(typeof e=="string")return u(e);let t=new Map;return r(e);function r(D){if(t.has(D))return t.get(D);let i=n(D);return t.set(D,i),i}function n(D){switch(ee(D)){case I:return u(D.map(r));case _:return u({...D,parts:D.parts.map(r)});case k:return u({...D,breakContents:r(D.breakContents),flatContents:r(D.flatContents)});case w:{let{expandedStates:i,contents:o}=D;return i?(i=i.map(r),o=i[0]):o=r(o),u({...D,contents:o,expandedStates:i})}case $:case P:case R:case j:case M:return u({...D,contents:r(D.contents)});case X:case U:case L:case W:case b:case S:return u(D);default:throw new re(D)}}}function Je(e,u,t){let r=t,n=!1;function D(i){if(n)return!1;let o=u(i);o!==void 0&&(n=!0,r=o)}return Ue(e,D),r}function Yt(e){if(e.type===w&&e.break||e.type===b&&e.hard||e.type===S)return!0}function Zt(e){return Je(e,Yt,!1)}function iu(e){if(e.length>0){let u=v(!1,e,-1);!u.expandedStates&&!u.break&&(u.break="propagated")}return null}function Qt(e){let u=new Set,t=[];function r(D){if(D.type===S&&iu(t),D.type===w){if(t.push(D),u.has(D))return!1;u.add(D)}}function n(D){D.type===w&&t.pop().break&&iu(t)}Ue(e,r,n,!0)}function Xt(e){return e.type===b&&!e.hard?e.soft?"":" ":e.type===k?e.flatContents:e}function er(e){return ge(e,Xt)}function ou(e){for(e=[...e];e.length>=2&&v(!1,e,-2).type===b&&v(!1,e,-1).type===S;)e.length-=2;if(e.length>0){let u=oe(v(!1,e,-1));e[e.length-1]=u}return e}function oe(e){switch(ee(e)){case P:case R:case w:case M:case j:{let u=oe(e.contents);return{...e,contents:u}}case k:return{...e,breakContents:oe(e.breakContents),flatContents:oe(e.flatContents)};case _:return{...e,parts:ou(e.parts)};case I:return ou(e);case X:return qt(e);case $:case U:case L:case W:case b:case S:break;default:throw new re(e)}return e}function Ru(e){return oe(tr(e))}function ur(e){switch(ee(e)){case _:if(e.parts.every((u)=>u===""))return"";break;case w:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===w&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case $:case P:case R:case M:if(!e.contents)return"";break;case k:if(!e.flatContents&&!e.breakContents)return"";break;case I:{let u=[];for(let t of e){if(!t)continue;let[r,...n]=Array.isArray(t)?t:[t];typeof r=="string"&&typeof v(!1,u,-1)=="string"?u[u.length-1]+=r:u.push(r),u.push(...n)}return u.length===0?"":u.length===1?u[0]:u}case X:case U:case L:case W:case b:case j:case S:break;default:throw new re(e)}return e}function tr(e){return ge(e,(u)=>ur(u))}function rr(e,u=qu){return ge(e,(t)=>typeof t=="string"?Uu(u,t.split(`
15
+ `)):t)}function nr(e){if(e.type===b)return!0}function Dr(e){return Je(e,nr,!1)}function pe(e,u){return e.type===j?{...e,contents:u(e.contents)}:u(e)}var Ke=()=>{},O=Ke,Mu=Ke,ir=Ke;function me(e){return O(e),{type:P,contents:e}}function ne(e,u){return O(u),{type:$,contents:u,n:e}}function Wu(e,u={}){return O(e),Mu(u.expandedStates,!0),{type:w,id:u.id,contents:e,break:!!u.shouldBreak,expandedStates:u.expandedStates}}function or(e){return ne(Number.NEGATIVE_INFINITY,e)}function ar(e){return ne({type:"root"},e)}function sr(e){return ne(-1,e)}function lr(e,u){return Wu(e[0],{...u,expandedStates:e})}function cr(e){return ir(e),{type:_,parts:e}}function fr(e,u="",t={}){return O(e),u!==""&&O(u),{type:k,breakContents:e,flatContents:u,groupId:t.groupId}}function dr(e,u){return O(e),{type:R,contents:e,groupId:u.groupId,negate:u.negate}}function Te(e){return O(e),{type:M,contents:e}}var Fr={type:W},ye={type:S},pr={type:L},Ge={type:b,hard:!0},Vu={type:b,hard:!0,literal:!0},zu={type:b},hr={type:b,soft:!0},Z=[Ge,ye],qu=[Vu,ye],Y={type:U};function Uu(e,u){O(e),Mu(u);let t=[];for(let r=0;r<u.length;r++)r!==0&&t.push(e),t.push(u[r]);return t}function Ju(e,u,t){O(e);let r=e;if(u>0){for(let n=0;n<Math.floor(u/t);++n)r=me(r);r=ne(u%t,r),r=ne(Number.NEGATIVE_INFINITY,r)}return r}function Cr(e,u){return O(u),e?{type:j,label:e,contents:u}:u}function T(e){var u;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...T(r));else{let n=T(r);n!==""&&t.push(n)}return t}return e.type===k?{...e,breakContents:T(e.breakContents),flatContents:T(e.flatContents)}:e.type===w?{...e,contents:T(e.contents),expandedStates:(u=e.expandedStates)==null?void 0:u.map(T)}:e.type===_?{type:"fill",parts:e.parts.map(T)}:e.contents?{...e,contents:T(e.contents)}:e}function mr(e){let u=Object.create(null),t=new Set;return r(T(e));function r(D,i,o){var a,s;if(typeof D=="string")return JSON.stringify(D);if(Array.isArray(D)){let l=D.map(r).filter(Boolean);return l.length===1?l[0]:`[${l.join(", ")}]`}if(D.type===b){let l=((a=o==null?void 0:o[i+1])==null?void 0:a.type)===S;return D.literal?l?"literalline":"literallineWithoutBreakParent":D.hard?l?"hardline":"hardlineWithoutBreakParent":D.soft?"softline":"line"}if(D.type===S)return((s=o==null?void 0:o[i-1])==null?void 0:s.type)===b&&o[i-1].hard?void 0:"breakParent";if(D.type===L)return"trim";if(D.type===P)return"indent("+r(D.contents)+")";if(D.type===$)return D.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+r(D.contents)+")":D.n<0?"dedent("+r(D.contents)+")":D.n.type==="root"?"markAsRoot("+r(D.contents)+")":"align("+JSON.stringify(D.n)+", "+r(D.contents)+")";if(D.type===k)return"ifBreak("+r(D.breakContents)+(D.flatContents?", "+r(D.flatContents):"")+(D.groupId?(D.flatContents?"":', ""')+`, { groupId: ${n(D.groupId)} }`:"")+")";if(D.type===R){let l=[];D.negate&&l.push("negate: true"),D.groupId&&l.push(`groupId: ${n(D.groupId)}`);let F=l.length>0?`, { ${l.join(", ")} }`:"";return`indentIfBreak(${r(D.contents)}${F})`}if(D.type===w){let l=[];D.break&&D.break!=="propagated"&&l.push("shouldBreak: true"),D.id&&l.push(`id: ${n(D.id)}`);let F=l.length>0?`, { ${l.join(", ")} }`:"";return D.expandedStates?`conditionalGroup([${D.expandedStates.map((c)=>r(c)).join(",")}]${F})`:`group(${r(D.contents)}${F})`}if(D.type===_)return`fill([${D.parts.map((l)=>r(l)).join(", ")}])`;if(D.type===M)return"lineSuffix("+r(D.contents)+")";if(D.type===W)return"lineSuffixBoundary";if(D.type===j)return`label(${JSON.stringify(D.label)}, ${r(D.contents)})`;if(D.type===U)return"cursor";throw Error("Unknown doc type "+D.type)}function n(D){if(typeof D!="symbol")return JSON.stringify(String(D));if(D in u)return u[D];let i=D.description||"symbol";for(let o=0;;o++){let a=i+(o>0?` #${o}`:"");if(!t.has(a))return t.add(a),u[D]=`Symbol.for(${JSON.stringify(a)})`}}}var Er=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\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(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\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 gr(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function yr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&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>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=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<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var vr=(e)=>!(gr(e)||yr(e)),Br=/[^\x20-\x7F]/u;function br(e){if(!e)return 0;if(!Br.test(e))return e.length;e=e.replace(Er()," ");let u=0;for(let t of e){let r=t.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||(u+=vr(r)?1:2)}return u}var He=br,A=Symbol("MODE_BREAK"),x=Symbol("MODE_FLAT"),ue=Symbol("cursor"),Ie=Symbol("DOC_FILL_PRINTED_LENGTH");function Ku(){return{value:"",length:0,queue:[]}}function Ar(e,u){return Pe(e,{type:"indent"},u)}function wr(e,u,t){return u===Number.NEGATIVE_INFINITY?e.root||Ku():u<0?Pe(e,{type:"dedent"},t):u?u.type==="root"?{...e,root:e}:Pe(e,{type:typeof u=="string"?"stringAlign":"numberAlign",n:u},t):e}function Pe(e,u,t){let r=u.type==="dedent"?e.queue.slice(0,-1):[...e.queue,u],n="",D=0,i=0,o=0;for(let f of r)switch(f.type){case"indent":l(),t.useTabs?a(1):s(t.tabWidth);break;case"stringAlign":l(),n+=f.n,D+=f.n.length;break;case"numberAlign":i+=1,o+=f.n;break;default:throw Error(`Unexpected type '${f.type}'`)}return c(),{...e,value:n,length:D,queue:r};function a(f){n+="\t".repeat(f),D+=t.tabWidth*f}function s(f){n+=" ".repeat(f),D+=f}function l(){t.useTabs?F():c()}function F(){i>0&&a(i),d()}function c(){o>0&&s(o),d()}function d(){i=0,o=0}}function $e(e){let u=0,t=0,r=e.length;e:for(;r--;){let n=e[r];if(n===ue){t++;continue}for(let D=n.length-1;D>=0;D--){let i=n[D];if(i===" "||i==="\t")u++;else{e[r]=n.slice(0,D+1);break e}}}if(u>0||t>0)for(e.length=r+1;t-- >0;)e.push(ue);return u}function de(e,u,t,r,n,D){if(t===Number.POSITIVE_INFINITY)return!0;let i=u.length,o=[e],a=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(u[--i]);continue}let{mode:s,doc:l}=o.pop(),F=ee(l);switch(F){case X:a.push(l),t-=He(l);break;case I:case _:{let c=F===I?l:l.parts,d=l[Ie]??0;for(let f=c.length-1;f>=d;f--)o.push({mode:s,doc:c[f]});break}case P:case $:case R:case j:o.push({mode:s,doc:l.contents});break;case L:t+=$e(a);break;case w:{if(D&&l.break)return!1;let c=l.break?A:s,d=l.expandedStates&&c===A?v(!1,l.expandedStates,-1):l.contents;o.push({mode:c,doc:d});break}case k:{let c=(l.groupId?n[l.groupId]||x:s)===A?l.breakContents:l.flatContents;c&&o.push({mode:s,doc:c});break}case b:if(s===A||l.hard)return!0;l.soft||(a.push(" "),t--);break;case M:r=!0;break;case W:if(r)return!1;break}}return!1}function ve(e,u){let t={},r=u.printWidth,n=qe(u.endOfLine),D=0,i=[{ind:Ku(),mode:A,doc:e}],o=[],a=!1,s=[],l=0;for(Qt(e);i.length>0;){let{ind:c,mode:d,doc:f}=i.pop();switch(ee(f)){case X:{let h=n!==`
16
+ `?Ee(!1,f,`
17
+ `,n):f;o.push(h),i.length>0&&(D+=He(h));break}case I:for(let h=f.length-1;h>=0;h--)i.push({ind:c,mode:d,doc:f[h]});break;case U:if(l>=2)throw Error("There are too many 'cursor' in doc.");o.push(ue),l++;break;case P:i.push({ind:Ar(c,u),mode:d,doc:f.contents});break;case $:i.push({ind:wr(c,f.n,u),mode:d,doc:f.contents});break;case L:D-=$e(o);break;case w:switch(d){case x:if(!a){i.push({ind:c,mode:f.break?A:x,doc:f.contents});break}case A:{a=!1;let h={ind:c,mode:x,doc:f.contents},p=r-D,C=s.length>0;if(!f.break&&de(h,i,p,C,t))i.push(h);else if(f.expandedStates){let E=v(!1,f.expandedStates,-1);if(f.break){i.push({ind:c,mode:A,doc:E});break}else for(let m=1;m<f.expandedStates.length+1;m++)if(m>=f.expandedStates.length){i.push({ind:c,mode:A,doc:E});break}else{let y=f.expandedStates[m],g={ind:c,mode:x,doc:y};if(de(g,i,p,C,t)){i.push(g);break}}}else i.push({ind:c,mode:A,doc:f.contents});break}}f.id&&(t[f.id]=v(!1,i,-1).mode);break;case _:{let h=r-D,p=f[Ie]??0,{parts:C}=f,E=C.length-p;if(E===0)break;let m=C[p+0],y=C[p+1],g={ind:c,mode:x,doc:m},B={ind:c,mode:A,doc:m},V=de(g,[],h,s.length>0,t,!0);if(E===1){V?i.push(g):i.push(B);break}let fe={ind:c,mode:x,doc:y},we={ind:c,mode:A,doc:y};if(E===2){V?i.push(fe,g):i.push(we,B);break}let bt=C[p+2],ke={ind:c,mode:d,doc:{...f,[Ie]:p+2}};de({ind:c,mode:x,doc:[m,y,bt]},[],h,s.length>0,t,!0)?i.push(ke,fe,g):V?i.push(ke,we,g):i.push(ke,we,B);break}case k:case R:{let h=f.groupId?t[f.groupId]:d;if(h===A){let p=f.type===k?f.breakContents:f.negate?f.contents:me(f.contents);p&&i.push({ind:c,mode:d,doc:p})}if(h===x){let p=f.type===k?f.flatContents:f.negate?me(f.contents):f.contents;p&&i.push({ind:c,mode:d,doc:p})}break}case M:s.push({ind:c,mode:d,doc:f.contents});break;case W:s.length>0&&i.push({ind:c,mode:d,doc:Ge});break;case b:switch(d){case x:if(f.hard)a=!0;else{f.soft||(o.push(" "),D+=1);break}case A:if(s.length>0){i.push({ind:c,mode:d,doc:f},...s.reverse()),s.length=0;break}f.literal?c.root?(o.push(n,c.root.value),D=c.root.length):(o.push(n),D=0):(D-=$e(o),o.push(n+c.value),D=c.length);break}break;case j:i.push({ind:c,mode:d,doc:f.contents});break;case S:break;default:throw new re(f)}i.length===0&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let F=o.indexOf(ue);if(F!==-1){let c=o.indexOf(ue,F+1);if(c===-1)return{formatted:o.filter((p)=>p!==ue).join("")};let d=o.slice(0,F).join(""),f=o.slice(F+1,c).join(""),h=o.slice(c+1).join("");return{formatted:d+f+h,cursorNodeStart:d.length,cursorNodeText:f}}return{formatted:o.join("")}}function kr(e,u,t=0){let r=0;for(let n=t;n<e.length;++n)e[n]==="\t"?r=r+u-r%u:r++;return r}var Ye=kr,K,Le,he,Sr=class{constructor(e){Tt(this,K),this.stack=[e]}get key(){let{stack:e,siblings:u}=this;return v(!1,e,u===null?-2:-4)??null}get index(){return this.siblings===null?null:v(!1,this.stack,-2)}get node(){return v(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,u=v(!1,e,-3);return Array.isArray(u)?u:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:u}=this;return e!==null&&u===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...ie(this,K,he).call(this)]}getName(){let{stack:e}=this,{length:u}=e;return u>1?v(!1,e,-2):null}getValue(){return v(!1,this.stack,-1)}getNode(e=0){let u=ie(this,K,Le).call(this,e);return u===-1?null:this.stack[u]}getParentNode(e=0){return this.getNode(e+1)}call(e,...u){let{stack:t}=this,{length:r}=t,n=v(!1,t,-1);for(let D of u)n=n[D],t.push(D,n);try{return e(this)}finally{t.length=r}}callParent(e,u=0){let t=ie(this,K,Le).call(this,u+1),r=this.stack.splice(t+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...u){let{stack:t}=this,{length:r}=t,n=v(!1,t,-1);for(let D of u)n=n[D],t.push(D,n);try{for(let D=0;D<n.length;++D)t.push(D,n[D]),e(this,D,n),t.length-=2}finally{t.length=r}}map(e,...u){let t=[];return this.each((r,n,D)=>{t[n]=e(r,n,D)},...u),t}match(...e){let u=this.stack.length-1,t=null,r=this.stack[u--];for(let n of e){if(r===void 0)return!1;let D=null;if(typeof t=="number"&&(D=t,t=this.stack[u--],r=this.stack[u--]),n&&!n(r,t,D))return!1;t=this.stack[u--],r=this.stack[u--]}return!0}findAncestor(e){for(let u of ie(this,K,he).call(this))if(e(u))return u}hasAncestor(e){for(let u of ie(this,K,he).call(this))if(e(u))return!0;return!1}};K=new WeakSet,Le=function(e){let{stack:u}=this;for(let t=u.length-1;t>=0;t-=2)if(!Array.isArray(u[t])&&--e<0)return t;return-1},he=function*(){let{stack:e}=this;for(let u=e.length-3;u>=0;u-=2){let t=e[u];Array.isArray(t)||(yield t)}};var xr=Sr,Gu=new Proxy(()=>{},{get:()=>Gu}),Re=Gu;function Nr(e){return e!==null&&typeof e=="object"}var Or=Nr;function*Be(e,u){let{getVisitorKeys:t,filter:r=()=>!0}=u,n=(D)=>Or(D)&&r(D);for(let D of t(e)){let i=e[D];if(Array.isArray(i))for(let o of i)n(o)&&(yield o);else n(i)&&(yield i)}}function*_r(e,u){let t=[e];for(let r=0;r<t.length;r++){let n=t[r];for(let D of Be(n,u))yield D,t.push(D)}}function jr(e,u){return Be(e,u).next().done}function le(e){return(u,t,r)=>{let n=!!(r!=null&&r.backwards);if(t===!1)return!1;let{length:D}=u,i=t;for(;i>=0&&i<D;){let o=u.charAt(i);if(e instanceof RegExp){if(!e.test(o))return i}else if(!e.includes(o))return i;n?i--:i++}return i===-1||i===D?i:!1}}var Tr=le(/\s/u),q=le(" \t"),Hu=le(",; \t"),Yu=le(/[^\n\r]/u);function Ir(e,u,t){let r=!!(t!=null&&t.backwards);if(u===!1)return!1;let n=e.charAt(u);if(r){if(e.charAt(u-1)==="\r"&&n===`
18
+ `)return u-2;if(n===`
19
+ `||n==="\r"||n==="\u2028"||n==="\u2029")return u-1}else{if(n==="\r"&&e.charAt(u+1)===`
20
+ `)return u+2;if(n===`
21
+ `||n==="\r"||n==="\u2028"||n==="\u2029")return u+1}return u}var Q=Ir;function Pr(e,u,t={}){let r=q(e,t.backwards?u-1:u,t),n=Q(e,r,t);return r!==n}var z=Pr;function $r(e){return Array.isArray(e)&&e.length>0}var Lr=$r,Zu=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Rr=(e)=>Object.keys(e).filter((u)=>!Zu.has(u));function Mr(e){return e?(u)=>e(u,Zu):Rr}var be=Mr;function Wr(e){let u=e.type||e.kind||"(unknown type)",t=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 t.length>20&&(t=t.slice(0,19)+"\u2026"),u+(t?" "+t:"")}function Ze(e,u){(e.comments??(e.comments=[])).push(u),u.printed=!1,u.nodeDescription=Wr(e)}function ae(e,u){u.leading=!0,u.trailing=!1,Ze(e,u)}function G(e,u,t){u.leading=!1,u.trailing=!1,t&&(u.marker=t),Ze(e,u)}function se(e,u){u.leading=!1,u.trailing=!0,Ze(e,u)}var Se=new WeakMap;function Qe(e,u){if(Se.has(e))return Se.get(e);let{printer:{getCommentChildNodes:t,canAttachComment:r,getVisitorKeys:n},locStart:D,locEnd:i}=u;if(!r)return[];let o=((t==null?void 0:t(e,u))??[...Be(e,{getVisitorKeys:be(n)})]).flatMap((a)=>r(a)?[a]:Qe(a,u));return o.sort((a,s)=>D(a)-D(s)||i(a)-i(s)),Se.set(e,o),o}function Qu(e,u,t,r){let{locStart:n,locEnd:D}=t,i=n(u),o=D(u),a=Qe(e,t),s,l,F=0,c=a.length;for(;F<c;){let d=F+c>>1,f=a[d],h=n(f),p=D(f);if(h<=i&&o<=p)return Qu(f,u,t,f);if(p<=i){s=f,F=d+1;continue}if(o<=h){l=f,c=d;continue}throw Error("Comment location overlaps with node location")}if((r==null?void 0:r.type)==="TemplateLiteral"){let{quasis:d}=r,f=Ne(d,u,t);s&&Ne(d,s,t)!==f&&(s=null),l&&Ne(d,l,t)!==f&&(l=null)}return{enclosingNode:r,precedingNode:s,followingNode:l}}var xe=()=>!1;function Vr(e,u){let{comments:t}=e;if(delete e.comments,!Lr(t)||!u.printer.canAttachComment)return;let r=[],{printer:{experimentalFeatures:{avoidAstMutation:n=!1}={},handleComments:D={}},originalText:i}=u,{ownLine:o=xe,endOfLine:a=xe,remaining:s=xe}=D,l=t.map((F,c)=>({...Qu(e,F,u),comment:F,text:i,options:u,ast:e,isLastComment:t.length-1===c}));for(let[F,c]of l.entries()){let{comment:d,precedingNode:f,enclosingNode:h,followingNode:p,text:C,options:E,ast:m,isLastComment:y}=c,g;if(n?g=[c]:(d.enclosingNode=h,d.precedingNode=f,d.followingNode=p,g=[d,C,E,m,y]),zr(C,E,l,F))d.placement="ownLine",o(...g)||(p?ae(p,d):f?se(f,d):h?G(h,d):G(m,d));else if(qr(C,E,l,F))d.placement="endOfLine",a(...g)||(f?se(f,d):p?ae(p,d):h?G(h,d):G(m,d));else if(d.placement="remaining",!s(...g))if(f&&p){let B=r.length;B>0&&r[B-1].followingNode!==p&&au(r,E),r.push(c)}else f?se(f,d):p?ae(p,d):h?G(h,d):G(m,d)}if(au(r,u),!n)for(let F of t)delete F.precedingNode,delete F.enclosingNode,delete F.followingNode}var Xu=(e)=>!/[\S\n\u2028\u2029]/u.test(e);function zr(e,u,t,r){let{comment:n,precedingNode:D}=t[r],{locStart:i,locEnd:o}=u,a=i(n);if(D)for(let s=r-1;s>=0;s--){let{comment:l,precedingNode:F}=t[s];if(F!==D||!Xu(e.slice(o(l),a)))break;a=i(l)}return z(e,a,{backwards:!0})}function qr(e,u,t,r){let{comment:n,followingNode:D}=t[r],{locStart:i,locEnd:o}=u,a=o(n);if(D)for(let s=r+1;s<t.length;s++){let{comment:l,followingNode:F}=t[s];if(F!==D||!Xu(e.slice(a,i(l))))break;a=o(l)}return z(e,a)}function au(e,u){var t,r;let n=e.length;if(n===0)return;let{precedingNode:D,followingNode:i}=e[0],o=u.locStart(i),a;for(a=n;a>0;--a){let{comment:s,precedingNode:l,followingNode:F}=e[a-1];Re.strictEqual(l,D),Re.strictEqual(F,i);let c=u.originalText.slice(u.locEnd(s),o);if(((r=(t=u.printer).isGap)==null?void 0:r.call(t,c,u))??/^[\s(]*$/u.test(c))o=u.locStart(s);else break}for(let[s,{comment:l}]of e.entries())s<a?se(D,l):ae(i,l);for(let s of[D,i])s.comments&&s.comments.length>1&&s.comments.sort((l,F)=>u.locStart(l)-u.locStart(F));e.length=0}function Ne(e,u,t){let r=t.locStart(u)-1;for(let n=1;n<e.length;++n)if(r<t.locStart(e[n]))return n-1;return 0}function Ur(e,u){let t=u-1;t=q(e,t,{backwards:!0}),t=Q(e,t,{backwards:!0}),t=q(e,t,{backwards:!0});let r=Q(e,t,{backwards:!0});return t!==r}var Xe=Ur;function et(e,u){let t=e.node;return t.printed=!0,u.printer.printComment(e,u)}function Jr(e,u){var t;let r=e.node,n=[et(e,u)],{printer:D,originalText:i,locStart:o,locEnd:a}=u;if((t=D.isBlockComment)==null?void 0:t.call(D,r)){let l=z(i,a(r))?z(i,o(r),{backwards:!0})?Z:zu:" ";n.push(l)}else n.push(Z);let s=Q(i,q(i,a(r)));return s!==!1&&z(i,s)&&n.push(Z),n}function Kr(e,u,t){var r;let n=e.node,D=et(e,u),{printer:i,originalText:o,locStart:a}=u,s=(r=i.isBlockComment)==null?void 0:r.call(i,n);if(t!=null&&t.hasLineSuffix&&!(t!=null&&t.isBlock)||z(o,a(n),{backwards:!0})){let l=Xe(o,a(n));return{doc:Te([Z,l?Z:"",D]),isBlock:s,hasLineSuffix:!0}}return!s||t!=null&&t.hasLineSuffix?{doc:[Te([" ",D]),ye],isBlock:s,hasLineSuffix:!0}:{doc:[" ",D],isBlock:s,hasLineSuffix:!1}}function Gr(e,u){let t=e.node;if(!t)return{};let r=u[Symbol.for("printedComments")];if((t.comments||[]).filter((o)=>!r.has(o)).length===0)return{leading:"",trailing:""};let n=[],D=[],i;return e.each(()=>{let o=e.node;if(r!=null&&r.has(o))return;let{leading:a,trailing:s}=o;a?n.push(Jr(e,u)):s&&(i=Kr(e,u,i),D.push(i.doc))},"comments"),{leading:n,trailing:D}}function Hr(e,u,t){let{leading:r,trailing:n}=Gr(e,t);return!r&&!n?u:pe(u,(D)=>[r,D,n])}function Yr(e){let{[Symbol.for("comments")]:u,[Symbol.for("printedComments")]:t}=e;for(let r of u){if(!r.printed&&!t.has(r))throw Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}function Zr(e){return()=>{}}var Qr=Zr,ut=class extends Error{name="ConfigError"},su=class extends Error{name="UndefinedParserError"},Xr={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
22
+ (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"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:(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).
23
+ 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.
24
+ 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 tt({plugins:e=[],showDeprecated:u=!1}={}){let t=e.flatMap((n)=>n.languages??[]),r=[];for(let n of un(Object.assign({},...e.map(({options:D})=>D),Xr)))!u&&n.deprecated||(Array.isArray(n.choices)&&(u||(n.choices=n.choices.filter((D)=>!D.deprecated)),n.name==="parser"&&(n.choices=[...n.choices,...en(n.choices,t,e)])),n.pluginDefaults=Object.fromEntries(e.filter((D)=>{var i;return((i=D.defaultOptions)==null?void 0:i[n.name])!==void 0}).map((D)=>[D.name,D.defaultOptions[n.name]])),r.push(n));return{languages:t,options:r}}function*en(e,u,t){let r=new Set(e.map((n)=>n.value));for(let n of u)if(n.parsers){for(let D of n.parsers)if(!r.has(D)){r.add(D);let i=t.find((a)=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,D)),o=n.name;i!=null&&i.name&&(o+=` (plugin: ${i.name})`),yield{value:D,description:o}}}}function un(e){let u=[];for(let[t,r]of Object.entries(e)){let n={name:t,...r};Array.isArray(n.default)&&(n.default=v(!1,n.default,-1).value),u.push(n)}return u}var tn=(e,u)=>{if(!(e&&u==null))return u.toReversed||!Array.isArray(u)?u.toReversed():[...u].reverse()},rn=tn,lu,cu,fu,du,Fu,nn=((lu=globalThis.Deno)==null?void 0:lu.build.os)==="windows"||((fu=(cu=globalThis.navigator)==null?void 0:cu.platform)==null?void 0:fu.startsWith("Win"))||((Fu=(du=globalThis.process)==null?void 0:du.platform)==null?void 0:Fu.startsWith("win"))||!1;function rt(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Dn(e){return e=rt(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function on(e){e=rt(e);let u=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(u=`\\\\${e.hostname}${u}`),u}function an(e){return nn?on(e):Dn(e)}var sn=an,ln=(e)=>String(e).split(/[/\\]/u).pop();function pu(e,u){if(!u)return;let t=ln(u).toLowerCase();return e.find(({filenames:r})=>r==null?void 0:r.some((n)=>n.toLowerCase()===t))??e.find(({extensions:r})=>r==null?void 0:r.some((n)=>t.endsWith(n)))}function cn(e,u){if(u)return e.find(({name:t})=>t.toLowerCase()===u)??e.find(({aliases:t})=>t==null?void 0:t.includes(u))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${u}`))}function hu(e,u){if(u){if(String(u).startsWith("file:"))try{u=sn(u)}catch{return}if(typeof u=="string")return e.find(({isSupported:t})=>t==null?void 0:t({filepath:u}))}}function fn(e,u){let t=rn(!1,e.plugins).flatMap((n)=>n.languages??[]),r=cn(t,u.language)??pu(t,u.physicalFile)??pu(t,u.file)??hu(t,u.physicalFile)??hu(t,u.file)??(u.physicalFile,void 0);return r==null?void 0:r.parsers[0]}var dn=fn,te={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((t)=>te.value(t)).join(", ")}]`;let u=Object.keys(e);return u.length===0?"{}":`{ ${u.map((t)=>`${te.key(t)}: ${te.value(e[t])}`).join(", ")} }`},pair:({key:e,value:u})=>te.value({[e]:u})},nt=new Proxy(String,{get:()=>nt}),N=nt,Fn=(e,u,{descriptor:t})=>{let r=[`${N.yellow(typeof e=="string"?t.key(e):t.pair(e))} is deprecated`];return u&&r.push(`we now treat it as ${N.blue(typeof u=="string"?t.key(u):t.pair(u))}`),r.join("; ")+"."},Dt=Symbol.for("vnopts.VALUE_NOT_EXIST"),Ce=Symbol.for("vnopts.VALUE_UNCHANGED"),Cu=" ".repeat(2),pn=(e,u,t)=>{let{text:r,list:n}=t.normalizeExpectedResult(t.schemas[e].expected(t)),D=[];return r&&D.push(mu(e,u,r,t.descriptor)),n&&D.push([mu(e,u,n.title,t.descriptor)].concat(n.values.map((i)=>it(i,t.loggerPrintWidth))).join(`
25
+ `)),ot(D,t.loggerPrintWidth)};function mu(e,u,t,r){return[`Invalid ${N.red(r.key(e))} value.`,`Expected ${N.blue(t)},`,`but received ${u===Dt?N.gray("nothing"):N.red(r.value(u))}.`].join(" ")}function it({text:e,list:u},t){let r=[];return e&&r.push(`- ${N.blue(e)}`),u&&r.push([`- ${N.blue(u.title)}:`].concat(u.values.map((n)=>it(n,t-Cu.length).replace(/^|\n/g,`$&${Cu}`))).join(`
26
+ `)),ot(r,t)}function ot(e,u){if(e.length===1)return e[0];let[t,r]=e,[n,D]=e.map((i)=>i.split(`
27
+ `,1)[0].length);return n>u&&n>D?r:t}var Oe=[],Eu=[];function hn(e,u){if(e===u)return 0;let t=e;e.length>u.length&&(e=u,u=t);let r=e.length,n=u.length;for(;r>0&&e.charCodeAt(~-r)===u.charCodeAt(~-n);)r--,n--;let D=0;for(;D<r&&e.charCodeAt(D)===u.charCodeAt(D);)D++;if(r-=D,n-=D,r===0)return n;let i,o,a,s,l=0,F=0;for(;l<r;)Eu[l]=e.charCodeAt(D+l),Oe[l]=++l;for(;F<n;)for(i=u.charCodeAt(D+F),a=F++,o=F,l=0;l<r;l++)s=i===Eu[l]?a:a+1,a=Oe[l],o=Oe[l]=a>o?s>o?o+1:s:s>a?a+1:s;return o}var at=(e,u,{descriptor:t,logger:r,schemas:n})=>{let D=[`Ignored unknown option ${N.yellow(t.pair({key:e,value:u}))}.`],i=Object.keys(n).sort().find((o)=>hn(e,o)<3);i&&D.push(`Did you mean ${N.blue(t.key(i))}?`),r.warn(D.join(" "))},Cn=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mn(e,u){let t=new e(u),r=Object.create(t);for(let n of Cn)n in u&&(r[n]=En(u[n],t,J.prototype[n].length));return r}var J=class{static create(e){return mn(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,u){return!1}deprecated(e,u){return!1}forward(e,u){}redirect(e,u){}overlap(e,u,t){return e}preprocess(e,u){return e}postprocess(e,u){return Ce}};function En(e,u,t){return typeof e=="function"?(...r)=>e(...r.slice(0,t-1),u,...r.slice(t-1)):()=>e}var gn=class extends J{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,u){return u.schemas[this._sourceName].validate(e,u)}redirect(e,u){return this._sourceName}},yn=class extends J{expected(){return"anything"}validate(){return!0}},vn=class extends J{constructor({valueSchema:e,name:u=e.name,...t}){super({...t,name:u}),this._valueSchema=e}expected(e){let{text:u,list:t}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:u&&`an array of ${u}`,list:t&&{title:"an array of the following values",values:[{list:t}]}}}validate(e,u){if(!Array.isArray(e))return!1;let t=[];for(let r of e){let n=u.normalizeValidateResult(this._valueSchema.validate(r,u),r);n!==!0&&t.push(n.value)}return t.length===0?!0:{value:t}}deprecated(e,u){let t=[];for(let r of e){let n=u.normalizeDeprecatedResult(this._valueSchema.deprecated(r,u),r);n!==!1&&t.push(...n.map(({value:D})=>({value:[D]})))}return t}forward(e,u){let t=[];for(let r of e){let n=u.normalizeForwardResult(this._valueSchema.forward(r,u),r);t.push(...n.map(gu))}return t}redirect(e,u){let t=[],r=[];for(let n of e){let D=u.normalizeRedirectResult(this._valueSchema.redirect(n,u),n);"remain"in D&&t.push(D.remain),r.push(...D.redirect.map(gu))}return t.length===0?{redirect:r}:{redirect:r,remain:t}}overlap(e,u){return e.concat(u)}};function gu({from:e,to:u}){return{from:[e],to:u}}var Bn=class extends J{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function bn(e,u){let t=Object.create(null);for(let r of e){let n=r[u];if(t[n])throw Error(`Duplicate ${u} ${JSON.stringify(n)}`);t[n]=r}return t}function An(e,u){let t=new Map;for(let r of e){let n=r[u];if(t.has(n))throw Error(`Duplicate ${u} ${JSON.stringify(n)}`);t.set(n,r)}return t}function wn(){let e=Object.create(null);return(u)=>{let t=JSON.stringify(u);return e[t]?!0:(e[t]=!0,!1)}}function kn(e,u){let t=[],r=[];for(let n of e)u(n)?t.push(n):r.push(n);return[t,r]}function Sn(e){return e===Math.floor(e)}function xn(e,u){if(e===u)return 0;let t=typeof e,r=typeof u,n=["undefined","object","boolean","number","string"];return t!==r?n.indexOf(t)-n.indexOf(r):t!=="string"?Number(e)-Number(u):e.localeCompare(u)}function Nn(e){return(...u)=>{let t=e(...u);return typeof t=="string"?Error(t):t}}function yu(e){return e===void 0?{}:e}function st(e){if(typeof e=="string")return{text:e};let{text:u,list:t}=e;return On((u||t)!==void 0,"Unexpected `expected` result, there should be at least one field."),t?{text:u,list:{title:t.title,values:t.values.map(st)}}:{text:u}}function vu(e,u){return e===!0?!0:e===!1?{value:u}:e}function Bu(e,u,t=!1){return e===!1?!1:e===!0?t?!0:[{value:u}]:("value"in e)?[e]:e.length===0?!1:e}function bu(e,u){return typeof e=="string"||"key"in e?{from:u,to:e}:("from"in e)?{from:e.from,to:e.to}:{from:u,to:e.to}}function Me(e,u){return e===void 0?[]:Array.isArray(e)?e.map((t)=>bu(t,u)):[bu(e,u)]}function Au(e,u){let t=Me(typeof e=="object"&&"redirect"in e?e.redirect:e,u);return t.length===0?{remain:u,redirect:t}:typeof e=="object"&&("remain"in e)?{remain:e.remain,redirect:t}:{redirect:t}}function On(e,u){if(!e)throw Error(u)}var _n=class extends J{constructor(e){super(e),this._choices=An(e.choices.map((u)=>u&&typeof u=="object"?u:{value:u}),"value")}expected({descriptor:e}){let u=Array.from(this._choices.keys()).map((n)=>this._choices.get(n)).filter(({hidden:n})=>!n).map((n)=>n.value).sort(xn).map(e.value),t=u.slice(0,-2),r=u.slice(-2);return{text:t.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:u}}}validate(e){return this._choices.has(e)}deprecated(e){let u=this._choices.get(e);return u&&u.deprecated?{value:e}:!1}forward(e){let u=this._choices.get(e);return u?u.forward:void 0}redirect(e){let u=this._choices.get(e);return u?u.redirect:void 0}},jn=class extends J{expected(){return"a number"}validate(e,u){return typeof e=="number"}},Tn=class extends jn{expected(){return"an integer"}validate(e,u){return u.normalizeValidateResult(super.validate(e,u),e)===!0&&Sn(e)}},wu=class extends J{expected(){return"a string"}validate(e){return typeof e=="string"}},In=te,Pn=at,$n=pn,Ln=Fn,Rn=class{constructor(e,u){let{logger:t=console,loggerPrintWidth:r=80,descriptor:n=In,unknown:D=Pn,invalid:i=$n,deprecated:o=Ln,missing:a=()=>!1,required:s=()=>!1,preprocess:l=(c)=>c,postprocess:F=()=>Ce}=u||{};this._utils={descriptor:n,logger:t||{warn:()=>{}},loggerPrintWidth:r,schemas:bn(e,"name"),normalizeDefaultResult:yu,normalizeExpectedResult:st,normalizeDeprecatedResult:Bu,normalizeForwardResult:Me,normalizeRedirectResult:Au,normalizeValidateResult:vu},this._unknownHandler=D,this._invalidHandler=Nn(i),this._deprecatedHandler=o,this._identifyMissing=(c,d)=>!(c in d)||a(c,d),this._identifyRequired=s,this._preprocess=l,this._postprocess=F,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=wn()}normalize(e){let u={},t=[this._preprocess(e,this._utils)],r=()=>{for(;t.length!==0;){let n=t.shift(),D=this._applyNormalization(n,u);t.push(...D)}};r();for(let n of Object.keys(this._utils.schemas)){let D=this._utils.schemas[n];if(!(n in u)){let i=yu(D.default(this._utils));"value"in i&&t.push({[n]:i.value})}}r();for(let n of Object.keys(this._utils.schemas)){if(!(n in u))continue;let D=this._utils.schemas[n],i=u[n],o=D.postprocess(i,this._utils);o!==Ce&&(this._applyValidation(o,n,D),u[n]=o)}return this._applyPostprocess(u),this._applyRequiredCheck(u),u}_applyNormalization(e,u){let t=[],{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(e);for(let D of r){let i=this._utils.schemas[D],o=i.preprocess(e[D],this._utils);this._applyValidation(o,D,i);let a=({from:F,to:c})=>{t.push(typeof c=="string"?{[c]:F}:{[c.key]:c.value})},s=({value:F,redirectTo:c})=>{let d=Bu(i.deprecated(F,this._utils),o,!0);if(d!==!1)if(d===!0)this._hasDeprecationWarned(D)||this._utils.logger.warn(this._deprecatedHandler(D,c,this._utils));else for(let{value:f}of d){let h={key:D,value:f};if(!this._hasDeprecationWarned(h)){let p=typeof c=="string"?{key:c,value:f}:c;this._utils.logger.warn(this._deprecatedHandler(h,p,this._utils))}}};Me(i.forward(o,this._utils),o).forEach(a);let l=Au(i.redirect(o,this._utils),o);if(l.redirect.forEach(a),"remain"in l){let F=l.remain;u[D]=D in u?i.overlap(u[D],F,this._utils):F,s({value:F})}for(let{from:F,to:c}of l.redirect)s({value:F,redirectTo:c})}for(let D of n){let i=e[D];this._applyUnknownHandler(D,i,u,(o,a)=>{t.push({[o]:a})})}return t}_applyRequiredCheck(e){for(let u of Object.keys(this._utils.schemas))if(this._identifyMissing(u,e)&&this._identifyRequired(u))throw this._invalidHandler(u,Dt,this._utils)}_partitionOptionKeys(e){let[u,t]=kn(Object.keys(e).filter((r)=>!this._identifyMissing(r,e)),(r)=>(r in this._utils.schemas));return{knownKeys:u,unknownKeys:t}}_applyValidation(e,u,t){let r=vu(t.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(u,r.value,this._utils)}_applyUnknownHandler(e,u,t,r){let n=this._unknownHandler(e,u,this._utils);if(n)for(let D of Object.keys(n)){if(this._identifyMissing(D,n))continue;let i=n[D];D in this._utils.schemas?r(D,i):t[D]=i}}_applyPostprocess(e){let u=this._postprocess(e,this._utils);if(u!==Ce){if(u.delete)for(let t of u.delete)delete e[t];if(u.override){let{knownKeys:t,unknownKeys:r}=this._partitionOptionKeys(u.override);for(let n of t){let D=u.override[n];this._applyValidation(D,n,this._utils.schemas[n]),e[n]=D}for(let n of r){let D=u.override[n];this._applyUnknownHandler(n,D,e,(i,o)=>{let a=this._utils.schemas[i];this._applyValidation(o,i,a),e[i]=o})}}}}},_e;function Mn(e,u,{logger:t=!1,isCLI:r=!1,passThrough:n=!1,FlagSchema:D,descriptor:i}={}){if(r){if(!D)throw Error("'FlagSchema' option is required.");if(!i)throw Error("'descriptor' option is required.")}else i=te;let o=n?Array.isArray(n)?(c,d)=>n.includes(c)?{[c]:d}:void 0:(c,d)=>({[c]:d}):(c,d,f)=>{let{_:h,...p}=f.schemas;return at(c,d,{...f,schemas:p})},a=Wn(u,{isCLI:r,FlagSchema:D}),s=new Rn(a,{logger:t,unknown:o,descriptor:i}),l=t!==!1;l&&_e&&(s._hasDeprecationWarned=_e);let F=s.normalize(e);return l&&(_e=s._hasDeprecationWarned),F}function Wn(e,{isCLI:u,FlagSchema:t}){let r=[];u&&r.push(yn.create({name:"_"}));for(let n of e)r.push(Vn(n,{isCLI:u,optionInfos:e,FlagSchema:t})),n.alias&&u&&r.push(gn.create({name:n.alias,sourceName:n.name}));return r}function Vn(e,{isCLI:u,optionInfos:t,FlagSchema:r}){let{name:n}=e,D={name:n},i,o={};switch(e.type){case"int":i=Tn,u&&(D.preprocess=Number);break;case"string":i=wu;break;case"choice":i=_n,D.choices=e.choices.map((a)=>a!=null&&a.redirect?{...a,redirect:{to:{key:e.name,value:a.redirect}}}:a);break;case"boolean":i=Bn;break;case"flag":i=r,D.flags=t.flatMap((a)=>[a.alias,a.description&&a.name,a.oppositeDescription&&`no-${a.name}`].filter(Boolean));break;case"path":i=wu;break;default:throw Error(`Unexpected type ${e.type}`)}if(e.exception?D.validate=(a,s,l)=>e.exception(a)||s.validate(a,l):D.validate=(a,s,l)=>a===void 0||s.validate(a,l),e.redirect&&(o.redirect=(a)=>a?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),u&&!e.array){let a=D.preprocess||((s)=>s);D.preprocess=(s,l,F)=>l.preprocess(a(Array.isArray(s)?v(!1,s,-1):s),F)}return e.array?vn.create({...u?{preprocess:(a)=>Array.isArray(a)?a:[a]}:{},...o,valueSchema:i.create(D)}):i.create({...D,...o})}var zn=Mn,qn=(e,u,t)=>{if(!(e&&u==null)){if(u.findLast)return u.findLast(t);for(let r=u.length-1;r>=0;r--){let n=u[r];if(t(n,r,u))return n}}},lt=qn;function ct(e,u){if(!u)throw Error("parserName is required.");let t=lt(!1,e,(n)=>n.parsers&&Object.prototype.hasOwnProperty.call(n.parsers,u));if(t)return t;let r=`Couldn't resolve parser "${u}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new ut(r)}function Un(e,u){if(!u)throw Error("astFormat is required.");let t=lt(!1,e,(n)=>n.printers&&Object.prototype.hasOwnProperty.call(n.printers,u));if(t)return t;let r=`Couldn't find plugin for AST format "${u}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new ut(r)}function eu({plugins:e,parser:u}){let t=ct(e,u);return ft(t,u)}function ft(e,u){let t=e.parsers[u];return typeof t=="function"?t():t}function Jn(e,u){let t=e.printers[u];return typeof t=="function"?t():t}var ku={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Kn(e,u={}){var t;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=dn(r,{physicalFile:r.filepath}),!r.parser)throw new su(`No parser could be inferred for file "${r.filepath}".`)}else throw new su("No parser and no file path given, couldn't infer a parser.");let n=tt({plugins:e.plugins,showDeprecated:!0}).options,D={...ku,...Object.fromEntries(n.filter((c)=>c.default!==void 0).map((c)=>[c.name,c.default]))},i=ct(r.plugins,r.parser),o=await ft(i,r.parser);r.astFormat=o.astFormat,r.locEnd=o.locEnd,r.locStart=o.locStart;let a=(t=i.printers)!=null&&t[o.astFormat]?i:Un(r.plugins,o.astFormat),s=await Jn(a,o.astFormat);r.printer=s;let l=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,c])=>c!==void 0)):{},F={...D,...l};for(let[c,d]of Object.entries(F))(r[c]===null||r[c]===void 0)&&(r[c]=d);return r.parser==="json"&&(r.trailingComma="none"),zn(r,n,{passThrough:Object.keys(ku),...u})}var De=Kn,Gn=_t(It(),1);async function Hn(e,u){let t=await eu(u),r=t.preprocess?t.preprocess(e,u):e;u.originalText=r;let n;try{n=await t.parse(r,u,u)}catch(D){Yn(D,e)}return{text:r,ast:n}}function Yn(e,u){let{loc:t}=e;if(t){let r=(0,Gn.codeFrameColumns)(u,t,{highlightCode:!0});throw e.message+=`
28
+ `+r,e.codeFrame=r,e}throw e}var ce=Hn;async function Zn(e,u,t,r,n){let{embeddedLanguageFormatting:D,printer:{embed:i,hasPrettierIgnore:o=()=>!1,getVisitorKeys:a}}=t;if(!i||D!=="auto")return;if(i.length>2)throw Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let s=be(i.getVisitorKeys??a),l=[];d();let F=e.stack;for(let{print:f,node:h,pathStack:p}of l)try{e.stack=p;let C=await f(c,u,e,t);C&&n.set(h,C)}catch(C){if(globalThis.PRETTIER_DEBUG)throw C}e.stack=F;function c(f,h){return Qn(f,h,t,r)}function d(){let{node:f}=e;if(f===null||typeof f!="object"||o(e))return;for(let p of s(f))Array.isArray(f[p])?e.each(d,p):e.call(d,p);let h=i(e,t);if(h){if(typeof h=="function"){l.push({print:h,node:f,pathStack:[...e.stack]});return}n.set(f,h)}}}async function Qn(e,u,t,r){let n=await De({...t,...u,parentParser:t.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:D}=await ce(e,n),i=await r(D,n);return Ru(i)}function Xn(e,u){let{originalText:t,[Symbol.for("comments")]:r,locStart:n,locEnd:D,[Symbol.for("printedComments")]:i}=u,{node:o}=e,a=n(o),s=D(o);for(let l of r)n(l)>=a&&D(l)<=s&&i.add(l);return t.slice(a,s)}var eD=Xn;async function Ae(e,u){({ast:e}=await dt(e,u));let t=new Map,r=new xr(e),n=Qr(u),D=new Map;await Zn(r,o,u,Ae,D);let i=await Su(r,u,o,void 0,D);if(Yr(u),u.cursorOffset>=0){if(u.nodeAfterCursor&&!u.nodeBeforeCursor)return[Y,i];if(u.nodeBeforeCursor&&!u.nodeAfterCursor)return[i,Y]}return i;function o(s,l){return s===void 0||s===r?a(l):Array.isArray(s)?r.call(()=>a(l),...s):r.call(()=>a(l),s)}function a(s){n(r);let l=r.node;if(l==null)return"";let F=l&&typeof l=="object"&&s===void 0;if(F&&t.has(l))return t.get(l);let c=Su(r,u,o,s,D);return F&&t.set(l,c),c}}function Su(e,u,t,r,n){var D;let{node:i}=e,{printer:o}=u,a;switch((D=o.hasPrettierIgnore)!=null&&D.call(o,e)?a=eD(e,u):n.has(i)?a=n.get(i):a=o.print(e,u,t,r),i){case u.cursorNode:a=pe(a,(s)=>[Y,s,Y]);break;case u.nodeBeforeCursor:a=pe(a,(s)=>[s,Y]);break;case u.nodeAfterCursor:a=pe(a,(s)=>[Y,s]);break}return o.printComment&&(!o.willPrintOwnComments||!o.willPrintOwnComments(e,u))&&(a=Hr(e,a,u)),a}async function dt(e,u){let t=e.comments??[];u[Symbol.for("comments")]=t,u[Symbol.for("printedComments")]=new Set,Vr(e,u);let{printer:{preprocess:r}}=u;return e=r?await r(e,u):e,{ast:e,comments:t}}function uD(e,u){let{cursorOffset:t,locStart:r,locEnd:n}=u,D=be(u.printer.getVisitorKeys),i=(d)=>r(d)<=t&&n(d)>=t,o=e,a=[e];for(let d of _r(e,{getVisitorKeys:D,filter:i}))a.push(d),o=d;if(jr(o,{getVisitorKeys:D}))return{cursorNode:o};let s,l,F=-1,c=Number.POSITIVE_INFINITY;for(;a.length>0&&(s===void 0||l===void 0);){o=a.pop();let d=s!==void 0,f=l!==void 0;for(let h of Be(o,{getVisitorKeys:D})){if(!d){let p=n(h);p<=t&&p>F&&(s=h,F=p)}if(!f){let p=r(h);p>=t&&p<c&&(l=h,c=p)}}}return{nodeBeforeCursor:s,nodeAfterCursor:l}}var Ft=uD;function tD(e,u){let{printer:{massageAstNode:t,getVisitorKeys:r}}=u;if(!t)return e;let n=be(r),D=t.ignoredProperties??new Set;return i(e);function i(o,a){if(!(o!==null&&typeof o=="object"))return o;if(Array.isArray(o))return o.map((c)=>i(c,a)).filter(Boolean);let s={},l=new Set(n(o));for(let c in o)!Object.prototype.hasOwnProperty.call(o,c)||D.has(c)||(l.has(c)?s[c]=i(o[c],o):s[c]=o[c]);let F=t(o,s,a);if(F!==null)return F??s}}var rD=tD,nD=(e,u,t)=>{if(!(e&&u==null)){if(u.findLastIndex)return u.findLastIndex(t);for(let r=u.length-1;r>=0;r--){let n=u[r];if(t(n,r,u))return r}return-1}},DD=nD,iD=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function oD(e,u){let t=[e.node,...e.parentNodes],r=new Set([u.node,...u.parentNodes]);return t.find((n)=>pt.has(n.type)&&r.has(n))}function xu(e){let u=DD(!1,e,(t)=>t.type!=="Program"&&t.type!=="File");return u===-1?e:e.slice(0,u+1)}function aD(e,u,{locStart:t,locEnd:r}){let n=e.node,D=u.node;if(n===D)return{startNode:n,endNode:D};let i=t(e.node);for(let a of xu(u.parentNodes))if(t(a)>=i)D=a;else break;let o=r(u.node);for(let a of xu(e.parentNodes)){if(r(a)<=o)n=a;else break;if(n===D)break}return{startNode:n,endNode:D}}function We(e,u,t,r,n=[],D){let{locStart:i,locEnd:o}=t,a=i(e),s=o(e);if(!(u>s||u<a||D==="rangeEnd"&&u===a||D==="rangeStart"&&u===s)){for(let l of Qe(e,t)){let F=We(l,u,t,r,[e,...n],D);if(F)return F}if(!r||r(e,n[0]))return{node:e,parentNodes:n}}}function sD(e,u){return u!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var pt=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),lD=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Nu(e,u,t){if(!u)return!1;switch(e.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return sD(u.type,t==null?void 0:t.type);case"json":case"json5":case"jsonc":case"json-stringify":return pt.has(u.type);case"graphql":return lD.has(u.kind);case"vue":return u.tag!=="root"}return!1}function cD(e,u,t){let{rangeStart:r,rangeEnd:n,locStart:D,locEnd:i}=u;Re.ok(n>r);let o=e.slice(r,n).search(/\S/u),a=o===-1;if(!a)for(r+=o;n>r&&!/\S/u.test(e[n-1]);--n);let s=We(t,r,u,(d,f)=>Nu(u,d,f),[],"rangeStart"),l=a?s:We(t,n,u,(d)=>Nu(u,d),[],"rangeEnd");if(!s||!l)return{rangeStart:0,rangeEnd:0};let F,c;if(iD(u)){let d=oD(s,l);F=d,c=d}else({startNode:F,endNode:c}=aD(s,l,u));return{rangeStart:Math.min(D(F),D(c)),rangeEnd:Math.max(i(F),i(c))}}var ht="\uFEFF",Ou=Symbol("cursor");async function Ct(e,u,t=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:n}=await ce(e,u);u.cursorOffset>=0&&(u={...u,...Ft(r,u)});let D=await Ae(r,u,t);t>0&&(D=Ju([Z,D],t,u.tabWidth));let i=ve(D,u);if(t>0){let a=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(a),i.cursorNodeStart<0&&(i.cursorNodeStart=0,i.cursorNodeText=i.cursorNodeText.trimStart()),i.cursorNodeStart+i.cursorNodeText.length>a.length&&(i.cursorNodeText=i.cursorNodeText.trimEnd())),i.formatted=a+qe(u.endOfLine)}let o=u[Symbol.for("comments")];if(u.cursorOffset>=0){let a,s,l,F;if((u.cursorNode||u.nodeBeforeCursor||u.nodeAfterCursor)&&i.cursorNodeText)if(l=i.cursorNodeStart,F=i.cursorNodeText,u.cursorNode)a=u.locStart(u.cursorNode),s=n.slice(a,u.locEnd(u.cursorNode));else{if(!u.nodeBeforeCursor&&!u.nodeAfterCursor)throw Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");a=u.nodeBeforeCursor?u.locEnd(u.nodeBeforeCursor):0;let C=u.nodeAfterCursor?u.locStart(u.nodeAfterCursor):n.length;s=n.slice(a,C)}else a=0,s=n,l=0,F=i.formatted;let c=u.cursorOffset-a;if(s===F)return{formatted:i.formatted,cursorOffset:l+c,comments:o};let d=s.split("");d.splice(c,0,Ou);let f=F.split(""),h=Mt(d,f),p=l;for(let C of h)if(C.removed){if(C.value.includes(Ou))break}else p+=C.count;return{formatted:i.formatted,cursorOffset:p,comments:o}}return{formatted:i.formatted,cursorOffset:-1,comments:o}}async function fD(e,u){let{ast:t,text:r}=await ce(e,u),{rangeStart:n,rangeEnd:D}=cD(r,u,t),i=r.slice(n,D),o=Math.min(n,r.lastIndexOf(`
29
+ `,n)+1),a=r.slice(o,n).match(/^\s*/u)[0],s=Ye(a,u.tabWidth),l=await Ct(i,{...u,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:u.cursorOffset>n&&u.cursorOffset<=D?u.cursorOffset-n:-1,endOfLine:"lf"},s),F=l.formatted.trimEnd(),{cursorOffset:c}=u;c>D?c+=F.length-i.length:l.cursorOffset>=0&&(c=l.cursorOffset+n);let d=r.slice(0,n)+F+r.slice(D);if(u.endOfLine!=="lf"){let f=qe(u.endOfLine);c>=0&&f===`\r
30
+ `&&(c+=$u(d.slice(0,c),`
31
+ `)),d=Ee(!1,d,`
32
+ `,f)}return{formatted:d,cursorOffset:c,comments:l.comments}}function je(e,u,t){return typeof u!="number"||Number.isNaN(u)||u<0||u>e.length?t:u}function _u(e,u){let{cursorOffset:t,rangeStart:r,rangeEnd:n}=u;return t=je(e,t,-1),r=je(e,r,0),n=je(e,n,e.length),{...u,cursorOffset:t,rangeStart:r,rangeEnd:n}}function mt(e,u){let{cursorOffset:t,rangeStart:r,rangeEnd:n,endOfLine:D}=_u(e,u),i=e.charAt(0)===ht;if(i&&(e=e.slice(1),t--,r--,n--),D==="auto"&&(D=Wt(e)),e.includes("\r")){let o=(a)=>$u(e.slice(0,Math.max(a,0)),`\r
33
+ `);t-=o(t),r-=o(r),n-=o(n),e=Vt(e)}return{hasBOM:i,text:e,options:_u(e,{...u,cursorOffset:t,rangeStart:r,rangeEnd:n,endOfLine:D})}}async function ju(e,u){let t=await eu(u);return!t.hasPragma||t.hasPragma(e)}async function dD(e,u){var t;let r=await eu(u);return(t=r.hasIgnorePragma)==null?void 0:t.call(r,e)}async function Et(e,u){let{hasBOM:t,text:r,options:n}=mt(e,await De(u));if(n.rangeStart>=n.rangeEnd&&r!==""||n.requirePragma&&!await ju(r,n)||n.checkIgnorePragma&&await dD(r,n))return{formatted:e,cursorOffset:u.cursorOffset,comments:[]};let D;return n.rangeStart>0||n.rangeEnd<r.length?D=await fD(r,n):(!n.requirePragma&&n.insertPragma&&n.printer.insertPragma&&!await ju(r,n)&&(r=n.printer.insertPragma(r)),D=await Ct(r,n)),t&&(D.formatted=ht+D.formatted,D.cursorOffset>=0&&D.cursorOffset++),D}async function FD(e,u,t){let{text:r,options:n}=mt(e,await De(u)),D=await ce(r,n);return t&&(t.preprocessForPrint&&(D.ast=await dt(D.ast,n)),t.massage&&(D.ast=rD(D.ast,n))),D}async function pD(e,u){u=await De(u);let t=await Ae(e,u);return ve(t,u)}async function hD(e,u){let t=mr(e),{formatted:r}=await Et(t,{...u,parser:"__js_expression"});return r}async function CD(e,u){u=await De(u);let{ast:t}=await ce(e,u);return u.cursorOffset>=0&&(u={...u,...Ft(t,u)}),Ae(t,u)}async function mD(e,u){return ve(e,await De(u))}var gt={};ze(gt,{builders:()=>ED,printer:()=>gD,utils:()=>yD});var ED={join:Uu,line:zu,softline:hr,hardline:Z,literalline:qu,group:Wu,conditionalGroup:lr,fill:cr,lineSuffix:Te,lineSuffixBoundary:Fr,cursor:Y,breakParent:ye,ifBreak:fr,trim:pr,indent:me,indentIfBreak:dr,align:ne,addAlignmentToDoc:Ju,markAsRoot:ar,dedentToRoot:or,dedent:sr,hardlineWithoutBreakParent:Ge,literallineWithoutBreakParent:Vu,label:Cr,concat:(e)=>e},gD={printDocToString:ve},yD={willBreak:Zt,traverseDoc:Ue,findInDoc:Je,mapDoc:ge,removeLines:er,stripTrailingHardline:Ru,replaceEndOfLine:rr,canBreak:Dr},vD="3.6.2",yt={};ze(yt,{addDanglingComment:()=>G,addLeadingComment:()=>ae,addTrailingComment:()=>se,getAlignmentSize:()=>Ye,getIndentSize:()=>SD,getMaxContinuousCount:()=>OD,getNextNonSpaceNonCommentCharacter:()=>jD,getNextNonSpaceNonCommentCharacterIndex:()=>zD,getPreferredQuote:()=>ID,getStringWidth:()=>He,hasNewline:()=>z,hasNewlineInRange:()=>$D,hasSpaces:()=>RD,isNextLineEmpty:()=>KD,isNextLineEmptyAfterIndex:()=>nu,isPreviousLineEmpty:()=>UD,makeString:()=>WD,skip:()=>le,skipEverythingButNewLine:()=>Yu,skipInlineComment:()=>uu,skipNewline:()=>Q,skipSpaces:()=>q,skipToLineEnd:()=>Hu,skipTrailingComment:()=>tu,skipWhitespace:()=>Tr});function BD(e,u){if(u===!1)return!1;if(e.charAt(u)==="/"&&e.charAt(u+1)==="*"){for(let t=u+2;t<e.length;++t)if(e.charAt(t)==="*"&&e.charAt(t+1)==="/")return t+2}return u}var uu=BD;function bD(e,u){return u===!1?!1:e.charAt(u)==="/"&&e.charAt(u+1)==="/"?Yu(e,u):u}var tu=bD;function AD(e,u){let t=null,r=u;for(;r!==t;)t=r,r=q(e,r),r=uu(e,r),r=tu(e,r),r=Q(e,r);return r}var ru=AD;function wD(e,u){let t=null,r=u;for(;r!==t;)t=r,r=Hu(e,r),r=uu(e,r),r=q(e,r);return r=tu(e,r),r=Q(e,r),r!==!1&&z(e,r)}var nu=wD;function kD(e,u){let t=e.lastIndexOf(`
34
+ `);return t===-1?0:Ye(e.slice(t+1).match(/^[\t ]*/u)[0],u)}var SD=kD;function xD(e){if(typeof e!="string")throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ND(e,u){let t=e.match(new RegExp(`(${xD(u)})+`,"gu"));return t===null?0:t.reduce((r,n)=>Math.max(r,n.length/u.length),0)}var OD=ND;function _D(e,u){let t=ru(e,u);return t===!1?"":e.charAt(t)}var jD=_D,Fe="'",Tu='"';function TD(e,u){let t=u===!0||u===Fe?Fe:Tu,r=t===Fe?Tu:Fe,n=0,D=0;for(let i of e)i===t?n++:i===r&&D++;return n>D?r:t}var ID=TD;function PD(e,u,t){for(let r=u;r<t;++r)if(e.charAt(r)===`
35
+ `)return!0;return!1}var $D=PD;function LD(e,u,t={}){return q(e,t.backwards?u-1:u,t)!==u}var RD=LD;function MD(e,u,t){let r=u==='"'?"'":'"',n=Ee(!1,e,/\\(.)|(["'])/gsu,(D,i,o)=>i===r?i:o===u?"\\"+o:o||(t&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:"\\"+i));return u+n+u}var WD=MD;function VD(e,u,t){return ru(e,t(u))}function zD(e,u){return arguments.length===2||typeof u=="number"?ru(e,u):VD(...arguments)}function qD(e,u,t){return Xe(e,t(u))}function UD(e,u){return arguments.length===2||typeof u=="number"?Xe(e,u):qD(...arguments)}function JD(e,u,t){return nu(e,t(u))}function KD(e,u){return arguments.length===2||typeof u=="number"?nu(e,u):JD(...arguments)}function H(e,u=1){return async(...t)=>{let r=t[u]??{},n=r.plugins??[];return t[u]={...r,plugins:Array.isArray(n)?n:Object.values(n)},e(...t)}}var vt=H(Et);async function Bt(e,u){let{formatted:t}=await vt(e,{...u,cursorOffset:-1});return t}async function GD(e,u){return await Bt(e,u)===e}var HD=H(tt,0),YD={parse:H(FD),formatAST:H(pD),formatDoc:H(hD),printToDoc:H(CD),printDocToString:H(mD)},ZD=Pu;export{vD as version,yt as util,HD as getSupportInfo,vt as formatWithCursor,Bt as format,gt as doc,ZD as default,GD as check,YD as __debug};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Hj as a,Ij as b,Jj as c,Kj as d,Lj as e}from"./chunk-vvwy955j.js";import"./chunk-jdg870gy.js";import"./chunk-11285jfy.js";import"./chunk-nmnp5g5p.js";import"./chunk-tvw8tfpr.js";import"./chunk-xmftb9ad.js";import"./chunk-rpp44jtx.js";import"./chunk-4mgyaytc.js";import"./chunk-pqwm9zk1.js";import"./chunk-22qpzg37.js";import"./chunk-93cszp8k.js";import"./chunk-n4vx7kvs.js";import"./chunk-v107htgw.js";import"./chunk-cbz8b7g5.js";import"./chunk-5jn2z3nf.js";import"./chunk-vqrnejgj.js";import"./chunk-zhd8f4pc.js";import"./chunk-ygpen625.js";import"./chunk-jfz77m78.js";import"./chunk-my9cfmvt.js";import"./chunk-8jy0dvcn.js";import"./chunk-frbht418.js";import"./chunk-8ebkxjar.js";import"./chunk-zjpnyah2.js";import"./chunk-0hqmdrjr.js";import"./chunk-1pv2317e.js";import"./chunk-21x3anp4.js";import"./chunk-ntvr3177.js";import"./chunk-9h1pwxb2.js";import"./chunk-fkmzj0qt.js";import"./chunk-q9yddd1r.js";import"./chunk-eskw1cj2.js";import"./chunk-k19y2psf.js";import"./chunk-ppg6zhae.js";import"./chunk-ng3vbpmy.js";import"./chunk-1mqsg5s7.js";import"./chunk-z3mx7n44.js";import"./chunk-0qqpjj2h.js";import"./chunk-9g64kggy.js";import"./chunk-8j3aw4qg.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{PF as a}from"./chunk-9g64kggy.js";import"./chunk-8j3aw4qg.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Os as M}from"./chunk-0hqmdrjr.js";import{TF as E}from"./chunk-8j3aw4qg.js";class x{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:y}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=y}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){let c=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){let r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);let t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(let r of i)yield r}};return c.serialize(S,(r)=>{if(r[h])return{headers:r.headers,body:r.body};let t=Object.keys(r).find((s)=>{return s!=="__type"})??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??f},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){let c=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async(t)=>{let e=Object.keys(t).find((l)=>{return l!=="__type"})??"",a=t[e].body;if(e==="initial-response"){let l=await this.deserializer.read(n,a);return delete l[y],{[f]:!0,...l}}else if(e in d){let l=d[e];if(l.isStructSchema()){let m={},u=!1;for(let[s,g]of l.structIterator()){let{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||Boolean(v||w),w){if(g.isBlobSchema())m[s]=a;else if(g.isStringSchema())m[s]=(this.serdeContext?.utf8Encoder??z.toUtf8)(a);else if(g.isStructSchema())m[s]=await this.deserializer.read(g,a)}else if(v){let b=t[e].headers[s]?.value;if(b!=null)if(g.isNumericSchema())if(b&&typeof b==="object"&&"bytes"in b)m[s]=BigInt(b.toString());else m[s]=Number(b);else m[s]=b}}if(u)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){if(!r?.value?.[f])yield r.value;while(!0){let{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){let c=this.serializer,y=i,p=null,d,f=(()=>{return n.getSchema()[4].includes(i)})(),h={};if(!f){let[t,e]=o[i];y=t,c.write(15,e)}else{let t=n.getMemberSchema(i);if(t.isStructSchema()){for(let[e,a]of t.structIterator()){let{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)p=e;else if(l){let u=o[i][e],s="binary";if(a.isNumericSchema())if(-2147483648<=u&&u<=2147483647)s="integer";else s="long";else if(a.isTimestampSchema())s="timestamp";else if(a.isStringSchema())s="string";else if(a.isBooleanSchema())s="boolean";if(u!=null)h[e]={type:s,value:u},delete o[i][e]}}if(p!==null){let e=t.getMemberSchema(p);if(e.isBlobSchema())d="application/octet-stream";else if(e.isStringSchema())d="text/plain";c.write(e,o[i][p])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let S=c.flush()??new Uint8Array;return{body:typeof S==="string"?(this.serdeContext?.utf8Decoder??z.fromUtf8)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}var z,T;var C=E(()=>{z=M();T=x});C();export{T as EventStreamSerde};export default {get EventStreamSerde(){return T}};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{UF as f}from"./chunk-8j3aw4qg.js";var __dirname="/root/muxcode-source/node_modules/.bun/@silvia-odwyer+photon-node@0.3.4/node_modules/@silvia-odwyer/photon-node",c={},B={};c.__wbindgen_placeholder__=B;var J,{TextEncoder:I,TextDecoder:d}=f("util");function y(G){let H=typeof G;if(H=="number"||H=="boolean"||G==null)return`${G}`;if(H=="string")return`"${G}"`;if(H=="symbol"){let $=G.description;if($==null)return"Symbol";else return`Symbol(${$})`}if(H=="function"){let $=G.name;if(typeof $=="string"&&$.length>0)return`Function(${$})`;else return"Function"}if(Array.isArray(G)){let $=G.length,j="[";if($>0)j+=y(G[0]);for(let q=1;q<$;q++)j+=", "+y(G[q]);return j+="]",j}let K=/\[object ([^\]]+)\]/.exec(toString.call(G)),Z;if(K.length>1)Z=K[1];else return toString.call(G);if(Z=="Object")try{return"Object("+JSON.stringify(G)+")"}catch($){return"Object"}if(G instanceof Error)return`${G.name}: ${G.message}
3
+ ${G.stack}`;return Z}var k=0,W=null;function A(){if(W===null||W.byteLength===0)W=new Uint8Array(J.memory.buffer);return W}var x=new I("utf-8"),p=typeof x.encodeInto==="function"?function(G,H){return x.encodeInto(G,H)}:function(G,H){let K=x.encode(G);return H.set(K),{read:G.length,written:K.length}};function D(G,H,K){if(K===void 0){let F=x.encode(G),L=H(F.length,1)>>>0;return A().subarray(L,L+F.length).set(F),k=F.length,L}let Z=G.length,$=H(Z,1)>>>0,j=A(),q=0;for(;q<Z;q++){let F=G.charCodeAt(q);if(F>127)break;j[$+q]=F}if(q!==Z){if(q!==0)G=G.slice(q);$=K($,Z,Z=q+G.length*3,1)>>>0;let F=A().subarray($+q,$+Z),L=p(G,F);q+=L.written,$=K($,Z,q,1)>>>0}return k=q,$}var V=null;function M(){if(V===null||V.buffer.detached===!0||V.buffer.detached===void 0&&V.buffer!==J.memory.buffer)V=new DataView(J.memory.buffer);return V}var w=new d("utf-8",{ignoreBOM:!0,fatal:!0});w.decode();function U(G,H){return G=G>>>0,w.decode(A().subarray(G,G+H))}function X(G,H){if(!(G instanceof H))throw Error(`expected instance of ${H.name}`);return G.ptr}var t=function(G,H,K){X(G,Q),J.alter_channel(G.__wbg_ptr,H,K)},g=function(G,H){X(G,Q),J.alter_red_channel(G.__wbg_ptr,H)},m=function(G,H){X(G,Q),J.alter_green_channel(G.__wbg_ptr,H)},e=function(G,H){X(G,Q),J.alter_blue_channel(G.__wbg_ptr,H)},o=function(G,H,K,Z,$){X(G,Q),J.alter_two_channels(G.__wbg_ptr,H,K,Z,$)},a=function(G,H,K,Z){X(G,Q),J.alter_channels(G.__wbg_ptr,H,K,Z)},GG=function(G,H,K){X(G,Q),J.remove_channel(G.__wbg_ptr,H,K)},HG=function(G,H){X(G,Q),J.remove_red_channel(G.__wbg_ptr,H)},JG=function(G,H){X(G,Q),J.remove_green_channel(G.__wbg_ptr,H)},KG=function(G,H){X(G,Q),J.remove_blue_channel(G.__wbg_ptr,H)},QG=function(G,H,K){X(G,Q),J.swap_channels(G.__wbg_ptr,H,K)},XG=function(G){X(G,Q),J.invert(G.__wbg_ptr)},YG=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();J.selective_hue_rotate(G.__wbg_ptr,Z,K)},ZG=function(G,H,K,Z){X(G,Q),X(H,z);var $=H.__destroy_into_raw();X(K,z);var j=K.__destroy_into_raw();J.selective_color_convert(G.__wbg_ptr,$,j,Z)},$G=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();J.selective_lighten(G.__wbg_ptr,Z,K)},BG=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();J.selective_desaturate(G.__wbg_ptr,Z,K)},qG=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();J.selective_saturate(G.__wbg_ptr,Z,K)},jG=function(G,H){X(G,Q);var K=G.__destroy_into_raw();X(H,z);var Z=H.__destroy_into_raw();J.selective_greyscale(K,Z)},kG=function(G,H,K,Z){X(G,Q),J.monochrome(G.__wbg_ptr,H,K,Z)},zG=function(G){X(G,Q),J.sepia(G.__wbg_ptr)},DG=function(G){X(G,Q),J.grayscale(G.__wbg_ptr)},OG=function(G){X(G,Q),J.grayscale_human_corrected(G.__wbg_ptr)},FG=function(G){X(G,Q),J.desaturate(G.__wbg_ptr)},LG=function(G){X(G,Q),J.decompose_min(G.__wbg_ptr)},UG=function(G){X(G,Q),J.decompose_max(G.__wbg_ptr)},NG=function(G,H){X(G,Q),J.grayscale_shades(G.__wbg_ptr,H)},VG=function(G){X(G,Q),J.r_grayscale(G.__wbg_ptr)},SG=function(G){X(G,Q),J.g_grayscale(G.__wbg_ptr)},AG=function(G){X(G,Q),J.b_grayscale(G.__wbg_ptr)},MG=function(G,H){X(G,Q),J.single_channel_grayscale(G.__wbg_ptr,H)},WG=function(G,H){X(G,Q),J.threshold(G.__wbg_ptr,H)},TG=function(G,H,K,Z){X(G,Q),J.gamma_correction(G.__wbg_ptr,H,K,Z)},xG=function(G,H,K){X(G,Q);let Z=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;J.hsluv(G.__wbg_ptr,Z,$,K)},EG=function(G,H,K){X(G,Q);let Z=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;J.lch(G.__wbg_ptr,Z,$,K)},RG=function(G,H,K){X(G,Q);let Z=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;J.hsl(G.__wbg_ptr,Z,$,K)},yG=function(G,H,K){X(G,Q);let Z=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;J.hsv(G.__wbg_ptr,Z,$,K)},vG=function(G,H){X(G,Q),J.hue_rotate_hsl(G.__wbg_ptr,H)},fG=function(G,H){X(G,Q),J.hue_rotate_hsv(G.__wbg_ptr,H)},CG=function(G,H){X(G,Q),J.hue_rotate_lch(G.__wbg_ptr,H)},bG=function(G,H){X(G,Q),J.hue_rotate_hsluv(G.__wbg_ptr,H)},uG=function(G,H){X(G,Q),J.saturate_hsl(G.__wbg_ptr,H)},cG=function(G,H){X(G,Q),J.saturate_lch(G.__wbg_ptr,H)},wG=function(G,H){X(G,Q),J.saturate_hsluv(G.__wbg_ptr,H)},PG=function(G,H){X(G,Q),J.saturate_hsv(G.__wbg_ptr,H)},IG=function(G,H){X(G,Q),J.lighten_lch(G.__wbg_ptr,H)},dG=function(G,H){X(G,Q),J.lighten_hsluv(G.__wbg_ptr,H)},pG=function(G,H){X(G,Q),J.lighten_hsl(G.__wbg_ptr,H)},lG=function(G,H){X(G,Q),J.lighten_hsv(G.__wbg_ptr,H)},hG=function(G,H){X(G,Q),J.darken_lch(G.__wbg_ptr,H)},_G=function(G,H){X(G,Q),J.darken_hsluv(G.__wbg_ptr,H)},iG=function(G,H){X(G,Q),J.darken_hsl(G.__wbg_ptr,H)},rG=function(G,H){X(G,Q),J.darken_hsv(G.__wbg_ptr,H)},nG=function(G,H){X(G,Q),J.desaturate_hsv(G.__wbg_ptr,H)},sG=function(G,H){X(G,Q),J.desaturate_hsl(G.__wbg_ptr,H)},tG=function(G,H){X(G,Q),J.desaturate_lch(G.__wbg_ptr,H)},gG=function(G,H){X(G,Q),J.desaturate_hsluv(G.__wbg_ptr,H)},mG=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();J.mix_with_colour(G.__wbg_ptr,Z,K)},eG=function(G){X(G,Q),J.noise_reduction(G.__wbg_ptr)},oG=function(G){X(G,Q),J.sharpen(G.__wbg_ptr)},aG=function(G){X(G,Q),J.edge_detection(G.__wbg_ptr)},GH=function(G){X(G,Q),J.identity(G.__wbg_ptr)},HH=function(G){X(G,Q),J.box_blur(G.__wbg_ptr)},JH=function(G,H){X(G,Q),J.gaussian_blur(G.__wbg_ptr,H)},KH=function(G){X(G,Q),J.detect_horizontal_lines(G.__wbg_ptr)},QH=function(G){X(G,Q),J.detect_vertical_lines(G.__wbg_ptr)},XH=function(G){X(G,Q),J.detect_45_deg_lines(G.__wbg_ptr)},YH=function(G){X(G,Q),J.detect_135_deg_lines(G.__wbg_ptr)},ZH=function(G){X(G,Q),J.laplace(G.__wbg_ptr)},$H=function(G){X(G,Q),J.edge_one(G.__wbg_ptr)},BH=function(G){X(G,Q),J.emboss(G.__wbg_ptr)},qH=function(G){X(G,Q),J.sobel_horizontal(G.__wbg_ptr)},jH=function(G){X(G,Q),J.prewitt_horizontal(G.__wbg_ptr)},kH=function(G){X(G,Q),J.sobel_vertical(G.__wbg_ptr)},zH=function(G){X(G,Q),J.sobel_global(G.__wbg_ptr)},DH=function(G){X(G,Q),J.add_noise_rand(G.__wbg_ptr)},OH=function(G){X(G,Q),J.pink_noise(G.__wbg_ptr)},FH=function(G,H,K,Z){X(G,Q),X(H,Q),J.watermark(G.__wbg_ptr,H.__wbg_ptr,K,Z)},LH=function(G,H,K){X(G,Q),X(H,Q);let Z=D(K,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;J.blend(G.__wbg_ptr,H.__wbg_ptr,Z,$)},UH=function(G,H){let K=J.create_gradient(G,H);return Q.__wrap(K)},NH=function(G){X(G,Q),J.apply_gradient(G.__wbg_ptr)},VH=function(G){X(G,Q),J.neue(G.__wbg_ptr)},SH=function(G){X(G,Q),J.lix(G.__wbg_ptr)},AH=function(G){X(G,Q),J.ryo(G.__wbg_ptr)},MH=function(G,H){X(G,Q);let K=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),Z=k;J.filter(G.__wbg_ptr,K,Z)},WH=function(G){X(G,Q),J.lofi(G.__wbg_ptr)},TH=function(G){X(G,Q),J.pastel_pink(G.__wbg_ptr)},xH=function(G){X(G,Q),J.golden(G.__wbg_ptr)},EH=function(G){X(G,Q),J.cali(G.__wbg_ptr)},RH=function(G){X(G,Q),J.dramatic(G.__wbg_ptr)},yH=function(G,H){X(G,Q),X(H,z);var K=H.__destroy_into_raw();J.monochrome_tint(G.__wbg_ptr,K)},vH=function(G){X(G,Q),J.duotone_violette(G.__wbg_ptr)},fH=function(G){X(G,Q),J.duotone_horizon(G.__wbg_ptr)},CH=function(G,H){X(G,Q),X(H,z);var K=H.__destroy_into_raw();J.duotone_tint(G.__wbg_ptr,K)},bH=function(G){X(G,Q),J.duotone_lilac(G.__wbg_ptr)},uH=function(G){X(G,Q),J.duotone_ochre(G.__wbg_ptr)},cH=function(G){X(G,Q),J.firenze(G.__wbg_ptr)},wH=function(G){X(G,Q),J.obsidian(G.__wbg_ptr)},PH=function(G,H,K,Z,$){X(G,Q);let j=J.crop(G.__wbg_ptr,H,K,Z,$);return Q.__wrap(j)},IH=function(G,H,K,Z,$){return J.crop_img_browser(G,H,K,Z,$)},dH=function(G){X(G,Q),J.fliph(G.__wbg_ptr)},pH=function(G){X(G,Q),J.flipv(G.__wbg_ptr)},lH=function(G,H,K,Z){return X(G,Q),J.resize_img_browser(G.__wbg_ptr,H,K,Z)},hH=function(G,H,K,Z){X(G,Q);let $=J.resize(G.__wbg_ptr,H,K,Z);return Q.__wrap($)},_H=function(G,H,K){X(G,Q);let Z=J.seam_carve(G.__wbg_ptr,H,K);return Q.__wrap(Z)},iH=function(G,H){X(G,Q);let K=J.shearx(G.__wbg_ptr,H);return Q.__wrap(K)},rH=function(G,H){X(G,Q);let K=J.sheary(G.__wbg_ptr,H);return Q.__wrap(K)},nH=function(G,H,K){X(G,Q),X(K,N);var Z=K.__destroy_into_raw();let $=J.padding_uniform(G.__wbg_ptr,H,Z);return Q.__wrap($)},sH=function(G,H,K){X(G,Q),X(K,N);var Z=K.__destroy_into_raw();let $=J.padding_left(G.__wbg_ptr,H,Z);return Q.__wrap($)},tH=function(G,H,K){X(G,Q),X(K,N);var Z=K.__destroy_into_raw();let $=J.padding_right(G.__wbg_ptr,H,Z);return Q.__wrap($)},gH=function(G,H,K){X(G,Q),X(K,N);var Z=K.__destroy_into_raw();let $=J.padding_top(G.__wbg_ptr,H,Z);return Q.__wrap($)},mH=function(G,H,K){X(G,Q),X(K,N);var Z=K.__destroy_into_raw();let $=J.padding_bottom(G.__wbg_ptr,H,Z);return Q.__wrap($)},eH=function(G,H){X(G,Q);let K=J.rotate(G.__wbg_ptr,H);return Q.__wrap(K)},oH=function(G,H,K){X(G,Q);let Z=J.resample(G.__wbg_ptr,H,K);return Q.__wrap(Z)},aH=function(G,H,K){X(G,Q),J.offset(G.__wbg_ptr,H,K)},GJ=function(G,H){X(G,Q),J.offset_red(G.__wbg_ptr,H)},HJ=function(G,H){X(G,Q),J.offset_green(G.__wbg_ptr,H)},JJ=function(G,H){X(G,Q),J.offset_blue(G.__wbg_ptr,H)},KJ=function(G,H,K,Z){X(G,Q),J.multiple_offsets(G.__wbg_ptr,H,K,Z)},QJ=function(G){X(G,Q),J.halftone(G.__wbg_ptr)},XJ=function(G){X(G,Q),J.primary(G.__wbg_ptr)},YJ=function(G){X(G,Q),J.colorize(G.__wbg_ptr)},ZJ=function(G){X(G,Q),J.solarize(G.__wbg_ptr)},$J=function(G){X(G,Q);let H=J.solarize_retimg(G.__wbg_ptr);return Q.__wrap(H)},BJ=function(G,H){X(G,Q),J.adjust_brightness(G.__wbg_ptr,H)},qJ=function(G,H){X(G,Q),J.inc_brightness(G.__wbg_ptr,H)},jJ=function(G,H){X(G,Q),J.dec_brightness(G.__wbg_ptr,H)},kJ=function(G,H){X(G,Q),J.adjust_contrast(G.__wbg_ptr,H)},zJ=function(G,H,K,Z){X(G,Q),J.tint(G.__wbg_ptr,H,K,Z)},DJ=function(G,H){X(G,Q),J.horizontal_strips(G.__wbg_ptr,H)},OJ=function(G,H,K){X(G,Q),X(K,z);var Z=K.__destroy_into_raw();J.color_horizontal_strips(G.__wbg_ptr,H,Z)},FJ=function(G,H){X(G,Q),J.vertical_strips(G.__wbg_ptr,H)},LJ=function(G,H,K){X(G,Q),X(K,z);var Z=K.__destroy_into_raw();J.color_vertical_strips(G.__wbg_ptr,H,Z)},UJ=function(G,H,K){X(G,Q),J.oil(G.__wbg_ptr,H,K)},NJ=function(G){X(G,Q),J.frosted_glass(G.__wbg_ptr)},VJ=function(G,H){X(G,Q),J.pixelize(G.__wbg_ptr,H)},SJ=function(G){X(G,Q),J.normalize(G.__wbg_ptr)},AJ=function(G,H){X(G,Q),J.dither(G.__wbg_ptr,H)},MJ=function(G,H,K){X(G,Q),X(H,z);var Z=H.__destroy_into_raw();X(K,z);var $=K.__destroy_into_raw();J.duotone(G.__wbg_ptr,Z,$)},WJ=function(G,H,K,Z,$){X(G,Q);let j=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),q=k;J.draw_text_with_border(G.__wbg_ptr,j,q,K,Z,$)},TJ=function(G,H,K,Z,$){X(G,Q);let j=D(H,J.__wbindgen_malloc,J.__wbindgen_realloc),q=k;J.draw_text(G.__wbg_ptr,j,q,K,Z,$)};function v(G,H){let K=H(G.length*1,1)>>>0;return A().set(G,K/1),k=G.length,K}function S(G,H){return G=G>>>0,A().subarray(G/1,G/1+H)}function l(G){let H=J.__wbindgen_export_2.get(G);return J.__externref_table_dealloc(G),H}var xJ=function(){let G=J.run();if(G[1])throw l(G[0])},EJ=function(G,H){return J.get_image_data(G,H)},RJ=function(G,H,K){X(K,Q);var Z=K.__destroy_into_raw();J.putImageData(G,H,Z)},yJ=function(G,H){let K=J.open_image(G,H);return Q.__wrap(K)},vJ=function(G){let H=J.to_raw_pixels(G);var K=S(H[0],H[1]).slice();return J.__wbindgen_free(H[0],H[1]*1,1),K},fJ=function(G){let H=D(G,J.__wbindgen_malloc,J.__wbindgen_realloc),K=k,Z=J.base64_to_image(H,K);return Q.__wrap(Z)},CJ=function(G){let H=D(G,J.__wbindgen_malloc,J.__wbindgen_realloc),K=k,Z=J.base64_to_vec(H,K);var $=S(Z[0],Z[1]).slice();return J.__wbindgen_free(Z[0],Z[1]*1,1),$},bJ=function(G){X(G,Q);var H=G.__destroy_into_raw();return J.to_image_data(H)};function C(G){return G===void 0||G===null}function E(G){let H=J.__externref_table_alloc();return J.__wbindgen_export_2.set(H,G),H}function O(G,H){try{return G.apply(this,H)}catch(K){let Z=E(K);J.__wbindgen_exn_store(Z)}}var T=null;function h(){if(T===null||T.byteLength===0)T=new Uint8ClampedArray(J.memory.buffer);return T}function _(G,H){return G=G>>>0,h().subarray(G/1,G/1+H)}var uJ=Object.freeze({Nearest:1,"1":"Nearest",Triangle:2,"2":"Triangle",CatmullRom:3,"3":"CatmullRom",Gaussian:4,"4":"Gaussian",Lanczos3:5,"5":"Lanczos3"});var R=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((G)=>J.__wbg_photonimage_free(G>>>0,1));class Q{static __wrap(G){G=G>>>0;let H=Object.create(Q.prototype);return H.__wbg_ptr=G,R.register(H,H.__wbg_ptr,H),H}__destroy_into_raw(){let G=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),G}free(){let G=this.__destroy_into_raw();J.__wbg_photonimage_free(G,0)}constructor(G,H,K){let Z=v(G,J.__wbindgen_malloc),$=k,j=J.photonimage_new(Z,$,H,K);return this.__wbg_ptr=j>>>0,R.register(this,this.__wbg_ptr,this),this}static new_from_base64(G){let H=D(G,J.__wbindgen_malloc,J.__wbindgen_realloc),K=k,Z=J.base64_to_image(H,K);return Q.__wrap(Z)}static new_from_byteslice(G){let H=v(G,J.__wbindgen_malloc),K=k,Z=J.photonimage_new_from_byteslice(H,K);return Q.__wrap(Z)}static new_from_blob(G){let H=J.photonimage_new_from_blob(G);return Q.__wrap(H)}static new_from_image(G){let H=J.photonimage_new_from_image(G);return Q.__wrap(H)}get_width(){return J.photonimage_get_width(this.__wbg_ptr)>>>0}get_raw_pixels(){let G=J.photonimage_get_raw_pixels(this.__wbg_ptr);var H=S(G[0],G[1]).slice();return J.__wbindgen_free(G[0],G[1]*1,1),H}get_height(){return J.photonimage_get_height(this.__wbg_ptr)>>>0}get_base64(){let G,H;try{let K=J.photonimage_get_base64(this.__wbg_ptr);return G=K[0],H=K[1],U(K[0],K[1])}finally{J.__wbindgen_free(G,H,1)}}get_bytes(){let G=J.photonimage_get_bytes(this.__wbg_ptr);var H=S(G[0],G[1]).slice();return J.__wbindgen_free(G[0],G[1]*1,1),H}get_bytes_jpeg(G){let H=J.photonimage_get_bytes_jpeg(this.__wbg_ptr,G);var K=S(H[0],H[1]).slice();return J.__wbindgen_free(H[0],H[1]*1,1),K}get_bytes_webp(){let G=J.photonimage_get_bytes_webp(this.__wbg_ptr);var H=S(G[0],G[1]).slice();return J.__wbindgen_free(G[0],G[1]*1,1),H}get_image_data(){return J.photonimage_get_image_data(this.__wbg_ptr)}set_imgdata(G){J.photonimage_set_imgdata(this.__wbg_ptr,G)}get_estimated_filesize(){let G=J.photonimage_get_estimated_filesize(this.__wbg_ptr);return BigInt.asUintN(64,G)}}var cJ=Q;var b=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((G)=>J.__wbg_rgb_free(G>>>0,1));class z{__destroy_into_raw(){let G=this.__wbg_ptr;return this.__wbg_ptr=0,b.unregister(this),G}free(){let G=this.__destroy_into_raw();J.__wbg_rgb_free(G,0)}constructor(G,H,K){let Z=J.rgb_new(G,H,K);return this.__wbg_ptr=Z>>>0,b.register(this,this.__wbg_ptr,this),this}set_red(G){J.rgb_set_red(this.__wbg_ptr,G)}set_green(G){J.rgb_set_green(this.__wbg_ptr,G)}set_blue(G){J.rgb_set_blue(this.__wbg_ptr,G)}get_red(){return J.rgb_get_red(this.__wbg_ptr)}get_green(){return J.rgb_get_green(this.__wbg_ptr)}get_blue(){return J.rgb_get_blue(this.__wbg_ptr)}}var wJ=z;var u=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((G)=>J.__wbg_rgba_free(G>>>0,1));class N{__destroy_into_raw(){let G=this.__wbg_ptr;return this.__wbg_ptr=0,u.unregister(this),G}free(){let G=this.__destroy_into_raw();J.__wbg_rgba_free(G,0)}constructor(G,H,K,Z){let $=J.rgba_new(G,H,K,Z);return this.__wbg_ptr=$>>>0,u.register(this,this.__wbg_ptr,this),this}set_red(G){J.rgb_set_red(this.__wbg_ptr,G)}set_green(G){J.rgb_set_green(this.__wbg_ptr,G)}set_blue(G){J.rgb_set_blue(this.__wbg_ptr,G)}set_alpha(G){J.rgba_set_alpha(this.__wbg_ptr,G)}get_red(){return J.rgb_get_red(this.__wbg_ptr)}get_green(){return J.rgb_get_green(this.__wbg_ptr)}get_blue(){return J.rgb_get_blue(this.__wbg_ptr)}get_alpha(){return J.rgba_get_alpha(this.__wbg_ptr)}}var PJ=N;B.__wbg_new_abda76e883ba8a5f=function(){return Error()};B.__wbg_stack_658279fe44541cf6=function(G,H){let K=H.stack,Z=D(K,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;M().setInt32(G+4,$,!0),M().setInt32(G+0,Z,!0)};B.__wbg_error_f851667af71bcfc6=function(G,H){let K,Z;try{K=G,Z=H,console.error(U(G,H))}finally{J.__wbindgen_free(K,Z,1)}};B.__wbg_instanceof_Window_c4b70662a0d2c5ec=function(G){let H;try{H=G instanceof Window}catch(Z){H=!1}return H};B.__wbg_document_e5c1786dea6542e4=function(G){let H=G.document;return C(H)?0:E(H)};B.__wbg_body_e70ae6abd01ae584=function(G){let H=G.body;return C(H)?0:E(H)};B.__wbg_createElement_5d4c76f218b78145=function(){return O(function(G,H,K){return G.createElement(U(H,K))},arguments)};B.__wbg_width_4c6f0048d64cf86b=function(G){return G.width};B.__wbg_height_21f0d3fd8f753394=function(G){return G.height};B.__wbg_width_79e0847ed5883b03=function(G){return G.width};B.__wbg_height_e4e4e4779f8feac0=function(G){return G.height};B.__wbg_data_fda507064d127f5b=function(G,H){let K=H.data,Z=v(K,J.__wbindgen_malloc),$=k;M().setInt32(G+4,$,!0),M().setInt32(G+0,Z,!0)};B.__wbg_newwithu8clampedarrayandsh_1fddccb3a94a5e05=function(){return O(function(G,H,K,Z){return new ImageData(_(G,H),K>>>0,Z>>>0)},arguments)};B.__wbg_instanceof_CanvasRenderingContext2d_3abbe7ec7af32cae=function(G){let H;try{H=G instanceof CanvasRenderingContext2D}catch(Z){H=!1}return H};B.__wbg_drawImage_fede06db74e39a60=function(){return O(function(G,H,K,Z){G.drawImage(H,K,Z)},arguments)};B.__wbg_drawImage_f395c8e43c79a909=function(){return O(function(G,H,K,Z,$,j,q,F,L,P){G.drawImage(H,K,Z,$,j,q,F,L,P)},arguments)};B.__wbg_getImageData_5e1c242046e6b59e=function(){return O(function(G,H,K,Z,$){return G.getImageData(H,K,Z,$)},arguments)};B.__wbg_putImageData_a8b3e177ee06d521=function(){return O(function(G,H,K,Z){G.putImageData(H,K,Z)},arguments)};B.__wbg_instanceof_HtmlCanvasElement_25d964a0dde6717e=function(G){let H;try{H=G instanceof HTMLCanvasElement}catch(Z){H=!1}return H};B.__wbg_width_dc225e55343b745e=function(G){return G.width};B.__wbg_setwidth_488780db69b08846=function(G,H){G.width=H>>>0};B.__wbg_height_3a8bec2f3fe71b26=function(G){return G.height};B.__wbg_setheight_1761808c18403921=function(G,H){G.height=H>>>0};B.__wbg_getContext_fc99dbd3a9a7e318=function(){return O(function(G,H,K){let Z=G.getContext(U(H,K));return C(Z)?0:E(Z)},arguments)};B.__wbg_settextContent_f82a86a8df347e1c=function(G,H,K){G.textContent=H===0?void 0:U(H,K)};B.__wbg_appendChild_fa3b00dade9fc4cf=function(){return O(function(G,H){return G.appendChild(H)},arguments)};B.__wbg_newnoargs_e643855c6572a4a8=function(G,H){return Function(U(G,H))};B.__wbg_call_f96b398515635514=function(){return O(function(G,H){return G.call(H)},arguments)};B.__wbg_self_b9aad7f1c618bfaf=function(){return O(function(){return self.self},arguments)};B.__wbg_window_55e469842c98b086=function(){return O(function(){return window.window},arguments)};B.__wbg_globalThis_d0957e302752547e=function(){return O(function(){return globalThis.globalThis},arguments)};B.__wbg_global_ae2f87312b8987fb=function(){return O(function(){return global.global},arguments)};B.__wbindgen_is_undefined=function(G){return G===void 0};B.__wbg_buffer_fcbfb6d88b2732e9=function(G){return G.buffer};B.__wbg_new_bc5d9aad3f9ac80e=function(G){return new Uint8Array(G)};B.__wbg_set_4b3aa8445ac1e91c=function(G,H,K){G.set(H,K>>>0)};B.__wbg_length_d9c4ded7e708c6a1=function(G){return G.length};B.__wbindgen_debug_string=function(G,H){let K=y(H),Z=D(K,J.__wbindgen_malloc,J.__wbindgen_realloc),$=k;M().setInt32(G+4,$,!0),M().setInt32(G+0,Z,!0)};B.__wbindgen_throw=function(G,H){throw Error(U(G,H))};B.__wbindgen_memory=function(){return J.memory};B.__wbindgen_init_externref_table=function(){let G=J.__wbindgen_export_2,H=G.grow(4);G.set(0,void 0),G.set(H+0,void 0),G.set(H+1,null),G.set(H+2,!0),G.set(H+3,!1)};var i=globalThis.__OPENCODE_PHOTON_WASM_PATH||f("path").join(__dirname,"photon_rs_bg.wasm"),r=f("fs").readFileSync(i),n=new WebAssembly.Module(r),s=new WebAssembly.Instance(n,c);J=s.exports;var IJ=J;J.__wbindgen_start();export{FH as watermark,FJ as vertical_strips,vJ as to_raw_pixels,bJ as to_image_data,zJ as tint,WG as threshold,QG as swap_channels,$J as solarize_retimg,ZJ as solarize,kH as sobel_vertical,qH as sobel_horizontal,zH as sobel_global,MG as single_channel_grayscale,rH as sheary,iH as shearx,oG as sharpen,zG as sepia,qG as selective_saturate,$G as selective_lighten,YG as selective_hue_rotate,jG as selective_greyscale,BG as selective_desaturate,ZG as selective_color_convert,_H as seam_carve,cG as saturate_lch,PG as saturate_hsv,wG as saturate_hsluv,uG as saturate_hsl,AH as ryo,xJ as run,eH as rotate,lH as resize_img_browser,hH as resize,oH as resample,HG as remove_red_channel,JG as remove_green_channel,GG as remove_channel,KG as remove_blue_channel,VG as r_grayscale,RJ as putImageData,XJ as primary,jH as prewitt_horizontal,VJ as pixelize,OH as pink_noise,TH as pastel_pink,nH as padding_uniform,gH as padding_top,tH as padding_right,sH as padding_left,mH as padding_bottom,yJ as open_image,UJ as oil,GJ as offset_red,HJ as offset_green,JJ as offset_blue,aH as offset,wH as obsidian,SJ as normalize,eG as noise_reduction,VH as neue,KJ as multiple_offsets,yH as monochrome_tint,kG as monochrome,mG as mix_with_colour,WH as lofi,SH as lix,IG as lighten_lch,lG as lighten_hsv,dG as lighten_hsluv,pG as lighten_hsl,EG as lch,ZH as laplace,XG as invert,qJ as inc_brightness,GH as identity,CG as hue_rotate_lch,fG as hue_rotate_hsv,bG as hue_rotate_hsluv,vG as hue_rotate_hsl,yG as hsv,xG as hsluv,RG as hsl,DJ as horizontal_strips,QJ as halftone,NG as grayscale_shades,OG as grayscale_human_corrected,DG as grayscale,xH as golden,EJ as get_image_data,JH as gaussian_blur,TG as gamma_correction,SG as g_grayscale,NJ as frosted_glass,pH as flipv,dH as fliph,cH as firenze,MH as filter,BH as emboss,$H as edge_one,aG as edge_detection,vH as duotone_violette,CH as duotone_tint,uH as duotone_ochre,bH as duotone_lilac,fH as duotone_horizon,MJ as duotone,WJ as draw_text_with_border,TJ as draw_text,RH as dramatic,AJ as dither,QH as detect_vertical_lines,KH as detect_horizontal_lines,XH as detect_45_deg_lines,YH as detect_135_deg_lines,tG as desaturate_lch,nG as desaturate_hsv,gG as desaturate_hsluv,sG as desaturate_hsl,FG as desaturate,LG as decompose_min,UG as decompose_max,jJ as dec_brightness,hG as darken_lch,rG as darken_hsv,_G as darken_hsluv,iG as darken_hsl,IH as crop_img_browser,PH as crop,UH as create_gradient,YJ as colorize,LJ as color_vertical_strips,OJ as color_horizontal_strips,EH as cali,HH as box_blur,LH as blend,CJ as base64_to_vec,fJ as base64_to_image,AG as b_grayscale,NH as apply_gradient,o as alter_two_channels,g as alter_red_channel,m as alter_green_channel,a as alter_channels,t as alter_channel,e as alter_blue_channel,kJ as adjust_contrast,BJ as adjust_brightness,DH as add_noise_rand,IJ as __wasm,uJ as SamplingFilter,PJ as Rgba,wJ as Rgb,cJ as PhotonImage};export default {get watermark(){return FH},get vertical_strips(){return FJ},get to_raw_pixels(){return vJ},get to_image_data(){return bJ},get tint(){return zJ},get threshold(){return WG},get swap_channels(){return QG},get solarize_retimg(){return $J},get solarize(){return ZJ},get sobel_vertical(){return kH},get sobel_horizontal(){return qH},get sobel_global(){return zH},get single_channel_grayscale(){return MG},get sheary(){return rH},get shearx(){return iH},get sharpen(){return oG},get sepia(){return zG},get selective_saturate(){return qG},get selective_lighten(){return $G},get selective_hue_rotate(){return YG},get selective_greyscale(){return jG},get selective_desaturate(){return BG},get selective_color_convert(){return ZG},get seam_carve(){return _H},get saturate_lch(){return cG},get saturate_hsv(){return PG},get saturate_hsluv(){return wG},get saturate_hsl(){return uG},get ryo(){return AH},get run(){return xJ},get rotate(){return eH},get resize_img_browser(){return lH},get resize(){return hH},get resample(){return oH},get remove_red_channel(){return HG},get remove_green_channel(){return JG},get remove_channel(){return GG},get remove_blue_channel(){return KG},get r_grayscale(){return VG},get putImageData(){return RJ},get primary(){return XJ},get prewitt_horizontal(){return jH},get pixelize(){return VJ},get pink_noise(){return OH},get pastel_pink(){return TH},get padding_uniform(){return nH},get padding_top(){return gH},get padding_right(){return tH},get padding_left(){return sH},get padding_bottom(){return mH},get open_image(){return yJ},get oil(){return UJ},get offset_red(){return GJ},get offset_green(){return HJ},get offset_blue(){return JJ},get offset(){return aH},get obsidian(){return wH},get normalize(){return SJ},get noise_reduction(){return eG},get neue(){return VH},get multiple_offsets(){return KJ},get monochrome_tint(){return yH},get monochrome(){return kG},get mix_with_colour(){return mG},get lofi(){return WH},get lix(){return SH},get lighten_lch(){return IG},get lighten_hsv(){return lG},get lighten_hsluv(){return dG},get lighten_hsl(){return pG},get lch(){return EG},get laplace(){return ZH},get invert(){return XG},get inc_brightness(){return qJ},get identity(){return GH},get hue_rotate_lch(){return CG},get hue_rotate_hsv(){return fG},get hue_rotate_hsluv(){return bG},get hue_rotate_hsl(){return vG},get hsv(){return yG},get hsluv(){return xG},get hsl(){return RG},get horizontal_strips(){return DJ},get halftone(){return QJ},get grayscale_shades(){return NG},get grayscale_human_corrected(){return OG},get grayscale(){return DG},get golden(){return xH},get get_image_data(){return EJ},get gaussian_blur(){return JH},get gamma_correction(){return TG},get g_grayscale(){return SG},get frosted_glass(){return NJ},get flipv(){return pH},get fliph(){return dH},get firenze(){return cH},get filter(){return MH},get emboss(){return BH},get edge_one(){return $H},get edge_detection(){return aG},get duotone_violette(){return vH},get duotone_tint(){return CH},get duotone_ochre(){return uH},get duotone_lilac(){return bH},get duotone_horizon(){return fH},get duotone(){return MJ},get draw_text_with_border(){return WJ},get draw_text(){return TJ},get dramatic(){return RH},get dither(){return AJ},get detect_vertical_lines(){return QH},get detect_horizontal_lines(){return KH},get detect_45_deg_lines(){return XH},get detect_135_deg_lines(){return YH},get desaturate_lch(){return tG},get desaturate_hsv(){return nG},get desaturate_hsluv(){return gG},get desaturate_hsl(){return sG},get desaturate(){return FG},get decompose_min(){return LG},get decompose_max(){return UG},get dec_brightness(){return jJ},get darken_lch(){return hG},get darken_hsv(){return rG},get darken_hsluv(){return _G},get darken_hsl(){return iG},get crop_img_browser(){return IH},get crop(){return PH},get create_gradient(){return UH},get colorize(){return YJ},get color_vertical_strips(){return LJ},get color_horizontal_strips(){return OJ},get cali(){return EH},get box_blur(){return HH},get blend(){return LH},get base64_to_vec(){return CJ},get base64_to_image(){return fJ},get b_grayscale(){return AG},get apply_gradient(){return NH},get alter_two_channels(){return o},get alter_red_channel(){return g},get alter_green_channel(){return m},get alter_channels(){return a},get alter_channel(){return t},get alter_blue_channel(){return e},get adjust_contrast(){return kJ},get adjust_brightness(){return BJ},get add_noise_rand(){return DH},get __wasm(){return IJ},get SamplingFilter(){return uJ},get Rgba(){return PJ},get Rgb(){return wJ},get PhotonImage(){return cJ}};