@webflow/webflow-cli 1.20.1 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +78 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var Qb=Object.create;var ds=Object.defineProperty;var ew=Object.getOwnPropertyDescriptor;var tw=Object.getOwnPropertyNames;var nw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty;var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var ps=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vc=(e,t)=>{for(var n in t)ds(e,n,{get:t[n],enumerable:!0})},ow=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tw(t))!rw.call(e,o)&&o!==n&&ds(e,o,{get:()=>t[o],enumerable:!(r=ew(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?Qb(nw(e)):{},ow(t||!e||!e.__esModule?ds(n,"default",{value:e,enumerable:!0}):n,e));function aw(){let e=new Map;for(let[t,n]of Object.entries(le)){for(let[r,o]of Object.entries(n))le[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=le[r],e.set(o[0],o[1]);Object.defineProperty(le,t,{value:n,enumerable:!1})}return Object.defineProperty(le,"codes",{value:e,enumerable:!1}),le.color.close="\x1B[39m",le.bgColor.close="\x1B[49m",le.color.ansi=Gc(),le.color.ansi256=qc(),le.color.ansi16m=Jc(),le.bgColor.ansi=Gc(10),le.bgColor.ansi256=qc(10),le.bgColor.ansi16m=Jc(10),Object.defineProperties(le,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>le.rgbToAnsi256(...le.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(n,r,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>le.ansi256ToAnsi(le.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>le.ansi256ToAnsi(le.hexToAnsi256(t)),enumerable:!1}}),le}var Gc,qc,Jc,le,ES,iw,sw,_S,lw,Ge,Hc=T(()=>{"use strict";Gc=(e=0)=>t=>`\x1B[${t+e}m`,qc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Jc=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,le={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},ES=Object.keys(le.modifier),iw=Object.keys(le.color),sw=Object.keys(le.bgColor),_S=[...iw,...sw];lw=aw(),Ge=lw});function Re(e,t=globalThis.Deno?globalThis.Deno.args:wo.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}function cw(){if("FORCE_COLOR"in ue)return ue.FORCE_COLOR==="true"?1:ue.FORCE_COLOR==="false"?0:ue.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ue.FORCE_COLOR,10),3)}function uw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function dw(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=cw();r!==void 0&&(bo=r);let o=n?bo:r;if(o===0)return 0;if(n){if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2}if("TF_BUILD"in ue&&"AGENT_NAME"in ue)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(ue.TERM==="dumb")return i;if(wo.default.platform==="win32"){let s=Kc.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ue)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ue)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ue)||ue.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ue)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ue.TEAMCITY_VERSION)?1:0;if(ue.COLORTERM==="truecolor"||ue.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ue){let s=Number.parseInt((ue.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ue.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ue.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ue.TERM)||"COLORTERM"in ue?1:i}function Zc(e,t={}){let n=dw(e,{streamIsTTY:e&&e.isTTY,...t});return uw(n)}var wo,Kc,fs,ue,bo,pw,Yc,Xc=T(()=>{"use strict";wo=w(require("process"),1),Kc=w(require("os"),1),fs=w(require("tty"),1);({env:ue}=wo.default);Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?bo=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(bo=1);pw={stdout:Zc({isTTY:fs.default.isatty(1)}),stderr:Zc({isTTY:fs.default.isatty(2)})},Yc=pw});function Qc(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(r!==-1);return s+=e.slice(i),s}function eu(e,t,n,r){let o=0,i="";do{let s=e[r-1]==="\r";i+=e.slice(o,s?r-1:r)+t+(s?`\r
|
|
3
3
|
`:`
|
|
4
4
|
`)+n,o=r+1,r=e.indexOf(`
|
|
5
|
-
`,o)}while(r!==-1);return i+=e.slice(o),i}var
|
|
6
|
-
`);return i!==-1&&(t=
|
|
7
|
-
${t}`,kw=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),xw=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Cw=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=vw.bind(null,r,t.toString());Object.defineProperty(o,"name",xw);let{writable:i,enumerable:s,configurable:a}=kw;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var ko,iu,su,au=T(()=>{"use strict";ou();ko=new WeakMap,iu=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(ko.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return bs(i,e),ko.set(i,r),i};iu.callCount=e=>{if(!ko.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ko.get(e)};su=iu});var Ht,lu=T(()=>{"use strict";Ht=[];Ht.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ht.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ht.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var xo,ws,Ds,Fw,vs,Co,Ew,ks,xs,Cs,cu,MS,zS,uu=T(()=>{"use strict";lu();xo=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ws=Symbol.for("signal-exit emitter"),Ds=globalThis,Fw=Object.defineProperty.bind(Object),vs=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ds[ws])return Ds[ws];Fw(Ds,ws,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}},Co=class{},Ew=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),ks=class extends Co{onExit(){return()=>{}}load(){}unload(){}},xs=class extends Co{#s=Cs.platform==="win32"?"SIGINT":"SIGHUP";#n=new vs;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of Ht)this.#t[n]=()=>{let r=this.#e.listeners(n),{count:o}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,a)}};this.#p=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!xo(this.#e))return()=>{};this.#i===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,t),()=>{this.#n.removeListener(r,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of Ht)try{let n=this.#t[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#f(t,...n),this.#e.reallyExit=t=>this.#r(t)}}unload(){this.#i&&(this.#i=!1,Ht.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#p,this.#n.count-=1)}#r(t){return xo(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#p.call(this.#e,this.#e.exitCode)):0}#f(t,...n){let r=this.#o;if(t==="exit"&&xo(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let o=r.call(this.#e,t,...n);return this.#n.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}},Cs=globalThis.process,{onExit:cu,load:MS,unload:zS}=Ew(xo(Cs)?new xs(Cs):new ks)});var kr,du,_w,pu,fu=T(()=>{"use strict";kr=w(require("process"),1);au();uu();du=kr.default.stderr.isTTY?kr.default.stderr:kr.default.stdout.isTTY?kr.default.stdout:void 0,_w=du?su(()=>{cu(()=>{du.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},pu=_w});var Fs,Fo,An,Es,mu=T(()=>{"use strict";Fs=w(require("process"),1);fu();Fo=!1,An={};An.show=(e=Fs.default.stderr)=>{e.isTTY&&(Fo=!1,e.write("\x1B[?25h"))};An.hide=(e=Fs.default.stderr)=>{e.isTTY&&(pu(),Fo=!0,e.write("\x1B[?25l"))};An.toggle=(e,t)=>{e!==void 0&&(Fo=e),Fo?An.show(t):An.hide(t)};Es=An});var hu=fs((HS,Sw)=>{Sw.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var _s=fs((ZS,yu)=>{"use strict";var Eo=Object.assign({},hu()),gu=Object.keys(Eo);Object.defineProperty(Eo,"random",{get(){let e=Math.floor(Math.random()*gu.length),t=gu[e];return Eo[t]}});yu.exports=Eo});function Ss(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var je,bu=T(()=>{"use strict";je=w(require("process"),1)});var Tw,Aw,Ow,xr,wu=T(()=>{"use strict";Fe();bu();Tw={info:k.blue("\u2139"),success:k.green("\u2714"),warning:k.yellow("\u26A0"),error:k.red("\u2716")},Aw={info:k.blue("i"),success:k.green("\u221A"),warning:k.yellow("\u203C"),error:k.red("\xD7")},Ow=Ss()?Tw:Aw,xr=Ow});function Ts({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var Du=T(()=>{"use strict"});function Cr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Pw,"")}var Pw,As=T(()=>{"use strict";Du();Pw=Ts()});function vu(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function ku(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function xu(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 Cu=T(()=>{"use strict"});function Iw(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Fu(e,{ambiguousAsWide:t=!1}={}){return Iw(e),ku(e)||xu(e)||t&&vu(e)?2:1}var Eu=T(()=>{"use strict";Cu()});var _u,Su=T(()=>{"use strict";_u=()=>/[#*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 Os(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Cr(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of Rw.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!jw.test(s)){if(_u().test(s)){o+=2;continue}o+=Fu(a,i)}}return o}var Rw,jw,Tu=T(()=>{"use strict";As();Eu();Su();Rw=new Intl.Segmenter,jw=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function Ps({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Au=T(()=>{"use strict"});function Rs(){let{env:e}=Is.default,{TERM:t,TERM_PROGRAM:n}=e;return Is.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Is,Ou=T(()=>{"use strict";Is=w(require("process"),1)});var qe,$w,js,Bw,$s,Pu=T(()=>{"use strict";qe=w(require("process"),1),$w=3,js=class{#s=0;start(){this.#s++,this.#s===1&&this.#n()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#n(){qe.default.platform==="win32"||!qe.default.stdin.isTTY||(qe.default.stdin.setRawMode(!0),qe.default.stdin.on("data",this.#o),qe.default.stdin.resume())}#e(){qe.default.stdin.isTTY&&(qe.default.stdin.off("data",this.#o),qe.default.stdin.pause(),qe.default.stdin.setRawMode(!1))}#o(t){t[0]===$w&&qe.default.emit("SIGINT")}},Bw=new js,$s=Bw});function On(e){return new Bs(e)}var Fr,Er,Nw,Bs,Ns=T(()=>{"use strict";Fr=w(require("process"),1);Fe();mu();Er=w(_s(),1);wu();As();Tu();Au();Ou();Pu();Nw=w(_s(),1),Bs=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#h;#c;#u;#d;#g;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:Fr.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Ps({stream:this.#r}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Fr.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(n){this.#s=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!Rs())this.#i=Er.default.line;else if(t===void 0)this.#i=Er.default.dots;else if(t!=="default"&&Er.default[t])this.#i=Er.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#b(t=this.#l,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#m(){let t=this.#r.columns??80,n=this.#y(this.#a,"-"),r=this.#b(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#g+"--"+r;this.#e=0;for(let i of Cr(o).split(`
|
|
8
|
-
`))this.#e+=Math.max(1,Math.ceil(
|
|
9
|
-
`),this)}stop(){return this.#c?(clearInterval(this.#f),this.#f=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&
|
|
10
|
-
`;return this.stop(),this.#r.write(u),this}}});function zs(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),_o.default.platform==="darwin"?Lw(e):_o.default.platform==="win32"?Mw(e):zw(e)}var ce,Ls,_o,Ft,Ms,Pn,Lw,Mw,zw,Iu=T(()=>{"use strict";ce=w(require("path"),1),Ls=w(require("os"),1),_o=w(require("process"),1),Ft=Ls.default.homedir(),Ms=Ls.default.tmpdir(),{env:Pn}=_o.default,Lw=e=>{let t=ce.default.join(Ft,"Library");return{data:ce.default.join(t,"Application Support",e),config:ce.default.join(t,"Preferences",e),cache:ce.default.join(t,"Caches",e),log:ce.default.join(t,"Logs",e),temp:ce.default.join(Ms,e)}},Mw=e=>{let t=Pn.APPDATA||ce.default.join(Ft,"AppData","Roaming"),n=Pn.LOCALAPPDATA||ce.default.join(Ft,"AppData","Local");return{data:ce.default.join(n,e,"Data"),config:ce.default.join(t,e,"Config"),cache:ce.default.join(n,e,"Cache"),log:ce.default.join(n,e,"Log"),temp:ce.default.join(Ms,e)}},zw=e=>{let t=ce.default.basename(Ft);return{data:ce.default.join(Pn.XDG_DATA_HOME||ce.default.join(Ft,".local","share"),e),config:ce.default.join(Pn.XDG_CONFIG_HOME||ce.default.join(Ft,".config"),e),cache:ce.default.join(Pn.XDG_CACHE_HOME||ce.default.join(Ft,".cache"),e),log:ce.default.join(Pn.XDG_STATE_HOME||ce.default.join(Ft,".local","state"),e),temp:ce.default.join(Ms,t,e)}}});function So(){return/[<>:"/\\|?*\u0000-\u001F]/g}function Ru(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var ju=T(()=>{"use strict"});function _r(e,t={}){let n=/[\u0000-\u001F\u0080-\u009F]/g,r=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(So().test(o)&&n.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(r,"$1")),e=e.normalize("NFD"),e=e.replace(Uw,o),e=e.replace(So(),o),e=e.replace(n,o),e=e.replace(Vw,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=Ru().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Ww;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),l=e.slice(s);e=a.slice(0,Math.max(1,i-l.length))+l}}return e}var Ww,Uw,Vw,Ws=T(()=>{"use strict";ju();Ww=100,Uw=/^\.+(\\|\/)|^\.+$/,Vw=/\.+$/});var Gw,$u=T(()=>{"use strict";Gw=w(require("path"),1);Ws()});var Bu=T(()=>{"use strict";Ws();$u()});var To,Us=T(()=>{"use strict";To="webflow.json"});var Zt,Vs=T(()=>{"use strict";Zt=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function Lu(e){Gs=e}function ie(){return Gs}function Et(){return!Gs}function Mu(e){Nu=e}function zu(){return Nu}var Gs,Nu,Oe=T(()=>{"use strict";Gs=!1});function Kt(){let e=zu();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,Wu.statSync)(e)?.isDirectory())return{path:(0,Uu.join)(e,To),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${To}`,isUserDefined:!1}}var Wu,Uu,qs=T(()=>{"use strict";Wu=require("fs"),Uu=require("path");Us();Oe()});var Vu,qw,Jw,Js,Gu=T(()=>{"use strict";Vu=w(require("ajv")),qw=new Vu.default,Jw={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},Js=qw.compile(Jw)});function qu(e){return e instanceof Error?e:new Error("Unknown error")}function X(){let{path:e}=Kt();if(!(0,Ao.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Ao.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${qu(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let r;try{r=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${qu(o).message}`)}if(!Js(r)){let o=Js.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var Ao,Oo=T(()=>{"use strict";Ao=require("fs");qs();Gu()});function Sr(e,t){let n=e[t];if(!n)throw new Zt(t);return n}var Ju=T(()=>{"use strict";Vs()});function fe(e){let t=X(),n=t.manifest,r=t.manifestPath,o={...n};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let l=o[s];o[s]={...typeof l=="object"&&l!==null?l:{},...a}}}return(0,Hu.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var Hu,Hs=T(()=>{"use strict";Hu=require("fs");Oo()});var we=T(()=>{"use strict";Us();Vs();Oo();qs();Ju();Hs()});var Po=fs((tT,Hw)=>{Hw.exports={name:"@webflow/webflow-cli",version:"1.20.1",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2","css-tree":"^2.3.1",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0",jsdom:"^26.0.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",prettier:"^2.7.1",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.2.2",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/css-tree":"^2.3.1","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/prettier":"^2.7.1","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function ut(){try{return Po().version}catch{return"unknown"}}function et(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let n=Tr.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=Tr.default.userInfo().username;if(r){let o=new RegExp(`/Users/${r}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function Zs(e){if(e.stack)return et(e.stack)}function _t(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],n={};for(let[r,o]of Object.entries(e)){let i=r.toLowerCase();t.some(s=>i.includes(s))?n[r]="[REDACTED]":typeof o=="string"?n[r]=et(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=_t(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?_t(s):typeof s=="string"?et(s):s):n[r]=o}return n}function Zu(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${Tr.default.type()} ${Tr.default.release()}`}}function Ks(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var Tr,Ar=T(()=>{"use strict";Tr=w(require("os"))});var K,q,dt,In,Ys,Rn,ke=T(()=>{"use strict";Fe();K=k.green("\u2714"),q=k.red("\u2716"),dt=k.cyan("\u2139"),In=k.green("\u279C"),Ys=k.red("\u279C"),Rn=k.yellow("\u26A0")});var St,Xs=T(()=>{"use strict";Fe();we();Ar();V();ke();St=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await X(),n=t?.telemetry?.global?.allowTelemetry;return this.cache=n,n}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(d.info(`${dt} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(d.info(`${dt} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),d.info(`${dt} To opt out, run: ${k.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let n={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:ut()}}};await fe(n),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,n){this.cache=n}}});async function Y(e,t){let r={"User-Agent":`webflow-cli@${ut()}`};return(0,Ku.default)(e,{...t,headers:{...t?.headers,...r}})}var Ku,pt=T(()=>{"use strict";Ku=w(require("node-fetch"));$e()});var Yu,Xu=T(()=>{"use strict";Yu=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Qs,R,Io,jn,Or,ea,Pr,Ir,$n,de=T(()=>{"use strict";Xu();Qs=(e,t)=>(Yu(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),R=process.env.WEBFLOW_API_HOST?Qs("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",Io=process.env.WEBFLOW_CDN_API_HOST?Qs("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",jn=process.env.WEBFLOW_HOST?Qs("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Or="wf-manifest.json",ea="mf-manifest.json",Pr="@webflow_renderer",Ir="ssr-bundle.tar",$n="index.js"});var J,ta=T(()=>{"use strict";Xs();Ar();V();pt();de();J=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=St.getInstance(),this.sessionId=Ks(),this.platformInfo=Zu()}async sendEvent(t){try{if(!await this.isEnabled())return;let n=this.enrichEvent(t),r=this.sanitizeEvent(n);await this.transmitEvent(r)}catch(n){d.debug(`Failed to send telemetry event: ${n}`)}}async sendError(t,n,r){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:Zs(t),context:n,metadata:r?_t(r):void 0})}async sendUsage(t,n){let{duration:r,...o}=n??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof r=="number"?r:void 0,data:Object.keys(o).length>0?_t(o):void 0})}async sendPerformance(t,n,r){await this.sendEvent({eventType:"performance",operation:t,duration:n,metrics:r})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let n=St.getInstance(),r=await n.getPreference();return r!==void 0?r:await n.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:ut(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let n=JSON.parse(JSON.stringify(t));return n.message&&(n.message=et(n.message)),n.stack&&(n.stack=et(n.stack)),n.context&&(n.context=et(n.context)),n.metadata&&(n.metadata=_t(n.metadata)),n.data&&(n.data=_t(n.data)),n}async transmitEvent(t){let n=this.getEndpoint(),r=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(r){console.log(`\u{1F4CA} [Telemetry] Sending to: ${n}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await Y(n,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)r&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw r&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:n}=this.config;return`${t}/webflow-cli/${n}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||R,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}static forSites(t){return new e({host:t.host||R,authToken:t.authToken,commandType:"sites"})}}});var Qu=T(()=>{"use strict"});function ed(e){return async(t,n,r)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await n(),a=Date.now()-o,l=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:l-i,...r}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...r}),s}}}var $e=T(()=>{"use strict";ta();Xs();Qu();Ar();Ar()});var ra,na,Zw,ft,oa=T(()=>{"use strict";ra=Symbol("webflow-cli-warn"),na=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
|
|
11
|
-
`);for(let r=2;r<n.length;r++){let o=n[r],i=o.match(/at .+? \((.+?):\d+:\d+\)/)||o.match(/at (.+?):\d+:\d+/);if(i){let s=i[1];if(s.includes("node_modules")){let a=s.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)/);return a?`External: ${a[1]}`:"External Dependencies"}else if(s.includes("webflow-cli"))return s.includes("/metadata/")?"Metadata Collection":s.includes("/bundler/")?"Bundling":s.includes("/commands/")?"CLI Commands":"Webflow CLI"}}return"General"}start(){this.isActive||(this.warnings=[],this.originalConsoleWarn=console.warn,this.isActive=!0,console.warn=(...t)=>{if(t.length>1&&t[t.length-1]===
|
|
5
|
+
`,o)}while(r!==-1);return i+=e.slice(o),i}var tu=T(()=>{"use strict"});function kr(e){return mw(e)}var nu,ru,ms,Tn,vr,ou,An,fw,mw,hs,hw,gw,gs,Do,yw,bw,RS,k,Fe=T(()=>{"use strict";Hc();Xc();tu();({stdout:nu,stderr:ru}=Yc),ms=Symbol("GENERATOR"),Tn=Symbol("STYLER"),vr=Symbol("IS_EMPTY"),ou=["ansi","ansi","ansi256","ansi16m"],An=Object.create(null),fw=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=nu?nu.level:0;e.level=t.level===void 0?n:t.level},mw=e=>{let t=(...n)=>n.join(" ");return fw(t,e),Object.setPrototypeOf(t,kr.prototype),t};Object.setPrototypeOf(kr.prototype,Function.prototype);for(let[e,t]of Object.entries(Ge))An[e]={get(){let n=Do(this,gs(t.open,t.close,this[Tn]),this[vr]);return Object.defineProperty(this,e,{value:n}),n}};An.visible={get(){let e=Do(this,this[Tn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};hs=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?Ge[n].ansi16m(...r):t==="ansi256"?Ge[n].ansi256(Ge.rgbToAnsi256(...r)):Ge[n].ansi(Ge.rgbToAnsi(...r)):e==="hex"?hs("rgb",t,n,...Ge.hexToRgb(...r)):Ge[n][e](...r),hw=["rgb","hex","ansi256"];for(let e of hw){An[e]={get(){let{level:n}=this;return function(...r){let o=gs(hs(e,ou[n],"color",...r),Ge.color.close,this[Tn]);return Do(this,o,this[vr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);An[t]={get(){let{level:n}=this;return function(...r){let o=gs(hs(e,ou[n],"bgColor",...r),Ge.bgColor.close,this[Tn]);return Do(this,o,this[vr])}}}}gw=Object.defineProperties(()=>{},{...An,level:{enumerable:!0,get(){return this[ms].level},set(e){this[ms].level=e}}}),gs=(e,t,n)=>{let r,o;return n===void 0?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},Do=(e,t,n)=>{let r=(...o)=>yw(r,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(r,gw),r[ms]=e,r[Tn]=t,r[vr]=n,r},yw=(e,t)=>{if(e.level<=0||!t)return e[vr]?"":t;let n=e[Tn];if(n===void 0)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=Qc(t,n.close,n.open),n=n.parent;let i=t.indexOf(`
|
|
6
|
+
`);return i!==-1&&(t=eu(t,o,r,i)),r+t+o};Object.defineProperties(kr.prototype,An);bw=kr(),RS=kr({level:ru?ru.level:0}),k=bw});function ys(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))ww(e,t,o,n);return vw(e,t),Fw(e,t,r),e}var ww,Dw,vw,kw,xw,Cw,Fw,iu=T(()=>{"use strict";ww=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!Dw(o,i)&&r||Object.defineProperty(e,n,i)},Dw=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},vw=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},kw=(e,t)=>`/* Wrapped ${e}*/
|
|
7
|
+
${t}`,xw=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Cw=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Fw=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=kw.bind(null,r,t.toString());Object.defineProperty(o,"name",Cw);let{writable:i,enumerable:s,configurable:a}=xw;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var vo,su,au,lu=T(()=>{"use strict";iu();vo=new WeakMap,su=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(vo.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return ys(i,e),vo.set(i,r),i};su.callCount=e=>{if(!vo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return vo.get(e)};au=su});var Zt,cu=T(()=>{"use strict";Zt=[];Zt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Zt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Zt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var ko,bs,ws,Ew,Ds,xo,_w,vs,ks,xs,uu,US,zS,du=T(()=>{"use strict";cu();ko=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",bs=Symbol.for("signal-exit emitter"),ws=globalThis,Ew=Object.defineProperty.bind(Object),Ds=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ws[bs])return ws[bs];Ew(ws,bs,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}},xo=class{},_w=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),vs=class extends xo{onExit(){return()=>{}}load(){}unload(){}},ks=class extends xo{#s=xs.platform==="win32"?"SIGINT":"SIGHUP";#n=new Ds;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of Zt)this.#t[n]=()=>{let r=this.#e.listeners(n),{count:o}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,a)}};this.#p=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!ko(this.#e))return()=>{};this.#i===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,t),()=>{this.#n.removeListener(r,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of Zt)try{let n=this.#t[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#f(t,...n),this.#e.reallyExit=t=>this.#r(t)}}unload(){this.#i&&(this.#i=!1,Zt.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#p,this.#n.count-=1)}#r(t){return ko(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#p.call(this.#e,this.#e.exitCode)):0}#f(t,...n){let r=this.#o;if(t==="exit"&&ko(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let o=r.call(this.#e,t,...n);return this.#n.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}},xs=globalThis.process,{onExit:uu,load:US,unload:zS}=_w(ko(xs)?new ks(xs):new vs)});var xr,pu,Sw,fu,mu=T(()=>{"use strict";xr=w(require("process"),1);lu();du();pu=xr.default.stderr.isTTY?xr.default.stderr:xr.default.stdout.isTTY?xr.default.stdout:void 0,Sw=pu?au(()=>{uu(()=>{pu.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},fu=Sw});var Cs,Co,On,Fs,hu=T(()=>{"use strict";Cs=w(require("process"),1);mu();Co=!1,On={};On.show=(e=Cs.default.stderr)=>{e.isTTY&&(Co=!1,e.write("\x1B[?25h"))};On.hide=(e=Cs.default.stderr)=>{e.isTTY&&(fu(),Co=!0,e.write("\x1B[?25l"))};On.toggle=(e,t)=>{e!==void 0&&(Co=e),Co?On.show(t):On.hide(t)};Fs=On});var gu=ps((ZS,Tw)=>{Tw.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var Es=ps((KS,bu)=>{"use strict";var Fo=Object.assign({},gu()),yu=Object.keys(Fo);Object.defineProperty(Fo,"random",{get(){let e=Math.floor(Math.random()*yu.length),t=yu[e];return Fo[t]}});bu.exports=Fo});function _s(){return $e.default.platform!=="win32"?$e.default.env.TERM!=="linux":!!$e.default.env.CI||!!$e.default.env.WT_SESSION||!!$e.default.env.TERMINUS_SUBLIME||$e.default.env.ConEmuTask==="{cmd::Cmder}"||$e.default.env.TERM_PROGRAM==="Terminus-Sublime"||$e.default.env.TERM_PROGRAM==="vscode"||$e.default.env.TERM==="xterm-256color"||$e.default.env.TERM==="alacritty"||$e.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var $e,wu=T(()=>{"use strict";$e=w(require("process"),1)});var Aw,Ow,Pw,Cr,Du=T(()=>{"use strict";Fe();wu();Aw={info:k.blue("\u2139"),success:k.green("\u2714"),warning:k.yellow("\u26A0"),error:k.red("\u2716")},Ow={info:k.blue("i"),success:k.green("\u221A"),warning:k.yellow("\u203C"),error:k.red("\xD7")},Pw=_s()?Aw:Ow,Cr=Pw});function Ss({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var vu=T(()=>{"use strict"});function Fr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Iw,"")}var Iw,Ts=T(()=>{"use strict";vu();Iw=Ss()});function ku(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function xu(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Cu(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 Fu=T(()=>{"use strict"});function Rw(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Eu(e,{ambiguousAsWide:t=!1}={}){return Rw(e),xu(e)||Cu(e)||t&&ku(e)?2:1}var _u=T(()=>{"use strict";Fu()});var Su,Tu=T(()=>{"use strict";Su=()=>/[#*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 As(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Fr(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of $w.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!jw.test(s)){if(Su().test(s)){o+=2;continue}o+=Eu(a,i)}}return o}var $w,jw,Au=T(()=>{"use strict";Ts();_u();Tu();$w=new Intl.Segmenter,jw=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function Os({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Ou=T(()=>{"use strict"});function Is(){let{env:e}=Ps.default,{TERM:t,TERM_PROGRAM:n}=e;return Ps.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ps,Pu=T(()=>{"use strict";Ps=w(require("process"),1)});var qe,Bw,Rs,Nw,$s,Iu=T(()=>{"use strict";qe=w(require("process"),1),Bw=3,Rs=class{#s=0;start(){this.#s++,this.#s===1&&this.#n()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#n(){qe.default.platform==="win32"||!qe.default.stdin.isTTY||(qe.default.stdin.setRawMode(!0),qe.default.stdin.on("data",this.#o),qe.default.stdin.resume())}#e(){qe.default.stdin.isTTY&&(qe.default.stdin.off("data",this.#o),qe.default.stdin.pause(),qe.default.stdin.setRawMode(!1))}#o(t){t[0]===Bw&&qe.default.emit("SIGINT")}},Nw=new Rs,$s=Nw});function Pn(e){return new js(e)}var Er,_r,Lw,js,Bs=T(()=>{"use strict";Er=w(require("process"),1);Fe();hu();_r=w(Es(),1);Du();Ts();Au();Ou();Pu();Iu();Lw=w(Es(),1),js=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#h;#c;#u;#d;#g;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:Er.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Os({stream:this.#r}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Er.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(n){this.#s=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!Is())this.#i=_r.default.line;else if(t===void 0)this.#i=_r.default.dots;else if(t!=="default"&&_r.default[t])this.#i=_r.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#b(t=this.#l,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#m(){let t=this.#r.columns??80,n=this.#y(this.#a,"-"),r=this.#b(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#g+"--"+r;this.#e=0;for(let i of Fr(o).split(`
|
|
8
|
+
`))this.#e+=Math.max(1,Math.ceil(As(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#c&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=t}get isSilent(){return this.#u}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#u=t}frame(){let t=Date.now();(this.#o===-1||t-this.#p>=this.interval)&&(this.#o=++this.#o%this.#i.frames.length,this.#p=t);let{frames:n}=this.#i,r=n[this.#o];this.color&&(r=k[this.color](r));let o=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return o+r+i+s}clear(){if(!this.#c||!this.#r.isTTY)return this;this.#r.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#r.moveCursor(0,-1),this.#r.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#r.cursorTo(this.#d),this.lastIndent=this.#d,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#r.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&Fs.hide(this.#r),this.#t.discardStdin&&Er.default.stdin.isTTY&&(this.#n=!0,$s.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#r.write(`- ${this.text}
|
|
9
|
+
`),this)}stop(){return this.#c?(clearInterval(this.#f),this.#f=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&Fs.show(this.#r),this.#t.discardStdin&&Er.default.stdin.isTTY&&this.#n&&($s.stop(),this.#n=!1),this):this}succeed(t){return this.stopAndPersist({symbol:Cr.success,text:t})}fail(t){return this.stopAndPersist({symbol:Cr.error,text:t})}warn(t){return this.stopAndPersist({symbol:Cr.warning,text:t})}info(t){return this.stopAndPersist({symbol:Cr.info,text:t})}stopAndPersist(t={}){if(this.#u)return this;let n=t.prefixText??this.#a,r=this.#y(n," "),o=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(o?" ":"")+i:"",l=t.suffixText??this.#l,c=this.#b(l," "),u=r+o+a+c+`
|
|
10
|
+
`;return this.stop(),this.#r.write(u),this}}});function Ms(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),Eo.default.platform==="darwin"?Mw(e):Eo.default.platform==="win32"?Uw(e):zw(e)}var ce,Ns,Eo,Ft,Ls,In,Mw,Uw,zw,Ru=T(()=>{"use strict";ce=w(require("path"),1),Ns=w(require("os"),1),Eo=w(require("process"),1),Ft=Ns.default.homedir(),Ls=Ns.default.tmpdir(),{env:In}=Eo.default,Mw=e=>{let t=ce.default.join(Ft,"Library");return{data:ce.default.join(t,"Application Support",e),config:ce.default.join(t,"Preferences",e),cache:ce.default.join(t,"Caches",e),log:ce.default.join(t,"Logs",e),temp:ce.default.join(Ls,e)}},Uw=e=>{let t=In.APPDATA||ce.default.join(Ft,"AppData","Roaming"),n=In.LOCALAPPDATA||ce.default.join(Ft,"AppData","Local");return{data:ce.default.join(n,e,"Data"),config:ce.default.join(t,e,"Config"),cache:ce.default.join(n,e,"Cache"),log:ce.default.join(n,e,"Log"),temp:ce.default.join(Ls,e)}},zw=e=>{let t=ce.default.basename(Ft);return{data:ce.default.join(In.XDG_DATA_HOME||ce.default.join(Ft,".local","share"),e),config:ce.default.join(In.XDG_CONFIG_HOME||ce.default.join(Ft,".config"),e),cache:ce.default.join(In.XDG_CACHE_HOME||ce.default.join(Ft,".cache"),e),log:ce.default.join(In.XDG_STATE_HOME||ce.default.join(Ft,".local","state"),e),temp:ce.default.join(Ls,t,e)}}});function _o(){return/[<>:"/\\|?*\u0000-\u001F]/g}function $u(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var ju=T(()=>{"use strict"});function Sr(e,t={}){let n=/[\u0000-\u001F\u0080-\u009F]/g,r=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(_o().test(o)&&n.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(r,"$1")),e=e.normalize("NFD"),e=e.replace(Vw,o),e=e.replace(_o(),o),e=e.replace(n,o),e=e.replace(Gw,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=$u().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Ww;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),l=e.slice(s);e=a.slice(0,Math.max(1,i-l.length))+l}}return e}var Ww,Vw,Gw,Us=T(()=>{"use strict";ju();Ww=100,Vw=/^\.+(\\|\/)|^\.+$/,Gw=/\.+$/});var qw,Bu=T(()=>{"use strict";qw=w(require("path"),1);Us()});var Nu=T(()=>{"use strict";Us();Bu()});var So,zs=T(()=>{"use strict";So="webflow.json"});var Kt,Ws=T(()=>{"use strict";Kt=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function Mu(e){Vs=e}function ie(){return Vs}function Et(){return!Vs}function Uu(e){Lu=e}function zu(){return Lu}var Vs,Lu,Oe=T(()=>{"use strict";Vs=!1});function Yt(){let e=zu();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,Wu.statSync)(e)?.isDirectory())return{path:(0,Vu.join)(e,So),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${So}`,isUserDefined:!1}}var Wu,Vu,Gs=T(()=>{"use strict";Wu=require("fs"),Vu=require("path");zs();Oe()});var Gu,Jw,Hw,qs,qu=T(()=>{"use strict";Gu=w(require("ajv")),Jw=new Gu.default,Hw={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},qs=Jw.compile(Hw)});function Ju(e){return e instanceof Error?e:new Error("Unknown error")}function X(){let{path:e}=Yt();if(!(0,To.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,To.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${Ju(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let r;try{r=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${Ju(o).message}`)}if(!qs(r)){let o=qs.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var To,Ao=T(()=>{"use strict";To=require("fs");Gs();qu()});function Tr(e,t){let n=e[t];if(!n)throw new Kt(t);return n}var Hu=T(()=>{"use strict";Ws()});function fe(e){let t=X(),n=t.manifest,r=t.manifestPath,o={...n};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let l=o[s];o[s]={...typeof l=="object"&&l!==null?l:{},...a}}}return(0,Zu.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var Zu,Js=T(()=>{"use strict";Zu=require("fs");Ao()});var we=T(()=>{"use strict";zs();Ws();Ao();Gs();Hu();Js()});var Oo=ps((nT,Zw)=>{Zw.exports={name:"@webflow/webflow-cli",version:"1.20.2",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2","css-tree":"^2.3.1",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0",jsdom:"^26.0.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",prettier:"^2.7.1",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.2.2",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/css-tree":"^2.3.1","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/prettier":"^2.7.1","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function dt(){try{return Oo().version}catch{return"unknown"}}function et(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let n=Ar.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=Ar.default.userInfo().username;if(r){let o=new RegExp(`/Users/${r}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function Hs(e){if(e.stack)return et(e.stack)}function _t(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],n={};for(let[r,o]of Object.entries(e)){let i=r.toLowerCase();t.some(s=>i.includes(s))?n[r]="[REDACTED]":typeof o=="string"?n[r]=et(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=_t(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?_t(s):typeof s=="string"?et(s):s):n[r]=o}return n}function Ku(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${Ar.default.type()} ${Ar.default.release()}`}}function Zs(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var Ar,Or=T(()=>{"use strict";Ar=w(require("os"))});var Y,U,pt,Rn,Ks,$n,ke=T(()=>{"use strict";Fe();Y=k.green("\u2714"),U=k.red("\u2716"),pt=k.cyan("\u2139"),Rn=k.green("\u279C"),Ks=k.red("\u279C"),$n=k.yellow("\u26A0")});var St,Ys=T(()=>{"use strict";Fe();we();Or();G();ke();St=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await X(),n=t?.telemetry?.global?.allowTelemetry;return this.cache=n,n}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(d.info(`${pt} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(d.info(`${pt} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),d.info(`${pt} To opt out, run: ${k.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let n={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:dt()}}};await fe(n),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,n){this.cache=n}}});async function K(e,t){let r={"User-Agent":`webflow-cli@${dt()}`};return(0,Yu.default)(e,{...t,headers:{...t?.headers,...r}})}var Yu,ft=T(()=>{"use strict";Yu=w(require("node-fetch"));je()});var Xu,Qu=T(()=>{"use strict";Xu=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Xs,R,Po,jn,Pr,Qs,Ir,Rr,Bn,de=T(()=>{"use strict";Qu();Xs=(e,t)=>(Xu(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),R=process.env.WEBFLOW_API_HOST?Xs("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",Po=process.env.WEBFLOW_CDN_API_HOST?Xs("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",jn=process.env.WEBFLOW_HOST?Xs("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Pr="wf-manifest.json",Qs="mf-manifest.json",Ir="@webflow_renderer",Rr="ssr-bundle.tar",Bn="index.js"});var J,ea=T(()=>{"use strict";Ys();Or();G();ft();de();J=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=St.getInstance(),this.sessionId=Zs(),this.platformInfo=Ku()}async sendEvent(t){try{if(!await this.isEnabled())return;let n=this.enrichEvent(t),r=this.sanitizeEvent(n);await this.transmitEvent(r)}catch(n){d.debug(`Failed to send telemetry event: ${n}`)}}async sendError(t,n,r){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:Hs(t),context:n,metadata:r?_t(r):void 0})}async sendUsage(t,n){let{duration:r,...o}=n??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof r=="number"?r:void 0,data:Object.keys(o).length>0?_t(o):void 0})}async sendPerformance(t,n,r){await this.sendEvent({eventType:"performance",operation:t,duration:n,metrics:r})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let n=St.getInstance(),r=await n.getPreference();return r!==void 0?r:await n.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:dt(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let n=JSON.parse(JSON.stringify(t));return n.message&&(n.message=et(n.message)),n.stack&&(n.stack=et(n.stack)),n.context&&(n.context=et(n.context)),n.metadata&&(n.metadata=_t(n.metadata)),n.data&&(n.data=_t(n.data)),n}async transmitEvent(t){let n=this.getEndpoint(),r=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(r){console.log(`\u{1F4CA} [Telemetry] Sending to: ${n}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await K(n,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)r&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw r&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:n}=this.config;return`${t}/webflow-cli/${n}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||R,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||R,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}static forSites(t){return new e({host:t.host||R,authToken:t.authToken,commandType:"sites"})}}});var ed=T(()=>{"use strict"});function td(e){return async(t,n,r)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await n(),a=Date.now()-o,l=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:l-i,...r}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...r}),s}}}var je=T(()=>{"use strict";ea();Ys();ed();Or();Or()});var na,ta,Kw,mt,ra=T(()=>{"use strict";na=Symbol("webflow-cli-warn"),ta=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
|
|
11
|
+
`);for(let r=2;r<n.length;r++){let o=n[r],i=o.match(/at .+? \((.+?):\d+:\d+\)/)||o.match(/at (.+?):\d+:\d+/);if(i){let s=i[1];if(s.includes("node_modules")){let a=s.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)/);return a?`External: ${a[1]}`:"External Dependencies"}else if(s.includes("webflow-cli"))return s.includes("/metadata/")?"Metadata Collection":s.includes("/bundler/")?"Bundling":s.includes("/commands/")?"CLI Commands":"Webflow CLI"}}return"General"}start(){this.isActive||(this.warnings=[],this.originalConsoleWarn=console.warn,this.isActive=!0,console.warn=(...t)=>{if(t.length>1&&t[t.length-1]===na){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let n=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),r=new Error().stack||"",o=this.parseSource(r);this.warnings.push({message:n,timestamp:Date.now(),source:o,stackTrace:r})})}stop(){this.isActive&&(this.originalConsoleWarn&&(console.warn=this.originalConsoleWarn,this.originalConsoleWarn=null),this.isActive=!1)}displayGrouped(){if(this.warnings.length===0)return;console.log(`
|
|
12
12
|
\u26A0\uFE0F Warnings:
|
|
13
13
|
`);let t=this.warnings.reduce((n,r)=>{let o=r.source||"General";return n[o]||(n[o]=[]),n[o].push(r),n},{});Object.entries(t).forEach(([n,r])=>{n!=="General"&&console.log(` ${n}:`),r.forEach((o,i)=>{let s=n!=="General"?" ":" ",a=o.message||"[Empty warning message]";console.log(`${s}${i+1}. ${a}`)}),n!=="General"&&console.log("")}),t.General&&console.log("")}debug(){console.log(`
|
|
14
14
|
\u{1F41B} Debug: Captured Warnings
|
|
15
15
|
`),this.warnings.forEach((t,n)=>{console.log(`Warning ${n+1}:`),console.log(` Source: ${t.source}`),console.log(` Message: ${t.message}`),console.log(` Message length: ${t.message.length}`),console.log(` Timestamp: ${new Date(t.timestamp).toISOString()}`),t.stackTrace&&(console.log(" Stack (first 3 lines):"),t.stackTrace.split(`
|
|
16
|
-
`).slice(0,3).forEach(r=>{console.log(` ${r}`)})),console.log("")})}},
|
|
17
|
-
`)),
|
|
18
|
-
${
|
|
19
|
-
${
|
|
16
|
+
`).slice(0,3).forEach(r=>{console.log(` ${r}`)})),console.log("")})}},Kw=new ta,mt=Kw});function Yw(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function nd(e,t){if(!e)return t;let n=parseInt(e,10);return isNaN(n)||n<=0?t:n}function Tt(e){$r.push(et(e)),$r.length>eD&&$r.shift()}function rd(e){ia=e}function nD(e){return Tt(`DEBUG: ${e}`),e}function rD(e){return Tt(`INFO: ${e}`),e}function oD(e){return Tt(`WARN: ${e}`),e}function iD(e,t){let n=e instanceof Error?e.stack||e.message:e,r=t?.prefix?`${t.prefix} `:"";Tt(`ERROR: ${r}${n}`),sa=!0;let o=e instanceof Error?e.message:e;return`${r}${o}`}function sD(e){return Tt(`SUCCESS: ${e}`),`${k.green(e)}`}function aD(e){let t=Pn(`${e}...`).start(),n=!1,r=o=>i=>{Tt(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(sa=!0),!n&&(n=!0,t[o](i||e))};return{succeed:r("succeed"),fail:r("fail"),warn:r("warn"),info:r("info")}}function lD(){let e=Nn.default.readdirSync(Pe).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:Nn.default.statSync(Io.default.join(Pe,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);for(;e.length>=Qw;)try{let t=e.pop();if(!t)break;Nn.default.removeSync(Io.default.join(Pe,t.name))}catch{}}function aa(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;Nn.default.ensureDirSync(Pe),lD(),$r.unshift(`CLI Version: ${dt()}`,`Node Version: ${process.version}`,`Platform: ${process.platform}`,`Architecture: ${process.arch}`,`Command: ${t||"N/A"}`,`Exit Code: ${e??0}`,`Memory Usage: ${Math.round(process.memoryUsage().heapUsed/1024/1024)}MB`,`Timestamp: ${new Date().toISOString()}`,...ia?[`Sync ID: ${ia}`]:[],"");let n=$r.map(Yw);Nn.default.writeFileSync(oa,n.join(`
|
|
17
|
+
`)),sa&&(console.info(`
|
|
18
|
+
${U} An error occurred. See logs for more information:`),console.info(`${Ks} Latest log: ${oa}`),console.info(`${Ks} All logs: ${Pe}`)),(process.env.DEBUG||process.argv.includes("--verbose"))&&(console.info(`
|
|
19
|
+
${Y} Command completed successfully. Logs written to:`),console.info(`${Rn} Latest log: ${oa}`),console.info(`${Rn} All logs: ${Pe}`))}catch(t){console.error("Failed to write logs:",t)}}var Nn,Io,IT,Xw,Pe,Qw,eD,tD,oa,$r,sa,ia,Ln,d,G=T(()=>{"use strict";Nn=w(require("fs-extra")),Io=w(require("path"));Fe();IT=require("source-map-support/register");Bs();Ru();Nu();je();ra();ke();Xw=Ms("webflow-cli"),Pe=Xw.log;Qw=nd(process.env.MAX_PERSISTED_LOGS,50),eD=nd(process.env.MAX_IN_MEMORY_LOGS,1e3),tD=`${Sr(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,oa=Io.default.join(Pe,tD);$r=[],sa=!1;Ln=!1;process.on("uncaughtException",e=>{Ln||(Ln=!0,Tt(`UNCAUGHT EXCEPTION: ${e?.stack}`),aa(1)),mt.displayGrouped(),mt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{Ln||(Ln=!0,Tt(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),aa(1)),mt.displayGrouped(),mt.stop(),process.exit(1)});process.on("exit",e=>{Ln||(Ln=!0,aa(e))});d={debug:e=>{let t=nD(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(rD(e)),warn:e=>console.warn(oD(e),na),error:(e,t)=>{console.error(iD(e,t))},success:e=>console.log(sD(e)),spinner:aD}});async function jr(e){try{return await e()}catch(t){throw t instanceof Error&&uD.test(t.message)&&(d.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function xe(e){return ie()?e.default??!1:jr(()=>tt.confirm(e))}async function At(e){return ie()?"default"in e?e.default:null:jr(()=>tt.select(e))}async function Ce(e){return ie()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:jr(()=>tt.input(e))}async function $o(e){if(ie()){let t=[];return await e.validate?.(t)!==!0?null:t}return jr(()=>tt.checkbox(e))}async function jo(e){return ie()?"default"in e?e.default:null:jr(()=>tt.search(e))}var tt,uD,Je=T(()=>{"use strict";tt=w(require("@inquirer/prompts"));Oe();G();uD=/SIGINT/i});function Bo({apiToken:e,directory:t}){let n=Nr.resolve(t?Nr.join(t,".env"):Nr.join(process.cwd(),".env"));t&&!tn.existsSync(t)&&tn.mkdirSync(t,{recursive:!0}),tn.existsSync(n)||tn.writeFileSync(n,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),da.default.config({path:n,quiet:!0}),e&&da.default.set("WEBFLOW_API_TOKEN",e,{path:n,encrypt:!1})}var tn,Nr,da,dd=T(()=>{"use strict";tn=w(require("fs")),Nr=w(require("path")),da=w(require("@dotenvx/dotenvx"))});var h,oe=T(()=>{"use strict";h=class e extends Error{prefix;skipLogging;isUserError;constructor(t,n){let r=t instanceof Error?t.message:String(t);super(r),this.name="CLIError",this.prefix=n?.prefix,this.skipLogging=n?.skipLogging??!1,this.isUserError=n?.isUserError??(t instanceof e?t.isUserError:!1),t instanceof Error?(this.cause=t,this.stack=t.stack):Error.captureStackTrace&&Error.captureStackTrace(this,e)}}});function It(){let e=mD();return nn.default.join(e,fD)}function mD(){if(process.platform==="win32"){let n=process.env.APPDATA??nn.default.join(pa.default.homedir(),"AppData","Roaming");return nn.default.join(n,"webflow")}let t=process.env.XDG_CONFIG_HOME??nn.default.join(pa.default.homedir(),".config");return nn.default.join(t,"webflow")}function Lr(){let e=It();try{if(!Pt.default.existsSync(e))return null;let t=Pt.default.readFileSync(e,"utf8");return JSON.parse(t)}catch{return null}}function fa(e){let t=It(),n=nn.default.dirname(t);Pt.default.existsSync(n)||Pt.default.mkdirSync(n,{recursive:!0,mode:448}),Pt.default.writeFileSync(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384})}function ma(){let e=It();try{Pt.default.existsSync(e)&&Pt.default.unlinkSync(e)}catch{}}var Pt,pa,nn,fD,ha=T(()=>{"use strict";Pt=w(require("fs")),pa=w(require("os")),nn=w(require("path")),fD="auth.json"});var Mr,ga=T(()=>{"use strict";de();Mr={serverUrl:jn,timeoutMs:5*60*1e3}});var pd,fd,md,hd,hD,gd,gD,yd,bd=T(()=>{"use strict";pd=require("crypto"),fd=w(require("open"));ga();G();ft();md=e=>{let t=new Uint8Array(e);return pd.webcrypto.getRandomValues(t),Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")},hd=({pollId:e,clientId:t,scope:n})=>`${Mr.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(n.join(" "))}`,hD=e=>`${Mr.serverUrl}/oauth/webflow/poll?pollId=${e}`,gd=async e=>{let t=d.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(n=>setTimeout(n,3e3)),await(0,fd.default)(e),t.succeed()}catch{t.fail(),d.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},gD=async e=>{let t=hD(e),n=await K(t);if(!n.ok){let r=`Failed to poll for authentication status (${n.status})`;try{let o=await n.json();o&&o.error&&(r+=`: ${o.error}`)}catch{}throw new Error(r)}return n.json()},yd=(e,t)=>{let n=d.spinner("Waiting for authentication");return new Promise((r,o)=>{let i=setTimeout(()=>{clearTimeout(i),clearInterval(s),o(new Error("Authentication timed out. Please try again."))},t),s=setInterval(async()=>{try{let a=await gD(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),n.succeed("Authentication successful! You can close the browser window."),r(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function Ur(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=Lr();if(e?.accessToken)return e.accessToken;let t=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return t&&!wd&&(wd=!0,d.warn(`${$n} WEBFLOW_SITE_API_TOKEN / WEBFLOW_WORKSPACE_API_TOKEN are deprecated. Please use WEBFLOW_API_TOKEN instead. Run 'webflow auth login --force' to update your .env file.`)),t}async function te(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let r=Ur();if(r)return r}if(ie())throw new h(`No API token found. To authenticate in CI/CD environments:
|
|
20
20
|
1. Generate a Workspace API token in your Webflow Dashboard > Apps & Integrations > Manage > Workspace API Token
|
|
21
|
-
2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=
|
|
22
|
-
`})}}async function
|
|
21
|
+
2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=md(16),n=yD();try{let r=hd({pollId:t,clientId:n,scope:ya});await gd(r);let o=await yd(t,Mr.timeoutMs);return fa({accessToken:o,scopes:ya,createdAt:new Date().toISOString()}),d.info(`${Y} Credentials saved: ${It()}`),o}catch(r){throw new h(r)}}function yD(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var ya,wd,ba=T(()=>{"use strict";Oe();G();ke();oe();ha();ga();bd();ya=["assets:read","assets:write","authorized_user:read","cloud_apps:write","cms:read","cms:write","code_components:read","code_components:write","devlink_export:read","sites:read","sites:write","workspace:read"],wd=!1});function zr(e){let t=e.siteId??process.env.WEBFLOW_SITE_ID??null;return t&&!e.siteId&&(fe({siteId:t}),e.siteId=t),t}async function wa(e){try{let n=await new Dd.WebflowClient({accessToken:e,environment:{base:`${R}/v2`,dataApi:`${R}/v2`,contentDeliveryApi:`${Po}/v2`}}).sites.list();if(!n||typeof n!="object"||!n.sites||!Array.isArray(n.sites))throw new h("Invalid response from Webflow API");let r=n.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return r.sort((o,i)=>o.displayName.localeCompare(i.displayName)),r}catch(t){throw new h(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
|
|
22
|
+
`})}}async function Da(e){let t=e.map(r=>({name:`${r.displayName} (${r.shortName})`,value:r})),n=await jo({message:"Search for a Webflow site:",source:r=>{if(!r)return t;let o=r.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!n){if(e.length===0)throw new h("No sites available for selection");return d.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return n}var Dd,No=T(()=>{"use strict";Dd=require("webflow-api");Je();G();we();de();de();oe()});async function ye(e,t){let n=t?.site??zr(e);if(ie()&&!n)throw new h(`No site ID configured for this project.
|
|
23
23
|
Run 'webflow auth login' locally to authenticate and associate this project with a Webflow site,
|
|
24
|
-
or provide --site and --api-token when running a CLI command`);let r=await te({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=d.spinner("Fetching your Webflow sites"),i=await
|
|
25
|
-
${r} ${t.content}`)}}var
|
|
26
|
-
`+
|
|
24
|
+
or provide --site and --api-token when running a CLI command`);let r=await te({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=d.spinner("Fetching your Webflow sites"),i=await wa(r);if(i.length===0)throw o.fail("No Webflow sites found in your account"),new h("Please make sure you have at least one authorized site in your Webflow account");o.succeed(`Found ${i.length} site${i.length>1?"s":""} in your account`);let s=i.length>1?await Da(i):i[0];n=s.id;let a=fe({siteId:n});return e.siteId=a.siteId,{siteId:n,siteName:s.displayName,accessToken:r}}return{siteId:n,accessToken:r}}var vd=T(()=>{"use strict";G();we();Oe();ba();No();oe()});async function va(e){let t=new kd.WebflowClient({accessToken:e,environment:{base:`${R}/v2`,dataApi:`${R}/v2`}});try{return await t.token.authorizedBy()}catch{return null}}var kd,xd=T(()=>{"use strict";kd=require("webflow-api");de()});var He=T(()=>{"use strict";dd();ba();vd();No();No();ha();xd()});function TD(e,t){if(e.includes("..")||Ze.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let n=Ze.resolve(t,e),r=Ze.resolve(t);if(!n.startsWith(r+Ze.sep)&&n!==r)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function Ko(e,t,n){let r=Ze.join(process.cwd(),t);n&&(0,$t.existsSync)(r)&&await(0,Zo.rm)(r,{recursive:!0,force:!0}),(0,$t.existsSync)(r)||await(0,Zo.mkdir)(r);for(let o of e){TD(o.path,r);let i=AD(r,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));OD(r,s)}(0,$t.writeFileSync)(i,o.content,{flag:"w+"})}}function AD(e,t){return Ze.join(e,...t.split("/"))}function OD(e,t){let n=t.split("/"),r=e;for(let o of n)r=Ze.join(r,o),(0,$t.existsSync)(r)||(0,$t.mkdirSync)(r)}var $t,Zo,Ze,Pa=T(()=>{"use strict";$t=require("fs"),Zo=require("fs/promises"),Ze=w(require("path"))});function Ci(e){for(let t of e??[]){let n=d[t.status]??d.info,r=SF[t.status]??pt;n(`
|
|
25
|
+
${r} ${t.content}`)}}var SF,Bl=T(()=>{"use strict";G();ke();SF={info:pt,warn:$n,success:Y}});function Ll(e){let{manifestPath:t}=X();return(0,Sh.writeFileSync)(t,JSON.stringify(e,null,2),"utf-8"),e}var Sh,Th=T(()=>{"use strict";Sh=require("fs");Ao()});function Fi(e,t){try{let n=Ml(),r=Ul(Object.values(e)),o=t?.force;return r&&n&&!o}catch{return!1}}var Ah,Oh,Ml,Ul,Ei=T(()=>{"use strict";Ah=require("path"),Oh=require("fs-extra");Ml=()=>{try{return(0,Oh.existsSync)((0,Ah.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},Ul=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"))});function TF(e){let{export:t,...n}=e;return t?n["devlink-export"]!=null?(Ll(n),n):(d.warn(`${$n} The 'export' key in webflow.json is deprecated. Use 'devlink-export' instead. Your configuration will be migrated automatically.`),n["devlink-export"]={...t},Ll(n),n):n}function Rh(e,t){try{new RegExp(e)}catch{throw new h(`Invalid '${t}' regex '${e}' in webflow.json. Fix the value and re-run the export.`,{isUserError:!0})}}async function jh(e){e=TF(e);let t=e["devlink-export"]||{},n=!1,r=t.rootDir;r||(ie()?r=Ph:(n=!0,r=await Ce({message:"Enter the root directory for exported components:",default:Ph,validate:u=>!u||u.trim()===""?"Root directory is required":!0})));let o=t.ts;o===void 0&&(PF()?o=!0:ie()?o=!1:(n=!0,o=await xe({message:"Use TypeScript?",default:!0})));let i=t.cssScopes;i===void 0&&(ie()?i=Ih:(n=!0,i=await xe({message:"Use DevLink style isolation (scoped wrapper + @scope)?",default:Ih}))),t.components&&Rh(t.components,"components"),t.componentGroups&&Rh(t.componentGroups,"componentGroups");let s=t.components,a=t.componentGroups;!s&&!a&&(ie()?(s=_i,a=Si):(n=!0,await xe({message:"Do you want to export all components?",default:!0})?(s=_i,a=Si):(s=await Ce({message:"Enter regex pattern to filter components (e.g., 'Button|Card' for specific):",default:_i,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}}),a=await Ce({message:"Enter regex pattern to filter component groups (e.g., 'mygroup'):",default:Si,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}})))),s=s||_i,a=a||Si;let l=t.relativeHrefRoot;l===void 0&&(l=AF);let c={...t,rootDir:r,components:s,componentGroups:a,ts:o,cssScopes:i,relativeHrefRoot:l};return(!t.rootDir||t.ts===void 0||t.cssScopes===void 0||!t.components||!t.componentGroups||t.relativeHrefRoot===void 0)&&OF(c),{config:c,wasPrompted:n}}function OF(e){fe({"devlink-export":{...e}})}function PF(){try{let e=process.cwd();if(Ml())return!0;let t=["src","app","pages","components"];for(let n of t){let r=$h.join(e,n);if(Ti.existsSync(r)&&Ul(Ti.readdirSync(r)))return!0}}catch{}return!1}var Ti,$h,Ph,_i,Si,Ih,AF,Bh=T(()=>{"use strict";Ti=w(require("fs")),$h=w(require("path"));Je();Oe();G();ke();oe();Js();Th();Ei();Ph="./webflow",_i=".*",Si=".*",Ih=!0,AF="/"});async function Mh(e){if(e.ok)return;let t=await e.text().catch(()=>"");d.debug(`Server error response (HTTP ${e.status}): ${t||"<empty>"}`);let n;try{n=JSON.parse(t).message}catch{}throw new no(n||`Request failed (HTTP ${e.status}).`)}async function Wl(e,t,n,r){let o=await IF(n,r,t,e);if(!o.files||!Array.isArray(o.files))throw new h("Invalid response format from V2 API: expected 'files' array");return{files:o.files,messages:o.messages,metadata:o.metadata}}async function IF(e,t,n,r){let{taskId:o,polling:i}=await RF(e,t,n,r);return $F(e,t,n,o,i)}async function RF(e,t,n,r){let o=await(0,zl.default)(`${R}/v2/devlink/${e}/export`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json",[Lh]:t},body:JSON.stringify(r),timeout:6e4});return o.ok||await Mh(o),await o.json()}async function $F(e,t,n,r,o){let{initialDelayMs:i,maxBackoffMs:s,backoffMultiplier:a,timeoutMs:l}=o,c=Date.now()+l,u=i;do{let p=await(0,zl.default)(`${R}/v2/devlink/${e}/export/${r}`,{headers:{Authorization:`Bearer ${n}`,[Lh]:t},timeout:6e4});p.ok||await Mh(p);let f=await p.json();if(f.status==="finished")return f.result;if(f.status==="failed")throw new no("The export task failed. Please try again or report a bug.");await(0,Nh.setTimeout)(u),u=Math.min(u*a,s)}while(Date.now()<c);throw new no(`Export task timed out after ${l}ms. Please try again.`)}var zl,Nh,Lh,no,Uh=T(()=>{"use strict";zl=w(require("node-fetch")),Nh=require("timers/promises");G();de();oe();Lh="X-WF-Sync-Id",no=class extends Error{}});var zh,Wh=T(()=>{"use strict";Je();G();zh=async(e,t)=>{if(!t)return;await xe({message:`Ready to export components to ${e.rootDir}?`,default:!0})||(d.info("Export cancelled."),process.exit(0))}});function Vh(e,t,n){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:n||`${t}s`;return`${e} ${i}`}var Gh=T(()=>{"use strict"});async function Ai(e){let t=Date.now(),n;try{let{manifest:r}=X(),{siteId:o,accessToken:i}=await ye(r,e),s=(0,qh.randomUUID)();rd(s);let{config:a,wasPrompted:l}=await jh(r);d.info(`${Y} Export configuration loaded!`),await zh(a,l);let c=J.forExport({authToken:i,siteId:o});n=d.spinner("Exporting components"),await c.sendUsage("devlink_export_start",{cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot});try{let{files:u,messages:p,metadata:f}=await Wl(a,i,o,s),m=(!a.components||a.components===".*")&&(!a.componentGroups||a.componentGroups===".*");await Ko(u,a.rootDir,m),n.succeed(`${Vh(f.componentCount,"component")} exported to ${a.rootDir}`),Ci(p);let y=Date.now()-t;await c.sendUsage("devlink_export_success",{duration:y,cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let p=u instanceof Error?u.message:String(u);throw n.fail(`Components export failed: ${p}`),await c.sendError(u instanceof Error?u:new Error(String(u)),"devlink_export_failure",{cssScopes:a.cssScopes,ts:a.ts}),u}}catch(r){let o="Export failed: "+(r instanceof Error?r.message:r);throw n?n.fail(o):d.error(o,{prefix:`
|
|
26
|
+
`+U}),new h(r,{skipLogging:!0})}}var qh,Jh=T(()=>{"use strict";qh=require("crypto");Bh();Uh();Wh();je();He();we();Gh();G();oe();Pa();ke();Bl()});var Hh={};Vc(Hh,{exportComponents:()=>Ai});var Vl=T(()=>{"use strict";Jh()});var Yb=require("commander");G();var od=require("child_process"),id=require("fs"),la=w(require("semver"));G();var ca="@webflow/webflow-cli",Xt="@webflow/data-types",Ro="@webflow/react",cD=[ca,Xt,Ro],Qt=class{getInstalledDependencies(){try{let t=(0,od.execSync)(`npm ls ${cD.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),n=JSON.parse(t);return n.dependencies?Object.entries(n.dependencies).reduce((r,[o,{version:i}])=>(r[o]=i,r),{}):{}}catch(t){return d.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let n=JSON.parse((0,id.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...n.dependencies,...n.devDependencies}}checkCLIAndDataTypes(t){let n=t[Xt];if(!n)return;let o=this.getRequiredDependencies(ca)[Xt];if(!la.default.satisfies(n,o))throw new Error(`Version mismatch: ${ca} requires ${Xt} v${o} but found v${n}`)}checkReactAndDataTypes(t){let n=t[Xt],r=t[Ro];if(!(!n||!r)&&!la.default.eq(n,r))throw new Error(`Version mismatch: ${Ro} and ${Xt} must be on the same version. Found ${Ro}@${r} and ${Xt}@${n}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var cd=require("fs-extra");Je();var ud=require("@dotenvx/dotenvx"),en=w(require("semver"));G();var sd=require("child_process"),ad=require("util"),dD=(0,ad.promisify)(sd.exec);async function Ot(e,t){try{let{stdout:n,stderr:r}=await dD(e,t);return{stdout:n.toString().trim(),stderr:r.toString().trim(),code:0}}catch(n){let r=n;return{stdout:r.stdout??"",stderr:r.stderr??String(r.message??""),code:r.code??1}}}Oe();var ua=w(Oo());(0,ud.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var ld={npm:{updateCommand:"npm install",update:async e=>await Ot(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await Ot(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await Ot(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await Ot(`pnpm outdated --json ${e}`);return JSON.parse(t)},lockFile:"pnpm-lock.yaml",globalFlag:"--global",supported:!0},yarn:{lockFile:"yarn.lock",globalFlag:"",updateCommand:"",getOutdated:async()=>({}),update:async()=>({stdout:"",stderr:"",code:0}),supported:!1}},pD=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],Br=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries(ld))if((0,cd.existsSync)(t.lockFile))return t;return ld.npm}async listOutdatedPackages(t="local",n=pD){let{getOutdated:r,globalFlag:o}=this.packageManager,i=await r(`${t==="global"?o:""} ${n?.join(" ")}`);return Object.fromEntries(Object.entries(i).map(([s,a])=>Array.isArray(a)?[s,{current:a[0].current,latest:a[0].latest,installationType:t}]:[s,{current:a.current,latest:a.latest,installationType:t}]))}async getOutdatedPackages(){let t=await this.listOutdatedPackages();if(t["@webflow/webflow-cli"])return t;let n=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...n}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let r=await $o({message:"New versions of the following @webflow packages are available. Would you like to update?",choices:Object.entries(t).map(([o,{current:i,latest:s}])=>({name:`${o} (${i} \u2192 ${s})`,value:o}))});return r??[]}else{let[[r,{current:o,latest:i}]]=Object.entries(t);return await xe({message:`A new version of ${r} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[r]:[]}}showUpdateSuggestions(t){let n=Object.keys(t).length>1,{updateCommand:r,globalFlag:o}=this.packageManager;if(n){console.log(`
|
|
27
27
|
New versions of the following @webflow packages are available:`),Object.entries(t).forEach(([a,{current:l,latest:c}])=>{console.log(` ${a} (${l} \u2192 ${c})`)});let i=Object.entries(t).filter(([,{installationType:a}])=>a==="local").map(([a])=>`${a}@latest`),s=Object.entries(t).filter(([,{installationType:a}])=>a==="global").map(([a])=>`${a}@latest`);console.log(`
|
|
28
28
|
To update, run:`),i.length>0&&console.log(` ${r} ${i.join(" ")}`),s.length>0&&console.log(` ${r} ${o} ${s.join(" ")}`)}else{let[[i,{current:s,latest:a,installationType:l}]]=Object.entries(t);console.log(`
|
|
29
|
-
A new version of ${i} (${s} \u2192 ${a}) is available.`);let c=l==="global"?` ${o}`:"";console.log(`To update, run: ${r}${c} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=
|
|
30
|
-
A new version of @webflow/webflow-cli@${t} is available.`);let{code:p}=await Ot("npm ls @webflow/webflow-cli --json"),m=(p===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await Ot("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await xe({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=d.spinner("Updating");let p=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${p} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ie()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=d.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:p}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${p} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}};Oe();
|
|
31
|
-
Use --force flag to reauthenticate anyway`);return}try{let o=await te({force:n.force});
|
|
32
|
-
You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new
|
|
29
|
+
A new version of ${i} (${s} \u2192 ${a}) is available.`);let c=l==="global"?` ${o}`:"";console.log(`To update, run: ${r}${c} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=en.prerelease(ua.default.version);return t&&t.length>0&&typeof t[0]=="string"?t[0]:"latest"}async promptPrerelease(t){let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let{stdout:r,code:o}=await Ot(`npm view @webflow/webflow-cli@${t} version`);if(o!==0||!r.trim()){n.succeed("Up to date");return}let i=r.trim(),s=ua.default.version;if(!en.valid(i)||!en.valid(s)){n.succeed("Up to date");return}if(!en.gt(i,s)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ie()){console.log(`
|
|
30
|
+
A new version of @webflow/webflow-cli@${t} is available.`);let{code:p}=await Ot("npm ls @webflow/webflow-cli --json"),m=(p===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await Ot("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await xe({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=d.spinner("Updating");let p=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${p} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ie()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=d.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:p}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${p} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}};Oe();ra();ea();Je();je();He();Oe();we();G();oe();ke();var Fd=e=>{let t=e.command("auth").description("Authentication and configuration commands");t.command("login").description("Authenticate with Webflow and save credentials to .env file").option("-f, --force","Force reauthentication even if credentials exist").action(async n=>{if(ie()){d.info(`${U} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:r}=X();if(!n.force&&Ur()){let i=zr(r);d.info(`${Y} Webflow credentials already exist:`),i&&d.info(` Site ID: ${i}`),d.info(" API Token: [hidden]"),d.info(`
|
|
31
|
+
Use --force flag to reauthenticate anyway`);return}try{let o=await te({force:n.force});Bo({apiToken:o}),d.info(`
|
|
32
|
+
You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new h(o,{prefix:`${U} Authentication failed:`})}}),t.command("status").description("Show current authentication status").action(async()=>{let n=Lr(),r=n?.accessToken??Ur();if(!r){d.info(`${U} Not logged in. Run 'webflow auth login' to authenticate.`),process.exitCode=1;return}try{let o=await va(r);if(!o){d.info(`${U} Token is invalid or expired. Run 'webflow auth login --force' to reauthenticate.`),process.exitCode=1;return}d.info(`${Y} Logged in as ${o.firstName} ${o.lastName} (${o.email})`),n?.scopes?.length&&d.info(` Scopes: ${n.scopes.join(", ")}`),d.info(` Session: ${It()}`)}catch(o){throw new h(o,{prefix:`${U} Failed to fetch auth status:`})}}),t.command("logout").description("Log out and remove stored credentials").action(async()=>{ma(),d.info(`${Y} Logged out. Session file removed.`),d.info(" Run 'webflow auth login' to authenticate again.")}),t.command("telemetry").description("Manage telemetry settings for all Webflow CLI commands").option("--enable","Enable telemetry for all commands").option("--disable","Disable telemetry for all commands").option("--status","Show current telemetry status").action(async n=>{let r=St.getInstance();if(n.status){let s=await r.getTelemetryStatus();d.info(Cd(s.enabled));return}if(n.enable){await r.setGlobalPreference(!0),d.info(ka(!0));return}if(n.disable){await r.setGlobalPreference(!1),d.info(ka(!1));return}let o=await r.getTelemetryStatus();if(d.info(Cd(o.enabled)),ie()){d.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await At({message:"What would you like to do?",choices:[{name:"Enable telemetry for all commands",value:"enable"},{name:"Disable telemetry for all commands",value:"disable"},{name:"Cancel",value:"cancel"}]});if(i==="enable"||i==="disable"){let s=i==="enable";await r.setGlobalPreference(s),d.info(ka(s))}})},ka=e=>`${Y} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,Cd=e=>`${pt} Telemetry status: ${e?`enabled ${Y}`:`disabled ${U}`}`;var qd=w(require("http")),Jd=w(require("node-fetch")),Hd=w(require("serve-handler")),Zd=require("fs"),Kd=w(require("path")),Yd=require("commander");var _d=w(require("archiver")),Ca=require("commander"),Uo=require("fs");var Ed=require("cosmiconfig"),xa=require("commander"),Lo=async(e,t)=>{let n=await bD(t),r=n.config.apiVersion;return r&&typeof r!="string"&&xa.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:n.filepath,config:{publicDir:e,...n.config}}},bD=async e=>{let n=await(0,Ed.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return n||xa.program.error(`No ${e} file was found. Run this command within your extension folder.`),n};var Sd=w(require("mime-types")),Mo=w(require("path")),wD=5*1024*1024,DD=new Set(["application/javascript","application/json","application/xml","image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/vnd.microsoft.icon","image/x-icon","video/webm","font/ttf","font/otf","font/woff","font/woff2","text/plain","text/markdown","text/html","text/css"]),Td=async(e,t,n)=>{let{config:r,filepath:o}=await Lo(e,t),i=Mo.join(o,".."),s=!0,a=!1,l=u=>{let p=u.name,f=Sd.default.lookup(p);return p==="index.html"&&(a=!0),p&&p.endsWith(".DS_Store")||!f?!1:DD.has(f)?u:(console.log(`Invalid file type: ${f} for file: ${p}`),s=!1,!1)},c=u=>{(0,Uo.unlink)(n,p=>{p&&console.error(`Failed to delete file: ${p}`),Ca.program.error(u)})};return console.log(`Packaging the contents of the ${r.publicDir} folder into ${n}...`),new Promise(u=>{let p=(0,_d.default)("zip",{zlib:{level:9}}),f=(0,Uo.createWriteStream)(Mo.join(i,n));f.on("close",()=>{u(void 0)}),p.directory(Mo.join(i,r.publicDir),!1,l),p.file(o,{name:t}),p.pipe(f),p.finalize(),p.on("warning",m=>{console.log(m)}),p.on("error",m=>{Ca.program.error(m.message)}),p.on("finish",()=>{if(!a){c("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){c("Bundling failed due to invalid file types");return}if(!p.pointer()||p.pointer()===0){c("Bundling failed with no output");return}if(p.pointer()>=wD){c("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${p.pointer()} total bytes written`),console.log(`Done! ${n} is ready for you to upload to your Webflow app.`)})})};var Wr=w(require("path")),nt=w(require("fs/promises")),Vo=w(require("fs")),Od=require("url"),tO=require("dotenv/config"),Pd=["js","cjs","json"],_a=process.cwd(),Id=".webflowrc",gt=Wr.extname(Vo.readdirSync(_a).find(e=>e.includes(Id))??"").replace(/\./g,""),ht=Wr.join(_a,`${Id}${gt&&`.${gt}`}`),Rd=Vo.existsSync(ht),Fa=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${Pd.join(", ")}`)}},zo=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${gt}. The supported extensions are: ${Pd.join(", ")}`)}},Wo=class extends Error{constructor(t){let n=t.includes(".webflowrc"),r=t.includes("webflow.json"),o;n?o=`It seems like you don't have a .webflowrc file in your project (${t}). Make sure there is a .webflowrc file in your project root.`:r?o=`It seems like you don't have a webflow.json file in your project (${t}). Make sure there is a webflow.json file in your project root.`:o=`It seems like you don't have a config file in your project (${t}). Make sure there is a config file in your project root.`,super(o)}},Ea=class extends Error{constructor(t){super(`The following required fields are missing or undefined in your .webflowrc file: ${t}. If you're using process.env variables, make sure they're set up correctly.`)}};async function vD(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,Od.pathToFileURL)(e).href:e)).default}function Ad(e,t){let n=t.filter(r=>!e[r]);if(n.length)throw new Ea(n.join(", "))}async function Mn(e=[],t=!1){if(!Rd){if(t)return{};throw new Wo(ht)}if(!gt)throw new Fa;switch(gt){case"js":case"cjs":{await nt.access(ht);let n=await vD(ht);return Ad(n,e),n}case"json":{let n=JSON.parse(await nt.readFile(ht,"utf8"));return Ad(n,e),n}default:throw new zo}}function kD(e,t){if(gt==="js"||gt==="cjs"){let r=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(r)return r[1]}}function xD(e,t,n){let r=kD(t,n);if(r){let o=new RegExp(`${n}: ".*?",`,"g");return e.replace(o,`${n}: process.env.${r},`)}return e}async function CD(e){let t=["authToken","host","siteId"],n=await nt.readFile(ht,"utf-8");for(let r of t)e=xD(e,n,r);return e}async function FD(){try{let e=Wr.join(_a,"package.json");return await nt.access(e),JSON.parse(await nt.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function $d(e){if(!Rd)throw new Wo(ht);let t=JSON.stringify(e,null,2);switch(gt){case"js":case"cjs":{let n=await CD(t.replace(/"([^"]+)":/g,"$1:")),r=await FD()&>==="js"?"export default ":"module.exports = ";return nt.writeFile(ht,r+n)}case"json":return nt.writeFile(ht,t);default:throw new zo}}var Rt=w(require("fs")),Be=w(require("path"));var Vr="webflow.json",jd="index.html",Bd="bundle.zip",Sa="public",Ta="extension-scaffolds",Go="default",Nd="./";var Ld="package.json",Md="wf-placeholder-name",Aa=e=>JSON.stringify(e,null,2),Ud=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
|
|
33
33
|
\u2502 `+e+` \u2502
|
|
34
|
-
\u2570`+t+"\u256F"};var zd=async(e,t=
|
|
35
|
-
`)},
|
|
34
|
+
\u2570`+t+"\u256F"};var zd=async(e,t=Nd,n=Go,r)=>{let o=r[n];try{for(let i of o){let s=Be.join(t,i),a=_D(s,n,e);if(i.includes(Ld)||i.includes(Vr))await ED(i,a,e);else{let l=await Rt.promises.readFile(i);await Gd(a,l)}}}catch(i){console.error("Error writing file, ",i)}},Wd=async()=>{let e={},t=Be.resolve(__dirname),n=Be.join(t,Ta),r=await Rt.promises.readdir(n);for(let o of r){let i=Be.join(n,o),s=await Vd(i);e[o]=s}return e},Vd=async e=>{let t=[];try{let n=await Rt.promises.readdir(e);for(let r of n){let o=Be.join(e,r);if((await Rt.promises.stat(o)).isDirectory()){let s=await Vd(o);t.push(...s)}else t.push(o)}}catch(n){console.error(`Error reading ${Be}, `,n)}return t},Gd=async(e,t)=>{try{await Rt.promises.mkdir(Be.dirname(e),{recursive:!0}),await Rt.promises.writeFile(e,t)}catch(n){console.error("Error writing file ",n)}},ED=async(e,t,n)=>Rt.promises.readFile(e,"utf8").then(async r=>{let o=r.replace(Md,n);await Gd(t,o)}),_D=(e,t,n)=>{let r=Be.join(Ta,t),o=e.indexOf(r);if(o!==-1){let i=e.substring(o+r.length+1);return Be.join(n,i)}return""};var qo=async()=>await Wd(),Xd=async()=>{let e=await qo(),t=Object.keys(e).join(", ");console.log(`Your available templates are: ${t}`),console.log('\u{1F4A1} Syntax: "webflow extension init projectName templateName"'),console.log('\u{1F31F} Example: "webflow extension init my-first-extension react"')},Qd=async(e,t=Go)=>{let n=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let r=await qo();await zd(e,n,t,r),console.log(`Done! Check out ${n}/README.md for steps on how to develop your extension.`)},ep=()=>Td(Sa,Vr,Bd),tp=async e=>{let{config:t,filepath:n}=await Lo(Sa,Vr),r=Kd.join(n,"..",t.publicDir,jd),i=(await Mn([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(m=>t.featureFlags?.[m]===!0?`ff_on=${m}`:`ff_off=${m}`).join("&"),l=a?`&${a}`:"",u=await(await(0,Jd.default)(`https://${i}/${s}?name=${t.name}${l}`)).text(),p=new qd.Server((m,y)=>{if(m.url==="/"){Zd.promises.readFile(r,{encoding:"utf-8"}).catch(v=>{Yd.program.error(v.message)}).then(v=>{let E=u.replace("{{ui}}",v);return y.writeHead(200,{"Content-Length":Buffer.byteLength(E),"Content-Type":"text/html"}),y.end(E)});return}if(m.url==="/__webflow")return y.writeHead(200,{"Content-Length":Buffer.byteLength(Aa(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),y.end(Aa(t));(0,Hd.default)(m,y,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),f=SD(e);p.listen(f),console.log(Ud(`Serving your extension at http://localhost:${f}`)+`
|
|
35
|
+
`)},SD=e=>{if(e){let t=parseInt(e,10);return isNaN(t)?(console.log("Invalid port number provided. Using the default port "+1337),1337):t}return 1337};Je();oe();var np=e=>{let t=e.command("extension").description("CLI for developing Designer Extensions.");t.command("list").description("Get list of project templates that can be used for `init`").action(Xd),t.command("init").description("Bootstrap a Designer Extension.").argument("[projectName]","What is your Designer Extension's name?").argument("[scaffoldName]","Which project template do you want to use?").action(async(n,r)=>{let o=await qo(),i=Object.keys(o),s=await Ce({message:"What would you like to name your Designer Extension?",default:n,validate:l=>l.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new h("When --no-input mode is enabled please provide the [projectName] argument.");let a=await At({message:"Which project template would you like to use?",choices:i.map(l=>({name:l,value:l})),default:r||"default"});await Qd(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(ep),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(tp)};var Nl=w(require("process"));G();de();we();var op=w(require("fs"));oe();async function Ho(e){let{authToken:t,siteId:n}=e||{},{path:r,isUserDefined:o}=Yt(),i=op.existsSync(r),s=!1;try{let{manifest:a}=X();s=!0,o&&d.info(`Using manifest file: ${r}`);try{let l=Tr(a,"devlink");if(!t||!n)throw new Error(`Missing Site ID or API token. Make sure you have WEBFLOW_API_TOKEN and WEBFLOW_SITE_ID set in your environment variables, or pass them as arguments --site and --api-token.
|
|
36
36
|
|
|
37
37
|
To set up your credentials, run:
|
|
38
|
-
webflow auth login`);return
|
|
38
|
+
webflow auth login`);return rp(l?.relativeHrefRoot),{...l,host:R,authToken:t,siteId:n,cssModules:!!l?.cssModules,components:Jo(l?.components),fileExtensions:l?.fileExtensions,...e}}catch(l){throw new h(l,{prefix:`Failed to read devlink config from manifest file: ${r}
|
|
39
39
|
`})}}catch(a){if(o||i||s){let l=o?`The manifest file specified via --manifest flag was not found or is invalid: ${r}
|
|
40
40
|
`:`Your manifest file exists but is invalid or missing required properties: ${r}
|
|
41
|
-
`;throw new
|
|
41
|
+
`;throw new h(a,{prefix:l})}}try{let a=[];t||a.push("authToken"),n||a.push("siteId");let l=await Mn(a);return rp(l?.relativeHrefRoot),{...l,host:l.host||R,cssModules:!!l?.cssModules,components:Jo(l?.components),fileExtensions:l?.fileExtensions,...e}}catch(a){throw a instanceof Error&&a.message.includes(".webflowrc")&&(a.message=`No configuration file found. Please create either:
|
|
42
42
|
- webflow.json with a "devlink" section, or
|
|
43
43
|
- .webflowrc file
|
|
44
|
-
in your project root.`),new y(a)}}function np(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function Ho(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}Oa();pt();oe();var OD=Object.create,fl=Object.defineProperty,PD=Object.getOwnPropertyDescriptor,ID=Object.getOwnPropertyNames,RD=Object.getPrototypeOf,jD=Object.prototype.hasOwnProperty,Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),j=(e,t)=>{for(var n in t)fl(e,n,{get:t[n],enumerable:!0})},$D=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ID(t))!jD.call(e,o)&&o!==n&&fl(e,o,{get:()=>t[o],enumerable:!(r=PD(t,o))||r.enumerable});return e},BD=(e,t,n)=>(n=e!=null?OD(RD(e)):{},$D(t||!e||!e.__esModule?fl(n,"default",{value:e,enumerable:!0}):n,e)),ND=Zn(e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(n){if(0<=n&&n<t.length)return t[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){var r=65,o=90,i=97,s=122,a=48,l=57,c=43,u=47,p=26,f=52;return r<=n&&n<=o?n-r:i<=n&&n<=s?n-i+p:a<=n&&n<=l?n-a+f:n==c?62:n==u?63:-1}}),LD=Zn(e=>{var t=ND(),n=5,r=1<<n,o=r-1,i=r;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(l){var c="",u,p=s(l);do u=p&o,p>>>=n,p>0&&(u|=i),c+=t.encode(u);while(p>0);return c},e.decode=function(l,c,u){var p=l.length,f=0,m=0,g,v;do{if(c>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(l.charCodeAt(c++)),v===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));g=!!(v&i),v&=o,f=f+(v<<m),m+=n}while(g);u.value=a(f),u.rest=c}}),ml=Zn(e=>{function t(h,b,$){if(b in h)return h[b];if(arguments.length===3)return $;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(h){var b=h.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(h){var b="";return h.scheme&&(b+=h.scheme+":"),b+="//",h.auth&&(b+=h.auth+"@"),h.host&&(b+=h.host),h.port&&(b+=":"+h.port),h.path&&(b+=h.path),b}e.urlGenerate=i;var s=32;function a(h){var b=[];return function($){for(var F=0;F<b.length;F++)if(b[F].input===$){var he=b[0];return b[0]=b[F],b[F]=he,b[0].result}var Ve=h($);return b.unshift({input:$,result:Ve}),b.length>s&&b.pop(),Ve}}var l=a(function(h){var b=h,$=o(h);if($){if(!$.path)return h;b=$.path}for(var F=e.isAbsolute(b),he=[],Ve=0,W=0;;)if(Ve=W,W=b.indexOf("/",Ve),W===-1){he.push(b.slice(Ve));break}else for(he.push(b.slice(Ve,W));W<b.length&&b[W]==="/";)W++;for(var ae,Ct=0,W=he.length-1;W>=0;W--)ae=he[W],ae==="."?he.splice(W,1):ae===".."?Ct++:Ct>0&&(ae===""?(he.splice(W+1,Ct),Ct=0):(he.splice(W,2),Ct--));return b=he.join("/"),b===""&&(b=F?"/":"."),$?($.path=b,i($)):b});e.normalize=l;function c(h,b){h===""&&(h="."),b===""&&(b=".");var $=o(b),F=o(h);if(F&&(h=F.path||"/"),$&&!$.scheme)return F&&($.scheme=F.scheme),i($);if($||b.match(r))return b;if(F&&!F.host&&!F.path)return F.host=b,i(F);var he=b.charAt(0)==="/"?b:l(h.replace(/\/+$/,"")+"/"+b);return F?(F.path=he,i(F)):he}e.join=c,e.isAbsolute=function(h){return h.charAt(0)==="/"||n.test(h)};function u(h,b){h===""&&(h="."),h=h.replace(/\/$/,"");for(var $=0;b.indexOf(h+"/")!==0;){var F=h.lastIndexOf("/");if(F<0||(h=h.slice(0,F),h.match(/^([^\/]+:\/)?\/*$/)))return b;++$}return Array($+1).join("../")+b.substr(h.length+1)}e.relative=u;var p=function(){var h=Object.create(null);return!("__proto__"in h)}();function f(h){return h}function m(h){return v(h)?"$"+h:h}e.toSetString=p?f:m;function g(h){return v(h)?h.slice(1):h}e.fromSetString=p?f:g;function v(h){if(!h)return!1;var b=h.length;if(b<9||h.charCodeAt(b-1)!==95||h.charCodeAt(b-2)!==95||h.charCodeAt(b-3)!==111||h.charCodeAt(b-4)!==116||h.charCodeAt(b-5)!==111||h.charCodeAt(b-6)!==114||h.charCodeAt(b-7)!==112||h.charCodeAt(b-8)!==95||h.charCodeAt(b-9)!==95)return!1;for(var $=b-10;$>=0;$--)if(h.charCodeAt($)!==36)return!1;return!0}function E(h,b,$){var F=O(h.source,b.source);return F!==0||(F=h.originalLine-b.originalLine,F!==0)||(F=h.originalColumn-b.originalColumn,F!==0||$)||(F=h.generatedColumn-b.generatedColumn,F!==0)||(F=h.generatedLine-b.generatedLine,F!==0)?F:O(h.name,b.name)}e.compareByOriginalPositions=E;function _(h,b,$){var F;return F=h.originalLine-b.originalLine,F!==0||(F=h.originalColumn-b.originalColumn,F!==0||$)||(F=h.generatedColumn-b.generatedColumn,F!==0)||(F=h.generatedLine-b.generatedLine,F!==0)?F:O(h.name,b.name)}e.compareByOriginalPositionsNoSource=_;function M(h,b,$){var F=h.generatedLine-b.generatedLine;return F!==0||(F=h.generatedColumn-b.generatedColumn,F!==0||$)||(F=O(h.source,b.source),F!==0)||(F=h.originalLine-b.originalLine,F!==0)||(F=h.originalColumn-b.originalColumn,F!==0)?F:O(h.name,b.name)}e.compareByGeneratedPositionsDeflated=M;function C(h,b,$){var F=h.generatedColumn-b.generatedColumn;return F!==0||$||(F=O(h.source,b.source),F!==0)||(F=h.originalLine-b.originalLine,F!==0)||(F=h.originalColumn-b.originalColumn,F!==0)?F:O(h.name,b.name)}e.compareByGeneratedPositionsDeflatedNoLine=C;function O(h,b){return h===b?0:h===null?1:b===null?-1:h>b?1:-1}function Z(h,b){var $=h.generatedLine-b.generatedLine;return $!==0||($=h.generatedColumn-b.generatedColumn,$!==0)||($=O(h.source,b.source),$!==0)||($=h.originalLine-b.originalLine,$!==0)||($=h.originalColumn-b.originalColumn,$!==0)?$:O(h.name,b.name)}e.compareByGeneratedPositionsInflated=Z;function N(h){return JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=N;function A(h,b,$){if(b=b||"",h&&(h[h.length-1]!=="/"&&b[0]!=="/"&&(h+="/"),b=h+b),$){var F=o($);if(!F)throw new Error("sourceMapURL could not be parsed");if(F.path){var he=F.path.lastIndexOf("/");he>=0&&(F.path=F.path.substring(0,he+1))}b=c(i(F),b)}return l(b)}e.computeSourceURL=A}),MD=Zn(e=>{var t=ml(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(i,s){for(var a=new o,l=0,c=i.length;l<c;l++)a.add(i[l],s);return a},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(i,s){var a=r?i:t.toSetString(i),l=r?this.has(i):n.call(this._set,a),c=this._array.length;(!l||s)&&this._array.push(i),l||(r?this._set.set(i,c):this._set[a]=c)},o.prototype.has=function(i){if(r)return this._set.has(i);var s=t.toSetString(i);return n.call(this._set,s)},o.prototype.indexOf=function(i){if(r){var s=this._set.get(i);if(s>=0)return s}else{var a=t.toSetString(i);if(n.call(this._set,a))return this._set[a]}throw new Error('"'+i+'" is not in the set.')},o.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o}),zD=Zn(e=>{var t=ml();function n(o,i){var s=o.generatedLine,a=i.generatedLine,l=o.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(o,i)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,i){this._array.forEach(o,i)},r.prototype.add=function(o){n(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r}),WD=Zn(e=>{var t=LD(),n=ml(),r=MD().ArraySet,o=zD().MappingList;function i(s){s||(s={}),this._file=n.getArg(s,"file",null),this._sourceRoot=n.getArg(s,"sourceRoot",null),this._skipValidation=n.getArg(s,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(s){var a=s.sourceRoot,l=new i({file:s.file,sourceRoot:a});return s.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,a!=null&&(u.source=n.relative(a,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),l.addMapping(u)}),s.sources.forEach(function(c){var u=c;a!==null&&(u=n.relative(a,c)),l._sources.has(u)||l._sources.add(u);var p=s.sourceContentFor(c);p!=null&&l.setSourceContent(c,p)}),l},i.prototype.addMapping=function(s){var a=n.getArg(s,"generated"),l=n.getArg(s,"original",null),c=n.getArg(s,"source",null),u=n.getArg(s,"name",null);this._skipValidation||this._validateMapping(a,l,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:c,name:u})},i.prototype.setSourceContent=function(s,a){var l=s;this._sourceRoot!=null&&(l=n.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(s,a,l){var c=a;if(a==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=s.file}var u=this._sourceRoot;u!=null&&(c=n.relative(u,c));var p=new r,f=new r;this._mappings.unsortedForEach(function(m){if(m.source===c&&m.originalLine!=null){var g=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});g.source!=null&&(m.source=g.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=g.line,m.originalColumn=g.column,g.name!=null&&(m.name=g.name))}var v=m.source;v!=null&&!p.has(v)&&p.add(v);var E=m.name;E!=null&&!f.has(E)&&f.add(E)},this),this._sources=p,this._names=f,s.sources.forEach(function(m){var g=s.sourceContentFor(m);g!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,g))},this)},i.prototype._validateMapping=function(s,a,l,c){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!a&&!l&&!c)){if(s&&"line"in s&&"column"in s&&a&&"line"in a&&"column"in a&&s.line>0&&s.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:s,source:l,original:a,name:c}))}},i.prototype._serializeMappings=function(){for(var s=0,a=1,l=0,c=0,u=0,p=0,f="",m,g,v,E,_=this._mappings.toArray(),M=0,C=_.length;M<C;M++){if(g=_[M],m="",g.generatedLine!==a)for(s=0;g.generatedLine!==a;)m+=";",a++;else if(M>0){if(!n.compareByGeneratedPositionsInflated(g,_[M-1]))continue;m+=","}m+=t.encode(g.generatedColumn-s),s=g.generatedColumn,g.source!=null&&(E=this._sources.indexOf(g.source),m+=t.encode(E-p),p=E,m+=t.encode(g.originalLine-1-c),c=g.originalLine-1,m+=t.encode(g.originalColumn-l),l=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),m+=t.encode(v-u),u=v)),f+=m}return f},i.prototype._generateSourcesContent=function(s,a){return s.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=n.relative(a,l));var c=n.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},i.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}),UD={};j(UD,{AtKeyword:()=>JD,BadString:()=>KD,BadUrl:()=>XD,CDC:()=>iv,CDO:()=>ov,Colon:()=>sv,Comma:()=>lv,Comment:()=>hv,Delim:()=>QD,Dimension:()=>nv,EOF:()=>VD,Function:()=>qD,Hash:()=>HD,Ident:()=>GD,LeftCurlyBracket:()=>fv,LeftParenthesis:()=>dv,LeftSquareBracket:()=>cv,Number:()=>ev,Percentage:()=>tv,RightCurlyBracket:()=>mv,RightParenthesis:()=>pv,RightSquareBracket:()=>uv,Semicolon:()=>av,String:()=>ZD,Url:()=>YD,WhiteSpace:()=>rv});var VD=0,GD=1,qD=2,JD=3,HD=4,ZD=5,KD=6,YD=7,XD=8,QD=9,ev=10,tv=11,nv=12,rv=13,ov=14,iv=15,sv=16,av=17,lv=18,cv=19,uv=20,dv=21,pv=22,fv=23,mv=24,hv=25;function ge(e){return e>=48&&e<=57}function Nt(e){return ge(e)||e>=65&&e<=70||e>=97&&e<=102}function hl(e){return e>=65&&e<=90}function gv(e){return e>=97&&e<=122}function yv(e){return hl(e)||gv(e)}function bv(e){return e>=128}function ui(e){return yv(e)||bv(e)||e===95}function gl(e){return ui(e)||ge(e)||e===45}function wv(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function di(e){return e===10||e===13||e===12}function on(e){return di(e)||e===32||e===9}function Ye(e,t){return!(e!==92||di(t)||t===0)}function ii(e,t,n){return e===45?ui(t)||t===45||Ye(t,n):ui(e)?!0:e===92?Ye(e,t):!1}function Pa(e,t,n){return e===43||e===45?ge(t)?2:t===46&&ge(n)?3:0:e===46?ge(t)?2:0:ge(e)?1:0}function ef(e){return e===65279||e===65534?1:0}var Ya=new Array(128),Dv=128,si=130,tf=131,yl=132,nf=133;for(let e=0;e<Ya.length;e++)Ya[e]=on(e)&&si||ge(e)&&tf||ui(e)&&yl||wv(e)&&nf||e||Dv;function Ia(e){return e<128?Ya[e]:yl}function Gn(e,t){return t<e.length?e.charCodeAt(t):0}function Xa(e,t,n){return n===13&&Gn(e,t+1)===10?2:1}function qn(e,t,n){let r=e.charCodeAt(t);return hl(r)&&(r=r|32),r===n}function eo(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let i=r.charCodeAt(o-t),s=e.charCodeAt(o);if(hl(s)&&(s=s|32),s!==i)return!1}return!0}function vv(e,t){for(;t>=0&&on(e.charCodeAt(t));t--);return t+1}function Xo(e,t){for(;t<e.length&&on(e.charCodeAt(t));t++);return t}function Ra(e,t){for(;t<e.length&&ge(e.charCodeAt(t));t++);return t}function sn(e,t){if(t+=2,Nt(Gn(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&Nt(Gn(e,t));t++);let n=Gn(e,t);on(n)&&(t+=Xa(e,t,n))}return t}function Qo(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!gl(n)){if(Ye(n,Gn(e,t+1))){t=sn(e,t)-1;continue}break}}return t}function bi(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),ge(n)&&(t=Ra(e,t+1),n=e.charCodeAt(t)),n===46&&ge(e.charCodeAt(t+1))&&(t+=2,t=Ra(e,t)),qn(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),ge(n)&&(t=Ra(e,t+1+r+1))}return t}function ja(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}Ye(n,Gn(e,t+1))&&(t=sn(e,t))}return t}function bl(e){if(e.length===1&&!Nt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var rf=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function pi(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var op=10,kv=12,ip=13;function sp(e){let t=e.source,n=t.length,r=t.length>0?ef(t.charCodeAt(0)):0,o=pi(e.lines,n),i=pi(e.columns,n),s=e.startLine,a=e.startColumn;for(let l=r;l<n;l++){let c=t.charCodeAt(l);o[l]=s,i[l]=a++,(c===op||c===ip||c===kv)&&(c===ip&&l+1<n&&t.charCodeAt(l+1)===op&&(l++,o[l]=s,i[l]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}var xv=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||sp(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||sp(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Ne=16777215,jt=24,Cv=new Map([[2,22],[21,22],[19,20],[23,24]]),Fv=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let n=e.length,r=pi(this.offsetAndType,e.length+1),o=pi(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,p)=>{switch(c){default:o[i]=n;break;case s:{let f=a&Ne;for(a=o[f],s=a>>jt,o[i]=f,o[f++]=i;f<i;f++)o[f]===n&&(o[f]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=Cv.get(c),a=s<<jt|i;break}r[i++]=c<<jt|p,l===-1&&(l=u)}),r[i]=0<<jt|n,o[i]=n,o[n]=n;a!==0;){let c=a&Ne;a=o[c],o[c]=n}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>jt:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Ne:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?eo(this.source,this.offsetAndType[e-1]&Ne,this.offsetAndType[e]&Ne,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Ne:this.offsetAndType[this.tokenCount]&Ne:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Ne,t=this.offsetAndType[t],this.tokenType=t>>jt,this.tokenEnd=t&Ne):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>jt,this.tokenEnd=e&Ne):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r,o;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&Ne:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[r]===n&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&Ne,s=o>>jt;n=i,e(s,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:rf[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};function wi(e,t){function n(p){return p<a?e.charCodeAt(p):0}function r(){if(c=bi(e,c),ii(n(c),n(c+1),n(c+2))){u=12,c=Qo(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let p=c;if(c=Qo(e,c),eo(e,p,c,"url")&&n(c)===40){if(c=Xo(e,c+1),n(c)===34||n(c)===39){u=2,c=p+4;return}s();return}if(n(c)===40){u=2,c++;return}u=1}function i(p){for(p||(p=n(c++)),u=5;c<e.length;c++){let f=e.charCodeAt(c);switch(Ia(f)){case p:c++;return;case si:if(di(f)){c+=Xa(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);di(m)?c+=Xa(e,c+1,m):Ye(f,m)&&(c=sn(e,c)-1);break}}}function s(){for(u=7,c=Xo(e,c);c<e.length;c++){let p=e.charCodeAt(c);switch(Ia(p)){case 41:c++;return;case si:if(c=Xo(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=ja(e,c),u=8;return;case 34:case 39:case 40:case nf:c=ja(e,c),u=8;return;case 92:if(Ye(p,n(c+1))){c=sn(e,c)-1;break}c=ja(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=ef(n(0)),c=l,u;for(;c<a;){let p=e.charCodeAt(c);switch(Ia(p)){case si:u=13,c=Xo(e,c+1);break;case 34:i();break;case 35:gl(n(c+1))||Ye(n(c+1),n(c+2))?(u=4,c=Qo(e,c+1)):(u=9,c++);break;case 39:i();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:Pa(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:Pa(p,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):ii(p,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:Pa(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 47:n(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:n(c+1)===33&&n(c+2)===45&&n(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:ii(n(c+1),n(c+2),n(c+3))?(u=3,c=Qo(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:Ye(p,n(c+1))?o():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case tf:r();break;case yl:o();break;default:u=9,c++}t(u,l,l=c)}}var Mn=null,me=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return me.createItem(e)}allocateCursor(e,t){let n;return Mn!==null?(n=Mn,Mn=Mn.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Mn,Mn=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let r=me.createItem(n);t!==null?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),o=t,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),o=t,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new me;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new me;for(let r=this.head;r!==null;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let o=r.next;if(r.next=o.next,t.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let o=r.prev;if(r.prev=o.prev,t.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new me;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(me.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(me.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(me.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(me.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(me.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Di(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
|
|
45
|
-
`)}})}var
|
|
46
|
-
`)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;n+=(
|
|
47
|
-
`)}function
|
|
48
|
-
`+
|
|
49
|
-
`,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=
|
|
44
|
+
in your project root.`),new h(a)}}function rp(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function Jo(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}Pa();ft();oe();var PD=Object.create,ml=Object.defineProperty,ID=Object.getOwnPropertyDescriptor,RD=Object.getOwnPropertyNames,$D=Object.getPrototypeOf,jD=Object.prototype.hasOwnProperty,Kn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$=(e,t)=>{for(var n in t)ml(e,n,{get:t[n],enumerable:!0})},BD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of RD(t))!jD.call(e,o)&&o!==n&&ml(e,o,{get:()=>t[o],enumerable:!(r=ID(t,o))||r.enumerable});return e},ND=(e,t,n)=>(n=e!=null?PD($D(e)):{},BD(t||!e||!e.__esModule?ml(n,"default",{value:e,enumerable:!0}):n,e)),LD=Kn(e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(n){if(0<=n&&n<t.length)return t[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){var r=65,o=90,i=97,s=122,a=48,l=57,c=43,u=47,p=26,f=52;return r<=n&&n<=o?n-r:i<=n&&n<=s?n-i+p:a<=n&&n<=l?n-a+f:n==c?62:n==u?63:-1}}),MD=Kn(e=>{var t=LD(),n=5,r=1<<n,o=r-1,i=r;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(l){var c="",u,p=s(l);do u=p&o,p>>>=n,p>0&&(u|=i),c+=t.encode(u);while(p>0);return c},e.decode=function(l,c,u){var p=l.length,f=0,m=0,y,v;do{if(c>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(l.charCodeAt(c++)),v===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));y=!!(v&i),v&=o,f=f+(v<<m),m+=n}while(y);u.value=a(f),u.rest=c}}),hl=Kn(e=>{function t(g,b,j){if(b in g)return g[b];if(arguments.length===3)return j;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(g){var b=g.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(g){var b="";return g.scheme&&(b+=g.scheme+":"),b+="//",g.auth&&(b+=g.auth+"@"),g.host&&(b+=g.host),g.port&&(b+=":"+g.port),g.path&&(b+=g.path),b}e.urlGenerate=i;var s=32;function a(g){var b=[];return function(j){for(var F=0;F<b.length;F++)if(b[F].input===j){var he=b[0];return b[0]=b[F],b[F]=he,b[0].result}var Ve=g(j);return b.unshift({input:j,result:Ve}),b.length>s&&b.pop(),Ve}}var l=a(function(g){var b=g,j=o(g);if(j){if(!j.path)return g;b=j.path}for(var F=e.isAbsolute(b),he=[],Ve=0,W=0;;)if(Ve=W,W=b.indexOf("/",Ve),W===-1){he.push(b.slice(Ve));break}else for(he.push(b.slice(Ve,W));W<b.length&&b[W]==="/";)W++;for(var ae,Ct=0,W=he.length-1;W>=0;W--)ae=he[W],ae==="."?he.splice(W,1):ae===".."?Ct++:Ct>0&&(ae===""?(he.splice(W+1,Ct),Ct=0):(he.splice(W,2),Ct--));return b=he.join("/"),b===""&&(b=F?"/":"."),j?(j.path=b,i(j)):b});e.normalize=l;function c(g,b){g===""&&(g="."),b===""&&(b=".");var j=o(b),F=o(g);if(F&&(g=F.path||"/"),j&&!j.scheme)return F&&(j.scheme=F.scheme),i(j);if(j||b.match(r))return b;if(F&&!F.host&&!F.path)return F.host=b,i(F);var he=b.charAt(0)==="/"?b:l(g.replace(/\/+$/,"")+"/"+b);return F?(F.path=he,i(F)):he}e.join=c,e.isAbsolute=function(g){return g.charAt(0)==="/"||n.test(g)};function u(g,b){g===""&&(g="."),g=g.replace(/\/$/,"");for(var j=0;b.indexOf(g+"/")!==0;){var F=g.lastIndexOf("/");if(F<0||(g=g.slice(0,F),g.match(/^([^\/]+:\/)?\/*$/)))return b;++j}return Array(j+1).join("../")+b.substr(g.length+1)}e.relative=u;var p=function(){var g=Object.create(null);return!("__proto__"in g)}();function f(g){return g}function m(g){return v(g)?"$"+g:g}e.toSetString=p?f:m;function y(g){return v(g)?g.slice(1):g}e.fromSetString=p?f:y;function v(g){if(!g)return!1;var b=g.length;if(b<9||g.charCodeAt(b-1)!==95||g.charCodeAt(b-2)!==95||g.charCodeAt(b-3)!==111||g.charCodeAt(b-4)!==116||g.charCodeAt(b-5)!==111||g.charCodeAt(b-6)!==114||g.charCodeAt(b-7)!==112||g.charCodeAt(b-8)!==95||g.charCodeAt(b-9)!==95)return!1;for(var j=b-10;j>=0;j--)if(g.charCodeAt(j)!==36)return!1;return!0}function E(g,b,j){var F=O(g.source,b.source);return F!==0||(F=g.originalLine-b.originalLine,F!==0)||(F=g.originalColumn-b.originalColumn,F!==0||j)||(F=g.generatedColumn-b.generatedColumn,F!==0)||(F=g.generatedLine-b.generatedLine,F!==0)?F:O(g.name,b.name)}e.compareByOriginalPositions=E;function _(g,b,j){var F;return F=g.originalLine-b.originalLine,F!==0||(F=g.originalColumn-b.originalColumn,F!==0||j)||(F=g.generatedColumn-b.generatedColumn,F!==0)||(F=g.generatedLine-b.generatedLine,F!==0)?F:O(g.name,b.name)}e.compareByOriginalPositionsNoSource=_;function M(g,b,j){var F=g.generatedLine-b.generatedLine;return F!==0||(F=g.generatedColumn-b.generatedColumn,F!==0||j)||(F=O(g.source,b.source),F!==0)||(F=g.originalLine-b.originalLine,F!==0)||(F=g.originalColumn-b.originalColumn,F!==0)?F:O(g.name,b.name)}e.compareByGeneratedPositionsDeflated=M;function C(g,b,j){var F=g.generatedColumn-b.generatedColumn;return F!==0||j||(F=O(g.source,b.source),F!==0)||(F=g.originalLine-b.originalLine,F!==0)||(F=g.originalColumn-b.originalColumn,F!==0)?F:O(g.name,b.name)}e.compareByGeneratedPositionsDeflatedNoLine=C;function O(g,b){return g===b?0:g===null?1:b===null?-1:g>b?1:-1}function Z(g,b){var j=g.generatedLine-b.generatedLine;return j!==0||(j=g.generatedColumn-b.generatedColumn,j!==0)||(j=O(g.source,b.source),j!==0)||(j=g.originalLine-b.originalLine,j!==0)||(j=g.originalColumn-b.originalColumn,j!==0)?j:O(g.name,b.name)}e.compareByGeneratedPositionsInflated=Z;function N(g){return JSON.parse(g.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=N;function A(g,b,j){if(b=b||"",g&&(g[g.length-1]!=="/"&&b[0]!=="/"&&(g+="/"),b=g+b),j){var F=o(j);if(!F)throw new Error("sourceMapURL could not be parsed");if(F.path){var he=F.path.lastIndexOf("/");he>=0&&(F.path=F.path.substring(0,he+1))}b=c(i(F),b)}return l(b)}e.computeSourceURL=A}),UD=Kn(e=>{var t=hl(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(i,s){for(var a=new o,l=0,c=i.length;l<c;l++)a.add(i[l],s);return a},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(i,s){var a=r?i:t.toSetString(i),l=r?this.has(i):n.call(this._set,a),c=this._array.length;(!l||s)&&this._array.push(i),l||(r?this._set.set(i,c):this._set[a]=c)},o.prototype.has=function(i){if(r)return this._set.has(i);var s=t.toSetString(i);return n.call(this._set,s)},o.prototype.indexOf=function(i){if(r){var s=this._set.get(i);if(s>=0)return s}else{var a=t.toSetString(i);if(n.call(this._set,a))return this._set[a]}throw new Error('"'+i+'" is not in the set.')},o.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o}),zD=Kn(e=>{var t=hl();function n(o,i){var s=o.generatedLine,a=i.generatedLine,l=o.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(o,i)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,i){this._array.forEach(o,i)},r.prototype.add=function(o){n(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r}),WD=Kn(e=>{var t=MD(),n=hl(),r=UD().ArraySet,o=zD().MappingList;function i(s){s||(s={}),this._file=n.getArg(s,"file",null),this._sourceRoot=n.getArg(s,"sourceRoot",null),this._skipValidation=n.getArg(s,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(s){var a=s.sourceRoot,l=new i({file:s.file,sourceRoot:a});return s.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,a!=null&&(u.source=n.relative(a,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),l.addMapping(u)}),s.sources.forEach(function(c){var u=c;a!==null&&(u=n.relative(a,c)),l._sources.has(u)||l._sources.add(u);var p=s.sourceContentFor(c);p!=null&&l.setSourceContent(c,p)}),l},i.prototype.addMapping=function(s){var a=n.getArg(s,"generated"),l=n.getArg(s,"original",null),c=n.getArg(s,"source",null),u=n.getArg(s,"name",null);this._skipValidation||this._validateMapping(a,l,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:c,name:u})},i.prototype.setSourceContent=function(s,a){var l=s;this._sourceRoot!=null&&(l=n.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(s,a,l){var c=a;if(a==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=s.file}var u=this._sourceRoot;u!=null&&(c=n.relative(u,c));var p=new r,f=new r;this._mappings.unsortedForEach(function(m){if(m.source===c&&m.originalLine!=null){var y=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});y.source!=null&&(m.source=y.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=y.line,m.originalColumn=y.column,y.name!=null&&(m.name=y.name))}var v=m.source;v!=null&&!p.has(v)&&p.add(v);var E=m.name;E!=null&&!f.has(E)&&f.add(E)},this),this._sources=p,this._names=f,s.sources.forEach(function(m){var y=s.sourceContentFor(m);y!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,y))},this)},i.prototype._validateMapping=function(s,a,l,c){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!a&&!l&&!c)){if(s&&"line"in s&&"column"in s&&a&&"line"in a&&"column"in a&&s.line>0&&s.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:s,source:l,original:a,name:c}))}},i.prototype._serializeMappings=function(){for(var s=0,a=1,l=0,c=0,u=0,p=0,f="",m,y,v,E,_=this._mappings.toArray(),M=0,C=_.length;M<C;M++){if(y=_[M],m="",y.generatedLine!==a)for(s=0;y.generatedLine!==a;)m+=";",a++;else if(M>0){if(!n.compareByGeneratedPositionsInflated(y,_[M-1]))continue;m+=","}m+=t.encode(y.generatedColumn-s),s=y.generatedColumn,y.source!=null&&(E=this._sources.indexOf(y.source),m+=t.encode(E-p),p=E,m+=t.encode(y.originalLine-1-c),c=y.originalLine-1,m+=t.encode(y.originalColumn-l),l=y.originalColumn,y.name!=null&&(v=this._names.indexOf(y.name),m+=t.encode(v-u),u=v)),f+=m}return f},i.prototype._generateSourcesContent=function(s,a){return s.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=n.relative(a,l));var c=n.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},i.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}),VD={};$(VD,{AtKeyword:()=>HD,BadString:()=>YD,BadUrl:()=>QD,CDC:()=>s0,CDO:()=>i0,Colon:()=>a0,Comma:()=>c0,Comment:()=>g0,Delim:()=>e0,Dimension:()=>r0,EOF:()=>GD,Function:()=>JD,Hash:()=>ZD,Ident:()=>qD,LeftCurlyBracket:()=>m0,LeftParenthesis:()=>p0,LeftSquareBracket:()=>u0,Number:()=>t0,Percentage:()=>n0,RightCurlyBracket:()=>h0,RightParenthesis:()=>f0,RightSquareBracket:()=>d0,Semicolon:()=>l0,String:()=>KD,Url:()=>XD,WhiteSpace:()=>o0});var GD=0,qD=1,JD=2,HD=3,ZD=4,KD=5,YD=6,XD=7,QD=8,e0=9,t0=10,n0=11,r0=12,o0=13,i0=14,s0=15,a0=16,l0=17,c0=18,u0=19,d0=20,p0=21,f0=22,m0=23,h0=24,g0=25;function ge(e){return e>=48&&e<=57}function Lt(e){return ge(e)||e>=65&&e<=70||e>=97&&e<=102}function gl(e){return e>=65&&e<=90}function y0(e){return e>=97&&e<=122}function b0(e){return gl(e)||y0(e)}function w0(e){return e>=128}function ci(e){return b0(e)||w0(e)||e===95}function yl(e){return ci(e)||ge(e)||e===45}function D0(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ui(e){return e===10||e===13||e===12}function sn(e){return ui(e)||e===32||e===9}function Ye(e,t){return!(e!==92||ui(t)||t===0)}function oi(e,t,n){return e===45?ci(t)||t===45||Ye(t,n):ci(e)?!0:e===92?Ye(e,t):!1}function Ia(e,t,n){return e===43||e===45?ge(t)?2:t===46&&ge(n)?3:0:e===46?ge(t)?2:0:ge(e)?1:0}function tf(e){return e===65279||e===65534?1:0}var Xa=new Array(128),v0=128,ii=130,nf=131,bl=132,rf=133;for(let e=0;e<Xa.length;e++)Xa[e]=sn(e)&&ii||ge(e)&&nf||ci(e)&&bl||D0(e)&&rf||e||v0;function Ra(e){return e<128?Xa[e]:bl}function qn(e,t){return t<e.length?e.charCodeAt(t):0}function Qa(e,t,n){return n===13&&qn(e,t+1)===10?2:1}function Jn(e,t,n){let r=e.charCodeAt(t);return gl(r)&&(r=r|32),r===n}function Qr(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let i=r.charCodeAt(o-t),s=e.charCodeAt(o);if(gl(s)&&(s=s|32),s!==i)return!1}return!0}function k0(e,t){for(;t>=0&&sn(e.charCodeAt(t));t--);return t+1}function Yo(e,t){for(;t<e.length&&sn(e.charCodeAt(t));t++);return t}function $a(e,t){for(;t<e.length&&ge(e.charCodeAt(t));t++);return t}function an(e,t){if(t+=2,Lt(qn(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&Lt(qn(e,t));t++);let n=qn(e,t);sn(n)&&(t+=Qa(e,t,n))}return t}function Xo(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!yl(n)){if(Ye(n,qn(e,t+1))){t=an(e,t)-1;continue}break}}return t}function yi(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),ge(n)&&(t=$a(e,t+1),n=e.charCodeAt(t)),n===46&&ge(e.charCodeAt(t+1))&&(t+=2,t=$a(e,t)),Jn(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),ge(n)&&(t=$a(e,t+1+r+1))}return t}function ja(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}Ye(n,qn(e,t+1))&&(t=an(e,t))}return t}function wl(e){if(e.length===1&&!Lt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var of=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function di(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var ip=10,x0=12,sp=13;function ap(e){let t=e.source,n=t.length,r=t.length>0?tf(t.charCodeAt(0)):0,o=di(e.lines,n),i=di(e.columns,n),s=e.startLine,a=e.startColumn;for(let l=r;l<n;l++){let c=t.charCodeAt(l);o[l]=s,i[l]=a++,(c===ip||c===sp||c===x0)&&(c===sp&&l+1<n&&t.charCodeAt(l+1)===ip&&(l++,o[l]=s,i[l]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}var C0=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||ap(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||ap(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Ne=16777215,jt=24,F0=new Map([[2,22],[21,22],[19,20],[23,24]]),E0=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let n=e.length,r=di(this.offsetAndType,e.length+1),o=di(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,p)=>{switch(c){default:o[i]=n;break;case s:{let f=a&Ne;for(a=o[f],s=a>>jt,o[i]=f,o[f++]=i;f<i;f++)o[f]===n&&(o[f]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=F0.get(c),a=s<<jt|i;break}r[i++]=c<<jt|p,l===-1&&(l=u)}),r[i]=0<<jt|n,o[i]=n,o[n]=n;a!==0;){let c=a&Ne;a=o[c],o[c]=n}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>jt:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Ne:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Qr(this.source,this.offsetAndType[e-1]&Ne,this.offsetAndType[e]&Ne,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Ne:this.offsetAndType[this.tokenCount]&Ne:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Ne,t=this.offsetAndType[t],this.tokenType=t>>jt,this.tokenEnd=t&Ne):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>jt,this.tokenEnd=e&Ne):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r,o;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&Ne:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[r]===n&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&Ne,s=o>>jt;n=i,e(s,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:of[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};function bi(e,t){function n(p){return p<a?e.charCodeAt(p):0}function r(){if(c=yi(e,c),oi(n(c),n(c+1),n(c+2))){u=12,c=Xo(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let p=c;if(c=Xo(e,c),Qr(e,p,c,"url")&&n(c)===40){if(c=Yo(e,c+1),n(c)===34||n(c)===39){u=2,c=p+4;return}s();return}if(n(c)===40){u=2,c++;return}u=1}function i(p){for(p||(p=n(c++)),u=5;c<e.length;c++){let f=e.charCodeAt(c);switch(Ra(f)){case p:c++;return;case ii:if(ui(f)){c+=Qa(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);ui(m)?c+=Qa(e,c+1,m):Ye(f,m)&&(c=an(e,c)-1);break}}}function s(){for(u=7,c=Yo(e,c);c<e.length;c++){let p=e.charCodeAt(c);switch(Ra(p)){case 41:c++;return;case ii:if(c=Yo(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=ja(e,c),u=8;return;case 34:case 39:case 40:case rf:c=ja(e,c),u=8;return;case 92:if(Ye(p,n(c+1))){c=an(e,c)-1;break}c=ja(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=tf(n(0)),c=l,u;for(;c<a;){let p=e.charCodeAt(c);switch(Ra(p)){case ii:u=13,c=Yo(e,c+1);break;case 34:i();break;case 35:yl(n(c+1))||Ye(n(c+1),n(c+2))?(u=4,c=Xo(e,c+1)):(u=9,c++);break;case 39:i();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:Ia(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:Ia(p,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):oi(p,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:Ia(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 47:n(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:n(c+1)===33&&n(c+2)===45&&n(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:oi(n(c+1),n(c+2),n(c+3))?(u=3,c=Xo(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:Ye(p,n(c+1))?o():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case nf:r();break;case bl:o();break;default:u=9,c++}t(u,l,l=c)}}var Un=null,me=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return me.createItem(e)}allocateCursor(e,t){let n;return Un!==null?(n=Un,Un=Un.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Un,Un=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let r=me.createItem(n);t!==null?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),o=t,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),o=t,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new me;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new me;for(let r=this.head;r!==null;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let o=r.next;if(r.next=o.next,t.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let o=r.prev;if(r.prev=o.prev,t.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new me;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(me.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(me.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(me.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(me.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(me.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function wi(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
|
|
45
|
+
`)}})}var Ba=100,lp=60,cp=" ";function up({source:e,line:t,column:n},r){function o(u,p){return i.slice(u,p).map((f,m)=>String(u+m+1).padStart(l)+" |"+f).join(`
|
|
46
|
+
`)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;n+=(cp.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>Ba&&(c=n-lp+3,n=lp-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,cp),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,Ba-2)+(i[u].length>c+Ba-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
|
|
47
|
+
`)}function dp(e,t,n,r,o){return Object.assign(wi("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return up({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
|
|
48
|
+
`+up({source:t,line:r,column:o},2)}})}function _0(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(o===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var pp=()=>{},S0=33,T0=35,Na=59,fp=123,mp=0;function A0(e){return function(){return this[e]()}}function La(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}function O0(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:La(e.atrule),pseudo:La(e.pseudo),node:La(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=A0(e.parseContext[n]);break}return{config:t,...t,...t.node}}function P0(e){let t="",n="<unknown>",r=!1,o=pp,i=!1,s=new C0,a=Object.assign(new E0,O0(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:_0,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===fp?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===fp||l===Na?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===S0||l===Na?1:0},consumeUntilSemicolonIncluded(l){return l===Na?2:0},createList(){return new me},createSingleNodeList(l){return new me().appendData(l)},getFirstListNode(l){return l&&l.first},getLastListNode(l){return l&&l.last},parseWithFallback(l,c){let u=this.tokenIndex;try{return l.call(this)}catch(p){if(i)throw p;let f=c.call(this,u);return i=!0,o(p,f),i=!1,f}},lookupNonWSType(l){let c;do if(c=this.lookupType(l++),c!==13)return c;while(c!==mp);return mp},charCodeAt(l){return l>=0&&l<t.length?t.charCodeAt(l):0},substring(l,c){return t.substring(l,c)},substrToCursor(l){return this.source.substring(l,this.tokenStart)},cmpChar(l,c){return Jn(t,l,c)},cmpStr(l,c,u){return Qr(t,l,c,u)},consume(l){let c=this.tokenStart;return this.eat(l),this.substrToCursor(c)},consumeFunctionName(){let l=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),l},consumeNumber(l){let c=t.substring(this.tokenStart,yi(t,this.tokenStart));return this.eat(l),c},eat(l){if(this.tokenType!==l){let c=of[l].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),u=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,p=this.tokenStart;switch(l){case 1:this.tokenType===2||this.tokenType===7?(p=this.tokenEnd-1,u="Identifier is expected but function found"):u="Identifier is expected";break;case 4:this.isDelim(T0)&&(this.next(),p++,u="Name is expected");break;case 11:this.tokenType===10&&(p=this.tokenEnd,u="Percent sign is expected");break}this.error(u,p)}this.next()},eatIdent(l){(this.tokenType!==1||this.lookupValue(0,l)===!1)&&this.error(`Identifier "${l}" is expected`),this.next()},eatDelim(l){this.isDelim(l)||this.error(`Delim "${String.fromCharCode(l)}" is expected`),this.next()},getLocation(l,c){return r?s.getLocationRange(l,c,n):null},getLocationFromList(l){if(r){let c=this.getFirstListNode(l),u=this.getLastListNode(l);return s.getLocationRange(c!==null?c.loc.start.offset-s.startOffset:this.tokenStart,u!==null?u.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(l,c){let u=typeof c<"u"&&c<t.length?s.getLocation(c):this.eof?s.getLocation(k0(t,t.length-1)):s.getLocation(this.tokenStart);throw new dp(l||"Unexpected input",t,u.offset,u.line,u.column)}});return Object.assign(function(l,c){t=l,c=c||{},a.setSource(t,bi),s.setSource(t,c.offset,c.line,c.column),n=c.filename||"<unknown>",r=!!c.positions,o=typeof c.onParseError=="function"?c.onParseError:pp,i=!1,a.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,a.parseValue="parseValue"in c?!!c.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in c?!!c.parseCustomProperty:!1;let{context:u="default",onComment:p}=c;if(!(u in a.context))throw new Error("Unknown context `"+u+"`");typeof p=="function"&&a.forEachToken((m,y,v)=>{if(m===25){let E=a.getLocation(y,v),_=Qr(t,v-2,v,"*/")?t.slice(y+2,v-2):t.slice(y+2,v);p(_,E)}});let f=a.context[u].call(a,c);return a.eof||a.error(),f},{SyntaxError:dp,config:a.config})}var I0=ND(WD(),1),hp=new Set(["Atrule","Selector","Declaration"]);function R0(e){let t=new I0.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(f){if(f.loc&&f.loc.start&&hp.has(f.type)){let m=f.loc.start.line,y=f.loc.start.column-1;(r.line!==m||r.column!==y)&&(r.line=m,r.column=y,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:f.loc.source,original:r,generated:n}))}c.call(this,f),l&&hp.has(f.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(f,m,y){for(let v=0;v<f.length;v++)f.charCodeAt(v)===10?(s++,a=0):a++;u(f,m,y)};let p=e.result;return e.result=function(){return l&&t.addMapping(i),{css:p(),map:t}},e}var el={};$(el,{safe:()=>lf,spec:()=>N0});var $0=43,j0=45,Ma=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},sf=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],B0=sf.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function af(e){let t=new Set(e.map(([n,r])=>Ma(n)<<16|Ma(r)));return function(n,r,o){let i=Ma(r,o),s=o.charCodeAt(0);return(s===j0&&r!==1&&r!==2&&r!==15||s===$0?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}var N0=af(sf),lf=af(B0),L0=92;function M0(e,t){if(typeof t=="function"){let n=null;e.children.forEach(r=>{n!==null&&t.call(this,n),this.node(r),n=r});return}e.children.forEach(this.node,this)}function U0(e){bi(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function z0(e){let t=new Map;for(let n in e.node){let r=e.node[n];typeof(r.generate||r)=="function"&&t.set(n,r.generate||r)}return function(n,r){let o="",i=0,s={node(l){if(t.has(l.type))t.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:lf,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===L0&&this.emit(`
|
|
49
|
+
`,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=R0(s)),r.mode in el&&(s.tokenBefore=el[r.mode]));let a={node:l=>s.node(l),children:M0,token:(l,c)=>s.token(l,c),tokenize:U0};return s.node(n),s.result()}}function W0(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof me)&&(n.children=new me().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof me&&(n.children=n.children.toArray())}}),t}}}var{hasOwnProperty:Dl}=Object.prototype,qr=function(){};function gp(e){return typeof e=="function"?e:qr}function yp(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function V0(e,t){let n=t.structure,r=[];for(let o in n){if(Dl.call(n,o)===!1)continue;let i=n[o],s={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let a of i)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function G0(e){let t={};for(let n in e.node)if(Dl.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=V0(n,r)}return t}function bp(e,t){let n=e.fields.slice(),r=e.context,o=typeof r=="string";return t&&n.reverse(),function(i,s,a,l){let c;o&&(c=s[r],s[r]=i);for(let u of n){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(l,!1):p.reduce(l,!1))return!0}else if(a(p))return!0}}o&&(s[r]=c)}}function wp({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function q0(e){let t=G0(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)Dl.call(t,c)&&t[c]!==null&&(n[c]=bp(t[c],!1),r[c]=bp(t[c],!0));let s=wp(n),a=wp(r),l=function(c,u){function p(_,M,C){let O=f.call(E,_,M,C);return O===o?!0:O===i?!1:!!(y.hasOwnProperty(_.type)&&y[_.type](_,E,p,v)||m.call(E,_,M,C)===o)}let f=qr,m=qr,y=n,v=(_,M,C,O)=>_||p(M,C,O),E={break:o,skip:i,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")f=u;else if(u&&(f=gp(u.enter),m=gp(u.leave),u.reverse&&(y=r),u.visit)){if(s.hasOwnProperty(u.visit))y=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");f=yp(f,u.visit),m=yp(m,u.visit)}if(f===qr&&m===qr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(c)};return l.break=o,l.skip=i,l.find=function(c,u){let p=null;return l(c,function(f,m,y){if(u.call(this,f,m,y))return p=f,o}),p},l.findLast=function(c,u){let p=null;return l(c,{reverse:!0,enter(f,m,y){if(u.call(this,f,m,y))return p=f,o}}),p},l.findAll=function(c,u){let p=[];return l(c,function(f,m,y){u.call(this,f,m,y)&&p.push(f)}),p},l}function J0(e){return e}function H0(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?"#?":"*":t===0&&n===1?"?":t===1&&n===0?r?"#":"+":t===1&&n===1?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(n!==0?n:"")+"}")}function Z0(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function K0(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>vl(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function vl(e,t,n,r){let o;switch(e.type){case"Group":o=K0(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return vl(e.term,t,n,r)+t(H0(e),e);case"Type":o="<"+e.name+(e.opts?t(Z0(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function Di(e,t){let n=J0,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),vl(e,n,r,o)}var Dp={offset:0,line:1,column:1};function Y0(e,t){let n=e.tokens,r=e.longestMatch,o=r<n.length&&n[r].node||null,i=o!==t?o:null,s=0,a=0,l=0,c="",u,p;for(let f=0;f<n.length;f++){let m=n[f].value;f===r&&(a=m.length,s=c.length),i!==null&&n[f].node===i&&(f<=r?l++:l=0),c+=m}return r===n.length||l>1?(u=Qo(i||t,"end")||Jr(Dp,c),p=Jr(u)):(u=Qo(i,"start")||Jr(Qo(t,"start")||Dp,c.slice(0,s)),p=Qo(i,"end")||Jr(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:p}}function Qo(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Jr(n):n:null}function Jr({offset:e,line:t,column:n},r){let o={offset:e,line:t,column:n};if(r){let i=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=i.length-1,o.column=i.length===1?o.column+r.length:i.pop().length+1}return o}var Gr=function(e,t){let n=wi("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},X0=function(e,t,n,r){let o=wi("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=Y0(r,n);return o.rawMessage=e,o.syntax=t?Di(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+`
|
|
50
50
|
syntax: `+o.syntax+`
|
|
51
51
|
value: `+(i||"<empty string>")+`
|
|
52
|
-
--------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},
|
|
52
|
+
--------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},ei=new Map,zn=new Map,pi=45,Ua=Q0,vp=ev;function kl(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===pi&&e.charCodeAt(t+1)===pi}function cf(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===pi&&e.charCodeAt(t+1)!==pi){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function Q0(e){if(ei.has(e))return ei.get(e);let t=e.toLowerCase(),n=ei.get(t);if(n===void 0){let r=kl(t,0),o=r?"":cf(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return ei.set(e,n),n}function ev(e){if(zn.has(e))return zn.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=kl(t,n.length);if(!r&&(t=t.toLowerCase(),zn.has(t))){let a=zn.get(t);return zn.set(e,a),a}let o=r?"":cf(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return zn.set(e,s),s}var uf=["initial","inherit","unset","revert","revert-layer"],eo=43,rt=45,za=110,Wn=!0,tv=!1;function tl(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Yr(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Nt(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===eo||o===rt){if(n)return 0;t++}for(;t<e.value.length;t++)if(!ge(e.value.charCodeAt(t)))return 0;return r+1}function Wa(e,t,n){let r=!1,o=Yr(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(tl(e,eo)||tl(e,rt)){if(r=!0,o=Yr(n(++o),o,n),e=n(o),e===null||e.type!==10)return 0}else return t;if(!r){let i=e.value.charCodeAt(0);if(i!==eo&&i!==rt)return 0}return Nt(e,r?0:1,r,o)}function nv(e,t){let n=0;if(!e)return 0;if(e.type===10)return Nt(e,0,tv,n);if(e.type===1&&e.value.charCodeAt(0)===rt){if(!Jn(e.value,1,za))return 0;switch(e.value.length){case 2:return Wa(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==rt?0:(n=Yr(t(++n),n,t),e=t(n),Nt(e,0,Wn,n));default:return e.value.charCodeAt(2)!==rt?0:Nt(e,3,Wn,n)}}else if(e.type===1||tl(e,eo)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Jn(e.value,0,za))return 0;switch(e.value.length){case 1:return Wa(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==rt?0:(n=Yr(t(++n),n,t),e=t(n),Nt(e,0,Wn,n));default:return e.value.charCodeAt(1)!==rt?0:Nt(e,2,Wn,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===eo||r===rt?1:0,i=o;for(;i<e.value.length&&ge(e.value.charCodeAt(i));i++);return i===o||!Jn(e.value,i,za)?0:i+1===e.value.length?Wa(t(++n),n,t):e.value.charCodeAt(i+1)!==rt?0:i+2===e.value.length?(n=Yr(t(++n),n,t),e=t(n),Nt(e,0,Wn,n)):Nt(e,i+2,Wn,n)}return 0}var rv=43,df=45,pf=63,ov=117;function nl(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function iv(e,t){return e.value.charCodeAt(0)===t}function Hr(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===df&&n&&r!==0)return Hr(e,t+r+1,!1),6;if(!Lt(i)||++r>6)return 0}return r}function ti(e,t,n){if(!e)return 0;for(;nl(n(t),pf);){if(++e>6)return 0;t++}return t}function sv(e,t){let n=0;if(e===null||e.type!==1||!Jn(e.value,0,ov)||(e=t(++n),e===null))return 0;if(nl(e,rv))return e=t(++n),e===null?0:e.type===1?ti(Hr(e,0,!0),++n,t):nl(e,pf)?ti(1,++n,t):0;if(e.type===10){let r=Hr(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!iv(e,df)||!Hr(e,1,!1)?0:n+1:ti(r,n,t))}return e.type===12?ti(Hr(e,1,!0),++n,t):0}var av=["calc(","-moz-calc(","-webkit-calc("],xl=new Map([[2,22],[21,22],[19,20],[23,24]]);function Xe(e,t){return t<e.length?e.charCodeAt(t):0}function ff(e,t){return Qr(e,0,e.length,t)}function mf(e,t){for(let n=0;n<t.length;n++)if(ff(e,t[n]))return!0;return!1}function hf(e,t){return t!==e.length-2?!1:Xe(e,t)===92&&ge(Xe(e,t+1))}function vi(e,t,n){if(e&&e.type==="Range"){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!="string"||e.max!==null&&r>e.max&&typeof e.max!="string")return!0}return!1}function lv(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),r.length===0){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=xl.get(e.type);break}o++}while(e=t(o));return o}function Le(e){return function(t,n,r){return t===null?0:t.type===2&&mf(t.value,av)?lv(t,n):e(t,n,r)}}function se(e){return function(t){return t===null||t.type!==e?0:1}}function cv(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return mf(t,uf)||ff(t,"default")?0:1}function uv(e){return e===null||e.type!==1||Xe(e.value,0)!==45||Xe(e.value,1)!==45?0:1}function dv(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!Lt(Xe(e.value,n)))return 0;return 1}function pv(e){return e===null||e.type!==4||!oi(Xe(e.value,1),Xe(e.value,2),Xe(e.value,3))?0:1}function fv(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(n===0)break e;break;case 9:if(n===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:r.push(n),n=xl.get(e.type);break}o++}while(e=t(o));return o}function mv(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=xl.get(e.type);break}o++}while(e=t(o));return o}function yt(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=yi(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!hf(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return vi(r,t.value,o)?0:1}}function hv(e,t,n){return e===null||e.type!==11||vi(n,e.value,e.value.length-1)?0:1}function gf(e){return typeof e!="function"&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function gv(e,t,n){if(e===null)return 0;let r=yi(e.value,0);return r!==e.value.length&&!hf(e.value,r)||vi(n,e.value,r)?0:1}function yv(e,t,n){if(e===null||e.type!==10)return 0;let r=Xe(e.value,0)===43||Xe(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!ge(Xe(e.value,r)))return 0;return vi(n,e.value,r)?0:1}var bv={"ident-token":se(1),"function-token":se(2),"at-keyword-token":se(3),"hash-token":se(4),"string-token":se(5),"bad-string-token":se(6),"url-token":se(7),"bad-url-token":se(8),"delim-token":se(9),"number-token":se(10),"percentage-token":se(11),"dimension-token":se(12),"whitespace-token":se(13),"CDO-token":se(14),"CDC-token":se(15),"colon-token":se(16),"semicolon-token":se(17),"comma-token":se(18),"[-token":se(19),"]-token":se(20),"(-token":se(21),")-token":se(22),"{-token":se(23),"}-token":se(24)},wv={string:se(5),ident:se(1),percentage:Le(hv),zero:gf(),number:Le(gv),integer:Le(yv),"custom-ident":cv,"custom-property-name":uv,"hex-color":dv,"id-selector":pv,"an-plus-b":nv,urange:sv,"declaration-value":fv,"any-value":mv};function Dv(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:Le(yt(null)),angle:Le(yt(t)),decibel:Le(yt(n)),frequency:Le(yt(r)),flex:Le(yt(o)),length:Le(gf(yt(i))),resolution:Le(yt(s)),semitones:Le(yt(a)),time:Le(yt(l))}}function vv(e){return{...bv,...wv,...Dv(e)}}var rl={};$(rl,{angle:()=>xv,decibel:()=>Sv,flex:()=>_v,frequency:()=>Fv,length:()=>kv,resolution:()=>Ev,semitones:()=>Tv,time:()=>Cv});var kv=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],xv=["deg","grad","rad","turn"],Cv=["s","ms"],Fv=["hz","khz"],Ev=["dpi","dpcm","dppx","x"],_v=["fr"],Sv=["db"],Tv=["st"],Av={};$(Av,{SyntaxError:()=>yf,generate:()=>Di,parse:()=>Tl,walk:()=>xf});function yf(e,t,n){return Object.assign(wi("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
|
|
53
53
|
`+t+`
|
|
54
|
-
--`+new Array((n||t.length)+1).join("-")+"^"})}var A0=9,O0=10,P0=12,I0=13,R0=32,j0=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==I0&&t!==O0&&t!==P0&&t!==R0&&t!==A0)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new gf(e,this.str,this.pos)}},$0=9,B0=10,N0=12,L0=13,M0=32,yf=33,xl=35,vp=38,mi=39,bf=40,z0=41,wf=42,Cl=43,Fl=44,kp=45,El=60,Df=62,rl=63,W0=64,xi=91,_l=93,hi=123,xp=124,Cp=125,Fp=8734,no=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Ep={" ":1,"&&":2,"||":3,"|":4};function gi(e){return e.substringToPos(e.findWsEnd(e.pos))}function Jn(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||no[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function yi(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function U0(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function _p(e){let t=null,n=null;return e.eat(hi),t=yi(e),e.charCode()===Fl?(e.pos++,e.charCode()!==Cp&&(n=yi(e))):n=t,e.eat(Cp),{min:Number(t),max:n?Number(n):0}}function V0(e){let t=null,n=!1;switch(e.charCode()){case wf:e.pos++,t={min:0,max:0};break;case Cl:e.pos++,t={min:1,max:0};break;case rl:e.pos++,t={min:0,max:1};break;case xl:e.pos++,n=!0,e.charCode()===hi?t=_p(e):e.charCode()===rl?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case hi:t=_p(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Hn(e,t){let n=V0(e);return n!==null?(n.term=t,e.charCode()===xl&&e.charCodeAt(e.pos-1)===Cl?Hn(e,n):n):t}function Ua(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function G0(e){let t;return e.eat(El),e.eat(mi),t=Jn(e),e.eat(mi),e.eat(Df),Hn(e,{type:"Property",name:t})}function q0(e){let t=null,n=null,r=1;return e.eat(xi),e.charCode()===kp&&(e.peek(),r=-1),r==-1&&e.charCode()===Fp?e.peek():(t=r*Number(yi(e)),no[e.charCode()]!==0&&(t+=Jn(e))),gi(e),e.eat(Fl),gi(e),e.charCode()===Fp?e.peek():(r=1,e.charCode()===kp&&(e.peek(),r=-1),n=r*Number(yi(e)),no[e.charCode()]!==0&&(n+=Jn(e))),e.eat(_l),{type:"Range",min:t,max:n}}function J0(e){let t,n=null;return e.eat(El),t=Jn(e),e.charCode()===bf&&e.nextCharCode()===z0&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===xi&&(gi(e),n=q0(e)),e.eat(Df),Hn(e,{type:"Type",name:t,opts:n})}function H0(e){let t=Jn(e);return e.charCode()===bf?(e.pos++,{type:"Function",name:t}):Hn(e,{type:"Keyword",name:t})}function Z0(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>Ep[o]-Ep[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function vf(e){let t=[],n={},r,o=null,i=e.pos;for(;r=Y0(e);)r.type!=="Spaces"&&(r.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[r.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),o=r,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Z0(t,n)||" ",disallowEmpty:!1,explicit:!1}}function K0(e){let t;return e.eat(xi),t=vf(e),e.eat(_l),t.explicit=!0,e.charCode()===yf&&(e.pos++,t.disallowEmpty=!0),t}function Y0(e){let t=e.charCode();if(t<128&&no[t]===1)return H0(e);switch(t){case _l:break;case xi:return Hn(e,K0(e));case El:return e.nextCharCode()===mi?G0(e):J0(e);case xp:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===xp?2:1))};case vp:return e.pos++,e.eat(vp),{type:"Combinator",value:"&&"};case Fl:return e.pos++,{type:"Comma"};case mi:return Hn(e,{type:"String",value:U0(e)});case M0:case $0:case B0:case L0:case N0:return{type:"Spaces",value:gi(e)};case W0:return t=e.nextCharCode(),t<128&&no[t]===1?(e.pos++,{type:"AtKeyword",name:Jn(e)}):Ua(e);case wf:case Cl:case rl:case xl:case yf:break;case hi:if(t=e.nextCharCode(),t<48||t>57)return Ua(e);break;default:return Ua(e)}}function Sl(e){let t=new j0(e),n=vf(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var Kr=function(){};function Sp(e){return typeof e=="function"?e:Kr}function kf(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=Kr,i=Kr;if(typeof t=="function"?o=t:t&&(o=Sp(t.enter),i=Sp(t.leave)),o===Kr&&i===Kr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var X0={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}};function Q0(e){let t=[];return wi(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function ek(e,t){return typeof e=="string"?Q0(e):t.generate(e,X0)}var ee={type:"Match"},ne={type:"Mismatch"},Tl={type:"DisallowEmpty"},tk=40,nk=41;function De(e,t,n){return t===ee&&n===ne||e===ee&&t===ee&&n===ee?e:(e.type==="If"&&e.else===ne&&t===ee&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function xf(e){return e.length>2&&e.charCodeAt(e.length-2)===tk&&e.charCodeAt(e.length-1)===nk}function Tp(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&xf(e.name)}function ol(e,t,n){switch(e){case" ":{let r=ee;for(let o=t.length-1;o>=0;o--){let i=t[o];r=De(i,r,ne)}return r}case"|":{let r=ne,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(Tp(s)&&(o===null&&i>0&&Tp(t[i-1])&&(o=Object.create(null),r=De({type:"Enum",map:o},ee,r)),o!==null)){let a=(xf(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=De(s,ee,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=ne;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=ol(e,t.filter(function(a){return a!==i}),!1):s=ee,r=De(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ee:ne;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=ol(e,t.filter(function(a){return a!==i}),!0):s=ee,r=De(i,s,r)}return r}}}function rk(e){let t=ee,n=Al(e.term);if(e.max===0)n=De(n,Tl,ne),t=De(n,null,ne),t.then=De(ee,ee,t),e.comma&&(t.then.else=De({type:"Comma",syntax:e},t,ne));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ee&&(t=De({type:"Comma",syntax:e},t,ne)),t=De(n,De(ee,ee,t),ne);if(e.min===0)t=De(ee,ee,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ee&&(t=De({type:"Comma",syntax:e},t,ne)),t=De(n,t,ne);return t}function Al(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=ol(e.combinator,e.terms.map(Al),!1);return e.disallowEmpty&&(t=De(t,Tl,ne)),t}case"Multiplier":return rk(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function il(e,t){return typeof e=="string"&&(e=Sl(e)),{type:"MatchGraph",match:Al(e),syntax:t||null,source:e}}var{hasOwnProperty:Ap}=Object.prototype,ok=0,ik=1,sl=2,Cf=3,Op="Match",sk="Mismatch",ak="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Pp=15e3,lk=0;function ck(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Va(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function uk(e){return e.type!==9?!1:e.value!=="?"}function Ip(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||uk(e)}function Rp(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function dk(e,t,n){function r(){do M++,_=M<e.length?e[M]:null;while(_!==null&&(_.type===13||_.type===25))}function o(Z){let N=M+Z;return N<e.length?e[N]:null}function i(Z,N){return{nextState:Z,matchStack:O,syntaxStack:p,thenStack:f,tokenIndex:M,prev:N}}function s(Z){f={nextState:Z,matchStack:O,syntaxStack:p,prev:f}}function a(Z){m=i(Z,m)}function l(){O={type:ik,syntax:t.syntax,token:_,prev:O},r(),g=null,M>C&&(C=M)}function c(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},O={type:sl,syntax:t.syntax,token:O.token,prev:O}}function u(){O.type===sl?O=O.prev:O={type:Cf,syntax:p.syntax,token:O.token,prev:O},p=p.prev}let p=null,f=null,m=null,g=null,v=0,E=null,_=null,M=-1,C=0,O={type:ok,syntax:null,token:null,prev:null};for(r();E===null&&++v<Pp;)switch(t.type){case"Match":if(f===null){if(_!==null&&(M!==e.length-1||_.value!=="\\0"&&_.value!=="\\9")){t=ne;break}E=Op;break}if(t=f.nextState,t===Tl)if(f.matchStack===O){t=ne;break}else t=ee;for(;f.syntaxStack!==p;)u();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(m===null||M>m.tokenIndex)&&(m=g,g=!1);else if(m===null){E=sk;break}t=m.nextState,f=m.thenStack,p=m.syntaxStack,O=m.matchStack,M=m.tokenIndex,_=M<e.length?e[M]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==ne&&a(t.else),t.then!==ee&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let A=t.syntax.terms;if(t.index===A.length){if(t.mask===0||t.syntax.all){t=ne;break}t=ee;break}if(t.mask===(1<<A.length)-1){t=ee;break}for(;t.index<A.length;t.index++){let h=1<<t.index;if((t.mask&h)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|h}),t=A[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(_!==null){let A=_.value.toLowerCase();if(A.indexOf("\\")!==-1&&(A=A.replace(/\\[09].*$/,"")),Ap.call(t.map,A)){t=t.map[A];break}}t=ne;break;case"Generic":{let A=p!==null?p.opts:null,h=M+Math.floor(t.fn(_,o,A));if(!isNaN(h)&&h>M){for(;M<h;)l();t=ee}else t=ne;break}case"Type":case"Property":{let A=t.type==="Type"?"types":"properties",h=Ap.call(n,A)?n[A][t.name]:null;if(!h||!h.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&_!==null&&t.type==="Type"&&(t.name==="custom-ident"&&_.type===1||t.name==="length"&&_.value==="0")){g===null&&(g=i(t,m)),t=ne;break}c(),t=h.match;break}case"Keyword":{let A=t.name;if(_!==null){let h=_.value;if(h.indexOf("\\")!==-1&&(h=h.replace(/\\[09].*$/,"")),Va(h,A)){l(),t=ee;break}}t=ne;break}case"AtKeyword":case"Function":if(_!==null&&Va(_.value,t.name)){l(),t=ee;break}t=ne;break;case"Token":if(_!==null&&_.value===t.value){l(),t=ee;break}t=ne;break;case"Comma":_!==null&&_.type===18?Ip(O.token)?t=ne:(l(),t=Rp(_)?ne:ee):t=Ip(O.token)||Rp(_)?ee:ne;break;case"String":let Z="",N=M;for(;N<e.length&&Z.length<t.value.length;N++)Z+=e[N].value;if(Va(Z,t.value)){for(;M<N;)l();t=ee}else t=ne;break;default:throw new Error("Unknown node type: "+t.type)}switch(lk+=v,E){case null:console.warn("[csstree-match] BREAK after "+Pp+" iterations"),E=ak,O=null;break;case Op:for(;p!==null;)u();break;default:O=null}return{tokens:e,reason:E,iterations:v,match:O,longestMatch:C}}function jp(e,t,n){let r=dk(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=ck(o).prev;o!==null;){switch(o.type){case sl:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Cf:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}var Ff={};j(Ff,{getTrace:()=>Ef,isKeyword:()=>mk,isProperty:()=>fk,isType:()=>pk});function Ef(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function pk(e,t){return Ol(this,e,n=>n.type==="Type"&&n.name===t)}function fk(e,t){return Ol(this,e,n=>n.type==="Property"&&n.name===t)}function mk(e){return Ol(this,e,t=>t.type==="Keyword")}function Ol(e,t,n){let r=Ef.call(e,t);return r===null?!1:r.some(n)}function _f(e){return"node"in e?e.node:_f(e.match[0])}function Sf(e){return"node"in e?e.node:Sf(e.match[e.match.length-1])}function $p(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=_f(a),c=Sf(a);e.syntax.walk(t,function(u,p,f){if(u===l){let m=new me;do{if(m.appendData(p.data),p.data===c)break;p=p.next}while(p!==null);s.push({parent:f,nodes:m})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}var{hasOwnProperty:Qr}=Object.prototype;function Ga(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Bp(e){return!!e&&Ga(e.offset)&&Ga(e.line)&&Ga(e.column)}function hk(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(Qr.call(n,o)!==!1){if(o==="type")n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!Bp(n.loc.start))o+=".start";else if(!Bp(n.loc.end))o+=".end";else continue;i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let s=0;!i&&s<t[o].length;s++){let a=t[o][s];switch(a){case String:i=typeof n[o]=="string";break;case Boolean:i=typeof n[o]=="boolean";break;case null:i=n[o]===null;break;default:typeof a=="string"?i=n[o]&&n[o].type===a:Array.isArray(a)&&(i=n[o]instanceof me)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)Qr.call(t,o)&&Qr.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function gk(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(Qr.call(n,i)===!1)continue;let s=[],a=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];for(let l=0;l<a.length;l++){let c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ")}return{docs:o,check:hk(e,r)}}function yk(e){let t={};if(e.node){for(let n in e.node)if(Qr.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=gk(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var bk=il(cf.join(" | "));function al(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:vi(e[o].syntax,{compact:t}));return r}function wk(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:vi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&al(i.descriptors,t,n)};return r}function Dk(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function Ke(e,t,n){return{matched:e,iterations:n,error:t,...Ff}}function Un(e,t,n,r){let o=ek(n,e.syntax),i;return Dk(o)?Ke(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=jp(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=jp(o,t.match,e),!i.match)?Ke(null,new Yv(i.reason,t.syntax,n,i),i.iterations):Ke(i.match,null,i.iterations))}var Np=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=bk,this.syntax=t,this.generic=!1,this.units={...nl},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||yk(e),e){if(e.units)for(let r of Object.keys(nl))Array.isArray(e.units[r])&&(this.units[r]=e.units[r]);if(e.types)for(let r in e.types)this.addType_(r,e.types[r]);if(e.generic){this.generic=!0;for(let[r,o]of Object.entries(D0(this.units)))this.addType_(r,o)}if(e.atrules)for(let r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(let r in e.properties)this.addProperty_(r,e.properties[r])}}checkStructure(e){function t(o,i){r.push({node:o,message:i})}let n=this.structure,r=[];return this.syntax.walk(e,function(o){n.hasOwnProperty(o.type)?n[o.type].check(o,t):t(o,"Unknown node type `"+o.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let o={type:t,name:n},i={type:t,name:n,parent:r,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?i.match=il(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:Sl(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:il(i.syntax,o)}),i.match}})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new qr("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!Un(this,r.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=Ma(t);if(!r.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[o.name]&&!r.descriptors[o.basename])return new qr("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new qr("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Ke(null,n);let r=this.getAtrule(e);return r.prelude?Un(this,r.prelude,t||"",!1):Ke(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Ke(null,r);let o=this.getAtrule(e),i=Ma(t);return Un(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?Ke(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Dp(e).custom)return Ke(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Ke(null,n):Un(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Un(this,n,t,!1):Ke(null,new qr("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?Ke(null,new qr("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Un(this,e,t,!1))}findValueFragments(e,t,n,r){return $p(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return $p(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:o=>{r.push.apply(r,this.findDeclarationValueFragments(o,t,n))}}),r}getAtrule(e,t=!0){let n=Ma(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=Dp(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),s.syntax!==null&&kf(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;let l=a.type==="Type"?r.types:r.properties,c=a.type==="Type"?t:n;(!hasOwnProperty.call(l,a.name)||e(r,a.name,c,l[a.name]))&&i.set(o,!0)},this)}let t=new Map,n=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter(r=>t.get(r)),n=[...n.keys()].filter(r=>n.get(r)),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:al(this.types,!t,e),properties:al(this.properties,!t,e),atrules:wk(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function qa(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Lp(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let i of Object.keys(o))t.includes(i)&&(n[r][i]=o[i])}return n}function ll(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},l=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){l.prelude=s.prelude?qa(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?qa(l.descriptors[c],u):null;Object.keys(l.descriptors).length||(l.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=qa(n[r][i],s);break;case"scope":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]={...n[r][i],...s};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...Lp(o,["parse"])};break;case"node":n[r]={...e[r],...Lp(o,["name","structure","parse","generate","walkContext"])};break}return n}function Tf(e){let t=Ov(e),n=Gv(e),r=zv(e),{fromPlainObject:o,toPlainObject:i}=Wv(n),s={lexer:null,createLexer:a=>new Np(a,s,s.lexer.structure),tokenize:wi,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=ll({},e);return Tf(typeof a=="function"?a(l,Object.assign):ll(l,a))}};return s.lexer=new Np({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var vk=e=>Tf(ll({},e)),kk={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}}},Pl={};j(Pl,{AnPlusB:()=>Af,Atrule:()=>Pf,AtrulePrelude:()=>Rf,AttributeSelector:()=>$f,Block:()=>Lf,Brackets:()=>Wf,CDC:()=>Vf,CDO:()=>qf,ClassSelector:()=>Hf,Combinator:()=>Kf,Comment:()=>Xf,Declaration:()=>em,DeclarationList:()=>rm,Dimension:()=>im,Function:()=>am,Hash:()=>cm,IdSelector:()=>fm,Identifier:()=>dm,MediaFeature:()=>hm,MediaQuery:()=>ym,MediaQueryList:()=>wm,NestingSelector:()=>vm,Nth:()=>xm,Number:()=>Fm,Operator:()=>_m,Parentheses:()=>Tm,Percentage:()=>Om,PseudoClassSelector:()=>Im,PseudoElementSelector:()=>jm,Ratio:()=>Bm,Raw:()=>Lm,Rule:()=>zm,Selector:()=>Um,SelectorList:()=>Gm,String:()=>Jm,StyleSheet:()=>Xm,TypeSelector:()=>eh,UnicodeRange:()=>nh,Url:()=>sh,Value:()=>dh,WhiteSpace:()=>fh});var Af={};j(Af,{generate:()=>Ek,name:()=>Ck,parse:()=>Of,structure:()=>Fk});var ot=43,Ie=45,ai=110,rn=!0,xk=!1;function li(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===ot||r===Ie)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)ge(this.charCodeAt(n))||this.error("Integer is expected",n)}function Vn(e){return li.call(this,0,e)}function $t(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case ai:n="N is expected";break;case Ie:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function Ja(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(ot,e)||this.isDelim(Ie,e)){t=this.isDelim(ot,e)?ot:Ie;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Vn.call(this,rn))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==ot&&n!==Ie&&this.error("Number sign is expected")),Vn.call(this,t!==0),t===Ie?"-"+this.consume(10):this.consume(10)}var Ck="AnPlusB",Fk={a:[String,null],b:[String,null]};function Of(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Vn.call(this,xk),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ie))switch(t="-1",$t.call(this,1,ai),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ja.call(this);break;case 3:$t.call(this,2,Ie),this.next(),this.skipSC(),Vn.call(this,rn),n="-"+this.consume(10);break;default:$t.call(this,2,Ie),li.call(this,3,rn),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(ot)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(ot)&&(r=1,this.next()),$t.call(this,0,ai),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ja.call(this);break;case 2:$t.call(this,1,Ie),this.next(),this.skipSC(),Vn.call(this,rn),n="-"+this.consume(10);break;default:$t.call(this,1,Ie),li.call(this,2,rn),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===ot||r===Ie,i=this.tokenStart+o;for(;i<this.tokenEnd&&ge(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),$t.call(this,i-this.tokenStart,ai),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=Ja.call(this)):($t.call(this,i-this.tokenStart+1,Ie),i+2===this.tokenEnd?(this.next(),this.skipSC(),Vn.call(this,rn),n="-"+this.consume(10)):(li.call(this,i-this.tokenStart+2,rn),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===ot&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===ot&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Ek(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var Pf={};j(Pf,{generate:()=>Ok,name:()=>Sk,parse:()=>If,structure:()=>Ak,walkContext:()=>Tk});function Mp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function _k(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var Sk="Atrule",Tk="atrule",Ak={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function If(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Mp):o=Mp.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(_k.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function Ok(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Rf={};j(Rf,{generate:()=>jk,name:()=>Pk,parse:()=>jf,structure:()=>Rk,walkContext:()=>Ik});var Pk="AtrulePrelude",Ik="atrulePrelude",Rk={children:[[]]};function jf(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function jk(e){this.children(e)}var $f={};j($f,{generate:()=>Uk,name:()=>zk,parse:()=>Nf,structure:()=>Wk});var $k=36,Bf=42,ci=61,Bk=94,cl=124,Nk=126;function Lk(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Bf)?(t=!0,this.next()):this.isDelim(cl)||this.eat(1),this.isDelim(cl)?this.charCodeAt(this.tokenStart+1)!==ci?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Mk(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==ci&&t!==Nk&&t!==Bk&&t!==$k&&t!==Bf&&t!==cl&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==ci&&(this.isDelim(ci)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var zk="AttributeSelector",Wk={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Nf(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=Lk.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=Mk.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function Uk(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var Lf={};j(Lf,{generate:()=>Zk,name:()=>qk,parse:()=>zf,structure:()=>Hk,walkContext:()=>Jk});var Vk=38;function Mf(e){return this.Raw(e,null,!0)}function zp(){return this.parseWithFallback(this.Rule,Mf)}function Wp(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Gk(){if(this.tokenType===17)return Wp.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Wp);return this.tokenType===17&&this.next(),e}var qk="Block",Jk="block",Hk={children:[["Atrule","Rule","Declaration"]]};function zf(e){let t=e?Gk:zp,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Mf));break;default:e&&this.isDelim(Vk)?r.push(zp.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function Zk(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var Wf={};j(Wf,{generate:()=>Xk,name:()=>Kk,parse:()=>Uf,structure:()=>Yk});var Kk="Brackets",Yk={children:[[]]};function Uf(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function Xk(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Vf={};j(Vf,{generate:()=>tx,name:()=>Qk,parse:()=>Gf,structure:()=>ex});var Qk="CDC",ex=[];function Gf(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function tx(){this.token(15,"-->")}var qf={};j(qf,{generate:()=>ox,name:()=>nx,parse:()=>Jf,structure:()=>rx});var nx="CDO",rx=[];function Jf(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function ox(){this.token(14,"<!--")}var Hf={};j(Hf,{generate:()=>lx,name:()=>sx,parse:()=>Zf,structure:()=>ax});var ix=46,sx="ClassSelector",ax={name:String};function Zf(){return this.eatDelim(ix),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function lx(e){this.token(9,"."),this.token(1,e.name)}var Kf={};j(Kf,{generate:()=>mx,name:()=>px,parse:()=>Yf,structure:()=>fx});var cx=43,Up=47,ux=62,dx=126,px="Combinator",fx={name:String};function Yf(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case ux:case cx:case dx:this.next();break;case Up:this.next(),this.eatIdent("deep"),this.eatDelim(Up);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function mx(e){this.tokenize(e.name)}var Xf={};j(Xf,{generate:()=>wx,name:()=>yx,parse:()=>Qf,structure:()=>bx});var hx=42,gx=47,yx="Comment",bx={value:String};function Qf(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===hx&&this.charCodeAt(t-1)===gx&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function wx(e){this.token(25,"/*"+e.value+"*/")}var em={};j(em,{generate:()=>Ox,name:()=>Sx,parse:()=>nm,structure:()=>Ax,walkContext:()=>Tx});var tm=33,Dx=35,vx=36,kx=38,xx=42,Cx=43,Vp=47;function Fx(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Ex(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function _x(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(tm)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var Sx="Declaration",Tx="declaration",Ax={important:[Boolean,String],property:String,value:["Value","Raw"]};function nm(){let e=this.tokenStart,t=this.tokenIndex,n=Px.call(this),r=vl(n),o=r?this.parseCustomProperty:this.parseValue,i=r?Ex:Fx,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(_x,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(tm)&&(s=Ix.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function Ox(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function Px(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case xx:case vx:case Cx:case Dx:case kx:this.next();break;case Vp:this.next(),this.isDelim(Vp)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function Ix(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var rm={};j(rm,{generate:()=>Bx,name:()=>jx,parse:()=>om,structure:()=>$x});var Rx=38;function Ha(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var jx="DeclarationList",$x={children:[["Declaration","Atrule","Rule"]]};function om(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Ha));break;default:this.isDelim(Rx)?e.push(this.parseWithFallback(this.Rule,Ha)):e.push(this.parseWithFallback(this.Declaration,Ha))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Bx(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var im={};j(im,{generate:()=>Mx,name:()=>Nx,parse:()=>sm,structure:()=>Lx});var Nx="Dimension",Lx={value:String,unit:String};function sm(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Mx(e){this.token(12,e.value+e.unit)}var am={};j(am,{generate:()=>Vx,name:()=>zx,parse:()=>lm,structure:()=>Ux,walkContext:()=>Wx});var zx="Function",Wx="function",Ux={name:String,children:[[]]};function lm(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function Vx(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var cm={};j(cm,{generate:()=>Hx,name:()=>qx,parse:()=>um,structure:()=>Jx,xxx:()=>Gx});var Gx="XXX",qx="Hash",Jx={value:String};function um(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Hx(e){this.token(4,"#"+e.value)}var dm={};j(dm,{generate:()=>Yx,name:()=>Zx,parse:()=>pm,structure:()=>Kx});var Zx="Identifier",Kx={name:String};function pm(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Yx(e){this.token(1,e.name)}var fm={};j(fm,{generate:()=>eC,name:()=>Xx,parse:()=>mm,structure:()=>Qx});var Xx="IdSelector",Qx={name:String};function mm(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function eC(e){this.token(9,"#"+e.name)}var hm={};j(hm,{generate:()=>rC,name:()=>tC,parse:()=>gm,structure:()=>nC});var tC="MediaFeature",nC={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function gm(){let e=this.tokenStart,t,n=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function rC(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var ym={};j(ym,{generate:()=>sC,name:()=>oC,parse:()=>bm,structure:()=>iC});var oC="MediaQuery",iC={children:[["Identifier","MediaFeature","WhiteSpace"]]};function bm(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function sC(e){this.children(e)}var wm={};j(wm,{generate:()=>cC,name:()=>aC,parse:()=>Dm,structure:()=>lC});var aC="MediaQueryList",lC={children:[["MediaQuery"]]};function Dm(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function cC(e){this.children(e,()=>this.token(18,","))}var vm={};j(vm,{generate:()=>fC,name:()=>dC,parse:()=>km,structure:()=>pC});var uC=38,dC="NestingSelector",pC={};function km(){let e=this.tokenStart;return this.eatDelim(uC),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function fC(){this.token(9,"&")}var xm={};j(xm,{generate:()=>gC,name:()=>mC,parse:()=>Cm,structure:()=>hC});var mC="Nth",hC={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Cm(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function gC(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var Fm={};j(Fm,{generate:()=>wC,name:()=>yC,parse:()=>Em,structure:()=>bC});var yC="Number",bC={value:String};function Em(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function wC(e){this.token(10,e.value)}var _m={};j(_m,{generate:()=>kC,name:()=>DC,parse:()=>Sm,structure:()=>vC});var DC="Operator",vC={value:String};function Sm(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function kC(e){this.tokenize(e.value)}var Tm={};j(Tm,{generate:()=>FC,name:()=>xC,parse:()=>Am,structure:()=>CC});var xC="Parentheses",CC={children:[[]]};function Am(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function FC(e){this.token(21,"("),this.children(e),this.token(22,")")}var Om={};j(Om,{generate:()=>SC,name:()=>EC,parse:()=>Pm,structure:()=>_C});var EC="Percentage",_C={value:String};function Pm(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function SC(e){this.token(11,e.value+"%")}var Im={};j(Im,{generate:()=>PC,name:()=>TC,parse:()=>Rm,structure:()=>OC,walkContext:()=>AC});var TC="PseudoClassSelector",AC="function",OC={name:String,children:[["Raw"],null]};function Rm(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function PC(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var jm={};j(jm,{generate:()=>$C,name:()=>IC,parse:()=>$m,structure:()=>jC,walkContext:()=>RC});var IC="PseudoElementSelector",RC="function",jC={name:String,children:[["Raw"],null]};function $m(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function $C(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Bm={};j(Bm,{generate:()=>zC,name:()=>LC,parse:()=>Nm,structure:()=>MC});var BC=47,NC=46;function Gp(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!ge(n)&&n!==NC&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var LC="Ratio",MC={left:String,right:String};function Nm(){let e=this.tokenStart,t=Gp.call(this),n;return this.skipSC(),this.eatDelim(BC),n=Gp.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function zC(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Lm={};j(Lm,{generate:()=>GC,name:()=>UC,parse:()=>Mm,structure:()=>VC});function WC(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var UC="Raw",VC={value:String};function Mm(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=WC.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function GC(e){this.tokenize(e.value)}var zm={};j(zm,{generate:()=>KC,name:()=>JC,parse:()=>Wm,structure:()=>ZC,walkContext:()=>HC});function qp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function qC(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var JC="Rule",HC="rule",ZC={prelude:["SelectorList","Raw"],block:["Block"]};function Wm(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(qC,qp):n=qp.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function KC(e){this.node(e.prelude),this.node(e.block)}var Um={};j(Um,{generate:()=>QC,name:()=>YC,parse:()=>Vm,structure:()=>XC});var YC="Selector",XC={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Vm(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function QC(e){this.children(e)}var Gm={};j(Gm,{generate:()=>rF,name:()=>eF,parse:()=>qm,structure:()=>nF,walkContext:()=>tF});var eF="SelectorList",tF="selector",nF={children:[["Selector","Raw"]]};function qm(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function rF(e){this.children(e,()=>this.token(18,","))}var Jm={};j(Jm,{generate:()=>aF,name:()=>iF,parse:()=>Ym,structure:()=>sF});var oF={};j(oF,{decode:()=>Il,encode:()=>Km});var ul=92,Hm=34,Zm=39;function Il(e){let t=e.length,n=e.charCodeAt(0),r=n===Hm||n===Zm?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===ul){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),Ye(ul,a)){let l=s-1,c=sn(e,l);s=c-1,i+=bl(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function Km(e,t){let n=t?"'":'"',r=t?Zm:Hm,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===ul?(o+="\\"+e.charAt(s),i=!1):(i&&(Nt(a)||on(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var iF="String",sF={value:String};function Ym(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Il(this.consume(5))}}function aF(e){this.token(5,Km(e.value))}var Xm={};j(Xm,{generate:()=>pF,name:()=>cF,parse:()=>Qm,structure:()=>dF,walkContext:()=>uF});var lF=33;function Jp(e){return this.Raw(e,null,!1)}var cF="StyleSheet",uF="stylesheet",dF={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Qm(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==lF){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,Jp);break;default:n=this.parseWithFallback(this.Rule,Jp)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function pF(e){this.children(e)}var eh={};j(eh,{generate:()=>gF,name:()=>mF,parse:()=>th,structure:()=>hF});var fF=42,Hp=124;function Za(){this.tokenType!==1&&this.isDelim(fF)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var mF="TypeSelector",hF={name:String};function th(){let e=this.tokenStart;return this.isDelim(Hp)?(this.next(),Za.call(this)):(Za.call(this),this.isDelim(Hp)&&(this.next(),Za.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function gF(e){this.tokenize(e.name)}var nh={};j(nh,{generate:()=>vF,name:()=>wF,parse:()=>ih,structure:()=>DF});var rh=43,oh=45,dl=63;function Yr(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===oh&&t&&n!==0)return Yr.call(this,e+n+1,!1),-1;Nt(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function ri(e){let t=0;for(;this.isDelim(dl);)++t>e&&this.error("Too many question marks"),this.next()}function yF(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===rh?"Plus sign":"Hyphen minus")+" is expected")}function bF(){let e=0;switch(this.tokenType){case 10:if(e=Yr.call(this,1,!0),this.isDelim(dl)){ri.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){yF.call(this,oh),Yr.call(this,1,!1);break}break;case 12:e=Yr.call(this,1,!0),e>0&&ri.call(this,6-e);break;default:if(this.eatDelim(rh),this.tokenType===1){e=Yr.call(this,0,!0),e>0&&ri.call(this,6-e);break}if(this.isDelim(dl)){this.next(),ri.call(this,5);break}this.error("Hex digit or question mark is expected")}}var wF="UnicodeRange",DF={value:String};function ih(){let e=this.tokenStart;return this.eatIdent("u"),bF.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function vF(e){this.tokenize(e.value)}var sh={};j(sh,{generate:()=>TF,name:()=>_F,parse:()=>uh,structure:()=>SF});var kF={};j(kF,{decode:()=>lh,encode:()=>ch});var xF=32,pl=92,CF=34,FF=39,EF=40,ah=41;function lh(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===ah?t-2:t-1,o="";for(;n<r&&on(e.charCodeAt(n));)n++;for(;n<r&&on(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===pl){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),Ye(pl,s)){let a=i-1,l=sn(e,a);i=l-1,o+=bl(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function ch(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===xF||o===pl||o===CF||o===FF||o===EF||o===ah?(t+="\\"+e.charAt(r),n=!1):(n&&Nt(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var _F="Url",SF={value:String};function uh(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=lh(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Il(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function TF(e){this.token(7,ch(e.value))}var dh={};j(dh,{generate:()=>PF,name:()=>AF,parse:()=>ph,structure:()=>OF});var AF="Value",OF={children:[[]]};function ph(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function PF(e){this.children(e)}var fh={};j(fh,{generate:()=>$F,name:()=>RF,parse:()=>mh,structure:()=>jF});var IF=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),RF="WhiteSpace",jF={value:String};function mh(){return this.eat(13),IF}function $F(e){this.token(13,e.value)}var BF={generic:!0,...kk,node:Pl},hh={};j(hh,{AtrulePrelude:()=>UF,Selector:()=>e1,Value:()=>r1});var NF=35,LF=42,Zp=43,MF=45,zF=47,WF=117;function gh(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,WF)&&this.cmpChar(this.tokenStart+1,Zp)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===zF||t===LF||t===Zp||t===MF)return this.Operator();t===NF&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var UF={getNode:gh},VF=35,GF=38,qF=42,JF=43,HF=47,Kp=46,ZF=62,KF=124,YF=126;function XF(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function QF(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Kp&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case JF:case ZF:case YF:case HF:return this.Combinator();case Kp:return this.ClassSelector();case qF:case KF:return this.TypeSelector();case VF:return this.IdSelector();case GF:return this.NestingSelector()}break}}}var e1={onWhiteSpace:XF,getNode:QF};function t1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function n1(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function Yp(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var r1={getNode:gh,onWhiteSpace(e,t){Yp(e)&&(e.value=" "+e.value),Yp(t.last)&&(t.last.value+=" ")},expression:t1,var:n1},o1={parse:{prelude:null,block(){return this.Block(!0)}}},i1={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},s1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},a1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},l1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function c1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function u1(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):yh.call(this)}function yh(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(c1,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(u1,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var d1={parse:{prelude(){let e=yh.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},p1={"font-face":o1,import:i1,media:s1,nest:a1,page:l1,supports:d1},nn={parse(){return this.createSingleNodeList(this.SelectorList())}},Ka={parse(){return this.createSingleNodeList(this.Selector())}},Xp={parse(){return this.createSingleNodeList(this.Identifier())}},oi={parse(){return this.createSingleNodeList(this.Nth())}},f1={dir:Xp,has:nn,lang:Xp,matches:nn,is:nn,"-moz-any":nn,"-webkit-any":nn,where:nn,not:nn,"nth-child":oi,"nth-last-child":oi,"nth-last-of-type":oi,"nth-of-type":oi,slotted:Ka,host:Ka,"host-context":Ka},bh={};j(bh,{AnPlusB:()=>Of,Atrule:()=>If,AtrulePrelude:()=>jf,AttributeSelector:()=>Nf,Block:()=>zf,Brackets:()=>Uf,CDC:()=>Gf,CDO:()=>Jf,ClassSelector:()=>Zf,Combinator:()=>Yf,Comment:()=>Qf,Declaration:()=>nm,DeclarationList:()=>om,Dimension:()=>sm,Function:()=>lm,Hash:()=>um,IdSelector:()=>mm,Identifier:()=>pm,MediaFeature:()=>gm,MediaQuery:()=>bm,MediaQueryList:()=>Dm,NestingSelector:()=>km,Nth:()=>Cm,Number:()=>Em,Operator:()=>Sm,Parentheses:()=>Am,Percentage:()=>Pm,PseudoClassSelector:()=>Rm,PseudoElementSelector:()=>$m,Ratio:()=>Nm,Raw:()=>Mm,Rule:()=>Wm,Selector:()=>Vm,SelectorList:()=>qm,String:()=>Ym,StyleSheet:()=>Qm,TypeSelector:()=>th,UnicodeRange:()=>ih,Url:()=>uh,Value:()=>ph,WhiteSpace:()=>mh});var m1={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:hh,atrule:p1,pseudo:f1,node:bh},h1={node:Pl},g1=vk({...BF,...m1,...h1});var y1={};j(y1,{decode:()=>b1,encode:()=>w1});var Qp=92;function b1(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===Qp){if(r===t)break;if(o=e.charCodeAt(++r),Ye(Qp,o)){let i=r-1,s=sn(e,i);r=s-1,n+=bl(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function w1(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0){t+="\uFFFD";continue}if(r<=31||r===127||r>=48&&r<=57&&(n===0||n===1&&e.charCodeAt(0)===45)){t+="\\"+r.toString(16)+" ";continue}gl(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var{tokenize:kO,parse:wh,generate:Dh,lexer:xO,createLexer:CO,walk:vh,find:FO,findLast:EO,findAll:_O,toPlainObject:SO,fromPlainObject:TO,fork:AO}=g1;var kh=w(require("prettier"));V();var D1=`
|
|
54
|
+
--`+new Array((n||t.length)+1).join("-")+"^"})}var Ov=9,Pv=10,Iv=12,Rv=13,$v=32,jv=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==Rv&&t!==Pv&&t!==Iv&&t!==$v&&t!==Ov)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new yf(e,this.str,this.pos)}},Bv=9,Nv=10,Lv=12,Mv=13,Uv=32,bf=33,Cl=35,kp=38,fi=39,wf=40,zv=41,Df=42,Fl=43,El=44,xp=45,_l=60,vf=62,ol=63,Wv=64,ki=91,Sl=93,mi=123,Cp=124,Fp=125,Ep=8734,to=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),_p={" ":1,"&&":2,"||":3,"|":4};function hi(e){return e.substringToPos(e.findWsEnd(e.pos))}function Hn(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||to[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function gi(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Vv(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Sp(e){let t=null,n=null;return e.eat(mi),t=gi(e),e.charCode()===El?(e.pos++,e.charCode()!==Fp&&(n=gi(e))):n=t,e.eat(Fp),{min:Number(t),max:n?Number(n):0}}function Gv(e){let t=null,n=!1;switch(e.charCode()){case Df:e.pos++,t={min:0,max:0};break;case Fl:e.pos++,t={min:1,max:0};break;case ol:e.pos++,t={min:0,max:1};break;case Cl:e.pos++,n=!0,e.charCode()===mi?t=Sp(e):e.charCode()===ol?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case mi:t=Sp(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Zn(e,t){let n=Gv(e);return n!==null?(n.term=t,e.charCode()===Cl&&e.charCodeAt(e.pos-1)===Fl?Zn(e,n):n):t}function Va(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function qv(e){let t;return e.eat(_l),e.eat(fi),t=Hn(e),e.eat(fi),e.eat(vf),Zn(e,{type:"Property",name:t})}function Jv(e){let t=null,n=null,r=1;return e.eat(ki),e.charCode()===xp&&(e.peek(),r=-1),r==-1&&e.charCode()===Ep?e.peek():(t=r*Number(gi(e)),to[e.charCode()]!==0&&(t+=Hn(e))),hi(e),e.eat(El),hi(e),e.charCode()===Ep?e.peek():(r=1,e.charCode()===xp&&(e.peek(),r=-1),n=r*Number(gi(e)),to[e.charCode()]!==0&&(n+=Hn(e))),e.eat(Sl),{type:"Range",min:t,max:n}}function Hv(e){let t,n=null;return e.eat(_l),t=Hn(e),e.charCode()===wf&&e.nextCharCode()===zv&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===ki&&(hi(e),n=Jv(e)),e.eat(vf),Zn(e,{type:"Type",name:t,opts:n})}function Zv(e){let t=Hn(e);return e.charCode()===wf?(e.pos++,{type:"Function",name:t}):Zn(e,{type:"Keyword",name:t})}function Kv(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>_p[o]-_p[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function kf(e){let t=[],n={},r,o=null,i=e.pos;for(;r=Xv(e);)r.type!=="Spaces"&&(r.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[r.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),o=r,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Kv(t,n)||" ",disallowEmpty:!1,explicit:!1}}function Yv(e){let t;return e.eat(ki),t=kf(e),e.eat(Sl),t.explicit=!0,e.charCode()===bf&&(e.pos++,t.disallowEmpty=!0),t}function Xv(e){let t=e.charCode();if(t<128&&to[t]===1)return Zv(e);switch(t){case Sl:break;case ki:return Zn(e,Yv(e));case _l:return e.nextCharCode()===fi?qv(e):Hv(e);case Cp:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Cp?2:1))};case kp:return e.pos++,e.eat(kp),{type:"Combinator",value:"&&"};case El:return e.pos++,{type:"Comma"};case fi:return Zn(e,{type:"String",value:Vv(e)});case Uv:case Bv:case Nv:case Mv:case Lv:return{type:"Spaces",value:hi(e)};case Wv:return t=e.nextCharCode(),t<128&&to[t]===1?(e.pos++,{type:"AtKeyword",name:Hn(e)}):Va(e);case Df:case Fl:case ol:case Cl:case bf:break;case mi:if(t=e.nextCharCode(),t<48||t>57)return Va(e);break;default:return Va(e)}}function Tl(e){let t=new jv(e),n=kf(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var Zr=function(){};function Tp(e){return typeof e=="function"?e:Zr}function xf(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=Zr,i=Zr;if(typeof t=="function"?o=t:t&&(o=Tp(t.enter),i=Tp(t.leave)),o===Zr&&i===Zr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var Qv={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}};function ek(e){let t=[];return bi(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function tk(e,t){return typeof e=="string"?ek(e):t.generate(e,Qv)}var ee={type:"Match"},ne={type:"Mismatch"},Al={type:"DisallowEmpty"},nk=40,rk=41;function De(e,t,n){return t===ee&&n===ne||e===ee&&t===ee&&n===ee?e:(e.type==="If"&&e.else===ne&&t===ee&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Cf(e){return e.length>2&&e.charCodeAt(e.length-2)===nk&&e.charCodeAt(e.length-1)===rk}function Ap(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Cf(e.name)}function il(e,t,n){switch(e){case" ":{let r=ee;for(let o=t.length-1;o>=0;o--){let i=t[o];r=De(i,r,ne)}return r}case"|":{let r=ne,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(Ap(s)&&(o===null&&i>0&&Ap(t[i-1])&&(o=Object.create(null),r=De({type:"Enum",map:o},ee,r)),o!==null)){let a=(Cf(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=De(s,ee,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=ne;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=il(e,t.filter(function(a){return a!==i}),!1):s=ee,r=De(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ee:ne;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=il(e,t.filter(function(a){return a!==i}),!0):s=ee,r=De(i,s,r)}return r}}}function ok(e){let t=ee,n=Ol(e.term);if(e.max===0)n=De(n,Al,ne),t=De(n,null,ne),t.then=De(ee,ee,t),e.comma&&(t.then.else=De({type:"Comma",syntax:e},t,ne));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ee&&(t=De({type:"Comma",syntax:e},t,ne)),t=De(n,De(ee,ee,t),ne);if(e.min===0)t=De(ee,ee,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ee&&(t=De({type:"Comma",syntax:e},t,ne)),t=De(n,t,ne);return t}function Ol(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=il(e.combinator,e.terms.map(Ol),!1);return e.disallowEmpty&&(t=De(t,Al,ne)),t}case"Multiplier":return ok(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function sl(e,t){return typeof e=="string"&&(e=Tl(e)),{type:"MatchGraph",match:Ol(e),syntax:t||null,source:e}}var{hasOwnProperty:Op}=Object.prototype,ik=0,sk=1,al=2,Ff=3,Pp="Match",ak="Mismatch",lk="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Ip=15e3,ck=0;function uk(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Ga(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function dk(e){return e.type!==9?!1:e.value!=="?"}function Rp(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||dk(e)}function $p(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function pk(e,t,n){function r(){do M++,_=M<e.length?e[M]:null;while(_!==null&&(_.type===13||_.type===25))}function o(Z){let N=M+Z;return N<e.length?e[N]:null}function i(Z,N){return{nextState:Z,matchStack:O,syntaxStack:p,thenStack:f,tokenIndex:M,prev:N}}function s(Z){f={nextState:Z,matchStack:O,syntaxStack:p,prev:f}}function a(Z){m=i(Z,m)}function l(){O={type:sk,syntax:t.syntax,token:_,prev:O},r(),y=null,M>C&&(C=M)}function c(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},O={type:al,syntax:t.syntax,token:O.token,prev:O}}function u(){O.type===al?O=O.prev:O={type:Ff,syntax:p.syntax,token:O.token,prev:O},p=p.prev}let p=null,f=null,m=null,y=null,v=0,E=null,_=null,M=-1,C=0,O={type:ik,syntax:null,token:null,prev:null};for(r();E===null&&++v<Ip;)switch(t.type){case"Match":if(f===null){if(_!==null&&(M!==e.length-1||_.value!=="\\0"&&_.value!=="\\9")){t=ne;break}E=Pp;break}if(t=f.nextState,t===Al)if(f.matchStack===O){t=ne;break}else t=ee;for(;f.syntaxStack!==p;)u();f=f.prev;break;case"Mismatch":if(y!==null&&y!==!1)(m===null||M>m.tokenIndex)&&(m=y,y=!1);else if(m===null){E=ak;break}t=m.nextState,f=m.thenStack,p=m.syntaxStack,O=m.matchStack,M=m.tokenIndex,_=M<e.length?e[M]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==ne&&a(t.else),t.then!==ee&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let A=t.syntax.terms;if(t.index===A.length){if(t.mask===0||t.syntax.all){t=ne;break}t=ee;break}if(t.mask===(1<<A.length)-1){t=ee;break}for(;t.index<A.length;t.index++){let g=1<<t.index;if((t.mask&g)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|g}),t=A[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(_!==null){let A=_.value.toLowerCase();if(A.indexOf("\\")!==-1&&(A=A.replace(/\\[09].*$/,"")),Op.call(t.map,A)){t=t.map[A];break}}t=ne;break;case"Generic":{let A=p!==null?p.opts:null,g=M+Math.floor(t.fn(_,o,A));if(!isNaN(g)&&g>M){for(;M<g;)l();t=ee}else t=ne;break}case"Type":case"Property":{let A=t.type==="Type"?"types":"properties",g=Op.call(n,A)?n[A][t.name]:null;if(!g||!g.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(y!==!1&&_!==null&&t.type==="Type"&&(t.name==="custom-ident"&&_.type===1||t.name==="length"&&_.value==="0")){y===null&&(y=i(t,m)),t=ne;break}c(),t=g.match;break}case"Keyword":{let A=t.name;if(_!==null){let g=_.value;if(g.indexOf("\\")!==-1&&(g=g.replace(/\\[09].*$/,"")),Ga(g,A)){l(),t=ee;break}}t=ne;break}case"AtKeyword":case"Function":if(_!==null&&Ga(_.value,t.name)){l(),t=ee;break}t=ne;break;case"Token":if(_!==null&&_.value===t.value){l(),t=ee;break}t=ne;break;case"Comma":_!==null&&_.type===18?Rp(O.token)?t=ne:(l(),t=$p(_)?ne:ee):t=Rp(O.token)||$p(_)?ee:ne;break;case"String":let Z="",N=M;for(;N<e.length&&Z.length<t.value.length;N++)Z+=e[N].value;if(Ga(Z,t.value)){for(;M<N;)l();t=ee}else t=ne;break;default:throw new Error("Unknown node type: "+t.type)}switch(ck+=v,E){case null:console.warn("[csstree-match] BREAK after "+Ip+" iterations"),E=lk,O=null;break;case Pp:for(;p!==null;)u();break;default:O=null}return{tokens:e,reason:E,iterations:v,match:O,longestMatch:C}}function jp(e,t,n){let r=pk(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=uk(o).prev;o!==null;){switch(o.type){case al:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Ff:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}var Ef={};$(Ef,{getTrace:()=>_f,isKeyword:()=>hk,isProperty:()=>mk,isType:()=>fk});function _f(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function fk(e,t){return Pl(this,e,n=>n.type==="Type"&&n.name===t)}function mk(e,t){return Pl(this,e,n=>n.type==="Property"&&n.name===t)}function hk(e){return Pl(this,e,t=>t.type==="Keyword")}function Pl(e,t,n){let r=_f.call(e,t);return r===null?!1:r.some(n)}function Sf(e){return"node"in e?e.node:Sf(e.match[0])}function Tf(e){return"node"in e?e.node:Tf(e.match[e.match.length-1])}function Bp(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=Sf(a),c=Tf(a);e.syntax.walk(t,function(u,p,f){if(u===l){let m=new me;do{if(m.appendData(p.data),p.data===c)break;p=p.next}while(p!==null);s.push({parent:f,nodes:m})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}var{hasOwnProperty:Xr}=Object.prototype;function qa(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Np(e){return!!e&&qa(e.offset)&&qa(e.line)&&qa(e.column)}function gk(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(Xr.call(n,o)!==!1){if(o==="type")n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!Np(n.loc.start))o+=".start";else if(!Np(n.loc.end))o+=".end";else continue;i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let s=0;!i&&s<t[o].length;s++){let a=t[o][s];switch(a){case String:i=typeof n[o]=="string";break;case Boolean:i=typeof n[o]=="boolean";break;case null:i=n[o]===null;break;default:typeof a=="string"?i=n[o]&&n[o].type===a:Array.isArray(a)&&(i=n[o]instanceof me)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)Xr.call(t,o)&&Xr.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function yk(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(Xr.call(n,i)===!1)continue;let s=[],a=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];for(let l=0;l<a.length;l++){let c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ")}return{docs:o,check:gk(e,r)}}function bk(e){let t={};if(e.node){for(let n in e.node)if(Xr.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=yk(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var wk=sl(uf.join(" | "));function ll(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:Di(e[o].syntax,{compact:t}));return r}function Dk(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:Di(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&ll(i.descriptors,t,n)};return r}function vk(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function Ke(e,t,n){return{matched:e,iterations:n,error:t,...Ef}}function Vn(e,t,n,r){let o=tk(n,e.syntax),i;return vk(o)?Ke(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=jp(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=jp(o,t.match,e),!i.match)?Ke(null,new X0(i.reason,t.syntax,n,i),i.iterations):Ke(i.match,null,i.iterations))}var Lp=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=wk,this.syntax=t,this.generic=!1,this.units={...rl},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||bk(e),e){if(e.units)for(let r of Object.keys(rl))Array.isArray(e.units[r])&&(this.units[r]=e.units[r]);if(e.types)for(let r in e.types)this.addType_(r,e.types[r]);if(e.generic){this.generic=!0;for(let[r,o]of Object.entries(vv(this.units)))this.addType_(r,o)}if(e.atrules)for(let r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(let r in e.properties)this.addProperty_(r,e.properties[r])}}checkStructure(e){function t(o,i){r.push({node:o,message:i})}let n=this.structure,r=[];return this.syntax.walk(e,function(o){n.hasOwnProperty(o.type)?n[o.type].check(o,t):t(o,"Unknown node type `"+o.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let o={type:t,name:n},i={type:t,name:n,parent:r,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?i.match=sl(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:Tl(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:sl(i.syntax,o)}),i.match}})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Gr("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!Vn(this,r.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=Ua(t);if(!r.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[o.name]&&!r.descriptors[o.basename])return new Gr("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new Gr("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Ke(null,n);let r=this.getAtrule(e);return r.prelude?Vn(this,r.prelude,t||"",!1):Ke(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Ke(null,r);let o=this.getAtrule(e),i=Ua(t);return Vn(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?Ke(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(vp(e).custom)return Ke(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Ke(null,n):Vn(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Vn(this,n,t,!1):Ke(null,new Gr("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?Ke(null,new Gr("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Vn(this,e,t,!1))}findValueFragments(e,t,n,r){return Bp(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return Bp(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:o=>{r.push.apply(r,this.findDeclarationValueFragments(o,t,n))}}),r}getAtrule(e,t=!0){let n=Ua(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=vp(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),s.syntax!==null&&xf(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;let l=a.type==="Type"?r.types:r.properties,c=a.type==="Type"?t:n;(!hasOwnProperty.call(l,a.name)||e(r,a.name,c,l[a.name]))&&i.set(o,!0)},this)}let t=new Map,n=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter(r=>t.get(r)),n=[...n.keys()].filter(r=>n.get(r)),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:ll(this.types,!t,e),properties:ll(this.properties,!t,e),atrules:Dk(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function Ja(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Mp(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let i of Object.keys(o))t.includes(i)&&(n[r][i]=o[i])}return n}function cl(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},l=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){l.prelude=s.prelude?Ja(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?Ja(l.descriptors[c],u):null;Object.keys(l.descriptors).length||(l.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Ja(n[r][i],s);break;case"scope":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]={...n[r][i],...s};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...Mp(o,["parse"])};break;case"node":n[r]={...e[r],...Mp(o,["name","structure","parse","generate","walkContext"])};break}return n}function Af(e){let t=P0(e),n=q0(e),r=z0(e),{fromPlainObject:o,toPlainObject:i}=W0(n),s={lexer:null,createLexer:a=>new Lp(a,s,s.lexer.structure),tokenize:bi,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=cl({},e);return Af(typeof a=="function"?a(l,Object.assign):cl(l,a))}};return s.lexer=new Lp({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var kk=e=>Af(cl({},e)),xk={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}}},Il={};$(Il,{AnPlusB:()=>Of,Atrule:()=>If,AtrulePrelude:()=>$f,AttributeSelector:()=>Bf,Block:()=>Mf,Brackets:()=>Wf,CDC:()=>Gf,CDO:()=>Jf,ClassSelector:()=>Zf,Combinator:()=>Yf,Comment:()=>Qf,Declaration:()=>tm,DeclarationList:()=>om,Dimension:()=>sm,Function:()=>lm,Hash:()=>um,IdSelector:()=>mm,Identifier:()=>pm,MediaFeature:()=>gm,MediaQuery:()=>bm,MediaQueryList:()=>Dm,NestingSelector:()=>km,Nth:()=>Cm,Number:()=>Em,Operator:()=>Sm,Parentheses:()=>Am,Percentage:()=>Pm,PseudoClassSelector:()=>Rm,PseudoElementSelector:()=>jm,Ratio:()=>Nm,Raw:()=>Mm,Rule:()=>zm,Selector:()=>Vm,SelectorList:()=>qm,String:()=>Hm,StyleSheet:()=>Qm,TypeSelector:()=>th,UnicodeRange:()=>rh,Url:()=>ah,Value:()=>ph,WhiteSpace:()=>mh});var Of={};$(Of,{generate:()=>_k,name:()=>Fk,parse:()=>Pf,structure:()=>Ek});var ot=43,Ie=45,si=110,on=!0,Ck=!1;function ai(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===ot||r===Ie)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)ge(this.charCodeAt(n))||this.error("Integer is expected",n)}function Gn(e){return ai.call(this,0,e)}function Bt(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case si:n="N is expected";break;case Ie:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function Ha(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(ot,e)||this.isDelim(Ie,e)){t=this.isDelim(ot,e)?ot:Ie;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Gn.call(this,on))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==ot&&n!==Ie&&this.error("Number sign is expected")),Gn.call(this,t!==0),t===Ie?"-"+this.consume(10):this.consume(10)}var Fk="AnPlusB",Ek={a:[String,null],b:[String,null]};function Pf(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Gn.call(this,Ck),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ie))switch(t="-1",Bt.call(this,1,si),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ha.call(this);break;case 3:Bt.call(this,2,Ie),this.next(),this.skipSC(),Gn.call(this,on),n="-"+this.consume(10);break;default:Bt.call(this,2,Ie),ai.call(this,3,on),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(ot)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(ot)&&(r=1,this.next()),Bt.call(this,0,si),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ha.call(this);break;case 2:Bt.call(this,1,Ie),this.next(),this.skipSC(),Gn.call(this,on),n="-"+this.consume(10);break;default:Bt.call(this,1,Ie),ai.call(this,2,on),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===ot||r===Ie,i=this.tokenStart+o;for(;i<this.tokenEnd&&ge(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),Bt.call(this,i-this.tokenStart,si),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=Ha.call(this)):(Bt.call(this,i-this.tokenStart+1,Ie),i+2===this.tokenEnd?(this.next(),this.skipSC(),Gn.call(this,on),n="-"+this.consume(10)):(ai.call(this,i-this.tokenStart+2,on),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===ot&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===ot&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function _k(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var If={};$(If,{generate:()=>Pk,name:()=>Tk,parse:()=>Rf,structure:()=>Ok,walkContext:()=>Ak});function Up(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Sk(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var Tk="Atrule",Ak="atrule",Ok={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Rf(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Up):o=Up.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(Sk.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function Pk(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var $f={};$($f,{generate:()=>jk,name:()=>Ik,parse:()=>jf,structure:()=>$k,walkContext:()=>Rk});var Ik="AtrulePrelude",Rk="atrulePrelude",$k={children:[[]]};function jf(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function jk(e){this.children(e)}var Bf={};$(Bf,{generate:()=>Vk,name:()=>zk,parse:()=>Lf,structure:()=>Wk});var Bk=36,Nf=42,li=61,Nk=94,ul=124,Lk=126;function Mk(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Nf)?(t=!0,this.next()):this.isDelim(ul)||this.eat(1),this.isDelim(ul)?this.charCodeAt(this.tokenStart+1)!==li?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Uk(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==li&&t!==Lk&&t!==Nk&&t!==Bk&&t!==Nf&&t!==ul&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==li&&(this.isDelim(li)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var zk="AttributeSelector",Wk={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Lf(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=Mk.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=Uk.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function Vk(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var Mf={};$(Mf,{generate:()=>Kk,name:()=>Jk,parse:()=>zf,structure:()=>Zk,walkContext:()=>Hk});var Gk=38;function Uf(e){return this.Raw(e,null,!0)}function zp(){return this.parseWithFallback(this.Rule,Uf)}function Wp(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function qk(){if(this.tokenType===17)return Wp.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Wp);return this.tokenType===17&&this.next(),e}var Jk="Block",Hk="block",Zk={children:[["Atrule","Rule","Declaration"]]};function zf(e){let t=e?qk:zp,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Uf));break;default:e&&this.isDelim(Gk)?r.push(zp.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function Kk(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var Wf={};$(Wf,{generate:()=>Qk,name:()=>Yk,parse:()=>Vf,structure:()=>Xk});var Yk="Brackets",Xk={children:[[]]};function Vf(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function Qk(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Gf={};$(Gf,{generate:()=>nx,name:()=>ex,parse:()=>qf,structure:()=>tx});var ex="CDC",tx=[];function qf(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function nx(){this.token(15,"-->")}var Jf={};$(Jf,{generate:()=>ix,name:()=>rx,parse:()=>Hf,structure:()=>ox});var rx="CDO",ox=[];function Hf(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function ix(){this.token(14,"<!--")}var Zf={};$(Zf,{generate:()=>cx,name:()=>ax,parse:()=>Kf,structure:()=>lx});var sx=46,ax="ClassSelector",lx={name:String};function Kf(){return this.eatDelim(sx),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function cx(e){this.token(9,"."),this.token(1,e.name)}var Yf={};$(Yf,{generate:()=>hx,name:()=>fx,parse:()=>Xf,structure:()=>mx});var ux=43,Vp=47,dx=62,px=126,fx="Combinator",mx={name:String};function Xf(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case dx:case ux:case px:this.next();break;case Vp:this.next(),this.eatIdent("deep"),this.eatDelim(Vp);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function hx(e){this.tokenize(e.name)}var Qf={};$(Qf,{generate:()=>Dx,name:()=>bx,parse:()=>em,structure:()=>wx});var gx=42,yx=47,bx="Comment",wx={value:String};function em(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===gx&&this.charCodeAt(t-1)===yx&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Dx(e){this.token(25,"/*"+e.value+"*/")}var tm={};$(tm,{generate:()=>Px,name:()=>Tx,parse:()=>rm,structure:()=>Ox,walkContext:()=>Ax});var nm=33,vx=35,kx=36,xx=38,Cx=42,Fx=43,Gp=47;function Ex(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function _x(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Sx(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(nm)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var Tx="Declaration",Ax="declaration",Ox={important:[Boolean,String],property:String,value:["Value","Raw"]};function rm(){let e=this.tokenStart,t=this.tokenIndex,n=Ix.call(this),r=kl(n),o=r?this.parseCustomProperty:this.parseValue,i=r?_x:Ex,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(Sx,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(nm)&&(s=Rx.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function Px(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function Ix(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Cx:case kx:case Fx:case vx:case xx:this.next();break;case Gp:this.next(),this.isDelim(Gp)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function Rx(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var om={};$(om,{generate:()=>Nx,name:()=>jx,parse:()=>im,structure:()=>Bx});var $x=38;function Za(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var jx="DeclarationList",Bx={children:[["Declaration","Atrule","Rule"]]};function im(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Za));break;default:this.isDelim($x)?e.push(this.parseWithFallback(this.Rule,Za)):e.push(this.parseWithFallback(this.Declaration,Za))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Nx(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var sm={};$(sm,{generate:()=>Ux,name:()=>Lx,parse:()=>am,structure:()=>Mx});var Lx="Dimension",Mx={value:String,unit:String};function am(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Ux(e){this.token(12,e.value+e.unit)}var lm={};$(lm,{generate:()=>Gx,name:()=>zx,parse:()=>cm,structure:()=>Vx,walkContext:()=>Wx});var zx="Function",Wx="function",Vx={name:String,children:[[]]};function cm(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function Gx(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var um={};$(um,{generate:()=>Zx,name:()=>Jx,parse:()=>dm,structure:()=>Hx,xxx:()=>qx});var qx="XXX",Jx="Hash",Hx={value:String};function dm(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Zx(e){this.token(4,"#"+e.value)}var pm={};$(pm,{generate:()=>Xx,name:()=>Kx,parse:()=>fm,structure:()=>Yx});var Kx="Identifier",Yx={name:String};function fm(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Xx(e){this.token(1,e.name)}var mm={};$(mm,{generate:()=>tC,name:()=>Qx,parse:()=>hm,structure:()=>eC});var Qx="IdSelector",eC={name:String};function hm(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function tC(e){this.token(9,"#"+e.name)}var gm={};$(gm,{generate:()=>oC,name:()=>nC,parse:()=>ym,structure:()=>rC});var nC="MediaFeature",rC={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function ym(){let e=this.tokenStart,t,n=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function oC(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var bm={};$(bm,{generate:()=>aC,name:()=>iC,parse:()=>wm,structure:()=>sC});var iC="MediaQuery",sC={children:[["Identifier","MediaFeature","WhiteSpace"]]};function wm(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function aC(e){this.children(e)}var Dm={};$(Dm,{generate:()=>uC,name:()=>lC,parse:()=>vm,structure:()=>cC});var lC="MediaQueryList",cC={children:[["MediaQuery"]]};function vm(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function uC(e){this.children(e,()=>this.token(18,","))}var km={};$(km,{generate:()=>mC,name:()=>pC,parse:()=>xm,structure:()=>fC});var dC=38,pC="NestingSelector",fC={};function xm(){let e=this.tokenStart;return this.eatDelim(dC),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function mC(){this.token(9,"&")}var Cm={};$(Cm,{generate:()=>yC,name:()=>hC,parse:()=>Fm,structure:()=>gC});var hC="Nth",gC={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Fm(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function yC(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var Em={};$(Em,{generate:()=>DC,name:()=>bC,parse:()=>_m,structure:()=>wC});var bC="Number",wC={value:String};function _m(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function DC(e){this.token(10,e.value)}var Sm={};$(Sm,{generate:()=>xC,name:()=>vC,parse:()=>Tm,structure:()=>kC});var vC="Operator",kC={value:String};function Tm(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function xC(e){this.tokenize(e.value)}var Am={};$(Am,{generate:()=>EC,name:()=>CC,parse:()=>Om,structure:()=>FC});var CC="Parentheses",FC={children:[[]]};function Om(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function EC(e){this.token(21,"("),this.children(e),this.token(22,")")}var Pm={};$(Pm,{generate:()=>TC,name:()=>_C,parse:()=>Im,structure:()=>SC});var _C="Percentage",SC={value:String};function Im(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function TC(e){this.token(11,e.value+"%")}var Rm={};$(Rm,{generate:()=>IC,name:()=>AC,parse:()=>$m,structure:()=>PC,walkContext:()=>OC});var AC="PseudoClassSelector",OC="function",PC={name:String,children:[["Raw"],null]};function $m(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function IC(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var jm={};$(jm,{generate:()=>BC,name:()=>RC,parse:()=>Bm,structure:()=>jC,walkContext:()=>$C});var RC="PseudoElementSelector",$C="function",jC={name:String,children:[["Raw"],null]};function Bm(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function BC(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Nm={};$(Nm,{generate:()=>zC,name:()=>MC,parse:()=>Lm,structure:()=>UC});var NC=47,LC=46;function qp(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!ge(n)&&n!==LC&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var MC="Ratio",UC={left:String,right:String};function Lm(){let e=this.tokenStart,t=qp.call(this),n;return this.skipSC(),this.eatDelim(NC),n=qp.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function zC(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Mm={};$(Mm,{generate:()=>qC,name:()=>VC,parse:()=>Um,structure:()=>GC});function WC(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var VC="Raw",GC={value:String};function Um(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=WC.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function qC(e){this.tokenize(e.value)}var zm={};$(zm,{generate:()=>YC,name:()=>HC,parse:()=>Wm,structure:()=>KC,walkContext:()=>ZC});function Jp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function JC(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var HC="Rule",ZC="rule",KC={prelude:["SelectorList","Raw"],block:["Block"]};function Wm(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(JC,Jp):n=Jp.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function YC(e){this.node(e.prelude),this.node(e.block)}var Vm={};$(Vm,{generate:()=>e1,name:()=>XC,parse:()=>Gm,structure:()=>QC});var XC="Selector",QC={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Gm(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function e1(e){this.children(e)}var qm={};$(qm,{generate:()=>o1,name:()=>t1,parse:()=>Jm,structure:()=>r1,walkContext:()=>n1});var t1="SelectorList",n1="selector",r1={children:[["Selector","Raw"]]};function Jm(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function o1(e){this.children(e,()=>this.token(18,","))}var Hm={};$(Hm,{generate:()=>l1,name:()=>s1,parse:()=>Xm,structure:()=>a1});var i1={};$(i1,{decode:()=>Rl,encode:()=>Ym});var dl=92,Zm=34,Km=39;function Rl(e){let t=e.length,n=e.charCodeAt(0),r=n===Zm||n===Km?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===dl){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),Ye(dl,a)){let l=s-1,c=an(e,l);s=c-1,i+=wl(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function Ym(e,t){let n=t?"'":'"',r=t?Km:Zm,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===dl?(o+="\\"+e.charAt(s),i=!1):(i&&(Lt(a)||sn(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var s1="String",a1={value:String};function Xm(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Rl(this.consume(5))}}function l1(e){this.token(5,Ym(e.value))}var Qm={};$(Qm,{generate:()=>f1,name:()=>u1,parse:()=>eh,structure:()=>p1,walkContext:()=>d1});var c1=33;function Hp(e){return this.Raw(e,null,!1)}var u1="StyleSheet",d1="stylesheet",p1={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function eh(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==c1){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,Hp);break;default:n=this.parseWithFallback(this.Rule,Hp)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function f1(e){this.children(e)}var th={};$(th,{generate:()=>y1,name:()=>h1,parse:()=>nh,structure:()=>g1});var m1=42,Zp=124;function Ka(){this.tokenType!==1&&this.isDelim(m1)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var h1="TypeSelector",g1={name:String};function nh(){let e=this.tokenStart;return this.isDelim(Zp)?(this.next(),Ka.call(this)):(Ka.call(this),this.isDelim(Zp)&&(this.next(),Ka.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function y1(e){this.tokenize(e.name)}var rh={};$(rh,{generate:()=>k1,name:()=>D1,parse:()=>sh,structure:()=>v1});var oh=43,ih=45,pl=63;function Kr(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===ih&&t&&n!==0)return Kr.call(this,e+n+1,!1),-1;Lt(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function ni(e){let t=0;for(;this.isDelim(pl);)++t>e&&this.error("Too many question marks"),this.next()}function b1(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===oh?"Plus sign":"Hyphen minus")+" is expected")}function w1(){let e=0;switch(this.tokenType){case 10:if(e=Kr.call(this,1,!0),this.isDelim(pl)){ni.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){b1.call(this,ih),Kr.call(this,1,!1);break}break;case 12:e=Kr.call(this,1,!0),e>0&&ni.call(this,6-e);break;default:if(this.eatDelim(oh),this.tokenType===1){e=Kr.call(this,0,!0),e>0&&ni.call(this,6-e);break}if(this.isDelim(pl)){this.next(),ni.call(this,5);break}this.error("Hex digit or question mark is expected")}}var D1="UnicodeRange",v1={value:String};function sh(){let e=this.tokenStart;return this.eatIdent("u"),w1.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function k1(e){this.tokenize(e.value)}var ah={};$(ah,{generate:()=>A1,name:()=>S1,parse:()=>dh,structure:()=>T1});var x1={};$(x1,{decode:()=>ch,encode:()=>uh});var C1=32,fl=92,F1=34,E1=39,_1=40,lh=41;function ch(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===lh?t-2:t-1,o="";for(;n<r&&sn(e.charCodeAt(n));)n++;for(;n<r&&sn(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===fl){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),Ye(fl,s)){let a=i-1,l=an(e,a);i=l-1,o+=wl(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function uh(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===C1||o===fl||o===F1||o===E1||o===_1||o===lh?(t+="\\"+e.charAt(r),n=!1):(n&&Lt(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var S1="Url",T1={value:String};function dh(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=ch(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Rl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function A1(e){this.token(7,uh(e.value))}var ph={};$(ph,{generate:()=>I1,name:()=>O1,parse:()=>fh,structure:()=>P1});var O1="Value",P1={children:[[]]};function fh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function I1(e){this.children(e)}var mh={};$(mh,{generate:()=>B1,name:()=>$1,parse:()=>hh,structure:()=>j1});var R1=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),$1="WhiteSpace",j1={value:String};function hh(){return this.eat(13),R1}function B1(e){this.token(13,e.value)}var N1={generic:!0,...xk,node:Il},gh={};$(gh,{AtrulePrelude:()=>V1,Selector:()=>tF,Value:()=>oF});var L1=35,M1=42,Kp=43,U1=45,z1=47,W1=117;function yh(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,W1)&&this.cmpChar(this.tokenStart+1,Kp)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===z1||t===M1||t===Kp||t===U1)return this.Operator();t===L1&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var V1={getNode:yh},G1=35,q1=38,J1=42,H1=43,Z1=47,Yp=46,K1=62,Y1=124,X1=126;function Q1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function eF(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Yp&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case H1:case K1:case X1:case Z1:return this.Combinator();case Yp:return this.ClassSelector();case J1:case Y1:return this.TypeSelector();case G1:return this.IdSelector();case q1:return this.NestingSelector()}break}}}var tF={onWhiteSpace:Q1,getNode:eF};function nF(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function rF(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function Xp(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var oF={getNode:yh,onWhiteSpace(e,t){Xp(e)&&(e.value=" "+e.value),Xp(t.last)&&(t.last.value+=" ")},expression:nF,var:rF},iF={parse:{prelude:null,block(){return this.Block(!0)}}},sF={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},aF={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},lF={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},cF={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function uF(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function dF(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):bh.call(this)}function bh(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(uF,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(dF,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var pF={parse:{prelude(){let e=bh.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},fF={"font-face":iF,import:sF,media:aF,nest:lF,page:cF,supports:pF},rn={parse(){return this.createSingleNodeList(this.SelectorList())}},Ya={parse(){return this.createSingleNodeList(this.Selector())}},Qp={parse(){return this.createSingleNodeList(this.Identifier())}},ri={parse(){return this.createSingleNodeList(this.Nth())}},mF={dir:Qp,has:rn,lang:Qp,matches:rn,is:rn,"-moz-any":rn,"-webkit-any":rn,where:rn,not:rn,"nth-child":ri,"nth-last-child":ri,"nth-last-of-type":ri,"nth-of-type":ri,slotted:Ya,host:Ya,"host-context":Ya},wh={};$(wh,{AnPlusB:()=>Pf,Atrule:()=>Rf,AtrulePrelude:()=>jf,AttributeSelector:()=>Lf,Block:()=>zf,Brackets:()=>Vf,CDC:()=>qf,CDO:()=>Hf,ClassSelector:()=>Kf,Combinator:()=>Xf,Comment:()=>em,Declaration:()=>rm,DeclarationList:()=>im,Dimension:()=>am,Function:()=>cm,Hash:()=>dm,IdSelector:()=>hm,Identifier:()=>fm,MediaFeature:()=>ym,MediaQuery:()=>wm,MediaQueryList:()=>vm,NestingSelector:()=>xm,Nth:()=>Fm,Number:()=>_m,Operator:()=>Tm,Parentheses:()=>Om,Percentage:()=>Im,PseudoClassSelector:()=>$m,PseudoElementSelector:()=>Bm,Ratio:()=>Lm,Raw:()=>Um,Rule:()=>Wm,Selector:()=>Gm,SelectorList:()=>Jm,String:()=>Xm,StyleSheet:()=>eh,TypeSelector:()=>nh,UnicodeRange:()=>sh,Url:()=>dh,Value:()=>fh,WhiteSpace:()=>hh});var hF={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:gh,atrule:fF,pseudo:mF,node:wh},gF={node:Il},yF=kk({...N1,...hF,...gF});var bF={};$(bF,{decode:()=>wF,encode:()=>DF});var ef=92;function wF(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===ef){if(r===t)break;if(o=e.charCodeAt(++r),Ye(ef,o)){let i=r-1,s=an(e,i);r=s-1,n+=wl(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function DF(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0){t+="\uFFFD";continue}if(r<=31||r===127||r>=48&&r<=57&&(n===0||n===1&&e.charCodeAt(0)===45)){t+="\\"+r.toString(16)+" ";continue}yl(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var{tokenize:xO,parse:Dh,generate:vh,lexer:CO,createLexer:FO,walk:kh,find:EO,findLast:_O,findAll:SO,toPlainObject:TO,fromPlainObject:AO,fork:OO}=yF;var xh=w(require("prettier"));G();var vF=`
|
|
55
55
|
.w-icon-slider-right:before {
|
|
56
56
|
content: "\\e600";
|
|
57
57
|
}
|
|
@@ -70,19 +70,19 @@ in your project root.`),new y(a)}}function np(e){if(!(e===void 0||e===!1)){if(ty
|
|
|
70
70
|
.w-icon-file-upload-icon:before {
|
|
71
71
|
content: "\\e903";
|
|
72
72
|
}
|
|
73
|
-
`;function
|
|
73
|
+
`;function kF(e,t,n){let r=["ClassSelector","AttributeSelector","IdSelector","PseudoClassSelector"],o=["type"],i=["root"];if(e.type==="Rule"&&(e.prelude.type==="SelectorList"&&(e.prelude.children=new me().fromArray(e.prelude.children.toArray().filter(s=>{let a="children"in s?s.children?.first:null;return!a||!r.includes(a.type)?!1:a.type==="PseudoClassSelector"?i.includes(a.name):a.type==="AttributeSelector"?!o.includes(a.name.name):!0}))),e.prelude.children.toArray().length===0&&n)){n.remove(t);return}}function Ch(e){if(d.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=Dh(e);return kh(t,{enter:kF}),xh.default.format([vh(t),vF].join(`
|
|
74
74
|
|
|
75
|
-
`).trim(),{parser:"css"})}catch{return d.warn("There was a problem skipping global tags from CSS. Falling back to normal global CSS."),e}}function
|
|
75
|
+
`).trim(),{parser:"css"})}catch{return d.warn("There was a problem skipping global tags from CSS. Falling back to normal global CSS."),e}}function Fh(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var Yn=class extends Error{};function xF(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}async function CF(e){switch(e.status){case 400:{let t=await e.text(),n=xF(t);throw new Yn(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new Yn("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new Yn("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new Yn(`Something went wrong (HTTP ${e.status}).`)}}async function FF(e){try{let{siteId:t,host:n,authToken:r,components:o,cssModules:i,relativeHrefRoot:s}=e,a=new URLSearchParams({cssModules:i?"true":"false"});o&&a.append("components",o),s!==void 0&&a.append("relativeHrefRoot",String(s));let l=`?${a.toString()}`,c=await K(`${n}/devlink/${t}${l}`,{headers:{Authorization:`Bearer ${r}`},timeout:6e4});return c.ok?await c.json():CF(c)}catch(t){throw new h(t,{skipLogging:!0})}}async function $l(e){try{let t=await FF(e);if(!t.files||!Array.isArray(t.files))throw new h("Invalid response format from V1 API: expected 'files' array");let n=EF(t.files,e);return await Ko(n,e.rootDir,!0),{messages:t.messages}}catch(t){throw t instanceof h?t:new h(t,{skipLogging:!0})}}function EF(e,t){let n=t.skipTagSelectors===!0,r=t.envVariables&&Object.keys(t.envVariables).length>0;if(!n&&!t.fileExtensions&&!r)return e;let o=e;if(n){let{rest:i,globalCss:s}=Fh(e);if(s){let a=Ch(s.content);o=[...i,{...s,content:a}]}}return!t.fileExtensions&&!r?o:o.map(i=>{let s=i.path,a=i.content;if(t.fileExtensions){let{js:l,css:c}=t.fileExtensions;if(l){let u=l.startsWith(".")?l:`.${l}`;s=s.replace(/\.(jsx|js)$/,u)}if(c){let u=c.startsWith(".")?c:`.${c}`;s=s.replace(/\.css$/,u)}}return r&&(a=_F(a,t.envVariables)),{path:s,content:a}})}function _F(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replace(new RegExp(`DEVLINK_ENV_${r}`,"g"),o.trim()),e):e}var ln=w(require("process"));G();we();ft();var jl=class{config;error;constructor(t,n){this.config=t,this.error=n}stripPII(t=""){return t.replace(/\/(.*)webflow-cli/gi,"/REDACTED_PII/webflow-cli/").replace(/\/(.*)node_modules/gi,"/REDACTED_PII/node_modules")}sendTelemetry(){let t=this.config,n=this.error;K(`${t.host}/devlink/${t.siteId}/telemetry`,{headers:{Authorization:`Bearer ${t.authToken}`,"Content-Type":"application/json"},method:"post",body:JSON.stringify({cause:n.cause,message:n.message,name:n.name,stack:this.stripPII(n.stack),platform:ln.default.platform,node:ln.default.version})})}async storeChoice(t){try{return fe({devlink:{allowTelemetry:t}})}catch{let r=await Mn();await $d({...r,allowTelemetry:t})}}async prompt(){let t=this.config;if(d.error(this.error),t.allowTelemetry===!0)d.info("Sending crash report telemetry..."),this.sendTelemetry();else if(t.allowTelemetry===!1){d.info("Skipping crash report telemetry...");return}else d.info("Telemetry is enabled. Crash reports help us improve Webflow CLI."),d.info("To opt out, run: webflow auth telemetry --disable"),await this.storeChoice(!0),d.info("Sending crash report telemetry..."),this.sendTelemetry()}};function xi(e){return async function(n){ln.default.removeListener("uncaughtException",xi),ln.default.removeListener("unhandledRejection",xi);let r=await Ho(e);if(!r)return;await new jl(r,n).prompt()}}function Eh(e){ln.default.on("uncaughtException",xi(e)),ln.default.on("unhandledRejection",xi(e))}je();G();He();we();Bl();async function _h(e,t){let n=Date.now(),{manifest:r}=X(),{accessToken:o,siteId:i}=await ye(r,{site:t?.site,apiToken:t?.apiToken}),s={...o?{authToken:o}:{},...i?{siteId:i}:{},...e&&e.length>0?{components:Jo(e),overwriteModule:!1}:{overwriteModule:!0}};Eh(s);let a=await Ho(s);if(!a)return Nl.default.exit();let l;try{l=J.forDevlinkSync(a)}catch(u){d.debug(`Failed to initialize telemetry: ${u}`)}await l?.sendUsage("devlink_sync_start",{specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot});let c=d.spinner(`Exporting components into ${a.rootDir}`);try{let{messages:u}=await $l(a);c.succeed(`Successfully exported components into ${a.rootDir} folder`),Ci(u);let p=Date.now()-n;await l?.sendUsage("devlink_sync_success",{duration:p,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let p=u instanceof Error?u.message:String(u);c.fail(`Failed to export components: ${p}`);let f=Date.now()-n;throw await l?.sendError(u instanceof Error?u:new Error(String(u)),"devlink_sync_failure",{duration:f,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot,configOverrides:Object.keys(s),argv:Nl.default.argv.slice(2)}),u}}Vl();var Wt=require("commander");var Ji=require("path"),ir=require("@webflow/data-types");de();var Oi=require("fs"),Gl=w(require("md5"));function ql(e,t){try{let n=(0,Oi.statSync)(e),r=(0,Oi.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,Gl.default)(r),size:n.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function ro(e,t,n){try{let r=new Blob([e]).size,o=Buffer.from(e,"utf-8");return{value:o,meta:{title:t.replace(/^.*[\\\/]/,""),fileHash:(0,Gl.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var Zh=w(require("node-fetch")),Kh=w(require("form-data"));async function oo(e,t){let n={...t.fields,file:e.value},r=new Kh.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,Zh.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});jF(o)}function jF(e){switch(e.status){case 200:case 201:return;case 403:throw new Error("Unauthorized. Please check your AWS access key");default:throw new Error(`Something went wrong when uploading the file: ${e.statusText}`)}}G();we();je();de();ft();function BF({apiToken:e=process.env.WEBFLOW_API_TOKEN??process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN,siteId:t=process.env.WEBFLOW_SITE_ID,libraryTarget:n=process.env.WEBFLOW_LIBRARY_TARGET}){if(!e)throw new Error("No API token provided");if(n==="site"){if(!t)throw new Error("No site provided");return{baseUrl:`${R}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${R}/v2/workspaces`,authToken:e}}function NF(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function LF(e){if(e.ok)return;if(e.status===401||e.status===403)throw new Error("Your API token is invalid or not authorized to perform this action. Remove the token from .env and run the command again to generate a new token.");if(e.status===404)throw new Error("Code components are rolling out in phases. Check back soon for access.");let t=await e.json();throw new Error(t.message||e.statusText)}async function Mt({endpoint:e,method:t="GET",body:n,options:r}){let{baseUrl:o,authToken:i}=BF(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await K(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:NF(n)});return await LF(a),a.json()}async function Jl({options:e}){return(await Mt({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function Hl({name:e,description:t,slug:n,options:r}){return(await Mt({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:n},options:r})).payload}async function Zl({resourceId:e,files:t,options:n}){return(await Mt({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function Kl({resourceId:e,codeModule:t,components:n,options:r}){return(await Mt({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:n},options:r})).payload}var Ug=require("path"),zg=w(require("webpack-merge")),cn=require("@webflow/data-types");de();G();var Qh=require("memfs/lib/volume"),io=require("@webflow/data-types");var it="./tmp_entry",Yh="components";function MF(e){let t=UF(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function Xh(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
|
|
76
76
|
`),r=e.filter(l=>l.type==="internal").map(({name:l,exportKey:c})=>`${c}: ${l}`).join(", "),o=e.filter(l=>l.type==="component").map(({name:l,exportKey:c})=>`"${c}": ${l}`).join(", "),i=`env: "${t}"`,s=r,a=o?`components: { ${o} }`:void 0;return`${n}
|
|
77
77
|
|
|
78
|
-
export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function Qh(e,t,n){let r={},o=`${it}/Client.js`,i=`${it}/Server.js`;r[o]=Yh([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],so.Environment.Client);let s={},a=c=>{let u=L1(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=Yh([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([c])=>n[c]?.ssr??!0).map(([c,u])=>{let p=a(c),f=u.startsWith(it)?u.replace(`${it}/`,"./"):u;return{name:p,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],so.Environment.Server);let l={[so.Environment.Client]:o,[so.Environment.Server]:i};return{entryPointsVolume:Xh.Volume.fromJSON(r),paths:l}}var M1=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,n)=>n.toUpperCase()).replace(/\s+/g,"");var Wg=require("memfs/lib/volume");var og=w(require("archiver")),Yn=require("path");de();var ao=require("@webflow/data-types");de();V();var Mt=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var eg=2;function tg(e){let t={type:ao.ModuleLoader.FEDERATION,version:eg,entry:ea,renderer:Pr,components:e};return{title:Or,content:JSON.stringify(t)}}function ng(e){let t={type:ao.ModuleLoader.SSR,version:eg,entry:$n,components:e};return{title:Or,content:JSON.stringify(t)}}function rg(e){let t=`/${ao.Environment.Client}/${ea}`;try{if(e.existsSync(t)){let n=e.readFileSync(t,"utf8"),r=JSON.parse(n.toString()),o="publicPath"in r.metaData?r.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return r.exposes.reduce((i,s)=>{let a=s.name;return a===Pr||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${Mt(o)}${l}`)})),i},{})}}catch(n){d.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var Ii=require("@webflow/data-types"),z1=/\.css$/i;async function ig(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${Ii.Environment.Server}/${Ir}`,a=(0,og.default)("tar",{gzip:!1}),l=t.createWriteStream(s);a.on("error",p=>(r=!0,i(p))),l.on("close",()=>{if(!r)try{let p={type:"asset",name:Ir,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,Yn.resolve)((0,Yn.join)(`/${Ii.Environment.Server}`,f.name));t.existsSync(m)&&t.rmSync(m)}),o([p])}catch(p){return i(p)}finally{r=!0}}),a.pipe(l);let{title:c,content:u}=ng(n);a.append(u,{name:c}),e.forEach(p=>{if(!z1.test(p.name))try{let f=(0,Yn.resolve)((0,Yn.join)(`/${Ii.Environment.Server}`,p.name)),m=t.readFileSync(f,"utf8");a.append(m,{name:p.name})}catch(f){return r=!0,i(f)}}),await a.finalize()})}var sg=require("@webflow/data-types");async function ag(e,t,n){let{title:r,content:o}=tg(n);await t.promises.writeFile(`/${sg.Environment.Client}/${r}`,o);let i={type:"asset",name:r,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var Ig=require("@rspack/core"),Rg=w(require("fork-ts-checker-webpack-plugin")),jg=require("ts-checker-rspack-plugin"),$g=w(require("mini-css-extract-plugin")),Bg=require("@webflow/data-types");var cg=require("webpack"),Yl=w(require("mini-css-extract-plugin")),ug=w(require("tsconfig-paths-webpack-plugin")),dg=require("tsconfig-paths"),Xl=require("@webflow/data-types"),pg=require("path");de();var lg=w(require("postcss-selector-parser")),Kl=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,lg.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});Kl.postcss=!0;Kl.postcssPlugin="CSSinShadowDOM";var Ri=Kl;function W1(){return(0,dg.loadConfig)(process.cwd()).resultType==="success"}function fg({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Yl.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Ri]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Yl.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[W1()?new ug.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Xl.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,pg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Xl.Environment.Server)return{...s,plugins:[...s.plugins||[],new cg.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:$n,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var mg=require("@module-federation/enhanced"),Ql=require("@webflow/data-types");function hg({libraryName:e,env:t,exposes:n}){if(t===Ql.Environment.Client)return{plugins:[new mg.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Ql.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function gg(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function ji(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var $i=require("@rspack/core"),yg=require("tsconfig-paths"),ec=require("@webflow/data-types"),bg=require("path");de();function U1(){let e=(0,yg.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function wg({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:$i.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Ri]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new $i.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=U1();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===ec.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,bg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===ec.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new $i.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:$n,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Dg=require("@module-federation/enhanced/rspack"),tc=require("@webflow/data-types");function vg({libraryName:e,env:t,exposes:n}){if(t===tc.Environment.Client)return{plugins:[new Dg.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===tc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var G1=w(require("fs")),kg=require("unionfs"),xg=require("webpack");function V1(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function Bi(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(V1)})}}async function Cg({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new kg.Union().use(G1));return new Promise((s,a)=>{let l=(0,xg.webpack)(e);l.inputFileSystem=i,n&&(l.outputFileSystem=n),r&&(l.outputPath=r),l.run((c,u)=>{l.close(p=>{c||p?a(c||p):u?u.hasErrors()||o&&u.hasWarnings()?a(new Error(u.toString("errors-warnings"))):s(Bi(u)):a(new Error("Webpack stats are undefined"))})})})}var q1=w(require("fs")),nc=w(require("webpack-merge")),Fg=require("memfs"),Eg=require("unionfs"),_g=require("@rspack/core");async function Ni({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new Eg.Union().use(q1)),s=e;return t.length>0&&(s=(0,nc.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,nc.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,_g.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,Fg.createFsFromVolume)(n)),r&&(c.outputPath=r),c.run((u,p)=>{c.close(f=>{u||f?l(u||f):p?p.hasErrors()||o&&p.hasWarnings()?l(new Error(p.toString("errors-warnings"))):a(Bi(p)):l(new Error("Rspack stats are undefined"))})})})}var Tg=require("@module-federation/enhanced");var Xn=w(require("webpack-merge"));V();function zt(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Sg(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Mi(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=J1(s),p=Array.isArray(l)?Li(...l.map(u)):Li(u(l));Object.keys(p).some(N=>c.includes(N))&&d.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...Sg(p,[...c,"ModuleFederationPlugin","module","plugins"]),module:Sg(p.module??{},["rules"])},g=(0,Xn.default)(a,m),v=p.plugins??[];o&&(v=v.filter(o));let E=a.plugins??[],M=(0,Xn.mergeWithCustomize)({customizeArray:(0,Xn.unique)("plugins",t,N=>zt(N))})({plugins:v},{plugins:E}).plugins,C=p?.ModuleFederationPlugin?.shared,O=M?.map(N=>{if(zt(N)==="ModuleFederationPlugin"){let A=r(N);return new n({...A,...C?{shared:C}:{}})}return N});g.plugins=O;let Z=p.module?.rules;if(Z&&typeof Z=="function"){let N=a.module?.rules??[];g.module={...g.module??{},rules:Z(N)}}return g}}function Li(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let n of e){let{module:r,ModuleFederationPlugin:o,plugins:i,...s}=n;if(t={...t,...s},r){let{rules:a,...l}=r;if(t.module={...t.module,...l},a){let c=t.module?.rules;c?t.module.rules=u=>{let p=c(u);return a(p)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function J1(e){return t=>typeof t=="function"?t(e):t}var H1=Mi({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Tg.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Ag(e,t,n){return H1(e,t,n)}var Og=require("@module-federation/enhanced/rspack");var Z1=Mi({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:Og.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>zt(e)!=="MiniCssExtractPlugin"});function Pg(e,t,n){return Z1(e,t,n)}var rc={[Bg.Framework.React]:{generateWebpackBundlerConfig:gg,generateRspackBundlerConfig:ji}},K1={webpack:{generateBaseConfig:fg,getFrameworkConfig:(e,t)=>rc[e].generateWebpackBundlerConfig(t),generateFederationConfig:hg,mergeConfigs:(e,t,n)=>Ag(e,t,n),bundle:e=>Cg({...e,config:e.config}),typeCheckerPlugin:Rg.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>zt(t)==="MiniCssExtractPlugin"?new $g.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:wg,getFrameworkConfig:(e,t)=>rc[e].generateRspackBundlerConfig(t),generateFederationConfig:vg,mergeConfigs:(e,t,n)=>Pg(e,t,n),bundle:e=>Ni({...e,config:e.config}),typeCheckerPlugin:jg.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>zt(t)==="CssExtractRspackPlugin"?new Ig.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Qn=e=>K1[e],Ng=e=>!!rc[e];var Lg={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function zi(e){let t=e.bundler??"webpack";d.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=Qh(e.renderer,e.componentsFiles,e.componentsOptions),o=Wg.Volume.fromJSON({"/Server":null,"/Client":null});d.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&d.debug("Found bundle config overrides. Merging...");let s=Qn(t),a=E=>{let _=Y1({env:E,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),M=s.mergeConfigs(E,_,i);return e?.debugBundler&&(d.info(`${t} config for env ${E}:`),d.dir(M)),M},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(ln.Environment.Server),outputPath:`/${ln.Environment.Server}`}),s.bundle({...l,config:a(ln.Environment.Client),outputPath:`/${ln.Environment.Client}`})]);e?.debugBundler&&(d.debug(o.toTree()),d.debug(`Server Bundler Stats: ${c.toString(Lg)}`),d.debug(`Client Bundler Stats: ${u.toString(Lg)}`));let p=rg(o);d.debug("Packaging server bundle...");let f=await ig(c.toJson().assets||[],o,p);d.debug("Packaging client bundle...");let m=await ag(u.toJson().assets||[],o,p),g=E=>_=>[_,E];return{outputFiles:[...f.map(g(ln.Environment.Server)),...m.map(g(ln.Environment.Client))],outputVolume:o}}function Y1({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!Ng(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[Pr]:i[e],...o}).reduce((g,[v,E])=>({...g,[`./${v}`]:`./${(0,Mg.relative)(process.cwd(),E)}`}),{}),u=Qn(l),p=u.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:r,outputPath:a}),f=u.getFrameworkConfig(n,e),m=u.generateFederationConfig({exposes:c,env:e,libraryName:s});return(0,zg.default)(p,f,m)}var Gg=w(require("path")),ic=require("memfs/lib/volume"),sc=w(require("webpack-merge")),qg=w(require("webpack-node-externals")),Me=require("@webflow/data-types");var X1=w(require("fs")),er=require("path"),tr=require("webpack");function Q1(e,t=X1){let n=(0,er.join)(process.cwd(),"node_modules",e);for(;n!==(0,er.dirname)(n)&&n!=="node_modules";){let r=(0,er.join)(n,"package.json");if(t.existsSync(r))try{let{name:o,version:i}=JSON.parse(t.readFileSync(r,"utf8"));return`${o}@${i}`}catch{return null}n=(0,er.dirname)(n)}return null}var Wi=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:tr.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let r=n.getAssets(),o={};Object.values(r).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,l,c]=i.split("."),u=o[a]?.sources??{},p=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(m=>{if(m.startsWith("external")){let g=m.match(/^external \S+ "(.+)"$/)?.[1];if(!g)throw new Error(`Could not extract package name from ${m}`);let v=Q1(g,n.inputFileSystem);if(!v)throw new Error(`Could not find package information for ${g}`);v&&p.add(v)}}),o[a]={sources:{...u,[`./${a}.${c}`]:l},dependencies:p},n.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{n.emitAsset(`${i}.js.map`,new tr.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new tr.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var Ug=w(require("module")),Vg=require("jsdom"),oc="__webflowCliImportModuleWindow__";function eE(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(oc)}]`,i=[];r||i.push('"use strict";'),i.push(`var __wfW = ${o};`,'if (__wfW == null) { throw new ReferenceError("Webflow CLI internal: missing JSDOM window on module"); }',"var window = __wfW;","var document = __wfW.document;","var navigator = __wfW.navigator;","var HTMLElement = __wfW.HTMLElement;","var localStorage = __wfW.localStorage;","var sessionStorage = __wfW.sessionStorage;","var requestAnimationFrame = __wfW.requestAnimationFrame.bind(__wfW);","var cancelAnimationFrame = __wfW.cancelAnimationFrame.bind(__wfW);","var getComputedStyle = __wfW.getComputedStyle.bind(__wfW);","var performance = __wfW.performance;","");let s=i.join(`
|
|
78
|
+
export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function eg(e,t,n){let r={},o=`${it}/Client.js`,i=`${it}/Server.js`;r[o]=Xh([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],io.Environment.Client);let s={},a=c=>{let u=MF(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=Xh([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([c])=>n[c]?.ssr??!0).map(([c,u])=>{let p=a(c),f=u.startsWith(it)?u.replace(`${it}/`,"./"):u;return{name:p,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],io.Environment.Server);let l={[io.Environment.Client]:o,[io.Environment.Server]:i};return{entryPointsVolume:Qh.Volume.fromJSON(r),paths:l}}var UF=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,n)=>n.toUpperCase()).replace(/\s+/g,"");var Wg=require("memfs/lib/volume");var ig=w(require("archiver")),Xn=require("path");de();var so=require("@webflow/data-types");de();G();var Ut=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var tg=2;function ng(e){let t={type:so.ModuleLoader.FEDERATION,version:tg,entry:Qs,renderer:Ir,components:e};return{title:Pr,content:JSON.stringify(t)}}function rg(e){let t={type:so.ModuleLoader.SSR,version:tg,entry:Bn,components:e};return{title:Pr,content:JSON.stringify(t)}}function og(e){let t=`/${so.Environment.Client}/${Qs}`;try{if(e.existsSync(t)){let n=e.readFileSync(t,"utf8"),r=JSON.parse(n.toString()),o="publicPath"in r.metaData?r.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return r.exposes.reduce((i,s)=>{let a=s.name;return a===Ir||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${Ut(o)}${l}`)})),i},{})}}catch(n){d.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var Pi=require("@webflow/data-types"),zF=/\.css$/i;async function sg(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${Pi.Environment.Server}/${Rr}`,a=(0,ig.default)("tar",{gzip:!1}),l=t.createWriteStream(s);a.on("error",p=>(r=!0,i(p))),l.on("close",()=>{if(!r)try{let p={type:"asset",name:Rr,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,Xn.resolve)((0,Xn.join)(`/${Pi.Environment.Server}`,f.name));t.existsSync(m)&&t.rmSync(m)}),o([p])}catch(p){return i(p)}finally{r=!0}}),a.pipe(l);let{title:c,content:u}=rg(n);a.append(u,{name:c}),e.forEach(p=>{if(!zF.test(p.name))try{let f=(0,Xn.resolve)((0,Xn.join)(`/${Pi.Environment.Server}`,p.name)),m=t.readFileSync(f,"utf8");a.append(m,{name:p.name})}catch(f){return r=!0,i(f)}}),await a.finalize()})}var ag=require("@webflow/data-types");async function lg(e,t,n){let{title:r,content:o}=ng(n);await t.promises.writeFile(`/${ag.Environment.Client}/${r}`,o);let i={type:"asset",name:r,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var Rg=require("@rspack/core"),$g=w(require("fork-ts-checker-webpack-plugin")),jg=require("ts-checker-rspack-plugin"),Bg=w(require("mini-css-extract-plugin")),Ng=require("@webflow/data-types");var ug=require("webpack"),Xl=w(require("mini-css-extract-plugin")),dg=w(require("tsconfig-paths-webpack-plugin")),pg=require("tsconfig-paths"),Ql=require("@webflow/data-types"),fg=require("path");de();var cg=w(require("postcss-selector-parser")),Yl=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,cg.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});Yl.postcss=!0;Yl.postcssPlugin="CSSinShadowDOM";var Ii=Yl;function WF(){return(0,pg.loadConfig)(process.cwd()).resultType==="success"}function mg({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Xl.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Ii]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Xl.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[WF()?new dg.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Ql.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,fg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Ql.Environment.Server)return{...s,plugins:[...s.plugins||[],new ug.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:Bn,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var hg=require("@module-federation/enhanced"),ec=require("@webflow/data-types");function gg({libraryName:e,env:t,exposes:n}){if(t===ec.Environment.Client)return{plugins:[new hg.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===ec.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function yg(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function Ri(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var $i=require("@rspack/core"),bg=require("tsconfig-paths"),tc=require("@webflow/data-types"),wg=require("path");de();function VF(){let e=(0,bg.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function Dg({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:$i.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Ii]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new $i.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=VF();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===tc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,wg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===tc.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new $i.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:Bn,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var vg=require("@module-federation/enhanced/rspack"),nc=require("@webflow/data-types");function kg({libraryName:e,env:t,exposes:n}){if(t===nc.Environment.Client)return{plugins:[new vg.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===nc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var qF=w(require("fs")),xg=require("unionfs"),Cg=require("webpack");function GF(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function ji(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(GF)})}}async function Fg({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new xg.Union().use(qF));return new Promise((s,a)=>{let l=(0,Cg.webpack)(e);l.inputFileSystem=i,n&&(l.outputFileSystem=n),r&&(l.outputPath=r),l.run((c,u)=>{l.close(p=>{c||p?a(c||p):u?u.hasErrors()||o&&u.hasWarnings()?a(new Error(u.toString("errors-warnings"))):s(ji(u)):a(new Error("Webpack stats are undefined"))})})})}var JF=w(require("fs")),rc=w(require("webpack-merge")),Eg=require("memfs"),_g=require("unionfs"),Sg=require("@rspack/core");async function Bi({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new _g.Union().use(JF)),s=e;return t.length>0&&(s=(0,rc.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,rc.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Sg.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,Eg.createFsFromVolume)(n)),r&&(c.outputPath=r),c.run((u,p)=>{c.close(f=>{u||f?l(u||f):p?p.hasErrors()||o&&p.hasWarnings()?l(new Error(p.toString("errors-warnings"))):a(ji(p)):l(new Error("Rspack stats are undefined"))})})})}var Ag=require("@module-federation/enhanced");var Qn=w(require("webpack-merge"));G();function zt(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Tg(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Li(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=HF(s),p=Array.isArray(l)?Ni(...l.map(u)):Ni(u(l));Object.keys(p).some(N=>c.includes(N))&&d.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...Tg(p,[...c,"ModuleFederationPlugin","module","plugins"]),module:Tg(p.module??{},["rules"])},y=(0,Qn.default)(a,m),v=p.plugins??[];o&&(v=v.filter(o));let E=a.plugins??[],M=(0,Qn.mergeWithCustomize)({customizeArray:(0,Qn.unique)("plugins",t,N=>zt(N))})({plugins:v},{plugins:E}).plugins,C=p?.ModuleFederationPlugin?.shared,O=M?.map(N=>{if(zt(N)==="ModuleFederationPlugin"){let A=r(N);return new n({...A,...C?{shared:C}:{}})}return N});y.plugins=O;let Z=p.module?.rules;if(Z&&typeof Z=="function"){let N=a.module?.rules??[];y.module={...y.module??{},rules:Z(N)}}return y}}function Ni(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let n of e){let{module:r,ModuleFederationPlugin:o,plugins:i,...s}=n;if(t={...t,...s},r){let{rules:a,...l}=r;if(t.module={...t.module,...l},a){let c=t.module?.rules;c?t.module.rules=u=>{let p=c(u);return a(p)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function HF(e){return t=>typeof t=="function"?t(e):t}var ZF=Li({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Ag.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Og(e,t,n){return ZF(e,t,n)}var Pg=require("@module-federation/enhanced/rspack");var KF=Li({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:Pg.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>zt(e)!=="MiniCssExtractPlugin"});function Ig(e,t,n){return KF(e,t,n)}var oc={[Ng.Framework.React]:{generateWebpackBundlerConfig:yg,generateRspackBundlerConfig:Ri}},YF={webpack:{generateBaseConfig:mg,getFrameworkConfig:(e,t)=>oc[e].generateWebpackBundlerConfig(t),generateFederationConfig:gg,mergeConfigs:(e,t,n)=>Og(e,t,n),bundle:e=>Fg({...e,config:e.config}),typeCheckerPlugin:$g.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>zt(t)==="MiniCssExtractPlugin"?new Bg.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:Dg,getFrameworkConfig:(e,t)=>oc[e].generateRspackBundlerConfig(t),generateFederationConfig:kg,mergeConfigs:(e,t,n)=>Ig(e,t,n),bundle:e=>Bi({...e,config:e.config}),typeCheckerPlugin:jg.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>zt(t)==="CssExtractRspackPlugin"?new Rg.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},er=e=>YF[e],Lg=e=>!!oc[e];var Mg={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function Mi(e){let t=e.bundler??"webpack";d.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=eg(e.renderer,e.componentsFiles,e.componentsOptions),o=Wg.Volume.fromJSON({"/Server":null,"/Client":null});d.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&d.debug("Found bundle config overrides. Merging...");let s=er(t),a=E=>{let _=XF({env:E,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),M=s.mergeConfigs(E,_,i);return e?.debugBundler&&(d.info(`${t} config for env ${E}:`),d.dir(M)),M},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(cn.Environment.Server),outputPath:`/${cn.Environment.Server}`}),s.bundle({...l,config:a(cn.Environment.Client),outputPath:`/${cn.Environment.Client}`})]);e?.debugBundler&&(d.debug(o.toTree()),d.debug(`Server Bundler Stats: ${c.toString(Mg)}`),d.debug(`Client Bundler Stats: ${u.toString(Mg)}`));let p=og(o);d.debug("Packaging server bundle...");let f=await sg(c.toJson().assets||[],o,p);d.debug("Packaging client bundle...");let m=await lg(u.toJson().assets||[],o,p),y=E=>_=>[_,E];return{outputFiles:[...f.map(y(cn.Environment.Server)),...m.map(y(cn.Environment.Client))],outputVolume:o}}function XF({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!Lg(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[Ir]:i[e],...o}).reduce((y,[v,E])=>({...y,[`./${v}`]:`./${(0,Ug.relative)(process.cwd(),E)}`}),{}),u=er(l),p=u.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:r,outputPath:a}),f=u.getFrameworkConfig(n,e),m=u.generateFederationConfig({exposes:c,env:e,libraryName:s});return(0,zg.default)(p,f,m)}var qg=w(require("path")),sc=require("memfs/lib/volume"),ac=w(require("webpack-merge")),Jg=w(require("webpack-node-externals")),Me=require("@webflow/data-types");var QF=w(require("fs")),tr=require("path"),nr=require("webpack");function eE(e,t=QF){let n=(0,tr.join)(process.cwd(),"node_modules",e);for(;n!==(0,tr.dirname)(n)&&n!=="node_modules";){let r=(0,tr.join)(n,"package.json");if(t.existsSync(r))try{let{name:o,version:i}=JSON.parse(t.readFileSync(r,"utf8"));return`${o}@${i}`}catch{return null}n=(0,tr.dirname)(n)}return null}var Ui=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:nr.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let r=n.getAssets(),o={};Object.values(r).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,l,c]=i.split("."),u=o[a]?.sources??{},p=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(m=>{if(m.startsWith("external")){let y=m.match(/^external \S+ "(.+)"$/)?.[1];if(!y)throw new Error(`Could not extract package name from ${m}`);let v=eE(y,n.inputFileSystem);if(!v)throw new Error(`Could not find package information for ${y}`);v&&p.add(v)}}),o[a]={sources:{...u,[`./${a}.${c}`]:l},dependencies:p},n.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{n.emitAsset(`${i}.js.map`,new nr.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new nr.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var Vg=w(require("module")),Gg=require("jsdom"),ic="__webflowCliImportModuleWindow__";function tE(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(ic)}]`,i=[];r||i.push('"use strict";'),i.push(`var __wfW = ${o};`,'if (__wfW == null) { throw new ReferenceError("Webflow CLI internal: missing JSDOM window on module"); }',"var window = __wfW;","var document = __wfW.document;","var navigator = __wfW.navigator;","var HTMLElement = __wfW.HTMLElement;","var localStorage = __wfW.localStorage;","var sessionStorage = __wfW.sessionStorage;","var requestAnimationFrame = __wfW.requestAnimationFrame.bind(__wfW);","var cancelAnimationFrame = __wfW.cancelAnimationFrame.bind(__wfW);","var getComputedStyle = __wfW.getComputedStyle.bind(__wfW);","var performance = __wfW.performance;","");let s=i.join(`
|
|
79
79
|
`)+`
|
|
80
|
-
`;return n?e.slice(0,n[0].length)+s+e.slice(n[0].length):s+e}function
|
|
81
|
-
`)}function
|
|
82
|
-
`)}async function
|
|
80
|
+
`;return n?e.slice(0,n[0].length)+s+e.slice(n[0].length):s+e}function ao(e,t){let n=e.readFileSync(t,"utf-8"),o=new Gg.JSDOM("<!DOCTYPE html><html><body></body></html>",{url:"http://localhost/",pretendToBeVisual:!0}).window,i=tE(n),s=new Vg.default(t,module);Object.defineProperty(s,ic,{value:o,enumerable:!1,configurable:!0,writable:!1});try{return s._compile(i,t),s}finally{Reflect.deleteProperty(s,ic),o.close()}}function nE(e,t){let n=`/${t}.js`,r=ao(e,n),o=r.exports.default||r.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:l,options:c}=(0,Me.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(l||{}).map(([u,p])=>({...p,name:u,defaultValue:typeof p.defaultValue!="string"?JSON.stringify(p.defaultValue):p.defaultValue,settings:p.settings!==void 0?JSON.stringify(p.settings):p.settings})),options:c}}catch(i){let s=i instanceof Error?i.stack:String(i);throw new Error(`Error parsing component data for '${t}': ${s}`)}throw new Error(`Could not get declaration for '${t}'`)}async function rE({declarations:e,sources:t,overrideConfig:n={},performTypeCheck:r,bundler:o="webpack"}){let i=new sc.Volume,s=er(o),a=(0,ac.default)(s.generateBaseConfig({entry:e,env:Me.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Me.Framework.React,Me.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:r?[new s.typeCheckerPlugin]:[]}),l=s.mergeConfigs(Me.Environment.Client,a,n);return await s.bundle({outputPath:"/",config:l,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function oE({declarations:e,sources:t,overrideConfig:n={},bundler:r}){let o=new sc.Volume,i=er(r),s=(0,ac.default)(i.generateBaseConfig({entry:e,env:Me.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Me.Framework.React,Me.Environment.Client),{entry:e,mode:"production",optimization:{mangleExports:"deterministic",moduleIds:"deterministic",chunkIds:"deterministic"},output:{filename:"[name].[contenthash].js",path:"/",library:{type:"commonjs2"},devtoolModuleFilenameTemplate:"[resource-path]",hashFunction:i.hashFunction},externalsPresets:{node:!0},devtool:"source-map",plugins:[new Ui],externals:[(0,Jg.default)()]}),a=i.mergeConfigs(Me.Environment.Client,s,n);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function iE(e){return Object.entries(e.toJSON()).reduce((t,[n,r])=>{if(n.endsWith(".map")&&r?.length){let o=qg.default.basename(n).split(".")[0];t[o]=r}return t},{})}async function zi({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([rE({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r,bundler:i}),o||i==="rspack"?Promise.resolve(null):oE({declarations:e,sources:t,overrideConfig:n,bundler:i})]),{metadata:l,options:c}=Object.keys(e).reduce((p,f)=>{let m=nE(s,f);return p.metadata[f]=m,p.options[f]=m.options||{},p},{metadata:{},options:{}});return{sourceMaps:a?iE(a):{},metadata:l,options:c}}function Hg(e,{framework:t,sourceMaps:n}){return Object.fromEntries(Object.keys(e).map(r=>[r,{...e[r],id:r,framework:t,exportPath:"default",hash:n[r]}]))}Je();var Kg=w(require("md5"));Fe();Oe();var Yg=" - ";function sE(e){return e==="added"?` ${k.green("(Added)")}`:e==="removed"?` ${k.yellow("(Removed)")}`:e==="changed"?` ${k.blue("(Changed)")}`:""}function Zg(e){if(!e)return"";let t=JSON.parse(e);return(0,Kg.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(n=>!n.includes("@webflow/data-types")&&!n.includes("@webflow/react"))].sort()))}function aE({componentsMetadata:e,latestVersion:t,sourceMaps:n}){let r=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(r).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let l=e[s],c=Zg(n[s]),u=a.displayName&&l.displayName!==a.displayName,p=c&&a.hash&&c!==Zg(a.hash),f=u||p;o[s]={component:l,status:f?"changed":"unchanged",previousName:u?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{r[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:l})=>{let c=s.displayName,u=l?`${l} \u2192 ${c}`:c;return`${Yg}${u}${sE(a)}`}).sort().join(`
|
|
81
|
+
`)}function lE({componentsMetadata:e}){return Object.values(e).map(n=>`${Yg}${n.displayName}`).sort().join(`
|
|
82
|
+
`)}async function Xg({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:n,sourceMaps:r,workspaceInfo:o}){if(ie())return Promise.resolve(!0);let i=e.id?n.find(({profile:p})=>p.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",l=s?aE({componentsMetadata:t,latestVersion:i,sourceMaps:r}):lE({componentsMetadata:t}),c=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await xe({message:`${a}
|
|
83
83
|
${l}
|
|
84
84
|
|
|
85
|
-
${c}`})}var
|
|
85
|
+
${c}`})}var Wi=require("path"),ty=require("memfs/lib/volume");var Qg=w(require("fast-glob")),cE=e=>{let t=e.split("/");return t[t.length-1]},uE=e=>cE(e).split(".")[0];async function ey(e,t){return(await Qg.default.glob(e,{absolute:!0,...t||{}})).reduce((r,o)=>{let i=uE(o);if(r[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${r[i]}, but also found at ${o}.`);return{...r,[i]:o}},{})}async function Vi(e){let t=await ey(e.components,{cwd:(0,Wi.dirname)(e.manifestPath),ignore:[e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:n,componentsVolume:r}=dE(t,e.renderer.client,e.globals);return{componentsFiles:n,componentsVolume:r}}function dE(e,t,n){let r={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,Wi.extname)(s),l=`${it}/${Yh}/${i}${a}`;r[i]=l,o[l]=pE(t,s,n)}),{componentsFiles:r,componentsVolume:ty.Volume.fromJSON(o)}}function pE(e,t,n){return n?`
|
|
86
86
|
import { applyDecorators } from "${e}";
|
|
87
87
|
import componentDefinition from "${t}";
|
|
88
88
|
const globals = require("${n}") || {};
|
|
@@ -104,59 +104,60 @@ export default decoratedDefinition;
|
|
|
104
104
|
`.trim():`
|
|
105
105
|
import componentDefinition from "${t}";
|
|
106
106
|
export default {...componentDefinition};
|
|
107
|
-
`.trim()}He();
|
|
107
|
+
`.trim()}He();Ei();var ny=require("@webflow/data-types"),Gi={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:ny.Framework.React};var rr=require("path"),or=require("fs");Fe();Je();G();we();function bt(e){return e.replace(/\\/g,"/")}Oe();oe();function ry(e){let t={...e};if(e.globals){let n=(0,rr.resolve)(process.cwd(),e.globals);if(!(0,or.existsSync)(n))throw new Error(`Globals file not found: ${e.globals}
|
|
108
108
|
Resolved path: ${n}
|
|
109
|
-
Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=bt(n)}if(e.bundleConfig){let n=(0,
|
|
109
|
+
Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=bt(n)}if(e.bundleConfig){let n=(0,rr.resolve)(process.cwd(),e.bundleConfig);if(!(0,or.existsSync)(n))throw new Error(`Bundle config file not found: ${e.bundleConfig}
|
|
110
110
|
Resolved path: ${n}
|
|
111
|
-
Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=bt(n)}if(typeof e.renderer=="string"){let n=(0,
|
|
111
|
+
Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=bt(n)}if(typeof e.renderer=="string"){let n=(0,rr.resolve)(process.cwd(),e.renderer);(0,or.existsSync)(n)&&(t.renderer=bt(n))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let n=(0,rr.resolve)(process.cwd(),e.renderer.client);(0,or.existsSync)(n)&&(t.renderer={...t.renderer,client:bt(n)})}if(typeof e.renderer.server=="string"){let n=(0,rr.resolve)(process.cwd(),e.renderer.server);(0,or.existsSync)(n)&&(t.renderer={...t.renderer,server:bt(n)})}}return t}async function fE({initialData:e}){let t=await Ce({message:"Enter a name for your code library",validate:o=>o.trim()===""?"The library name cannot be empty.":!0,default:e?.name});if(t==null)throw new h("When --no-input mode is enabled please provide a name in your library manifest");let n=await Ce({message:"Enter a description for your code library",default:e?.description??""});if(!await xe({message:"Is the code (including 3rd party packages) you are uploading to Webflow trusted and secure?"}))throw new Error("Code library is not trusted and secure");return{name:t,description:n}}async function mE({existingCodeLibraries:e}){let t={name:"[Create new code library]",value:null},r=[...e].sort((i,s)=>{let a=i.resource.codeLibraryResource.manifest.name??"",l=s.resource.codeLibraryResource.manifest.name??"",c=a.localeCompare(l,void 0,{sensitivity:"base"});return c!==0?c:i.profile.slug.localeCompare(s.profile.slug,void 0,{sensitivity:"base"})}).map(({resource:i,profile:s})=>{let a=`${i.codeLibraryResource.manifest.name} (${s.slug})`;s.status==="ARCHIVED"&&(a+=` ${k.yellow("(Unshared)")}`);let l={id:s.slug,name:i.codeLibraryResource.manifest.name,description:i.codeLibraryResource.manifest.description};return{name:a,value:l}});return await jo({message:"Select an existing code library (or create new):",source:i=>{if(!i)return[t,...r];let s=i.toLowerCase(),a=r.filter(l=>{let c=l.value?.id??"",u=l.value?.name??"",p=l.value?.description??"";return c.toLowerCase().includes(s)||u.toLowerCase().includes(s)||p.toLowerCase().includes(s)});return[t,...a]},pageSize:15})}async function lc({initialData:e,existingCodeLibraries:t}){let n,r={components:Gi.components},o=t.length>0?await mE({existingCodeLibraries:t}):null;if(o)n={...r,...o,...e,id:o.id};else{let a=await fE({initialData:e});n={...r,...e,...a}}let i=ry(n);fe({library:i});let{path:s}=Yt();return{libraryManifest:i,manifestPath:s}}async function oy({existingCodeLibraries:e}){let t=d.spinner("Looking for webflow.json manifest");try{let{manifest:n,manifestPath:r}=X(),o=Tr(n,"library");if(!o.id){if(Et())return t.succeed(),lc({initialData:o,existingCodeLibraries:e});throw new Error("Library manifest does not have an id")}let i=o.name??e.find(({profile:a})=>a.slug===o.id)?.resource.codeLibraryResource.manifest.name;if(!i&&Et())return t.succeed(),lc({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=ry({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:r})}catch(n){if(n instanceof Kt&&Et())return t.info(n.message),lc({existingCodeLibraries:e});throw t.fail(),n}}var cc=require("memfs/lib/volume"),ay=w(require("webpack-merge"));var ly="/client-renderer.js",cy="/server-renderer.js",iy=`${it}/test-renderers${ly}`,sy=`${it}/test-renderers${cy}`,hE=new Set(["@webflow/react"]),gE=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function uy(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(hE.has(e.client)&&gE.has(e.server))return;let t=await wE(e);yE(e.client,t),bE(e.server,t)}function yE(e,t){let n=ao(t,ly);if(typeof n.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof n.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let r=()=>null,o=n.exports.ClientRenderer(r),i=["mount","hydrate","render","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid client renderer: ${e} ClientRenderer must return an object with a '${s}' function.`)}function bE(e,t){let n=ao(t,cy);if(typeof n.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let r=()=>null,o=n.exports.ServerRenderer(r),i=["renderToStream","renderToString","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid server renderer: ${e} ServerRenderer must return an object with a '${s}' function.`)}async function wE(e){let t=new cc.Volume,n=bt(e.client),r=bt(e.server),o={[iy]:`
|
|
112
112
|
export * from "${n}";
|
|
113
|
-
`,[
|
|
113
|
+
`,[sy]:`
|
|
114
114
|
export * from "${r}";
|
|
115
|
-
`},i=(0,
|
|
115
|
+
`},i=(0,ay.default)(Ri(),{entry:{"client-renderer":iy,"server-renderer":sy},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await Bi({config:i,sourceVolumes:[cc.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function qi({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:n}=await oy({existingCodeLibraries:e}),{renderer:r,...o}=Gi,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??r.client,server:t.renderer?.server??r.server};return await uy(i),{...o,...t,renderer:i,manifestPath:n}}oe();async function DE(e,t){let{trackPerformance:n,libraryConfig:r}=e;return await n("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await Vi(r);d.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:l}=await zi({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:Fi(o,t),bundler:t?.bundler});return d.debug(`Metadata: ${JSON.stringify(a,null,2)}`),d.debug(`Source Maps:
|
|
116
116
|
|
|
117
117
|
${Object.entries(s).reduce((c,[u,p])=>(c+=`${u}: ${JSON.stringify(JSON.parse(p),null,2)}
|
|
118
118
|
|
|
119
|
-
`,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function
|
|
119
|
+
`,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function vE(e,t,n,r,o,i,s){let{trackPerformance:a,libraryConfig:l}=e;return await a("generate_library_bundle",async()=>await Mi({libraryIdentifier:`_${o}`,renderer:l.renderer,framework:l.framework,publicPath:Ut(i[ir.Environment.Client]),sourceVolumes:[n],componentsFiles:t,componentsOptions:r,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function kE(e,t,n,r){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([l,c])=>{let u=(0,Ji.resolve)((0,Ji.join)(`/${c}`,`${l.name}`));return ro(n.readFileSync(u,"utf8").toString(),u,{bundleEnvironment:c})}),{signatures:a}=await Zl({resourceId:r,files:s.map(({meta:l})=>l),options:i});await Promise.all(a.map(async l=>{let c=s.find(u=>u.meta.fileHash===l.hash);if(!c)throw new Error(`File not found: ${l.hash}`);await oo(c,l.value)}))})}async function xE(e,t,n,r,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let l={clientModule:{bundleUrl:Ut(o[ir.Environment.Client])+Pr,loaderType:ir.ModuleLoader.FEDERATION},serverModule:{bundleUrl:Ut(o[ir.Environment.Server])+Rr}},c=Hg(t,{framework:s.framework,sourceMaps:n}),{taskId:u}=await Kl({resourceId:r,codeModule:l,components:Object.values(c),options:a});d.debug(JSON.stringify({taskId:u},null,2))})}async function uc(e){e?.verbose&&(process.env.DEBUG="true");let t,n=Date.now(),r;try{r=await te({apiToken:e?.apiToken})}catch(s){throw d.error(s),s}d.debug("Initializing telemetry service...");let o=J.forCodeLibraries({authToken:r}),i=td(o);try{d.debug("Checking dependencies versions..."),new Qt().run();let s={apiToken:r};t=d.spinner("Initializing");let a=await i("get_code_libraries",async()=>await Jl({options:s})),{workspace:l,libraries:c}=a;t.succeed(),d.debug("Parsing library config...");let u=await qi({existingCodeLibraries:c}),p=u.bundleConfig?require(u.bundleConfig):{},f={trackPerformance:i,apiOptions:s,libraryConfig:u,overrideConfig:p};t=d.spinner("Collecting metadata");let{componentsFiles:m,componentsVolume:y,componentsMetadata:v,componentsOptions:E,sourceMaps:_}=await DE(f,e);if(t.succeed(),!await Xg({libraryConfig:u,componentsMetadata:v,existingCodeLibraries:c,sourceMaps:_,workspaceInfo:l}))return;t=d.spinner("Creating code library");let{resourceId:C,profileSlug:O,workspace:Z,s3Urls:N,cdnUrls:A}=await i("init_code_library",async()=>await Hl({name:u.name,slug:u.id,description:u.description,options:s}));t.succeed(),d.debug(JSON.stringify({resourceId:C,profileSlug:O,s3Urls:N,cdnUrls:A},null,2)),await o.sendUsage("library_initialized",{libraryName:u.name,framework:u.framework,resourceId:C,profileSlug:O}),u.id||fe({library:{id:O}}),t=d.spinner("Compiling code components");let{outputFiles:g,outputVolume:b}=await vE(f,m,y,E,C,A,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:u.name,componentCount:Object.keys(m).length,resourceId:C,profileSlug:O}),t=d.spinner("Uploading files"),await kE(f,g,b,C),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:u.name,fileCount:g.length,resourceId:C,profileSlug:O}),t=d.spinner("Sharing library"),await xE(f,v,_,C,A),t.succeed(),d.success(`Code library shared successfully${Z?.slug?`: ${jn}/dashboard/workspace/${Z?.slug}/shared-libraries-and-templates`:"!"}`);let j=Date.now()-n;await o.sendUsage("share_library",{duration:j,componentCount:Object.keys(m).length,libraryName:u.name,framework:u.framework,resourceId:C,profileSlug:O})}catch(s){t?.fail();let a=Date.now()-n;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new h(s)}}var Hi=w(require("fs")),sr=require("path");G();Ei();oe();function CE(e){return e.replace(/[-_]+/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).replace(/\s+/g,"")}var FE="dist",EE="http://localhost/";async function dc(e){e.verbose&&(process.env.DEBUG="true");let t;try{d.debug("Checking dependencies versions..."),new Qt().run(),d.debug("Looking for manifest...");let n=await qi({existingCodeLibraries:[]}),r=`_${e.libraryId||CE(n.name)}`;e?.debugBundler&&d.debug(`Library Config: ${JSON.stringify(n,null,2)}`),t=d.spinner("Collecting metadata");let{componentsFiles:o,componentsVolume:i}=await Vi(n);e?.debugBundler&&d.debug(`Components: ${JSON.stringify(o,null,2)}`);let s=n.bundleConfig?require(n.bundleConfig):{},{sourceMaps:a,metadata:l,options:c}=await zi({declarations:o,sources:i,overrideConfig:s,performTypeCheck:Fi(o,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(d.debug(`Metadata: ${JSON.stringify(l,null,2)}`),d.debug(`Source Maps:
|
|
120
120
|
|
|
121
|
-
${Object.entries(a).reduce((f,[m,
|
|
121
|
+
${Object.entries(a).reduce((f,[m,y])=>(f+=`${m}: ${JSON.stringify(JSON.parse(y),null,2)}
|
|
122
122
|
|
|
123
|
-
`,f),"")}`)),t.succeed(),t=d.spinner("Generating library bundle");let{outputFiles:u,outputVolume:p}=await zi({libraryIdentifier:r,renderer:n.renderer,framework:n.framework,publicPath:Mt(e.publicPath||FE),sourceVolumes:[i],componentsFiles:o,componentsOptions:c,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:s,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=d.spinner("Writing to disk"),u.forEach(([f,m])=>{let g=(0,ir.join)(`/${m}`,`${f.name}`),v=oo(p.readFileSync(g,"utf8").toString(),g,{bundleEnvironment:m}),E=(0,ir.join)(process.cwd(),e.outputPath||CE);Zi.default.existsSync((0,ir.join)(E,`${m}`))||Zi.default.mkdirSync((0,ir.join)(E,`${m}`),{recursive:!0}),Zi.default.writeFileSync((0,ir.join)(E,m,f.name),v.value.toString())}),t.succeed(),d.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new y(n)}}var co=w(require("fs-extra")),dc=w(require("path"));V();ke();function EE(){try{if(!co.default.existsSync(Pe))return null;let e=co.default.readdirSync(Pe).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:dc.default.join(Pe,t),time:co.default.statSync(dc.default.join(Pe,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=co.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(r){let o=r[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function pc(){let e=EE();e&&console.info(`${In} Latest log: ${e}`),console.info(`${In} All logs: ${Pe}`)}async function uy(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(pc)}var cn=require("commander"),fc=new cn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),mc=new cn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),hc=new cn.Option("--skip-update-check","Skip checking for @webflow packages updates"),gc=new cn.Option("--verbose","Display more information for debugging purposes."),uo=new cn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),sr=new cn.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),po=e=>async(t,n)=>{let o={...n.parent?.opts()||{},...t};await e(o)};var _E="Import a library of Code Components into your Webflow Workspace.",SE="Bundle a library of Code Components for local development.",dy=new Wt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),py=new Wt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),fy=new Wt.Option("--dev","Bundle in development mode for debugging purposes."),my=new Wt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),TE=new Wt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),AE=new Wt.Option("--public-path <path>","Set the public path for the bundle."),OE=new Wt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function yc(e,t){return e.command(t).description(_E).addOption(uo).addOption(dy).addOption(py).addOption(fy).addOption(my).action(po(cc))}function bc(e,t){return e.command(t).description(SE).addOption(TE).addOption(AE).addOption(OE).addOption(dy).addOption(py).addOption(fy).addOption(my).action(po(uc))}var hy=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");yc(t,"share"),bc(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(pc)};var gy=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(uo).addOption(sr).action(Eh),yc(t,"import"),bc(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(uo).addOption(sr).action(po(Oi))};var Ee=w(require("fs")),_e=w(require("path"));V();He();var Ki="astro",wc="cloud-scaffolds";var yy="package.json",un="webflow.json",Yi="wf-placeholder-name",by="CLOUD_MOUNT_PATH",wy="gitignore";var Dc=async(e,t,n=Ki,r,o,i)=>{try{let s=r[n];if(!s)throw new Error(`Scaffold "${n}" not found`);for(let a of s)try{let l=_e.join(e,a.split(_e.join(wc,n))[1]?.substring(1)||""),c=a.includes("next.config.ts"),u=a.includes("astro.config.mjs"),p=c||u;if(a.includes(un)&&Ee.existsSync(l))continue;if(a.includes(yy)||a.includes(un)){let m=(await Ee.promises.readFile(a,"utf8")).replace(Yi,e);await Xi(l,m)}else if(p){let f=await Ee.promises.readFile(a,"utf8");await Xi(l,f.replace(by,t))}else if(_e.basename(l).toLowerCase()===wy){let f=await Ee.promises.readFile(a,"utf8"),m=_e.join(_e.dirname(l),".gitignore");await Xi(m,f)}else{let f=await Ee.promises.readFile(a);await Xi(l,f)}}catch(l){d.error(`Error processing file ${a}: ${l}`)}if(o&&i)try{No({siteId:o,apiToken:i,directory:e})}catch(a){d.error(`Error creating .env file: ${a}`)}}catch(s){throw d.error(`Error applying scaffold: ${s}`),s}},vc=async()=>{try{let e={},t=_e.join(_e.resolve(__dirname),wc);if(!Ee.existsSync(t))throw new Error(`Scaffolds directory not found at: ${t}`);let n=await Ee.promises.readdir(t);for(let r of n)try{let o=_e.join(t,r);e[r]=await Dy(o)}catch(o){d.error(`Error processing scaffold ${r}: ${o}`)}return e}catch(e){throw d.error(`Error getting available scaffolds: ${e}`),e}},Dy=async e=>{let t=[];try{if(!Ee.existsSync(e))throw new Error(`Directory not found: ${e}`);let n=await Ee.promises.readdir(e);for(let r of n)try{let o=_e.join(e,r);(await Ee.promises.stat(o)).isDirectory()?t.push(...await Dy(o)):t.push(o)}catch(o){d.error(`Error processing path ${r}: ${o}`)}}catch(n){throw d.error(`Error reading directory ${e}: ${n}`),n}return t},Xi=async(e,t)=>{try{await Ee.promises.mkdir(_e.dirname(e),{recursive:!0}),await Ee.promises.writeFile(e,t)}catch(n){throw d.error(`Error writing file ${e}: ${n}`),n}};He();$e();var Ut=w(require("fs")),kc=w(require("path"));V();var Qi={angular:{package_identifier:"@angular/ssr",build_command:"ng build",config_template_path:"templates/angular/angular.json.template",wrangler_template_path:"templates/angular/wrangler.angular.json",assets_path:"dist/browser",deployment_type:"ssr",entrypoint_path:"./server.js"},astro:{package_identifier:"@astrojs/cloudflare",build_command:"astro build",config_template_path:"templates/astro/astro.config.mjs.template",additional_config_files:["templates/astro/webflow-loader.ts"],wrangler_template_path:"templates/astro/wrangler.astro.json",assets_path:"dist",deployment_type:"ssr",assets_exclude_path:"_worker.js",entrypoint_path:"./index.js"},docusaurus:{package_identifier:"@docusaurus/core",build_command:"docusaurus build",config_template_path:"templates/docusaurus/docusaurus.config.js.template",wrangler_template_path:"templates/docusaurus/wrangler.docusaurus.json",assets_path:"build",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},gatsby:{package_identifier:"gatsby",build_command:"gatsby build",wrangler_template_path:"templates/gatsby/wrangler.gatsby.json",assets_path:"public",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},nextjs:{package_identifier:"@opennextjs/cloudflare",build_command:"opennextjs-cloudflare build",config_template_path:"templates/nextjs/next.config.ts.template",additional_config_files:["templates/nextjs/webflow-loader.ts"],wrangler_template_path:"templates/nextjs/wrangler.nextjs.json",assets_path:".open-next/assets",entrypoint_path:"./worker.js",deployment_type:"ssr"},nuxt:{package_identifier:"nuxt",build_command:"nuxt build",config_template_path:"templates/nuxt/nuxt.config.ts.template",wrangler_template_path:"templates/nuxt/wrangler.nuxt.json",assets_path:".output/public",entrypoint_path:"./index.js",deployment_type:"ssr"},qwik:{package_identifier:"@builder.io/qwik",build_command:"qwik build",config_template_path:"templates/qwik/vite.config.ts.template",wrangler_template_path:"templates/qwik/wrangler.qwik.json",assets_path:"dist",deployment_type:"ssr",entrypoint_path:"./_worker.js"},react:{package_identifier:"@vitejs/plugin-react",build_command:"tsc -b && vite build",config_template_path:"templates/react/vite.config.ts.template",wrangler_template_path:"templates/react/wrangler.react.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"},remix:{package_identifier:"@remix-run/cloudflare",build_command:"remix vite:build",config_template_path:"templates/remix/vite.config.ts.template",wrangler_template_path:"templates/remix/wrangler.remix.json",assets_path:"build/client",deployment_type:"ssr",entrypoint_path:"./server.js"},solid:{package_identifier:"@solidjs/start",build_command:"vinxi build",config_template_path:"templates/solid/app.config.ts.template",wrangler_template_path:"templates/solid/wrangler.solid.json",assets_path:".output/public",deployment_type:"ssr",entrypoint_path:"./index.js"},svelte:{package_identifier:"@sveltejs/vite-plugin-svelte",build_command:"vite build",config_template_path:"templates/svelte/vite.config.ts.template",wrangler_template_path:"templates/svelte/wrangler.svelte.json",assets_path:".svelte-kit/cloudflare",deployment_type:"ssr",entrypoint_path:"./_worker.js"},vue:{package_identifier:"@vitejs/plugin-vue",build_command:"vue-tsc --build && vite build",config_template_path:"templates/vue/vite.config.ts.template",wrangler_template_path:"templates/vue/wrangler.vue.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"}},es=["nextjs","astro","remix"];async function vy(e=process.cwd()){let t=kc.join(e,"package.json"),n=kc.join(e,"webflow.json");if(!Ut.existsSync(t))throw new Error("No package.json file found");let r=null;if(Ut.existsSync(n))try{let i=JSON.parse(Ut.readFileSync(n,"utf8")).cloud?.framework;if(i){if(!Qi[i]){let s=Object.keys(Qi).join(", ");throw new Error(`Framework '${i}' from webflow.json is not supported. Must be one of: ${s}`)}if(!es.includes(i))throw new Error(`Framework '${i}' is not currently supported. Must be one of: ${es.join(", ")}`);r=i,d.info(`Using framework type from webflow.json: ${r}`)}else throw new Error("webflow.json exists but doesn't contain valid framework information under the 'cloud' key")}catch(o){throw o instanceof SyntaxError?new Error("webflow.json contains invalid JSON"):o}if(!r)try{let o=JSON.parse(Ut.readFileSync(t,"utf8"));for(let s of es){let l=Qi[s].package_identifier;if(o.dependencies?.[l]||o.devDependencies?.[l]){r=s;break}}if(!r)throw new Error(`Framework not detected or not supported. Only ${es.join(", ")} are currently supported.`);d.info(`Detected framework: ${r}`),Ut.writeFileSync(n,JSON.stringify({cloud:{framework:r}},null,2))}catch(o){throw o instanceof SyntaxError?new Error("package.json contains invalid JSON"):o}return{framework:r,config:Qi[r]}}var I=w(require("fs")),z=w(require("path")),yr=require("child_process"),Vy=w(require("tar"));var pe=w(require("fs")),Ae=w(require("path"));var re={};Uc(re,{BRAND:()=>r_,DIRTY:()=>dn,EMPTY_PATH:()=>jE,INVALID:()=>B,NEVER:()=>z_,OK:()=>ve,ParseStatus:()=>be,Schema:()=>G,ZodAny:()=>qt,ZodArray:()=>kt,ZodBigInt:()=>fn,ZodBoolean:()=>mn,ZodBranded:()=>mo,ZodCatch:()=>Fn,ZodDate:()=>hn,ZodDefault:()=>Cn,ZodDiscriminatedUnion:()=>rs,ZodEffects:()=>Ue,ZodEnum:()=>kn,ZodError:()=>Se,ZodFirstPartyTypeKind:()=>L,ZodFunction:()=>is,ZodIntersection:()=>wn,ZodIssueCode:()=>D,ZodLazy:()=>Dn,ZodLiteral:()=>vn,ZodMap:()=>pr,ZodNaN:()=>mr,ZodNativeEnum:()=>xn,ZodNever:()=>Qe,ZodNull:()=>yn,ZodNullable:()=>lt,ZodNumber:()=>pn,ZodObject:()=>Te,ZodOptional:()=>ze,ZodParsedType:()=>S,ZodPipeline:()=>ho,ZodPromise:()=>Jt,ZodReadonly:()=>En,ZodRecord:()=>os,ZodSchema:()=>G,ZodSet:()=>fr,ZodString:()=>Gt,ZodSymbol:()=>ur,ZodTransformer:()=>Ue,ZodTuple:()=>at,ZodType:()=>G,ZodUndefined:()=>gn,ZodUnion:()=>bn,ZodUnknown:()=>vt,ZodVoid:()=>dr,addIssueToContext:()=>x,any:()=>p_,array:()=>g_,bigint:()=>a_,boolean:()=>Py,coerce:()=>M_,custom:()=>Ty,date:()=>l_,datetimeRegex:()=>_y,defaultErrorMap:()=>wt,discriminatedUnion:()=>D_,effect:()=>P_,enum:()=>T_,function:()=>E_,getErrorMap:()=>ar,getParsedType:()=>st,instanceof:()=>i_,intersection:()=>v_,isAborted:()=>ts,isAsync:()=>lr,isDirty:()=>ns,isValid:()=>Vt,late:()=>o_,lazy:()=>__,literal:()=>S_,makeIssue:()=>fo,map:()=>C_,nan:()=>s_,nativeEnum:()=>A_,never:()=>m_,null:()=>d_,nullable:()=>R_,number:()=>Oy,object:()=>y_,objectUtil:()=>xc,oboolean:()=>L_,onumber:()=>N_,optional:()=>I_,ostring:()=>B_,pipeline:()=>$_,preprocess:()=>j_,promise:()=>O_,quotelessJson:()=>PE,record:()=>x_,set:()=>F_,setErrorMap:()=>RE,strictObject:()=>b_,string:()=>Ay,symbol:()=>c_,transformer:()=>P_,tuple:()=>k_,undefined:()=>u_,union:()=>w_,unknown:()=>f_,util:()=>H,void:()=>h_});var H;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(H||(H={}));var xc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xc||(xc={}));var S=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),st=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(e)?S.array:e===null?S.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?S.promise:typeof Map<"u"&&e instanceof Map?S.map:typeof Set<"u"&&e instanceof Set?S.set:typeof Date<"u"&&e instanceof Date?S.date:S.object;default:return S.unknown}};var D=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),PE=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Se=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Se.create=e=>new Se(e);var IE=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===S.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,H.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${H.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${H.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${H.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:H.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,H.assertNever(e)}return{message:n}},wt=IE;var ky=wt;function RE(e){ky=e}function ar(){return ky}var fo=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},jE=[];function x(e,t){let n=ar(),r=fo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wt?void 0:wt].filter(o=>!!o)});e.common.issues.push(r)}var be=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return B;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return B;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},B=Object.freeze({status:"aborted"}),dn=e=>({status:"dirty",value:e}),ve=e=>({status:"valid",value:e}),ts=e=>e.status==="aborted",ns=e=>e.status==="dirty",Vt=e=>e.status==="valid",lr=e=>typeof Promise<"u"&&e instanceof Promise;var P;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(P||(P={}));var We=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},xy=(e,t)=>{if(Vt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Se(e.common.issues);return this._error=n,this._error}}};function U(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}var G=class{get description(){return this._def.description}_getType(t){return st(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:st(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new be,ctx:{common:t.parent.common,data:t.data,parsedType:st(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(lr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)},o=this._parseSync({data:t,path:r.path,parent:r});return xy(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return Vt(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Vt(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(lr(o)?o:Promise.resolve(o));return xy(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:D.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ue({schema:this,typeName:L.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ze.create(this,this._def)}nullable(){return lt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kt.create(this)}promise(){return Jt.create(this,this._def)}or(t){return bn.create([this,t],this._def)}and(t){return wn.create(this,t,this._def)}transform(t){return new Ue({...U(this._def),schema:this,typeName:L.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Cn({...U(this._def),innerType:this,defaultValue:n,typeName:L.ZodDefault})}brand(){return new mo({typeName:L.ZodBranded,type:this,...U(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Fn({...U(this._def),innerType:this,catchValue:n,typeName:L.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ho.create(this,t)}readonly(){return En.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$E=/^c[^\s-]{8,}$/i,BE=/^[0-9a-z]+$/,NE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,LE=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ME=/^[a-z0-9_-]{21}$/i,zE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,WE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,UE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Cc,GE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,JE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,HE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,KE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",YE=new RegExp(`^${Fy}$`);function Ey(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function XE(e){return new RegExp(`^${Ey(e)}$`)}function _y(e){let t=`${Fy}T${Ey(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function QE(e,t){return!!((t==="v4"||!t)&&GE.test(e)||(t==="v6"||!t)&&JE.test(e))}function e_(e,t){if(!zE.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function t_(e,t){return!!((t==="v4"||!t)&&qE.test(e)||(t==="v6"||!t)&&HE.test(e))}var Gt=class e extends G{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.string,received:i.parsedType}),B}let r=new be,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?x(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&x(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")UE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"email",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Cc||(Cc=new RegExp(VE,"u")),Cc.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"emoji",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")LE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"uuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")ME.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"nanoid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")$E.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")BE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cuid2",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")NE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"ulid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),x(o,{validation:"url",code:D.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"regex",code:D.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_y(i).test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?YE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?XE(i).test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?WE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"duration",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?QE(t.data,i.version)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"ip",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?e_(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"jwt",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?t_(t.data,i.version)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cidr",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ZE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"base64",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?KE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"base64url",code:D.invalid_string,message:i.message}),r.dirty()):H.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:D.invalid_string,...P.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...P.errToObj(t)})}url(t){return this._addCheck({kind:"url",...P.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...P.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...P.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...P.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...P.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...P.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...P.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...P.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...P.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...P.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...P.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...P.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...P.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...P.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...P.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...P.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...P.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...P.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...P.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...P.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...P.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...P.errToObj(n)})}nonempty(t){return this.min(1,P.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Gt.create=e=>new Gt({checks:[],typeName:L.ZodString,coerce:e?.coerce??!1,...U(e)});function n_(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var pn=class e extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==S.number){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.number,received:i.parsedType}),B}let r,o=new be;for(let i of this._def.checks)i.kind==="int"?H.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),x(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?n_(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_finite,message:i.message}),o.dirty()):H.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,P.toString(n))}gt(t,n){return this.setLimit("min",t,!1,P.toString(n))}lte(t,n){return this.setLimit("max",t,!0,P.toString(n))}lt(t,n){return this.setLimit("max",t,!1,P.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:P.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:P.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:P.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:P.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};pn.create=e=>new pn({checks:[],typeName:L.ZodNumber,coerce:e?.coerce||!1,...U(e)});var fn=class e extends G{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==S.bigint)return this._getInvalidInput(t);let r,o=new be;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):H.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return x(n,{code:D.invalid_type,expected:S.bigint,received:n.parsedType}),B}gte(t,n){return this.setLimit("min",t,!0,P.toString(n))}gt(t,n){return this.setLimit("min",t,!1,P.toString(n))}lte(t,n){return this.setLimit("max",t,!0,P.toString(n))}lt(t,n){return this.setLimit("max",t,!1,P.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:P.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:P.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};fn.create=e=>new fn({checks:[],typeName:L.ZodBigInt,coerce:e?.coerce??!1,...U(e)});var mn=class extends G{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==S.boolean){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.boolean,received:r.parsedType}),B}return ve(t.data)}};mn.create=e=>new mn({typeName:L.ZodBoolean,coerce:e?.coerce||!1,...U(e)});var hn=class e extends G{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==S.date){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.date,received:i.parsedType}),B}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_date}),B}let r=new be,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):H.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:P.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:P.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};hn.create=e=>new hn({checks:[],coerce:e?.coerce||!1,typeName:L.ZodDate,...U(e)});var ur=class extends G{_parse(t){if(this._getType(t)!==S.symbol){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.symbol,received:r.parsedType}),B}return ve(t.data)}};ur.create=e=>new ur({typeName:L.ZodSymbol,...U(e)});var gn=class extends G{_parse(t){if(this._getType(t)!==S.undefined){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.undefined,received:r.parsedType}),B}return ve(t.data)}};gn.create=e=>new gn({typeName:L.ZodUndefined,...U(e)});var yn=class extends G{_parse(t){if(this._getType(t)!==S.null){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.null,received:r.parsedType}),B}return ve(t.data)}};yn.create=e=>new yn({typeName:L.ZodNull,...U(e)});var qt=class extends G{constructor(){super(...arguments),this._any=!0}_parse(t){return ve(t.data)}};qt.create=e=>new qt({typeName:L.ZodAny,...U(e)});var vt=class extends G{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ve(t.data)}};vt.create=e=>new vt({typeName:L.ZodUnknown,...U(e)});var Qe=class extends G{_parse(t){let n=this._getOrReturnCtx(t);return x(n,{code:D.invalid_type,expected:S.never,received:n.parsedType}),B}};Qe.create=e=>new Qe({typeName:L.ZodNever,...U(e)});var dr=class extends G{_parse(t){if(this._getType(t)!==S.undefined){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.void,received:r.parsedType}),B}return ve(t.data)}};dr.create=e=>new dr({typeName:L.ZodVoid,...U(e)});var kt=class e extends G{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==S.array)return x(n,{code:D.invalid_type,expected:S.array,received:n.parsedType}),B;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(x(n,{code:s?D.too_big:D.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(x(n,{code:D.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(x(n,{code:D.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new We(n,s,n.path,a)))).then(s=>be.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new We(n,s,n.path,a)));return be.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:P.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:P.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:P.toString(n)}})}nonempty(t){return this.min(1,t)}};kt.create=(e,t)=>new kt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:L.ZodArray,...U(t)});function cr(e){if(e instanceof Te){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ze.create(cr(r))}return new Te({...e._def,shape:()=>t})}else return e instanceof kt?new kt({...e._def,type:cr(e.element)}):e instanceof ze?ze.create(cr(e.unwrap())):e instanceof lt?lt.create(cr(e.unwrap())):e instanceof at?at.create(e.items.map(t=>cr(t))):e}var Te=class e extends G{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=H.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==S.object){let c=this._getOrReturnCtx(t);return x(c,{code:D.invalid_type,expected:S.object,received:c.parsedType}),B}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Qe&&this._def.unknownKeys==="strip"))for(let c in o.data)s.includes(c)||a.push(c);let l=[];for(let c of s){let u=i[c],p=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new We(o,p,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Qe){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(x(o,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let p=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new We(o,p,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let p=await u.key,f=await u.value;c.push({key:p,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>be.mergeObjectSync(r,c)):be.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return P.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:P.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:L.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let r of H.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let r of H.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}deepPartial(){return cr(this)}partial(t){let n={};for(let r of H.objectKeys(this.shape)){let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let r of H.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof ze;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return Sy(H.objectKeys(this.shape))}};Te.create=(e,t)=>new Te({shape:()=>e,unknownKeys:"strip",catchall:Qe.create(),typeName:L.ZodObject,...U(t)});Te.strictCreate=(e,t)=>new Te({shape:()=>e,unknownKeys:"strict",catchall:Qe.create(),typeName:L.ZodObject,...U(t)});Te.lazycreate=(e,t)=>new Te({shape:e,unknownKeys:"strip",catchall:Qe.create(),typeName:L.ZodObject,...U(t)});var bn=class extends G{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Se(a.ctx.common.issues));return x(n,{code:D.invalid_union,unionErrors:s}),B}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(l=>new Se(l));return x(n,{code:D.invalid_union,unionErrors:a}),B}}get options(){return this._def.options}};bn.create=(e,t)=>new bn({options:e,typeName:L.ZodUnion,...U(t)});var Dt=e=>e instanceof Dn?Dt(e.schema):e instanceof Ue?Dt(e.innerType()):e instanceof vn?[e.value]:e instanceof kn?e.options:e instanceof xn?H.objectValues(e.enum):e instanceof Cn?Dt(e._def.innerType):e instanceof gn?[void 0]:e instanceof yn?[null]:e instanceof ze?[void 0,...Dt(e.unwrap())]:e instanceof lt?[null,...Dt(e.unwrap())]:e instanceof mo||e instanceof En?Dt(e.unwrap()):e instanceof Fn?Dt(e._def.innerType):[],rs=class e extends G{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.object)return x(n,{code:D.invalid_type,expected:S.object,received:n.parsedType}),B;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(x(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=Dt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:L.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...U(r)})}};function Fc(e,t){let n=st(e),r=st(t);if(e===t)return{valid:!0,data:e};if(n===S.object&&r===S.object){let o=H.objectKeys(t),i=H.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let l=Fc(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===S.array&&r===S.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],l=Fc(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===S.date&&r===S.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var wn=class extends G{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(ts(i)||ts(s))return B;let a=Fc(i.value,s.value);return a.valid?((ns(i)||ns(s))&&n.dirty(),{status:n.value,value:a.data}):(x(r,{code:D.invalid_intersection_types}),B)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};wn.create=(e,t,n)=>new wn({left:e,right:t,typeName:L.ZodIntersection,...U(n)});var at=class e extends G{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.array)return x(r,{code:D.invalid_type,expected:S.array,received:r.parsedType}),B;if(r.data.length<this._def.items.length)return x(r,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),B;!this._def.rest&&r.data.length>this._def.items.length&&(x(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new We(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>be.mergeArray(n,s)):be.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};at.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new at({items:e,typeName:L.ZodTuple,rest:null,...U(t)})};var os=class e extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.object)return x(r,{code:D.invalid_type,expected:S.object,received:r.parsedType}),B;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new We(r,a,r.path,a)),value:s._parse(new We(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?be.mergeObjectAsync(n,o):be.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof G?new e({keyType:t,valueType:n,typeName:L.ZodRecord,...U(r)}):new e({keyType:Gt.create(),valueType:t,typeName:L.ZodRecord,...U(n)})}},pr=class extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.map)return x(r,{code:D.invalid_type,expected:S.map,received:r.parsedType}),B;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new We(r,a,r.path,[c,"key"])),value:i._parse(new We(r,l,r.path,[c,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};pr.create=(e,t,n)=>new pr({valueType:t,keyType:e,typeName:L.ZodMap,...U(n)});var fr=class e extends G{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.set)return x(r,{code:D.invalid_type,expected:S.set,received:r.parsedType}),B;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(x(r,{code:D.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(x(r,{code:D.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let u of l){if(u.status==="aborted")return B;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}let a=[...r.data.values()].map((l,c)=>i._parse(new We(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:P.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:P.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};fr.create=(e,t)=>new fr({valueType:e,minSize:null,maxSize:null,typeName:L.ZodSet,...U(t)});var is=class e extends G{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.function)return x(n,{code:D.invalid_type,expected:S.function,received:n.parsedType}),B;function r(a,l){return fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ar(),wt].filter(c=>!!c),issueData:{code:D.invalid_arguments,argumentsError:l}})}function o(a,l){return fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ar(),wt].filter(c=>!!c),issueData:{code:D.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Jt){let a=this;return ve(async function(...l){let c=new Se([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),p=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(o(p,m)),c})})}else{let a=this;return ve(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new Se([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),p=a._def.returns.safeParse(u,i);if(!p.success)throw new Se([o(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:at.create(t).rest(vt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||at.create([]).rest(vt.create()),returns:n||vt.create(),typeName:L.ZodFunction,...U(r)})}},Dn=class extends G{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Dn.create=(e,t)=>new Dn({getter:e,typeName:L.ZodLazy,...U(t)});var vn=class extends G{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return x(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:t.data}}get value(){return this._def.value}};vn.create=(e,t)=>new vn({value:e,typeName:L.ZodLiteral,...U(t)});function Sy(e,t){return new kn({values:e,typeName:L.ZodEnum,...U(t)})}var kn=class e extends G{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return x(n,{expected:H.joinValues(r),received:n.parsedType,code:D.invalid_type}),B}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return x(n,{received:n.data,code:D.invalid_enum_value,options:r}),B}return ve(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};kn.create=Sy;var xn=class extends G{_parse(t){let n=H.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==S.string&&r.parsedType!==S.number){let o=H.objectValues(n);return x(r,{expected:H.joinValues(o),received:r.parsedType,code:D.invalid_type}),B}if(this._cache||(this._cache=new Set(H.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=H.objectValues(n);return x(r,{received:r.data,code:D.invalid_enum_value,options:o}),B}return ve(t.data)}get enum(){return this._def.values}};xn.create=(e,t)=>new xn({values:e,typeName:L.ZodNativeEnum,...U(t)});var Jt=class extends G{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.promise&&n.common.async===!1)return x(n,{code:D.invalid_type,expected:S.promise,received:n.parsedType}),B;let r=n.parsedType===S.promise?n.data:Promise.resolve(n.data);return ve(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Jt.create=(e,t)=>new Jt({type:e,typeName:L.ZodPromise,...U(t)});var Ue=class extends G{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===L.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{x(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return B;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?B:l.status==="dirty"?dn(l.value):n.value==="dirty"?dn(l.value):l});{if(n.value==="aborted")return B;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?B:a.status==="dirty"?dn(a.value):n.value==="dirty"?dn(a.value):a}}if(o.type==="refinement"){let s=a=>{let l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Vt(s))return B;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Vt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):B);H.assertNever(o)}};Ue.create=(e,t,n)=>new Ue({schema:e,typeName:L.ZodEffects,effect:t,...U(n)});Ue.createWithPreprocess=(e,t,n)=>new Ue({schema:t,effect:{type:"preprocess",transform:e},typeName:L.ZodEffects,...U(n)});var ze=class extends G{_parse(t){return this._getType(t)===S.undefined?ve(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ze.create=(e,t)=>new ze({innerType:e,typeName:L.ZodOptional,...U(t)});var lt=class extends G{_parse(t){return this._getType(t)===S.null?ve(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lt.create=(e,t)=>new lt({innerType:e,typeName:L.ZodNullable,...U(t)});var Cn=class extends G{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Cn.create=(e,t)=>new Cn({innerType:e,typeName:L.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...U(t)});var Fn=class extends G{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return lr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Se(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Se(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Fn.create=(e,t)=>new Fn({innerType:e,typeName:L.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...U(t)});var mr=class extends G{_parse(t){if(this._getType(t)!==S.nan){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.nan,received:r.parsedType}),B}return{status:"valid",value:t.data}}};mr.create=e=>new mr({typeName:L.ZodNaN,...U(e)});var r_=Symbol("zod_brand"),mo=class extends G{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},ho=class e extends G{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?B:i.status==="dirty"?(n.dirty(),dn(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?B:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:L.ZodPipeline})}},En=class extends G{_parse(t){let n=this._def.innerType._parse(t),r=o=>(Vt(o)&&(o.value=Object.freeze(o.value)),o);return lr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};En.create=(e,t)=>new En({innerType:e,typeName:L.ZodReadonly,...U(t)});function Cy(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Ty(e,t={},n){return e?qt.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Cy(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Cy(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):qt.create()}var o_={object:Te.lazycreate},L;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(L||(L={}));var i_=(e,t={message:`Input not instance of ${e.name}`})=>Ty(n=>n instanceof e,t),Ay=Gt.create,Oy=pn.create,s_=mr.create,a_=fn.create,Py=mn.create,l_=hn.create,c_=ur.create,u_=gn.create,d_=yn.create,p_=qt.create,f_=vt.create,m_=Qe.create,h_=dr.create,g_=kt.create,y_=Te.create,b_=Te.strictCreate,w_=bn.create,D_=rs.create,v_=wn.create,k_=at.create,x_=os.create,C_=pr.create,F_=fr.create,E_=is.create,__=Dn.create,S_=vn.create,T_=kn.create,A_=xn.create,O_=Jt.create,P_=Ue.create,I_=ze.create,R_=lt.create,j_=Ue.createWithPreprocess,$_=ho.create,B_=()=>Ay().optional(),N_=()=>Oy().optional(),L_=()=>Py().optional(),M_={string:e=>Gt.create({...e,coerce:!0}),number:e=>pn.create({...e,coerce:!0}),boolean:e=>mn.create({...e,coerce:!0}),bigint:e=>fn.create({...e,coerce:!0}),date:e=>hn.create({...e,coerce:!0})};var z_=B;function ss(e,t=!1){let n=e.length,r=0,o="",i=0,s=16,a=0,l=0,c=0,u=0,p=0;function f(C,O){let Z=0,N=0;for(;Z<C||!O;){let A=e.charCodeAt(r);if(A>=48&&A<=57)N=N*16+A-48;else if(A>=65&&A<=70)N=N*16+A-65+10;else if(A>=97&&A<=102)N=N*16+A-97+10;else break;r++,Z++}return Z<C&&(N=-1),N}function m(C){r=C,o="",i=0,s=16,p=0}function g(){let C=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&hr(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&hr(e.charCodeAt(r)))for(r++;r<e.length&&hr(e.charCodeAt(r));)r++;else return p=3,e.substring(C,r);let O=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&hr(e.charCodeAt(r))){for(r++;r<e.length&&hr(e.charCodeAt(r));)r++;O=r}else p=3;return e.substring(C,O)}function v(){let C="",O=r;for(;;){if(r>=n){C+=e.substring(O,r),p=2;break}let Z=e.charCodeAt(r);if(Z===34){C+=e.substring(O,r),r++;break}if(Z===92){if(C+=e.substring(O,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=`
|
|
124
|
-
`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let A=f(4,!0);A>=0?C+=String.fromCharCode(A):p=4;break;default:p=5}O=r;continue}if(Z>=0&&Z<=31)if(
|
|
125
|
-
`),a++,c=r,s=14;switch(C){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=v(),s=10;case 47:let O=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!
|
|
126
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
127
|
-
`+" ".repeat(t))}," ":{"\n":new Array(
|
|
128
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
129
|
-
`+" ".repeat(t))}};var as;(function(e){e.DEFAULT={allowTrailingComma:!1}})(as||(as={}));function Ry(e,t=[],n=as.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return jy(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function jy(e,t,n=as.DEFAULT){let r=ss(e,!1),o=[],i=0;function s(W){return W?()=>i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(W){return W?ae=>i===0&&W(ae,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(W){return W?ae=>i===0&&W(ae,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(W){return W?()=>{i>0?i++:W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(W){return W?()=>{i>0&&i--,i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let p=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),g=c(t.onArrayBegin),v=u(t.onArrayEnd),E=l(t.onLiteralValue),_=a(t.onSeparator),M=s(t.onComment),C=a(t.onError),O=n&&n.disallowComments,Z=n&&n.allowTrailingComma;function N(){for(;;){let W=r.scan();switch(r.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:O||A(11);break;case 2:A(12);break;case 6:A(16);break}switch(W){case 12:case 13:O?A(10):M();break;case 16:A(1);break;case 15:case 14:break;default:return W}}}function A(W,ae=[],Ct=[]){if(C(W),ae.length+Ct.length>0){let bo=r.getToken();for(;bo!==17;){if(ae.indexOf(bo)!==-1){N();break}else if(Ct.indexOf(bo)!==-1)break;bo=N()}}}function h(W){let ae=r.getTokenValue();return W?E(ae):(f(ae),o.push(ae)),N(),!0}function b(){switch(r.getToken()){case 11:let W=r.getTokenValue(),ae=Number(W);isNaN(ae)&&(A(2),ae=0),E(ae);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return N(),!0}function $(){return r.getToken()!==10?(A(3,[],[2,5]),!1):(h(!1),r.getToken()===6?(_(":"),N(),Ve()||A(4,[],[2,5])):A(5,[],[2,5]),o.pop(),!0)}function F(){p(),N();let W=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(W||A(4,[],[]),_(","),N(),r.getToken()===2&&Z)break}else W&&A(6,[],[]);$()||A(4,[],[2,5]),W=!0}return m(),r.getToken()!==2?A(7,[2],[]):N(),!0}function he(){g(),N();let W=!0,ae=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ae||A(4,[],[]),_(","),N(),r.getToken()===4&&Z)break}else ae&&A(6,[],[]);W?(o.push(0),W=!1):o[o.length-1]++,Ve()||A(4,[],[4,5]),ae=!0}return v(),W||o.pop(),r.getToken()!==4?A(8,[4],[]):N(),!0}function Ve(){switch(r.getToken()){case 3:return he();case 1:return F();case 10:return h(!0);default:return b()}}return N(),r.getToken()===17?n.allowEmptyContent?!0:(A(4,[],[]),!1):Ve()?(r.getToken()!==17&&A(9,[],[]),!0):(A(4,[],[]),!1)}var $y;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})($y||($y={}));var By;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(By||(By={}));var _c=Ry;var Ny;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Ny||(Ny={}));V();var Ly=re.object({name:re.string(),main:re.string(),compatibility_date:re.string(),compatibility_flags:re.array(re.string()).optional(),placement:re.object({mode:re.string()}).passthrough().optional(),assets:re.object({directory:re.string(),binding:re.string().optional()}).passthrough().optional(),d1_databases:re.array(re.object({database_name:re.string(),database_id:re.string(),binding:re.string(),migrations_dir:re.string().optional()}).passthrough()).default([]),kv_namespaces:re.array(re.object({binding:re.string(),id:re.string()}).passthrough()).default([]),r2_buckets:re.array(re.object({binding:re.string(),bucket_name:re.string()}).passthrough()).default([])}).passthrough();function My(e,t="wrangler.json"){let n=Ae.join(e,t);if(!pe.existsSync(n)){if(t.endsWith(".json"))return d.warn(`/${t} not found, checking for /${t}c`),My(e,t+"c");d.warn(`/${t} not found`);return}let r=pe.readFileSync(n,"utf8");d.info(`reading /${t}...`);let o;try{o=_c(r)}catch(i){d.error(`/${t} loaded but could not parse as JSONC: ${i}`);return}try{let i=Ly.parse(o);return d.info(`successfully loaded /${t}`),i}catch(i){d.error(`/${t} valid JSONC but schema validation failed: ${i}`);return}}function zy(e,t,n={}){if(!pe.existsSync(e))return 0;pe.mkdirSync(t,{recursive:!0});let r=pe.readdirSync(e,{withFileTypes:!0}),o=0;for(let i of r){if(n.exclude&&i.name===n.exclude)continue;let s=Ae.join(e,i.name),a=Ae.join(t,i.name);i.isDirectory()?o+=zy(s,a,n):(pe.copyFileSync(s,a),o++)}return o}async function Wy(e,t){let n=null,r=null,o=Ae.join(t,"wrangler.json"),i=Ae.join(t,"wrangler.jsonc");pe.existsSync(o)?(n=o,r=".json"):pe.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(d.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),pe.copyFileSync(n,Ae.join(t,`clouduser.wrangler${r}`)));let s=n?My(t,Ae.basename(n)):null,a=Ae.join(__dirname,e.config.wrangler_template_path),l=Ae.join(t,"wrangler.json");if(!pe.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(d.info(`copying template /templates/${e.framework}/wrangler.${e.framework}.json to /wrangler.json`),pe.copyFileSync(a,l),!s)return;let c=JSON.parse(pe.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,d.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,d.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,d.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),pe.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let p=s.d1_databases[u];if(!p.migrations_dir){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=p.migrations_dir,m=Ae.join(t,f);if(!pe.existsSync(m)){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let g=Ae.join(t,"clouduser","migrations",f),v=zy(m,g);v>0?d.info(`copied ${v} migrations to /clouduser/migrations/${f}`):d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function X_(e){if(!/^[a-z0-9-]+$/.test(e))throw new Error(`Invalid object storage bucket name ${JSON.stringify(e)}: Only lowercase letters, numbers, and hyphens are allowed.`);if(e.startsWith("-")||e.endsWith("-"))throw new Error(`Invalid object storage bucket name "${e}": Cannot begin or end with a hyphen.`);if(e.length>27)throw new Error(`Invalid object storage bucket name "${e}": Must be 27 characters or fewer (currently ${e.length} characters).`)}function Uy(e){let t=null;for(let i of[".json",".jsonc"]){let s=Ae.join(e,`clouduser.wrangler${i}`);if(pe.existsSync(s)){t=s;break}}if(!t)return;let n=pe.readFileSync(t,"utf8"),r;try{r=_c(n)}catch(i){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${i}`)}let o=Ly.parse(r);if(o.d1_databases&&o.d1_databases.length>0&&o.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${o.d1_databases.length}. Maximum allowed is 5.`);if(o.kv_namespaces&&o.kv_namespaces.length>0&&o.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${o.kv_namespaces.length}. Maximum allowed is 5.`);if(o.r2_buckets&&o.r2_buckets.length>0){if(o.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${o.r2_buckets.length}. Maximum allowed is 5.`);d.info(`validating ${o.r2_buckets.length} object storage bucket name(s)...`);for(let i of o.r2_buckets)X_(i.bucket_name)}}V();Fe();oe();ke();async function Gy(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=z.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||z.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=Tc(n),c=t.telemetry;await c?.sendUsage("cloud_build_start",{framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),I.mkdirSync(o,{recursive:!0});try{d.info(k.green(`--- \u{1F4E6} Installing dependencies ------------------------------------
|
|
130
|
-
`)),await
|
|
131
|
-
`)),await
|
|
132
|
-
`)),await Wy(e,n),
|
|
133
|
-
`)),d.info(`running ${e.config.build_command}...`),await
|
|
134
|
-
`)),await
|
|
135
|
-
`)),await
|
|
136
|
-
`));let u=await
|
|
137
|
-
`)),I.rmSync(t,{recursive:!0,force:!0}))}catch(t){d.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function
|
|
138
|
-
`));for(let s of["mjs","cjs","js","ts"]){let a=z.join(e,`clouduser.${o}.${s}`),l=z.join(e,`${o}.${s}`);if(I.existsSync(a)){d.info(`restoring /${o}.${s} from /clouduser.${o}.${s}...`),I.existsSync(l)&&I.unlinkSync(l),I.renameSync(a,l);break}}for(let s of[".jsonc",".json"]){let a=z.join(e,`clouduser.wrangler${s}`);if(I.existsSync(a)){d.info(`restoring user wrangler${s} from backup...`);let l=z.join(e,"wrangler.json");I.existsSync(l)&&I.unlinkSync(l);let c=z.join(e,`wrangler${s}`);I.renameSync(a,c);break}}let i=z.join(e,"clouduser");I.existsSync(i)&&(d.info("cleaning up clouduser directory..."),I.rmSync(i,{recursive:!0,force:!0}));for(let s of t.config.additional_config_files||[]){let a=z.join(e,z.basename(s));I.existsSync(a)&&(d.info(`cleaning up additional config file ${a}...`),I.unlinkSync(a))}}catch(n){d.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function Q_(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"];try{if(t==="astro"){let a=z.join(e,"package.json"),l=JSON.parse(I.readFileSync(a,"utf8"));l.dependencies?.["@astrojs/react"]||l.devDependencies?.["@astrojs/react"]||(d.info("Warning: cosmic astro integration requires @astrojs/react and this project doesn't require it. Installing now..."),(0,yr.execSync)("npm install --save @astrojs/react",{cwd:e,stdio:"inherit"}))}let i=z.join(e,"package-lock.json");I.existsSync(i)?(d.info("Running npm ci..."),(0,yr.execSync)(`npm ci ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(d.info("Warning: No package-lock.json found, installing dependencies with npm install"),(0,yr.execSync)(`npm install ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:I.existsSync(z.join(e,"package-lock.json"))})}catch(i){let s=Date.now()-r;throw await n?.sendError(i instanceof Error?i:new Error(String(i)),"cloud_install_dependencies_failure",{duration:s,framework:t,hasPackageLock:I.existsSync(z.join(e,"package-lock.json"))}),i}}async function eS(e,t,n,r,o){if(d.info(`Framework: ${t.framework}`),d.info(`Mount path: ${n}`),d.info(`Deployment type: ${t.config.deployment_type}`),!t.config.config_template_path)return;let i=z.join(__dirname,t.config.config_template_path),s=z.basename(i,".template"),a=s.slice(0,s.lastIndexOf("."));for(let p of["mjs","cjs","js","ts"]){let f=z.join(e,`${a}.${p}`);if(I.existsSync(f)){let m=z.join(e,`clouduser.${a}.${p}`);d.info(`renaming user base config /${a}.${p} to /clouduser.${a}.${p}...`),I.renameSync(f,m);break}}let l=z.join(e,s);d.info(`rendering override config from /templates/${t.framework}/${s}.template to /${s}`);let u=I.readFileSync(i,"utf8").replace(/\$\{([^}]+)\}/g,(p,f)=>({COSMIC_MOUNT_PATH:n,COSMIC_DEPLOY_URL:r||(o?`https://${o}.wf-app-prod.cosmic.webflow.services`:"")})[f]||p);I.writeFileSync(l,u);for(let p of t.config.additional_config_files||[]){let f=z.join(__dirname,p);I.statSync(f,{throwIfNoEntry:!1})?(d.info(`copying additional config file /${p} to ${z.join(e,z.basename(p))}`),I.copyFileSync(f,z.join(e,z.basename(p)))):d.warn(`additional config file /${p} does not exist; skipping`)}}async function tS(e,t,n){let r=Date.now();try{let o=t.split(" "),i=o[0],s=o.slice(1);(0,yr.execSync)(`npx ${i} ${s.join(" ")}`,{cwd:e,stdio:"inherit"});let a=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:a,buildCommand:t})}catch(o){let i=Date.now()-r;throw await n?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function nS(e,t){I.mkdirSync(t,{recursive:!0});let n=z.join(e,"wrangler.json"),r=z.join(e,"wrangler.jsonc");if(!I.existsSync(n)&&!I.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,yr.execSync)(`npx wrangler deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function rS(e,t,n,r){let o=n.config.assets_path,i=n.config.assets_exclude_path,s=r.replace(/\/+$/,"").replace(/^\/+/,"");if(n.framework==="nextjs"||n.framework==="astro"){let p=z.join(e,o);if(I.existsSync(p)&&I.statSync(p).isDirectory()){let m=I.readdirSync(p,{withFileTypes:!0}).find(g=>!(!g.isDirectory()||i&&g.name===i||n.framework==="astro"&&(g.name==="_routes.json"||g.name==="_worker.js")));m&&(o=`${o}/${m.name}`)}}let a=z.join(t,"assets",s||"");I.mkdirSync(a,{recursive:!0});let l=z.join(e,o);if(I.existsSync(l)&&I.statSync(l).isDirectory()){d.info(`copying assets from /${o} to output/assets...`);try{i?(d.info(`excluding ${i}`),Hy(l,a,i)):Sc(l,a)}catch(p){d.error(p,{prefix:"Failed to copy assets:"})}}else d.info("No assets to copy or assets directory not found");let c=z.join(e,"webflow.json");I.existsSync(c)&&I.copyFileSync(c,z.join(t,"webflow.json"));let u=null;for(let p of[".json",".jsonc"]){let f=z.join(e,`clouduser.wrangler${p}`);if(I.existsSync(f)){u=f;break}}if(u){d.info("including user wrangler config in output..."),I.copyFileSync(u,z.join(t,"clouduser.wrangler.json"));let p=z.join(e,"clouduser","migrations");if(I.existsSync(p)){d.info("copying migrations from clouduser/migrations to output/migrations...");let f=z.join(t,"migrations");Sc(p,f)}}}async function oS(e){let t=`${e}.tar.gz`;try{return await Vy.create({gzip:!0,file:t,cwd:z.dirname(e)},[z.basename(e)]),d.info(`Tarball created: ${t}`),t}catch(n){throw new y(n,{prefix:"Failed to create tarball:"})}}function Sc(e,t){I.mkdirSync(t,{recursive:!0});let n=I.readdirSync(e,{withFileTypes:!0});for(let r of n){let o=z.join(e,r.name),i=z.join(t,r.name);r.isDirectory()?Sc(o,i):I.copyFileSync(o,i)}}function Hy(e,t,n){I.mkdirSync(t,{recursive:!0});let r=I.readdirSync(e,{withFileTypes:!0});for(let o of r){if(o.name===n)continue;let i=z.join(e,o.name),s=z.join(t,o.name);o.isDirectory()?Hy(i,s,n):I.copyFileSync(i,s)}}we();de();V();var iS="DUPLICATE_ENVIRONMENT_MOUNT",sS="ENVIRONMENT_MOUNT_MISMATCH",aS="DUPLICATE_ENVIRONMENT_BRANCH",lS="INVALID_MOUNT_PATH_FORMAT",cS="INVALID_PROJECT_ID",Zy={[iS]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[sS]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[aS]:"An environment with this branch already exists for this project.",[lS]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[cS]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function Ky(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let r=e;t.code=typeof r.code=="string"?r.code:void 0,t.msg=typeof r.msg=="string"?r.msg:void 0,t.status=typeof r.status=="number"?r.status:void 0}let n=t.msg||"";d.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`);for(let r in Zy)if(n.includes(r))return Zy[r];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var br=w(require("fs")),Ac=require("child_process");V();oe();ke();var Yy=104857600;function Xy(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function uS(){try{let e=(0,Ac.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,Ac.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function Oc(e,t,n){let r=await fetch(`${R}${t}`,{method:n.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n.body?JSON.stringify(n.body):void 0});if(!r.ok){let o=await r.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=Ky(i);throw new Error(s)}return r.json()}async function Qy(e,t,n,r){let{manifest:o}=X(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new y("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await dS(e,{siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:uS()});return!s&&l.project_id&&(d.info("\u{1F4DD} Updating webflow.json with project ID..."),fe({cloud:{...i,project_id:l.project_id}})),l}async function dS(e,t){let{siteId:n,framework:r,mountPath:o,environment:i,version:s,projectId:a,projectName:l,description:c,directory:u}=t,p={framework:r,mount_path:o,environment:i,version:s};return a&&(p.project_id=a),l&&(p.project_name=l),c&&(p.description=c),u&&(p.app_path=u),Oc(e.accessToken,`/cosmic/${n}/cli-deploy-init`,{method:"POST",body:p})}async function eb(e,t){return Oc(e.accessToken,`/cosmic/${e.siteId}/cli-project-environments/${t}`,{method:"GET"})}async function tb(e){return Oc(e.accessToken,`/cosmic/${e.siteId}/cli-projects`,{method:"GET"})}async function nb(e,t){if(!br.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=br.statSync(e);if(n.size>Yy)throw new Error(`Build output is too large (${Xy(n.size)}). Maximum allowed size is ${Xy(Yy)}.`);let r=br.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([l,c])=>{i.append(l,c)});let s=new Blob([r],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let l=await a.text();throw new y(l,{prefix:`${q} Upload failed with response:`})}}async function rb(e,t){if(!e||e==="undefined")throw new y("Completion URL is undefined or invalid");let n=new URL(e);t&&n.searchParams.set("failed","true");let r=await fetch(n.toString(),{method:"GET"});if(!r.ok)throw new y(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var ob=require("webflow-api");de();de();oe();function Pc(e){return new ob.WebflowClient({accessToken:e,environment:{base:`${R}/v2`,dataApi:`${R}/v2`,contentDeliveryApi:`${Io}/v2`}})}async function yo(e,t){try{let r=await Pc(e).sites.get(t);return{id:r.id||t,displayName:r.displayName||"Unknown Site",shortName:r.shortName||"unknown-site",customDomains:r.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new y(n,{prefix:"Error fetching site details:"})}}async function Ic(e,t){try{return{customDomains:(await Pc(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new y(n,{prefix:"Error fetching custom domains:"})}}async function Rc(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new y(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function jc(e,t,n){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(r=>{if(r.mountPath!==t)return!1;if(!n)return!0;if(r.workerUrl)try{return new URL(r.workerUrl).hostname.split(".")[0]===n}catch{return!1}return!1}):!1}async function ib(e,t,n){try{let r=Pc(e),o=await yo(e,t),i=[];if(n?.domains&&n.domains.length>0)for(let s of n.domains){let a=o.customDomains?.find(l=>l.url===s);a?.id&&i.push(a.id)}await r.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:n?.publishToWebflowSubdomain??!0})}catch(r){throw new y(r,{prefix:"Error publishing site:"})}}Je();Ns();V();async function sb(e,t,n){let{siteId:r,accessToken:o}=e,i=On("Validating mount path configuration...").start();try{let s=await yo(o,r),a=await Ic(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(g=>g.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async g=>{try{let v=await Rc(g),E=Array.isArray(v.cosmic)?v.cosmic.map(M=>M.mountPath).filter(M=>typeof M=="string"):[],_=jc(v,t,n);return{domain:g,mountPaths:E,isValid:_===!0}}catch(v){return{domain:g,mountPaths:[],isValid:!1,error:v instanceof Error?v.message:String(v)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),p=await Promise.all(u),f=p.some(g=>!g.isValid),m=p.every(g=>g.isValid);return i.succeed("Mount path validation completed"),{isValid:m,domains:p,needsPublishing:f}}catch(s){throw i.fail("Mount path validation failed"),s}}async function ab(e,t,n){let{siteId:r,accessToken:o}=e;try{let i=await yo(o,r),s=await Ic(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let p=await Rc(u),f=jc(p,t,n);return{domain:u,isValid:f}}catch(p){return d.debug(`Could not verify mount path for ${u}: ${p}`),{domain:u,isValid:!1}}});return(await Promise.all(l)).filter(u=>u.isValid).map(u=>u.domain)}catch(i){return d.debug(`Error getting valid domains: ${i}`),[]}}function lb(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function cb(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await $o({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:r=>r.length===0?"Please select at least one domain to publish to.":!0});return n??[]}async function ub(){return await xe({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function $c(e,t){let{siteId:n,accessToken:r}=e,o=On(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await yo(r,n)).shortName}.webflow.io`,a=t.includes(s),l=t.filter(c=>c!==s);await ib(r,n,{domains:l,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}we();V();Fe();de();Oe();var ls=w(require("fs")),pb=w(require("path"));oe();ke();var cs=async()=>{try{let e=await vc();return Object.keys(e)}catch(e){return d.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},pS=async(e,t,n)=>{let r=n[t];if(!r)throw new Error(`Scaffold "${t}" not found`);let o=r.find(l=>l.includes(un));if(!o)throw new Error(`No ${un} found in scaffold "${t}"`);await ls.promises.mkdir(e,{recursive:!0});let s=(await ls.promises.readFile(o,"utf8")).replace(Yi,e),a=pb.join(e,un);await ls.promises.writeFile(a,s,"utf8")},Bc=async(e,t,n=Ki,r)=>{let o=`./${e}`,i=await vc(),s=null,a=!1;try{let l=Date.now();await pS(e,n,i),process.chdir(o);let{manifest:c}=X(),u=await ye(c,{site:r}),p=u.accessToken,f=u.siteId;if(s=J.forCloud({authToken:p,siteId:f}),await Dc(".",t,n,i,f,p),f){d.info("Running devlink export to fetch your Webflow components...");try{await fS({site:f,apiToken:p}),a=!0}catch(g){d.error(g,{prefix:"Failed to run devlink export:"}),d.info("You can manually run 'npx webflow devlink export' later to export your components.")}}let m=Date.now()-l;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:m,mountPath:t}),db(e)}catch(l){throw d.error(l,{prefix:"Error during Webflow authentication:"}),await Dc(".",t,n,i),d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),db(e),new y(l,{skipLogging:!0})}},fS=async e=>{let{exportComponents:t}=await Promise.resolve().then(()=>(Ul(),Jh));await t({site:e.site,apiToken:e.apiToken})},mS=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=X();return t.cloud?.skipMountPathCheck===!0}catch{return!1}},hS=async(e,t,n,r)=>{d.info("\u{1F50D} Validating mount path configuration...");let o=await sb(e,t,n);if(o.isValid)d.info(`${K} Mount path validation passed`);else if(d.info(`
|
|
139
|
-
\u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?
|
|
140
|
-
\u{1F3D7}\uFE0F Building project...`);let o=await
|
|
141
|
-
\u{1F310} Your cloud app will soon be available at:`);try{let r=await
|
|
123
|
+
`,f),"")}`)),t.succeed(),t=d.spinner("Generating library bundle");let{outputFiles:u,outputVolume:p}=await Mi({libraryIdentifier:r,renderer:n.renderer,framework:n.framework,publicPath:Ut(e.publicPath||EE),sourceVolumes:[i],componentsFiles:o,componentsOptions:c,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:s,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=d.spinner("Writing to disk"),u.forEach(([f,m])=>{let y=(0,sr.join)(`/${m}`,`${f.name}`),v=ro(p.readFileSync(y,"utf8").toString(),y,{bundleEnvironment:m}),E=(0,sr.join)(process.cwd(),e.outputPath||FE);Hi.default.existsSync((0,sr.join)(E,`${m}`))||Hi.default.mkdirSync((0,sr.join)(E,`${m}`),{recursive:!0}),Hi.default.writeFileSync((0,sr.join)(E,m,f.name),v.value.toString())}),t.succeed(),d.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new h(n)}}var lo=w(require("fs-extra")),pc=w(require("path"));G();ke();function _E(){try{if(!lo.default.existsSync(Pe))return null;let e=lo.default.readdirSync(Pe).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:pc.default.join(Pe,t),time:lo.default.statSync(pc.default.join(Pe,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=lo.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(r){let o=r[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function fc(){let e=_E();e&&console.info(`${Rn} Latest log: ${e}`),console.info(`${Rn} All logs: ${Pe}`)}async function dy(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(fc)}var un=require("commander"),mc=new un.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),hc=new un.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),gc=new un.Option("--skip-update-check","Skip checking for @webflow packages updates"),yc=new un.Option("--verbose","Display more information for debugging purposes."),co=new un.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),ar=new un.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),uo=e=>async(t,n)=>{let o={...n.parent?.opts()||{},...t};await e(o)};var SE="Import a library of Code Components into your Webflow Workspace.",TE="Bundle a library of Code Components for local development.",py=new Wt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),fy=new Wt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),my=new Wt.Option("--dev","Bundle in development mode for debugging purposes."),hy=new Wt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),AE=new Wt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),OE=new Wt.Option("--public-path <path>","Set the public path for the bundle."),PE=new Wt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function bc(e,t){return e.command(t).description(SE).addOption(co).addOption(py).addOption(fy).addOption(my).addOption(hy).action(uo(uc))}function wc(e,t){return e.command(t).description(TE).addOption(AE).addOption(OE).addOption(PE).addOption(py).addOption(fy).addOption(my).addOption(hy).action(uo(dc))}var gy=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");bc(t,"share"),wc(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(fc)};var yy=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(co).addOption(ar).action(_h),bc(t,"import"),wc(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(co).addOption(ar).action(uo(Ai))};var Ee=w(require("fs")),_e=w(require("path"));G();He();var Zi="astro",Dc="cloud-scaffolds";var by="package.json",dn="webflow.json",Ki="wf-placeholder-name",wy="CLOUD_MOUNT_PATH",Dy="gitignore";var vc=async(e,t,n=Zi,r,o,i)=>{try{let s=r[n];if(!s)throw new Error(`Scaffold "${n}" not found`);for(let a of s)try{let l=_e.join(e,a.split(_e.join(Dc,n))[1]?.substring(1)||""),c=a.includes("next.config.ts"),u=a.includes("astro.config.mjs"),p=c||u;if(a.includes(dn)&&Ee.existsSync(l))continue;if(a.includes(by)||a.includes(dn)){let m=(await Ee.promises.readFile(a,"utf8")).replace(Ki,e);await Yi(l,m)}else if(p){let f=await Ee.promises.readFile(a,"utf8");await Yi(l,f.replace(wy,t))}else if(_e.basename(l).toLowerCase()===Dy){let f=await Ee.promises.readFile(a,"utf8"),m=_e.join(_e.dirname(l),".gitignore");await Yi(m,f)}else{let f=await Ee.promises.readFile(a);await Yi(l,f)}}catch(l){d.error(`Error processing file ${a}: ${l}`)}if(o&&i)try{Bo({siteId:o,apiToken:i,directory:e})}catch(a){d.error(`Error creating .env file: ${a}`)}}catch(s){throw d.error(`Error applying scaffold: ${s}`),s}},kc=async()=>{try{let e={},t=_e.join(_e.resolve(__dirname),Dc);if(!Ee.existsSync(t))throw new Error(`Scaffolds directory not found at: ${t}`);let n=await Ee.promises.readdir(t);for(let r of n)try{let o=_e.join(t,r);e[r]=await vy(o)}catch(o){d.error(`Error processing scaffold ${r}: ${o}`)}return e}catch(e){throw d.error(`Error getting available scaffolds: ${e}`),e}},vy=async e=>{let t=[];try{if(!Ee.existsSync(e))throw new Error(`Directory not found: ${e}`);let n=await Ee.promises.readdir(e);for(let r of n)try{let o=_e.join(e,r);(await Ee.promises.stat(o)).isDirectory()?t.push(...await vy(o)):t.push(o)}catch(o){d.error(`Error processing path ${r}: ${o}`)}}catch(n){throw d.error(`Error reading directory ${e}: ${n}`),n}return t},Yi=async(e,t)=>{try{await Ee.promises.mkdir(_e.dirname(e),{recursive:!0}),await Ee.promises.writeFile(e,t)}catch(n){throw d.error(`Error writing file ${e}: ${n}`),n}};He();je();var Vt=w(require("fs")),xc=w(require("path"));G();var Xi={angular:{package_identifier:"@angular/ssr",build_command:"ng build",config_template_path:"templates/angular/angular.json.template",wrangler_template_path:"templates/angular/wrangler.angular.json",assets_path:"dist/browser",deployment_type:"ssr",entrypoint_path:"./server.js"},astro:{package_identifier:"@astrojs/cloudflare",build_command:"astro build",config_template_path:"templates/astro/astro.config.mjs.template",additional_config_files:["templates/astro/webflow-loader.ts"],wrangler_template_path:"templates/astro/wrangler.astro.json",assets_path:"dist",deployment_type:"ssr",assets_exclude_path:"_worker.js",entrypoint_path:"./index.js"},docusaurus:{package_identifier:"@docusaurus/core",build_command:"docusaurus build",config_template_path:"templates/docusaurus/docusaurus.config.js.template",wrangler_template_path:"templates/docusaurus/wrangler.docusaurus.json",assets_path:"build",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},gatsby:{package_identifier:"gatsby",build_command:"gatsby build",wrangler_template_path:"templates/gatsby/wrangler.gatsby.json",assets_path:"public",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},nextjs:{package_identifier:"@opennextjs/cloudflare",build_command:"opennextjs-cloudflare build",config_template_path:"templates/nextjs/next.config.ts.template",additional_config_files:["templates/nextjs/webflow-loader.ts"],wrangler_template_path:"templates/nextjs/wrangler.nextjs.json",assets_path:".open-next/assets",entrypoint_path:"./worker.js",deployment_type:"ssr"},nuxt:{package_identifier:"nuxt",build_command:"nuxt build",config_template_path:"templates/nuxt/nuxt.config.ts.template",wrangler_template_path:"templates/nuxt/wrangler.nuxt.json",assets_path:".output/public",entrypoint_path:"./index.js",deployment_type:"ssr"},qwik:{package_identifier:"@builder.io/qwik",build_command:"qwik build",config_template_path:"templates/qwik/vite.config.ts.template",wrangler_template_path:"templates/qwik/wrangler.qwik.json",assets_path:"dist",deployment_type:"ssr",entrypoint_path:"./_worker.js"},react:{package_identifier:"@vitejs/plugin-react",build_command:"tsc -b && vite build",config_template_path:"templates/react/vite.config.ts.template",wrangler_template_path:"templates/react/wrangler.react.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"},remix:{package_identifier:"@remix-run/cloudflare",build_command:"remix vite:build",config_template_path:"templates/remix/vite.config.ts.template",wrangler_template_path:"templates/remix/wrangler.remix.json",assets_path:"build/client",deployment_type:"ssr",entrypoint_path:"./server.js"},solid:{package_identifier:"@solidjs/start",build_command:"vinxi build",config_template_path:"templates/solid/app.config.ts.template",wrangler_template_path:"templates/solid/wrangler.solid.json",assets_path:".output/public",deployment_type:"ssr",entrypoint_path:"./index.js"},svelte:{package_identifier:"@sveltejs/vite-plugin-svelte",build_command:"vite build",config_template_path:"templates/svelte/vite.config.ts.template",wrangler_template_path:"templates/svelte/wrangler.svelte.json",assets_path:".svelte-kit/cloudflare",deployment_type:"ssr",entrypoint_path:"./_worker.js"},vue:{package_identifier:"@vitejs/plugin-vue",build_command:"vue-tsc --build && vite build",config_template_path:"templates/vue/vite.config.ts.template",wrangler_template_path:"templates/vue/wrangler.vue.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"}},Qi=["nextjs","astro","remix"];async function ky(e=process.cwd()){let t=xc.join(e,"package.json"),n=xc.join(e,"webflow.json");if(!Vt.existsSync(t))throw new Error("No package.json file found");let r=null;if(Vt.existsSync(n))try{let i=JSON.parse(Vt.readFileSync(n,"utf8")).cloud?.framework;if(i){if(!Xi[i]){let s=Object.keys(Xi).join(", ");throw new Error(`Framework '${i}' from webflow.json is not supported. Must be one of: ${s}`)}if(!Qi.includes(i))throw new Error(`Framework '${i}' is not currently supported. Must be one of: ${Qi.join(", ")}`);r=i,d.info(`Using framework type from webflow.json: ${r}`)}else throw new Error("webflow.json exists but doesn't contain valid framework information under the 'cloud' key")}catch(o){throw o instanceof SyntaxError?new Error("webflow.json contains invalid JSON"):o}if(!r)try{let o=JSON.parse(Vt.readFileSync(t,"utf8"));for(let s of Qi){let l=Xi[s].package_identifier;if(o.dependencies?.[l]||o.devDependencies?.[l]){r=s;break}}if(!r)throw new Error(`Framework not detected or not supported. Only ${Qi.join(", ")} are currently supported.`);d.info(`Detected framework: ${r}`),Vt.writeFileSync(n,JSON.stringify({cloud:{framework:r}},null,2))}catch(o){throw o instanceof SyntaxError?new Error("package.json contains invalid JSON"):o}return{framework:r,config:Xi[r]}}var I=w(require("fs")),z=w(require("path")),br=require("child_process"),Gy=w(require("tar"));var pe=w(require("fs")),Ae=w(require("path"));var re={};Vc(re,{BRAND:()=>o_,DIRTY:()=>pn,EMPTY_PATH:()=>jE,INVALID:()=>B,NEVER:()=>z_,OK:()=>ve,ParseStatus:()=>be,Schema:()=>q,ZodAny:()=>Jt,ZodArray:()=>kt,ZodBigInt:()=>mn,ZodBoolean:()=>hn,ZodBranded:()=>fo,ZodCatch:()=>En,ZodDate:()=>gn,ZodDefault:()=>Fn,ZodDiscriminatedUnion:()=>ns,ZodEffects:()=>We,ZodEnum:()=>xn,ZodError:()=>Se,ZodFirstPartyTypeKind:()=>L,ZodFunction:()=>os,ZodIntersection:()=>Dn,ZodIssueCode:()=>D,ZodLazy:()=>vn,ZodLiteral:()=>kn,ZodMap:()=>fr,ZodNaN:()=>hr,ZodNativeEnum:()=>Cn,ZodNever:()=>Qe,ZodNull:()=>bn,ZodNullable:()=>lt,ZodNumber:()=>fn,ZodObject:()=>Te,ZodOptional:()=>Ue,ZodParsedType:()=>S,ZodPipeline:()=>mo,ZodPromise:()=>Ht,ZodReadonly:()=>_n,ZodRecord:()=>rs,ZodSchema:()=>q,ZodSet:()=>mr,ZodString:()=>qt,ZodSymbol:()=>dr,ZodTransformer:()=>We,ZodTuple:()=>at,ZodType:()=>q,ZodUndefined:()=>yn,ZodUnion:()=>wn,ZodUnknown:()=>vt,ZodVoid:()=>pr,addIssueToContext:()=>x,any:()=>f_,array:()=>y_,bigint:()=>l_,boolean:()=>Iy,coerce:()=>U_,custom:()=>Ay,date:()=>c_,datetimeRegex:()=>Sy,defaultErrorMap:()=>wt,discriminatedUnion:()=>v_,effect:()=>I_,enum:()=>A_,function:()=>__,getErrorMap:()=>lr,getParsedType:()=>st,instanceof:()=>s_,intersection:()=>k_,isAborted:()=>es,isAsync:()=>cr,isDirty:()=>ts,isValid:()=>Gt,late:()=>i_,lazy:()=>S_,literal:()=>T_,makeIssue:()=>po,map:()=>F_,nan:()=>a_,nativeEnum:()=>O_,never:()=>h_,null:()=>p_,nullable:()=>$_,number:()=>Py,object:()=>b_,objectUtil:()=>Cc,oboolean:()=>M_,onumber:()=>L_,optional:()=>R_,ostring:()=>N_,pipeline:()=>B_,preprocess:()=>j_,promise:()=>P_,quotelessJson:()=>IE,record:()=>C_,set:()=>E_,setErrorMap:()=>$E,strictObject:()=>w_,string:()=>Oy,symbol:()=>u_,transformer:()=>I_,tuple:()=>x_,undefined:()=>d_,union:()=>D_,unknown:()=>m_,util:()=>H,void:()=>g_});var H;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(H||(H={}));var Cc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Cc||(Cc={}));var S=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),st=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(e)?S.array:e===null?S.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?S.promise:typeof Map<"u"&&e instanceof Map?S.map:typeof Set<"u"&&e instanceof Set?S.set:typeof Date<"u"&&e instanceof Date?S.date:S.object;default:return S.unknown}};var D=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),IE=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Se=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Se.create=e=>new Se(e);var RE=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===S.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,H.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${H.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${H.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${H.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:H.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,H.assertNever(e)}return{message:n}},wt=RE;var xy=wt;function $E(e){xy=e}function lr(){return xy}var po=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},jE=[];function x(e,t){let n=lr(),r=po({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wt?void 0:wt].filter(o=>!!o)});e.common.issues.push(r)}var be=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return B;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return B;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},B=Object.freeze({status:"aborted"}),pn=e=>({status:"dirty",value:e}),ve=e=>({status:"valid",value:e}),es=e=>e.status==="aborted",ts=e=>e.status==="dirty",Gt=e=>e.status==="valid",cr=e=>typeof Promise<"u"&&e instanceof Promise;var P;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(P||(P={}));var ze=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Cy=(e,t)=>{if(Gt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Se(e.common.issues);return this._error=n,this._error}}};function V(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}var q=class{get description(){return this._def.description}_getType(t){return st(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:st(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new be,ctx:{common:t.parent.common,data:t.data,parsedType:st(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(cr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Cy(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return Gt(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Gt(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:st(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(cr(o)?o:Promise.resolve(o));return Cy(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:D.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new We({schema:this,typeName:L.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ue.create(this,this._def)}nullable(){return lt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kt.create(this)}promise(){return Ht.create(this,this._def)}or(t){return wn.create([this,t],this._def)}and(t){return Dn.create(this,t,this._def)}transform(t){return new We({...V(this._def),schema:this,typeName:L.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Fn({...V(this._def),innerType:this,defaultValue:n,typeName:L.ZodDefault})}brand(){return new fo({typeName:L.ZodBranded,type:this,...V(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new En({...V(this._def),innerType:this,catchValue:n,typeName:L.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return mo.create(this,t)}readonly(){return _n.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},BE=/^c[^\s-]{8,}$/i,NE=/^[0-9a-z]+$/,LE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ME=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,UE=/^[a-z0-9_-]{21}$/i,zE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,WE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,VE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,GE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Fc,qE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,JE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,HE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ZE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,KE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,YE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ey="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",XE=new RegExp(`^${Ey}$`);function _y(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function QE(e){return new RegExp(`^${_y(e)}$`)}function Sy(e){let t=`${Ey}T${_y(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function e_(e,t){return!!((t==="v4"||!t)&&qE.test(e)||(t==="v6"||!t)&&HE.test(e))}function t_(e,t){if(!zE.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function n_(e,t){return!!((t==="v4"||!t)&&JE.test(e)||(t==="v6"||!t)&&ZE.test(e))}var qt=class e extends q{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.string,received:i.parsedType}),B}let r=new be,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?x(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&x(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")VE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"email",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Fc||(Fc=new RegExp(GE,"u")),Fc.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"emoji",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ME.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"uuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")UE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"nanoid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")BE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")NE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cuid2",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")LE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"ulid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),x(o,{validation:"url",code:D.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"regex",code:D.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Sy(i).test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?XE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?QE(i).test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{code:D.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?WE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"duration",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?e_(t.data,i.version)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"ip",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?t_(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"jwt",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?n_(t.data,i.version)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"cidr",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?KE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"base64",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?YE.test(t.data)||(o=this._getOrReturnCtx(t,o),x(o,{validation:"base64url",code:D.invalid_string,message:i.message}),r.dirty()):H.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:D.invalid_string,...P.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...P.errToObj(t)})}url(t){return this._addCheck({kind:"url",...P.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...P.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...P.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...P.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...P.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...P.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...P.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...P.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...P.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...P.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...P.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...P.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...P.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...P.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...P.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...P.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...P.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...P.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...P.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...P.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...P.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...P.errToObj(n)})}nonempty(t){return this.min(1,P.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};qt.create=e=>new qt({checks:[],typeName:L.ZodString,coerce:e?.coerce??!1,...V(e)});function r_(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var fn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==S.number){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.number,received:i.parsedType}),B}let r,o=new be;for(let i of this._def.checks)i.kind==="int"?H.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),x(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?r_(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_finite,message:i.message}),o.dirty()):H.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,P.toString(n))}gt(t,n){return this.setLimit("min",t,!1,P.toString(n))}lte(t,n){return this.setLimit("max",t,!0,P.toString(n))}lt(t,n){return this.setLimit("max",t,!1,P.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:P.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:P.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:P.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:P.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};fn.create=e=>new fn({checks:[],typeName:L.ZodNumber,coerce:e?.coerce||!1,...V(e)});var mn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==S.bigint)return this._getInvalidInput(t);let r,o=new be;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),x(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):H.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return x(n,{code:D.invalid_type,expected:S.bigint,received:n.parsedType}),B}gte(t,n){return this.setLimit("min",t,!0,P.toString(n))}gt(t,n){return this.setLimit("min",t,!1,P.toString(n))}lte(t,n){return this.setLimit("max",t,!0,P.toString(n))}lt(t,n){return this.setLimit("max",t,!1,P.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:P.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:P.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};mn.create=e=>new mn({checks:[],typeName:L.ZodBigInt,coerce:e?.coerce??!1,...V(e)});var hn=class extends q{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==S.boolean){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.boolean,received:r.parsedType}),B}return ve(t.data)}};hn.create=e=>new hn({typeName:L.ZodBoolean,coerce:e?.coerce||!1,...V(e)});var gn=class e extends q{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==S.date){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_type,expected:S.date,received:i.parsedType}),B}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return x(i,{code:D.invalid_date}),B}let r=new be,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),x(o,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):H.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:P.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:P.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};gn.create=e=>new gn({checks:[],coerce:e?.coerce||!1,typeName:L.ZodDate,...V(e)});var dr=class extends q{_parse(t){if(this._getType(t)!==S.symbol){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.symbol,received:r.parsedType}),B}return ve(t.data)}};dr.create=e=>new dr({typeName:L.ZodSymbol,...V(e)});var yn=class extends q{_parse(t){if(this._getType(t)!==S.undefined){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.undefined,received:r.parsedType}),B}return ve(t.data)}};yn.create=e=>new yn({typeName:L.ZodUndefined,...V(e)});var bn=class extends q{_parse(t){if(this._getType(t)!==S.null){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.null,received:r.parsedType}),B}return ve(t.data)}};bn.create=e=>new bn({typeName:L.ZodNull,...V(e)});var Jt=class extends q{constructor(){super(...arguments),this._any=!0}_parse(t){return ve(t.data)}};Jt.create=e=>new Jt({typeName:L.ZodAny,...V(e)});var vt=class extends q{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ve(t.data)}};vt.create=e=>new vt({typeName:L.ZodUnknown,...V(e)});var Qe=class extends q{_parse(t){let n=this._getOrReturnCtx(t);return x(n,{code:D.invalid_type,expected:S.never,received:n.parsedType}),B}};Qe.create=e=>new Qe({typeName:L.ZodNever,...V(e)});var pr=class extends q{_parse(t){if(this._getType(t)!==S.undefined){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.void,received:r.parsedType}),B}return ve(t.data)}};pr.create=e=>new pr({typeName:L.ZodVoid,...V(e)});var kt=class e extends q{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==S.array)return x(n,{code:D.invalid_type,expected:S.array,received:n.parsedType}),B;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(x(n,{code:s?D.too_big:D.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(x(n,{code:D.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(x(n,{code:D.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new ze(n,s,n.path,a)))).then(s=>be.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new ze(n,s,n.path,a)));return be.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:P.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:P.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:P.toString(n)}})}nonempty(t){return this.min(1,t)}};kt.create=(e,t)=>new kt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:L.ZodArray,...V(t)});function ur(e){if(e instanceof Te){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Ue.create(ur(r))}return new Te({...e._def,shape:()=>t})}else return e instanceof kt?new kt({...e._def,type:ur(e.element)}):e instanceof Ue?Ue.create(ur(e.unwrap())):e instanceof lt?lt.create(ur(e.unwrap())):e instanceof at?at.create(e.items.map(t=>ur(t))):e}var Te=class e extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=H.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==S.object){let c=this._getOrReturnCtx(t);return x(c,{code:D.invalid_type,expected:S.object,received:c.parsedType}),B}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Qe&&this._def.unknownKeys==="strip"))for(let c in o.data)s.includes(c)||a.push(c);let l=[];for(let c of s){let u=i[c],p=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ze(o,p,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Qe){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(x(o,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let p=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ze(o,p,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let p=await u.key,f=await u.value;c.push({key:p,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>be.mergeObjectSync(r,c)):be.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return P.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:P.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:L.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let r of H.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let r of H.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}deepPartial(){return ur(this)}partial(t){let n={};for(let r of H.objectKeys(this.shape)){let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let r of H.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ue;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return Ty(H.objectKeys(this.shape))}};Te.create=(e,t)=>new Te({shape:()=>e,unknownKeys:"strip",catchall:Qe.create(),typeName:L.ZodObject,...V(t)});Te.strictCreate=(e,t)=>new Te({shape:()=>e,unknownKeys:"strict",catchall:Qe.create(),typeName:L.ZodObject,...V(t)});Te.lazycreate=(e,t)=>new Te({shape:e,unknownKeys:"strip",catchall:Qe.create(),typeName:L.ZodObject,...V(t)});var wn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Se(a.ctx.common.issues));return x(n,{code:D.invalid_union,unionErrors:s}),B}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(l=>new Se(l));return x(n,{code:D.invalid_union,unionErrors:a}),B}}get options(){return this._def.options}};wn.create=(e,t)=>new wn({options:e,typeName:L.ZodUnion,...V(t)});var Dt=e=>e instanceof vn?Dt(e.schema):e instanceof We?Dt(e.innerType()):e instanceof kn?[e.value]:e instanceof xn?e.options:e instanceof Cn?H.objectValues(e.enum):e instanceof Fn?Dt(e._def.innerType):e instanceof yn?[void 0]:e instanceof bn?[null]:e instanceof Ue?[void 0,...Dt(e.unwrap())]:e instanceof lt?[null,...Dt(e.unwrap())]:e instanceof fo||e instanceof _n?Dt(e.unwrap()):e instanceof En?Dt(e._def.innerType):[],ns=class e extends q{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.object)return x(n,{code:D.invalid_type,expected:S.object,received:n.parsedType}),B;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(x(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=Dt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:L.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...V(r)})}};function Ec(e,t){let n=st(e),r=st(t);if(e===t)return{valid:!0,data:e};if(n===S.object&&r===S.object){let o=H.objectKeys(t),i=H.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let l=Ec(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===S.array&&r===S.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],l=Ec(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===S.date&&r===S.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Dn=class extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(es(i)||es(s))return B;let a=Ec(i.value,s.value);return a.valid?((ts(i)||ts(s))&&n.dirty(),{status:n.value,value:a.data}):(x(r,{code:D.invalid_intersection_types}),B)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Dn.create=(e,t,n)=>new Dn({left:e,right:t,typeName:L.ZodIntersection,...V(n)});var at=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.array)return x(r,{code:D.invalid_type,expected:S.array,received:r.parsedType}),B;if(r.data.length<this._def.items.length)return x(r,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),B;!this._def.rest&&r.data.length>this._def.items.length&&(x(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new ze(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>be.mergeArray(n,s)):be.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};at.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new at({items:e,typeName:L.ZodTuple,rest:null,...V(t)})};var rs=class e extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.object)return x(r,{code:D.invalid_type,expected:S.object,received:r.parsedType}),B;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new ze(r,a,r.path,a)),value:s._parse(new ze(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?be.mergeObjectAsync(n,o):be.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof q?new e({keyType:t,valueType:n,typeName:L.ZodRecord,...V(r)}):new e({keyType:qt.create(),valueType:t,typeName:L.ZodRecord,...V(n)})}},fr=class extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.map)return x(r,{code:D.invalid_type,expected:S.map,received:r.parsedType}),B;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new ze(r,a,r.path,[c,"key"])),value:i._parse(new ze(r,l,r.path,[c,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};fr.create=(e,t,n)=>new fr({valueType:t,keyType:e,typeName:L.ZodMap,...V(n)});var mr=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==S.set)return x(r,{code:D.invalid_type,expected:S.set,received:r.parsedType}),B;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(x(r,{code:D.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(x(r,{code:D.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let u of l){if(u.status==="aborted")return B;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}let a=[...r.data.values()].map((l,c)=>i._parse(new ze(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:P.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:P.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};mr.create=(e,t)=>new mr({valueType:e,minSize:null,maxSize:null,typeName:L.ZodSet,...V(t)});var os=class e extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.function)return x(n,{code:D.invalid_type,expected:S.function,received:n.parsedType}),B;function r(a,l){return po({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,lr(),wt].filter(c=>!!c),issueData:{code:D.invalid_arguments,argumentsError:l}})}function o(a,l){return po({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,lr(),wt].filter(c=>!!c),issueData:{code:D.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Ht){let a=this;return ve(async function(...l){let c=new Se([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),p=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(o(p,m)),c})})}else{let a=this;return ve(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new Se([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),p=a._def.returns.safeParse(u,i);if(!p.success)throw new Se([o(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:at.create(t).rest(vt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||at.create([]).rest(vt.create()),returns:n||vt.create(),typeName:L.ZodFunction,...V(r)})}},vn=class extends q{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};vn.create=(e,t)=>new vn({getter:e,typeName:L.ZodLazy,...V(t)});var kn=class extends q{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return x(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:t.data}}get value(){return this._def.value}};kn.create=(e,t)=>new kn({value:e,typeName:L.ZodLiteral,...V(t)});function Ty(e,t){return new xn({values:e,typeName:L.ZodEnum,...V(t)})}var xn=class e extends q{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return x(n,{expected:H.joinValues(r),received:n.parsedType,code:D.invalid_type}),B}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return x(n,{received:n.data,code:D.invalid_enum_value,options:r}),B}return ve(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};xn.create=Ty;var Cn=class extends q{_parse(t){let n=H.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==S.string&&r.parsedType!==S.number){let o=H.objectValues(n);return x(r,{expected:H.joinValues(o),received:r.parsedType,code:D.invalid_type}),B}if(this._cache||(this._cache=new Set(H.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=H.objectValues(n);return x(r,{received:r.data,code:D.invalid_enum_value,options:o}),B}return ve(t.data)}get enum(){return this._def.values}};Cn.create=(e,t)=>new Cn({values:e,typeName:L.ZodNativeEnum,...V(t)});var Ht=class extends q{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==S.promise&&n.common.async===!1)return x(n,{code:D.invalid_type,expected:S.promise,received:n.parsedType}),B;let r=n.parsedType===S.promise?n.data:Promise.resolve(n.data);return ve(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Ht.create=(e,t)=>new Ht({type:e,typeName:L.ZodPromise,...V(t)});var We=class extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===L.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{x(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return B;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?B:l.status==="dirty"?pn(l.value):n.value==="dirty"?pn(l.value):l});{if(n.value==="aborted")return B;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?B:a.status==="dirty"?pn(a.value):n.value==="dirty"?pn(a.value):a}}if(o.type==="refinement"){let s=a=>{let l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gt(s))return B;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Gt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):B);H.assertNever(o)}};We.create=(e,t,n)=>new We({schema:e,typeName:L.ZodEffects,effect:t,...V(n)});We.createWithPreprocess=(e,t,n)=>new We({schema:t,effect:{type:"preprocess",transform:e},typeName:L.ZodEffects,...V(n)});var Ue=class extends q{_parse(t){return this._getType(t)===S.undefined?ve(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ue.create=(e,t)=>new Ue({innerType:e,typeName:L.ZodOptional,...V(t)});var lt=class extends q{_parse(t){return this._getType(t)===S.null?ve(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lt.create=(e,t)=>new lt({innerType:e,typeName:L.ZodNullable,...V(t)});var Fn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Fn.create=(e,t)=>new Fn({innerType:e,typeName:L.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...V(t)});var En=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return cr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Se(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Se(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};En.create=(e,t)=>new En({innerType:e,typeName:L.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...V(t)});var hr=class extends q{_parse(t){if(this._getType(t)!==S.nan){let r=this._getOrReturnCtx(t);return x(r,{code:D.invalid_type,expected:S.nan,received:r.parsedType}),B}return{status:"valid",value:t.data}}};hr.create=e=>new hr({typeName:L.ZodNaN,...V(e)});var o_=Symbol("zod_brand"),fo=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},mo=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?B:i.status==="dirty"?(n.dirty(),pn(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?B:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:L.ZodPipeline})}},_n=class extends q{_parse(t){let n=this._def.innerType._parse(t),r=o=>(Gt(o)&&(o.value=Object.freeze(o.value)),o);return cr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};_n.create=(e,t)=>new _n({innerType:e,typeName:L.ZodReadonly,...V(t)});function Fy(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Ay(e,t={},n){return e?Jt.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Fy(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Fy(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Jt.create()}var i_={object:Te.lazycreate},L;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(L||(L={}));var s_=(e,t={message:`Input not instance of ${e.name}`})=>Ay(n=>n instanceof e,t),Oy=qt.create,Py=fn.create,a_=hr.create,l_=mn.create,Iy=hn.create,c_=gn.create,u_=dr.create,d_=yn.create,p_=bn.create,f_=Jt.create,m_=vt.create,h_=Qe.create,g_=pr.create,y_=kt.create,b_=Te.create,w_=Te.strictCreate,D_=wn.create,v_=ns.create,k_=Dn.create,x_=at.create,C_=rs.create,F_=fr.create,E_=mr.create,__=os.create,S_=vn.create,T_=kn.create,A_=xn.create,O_=Cn.create,P_=Ht.create,I_=We.create,R_=Ue.create,$_=lt.create,j_=We.createWithPreprocess,B_=mo.create,N_=()=>Oy().optional(),L_=()=>Py().optional(),M_=()=>Iy().optional(),U_={string:e=>qt.create({...e,coerce:!0}),number:e=>fn.create({...e,coerce:!0}),boolean:e=>hn.create({...e,coerce:!0}),bigint:e=>mn.create({...e,coerce:!0}),date:e=>gn.create({...e,coerce:!0})};var z_=B;function is(e,t=!1){let n=e.length,r=0,o="",i=0,s=16,a=0,l=0,c=0,u=0,p=0;function f(C,O){let Z=0,N=0;for(;Z<C||!O;){let A=e.charCodeAt(r);if(A>=48&&A<=57)N=N*16+A-48;else if(A>=65&&A<=70)N=N*16+A-65+10;else if(A>=97&&A<=102)N=N*16+A-97+10;else break;r++,Z++}return Z<C&&(N=-1),N}function m(C){r=C,o="",i=0,s=16,p=0}function y(){let C=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&gr(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&gr(e.charCodeAt(r)))for(r++;r<e.length&&gr(e.charCodeAt(r));)r++;else return p=3,e.substring(C,r);let O=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&gr(e.charCodeAt(r))){for(r++;r<e.length&&gr(e.charCodeAt(r));)r++;O=r}else p=3;return e.substring(C,O)}function v(){let C="",O=r;for(;;){if(r>=n){C+=e.substring(O,r),p=2;break}let Z=e.charCodeAt(r);if(Z===34){C+=e.substring(O,r),r++;break}if(Z===92){if(C+=e.substring(O,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=`
|
|
124
|
+
`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:let A=f(4,!0);A>=0?C+=String.fromCharCode(A):p=4;break;default:p=5}O=r;continue}if(Z>=0&&Z<=31)if(ho(Z)){C+=e.substring(O,r),p=2;break}else p=6;r++}return C}function E(){if(o="",p=0,i=r,l=a,u=c,r>=n)return i=n,s=17;let C=e.charCodeAt(r);if(_c(C)){do r++,o+=String.fromCharCode(C),C=e.charCodeAt(r);while(_c(C));return s=15}if(ho(C))return r++,o+=String.fromCharCode(C),C===13&&e.charCodeAt(r)===10&&(r++,o+=`
|
|
125
|
+
`),a++,c=r,s=14;switch(C){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=v(),s=10;case 47:let O=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!ho(e.charCodeAt(r));)r++;return o=e.substring(O,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let Z=n-1,N=!1;for(;r<Z;){let A=e.charCodeAt(r);if(A===42&&e.charCodeAt(r+1)===47){r+=2,N=!0;break}r++,ho(A)&&(A===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return N||(r++,p=1),o=e.substring(O,r),s=13}return o+=String.fromCharCode(C),r++,s=16;case 45:if(o+=String.fromCharCode(C),r++,r===n||!gr(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=y(),s=11;default:for(;r<n&&_(C);)r++,C=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(C),r++,s=16}}function _(C){if(_c(C)||ho(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function M(){let C;do C=E();while(C>=12&&C<=15);return C}return{setPosition:m,getPosition:()=>r,scan:t?M:E,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-u,getTokenError:()=>p}}function _c(e){return e===32||e===9}function ho(e){return e===10||e===13}function gr(e){return e>=48&&e<=57}var Ry;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Ry||(Ry={}));var V_=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),yr=200,G_={" ":{"\n":new Array(yr).fill(0).map((e,t)=>`
|
|
126
|
+
`+" ".repeat(t)),"\r":new Array(yr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(yr).fill(0).map((e,t)=>`\r
|
|
127
|
+
`+" ".repeat(t))}," ":{"\n":new Array(yr).fill(0).map((e,t)=>`
|
|
128
|
+
`+" ".repeat(t)),"\r":new Array(yr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(yr).fill(0).map((e,t)=>`\r
|
|
129
|
+
`+" ".repeat(t))}};var ss;(function(e){e.DEFAULT={allowTrailingComma:!1}})(ss||(ss={}));function $y(e,t=[],n=ss.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return jy(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function jy(e,t,n=ss.DEFAULT){let r=is(e,!1),o=[],i=0;function s(W){return W?()=>i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(W){return W?ae=>i===0&&W(ae,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(W){return W?ae=>i===0&&W(ae,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(W){return W?()=>{i>0?i++:W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(W){return W?()=>{i>0&&i--,i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let p=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),y=c(t.onArrayBegin),v=u(t.onArrayEnd),E=l(t.onLiteralValue),_=a(t.onSeparator),M=s(t.onComment),C=a(t.onError),O=n&&n.disallowComments,Z=n&&n.allowTrailingComma;function N(){for(;;){let W=r.scan();switch(r.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:O||A(11);break;case 2:A(12);break;case 6:A(16);break}switch(W){case 12:case 13:O?A(10):M();break;case 16:A(1);break;case 15:case 14:break;default:return W}}}function A(W,ae=[],Ct=[]){if(C(W),ae.length+Ct.length>0){let yo=r.getToken();for(;yo!==17;){if(ae.indexOf(yo)!==-1){N();break}else if(Ct.indexOf(yo)!==-1)break;yo=N()}}}function g(W){let ae=r.getTokenValue();return W?E(ae):(f(ae),o.push(ae)),N(),!0}function b(){switch(r.getToken()){case 11:let W=r.getTokenValue(),ae=Number(W);isNaN(ae)&&(A(2),ae=0),E(ae);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return N(),!0}function j(){return r.getToken()!==10?(A(3,[],[2,5]),!1):(g(!1),r.getToken()===6?(_(":"),N(),Ve()||A(4,[],[2,5])):A(5,[],[2,5]),o.pop(),!0)}function F(){p(),N();let W=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(W||A(4,[],[]),_(","),N(),r.getToken()===2&&Z)break}else W&&A(6,[],[]);j()||A(4,[],[2,5]),W=!0}return m(),r.getToken()!==2?A(7,[2],[]):N(),!0}function he(){y(),N();let W=!0,ae=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ae||A(4,[],[]),_(","),N(),r.getToken()===4&&Z)break}else ae&&A(6,[],[]);W?(o.push(0),W=!1):o[o.length-1]++,Ve()||A(4,[],[4,5]),ae=!0}return v(),W||o.pop(),r.getToken()!==4?A(8,[4],[]):N(),!0}function Ve(){switch(r.getToken()){case 3:return he();case 1:return F();case 10:return g(!0);default:return b()}}return N(),r.getToken()===17?n.allowEmptyContent?!0:(A(4,[],[]),!1):Ve()?(r.getToken()!==17&&A(9,[],[]),!0):(A(4,[],[]),!1)}var By;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(By||(By={}));var Ny;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Ny||(Ny={}));var Sc=$y;var Ly;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Ly||(Ly={}));G();var My=re.object({name:re.string(),main:re.string(),compatibility_date:re.string(),compatibility_flags:re.array(re.string()).optional(),placement:re.object({mode:re.string()}).passthrough().optional(),assets:re.object({directory:re.string(),binding:re.string().optional()}).passthrough().optional(),d1_databases:re.array(re.object({database_name:re.string(),database_id:re.string(),binding:re.string(),migrations_dir:re.string().optional()}).passthrough()).default([]),kv_namespaces:re.array(re.object({binding:re.string(),id:re.string()}).passthrough()).default([]),r2_buckets:re.array(re.object({binding:re.string(),bucket_name:re.string()}).passthrough()).default([])}).passthrough();function Uy(e,t="wrangler.json"){let n=Ae.join(e,t);if(!pe.existsSync(n)){if(t.endsWith(".json"))return d.warn(`/${t} not found, checking for /${t}c`),Uy(e,t+"c");d.warn(`/${t} not found`);return}let r=pe.readFileSync(n,"utf8");d.info(`reading /${t}...`);let o;try{o=Sc(r)}catch(i){d.error(`/${t} loaded but could not parse as JSONC: ${i}`);return}try{let i=My.parse(o);return d.info(`successfully loaded /${t}`),i}catch(i){d.error(`/${t} valid JSONC but schema validation failed: ${i}`);return}}function zy(e,t,n={}){if(!pe.existsSync(e))return 0;pe.mkdirSync(t,{recursive:!0});let r=pe.readdirSync(e,{withFileTypes:!0}),o=0;for(let i of r){if(n.exclude&&i.name===n.exclude)continue;let s=Ae.join(e,i.name),a=Ae.join(t,i.name);i.isDirectory()?o+=zy(s,a,n):(pe.copyFileSync(s,a),o++)}return o}async function Wy(e,t){let n=null,r=null,o=Ae.join(t,"wrangler.json"),i=Ae.join(t,"wrangler.jsonc");pe.existsSync(o)?(n=o,r=".json"):pe.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(d.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),pe.copyFileSync(n,Ae.join(t,`clouduser.wrangler${r}`)));let s=n?Uy(t,Ae.basename(n)):null,a=Ae.join(__dirname,e.config.wrangler_template_path),l=Ae.join(t,"wrangler.json");if(!pe.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(d.info(`copying template /templates/${e.framework}/wrangler.${e.framework}.json to /wrangler.json`),pe.copyFileSync(a,l),!s)return;let c=JSON.parse(pe.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,d.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,d.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,d.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),pe.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let p=s.d1_databases[u];if(!p.migrations_dir){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=p.migrations_dir,m=Ae.join(t,f);if(!pe.existsSync(m)){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let y=Ae.join(t,"clouduser","migrations",f),v=zy(m,y);v>0?d.info(`copied ${v} migrations to /clouduser/migrations/${f}`):d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function Q_(e){if(!/^[a-z0-9-]+$/.test(e))throw new Error(`Invalid object storage bucket name ${JSON.stringify(e)}: Only lowercase letters, numbers, and hyphens are allowed.`);if(e.startsWith("-")||e.endsWith("-"))throw new Error(`Invalid object storage bucket name "${e}": Cannot begin or end with a hyphen.`);if(e.length>27)throw new Error(`Invalid object storage bucket name "${e}": Must be 27 characters or fewer (currently ${e.length} characters).`)}function Vy(e){let t=null;for(let i of[".json",".jsonc"]){let s=Ae.join(e,`clouduser.wrangler${i}`);if(pe.existsSync(s)){t=s;break}}if(!t)return;let n=pe.readFileSync(t,"utf8"),r;try{r=Sc(n)}catch(i){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${i}`)}let o=My.parse(r);if(o.d1_databases&&o.d1_databases.length>0&&o.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${o.d1_databases.length}. Maximum allowed is 5.`);if(o.kv_namespaces&&o.kv_namespaces.length>0&&o.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${o.kv_namespaces.length}. Maximum allowed is 5.`);if(o.r2_buckets&&o.r2_buckets.length>0){if(o.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${o.r2_buckets.length}. Maximum allowed is 5.`);d.info(`validating ${o.r2_buckets.length} object storage bucket name(s)...`);for(let i of o.r2_buckets)Q_(i.bucket_name)}}G();Fe();oe();ke();async function qy(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=z.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||z.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=Ac(n),c=t.telemetry;await c?.sendUsage("cloud_build_start",{framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),I.mkdirSync(o,{recursive:!0});try{d.info(k.green(`--- \u{1F4E6} Installing dependencies ------------------------------------
|
|
130
|
+
`)),await eS(n,e.framework,t.telemetry),d.info(k.green(`--- \u{1F527} Setting up framework configuration ----------------------
|
|
131
|
+
`)),await tS(n,e,s,t.deployUrl,t.environmentId),d.info(k.green(`--- \u{1F527} Setting up wrangler configuration -----------------------
|
|
132
|
+
`)),await Wy(e,n),Vy(n),d.info(k.green(`--- \u{1F3D7}\uFE0F Building app -----------------------------------------------
|
|
133
|
+
`)),d.info(`running ${e.config.build_command}...`),await nS(n,e.config.build_command,t.telemetry),d.info(k.green(`--- \u{1F9EA} Creating wrangler dry-run ----------------------------------
|
|
134
|
+
`)),await rS(n,i),d.info(k.green(`--- \u{1F4C1} Copying assets ------------------------------------------
|
|
135
|
+
`)),await oS(n,i,e,s),d.info(k.green(`--- \u{1F4E6} Creating tarball -----------------------------------------
|
|
136
|
+
`));let u=await iS(i),p=Date.now()-a;return d.info(`${Y} Build completed in ${(p/1e3).toFixed(1)}s`),await c?.sendUsage("cloud_build_success",{duration:p,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}catch(u){let p=Date.now()-a;throw await c?.sendError(u instanceof Error?u:new Error(String(u)),"cloud_build_failure",{duration:p,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}}function Ac(e){let t=z.join(e,"wrangler.json");if(!I.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let n=JSON.parse(I.readFileSync(t,"utf8")),r=n.kv_namespaces||[],o=n.d1_databases||[],i=n.r2_buckets||[],s=n.vars||{};return{hasKV:r.length>0,hasD1:o.length>0,hasR2:i.length>0,hasVars:Object.keys(s).length>0,kvCount:r.length,d1Count:o.length,r2Count:i.length,varCount:Object.keys(s).length}}catch(n){return console.debug("Failed to parse wrangler.json for bindings detection:",n),{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0}}}function Jy(e){try{let t=z.dirname(e);t.includes(".tmp/webflow-build-")&&(d.info(k.green(`--- \u{1F9F9} Cleaning up build artifacts... -----------------
|
|
137
|
+
`)),I.rmSync(t,{recursive:!0,force:!0}))}catch(t){d.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function Hy(e,t){try{if(!t.config.config_template_path)return;let n=z.join(__dirname,t.config.config_template_path),r=z.basename(n,".template"),o=r.slice(0,r.lastIndexOf("."));d.info(k.grey(`--- \u{1F9F9} Reverting framework configuration changes ---------------
|
|
138
|
+
`));for(let s of["mjs","cjs","js","ts"]){let a=z.join(e,`clouduser.${o}.${s}`),l=z.join(e,`${o}.${s}`);if(I.existsSync(a)){d.info(`restoring /${o}.${s} from /clouduser.${o}.${s}...`),I.existsSync(l)&&I.unlinkSync(l),I.renameSync(a,l);break}}for(let s of[".jsonc",".json"]){let a=z.join(e,`clouduser.wrangler${s}`);if(I.existsSync(a)){d.info(`restoring user wrangler${s} from backup...`);let l=z.join(e,"wrangler.json");I.existsSync(l)&&I.unlinkSync(l);let c=z.join(e,`wrangler${s}`);I.renameSync(a,c);break}}let i=z.join(e,"clouduser");I.existsSync(i)&&(d.info("cleaning up clouduser directory..."),I.rmSync(i,{recursive:!0,force:!0}));for(let s of t.config.additional_config_files||[]){let a=z.join(e,z.basename(s));I.existsSync(a)&&(d.info(`cleaning up additional config file ${a}...`),I.unlinkSync(a))}}catch(n){d.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function eS(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"];try{if(t==="astro"){let a=z.join(e,"package.json"),l=JSON.parse(I.readFileSync(a,"utf8"));l.dependencies?.["@astrojs/react"]||l.devDependencies?.["@astrojs/react"]||(d.info("Warning: cosmic astro integration requires @astrojs/react and this project doesn't require it. Installing now..."),(0,br.execSync)("npm install --save @astrojs/react",{cwd:e,stdio:"inherit"}))}let i=z.join(e,"package-lock.json");I.existsSync(i)?(d.info("Running npm ci..."),(0,br.execSync)(`npm ci ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(d.info("Warning: No package-lock.json found, installing dependencies with npm install"),(0,br.execSync)(`npm install ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:I.existsSync(z.join(e,"package-lock.json"))})}catch(i){let s=Date.now()-r;throw await n?.sendError(i instanceof Error?i:new Error(String(i)),"cloud_install_dependencies_failure",{duration:s,framework:t,hasPackageLock:I.existsSync(z.join(e,"package-lock.json"))}),i}}async function tS(e,t,n,r,o){if(d.info(`Framework: ${t.framework}`),d.info(`Mount path: ${n}`),d.info(`Deployment type: ${t.config.deployment_type}`),!t.config.config_template_path)return;let i=z.join(__dirname,t.config.config_template_path),s=z.basename(i,".template"),a=s.slice(0,s.lastIndexOf("."));for(let p of["mjs","cjs","js","ts"]){let f=z.join(e,`${a}.${p}`);if(I.existsSync(f)){let m=z.join(e,`clouduser.${a}.${p}`);d.info(`renaming user base config /${a}.${p} to /clouduser.${a}.${p}...`),I.renameSync(f,m);break}}let l=z.join(e,s);d.info(`rendering override config from /templates/${t.framework}/${s}.template to /${s}`);let u=I.readFileSync(i,"utf8").replace(/\$\{([^}]+)\}/g,(p,f)=>({COSMIC_MOUNT_PATH:n,COSMIC_DEPLOY_URL:r||(o?`https://${o}.wf-app-prod.cosmic.webflow.services`:"")})[f]||p);I.writeFileSync(l,u);for(let p of t.config.additional_config_files||[]){let f=z.join(__dirname,p);I.statSync(f,{throwIfNoEntry:!1})?(d.info(`copying additional config file /${p} to ${z.join(e,z.basename(p))}`),I.copyFileSync(f,z.join(e,z.basename(p)))):d.warn(`additional config file /${p} does not exist; skipping`)}}async function nS(e,t,n){let r=Date.now();try{let o=t.split(" "),i=o[0],s=o.slice(1);(0,br.execSync)(`npx ${i} ${s.join(" ")}`,{cwd:e,stdio:"inherit"});let a=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:a,buildCommand:t})}catch(o){let i=Date.now()-r;throw await n?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function rS(e,t){I.mkdirSync(t,{recursive:!0});let n=z.join(e,"wrangler.json"),r=z.join(e,"wrangler.jsonc");if(!I.existsSync(n)&&!I.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,br.execSync)(`npx wrangler deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function oS(e,t,n,r){let o=n.config.assets_path,i=n.config.assets_exclude_path,s=r.replace(/\/+$/,"").replace(/^\/+/,"");if(n.framework==="nextjs"||n.framework==="astro"){let p=z.join(e,o);if(I.existsSync(p)&&I.statSync(p).isDirectory()){let m=I.readdirSync(p,{withFileTypes:!0}).find(y=>!(!y.isDirectory()||i&&y.name===i||n.framework==="astro"&&(y.name==="_routes.json"||y.name==="_worker.js")));m&&(o=`${o}/${m.name}`)}}let a=z.join(t,"assets",s||"");I.mkdirSync(a,{recursive:!0});let l=z.join(e,o);if(I.existsSync(l)&&I.statSync(l).isDirectory()){d.info(`copying assets from /${o} to output/assets...`);try{i?(d.info(`excluding ${i}`),Zy(l,a,i)):Tc(l,a)}catch(p){d.error(p,{prefix:"Failed to copy assets:"})}}else d.info("No assets to copy or assets directory not found");let c=z.join(e,"webflow.json");I.existsSync(c)&&I.copyFileSync(c,z.join(t,"webflow.json"));let u=null;for(let p of[".json",".jsonc"]){let f=z.join(e,`clouduser.wrangler${p}`);if(I.existsSync(f)){u=f;break}}if(u){d.info("including user wrangler config in output..."),I.copyFileSync(u,z.join(t,"clouduser.wrangler.json"));let p=z.join(e,"clouduser","migrations");if(I.existsSync(p)){d.info("copying migrations from clouduser/migrations to output/migrations...");let f=z.join(t,"migrations");Tc(p,f)}}}async function iS(e){let t=`${e}.tar.gz`;try{return await Gy.create({gzip:!0,file:t,cwd:z.dirname(e)},[z.basename(e)]),d.info(`Tarball created: ${t}`),t}catch(n){throw new h(n,{prefix:"Failed to create tarball:"})}}function Tc(e,t){I.mkdirSync(t,{recursive:!0});let n=I.readdirSync(e,{withFileTypes:!0});for(let r of n){let o=z.join(e,r.name),i=z.join(t,r.name);r.isDirectory()?Tc(o,i):I.copyFileSync(o,i)}}function Zy(e,t,n){I.mkdirSync(t,{recursive:!0});let r=I.readdirSync(e,{withFileTypes:!0});for(let o of r){if(o.name===n)continue;let i=z.join(e,o.name),s=z.join(t,o.name);o.isDirectory()?Zy(i,s,n):I.copyFileSync(i,s)}}we();de();G();var sS="DUPLICATE_ENVIRONMENT_MOUNT",aS="ENVIRONMENT_MOUNT_MISMATCH",lS="DUPLICATE_ENVIRONMENT_BRANCH",cS="INVALID_MOUNT_PATH_FORMAT",uS="INVALID_PROJECT_ID",Ky={[sS]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[aS]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[lS]:"An environment with this branch already exists for this project.",[cS]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[uS]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function Yy(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let r=e;t.code=typeof r.code=="string"?r.code:void 0,t.msg=typeof r.msg=="string"?r.msg:void 0,t.status=typeof r.status=="number"?r.status:void 0}let n=t.msg||"";d.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`);for(let r in Ky)if(n.includes(r))return Ky[r];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var wr=w(require("fs")),Oc=require("child_process");G();oe();ke();var Xy=104857600;function Qy(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function dS(){try{let e=(0,Oc.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,Oc.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function Pc(e,t,n){let r=await fetch(`${R}${t}`,{method:n.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n.body?JSON.stringify(n.body):void 0});if(!r.ok){let o=await r.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=Yy(i);throw new Error(s)}return r.json()}async function eb(e,t,n,r){let{manifest:o}=X(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new h("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await pS(e,{siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:dS()});return!s&&l.project_id&&(d.info("\u{1F4DD} Updating webflow.json with project ID..."),fe({cloud:{...i,project_id:l.project_id}})),l}async function pS(e,t){let{siteId:n,framework:r,mountPath:o,environment:i,version:s,projectId:a,projectName:l,description:c,directory:u}=t,p={framework:r,mount_path:o,environment:i,version:s};return a&&(p.project_id=a),l&&(p.project_name=l),c&&(p.description=c),u&&(p.app_path=u),Pc(e.accessToken,`/cosmic/${n}/cli-deploy-init`,{method:"POST",body:p})}async function tb(e,t){return Pc(e.accessToken,`/cosmic/${e.siteId}/cli-project-environments/${t}`,{method:"GET"})}async function nb(e){return Pc(e.accessToken,`/cosmic/${e.siteId}/cli-projects`,{method:"GET"})}async function rb(e,t){if(!wr.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=wr.statSync(e);if(n.size>Xy)throw new Error(`Build output is too large (${Qy(n.size)}). Maximum allowed size is ${Qy(Xy)}.`);let r=wr.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([l,c])=>{i.append(l,c)});let s=new Blob([r],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let l=await a.text();throw new h(l,{prefix:`${U} Upload failed with response:`})}}async function ob(e,t){if(!e||e==="undefined")throw new h("Completion URL is undefined or invalid");let n=new URL(e);t&&n.searchParams.set("failed","true");let r=await fetch(n.toString(),{method:"GET"});if(!r.ok)throw new h(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var ib=require("webflow-api");de();de();oe();function Ic(e){return new ib.WebflowClient({accessToken:e,environment:{base:`${R}/v2`,dataApi:`${R}/v2`,contentDeliveryApi:`${Po}/v2`}})}async function go(e,t){try{let r=await Ic(e).sites.get(t);return{id:r.id||t,displayName:r.displayName||"Unknown Site",shortName:r.shortName||"unknown-site",customDomains:r.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new h(n,{prefix:"Error fetching site details:"})}}async function Rc(e,t){try{return{customDomains:(await Ic(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new h(n,{prefix:"Error fetching custom domains:"})}}async function $c(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new h(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function jc(e,t,n){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(r=>{if(r.mountPath!==t)return!1;if(!n)return!0;if(r.workerUrl)try{return new URL(r.workerUrl).hostname.split(".")[0]===n}catch{return!1}return!1}):!1}async function sb(e,t,n){try{let r=Ic(e),o=await go(e,t),i=[];if(n?.domains&&n.domains.length>0)for(let s of n.domains){let a=o.customDomains?.find(l=>l.url===s);a?.id&&i.push(a.id)}await r.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:n?.publishToWebflowSubdomain??!0})}catch(r){throw new h(r,{prefix:"Error publishing site:"})}}Je();Bs();G();async function ab(e,t,n){let{siteId:r,accessToken:o}=e,i=Pn("Validating mount path configuration...").start();try{let s=await go(o,r),a=await Rc(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(y=>y.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async y=>{try{let v=await $c(y),E=Array.isArray(v.cosmic)?v.cosmic.map(M=>M.mountPath).filter(M=>typeof M=="string"):[],_=jc(v,t,n);return{domain:y,mountPaths:E,isValid:_===!0}}catch(v){return{domain:y,mountPaths:[],isValid:!1,error:v instanceof Error?v.message:String(v)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),p=await Promise.all(u),f=p.some(y=>!y.isValid),m=p.every(y=>y.isValid);return i.succeed("Mount path validation completed"),{isValid:m,domains:p,needsPublishing:f}}catch(s){throw i.fail("Mount path validation failed"),s}}async function lb(e,t,n){let{siteId:r,accessToken:o}=e;try{let i=await go(o,r),s=await Rc(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let p=await $c(u),f=jc(p,t,n);return{domain:u,isValid:f}}catch(p){return d.debug(`Could not verify mount path for ${u}: ${p}`),{domain:u,isValid:!1}}});return(await Promise.all(l)).filter(u=>u.isValid).map(u=>u.domain)}catch(i){return d.debug(`Error getting valid domains: ${i}`),[]}}function cb(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function ub(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await $o({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:r=>r.length===0?"Please select at least one domain to publish to.":!0});return n??[]}async function db(){return await xe({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function Bc(e,t){let{siteId:n,accessToken:r}=e,o=Pn(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await go(r,n)).shortName}.webflow.io`,a=t.includes(s),l=t.filter(c=>c!==s);await sb(r,n,{domains:l,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}we();G();Fe();de();Oe();var as=w(require("fs")),fb=w(require("path"));oe();ke();var ls=async()=>{try{let e=await kc();return Object.keys(e)}catch(e){return d.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},fS=async(e,t,n)=>{let r=n[t];if(!r)throw new Error(`Scaffold "${t}" not found`);let o=r.find(l=>l.includes(dn));if(!o)throw new Error(`No ${dn} found in scaffold "${t}"`);await as.promises.mkdir(e,{recursive:!0});let s=(await as.promises.readFile(o,"utf8")).replace(Ki,e),a=fb.join(e,dn);await as.promises.writeFile(a,s,"utf8")},Nc=async(e,t,n=Zi,r)=>{let o=`./${e}`,i=await kc(),s=null,a=!1;try{let l=Date.now();await fS(e,n,i),process.chdir(o);let{manifest:c}=X(),u=await ye(c,{site:r}),p=u.accessToken,f=u.siteId;if(s=J.forCloud({authToken:p,siteId:f}),await vc(".",t,n,i,f,p),f){d.info("Running devlink export to fetch your Webflow components...");try{await mS({site:f,apiToken:p}),a=!0}catch(y){d.error(y,{prefix:"Failed to run devlink export:"}),d.info("You can manually run 'npx webflow devlink export' later to export your components.")}}let m=Date.now()-l;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:m,mountPath:t}),pb(e)}catch(l){throw d.error(l,{prefix:"Error during Webflow authentication:"}),await vc(".",t,n,i),d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),pb(e),new h(l,{skipLogging:!0})}},mS=async e=>{let{exportComponents:t}=await Promise.resolve().then(()=>(Vl(),Hh));await t({site:e.site,apiToken:e.apiToken})},hS=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=X();return t.cloud?.skipMountPathCheck===!0}catch{return!1}},gS=async(e,t,n,r)=>{d.info("\u{1F50D} Validating mount path configuration...");let o=await ab(e,t,n);if(o.isValid)d.info(`${Y} Mount path validation passed`);else if(d.info(`
|
|
139
|
+
\u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?Y:U,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";d.info(`${s} ${i.domain} ${a}`),i.error&&d.debug(` Error: ${i.error}`)}),o.needsPublishing)if(r){d.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await Bc(e,i)}else if(await db()&&Et()){let s=o.domains.filter(l=>!l.isValid).map(l=>l.domain),a=await ub(s);await Bc(e,a)}else d.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},yS=async(e,t,n,r)=>{d.info(`
|
|
140
|
+
\u{1F3D7}\uFE0F Building project...`);let o=await qy(e,{mountPath:n,telemetry:r?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});d.info("\u{1F4E4} Uploading build artifacts...");let i=Date.now();await rb(o,t.upload_url);let s=Date.now()-i;return d.info(`${Y} Upload completed in ${(s/1e3).toFixed(1)}s`),o},bS=async(e,t,n)=>{d.success(`
|
|
141
|
+
\u{1F310} Your cloud app will soon be available at:`);try{let r=await lb(e,t,n),o=cb(r,t);o.length>0?o.forEach(i=>{d.info(` ${i}`)}):d.warn(" No domains found with the correct mount path configuration yet.")}catch(r){d.warn(` Could not determine deployment links: ${r instanceof Error?r.message:r}`)}},wS=e=>{e.site_slug?d.success(`Visit your deployment:
|
|
142
142
|
|
|
143
143
|
${jn}/dashboard/sites/${e.site_slug}/webflow-cloud/projects/${e.project_id}/environments/${e.environment_id}/deployments/${e.deployment_id}`):d.info(`
|
|
144
|
-
Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},
|
|
145
|
-
${
|
|
146
|
-
${
|
|
144
|
+
Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},DS=async(e,t,n,r)=>{try{await ob(t.completion_url,!!r),r?d.error(`
|
|
145
|
+
${U} Deployment failed due to build error.`):(d.success(`
|
|
146
|
+
${Y} Deployment triggered successfully!`),await bS(e,n,t.environment_id),wS(t))}catch(o){throw new h(o,{prefix:"Failed to trigger deployment:"})}},vS=(e,t)=>{e&&Hy(process.cwd(),e),t&&Jy(t)},mb=async(e,t,n,r)=>{let o=null,i=null,s=Date.now(),a=null,l=null,c=Ac(process.cwd()),u=r?.telemetry;await u?.sendUsage("cloud_deploy_start",{environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,cloudflareBindings:c});try{d.info("\u{1F527} Detecting framework..."),a=await ky(),d.info(`Framework: ${a.framework}`),d.info(`Build command: ${a.config.build_command}`),d.info("\u{1F3D7}\uFE0F Building project..."),o=await eb(e,t,n,r),hS(r)?d.info("\u23ED\uFE0F Skipping mount path validation..."):await gS(e,n,o.environment_id,r?.autoPublish),i=await yS(a,o,n,r),d.info(`Starting deployment process for environment: ${t} at mount path: ${n}`);let p=Date.now()-s;await u?.sendUsage("cloud_deploy_success",{duration:p,environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,framework:a.framework,buildCommand:a.config.build_command,cloudflareBindings:c})}catch(p){l=p instanceof Error?p:new Error(String(p)),d.error(l,{prefix:"Error during deployment initialization:"});let f=Date.now()-s;await u?.sendError(l,"cloud_deploy_failure",{duration:f,environment:t,mountPath:n,projectName:r?.projectName,cloudflareBindings:c,argv:process.argv.slice(2)})}finally{if(vS(a,i),o&&await DS(e,o,n,l),l)throw new h(l,{skipLogging:!0})}},pb=e=>{d.info("--- "),d.info(k.bold.green("Get started with the following commands:")),d.info(` cd ${e}`),d.info(" npm install"),d.info(" npm run dev"),d.info(` webflow cloud deploy
|
|
147
147
|
|
|
148
148
|
`),d.info("Run the following command to export Webflow components when they update:"),d.info(` webflow devlink export
|
|
149
|
-
`),d.info("--- ")};we();Je();He()
|
|
150
|
-
`);throw new
|
|
149
|
+
`),d.info("--- ")};we();Je();He();je();G();Oe();var hb=w(require("path"));function Sn(e){if(!e||e.trim()==="")return"/";let t=hb.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((r,o)=>o===0?r:encodeURIComponent(r)).join("/"),t}function cs(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}oe();var gb=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects");t.command("create").description("Create a new Webflow Cloud project").argument("<name>","Project name").option("-f, --framework <framework>","Framework to use","nextjs").action(async(n,r)=>{let{framework:o}=r;if(!(await ls()).find(a=>a===o)){d.error(`Framework ${o} not found`);return}await Nc(n,o,o)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let n=await ls();d.info("Available project templates:"),n.length>0?n.forEach(r=>d.info(`- ${r}`)):d.info("No templates found.")}),t.command("init").description("Bootstrap a new Webflow Cloud project").option("-n, --project-name <name>","Project name").option("-f, --framework <framework>","Framework to use (e.g., astro, nextjs)").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-s, --site-id <siteId>","Webflow site ID to connect to").action(async n=>{let r=process.stdin.isTTY,o=await ls(),i={};if(r&&Et()){if(!n.projectName){let p=await Ce({message:"What would you like to name your project?",validate:f=>f.trim()===""?"Project name cannot be empty":!0});if(p==null)throw new h("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");i.projectName=p}if(n.framework||(i.scaffoldName=await At({message:"Which framework would you like to use?",choices:o.map(p=>({name:p,value:p})),default:"astro"})),!n.mount){let p=await Ce({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});i.mountPath=Sn(p)}}let s=n.projectName||i.projectName,a=n.framework||i.scaffoldName,l=n.mount||i.mountPath||"/app",c=n.siteId,u=Sn(l);if(!s||typeof s!="string"||s.trim()==="")throw new h("--project-name cannot be empty");if(!a||typeof a!="string"||!o.includes(a)){let p=o.map(f=>`- ${f}`).join(`
|
|
150
|
+
`);throw new h(`--framework "${a||"undefined"}" not found
|
|
151
151
|
|
|
152
152
|
Available frameworks:
|
|
153
|
-
${p}`)}if(typeof u!="string"||!
|
|
153
|
+
${p}`)}if(typeof u!="string"||!cs(u))throw new h("Invalid mount path: "+u);if(!c&&(!r||ie()))throw new h("--site-id is required");await Nc(s,u,a,c)}),t.command("deploy").description("Deploy your Webflow Cloud project").option("-e, --environment <environment>","Environment name").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-n, --project-name <name>","Project name (for new projects)").option("-d, --directory <path>","Project directory path (for new projects)").option("--description <description>","Project description (for new projects)").option("--skip-mount-path-check","Skip mount path checking").option("--auto-publish","Automatically publish site for mount path updates").action(async n=>{let{manifest:r}=X(),o=await ye(r),i;try{i=J.forCloud({authToken:o.accessToken,siteId:o.siteId})}catch(s){d.debug(`Failed to initialize telemetry: ${s}`)}try{if(n.directory)try{process.chdir(n.directory),d.info(`Changed directory to: ${n.directory}`)}catch(m){throw d.error(`Error: Could not change to directory ${n.directory}`),new h(m)}let{manifest:s}=X(),l=(s.cloud||{}).project_id,c,u,p=n.projectName,f=n.description;if(n.environment&&n.mount){if(c=n.environment,u=Sn(n.mount),!cs(u))throw new h("Invalid mount path: "+u)}else{let m=[];if(!l){if(!p&&ie())throw new h("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let v=await nb(o);if(v.projects.length>0){let E=await At({message:"Select a project to deploy to:",choices:[...v.projects.map(_=>({name:`${_.name} (${_.description||"No description"})`,value:_.id})),{name:"Create new project",value:null}]});E?(l=E,d.info("\u{1F4DD} Updating webflow.json with project ID..."),fe({cloud:{project_id:E}})):d.info("Creating a new project will be handled during deployment.")}else d.info("No existing projects found. A new project will be created during deployment.")}catch(v){d.warn("Could not fetch existing projects. A new project will be created during deployment."),d.warn(v instanceof Error?v.message:String(v))}}if(!l&&!p&&(p=await Ce({message:"What would you like to name your new project?",default:"New Webflow Cloud Project",validate:v=>v.trim()===""?"Project name cannot be empty":!0})),l)try{let E=(await tb(o,l)).environments.map(_=>({name:`${_.branch} (${_.mount})`,value:{branch:_.branch,mount:_.mount}}));m.push(...E)}catch(v){throw new h(v,{prefix:"Error fetching project environments:"})}m.push({name:"Create new environment",value:null});let y=await At({message:"Select an environment to deploy to:",choices:m});if(y)c=y.branch,u=Sn(y.mount);else if(n.environment?c=n.environment:c=await Ce({message:"What environment would you like to deploy to?",default:"main",validate:v=>v.trim()===""?"Environment cannot be empty":!0}),n.mount)u=Sn(n.mount);else{let v=await Ce({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});u=Sn(v)}}if(!cs(u))throw new h("Invalid mount path: "+u);await mb(o,c,u,{projectName:p,description:f,directory:n.directory,skipMountPathCheck:n.skipMountPathCheck,autoPublish:n.autoPublish,telemetry:i})}catch(s){throw new h(s,{prefix:"Error during deployment setup:"})}})};var Mc=require("commander");He();je();we();G();oe();ke();Fe();de();ft();oe();oe();function Q(e,t){if(!/^[a-f0-9]{24}$/.test(e))throw new h(`Invalid ${t}: "${e}" is not a valid resource ID.`,{isUserError:!0})}var Lc=e=>e.replace(/\x1b\[[0-9;]*m/g,""),yb=(e,t)=>e+" ".repeat(Math.max(0,t-Lc(e).length));function ct(e,t){let n=e.map((s,a)=>Math.max(Lc(s).length,...t.map(l=>Lc(String(l[a])).length))),r=n.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>yb(s,n[a]+2)).join(""),i=t.map(s=>s.map((a,l)=>yb(String(a),n[l]+2)).join("")).join(`
|
|
154
154
|
`);return`${o}
|
|
155
155
|
${r}
|
|
156
|
-
${i}`}async function
|
|
156
|
+
${i}`}async function ut(e){try{let t=await e.json();return t.message??t.error??`${e.status} ${e.statusText}`}catch{return`${e.status} ${e.statusText}`}}async function bb(e,t){Q(t,"siteId");let n=await K(`${R}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok){let o=await ut(n);throw n.status>=400&&n.status<500?new h(o,{isUserError:!0}):new h(`Failed to list collections: ${o}`)}return(await n.json()).collections??[]}async function wb(e,t){Q(t,"collectionId");let n=await K(`${R}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(n.status===404)throw new h(`Collection "${t}" not found`,{isUserError:!0});if(!n.ok)throw new h(`Failed to get collection: ${await ut(n)}`);let r=await n.json();return{...r,fields:r.fields??[]}}async function Db(e,t,n){Q(t,"siteId");let r={displayName:n.displayName,singularName:n.singularName};n.slug&&(r.slug=n.slug);let o=await K(`${R}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok){let i=await ut(o);throw o.status>=400&&o.status<500?new h(i,{isUserError:!0}):new h(`Failed to create collection: ${i}`)}return await o.json()}async function vb(e,t,n){Q(t,"collectionId");let r=await K(`${R}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:n.displayName,type:n.type,isRequired:n.isRequired??!1})});if(!r.ok){let o=await ut(r);throw r.status===404?new h(`Collection "${t}" not found`,{isUserError:!0}):r.status>=400&&r.status<500?new h(o,{isUserError:!0}):new h(`Failed to create field: ${o}`)}return await r.json()}async function kb(e,t,n={}){Q(t,"collectionId");let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset)),n.cmsLocaleId&&r.set("cmsLocaleId",n.cmsLocaleId);let o=r.toString()?`?${r.toString()}`:"",i=await K(`${R}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new h(`Collection "${t}" not found`,{isUserError:!0});if(!i.ok)throw new h(`Failed to list items: ${await ut(i)}`);let s=await i.json();return{items:s.items??[],total:s.total??0,count:s.count??s.items?.length??0,limit:s.limit??n.limit??100,offset:s.offset??n.offset??0}}async function xb(e,t,n,r){Q(t,"collectionId"),Q(n,"itemId");let o=r?`?cmsLocaleId=${encodeURIComponent(r)}`:"",i=await K(`${R}/v2/collections/${t}/items/${n}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!i.ok)throw new h(`Failed to get item: ${await ut(i)}`);return await i.json()}async function Cb(e,t,n,r=!1){Q(t,"collectionId");let o=await K(`${R}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n,isDraft:r})});if(!o.ok){let i=await ut(o);throw o.status>=400&&o.status<500?new h(i,{isUserError:!0}):new h(`Failed to create item: ${i}`)}return await o.json()}async function Fb(e,t,n,r){Q(t,"collectionId"),Q(n,"itemId");let o=await K(`${R}/v2/collections/${t}/items/${n}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r})});if(o.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!o.ok)throw new h(`Failed to update item: ${await ut(o)}`);return await o.json()}async function Eb(e,t,n){Q(t,"collectionId"),Q(n,"itemId");let r=await K(`${R}/v2/collections/${t}/items/${n}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(r.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!r.ok)throw new h(`Failed to delete item: ${await ut(r)}`)}async function _b(e,t,n){Q(t,"collectionId"),n.forEach(o=>Q(o,"itemId"));let r=await K(`${R}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:n})});if(!r.ok){let o=await ut(r);throw r.status>=400&&r.status<500?new h(o,{isUserError:!0}):new h(`Failed to publish items: ${o}`)}return await r.json()}function Sb(e,t=["id","displayName","slug"]){if(e.length===0)return k.dim("No collections found.");let n=["id","displayName","singularName","slug","lastUpdated"],r=Object.fromEntries(n.map(a=>[a.toLowerCase(),a])),o=t.map(a=>r[a.toLowerCase()]).filter(a=>a!=null);if(o.length===0)return k.red(`Invalid fields. Available: ${n.join(", ")}`);let i=o.map(a=>k.bold(a)),s=e.map(a=>o.map(l=>{let c=a[l];return c?l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:k.dim("\u2014")}));return ct(i,s)}function Tb(e){let t=[`${k.bold("Collection:")} ${e.displayName}`,`${k.bold("ID:")} ${e.id}`,`${k.bold("Slug:")} ${e.slug}`,`${k.bold("Singular:")} ${e.singularName}`,`${k.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",k.bold("Fields:")];if(e.fields.length===0)return t.push(k.dim(" No fields defined.")),t.join(`
|
|
157
157
|
`);let n=["NAME","SLUG","TYPE","REQUIRED"].map(o=>k.bold(o)),r=e.fields.map(o=>[o.displayName,o.slug,o.type,o.isRequired?"yes":"no"]);return t.push(ct(n,r)),t.join(`
|
|
158
|
-
`)}function
|
|
159
|
-
Showing ${m}\u2013${g}${E} items. Use --offset ${g} to load next page.`)}}catch(p){throw await a.sendError(p instanceof Error?p:new Error(String(p)),"cms_items_list",{duration:Date.now()-l}),new y(p,{prefix:`${q} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(xt).action(async i=>{let s=await te(),a=J.forCms({authToken:s}),l=Date.now();try{let c=await kb(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}let u=c.isArchived?"archived":c.isDraft?"draft":"live";d.info(`${c.id} [${u}]`),d.info(` Last updated: ${new Date(c.lastUpdated).toLocaleString()}`),c.lastPublished&&d.info(` Last published: ${new Date(c.lastPublished).toLocaleString()}`),d.info(" Fields:"),d.info(JSON.stringify(c.fieldData,null,4).replace(/^/gm," "))}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_get",{duration:Date.now()-l}),new y(c,{prefix:`${q} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(wr).addOption(xt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new y(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would create item:"),d.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await xb(a,i.collection,s,i.draft??!1);if(await l.sendUsage("cms_items_create",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${K} Item created: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_create",{duration:Date.now()-c}),new y(u,{prefix:`${q} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(wr).addOption(xt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new y(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would update item:"),d.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await Cb(a,i.collection,i.item,s);if(await l.sendUsage("cms_items_update",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${K} Item updated: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_update",{duration:Date.now()-c}),new y(u,{prefix:`${q} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(wr).action(async i=>{if(i.dryRun){d.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),d.info("Dry run complete \u2014 no changes made.");return}let s=await te(),a=J.forCms({authToken:s}),l=Date.now();try{await Fb(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-l,dryRun:!1}),d.info(`${K} Item deleted: ${i.item}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_delete",{duration:Date.now()-l}),new y(c,{prefix:`${q} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(wr).addOption(xt).action(async i=>{let s=i.items.split(",").map(u=>u.trim());if(i.dryRun){d.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(u=>d.info(` ${u}`)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await Eb(a,i.collection,s);if(await l.sendUsage("cms_items_publish",{duration:Date.now()-c,itemCount:s.length,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}let p=u.publishedItemIds?.length??0;d.info(`${K} Published ${p} item(s)`),u.errors?.length&&u.errors.forEach(f=>d.warn(` ${f.itemId}: ${f.message}`))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_publish",{duration:Date.now()-c}),new y(u,{prefix:`${q} Failed to publish items:`})}})};Fe();He();$e();we();V();oe();ke();Fe();de();pt();oe();async function Pb(e,t,n={}){if(Q(t,"siteId"),n.folderId){Q(n.folderId,"folderId");let a=await vS(e,n.folderId),l=new Set(a.assets);if(l.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let c=[],u=0,p=100;for(;;){let E=await Y(`${R}/v2/sites/${t}/assets?limit=${p}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!E.ok)throw new y(`Failed to list assets: ${E.status} ${E.statusText}`);let _=await E.json(),M=_.assets??[];c.push(...M);let C=_.pagination?.total??0;if(u+=M.length,u>=C||M.length===0)break}let f=c.filter(E=>l.has(E.id)),m=n.offset??0,g=n.limit??f.length,v=f.slice(m,m+g);return{assets:v,pagination:{total:f.length,limit:v.length,offset:m}}}let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset));let o=r.toString(),i=await Y(`${R}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new y(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function Ib(e,t,n,r,o){Q(t,"siteId"),o&&Q(o,"folderId");let i=Gl(n);kS(i.meta.title,i.meta.size);let s=r??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let l=await Y(`${R}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!l.ok)throw new y(`Failed to initiate asset upload: ${l.status} ${l.statusText}`);let c=await l.json(),u={fields:c.uploadDetails,_id:c.id,s3Url:c.hostedUrl??"",url:c.uploadUrl??"",contentType:c.contentType??"",origFileName:c.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await io(i,u)}catch(p){throw await Y(`${R}/v2/assets/${u._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),p}return{id:u._id,hostedUrl:u.s3Url,displayName:s,originalFileName:i.meta.title}}async function Rb(e,t,n){Q(t,"assetId");let r=await Y(`${R}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new y(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function vS(e,t){Q(t,"folderId");let n=await Y(`${R}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new y(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function jb(e,t){Q(t,"siteId");let n=await Y(`${R}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new y(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function $b(e,t,n,r){Q(t,"siteId"),r&&Q(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await Y(`${R}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new y(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var Ob={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function kS(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=Ob[n];if(!r){let o=Object.keys(Ob).join(", ");throw new y(`Unsupported file type ".${n}". Allowed types: ${o}`,{isUserError:!0})}if(t>r.maxBytes){let o=r.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new y(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var Mc=["id","displayName","originalFileName","contentType","size","lastUpdated"];function Bb(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return k.dim("No assets found.");let n=Object.fromEntries(Mc.map(l=>[l.toLowerCase(),l])),r=t.map(l=>n[l.toLowerCase()]).filter(l=>l!=null);if(r.length===0)return k.red(`Invalid fields. Available: ${Mc.join(", ")}`);let o=t.filter(l=>n[l.toLowerCase()]==null),i=o.length>0?k.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${Mc.join(", ")}
|
|
160
|
-
`):"",s=r.map(l=>k.bold(l)),a=e.map(l=>r.map(c=>{let u=l[c];if(u==null||c==="size"&&u===0)return k.dim("\u2014");if(c==="size")return xS(Number(u));if(c==="lastUpdated"){let f=new Date(String(u)),m=String(f.getMonth()+1).padStart(2,"0"),g=String(f.getDate()).padStart(2,"0"),v=String(f.getFullYear()).slice(-2),E=String(f.getHours()).padStart(2,"0"),_=String(f.getMinutes()).padStart(2,"0");return`${m}/${g}/${v} ${E}:${_}`}let p=String(u);return c==="displayName"&&p.length>40?k.dim("\u2026")+p.slice(-39):p}));return i+ct(s,a)}function xS(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Nb(e){if(e.length===0)return k.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>k.bold(o)),r=t.map(o=>[o.id,o.displayName,String(o.assets.length),new Date(o.lastUpdated).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})]);return ct(n,r)}var Lb=e=>{let t=e.command("assets").description("Manage Webflow site assets");t.command("list").description("List all assets for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--folder <folderId>","Filter by folder ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, originalFileName, contentType, size, lastUpdated)","id,displayName,lastUpdated,size").option("--limit <n>","Max number of assets to return (default 100)",parseInt).option("--offset <n>","Number of assets to skip",parseInt).option("--sort-by <field>","Sort by: displayName, originalFileName, contentType, size, lastUpdated","displayName").option("--order <dir>","Sort direction: asc or desc","asc").action(async r=>{let o,i;if(r.site)o=await te(),i=r.site;else{let{manifest:l}=X(),c=await ye(l);o=c.accessToken,i=c.siteId}let s=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:l,pagination:c}=await Pb(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){d.info("No assets found.");return}let u=["displayName","originalFileName","contentType","size","lastUpdated"];if(u.includes(r.sortBy)||(d.warn(`Unknown --sort-by "${r.sortBy}". Valid fields: ${u.join(", ")}. Defaulting to displayName.`),r.sortBy="displayName"),!["asc","desc"].includes(r.order))throw new y(`Invalid --order "${r.order}". Valid values: asc, desc`,{isUserError:!0});let p=ds(l,r.sortBy,r.order);if(r.json){d.info(JSON.stringify({assets:p,pagination:c},null,2));return}let f=r.fields.split(",").map(g=>g.trim());d.info(Bb(p,f));let m=(r.offset??0)+l.length;m<c.total&&d.info(k.dim(`Showing ${m} of ${c.total} assets. Use --offset ${m} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new y(l,{prefix:`${q} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
|
|
161
|
-
Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(r,o)=>{if(o.dryRun){d.info(`Dry run \u2014 would upload: ${r}`),o.name&&d.info(` Display name: ${o.name}`),o.folder&&d.info(` Folder: ${o.folder}`),d.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await te(),s=o.site;else{let{manifest:c}=X(),u=await ye(c);i=u.accessToken,s=u.siteId}let a=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Ib(i,s,r,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-l,dryRun:!1}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${K} Asset uploaded: ${c.id}`),c.hostedUrl&&d.info(` URL: ${c.hostedUrl}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_upload",{duration:Date.now()-l}),new y(c,{prefix:`${q} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(r,o)=>{if(!o.altText&&!o.displayName)throw new y("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){d.info(`Dry run \u2014 would update asset: ${r}`),o.altText&&d.info(` Alt text: ${o.altText}`),o.displayName&&d.info(` Display name: ${o.displayName}`),d.info("Dry run complete \u2014 no changes made.");return}let i=await te(),s=J.forAssets({authToken:i}),a=Date.now();try{let l=await Rb(i,r,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){d.info(JSON.stringify(l,null,2));return}d.info(`${K} Asset updated: ${l.id}`),l.displayName&&d.info(` Display name: ${l.displayName}`),l.altText&&d.info(` Alt text: ${l.altText}`)}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_update",{duration:Date.now()-a}),new y(l,{prefix:`${q} Failed to update asset:`})}});let n=t.command("folders").description("Manage asset folders");n.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async r=>{let o,i;if(r.site)o=await te(),i=r.site;else{let{manifest:l}=X(),c=await ye(l);o=c.accessToken,i=c.siteId}let s=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await jb(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:l.length}),r.json){d.info(JSON.stringify(l,null,2));return}d.info(Nb(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new y(l,{prefix:`${q} Failed to list folders:`})}}),n.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(r,o)=>{let i,s;if(o.site)i=await te(),s=o.site;else{let{manifest:c}=X(),u=await ye(c);i=u.accessToken,s=u.siteId}let a=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await $b(i,s,r,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-l}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${K} Folder created: ${c.id}`),d.info(` Name: ${c.displayName}`),c.parentFolder&&d.info(` Parent: ${c.parentFolder}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_create",{duration:Date.now()-l}),new y(c,{prefix:`${q} Failed to create folder:`})}})};He();$e();V();oe();ke();Fe();de();pt();oe();async function zb(e,t){Q(t,"siteId");let n=await Y(`${R}/v2/sites/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new y(`Failed to get site: ${n.status} ${n.statusText}`);return await n.json()}async function Wb(e){let t=[],n=0,r=100;for(;;){let o=new URL(`${R}/v2/sites`);o.searchParams.set("limit",String(r)),o.searchParams.set("offset",String(n));let i=await Y(o.toString(),{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new y(`Failed to list sites: ${i.status} ${i.statusText}`);let s=await i.json(),a=s.sites??[];t.push(...a);let l=s.pagination?.total??a.length;if(n+=a.length,n>=l||a.length<r)break}return t}async function Ub(e,t){Q(t,"siteId");let n=await Y(`${R}/v2/sites/${t}/custom_domains`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new y(`Failed to get custom domains: ${n.status} ${n.statusText}`);return(await n.json()).customDomains??[]}async function Vb(e,t,n=[],r){Q(t,"siteId"),r&&Q(r,"pageId");let o=n.length>0?{customDomains:n}:{publishToWebflowSubdomain:!0};r&&(o.pageId=r);let i=await Y(`${R}/v2/sites/${t}/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new y(`Failed to publish site: ${i.status} ${i.statusText}`);return await i.json()}var zc=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],Mb=Object.fromEntries(zc.map(e=>[e.toLowerCase(),e]));function Gb(e,t=["id","displayName","lastPublished"],{warn:n}={}){if(e.length===0)return k.dim("No sites found.");let r=t.map(a=>Mb[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>Mb[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${zc.join(", ")}`),r.length===0)throw new y(`No valid fields specified. Available: ${zc.join(", ")}`,{isUserError:!0});let i=r.map(a=>k.bold(a)),s=e.map(a=>r.map(l=>{let c=a[l];return c?l==="lastPublished"||l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:k.dim("\u2014")}));return ct(i,s)}function qb(e){if(e.length===0)return k.dim("No custom domains configured.");let t=[k.bold("id"),k.bold("url"),k.bold("lastPublished")],n=e.map(r=>[r.id,r.url,r.lastPublished?new Date(r.lastPublished).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):k.dim("\u2014")]);return ct(t,n)}var Jb=e=>{let t=e.command("sites").description("Manage Webflow sites");t.command("list").description("List all sites in your Webflow workspace").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, shortName, lastPublished, lastUpdated, timeZone)","id,displayName,lastPublished").action(async n=>{let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=await Wb(r);if(await o.sendUsage("sites_list",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}let a=n.fields.split(",").map(l=>l.trim());d.info(Gb(s,a,{warn:l=>d.warn(l)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_list",{duration:Date.now()-i}),new y(s,{prefix:`${q} Failed to list sites:`})}}),t.command("get").description("Get details for a specific site").argument("<siteId>","Site ID").option("--json","Output as JSON").action(async(n,r)=>{let o=await te(),i=J.forSites({authToken:o}),s=Date.now();try{let a=await zb(o,n);if(await i.sendUsage("sites_get",{duration:Date.now()-s}),r.json){d.info(JSON.stringify(a,null,2));return}d.info(`${a.displayName} (${a.id})`),d.info(` Short name: ${a.shortName}`),d.info(` Time zone: ${a.timeZone}`),a.lastPublished&&d.info(` Published: ${new Date(a.lastPublished).toLocaleString()}`),a.previewUrl&&d.info(` Preview: ${a.previewUrl}`)}catch(a){throw await i.sendError(a instanceof Error?a:new Error(String(a)),"sites_get",{duration:Date.now()-s}),new y(a,{prefix:`${q} Failed to get site:`})}}),t.command("domains").description("List custom domains configured for a site").requiredOption("--site <siteId>","Site ID").option("--json","Output as JSON").action(async n=>{let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=await Ub(r,n.site);if(await o.sendUsage("sites_domains",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}d.info(qb(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_domains",{duration:Date.now()-i}),new y(s,{prefix:`${q} Failed to get custom domains:`})}}),t.command("publish").description("Publish a Webflow site (defaults to Webflow subdomain)").requiredOption("--site <siteId>","Site ID to publish").option("--domains <domains>","Comma-separated custom domain IDs to publish to").option("--page <pageId>","Publish a single page instead of the whole site").option("--dry-run","Preview what would be published without publishing").option("--json","Output as JSON").action(async n=>{if(Q(n.site,"siteId"),n.dryRun){d.info(`Would publish ${n.page?`page ${n.page} on`:"site"} ${n.site}`),n.domains?d.info(` Custom domains: ${n.domains}`):d.info(" Domains: Webflow subdomain");return}let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=n.domains?n.domains.split(",").map(u=>u.trim()):[],a=await Vb(r,n.site,s,n.page);if(await o.sendUsage("sites_publish",{duration:Date.now()-i,dryRun:!1,publishScope:a.publishScope}),n.json){d.info(JSON.stringify(a,null,2));return}let l=a.publishScope==="page"?"Page":"Site";d.info(`${K} ${l} published successfully`);let c=a.customDomains??[];c.length>0?c.forEach(u=>{let p=u.lastPublished?` (${new Date(u.lastPublished).toLocaleString()})`:"";d.info(` Live at: https://${u.url}${p}`)}):a.publishToWebflowSubdomain&&d.info(" Published to Webflow subdomain")}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_publish",{duration:Date.now()-i}),new y(s,{prefix:`${q} Failed to publish site:`})}})};var Hb=w(Po());function Wc(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>Wc(n,t))}function Zb(e){let t=Hb.default.version;e.name("webflow").description("Webflow CLI").version(t,"-v, --version").addOption(fc).addOption(mc).addOption(hc).addOption(gc).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||Lu(!0),ft.start(),r.manifest&&Mu(r.manifest);try{await J.promptForConsentIfNeeded()}catch(o){d.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new $r().prompt()}catch(o){d.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{ft.displayGrouped(),ft.stop()}),Cd(e),Ab(e),tp(e),gy(e),hb(e),hy(e),Lb(e),Jb(e),uy(e),e.commands.forEach(n=>{Wc(n,[fc,mc,hc,gc])})}V();oe();var Yb=new Kb.Command;Zb(Yb);Yb.parseAsync().catch(e=>{if(e instanceof y){if(!e.skipLogging)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else d.error(e,{prefix:e.prefix})}else d.error(e);process.exit(1)});
|
|
158
|
+
`)}function Ab(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return k.dim("No items found.");let n=t.map(o=>k.bold(o)),r=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?k.yellow("draft"):k.green("live");if(i==="isArchived")return o.isArchived?k.dim("archived"):"";if(i==="lastUpdated"||i==="lastPublished"||i==="createdOn"){let a=o[i];return a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):k.dim("\u2014")}let s=o[i];return s==null?k.dim("\u2014"):String(s)}));return ct(n,r)}function us(e,t,n="asc"){return[...e].sort((r,o)=>{let i=r[t],s=o[t];if(i==null&&s==null)return 0;if(i==null)return 1;if(s==null)return-1;let a=0;return typeof i=="string"&&typeof s=="string"?a=i.localeCompare(s):typeof i=="number"&&typeof s=="number"?a=i-s:a=String(i).localeCompare(String(s)),n==="desc"?-a:a})}var xt=new Mc.Option("--json","Output as JSON"),Dr=new Mc.Option("--dry-run","Preview without executing"),Ob=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),n=t.command("collections").description("Manage CMS collections");n.command("list").description("List all CMS collections for a site").addOption(ar).addOption(xt).option("--fields <fields>","Comma-separated fields to display (id, displayName, singularName, slug, lastUpdated)","id,displayName,slug").option("--sort-by <field>","Sort by: displayName, slug, lastUpdated","displayName").option("--order <dir>","Sort direction: asc or desc","asc").action(async i=>{let s,a;if(i.site)s=await te(),a=i.site;else{let{manifest:u}=X(),p=await ye(u);s=p.accessToken,a=p.siteId}let l=J.forCms({authToken:s,siteId:a}),c=Date.now();try{let u=await bb(s,a);if(await l.sendUsage("cms_collections_list",{duration:Date.now()-c,count:u.length}),u.length===0){d.info("No collections found.");return}let p=["displayName","slug","lastUpdated"];if(p.includes(i.sortBy)||(d.warn(`Unknown --sort-by "${i.sortBy}". Valid fields: ${p.join(", ")}. Defaulting to displayName.`),i.sortBy="displayName"),!["asc","desc"].includes(i.order))throw new h(`Invalid --order "${i.order}". Valid values: asc, desc`,{isUserError:!0});let f=us(u,i.sortBy,i.order);if(i.json){d.info(JSON.stringify(f,null,2));return}let m=i.fields.split(",").map(y=>y.trim());d.info(Sb(f,m))}catch(u){if(u instanceof h&&u.isUserError){d.info(`${U} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_list",{duration:Date.now()-c}),new h(u,{prefix:`${U} Failed to list collections:`})}}),n.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(xt).action(async(i,s)=>{let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await wb(a,i);if(await l.sendUsage("cms_collections_get",{duration:Date.now()-c}),s.json){d.info(JSON.stringify(u,null,2));return}d.info(Tb(u))}catch(u){if(u instanceof h&&u.isUserError){d.info(`${U} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_get",{duration:Date.now()-c}),new h(u,{prefix:`${U} Failed to get collection:`})}}),n.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(ar).requiredOption("--name <displayName>","Collection display name").option("--singular-name <singularName>","Singular name (defaults to --name)").option("--slug <slug>","URL slug for the collection (auto-derived from --name if omitted)").addOption(Dr).addOption(xt).action(async i=>{let s=i.singularName??i.name,a=i.slug??i.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(i.dryRun){d.info("Dry run \u2014 would create collection:"),d.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let l,c;if(i.site)l=await te(),c=i.site;else{let{manifest:f}=X(),m=await ye(f);l=m.accessToken,c=m.siteId}let u=J.forCms({authToken:l,siteId:c}),p=Date.now();try{let f=await Db(l,c,{displayName:i.name,singularName:s,slug:a});if(await u.sendUsage("cms_collections_create",{duration:Date.now()-p}),i.json){d.info(JSON.stringify(f,null,2));return}d.info(`${Y} Collection created: ${f.id}`),d.info(` Name: ${f.displayName}`),d.info(` Slug: ${f.slug}`),d.info(`
|
|
159
|
+
Next: add fields with "webflow cms fields create --collection ${f.id} --name <name> --type <type>"`)}catch(f){if(f instanceof h&&f.isUserError){d.info(`${U} ${f.message}`),process.exitCode=1;return}throw await u.sendError(f instanceof Error?f:new Error(String(f)),"cms_collections_create",{duration:Date.now()-p}),new h(f,{prefix:`${U} Failed to create collection:`})}}),t.command("fields").description("Manage CMS collection fields").command("create").description("Add a field to a CMS collection. Use --dry-run to preview.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--name <displayName>","Field display name").requiredOption("--type <type>","Field type (e.g. PlainText, RichText, Number, DateTime, Link, Image, Video, Color, Bool, Option, ItemRef, ItemRefSet)").option("--required","Mark field as required").addOption(Dr).addOption(xt).action(async i=>{if(i.dryRun){d.info("Dry run \u2014 would create field:"),d.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let s=await te(),a=J.forCms({authToken:s}),l=Date.now();try{let c=await vb(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}d.info(`${Y} Field created: ${c.id}`),d.info(` Name: ${c.displayName}`),d.info(` Type: ${c.type}`),d.info(` Slug: ${c.slug}`)}catch(c){if(c instanceof h&&c.isUserError){d.info(`${U} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_fields_create",{duration:Date.now()-l}),new h(c,{prefix:`${U} Failed to create field:`})}});let o=t.command("items").description("Manage CMS items");o.command("list").description("List items in a CMS collection").requiredOption("--collection <collectionId>","Collection ID").option("--limit <n>","Maximum items to return (default: 100)","100").option("--offset <n>","Number of items to skip (default: 0)","0").option("--locale <cmsLocaleId>","CMS locale ID to filter by").addOption(xt).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await te(),a=J.forCms({authToken:s}),l=Date.now(),c=parseInt(i.limit,10)||100,u=parseInt(i.offset,10)||0;try{let p=await kb(s,i.collection,{limit:c,offset:u,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-l,count:p.items.length}),p.items.length===0){d.info("No items found.");return}if(i.json){d.info(JSON.stringify(p,null,2));return}let f=i.fields.split(",").map(E=>E.trim());d.info(Ab(p.items,f));let m=u+1,y=u+p.items.length;if(p.items.length>=c||u>0){let E=p.total>0?` of ${p.total}`:"";d.info(`
|
|
160
|
+
Showing ${m}\u2013${y}${E} items. Use --offset ${y} to load next page.`)}}catch(p){if(p instanceof h&&p.isUserError){d.info(`${U} ${p.message}`),process.exitCode=1;return}throw await a.sendError(p instanceof Error?p:new Error(String(p)),"cms_items_list",{duration:Date.now()-l}),new h(p,{prefix:`${U} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(xt).action(async i=>{let s=await te(),a=J.forCms({authToken:s}),l=Date.now();try{let c=await xb(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}let u=c.isArchived?"archived":c.isDraft?"draft":"live";d.info(`${c.id} [${u}]`),d.info(` Last updated: ${new Date(c.lastUpdated).toLocaleString()}`),c.lastPublished&&d.info(` Last published: ${new Date(c.lastPublished).toLocaleString()}`),d.info(" Fields:"),d.info(JSON.stringify(c.fieldData,null,4).replace(/^/gm," "))}catch(c){if(c instanceof h&&c.isUserError){d.info(`${U} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_get",{duration:Date.now()-l}),new h(c,{prefix:`${U} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(Dr).addOption(xt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new h(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would create item:"),d.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await Cb(a,i.collection,s,i.draft??!1);if(await l.sendUsage("cms_items_create",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${Y} Item created: ${u.id}`)}catch(u){if(u instanceof h&&u.isUserError){d.info(`${U} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_create",{duration:Date.now()-c}),new h(u,{prefix:`${U} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(Dr).addOption(xt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new h(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would update item:"),d.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await Fb(a,i.collection,i.item,s);if(await l.sendUsage("cms_items_update",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${Y} Item updated: ${u.id}`)}catch(u){if(u instanceof h&&u.isUserError){d.info(`${U} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_update",{duration:Date.now()-c}),new h(u,{prefix:`${U} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(Dr).action(async i=>{if(i.dryRun){d.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),d.info("Dry run complete \u2014 no changes made.");return}let s=await te(),a=J.forCms({authToken:s}),l=Date.now();try{await Eb(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-l,dryRun:!1}),d.info(`${Y} Item deleted: ${i.item}`)}catch(c){if(c instanceof h&&c.isUserError){d.info(`${U} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_delete",{duration:Date.now()-l}),new h(c,{prefix:`${U} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(Dr).addOption(xt).action(async i=>{let s=i.items.split(",").map(u=>u.trim());if(i.dryRun){d.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(u=>d.info(` ${u}`)),d.info("Dry run complete \u2014 no changes made.");return}let a=await te(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await _b(a,i.collection,s);if(await l.sendUsage("cms_items_publish",{duration:Date.now()-c,itemCount:s.length,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}let p=u.publishedItemIds?.length??0;d.info(`${Y} Published ${p} item(s)`),u.errors?.length&&u.errors.forEach(f=>d.warn(` ${f.itemId}: ${f.message}`))}catch(u){if(u instanceof h&&u.isUserError){d.info(`${U} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_publish",{duration:Date.now()-c}),new h(u,{prefix:`${U} Failed to publish items:`})}})};Fe();He();je();we();G();oe();ke();Fe();de();ft();oe();async function Ib(e,t,n={}){if(Q(t,"siteId"),n.folderId){Q(n.folderId,"folderId");let a=await kS(e,n.folderId),l=new Set(a.assets);if(l.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let c=[],u=0,p=100;for(;;){let E=await K(`${R}/v2/sites/${t}/assets?limit=${p}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!E.ok)throw new h(`Failed to list assets: ${E.status} ${E.statusText}`);let _=await E.json(),M=_.assets??[];c.push(...M);let C=_.pagination?.total??0;if(u+=M.length,u>=C||M.length===0)break}let f=c.filter(E=>l.has(E.id)),m=n.offset??0,y=n.limit??f.length,v=f.slice(m,m+y);return{assets:v,pagination:{total:f.length,limit:v.length,offset:m}}}let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset));let o=r.toString(),i=await K(`${R}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new h(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function Rb(e,t,n,r,o){Q(t,"siteId"),o&&Q(o,"folderId");let i=ql(n);xS(i.meta.title,i.meta.size);let s=r??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let l=await K(`${R}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!l.ok)throw new h(`Failed to initiate asset upload: ${l.status} ${l.statusText}`);let c=await l.json(),u={fields:c.uploadDetails,_id:c.id,s3Url:c.hostedUrl??"",url:c.uploadUrl??"",contentType:c.contentType??"",origFileName:c.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await oo(i,u)}catch(p){throw await K(`${R}/v2/assets/${u._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),p}return{id:u._id,hostedUrl:u.s3Url,displayName:s,originalFileName:i.meta.title}}async function $b(e,t,n){Q(t,"assetId");let r=await K(`${R}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new h(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function kS(e,t){Q(t,"folderId");let n=await K(`${R}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function jb(e,t){Q(t,"siteId");let n=await K(`${R}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function Bb(e,t,n,r){Q(t,"siteId"),r&&Q(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await K(`${R}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new h(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var Pb={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function xS(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=Pb[n];if(!r){let o=Object.keys(Pb).join(", ");throw new h(`Unsupported file type ".${n}". Allowed types: ${o}`,{isUserError:!0})}if(t>r.maxBytes){let o=r.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new h(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var Uc=["id","displayName","originalFileName","contentType","size","lastUpdated"];function Nb(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return k.dim("No assets found.");let n=Object.fromEntries(Uc.map(l=>[l.toLowerCase(),l])),r=t.map(l=>n[l.toLowerCase()]).filter(l=>l!=null);if(r.length===0)return k.red(`Invalid fields. Available: ${Uc.join(", ")}`);let o=t.filter(l=>n[l.toLowerCase()]==null),i=o.length>0?k.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${Uc.join(", ")}
|
|
161
|
+
`):"",s=r.map(l=>k.bold(l)),a=e.map(l=>r.map(c=>{let u=l[c];if(u==null||c==="size"&&u===0)return k.dim("\u2014");if(c==="size")return CS(Number(u));if(c==="lastUpdated"){let f=new Date(String(u)),m=String(f.getMonth()+1).padStart(2,"0"),y=String(f.getDate()).padStart(2,"0"),v=String(f.getFullYear()).slice(-2),E=String(f.getHours()).padStart(2,"0"),_=String(f.getMinutes()).padStart(2,"0");return`${m}/${y}/${v} ${E}:${_}`}let p=String(u);return c==="displayName"&&p.length>40?k.dim("\u2026")+p.slice(-39):p}));return i+ct(s,a)}function CS(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Lb(e){if(e.length===0)return k.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>k.bold(o)),r=t.map(o=>[o.id,o.displayName,String(o.assets.length),new Date(o.lastUpdated).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})]);return ct(n,r)}var Mb=e=>{let t=e.command("assets").description("Manage Webflow site assets");t.command("list").description("List all assets for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--folder <folderId>","Filter by folder ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, originalFileName, contentType, size, lastUpdated)","id,displayName,lastUpdated,size").option("--limit <n>","Max number of assets to return (default 100)",parseInt).option("--offset <n>","Number of assets to skip",parseInt).option("--sort-by <field>","Sort by: displayName, originalFileName, contentType, size, lastUpdated","displayName").option("--order <dir>","Sort direction: asc or desc","asc").action(async r=>{let o,i;if(r.site)o=await te(),i=r.site;else{let{manifest:l}=X(),c=await ye(l);o=c.accessToken,i=c.siteId}let s=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:l,pagination:c}=await Ib(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){d.info("No assets found.");return}let u=["displayName","originalFileName","contentType","size","lastUpdated"];if(u.includes(r.sortBy)||(d.warn(`Unknown --sort-by "${r.sortBy}". Valid fields: ${u.join(", ")}. Defaulting to displayName.`),r.sortBy="displayName"),!["asc","desc"].includes(r.order))throw new h(`Invalid --order "${r.order}". Valid values: asc, desc`,{isUserError:!0});let p=us(l,r.sortBy,r.order);if(r.json){d.info(JSON.stringify({assets:p,pagination:c},null,2));return}let f=r.fields.split(",").map(y=>y.trim());d.info(Nb(p,f));let m=(r.offset??0)+l.length;m<c.total&&d.info(k.dim(`Showing ${m} of ${c.total} assets. Use --offset ${m} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new h(l,{prefix:`${U} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
|
|
162
|
+
Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(r,o)=>{if(o.dryRun){d.info(`Dry run \u2014 would upload: ${r}`),o.name&&d.info(` Display name: ${o.name}`),o.folder&&d.info(` Folder: ${o.folder}`),d.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await te(),s=o.site;else{let{manifest:c}=X(),u=await ye(c);i=u.accessToken,s=u.siteId}let a=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Rb(i,s,r,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-l,dryRun:!1}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${Y} Asset uploaded: ${c.id}`),c.hostedUrl&&d.info(` URL: ${c.hostedUrl}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_upload",{duration:Date.now()-l}),new h(c,{prefix:`${U} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(r,o)=>{if(!o.altText&&!o.displayName)throw new h("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){d.info(`Dry run \u2014 would update asset: ${r}`),o.altText&&d.info(` Alt text: ${o.altText}`),o.displayName&&d.info(` Display name: ${o.displayName}`),d.info("Dry run complete \u2014 no changes made.");return}let i=await te(),s=J.forAssets({authToken:i}),a=Date.now();try{let l=await $b(i,r,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){d.info(JSON.stringify(l,null,2));return}d.info(`${Y} Asset updated: ${l.id}`),l.displayName&&d.info(` Display name: ${l.displayName}`),l.altText&&d.info(` Alt text: ${l.altText}`)}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_update",{duration:Date.now()-a}),new h(l,{prefix:`${U} Failed to update asset:`})}});let n=t.command("folders").description("Manage asset folders");n.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async r=>{let o,i;if(r.site)o=await te(),i=r.site;else{let{manifest:l}=X(),c=await ye(l);o=c.accessToken,i=c.siteId}let s=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await jb(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:l.length}),r.json){d.info(JSON.stringify(l,null,2));return}d.info(Lb(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new h(l,{prefix:`${U} Failed to list folders:`})}}),n.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(r,o)=>{let i,s;if(o.site)i=await te(),s=o.site;else{let{manifest:c}=X(),u=await ye(c);i=u.accessToken,s=u.siteId}let a=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Bb(i,s,r,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-l}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${Y} Folder created: ${c.id}`),d.info(` Name: ${c.displayName}`),c.parentFolder&&d.info(` Parent: ${c.parentFolder}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_create",{duration:Date.now()-l}),new h(c,{prefix:`${U} Failed to create folder:`})}})};He();je();G();oe();ke();Fe();de();ft();oe();async function zb(e,t){Q(t,"siteId");let n=await K(`${R}/v2/sites/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get site: ${n.status} ${n.statusText}`);return await n.json()}async function Wb(e){let t=[],n=0,r=100;for(;;){let o=new URL(`${R}/v2/sites`);o.searchParams.set("limit",String(r)),o.searchParams.set("offset",String(n));let i=await K(o.toString(),{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new h(`Failed to list sites: ${i.status} ${i.statusText}`);let s=await i.json(),a=s.sites??[];t.push(...a);let l=s.pagination?.total??a.length;if(n+=a.length,n>=l||a.length<r)break}return t}async function Vb(e,t){Q(t,"siteId");let n=await K(`${R}/v2/sites/${t}/custom_domains`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get custom domains: ${n.status} ${n.statusText}`);return(await n.json()).customDomains??[]}async function Gb(e,t,n=[],r){Q(t,"siteId"),r&&Q(r,"pageId");let o=n.length>0?{customDomains:n}:{publishToWebflowSubdomain:!0};r&&(o.pageId=r);let i=await K(`${R}/v2/sites/${t}/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new h(`Failed to publish site: ${i.status} ${i.statusText}`);return await i.json()}var zc=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],Ub=Object.fromEntries(zc.map(e=>[e.toLowerCase(),e]));function qb(e,t=["id","displayName","lastPublished"],{warn:n}={}){if(e.length===0)return k.dim("No sites found.");let r=t.map(a=>Ub[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>Ub[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${zc.join(", ")}`),r.length===0)throw new h(`No valid fields specified. Available: ${zc.join(", ")}`,{isUserError:!0});let i=r.map(a=>k.bold(a)),s=e.map(a=>r.map(l=>{let c=a[l];return c?l==="lastPublished"||l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:k.dim("\u2014")}));return ct(i,s)}function Jb(e){if(e.length===0)return k.dim("No custom domains configured.");let t=[k.bold("id"),k.bold("url"),k.bold("lastPublished")],n=e.map(r=>[r.id,r.url,r.lastPublished?new Date(r.lastPublished).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):k.dim("\u2014")]);return ct(t,n)}var Hb=e=>{let t=e.command("sites").description("Manage Webflow sites");t.command("list").description("List all sites in your Webflow workspace").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, shortName, lastPublished, lastUpdated, timeZone)","id,displayName,lastPublished").action(async n=>{let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=await Wb(r);if(await o.sendUsage("sites_list",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}let a=n.fields.split(",").map(l=>l.trim());d.info(qb(s,a,{warn:l=>d.warn(l)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_list",{duration:Date.now()-i}),new h(s,{prefix:`${U} Failed to list sites:`})}}),t.command("get").description("Get details for a specific site").argument("<siteId>","Site ID").option("--json","Output as JSON").action(async(n,r)=>{let o=await te(),i=J.forSites({authToken:o}),s=Date.now();try{let a=await zb(o,n);if(await i.sendUsage("sites_get",{duration:Date.now()-s}),r.json){d.info(JSON.stringify(a,null,2));return}d.info(`${a.displayName} (${a.id})`),d.info(` Short name: ${a.shortName}`),d.info(` Time zone: ${a.timeZone}`),a.lastPublished&&d.info(` Published: ${new Date(a.lastPublished).toLocaleString()}`),a.previewUrl&&d.info(` Preview: ${a.previewUrl}`)}catch(a){throw await i.sendError(a instanceof Error?a:new Error(String(a)),"sites_get",{duration:Date.now()-s}),new h(a,{prefix:`${U} Failed to get site:`})}}),t.command("domains").description("List custom domains configured for a site").requiredOption("--site <siteId>","Site ID").option("--json","Output as JSON").action(async n=>{let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=await Vb(r,n.site);if(await o.sendUsage("sites_domains",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}d.info(Jb(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_domains",{duration:Date.now()-i}),new h(s,{prefix:`${U} Failed to get custom domains:`})}}),t.command("publish").description("Publish a Webflow site (defaults to Webflow subdomain)").requiredOption("--site <siteId>","Site ID to publish").option("--domains <domains>","Comma-separated custom domain IDs to publish to").option("--page <pageId>","Publish a single page instead of the whole site").option("--dry-run","Preview what would be published without publishing").option("--json","Output as JSON").action(async n=>{if(Q(n.site,"siteId"),n.dryRun){d.info(`Would publish ${n.page?`page ${n.page} on`:"site"} ${n.site}`),n.domains?d.info(` Custom domains: ${n.domains}`):d.info(" Domains: Webflow subdomain");return}let r=await te(),o=J.forSites({authToken:r}),i=Date.now();try{let s=n.domains?n.domains.split(",").map(u=>u.trim()):[],a=await Gb(r,n.site,s,n.page);if(await o.sendUsage("sites_publish",{duration:Date.now()-i,dryRun:!1,publishScope:a.publishScope}),n.json){d.info(JSON.stringify(a,null,2));return}let l=a.publishScope==="page"?"Page":"Site";d.info(`${Y} ${l} published successfully`);let c=a.customDomains??[];c.length>0?c.forEach(u=>{let p=u.lastPublished?` (${new Date(u.lastPublished).toLocaleString()})`:"";d.info(` Live at: https://${u.url}${p}`)}):a.publishToWebflowSubdomain&&d.info(" Published to Webflow subdomain")}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_publish",{duration:Date.now()-i}),new h(s,{prefix:`${U} Failed to publish site:`})}})};var Zb=w(Oo());function Wc(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>Wc(n,t))}function Kb(e){let t=Zb.default.version;e.name("webflow").description("Webflow CLI").version(t,"-v, --version").addOption(mc).addOption(hc).addOption(gc).addOption(yc).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||Mu(!0),mt.start(),r.manifest&&Uu(r.manifest);try{await J.promptForConsentIfNeeded()}catch(o){d.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new Br().prompt()}catch(o){d.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{mt.displayGrouped(),mt.stop()}),Fd(e),Ob(e),np(e),yy(e),gb(e),gy(e),Mb(e),Hb(e),dy(e),e.commands.forEach(n=>{Wc(n,[mc,hc,gc,yc])})}G();oe();var Xb=new Yb.Command;Kb(Xb);Xb.parseAsync().catch(e=>{if(e instanceof h){if(!e.skipLogging)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else d.error(e,{prefix:e.prefix})}else d.error(e);process.exit(1)});
|
|
162
163
|
//# sourceMappingURL=index.js.map
|