@1agh/maude 1.0.6 → 1.0.8
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/apps/studio/bin/_html-playwright.mjs +198 -19
- package/apps/studio/bin/_pdf-playwright.mjs +1 -0
- package/apps/studio/bin/_png-playwright.mjs +28 -8
- package/apps/studio/bin/_pptx-playwright.mjs +4 -1
- package/apps/studio/bin/_pw-launch.mjs +48 -0
- package/apps/studio/bin/_svg-playwright.mjs +63 -149
- package/apps/studio/bin/_video-playwright.mjs +123 -11
- package/apps/studio/canvas-edit.ts +33 -0
- package/apps/studio/canvas-lib.tsx +136 -0
- package/apps/studio/client/app.jsx +316 -28
- package/apps/studio/client/export-lane.js +191 -0
- package/apps/studio/dist/client.bundle.js +907 -907
- package/apps/studio/dist/runtime/.min-sizes.json +2 -1
- package/apps/studio/dist/runtime/dom-to-svg.js +31 -0
- package/apps/studio/export-dialog.tsx +24 -19
- package/apps/studio/exporters/_browser-bundles.ts +30 -0
- package/apps/studio/exporters/_runtime.ts +31 -1
- package/apps/studio/exporters/capture-chrome.ts +111 -0
- package/apps/studio/exporters/capture-core.ts +947 -0
- package/apps/studio/exporters/format-scopes.ts +88 -0
- package/apps/studio/exporters/html.ts +3 -2
- package/apps/studio/exporters/jobs.ts +180 -18
- package/apps/studio/exporters/pdf.ts +21 -1
- package/apps/studio/exporters/pptx.ts +46 -11
- package/apps/studio/exporters/remote.ts +94 -11
- package/apps/studio/exporters/scope.ts +14 -3
- package/apps/studio/exporters/svg.ts +17 -3
- package/apps/studio/exporters/video.ts +75 -8
- package/apps/studio/http.ts +175 -7
- package/apps/studio/runtime-bundle.ts +6 -0
- package/apps/studio/test/canvas-hide-chrome.test.ts +30 -0
- package/apps/studio/test/capture-core.test.ts +32 -0
- package/apps/studio/test/export-assemble.test.ts +53 -0
- package/apps/studio/test/export-browser-lane.test.ts +126 -0
- package/apps/studio/test/export-capture-fidelity.test.ts +146 -0
- package/apps/studio/test/export-capture-hygiene.test.ts +675 -0
- package/apps/studio/test/export-e2e-lanes.test.ts +857 -0
- package/apps/studio/test/export-format-scope-coherence.test.ts +89 -0
- package/apps/studio/test/exporters/jobs.test.ts +73 -0
- package/apps/studio/test/exporters/scope.test.ts +33 -0
- package/apps/studio/test/fixtures/tiny-subset.woff2 +0 -0
- package/apps/studio/test/pdf-print-boxes.test.ts +33 -0
- package/apps/studio/test/photo-canvas-bundle.test.ts +18 -0
- package/apps/studio/test/workspace-containment.test.ts +8 -0
- package/apps/studio/whats-new.json +18 -0
- package/apps/studio/workspace-mode.ts +15 -2
- package/package.json +8 -8
- package/plugins/design/templates/_shell.html +2 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var W0=Object.create;var{getPrototypeOf:X0,defineProperty:Ff,getOwnPropertyNames:Ni,getOwnPropertyDescriptor:F0}=Object,ji=Object.prototype.hasOwnProperty;var Cf=(f,h,i)=>{i=f!=null?W0(X0(f)):{};let r=h||!f||!f.__esModule?Ff(i,"default",{value:f,enumerable:!0}):i;for(let O of Ni(f))if(!ji.call(r,O))Ff(r,O,{get:()=>f[O],enumerable:!0});return r},_i=new WeakMap,If=(f)=>{var h=_i.get(f),i;if(h)return h;if(h=Ff({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function")Ni(f).map((r)=>!ji.call(h,r)&&Ff(h,r,{get:()=>f[r],enumerable:!(i=F0(f,r))||i.enumerable}));return _i.set(f,h),h},V=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Sh=(f,h)=>{for(var i in h)Ff(f,i,{get:h[i],enumerable:!0,configurable:!0,set:(r)=>h[i]=()=>r})};var Pi=(f,h)=>()=>(f&&(h=f(f=0)),h);var $f=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(h,i)=>(typeof require<"u"?require:h)[i]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});var Si=V((Pw,Rh)=>{var I=String,Ti=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};Rh.exports=Ti();Rh.exports.createColors=Ti});var cf=V((Tw,gi)=>{var Ri=Si(),ui=(()=>({}));class Df extends Error{constructor(f,h,i,r,O,w){super(f);if(this.name="CssSyntaxError",this.reason=f,O)this.file=O;if(r)this.source=r;if(w)this.plugin=w;if(typeof h<"u"&&typeof i<"u")if(typeof h==="number")this.line=h,this.column=i;else this.line=h.line,this.column=h.column,this.endLine=i.line,this.endColumn=i.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,Df)}setMessage(){if(this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u")this.message+=":"+this.line+":"+this.column;this.message+=": "+this.reason}showSourceCode(f){if(!this.source)return"";let h=this.source;if(f==null)f=Ri.isColorSupported;let i=($)=>$,r=($)=>$,O=($)=>$;if(f){let{bold:$,gray:B,red:U}=Ri.createColors(!0);if(r=(M)=>$(U(M)),i=(M)=>B(M),ui)O=(M)=>ui(M)}let w=h.split(/\r?\n/),q=Math.max(this.line-3,0),A=Math.min(this.line+2,w.length),E=String(A).length;return w.slice(q,A).map(($,B)=>{let U=q+1+B,M=" "+(" "+U).slice(-E)+" | ";if(U===this.line){if($.length>160){let X=20,Y=Math.max(0,this.column-X),J=Math.max(this.column+X,this.endColumn+X),G=$.slice(Y,J),Z=i(M.replace(/\d/g," "))+$.slice(0,Math.min(this.column-1,X-1)).replace(/[^\t]/g," ");return r(">")+i(M)+O(G)+`
|
|
2
|
+
`+Z+r("^")}let K=i(M.replace(/\d/g," "))+$.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(M)+O($)+`
|
|
3
|
+
`+K+r("^")}return" "+i(M)+O($)}).join(`
|
|
4
|
+
`)}toString(){let f=this.showSourceCode();if(f)f=`
|
|
5
|
+
|
|
6
|
+
`+f+`
|
|
7
|
+
`;return this.name+": "+this.message+f}}gi.exports=Df;Df.default=Df});var uh=V((Sw,yi)=>{var C0=/(<)(\/?style\b)/gi,I0=/(<)(!--)/g;function e(f){if(typeof f!=="string")return f;if(!f.includes("<"))return f;return f.replace(C0,"\\3c $2").replace(I0,"\\3c $2")}var xi={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function D0(f){return f[0].toUpperCase()+f.slice(1)}class pf{constructor(f){this.builder=f}atrule(f,h){let i=f.raws,r="@"+f.name,O=f.params?this.rawValue(f,"params"):"";if(typeof i.afterName<"u")r+=i.afterName;else if(O)r+=" ";if(f.nodes)this.block(f,r+O);else{let w=(i.between||"")+(h?";":"");this.builder(e(r+O+w),f)}}beforeAfter(f,h){let i;if(f.type==="decl")i=this.raw(f,null,"beforeDecl");else if(f.type==="comment")i=this.raw(f,null,"beforeComment");else if(h==="before")i=this.raw(f,null,"beforeRule");else i=this.raw(f,null,"beforeClose");let r=f.parent,O=0;while(r&&r.type!=="root")O+=1,r=r.parent;if(i.includes(`
|
|
13
|
+
`)){let w=this.raw(f,null,"indent");if(w.length)for(let q=0;q<O;q++)i+=w}return i}block(f,h){let i=this.raw(f,"between","beforeOpen");this.builder(e(h+i)+"{",f,"start");let r;if(f.nodes&&f.nodes.length)this.body(f),r=this.raw(f,"after");else r=this.raw(f,"after","emptyBody");if(r)this.builder(e(r));this.builder("}",f,"end")}body(f){let h=f.nodes,i=h.length-1;while(i>0){if(h[i].type!=="comment")break;i-=1}let r=this.raw(f,"semicolon"),O=f.type==="document";for(let w=0;w<h.length;w++){let q=h[w],A=this.raw(q,"before");if(A)this.builder(O?A:e(A));this.stringify(q,i!==w||r)}}comment(f){let h=this.raw(f,"left","commentLeft"),i=this.raw(f,"right","commentRight");this.builder(e("/*"+h+f.text+i+"*/"),f)}decl(f,h){let i=f.raws,r=this.raw(f,"between","colon"),O=f.prop+r+this.rawValue(f,"value");if(f.important)O+=i.important||" !important";if(h)O+=";";this.builder(e(O),f)}document(f){this.body(f)}raw(f,h,i){let r;if(!i)i=h;if(h){if(r=f.raws[h],typeof r<"u")return r}let O=f.parent;if(i==="before"){if(!O||O.type==="root"&&O.first===f)return"";if(O&&O.type==="document")return""}if(!O)return xi[i];let w=f.root(),q=w.rawCache||(w.rawCache={});if(typeof q[i]<"u")return q[i];if(i==="before"||i==="after")return this.beforeAfter(f,i);else{let A="raw"+D0(i);if(this[A])r=this[A](w,f);else w.walk((E)=>{if(r=E.raws[h],typeof r<"u")return!1})}if(typeof r>"u")r=xi[i];return q[i]=r,r}rawBeforeClose(f){let h;if(f.walk((i)=>{if(i.nodes&&i.nodes.length>0){if(typeof i.raws.after<"u"){if(h=i.raws.after,h.includes(`
|
|
14
|
+
`))h=h.replace(/[^\n]+$/,"");return!1}}}),h)h=h.replace(/\S/g,"");return h}rawBeforeComment(f,h){let i;if(f.walkComments((r)=>{if(typeof r.raws.before<"u"){if(i=r.raws.before,i.includes(`
|
|
15
|
+
`))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(h,null,"beforeDecl");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeDecl(f,h){let i;if(f.walkDecls((r)=>{if(typeof r.raws.before<"u"){if(i=r.raws.before,i.includes(`
|
|
16
|
+
`))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(h,null,"beforeRule");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeOpen(f){let h;return f.walk((i)=>{if(i.type!=="decl"){if(h=i.raws.between,typeof h<"u")return!1}}),h}rawBeforeRule(f){let h;if(f.walk((i)=>{if(i.nodes&&(i.parent!==f||f.first!==i)){if(typeof i.raws.before<"u"){if(h=i.raws.before,h.includes(`
|
|
17
|
+
`))h=h.replace(/[^\n]+$/,"");return!1}}}),h)h=h.replace(/\S/g,"");return h}rawColon(f){let h;return f.walkDecls((i)=>{if(typeof i.raws.between<"u")return h=i.raws.between.replace(/[^\s:]/g,""),!1}),h}rawEmptyBody(f){let h;return f.walk((i)=>{if(i.nodes&&i.nodes.length===0){if(h=i.raws.after,typeof h<"u")return!1}}),h}rawIndent(f){if(f.raws.indent)return f.raws.indent;let h;return f.walk((i)=>{let r=i.parent;if(r&&r!==f&&r.parent&&r.parent===f){if(typeof i.raws.before<"u"){let O=i.raws.before.split(`
|
|
18
|
+
`);return h=O[O.length-1],h=h.replace(/\S/g,""),!1}}}),h}rawSemicolon(f){let h;return f.walk((i)=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"){if(h=i.raws.semicolon,typeof h<"u")return!1}}),h}rawValue(f,h){let i=f[h],r=f.raws[h];if(r&&r.value===i)return r.raw;return i}root(f){if(this.body(f),f.raws.after){let h=f.raws.after,i=f.parent&&f.parent.type==="document";this.builder(i?h:e(h))}}rule(f){if(this.block(f,this.rawValue(f,"selector")),f.raws.ownSemicolon)this.builder(e(f.raws.ownSemicolon),f,"end")}stringify(f,h){if(!this[f.type])throw Error("Unknown AST node type "+f.type+". Maybe you need to change PostCSS stringifier.");this[f.type](f,h)}}yi.exports=pf;pf.default=pf});var zf=V((Rw,mi)=>{var z0=uh();function gh(f,h){new z0(h).stringify(f)}mi.exports=gh;gh.default=gh});var kf=V((H0,xh)=>{H0.isClean=Symbol("isClean");H0.my=Symbol("my")});var Vf=V((uw,vi)=>{var L0=cf(),_0=uh(),N0=zf(),{isClean:Hf,my:j0}=kf();function yh(f,h){let i=new f.constructor;for(let r in f){if(!Object.prototype.hasOwnProperty.call(f,r))continue;if(r==="proxyCache")continue;let O=f[r],w=typeof O;if(r==="parent"&&w==="object"){if(h)i[r]=h}else if(r==="source")i[r]=O;else if(Array.isArray(O))i[r]=O.map((q)=>yh(q,i));else{if(w==="object"&&O!==null)O=yh(O);i[r]=O}}return i}function a(f,h){if(h&&typeof h.offset<"u")return h.offset;let i=1,r=1,O=0;for(let w=0;w<f.length;w++){if(r===h.line&&i===h.column){O=w;break}if(f[w]===`
|
|
19
|
+
`)i=1,r+=1;else i+=1}return O}class lf{get proxyOf(){return this}constructor(f={}){this.raws={},this[Hf]=!1,this[j0]=!0;for(let h in f)if(h==="nodes"){this.nodes=[];for(let i of f[h])if(typeof i.clone==="function")this.append(i.clone());else this.append(i)}else this[h]=f[h]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let h=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let h in f)this[h]=f[h];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){if(delete this.raws.before,delete this.raws.after,!f)delete this.raws.between}clone(f={}){let h=yh(this);for(let i in f)h[i]=f[i];return h}cloneAfter(f={}){let h=this.clone(f);return this.parent.insertAfter(this,h),h}cloneBefore(f={}){let h=this.clone(f);return this.parent.insertBefore(this,h),h}error(f,h={}){if(this.source){let{end:i,start:r}=this.rangeBy(h);return this.source.input.error(f,{column:r.column,line:r.line},{column:i.column,line:i.line},h)}return new L0(f)}getProxyProcessor(){return{get(f,h){if(h==="proxyOf")return f;else if(h==="root")return()=>f.root().toProxy();else return f[h]},set(f,h,i){if(f[h]===i)return!0;if(f[h]=i,h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")f.markDirty();return!0}}}markClean(){this[Hf]=!0}markDirty(){if(this[Hf]){this[Hf]=!1;let f=this;while(f=f.parent)f[Hf]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f={}){let h=this.source.start;if(f.index)h=this.positionInside(f.index);else if(f.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,O=i.slice(a(i,this.source.start),a(i,this.source.end)).indexOf(f.word);if(O!==-1)h=this.positionInside(O)}return h}positionInside(f){let h=this.source.start.column,i=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,O=a(r,this.source.start),w=O+f;for(let q=O;q<w;q++)if(r[q]===`
|
|
20
|
+
`)h=1,i+=1;else h+=1;return{column:h,line:i,offset:w}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:a(h,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset==="number"?this.source.end.offset:a(h,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(f.word){let w=h.slice(a(h,this.source.start),a(h,this.source.end)).indexOf(f.word);if(w!==-1)i=this.positionInside(w),r=this.positionInside(w+f.word.length)}else{if(f.start)i={column:f.start.column,line:f.start.line,offset:a(h,f.start)};else if(f.index)i=this.positionInside(f.index);if(f.end)r={column:f.end.column,line:f.end.line,offset:a(h,f.end)};else if(typeof f.endIndex==="number")r=this.positionInside(f.endIndex);else if(f.index)r=this.positionInside(f.index+1)}if(r.line<i.line||r.line===i.line&&r.column<=i.column)r={column:i.column+1,line:i.line,offset:i.offset+1};return{end:r,start:i}}raw(f,h){return new _0().raw(this,f,h)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...f){if(this.parent){let h=this,i=!1;for(let r of f)if(r===this)i=!0;else if(i)this.parent.insertAfter(h,r),h=r;else this.parent.insertBefore(h,r);if(!i)this.remove()}return this}root(){let f=this;while(f.parent&&f.parent.type!=="document")f=f.parent;return f}toJSON(f,h){let i={},r=h==null;h=h||new Map;let O=0;for(let w in this){if(!Object.prototype.hasOwnProperty.call(this,w))continue;if(w==="parent"||w==="proxyCache")continue;let q=this[w];if(Array.isArray(q))i[w]=q.map((A)=>{if(typeof A==="object"&&A.toJSON)return A.toJSON(null,h);else return A});else if(typeof q==="object"&&q.toJSON)i[w]=q.toJSON(null,h);else if(w==="source"){if(q==null)continue;let A=h.get(q.input);if(A==null)A=O,h.set(q.input,O),O++;i[w]={end:q.end,inputId:A,start:q.start}}else i[w]=q}if(r)i.inputs=[...h.keys()].map((w)=>w.toJSON());return i}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(f=N0){if(f.stringify)f=f.stringify;let h="";return f(this,(i)=>{h+=i}),h}warn(f,h,i={}){let r={node:this};for(let O in i)r[O]=i[O];return f.warn(h,r)}}vi.exports=lf;lf.default=lf});var Gf=V((gw,bi)=>{var P0=Vf();class sf extends P0{constructor(f){super(f);this.type="comment"}}bi.exports=sf;sf.default=sf});var Lf=V((xw,ci)=>{var T0=Vf();class af extends T0{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(f){if(f&&typeof f.value<"u"&&typeof f.value!=="string")f={...f,value:String(f.value)};super(f);this.type="decl"}}ci.exports=af;af.default=af});var ff=V((yw,oi)=>{var pi=Gf(),ki=Lf(),S0=Vf(),{isClean:li,my:si}=kf(),mh,ai,di,vh;function ti(f){return f.map((h)=>{if(h.nodes)h.nodes=ti(h.nodes);return delete h.source,h})}function ni(f){if(f[li]=!1,f.proxyOf.nodes)for(let h of f.proxyOf.nodes)ni(h)}class c extends S0{get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...f){for(let h of f){let i=this.normalize(h,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let h of this.nodes)h.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let h=this.getIterator(),i,r;while(this.indexes[h]<this.proxyOf.nodes.length){if(i=this.indexes[h],r=f(this.proxyOf.nodes[i],i),r===!1)break;this.indexes[h]+=1}return delete this.indexes[h],r}every(f){return this.nodes.every(f)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,h){if(h==="proxyOf")return f;else if(!f[h])return f[h];else if(h==="each"||typeof h==="string"&&h.startsWith("walk"))return(...i)=>{return f[h](...i.map((r)=>{if(typeof r==="function")return(O,w)=>r(O.toProxy(),w);else return r}))};else if(h==="every"||h==="some")return(i)=>{return f[h]((r,...O)=>i(r.toProxy(),...O))};else if(h==="root")return()=>f.root().toProxy();else if(h==="nodes")return f.nodes.map((i)=>i.toProxy());else if(h==="first"||h==="last")return f[h].toProxy();else return f[h]},set(f,h,i){if(f[h]===i)return!0;if(f[h]=i,h==="name"||h==="params"||h==="selector")f.markDirty();return!0}}}index(f){if(typeof f==="number")return f;if(f.proxyOf)f=f.proxyOf;return this.proxyOf.nodes.indexOf(f)}insertAfter(f,h){let i=this.index(f),r=this.normalize(h,this.proxyOf.nodes[i]).reverse();i=this.index(f);for(let w of r)this.proxyOf.nodes.splice(i+1,0,w);let O;for(let w in this.indexes)if(O=this.indexes[w],i<O)this.indexes[w]=O+r.length;return this.markDirty(),this}insertBefore(f,h){let i=this.index(f),r=i===0?"prepend":!1,O=this.normalize(h,this.proxyOf.nodes[i],r).reverse();i=this.index(f);for(let q of O)this.proxyOf.nodes.splice(i,0,q);let w;for(let q in this.indexes)if(w=this.indexes[q],i<=w)this.indexes[q]=w+O.length;return this.markDirty(),this}normalize(f,h){if(typeof f==="string")f=ti(ai(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let r of f)if(r.parent)r.parent.removeChild(r,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let r of f)if(r.parent)r.parent.removeChild(r,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw Error("Value field is missed in node creation");else if(typeof f.value!=="string")f.value=String(f.value);f=[new ki(f)]}else if(f.selector||f.selectors)f=[new vh(f)];else if(f.name)f=[new mh(f)];else if(f.text)f=[new pi(f)];else throw Error("Unknown node type in node creation");return f.map((r)=>{if(!r[si])c.rebuild(r);if(r=r.proxyOf,r.parent)r.parent.removeChild(r);if(r[li])ni(r);if(!r.raws)r.raws={};if(typeof r.raws.before>"u"){if(h&&typeof h.raws.before<"u")r.raws.before=h.raws.before.replace(/\S/g,"")}return r.parent=this.proxyOf,r})}prepend(...f){f=f.reverse();for(let h of f){let i=this.normalize(h,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let h;for(let i in this.indexes)if(h=this.indexes[i],h>=f)this.indexes[i]=h-1;return this.markDirty(),this}replaceValues(f,h,i){if(!i)i=h,h={};return this.walkDecls((r)=>{if(h.props&&!h.props.includes(r.prop))return;if(h.fast&&!r.value.includes(h.fast))return;r.value=r.value.replace(f,i)}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((h,i)=>{let r;try{r=f(h,i)}catch(O){throw h.addToError(O)}if(r!==!1&&h.walk)r=h.walk(f);return r})}walkAtRules(f,h){if(!h)return h=f,this.walk((i,r)=>{if(i.type==="atrule")return h(i,r)});if(f instanceof RegExp)return this.walk((i,r)=>{if(i.type==="atrule"&&f.test(i.name))return h(i,r)});return this.walk((i,r)=>{if(i.type==="atrule"&&i.name===f)return h(i,r)})}walkComments(f){return this.walk((h,i)=>{if(h.type==="comment")return f(h,i)})}walkDecls(f,h){if(!h)return h=f,this.walk((i,r)=>{if(i.type==="decl")return h(i,r)});if(f instanceof RegExp)return this.walk((i,r)=>{if(i.type==="decl"&&f.test(i.prop))return h(i,r)});return this.walk((i,r)=>{if(i.type==="decl"&&i.prop===f)return h(i,r)})}walkRules(f,h){if(!h)return h=f,this.walk((i,r)=>{if(i.type==="rule")return h(i,r)});if(f instanceof RegExp)return this.walk((i,r)=>{if(i.type==="rule"&&f.test(i.selector))return h(i,r)});return this.walk((i,r)=>{if(i.type==="rule"&&i.selector===f)return h(i,r)})}}c.registerParse=(f)=>{ai=f};c.registerRule=(f)=>{vh=f};c.registerAtRule=(f)=>{mh=f};c.registerRoot=(f)=>{di=f};oi.exports=c;c.default=c;c.rebuild=(f)=>{if(f.type==="atrule")Object.setPrototypeOf(f,mh.prototype);else if(f.type==="rule")Object.setPrototypeOf(f,vh.prototype);else if(f.type==="decl")Object.setPrototypeOf(f,ki.prototype);else if(f.type==="comment")Object.setPrototypeOf(f,pi.prototype);else if(f.type==="root")Object.setPrototypeOf(f,di.prototype);if(f[si]=!0,f.nodes)f.nodes.forEach((h)=>{c.rebuild(h)})}});var df=V((mw,fr)=>{var ei=ff();class _f extends ei{constructor(f){super(f);this.type="atrule"}append(...f){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...f)}prepend(...f){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...f)}}fr.exports=_f;_f.default=_f;ei.registerAtRule(_f)});var tf=V((vw,rr)=>{var R0=ff(),hr,ir;class Bf extends R0{constructor(f){super({type:"document",...f});if(!this.nodes)this.nodes=[]}toResult(f={}){return new hr(new ir,this,f).stringify()}}Bf.registerLazyResult=(f)=>{hr=f};Bf.registerProcessor=(f)=>{ir=f};rr.exports=Bf;Bf.default=Bf});var wr=V((bw,Or)=>{var u0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",g0=(f,h=21)=>{return(i=h)=>{let r="",O=i|0;while(O--)r+=f[Math.random()*f.length|0];return r}},x0=(f=21)=>{let h="",i=f|0;while(i--)h+=u0[Math.random()*64|0];return h};Or.exports={nanoid:x0,customAlphabet:g0}});var of={};Sh(of,{sep:()=>Zr,resolve:()=>nf,relative:()=>Ur,posix:()=>Wr,parse:()=>Qr,normalize:()=>bh,join:()=>Er,isAbsolute:()=>Ar,format:()=>Kr,extname:()=>Jr,dirname:()=>Br,delimiter:()=>Yr,default:()=>m0,basename:()=>Mr,_makeLong:()=>$r});function k(f){if(typeof f!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(f))}function qr(f,h){var i="",r=0,O=-1,w=0,q;for(var A=0;A<=f.length;++A){if(A<f.length)q=f.charCodeAt(A);else if(q===47)break;else q=47;if(q===47){if(O===A-1||w===1);else if(O!==A-1&&w===2){if(i.length<2||r!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var E=i.lastIndexOf("/");if(E!==i.length-1){if(E===-1)i="",r=0;else i=i.slice(0,E),r=i.length-1-i.lastIndexOf("/");O=A,w=0;continue}}else if(i.length===2||i.length===1){i="",r=0,O=A,w=0;continue}}if(h){if(i.length>0)i+="/..";else i="..";r=2}}else{if(i.length>0)i+="/"+f.slice(O+1,A);else i=f.slice(O+1,A);r=A-O-1}O=A,w=0}else if(q===46&&w!==-1)++w;else w=-1}return i}function y0(f,h){var i=h.dir||h.root,r=h.base||(h.name||"")+(h.ext||"");if(!i)return r;if(i===h.root)return i+r;return i+f+r}function nf(){var f="",h=!1,i;for(var r=arguments.length-1;r>=-1&&!h;r--){var O;if(r>=0)O=arguments[r];else{if(i===void 0)i=process.cwd();O=i}if(k(O),O.length===0)continue;f=O+"/"+f,h=O.charCodeAt(0)===47}if(f=qr(f,!h),h)if(f.length>0)return"/"+f;else return"/";else if(f.length>0)return f;else return"."}function bh(f){if(k(f),f.length===0)return".";var h=f.charCodeAt(0)===47,i=f.charCodeAt(f.length-1)===47;if(f=qr(f,!h),f.length===0&&!h)f=".";if(f.length>0&&i)f+="/";if(h)return"/"+f;return f}function Ar(f){return k(f),f.length>0&&f.charCodeAt(0)===47}function Er(){if(arguments.length===0)return".";var f;for(var h=0;h<arguments.length;++h){var i=arguments[h];if(k(i),i.length>0)if(f===void 0)f=i;else f+="/"+i}if(f===void 0)return".";return bh(f)}function Ur(f,h){if(k(f),k(h),f===h)return"";if(f=nf(f),h=nf(h),f===h)return"";var i=1;for(;i<f.length;++i)if(f.charCodeAt(i)!==47)break;var r=f.length,O=r-i,w=1;for(;w<h.length;++w)if(h.charCodeAt(w)!==47)break;var q=h.length,A=q-w,E=O<A?O:A,$=-1,B=0;for(;B<=E;++B){if(B===E){if(A>E){if(h.charCodeAt(w+B)===47)return h.slice(w+B+1);else if(B===0)return h.slice(w+B)}else if(O>E){if(f.charCodeAt(i+B)===47)$=B;else if(B===0)$=0}break}var U=f.charCodeAt(i+B),M=h.charCodeAt(w+B);if(U!==M)break;else if(U===47)$=B}var K="";for(B=i+$+1;B<=r;++B)if(B===r||f.charCodeAt(B)===47)if(K.length===0)K+="..";else K+="/..";if(K.length>0)return K+h.slice(w+$);else{if(w+=$,h.charCodeAt(w)===47)++w;return h.slice(w)}}function $r(f){return f}function Br(f){if(k(f),f.length===0)return".";var h=f.charCodeAt(0),i=h===47,r=-1,O=!0;for(var w=f.length-1;w>=1;--w)if(h=f.charCodeAt(w),h===47){if(!O){r=w;break}}else O=!1;if(r===-1)return i?"/":".";if(i&&r===1)return"//";return f.slice(0,r)}function Mr(f,h){if(h!==void 0&&typeof h!=="string")throw TypeError('"ext" argument must be a string');k(f);var i=0,r=-1,O=!0,w;if(h!==void 0&&h.length>0&&h.length<=f.length){if(h.length===f.length&&h===f)return"";var q=h.length-1,A=-1;for(w=f.length-1;w>=0;--w){var E=f.charCodeAt(w);if(E===47){if(!O){i=w+1;break}}else{if(A===-1)O=!1,A=w+1;if(q>=0)if(E===h.charCodeAt(q)){if(--q===-1)r=w}else q=-1,r=A}}if(i===r)r=A;else if(r===-1)r=f.length;return f.slice(i,r)}else{for(w=f.length-1;w>=0;--w)if(f.charCodeAt(w)===47){if(!O){i=w+1;break}}else if(r===-1)O=!1,r=w+1;if(r===-1)return"";return f.slice(i,r)}}function Jr(f){k(f);var h=-1,i=0,r=-1,O=!0,w=0;for(var q=f.length-1;q>=0;--q){var A=f.charCodeAt(q);if(A===47){if(!O){i=q+1;break}continue}if(r===-1)O=!1,r=q+1;if(A===46){if(h===-1)h=q;else if(w!==1)w=1}else if(h!==-1)w=-1}if(h===-1||r===-1||w===0||w===1&&h===r-1&&h===i+1)return"";return f.slice(h,r)}function Kr(f){if(f===null||typeof f!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof f);return y0("/",f)}function Qr(f){k(f);var h={root:"",dir:"",base:"",ext:"",name:""};if(f.length===0)return h;var i=f.charCodeAt(0),r=i===47,O;if(r)h.root="/",O=1;else O=0;var w=-1,q=0,A=-1,E=!0,$=f.length-1,B=0;for(;$>=O;--$){if(i=f.charCodeAt($),i===47){if(!E){q=$+1;break}continue}if(A===-1)E=!1,A=$+1;if(i===46){if(w===-1)w=$;else if(B!==1)B=1}else if(w!==-1)B=-1}if(w===-1||A===-1||B===0||B===1&&w===A-1&&w===q+1){if(A!==-1)if(q===0&&r)h.base=h.name=f.slice(1,A);else h.base=h.name=f.slice(q,A)}else{if(q===0&&r)h.name=f.slice(1,w),h.base=f.slice(1,A);else h.name=f.slice(q,w),h.base=f.slice(q,A);h.ext=f.slice(w,A)}if(q>0)h.dir=f.slice(0,q-1);else if(r)h.dir="/";return h}var Zr="/",Yr=":",Wr,m0;var ef=Pi(()=>{Wr=((f)=>(f.posix=f,f))({resolve:nf,normalize:bh,isAbsolute:Ar,join:Er,relative:Ur,_makeLong:$r,dirname:Br,basename:Mr,extname:Jr,format:Kr,parse:Qr,sep:Zr,delimiter:Yr,win32:null,posix:null}),m0=Wr});var ah={};Sh(ah,{resolveObject:()=>Vr,resolve:()=>Hr,parse:()=>Jf,format:()=>zr,default:()=>t0,Url:()=>b,URLSearchParams:()=>Ir,URL:()=>lh});function sh(f){return typeof f==="string"}function Dr(f){return typeof f==="object"&&f!==null}function fh(f){return f===null}function v0(f){return f==null}function b(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Jf(f,h,i){if(f&&Dr(f)&&f instanceof b)return f;var r=new b;return r.parse(f,h,i),r}function zr(f){if(sh(f))f=Jf(f);if(!(f instanceof b))return b.prototype.format.call(f);return f.format()}function Hr(f,h){return Jf(f,!1,!0).resolve(h)}function Vr(f,h){if(!f)return h;return Jf(f,!1,!0).resolveObject(h)}var lh,Ir,b0,c0,p0,k0,l0,ch,Xr,Fr,s0=255,Cr,a0,d0,ph,Mf,kh,t0;var dh=Pi(()=>{({URL:lh,URLSearchParams:Ir}=globalThis);b0=/^([a-z0-9.+-]+:)/i,c0=/:[0-9]*$/,p0=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,k0=["<",">",'"',"`"," ","\r",`
|
|
21
|
+
`,"\t"],l0=["{","}","|","\\","^","`"].concat(k0),ch=["'"].concat(l0),Xr=["%","/","?",";","#"].concat(ch),Fr=["/","?","#"],Cr=/^[+a-z0-9A-Z_-]{0,63}$/,a0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d0={javascript:!0,"javascript:":!0},ph={javascript:!0,"javascript:":!0},Mf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},kh={parse(f){var h=decodeURIComponent;return(f+"").replace(/\+/g," ").split("&").filter(Boolean).reduce(function(i,r,O){var w=r.split("="),q=h(w[0]||""),A=h(w[1]||""),E=i[q];return i[q]=E===void 0?A:[].concat(E,A),i},{})},stringify(f){var h=encodeURIComponent;return Object.keys(f||{}).reduce(function(i,r){return[].concat(f[r]).forEach(function(O){i.push(h(r)+"="+h(O))}),i},[]).join("&").replace(/\s/g,"+")}};b.prototype.parse=function(f,h,i){if(!sh(f))throw TypeError("Parameter 'url' must be a string, not "+typeof f);var r=f.indexOf("?"),O=r!==-1&&r<f.indexOf("#")?"?":"#",w=f.split(O),q=/\\/g;w[0]=w[0].replace(q,"/"),f=w.join(O);var A=f;if(A=A.trim(),!i&&f.split("#").length===1){var E=p0.exec(A);if(E){if(this.path=A,this.href=A,this.pathname=E[1],E[2])if(this.search=E[2],h)this.query=kh.parse(this.search.substr(1));else this.query=this.search.substr(1);else if(h)this.search="",this.query={};return this}}var $=b0.exec(A);if($){$=$[0];var B=$.toLowerCase();this.protocol=B,A=A.substr($.length)}if(i||$||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var U=A.substr(0,2)==="//";if(U&&!($&&ph[$]))A=A.substr(2),this.slashes=!0}if(!ph[$]&&(U||$&&!Mf[$])){var M=-1;for(var K=0;K<Fr.length;K++){var X=A.indexOf(Fr[K]);if(X!==-1&&(M===-1||X<M))M=X}var Y,J;if(M===-1)J=A.lastIndexOf("@");else J=A.lastIndexOf("@",M);if(J!==-1)Y=A.slice(0,J),A=A.slice(J+1),this.auth=decodeURIComponent(Y);M=-1;for(var K=0;K<Xr.length;K++){var X=A.indexOf(Xr[K]);if(X!==-1&&(M===-1||X<M))M=X}if(M===-1)M=A.length;this.host=A.slice(0,M),A=A.slice(M),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G){var Z=this.hostname.split(/\./);for(var K=0,C=Z.length;K<C;K++){var z=Z[K];if(!z)continue;if(!z.match(Cr)){var _="";for(var R=0,x=z.length;R<x;R++)if(z.charCodeAt(R)>127)_+="x";else _+=z[R];if(!_.match(Cr)){var W=Z.slice(0,K),D=Z.slice(K+1),L=z.match(a0);if(L)W.push(L[1]),D.unshift(L[2]);if(D.length)A="/"+D.join(".")+A;this.hostname=W.join(".");break}}}}if(this.hostname.length>s0)this.hostname="";else this.hostname=this.hostname.toLowerCase();if(!G)this.hostname=new lh(`https://${this.hostname}`).hostname;var m=this.port?":"+this.port:"",o=this.hostname||"";if(this.host=o+m,this.href+=this.host,G){if(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/")A="/"+A}}if(!d0[B])for(var K=0,C=ch.length;K<C;K++){var v=ch[K];if(A.indexOf(v)===-1)continue;var s=encodeURIComponent(v);if(s===v)s=escape(v);A=A.split(v).join(s)}var Wf=A.indexOf("#");if(Wf!==-1)this.hash=A.substr(Wf),A=A.slice(0,Wf);var Uf=A.indexOf("?");if(Uf!==-1){if(this.search=A.substr(Uf),this.query=A.substr(Uf+1),h)this.query=kh.parse(this.query);A=A.slice(0,Uf)}else if(h)this.search="",this.query={};if(A)this.pathname=A;if(Mf[B]&&this.hostname&&!this.pathname)this.pathname="/";if(this.pathname||this.search){var m=this.pathname||"",bf=this.search||"";this.path=m+bf}return this.href=this.format(),this};b.prototype.format=function(){var f=this.auth||"";if(f)f=encodeURIComponent(f),f=f.replace(/%3A/i,":"),f+="@";var h=this.protocol||"",i=this.pathname||"",r=this.hash||"",O=!1,w="";if(this.host)O=f+this.host;else if(this.hostname){if(O=f+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port)O+=":"+this.port}if(this.query&&Dr(this.query)&&Object.keys(this.query).length)w=kh.stringify(this.query);var q=this.search||w&&"?"+w||"";if(h&&h.substr(-1)!==":")h+=":";if(this.slashes||(!h||Mf[h])&&O!==!1){if(O="//"+(O||""),i&&i.charAt(0)!=="/")i="/"+i}else if(!O)O="";if(r&&r.charAt(0)!=="#")r="#"+r;if(q&&q.charAt(0)!=="?")q="?"+q;return i=i.replace(/[?#]/g,function(A){return encodeURIComponent(A)}),q=q.replace("#","%23"),h+O+i+q+r};b.prototype.resolve=function(f){return this.resolveObject(Jf(f,!1,!0)).format()};b.prototype.resolveObject=function(f){if(sh(f)){var h=new b;h.parse(f,!1,!0),f=h}var i=new b,r=Object.keys(this);for(var O=0;O<r.length;O++){var w=r[O];i[w]=this[w]}if(i.hash=f.hash,f.href==="")return i.href=i.format(),i;if(f.slashes&&!f.protocol){var q=Object.keys(f);for(var A=0;A<q.length;A++){var E=q[A];if(E!=="protocol")i[E]=f[E]}if(Mf[i.protocol]&&i.hostname&&!i.pathname)i.path=i.pathname="/";return i.href=i.format(),i}if(f.protocol&&f.protocol!==i.protocol){if(!Mf[f.protocol]){var $=Object.keys(f);for(var B=0;B<$.length;B++){var U=$[B];i[U]=f[U]}return i.href=i.format(),i}if(i.protocol=f.protocol,!f.host&&!ph[f.protocol]){var C=(f.pathname||"").split("/");while(C.length&&!(f.host=C.shift()));if(!f.host)f.host="";if(!f.hostname)f.hostname="";if(C[0]!=="")C.unshift("");if(C.length<2)C.unshift("");i.pathname=C.join("/")}else i.pathname=f.pathname;if(i.search=f.search,i.query=f.query,i.host=f.host||"",i.auth=f.auth,i.hostname=f.hostname||f.host,i.port=f.port,i.pathname||i.search){var M=i.pathname||"",K=i.search||"";i.path=M+K}return i.slashes=i.slashes||f.slashes,i.href=i.format(),i}var X=i.pathname&&i.pathname.charAt(0)==="/",Y=f.host||f.pathname&&f.pathname.charAt(0)==="/",J=Y||X||i.host&&f.pathname,G=J,Z=i.pathname&&i.pathname.split("/")||[],C=f.pathname&&f.pathname.split("/")||[],z=i.protocol&&!Mf[i.protocol];if(z){if(i.hostname="",i.port=null,i.host)if(Z[0]==="")Z[0]=i.host;else Z.unshift(i.host);if(i.host="",f.protocol){if(f.hostname=null,f.port=null,f.host)if(C[0]==="")C[0]=f.host;else C.unshift(f.host);f.host=null}J=J&&(C[0]===""||Z[0]==="")}if(Y)i.host=f.host||f.host===""?f.host:i.host,i.hostname=f.hostname||f.hostname===""?f.hostname:i.hostname,i.search=f.search,i.query=f.query,Z=C;else if(C.length){if(!Z)Z=[];Z.pop(),Z=Z.concat(C),i.search=f.search,i.query=f.query}else if(!v0(f.search)){if(z){i.hostname=i.host=Z.shift();var _=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;if(_)i.auth=_.shift(),i.host=i.hostname=_.shift()}if(i.search=f.search,i.query=f.query,!fh(i.pathname)||!fh(i.search))i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"");return i.href=i.format(),i}if(!Z.length){if(i.pathname=null,i.search)i.path="/"+i.search;else i.path=null;return i.href=i.format(),i}var R=Z.slice(-1)[0],x=(i.host||f.host||Z.length>1)&&(R==="."||R==="..")||R==="",W=0;for(var D=Z.length;D>=0;D--)if(R=Z[D],R===".")Z.splice(D,1);else if(R==="..")Z.splice(D,1),W++;else if(W)Z.splice(D,1),W--;if(!J&&!G)for(;W--;W)Z.unshift("..");if(J&&Z[0]!==""&&(!Z[0]||Z[0].charAt(0)!=="/"))Z.unshift("");if(x&&Z.join("/").substr(-1)!=="/")Z.push("");var L=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";if(z){i.hostname=i.host=L?"":Z.length?Z.shift():"";var _=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;if(_)i.auth=_.shift(),i.host=i.hostname=_.shift()}if(J=J||i.host&&Z.length,J&&!L)Z.unshift("");if(!Z.length)i.pathname=null,i.path=null;else i.pathname=Z.join("/");if(!fh(i.pathname)||!fh(i.search))i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"");return i.auth=f.auth||i.auth,i.slashes=i.slashes||f.slashes,i.href=i.format(),i};b.prototype.parseHost=function(){var f=this.host,h=c0.exec(f);if(h){if(h=h[0],h!==":")this.port=h.substr(1);f=f.substr(0,f.length-h.length)}if(f)this.hostname=f};t0={parse:Jf,resolve:Hr,resolveObject:Vr,format:zr,Url:b,URL:lh,URLSearchParams:Ir}});var nh=V((cw,_r)=>{var{existsSync:n0,readFileSync:o0}=(()=>({})),{dirname:th,join:e0}=(ef(),If(of)),{SourceMapConsumer:Gr,SourceMapGenerator:Lr}=(()=>({}));function fO(f){if(Buffer)return Buffer.from(f,"base64").toString();else return window.atob(f)}class hh{constructor(f,h){if(h.map===!1)return;if(h.unsafeMap)this.unsafeMap=!0;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let i=h.map?h.map.prev:void 0,r=this.loadMap(h.from,i);if(!this.mapFile&&h.from)this.mapFile=h.from;if(this.mapFile)this.root=th(this.mapFile);if(r)this.text=r}consumer(){if(!this.consumerCache)this.consumerCache=new Gr(this.json||this.text);return this.consumerCache}decodeInline(f){let h=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,O=/^data:application\/json,/,w=f.match(r)||f.match(O);if(w)return decodeURIComponent(f.substr(w[0].length));let q=f.match(h)||f.match(i);if(q)return fO(f.substr(q[0].length));let A=f.slice(22);throw A=A.slice(0,A.indexOf(",")),Error("Unsupported source map encoding "+A)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){if(typeof f!=="object")return!1;return typeof f.mappings==="string"||typeof f._mappings==="string"||Array.isArray(f.sections)}loadAnnotation(f){let h=f.match(/\/\*\s*# sourceMappingURL=/g);if(!h)return;let i=f.lastIndexOf(h.pop()),r=f.indexOf("*/",i);if(i>-1&&r>-1)this.annotation=this.getAnnotationURL(f.substring(i,r))}loadFile(f,h,i){if(!i&&!this.unsafeMap){if(!/\.map$/i.test(f))return}if(this.root=th(f),n0(f))return this.mapFile=f,o0(f,"utf-8").toString().trim()}loadMap(f,h){if(h===!1)return!1;if(h)if(typeof h==="string")return h;else if(typeof h==="function"){let i=h(f);if(i){let r=this.loadFile(i,f,!0);if(!r)throw Error("Unable to load previous source map: "+i.toString());return r}}else if(h instanceof Gr)return Lr.fromSourceMap(h).toString();else if(h instanceof Lr)return h.toString();else if(this.isMap(h))return JSON.stringify(h);else throw Error("Unsupported previous source map format: "+h.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let i=this.annotation;if(f)i=e0(th(f),i);let r=this.loadFile(i,f,!1);if(r)try{this.json=JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return r}}startWith(f,h){if(!f)return!1;return f.substr(0,h.length)===h}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}_r.exports=hh;hh.default=hh});var jf=V((pw,Sr)=>{var{nanoid:hO}=wr(),{isAbsolute:fi,resolve:hi}=(ef(),If(of)),{SourceMapConsumer:iO,SourceMapGenerator:rO}=(()=>({})),{fileURLToPath:Nr,pathToFileURL:ih}=(dh(),If(ah)),jr=cf(),OO=nh(),oh=(()=>({})),eh=Symbol("lineToIndexCache"),wO=Boolean(iO&&rO),Pr=Boolean(hi&&fi);function Tr(f){if(f[eh])return f[eh];let h=f.css.split(`
|
|
22
|
+
`),i=Array(h.length),r=0;for(let O=0,w=h.length;O<w;O++)i[O]=r,r+=h[O].length+1;return f[eh]=i,i}class Nf{get from(){return this.file||this.id}constructor(f,h={}){if(f===null||typeof f>"u"||typeof f==="object"&&!f.toString)throw Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(this.document=this.css,h.document)this.document=h.document.toString();if(h.from)if(!Pr||/^\w+:\/\//.test(h.from)||fi(h.from))this.file=h.from;else this.file=hi(h.from);if(Pr&&wO){let i=new OO(this.css,h);if(i.text){this.map=i;let r=i.consumer().file;if(!this.file&&r)this.file=this.mapResolve(r)}}if(!this.file)this.id="<input css "+hO(6)+">";if(this.map)this.map.file=this.from}error(f,h,i,r={}){let O,w,q,A,E;if(h&&typeof h==="object"){let B=h,U=i;if(typeof B.offset==="number"){A=B.offset;let M=this.fromOffset(A);h=M.line,i=M.col}else h=B.line,i=B.column,A=this.fromLineAndColumn(h,i);if(typeof U.offset==="number"){q=U.offset;let M=this.fromOffset(q);w=M.line,O=M.col}else w=U.line,O=U.column,q=this.fromLineAndColumn(U.line,U.column)}else if(!i){A=h;let B=this.fromOffset(A);h=B.line,i=B.col}else A=this.fromLineAndColumn(h,i);let $=this.origin(h,i,w,O);if($)E=new jr(f,$.endLine===void 0?$.line:{column:$.column,line:$.line},$.endLine===void 0?$.column:{column:$.endColumn,line:$.endLine},$.source,$.file,r.plugin);else E=new jr(f,w===void 0?h:{column:i,line:h},w===void 0?i:{column:O,line:w},this.css,this.file,r.plugin);if(E.input={column:i,endColumn:O,endLine:w,endOffset:q,line:h,offset:A,source:this.css},this.file){if(ih)E.input.url=ih(this.file).toString();E.input.file=this.file}return E}fromLineAndColumn(f,h){return Tr(this)[f-1]+h-1}fromOffset(f){let h=Tr(this),i=h[h.length-1],r=0;if(f>=i)r=h.length-1;else{let O=h.length-2,w;while(r<O)if(w=r+(O-r>>1),f<h[w])O=w-1;else if(f>=h[w+1])r=w+1;else{r=w;break}}return{col:f-h[r]+1,line:r+1}}mapResolve(f){if(/^\w+:\/\//.test(f))return f;return hi(this.map.consumer().sourceRoot||this.map.root||".",f)}origin(f,h,i,r){if(!this.map)return!1;let O=this.map.consumer(),w=O.originalPositionFor({column:h,line:f});if(!w.source)return!1;let q;if(typeof i==="number")q=O.originalPositionFor({column:r,line:i});let A;if(fi(w.source))A=ih(w.source);else A=new URL(w.source,this.map.consumer().sourceRoot||ih(this.map.mapFile));let E={column:w.column,endColumn:q&&q.column,endLine:q&&q.line,line:w.line,url:A.toString()};if(A.protocol==="file:")if(Nr)E.file=Nr(A);else throw Error("file: protocol is not available in this PostCSS build");let $=O.sourceContentFor(w.source);if($)E.source=$;return E}toJSON(){let f={};for(let h of["hasBOM","css","file","id"])if(this[h]!=null)f[h]=this[h];if(this.map){if(f.map={...this.map},f.map.consumerCache)f.map.consumerCache=void 0}return f}}Sr.exports=Nf;Nf.default=Nf;if(oh&&oh.registerInput)oh.registerInput(Nf)});var Kf=V((kw,xr)=>{var Rr=ff(),ur,gr;class qf extends Rr{constructor(f){super(f);if(this.type="root",!this.nodes)this.nodes=[]}normalize(f,h,i){let r=super.normalize(f);if(h){if(i==="prepend")if(this.nodes.length>1)h.raws.before=this.nodes[1].raws.before;else delete h.raws.before;else if(this.first!==h)for(let O of r)O.raws.before=h.raws.before}return r}removeChild(f,h){let i=this.index(f);if(!h&&i===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[i].raws.before;return super.removeChild(f)}toResult(f={}){return new ur(new gr,this,f).stringify()}}qf.registerLazyResult=(f)=>{ur=f};qf.registerProcessor=(f)=>{gr=f};xr.exports=qf;qf.default=qf;Rr.registerRoot(qf)});var ii=V((lw,yr)=>{var Pf={comma(f){return Pf.split(f,[","],!0)},space(f){let h=[" ",`
|
|
23
|
+
`,"\t"];return Pf.split(f,h)},split(f,h,i){let r=[],O="",w=!1,q=0,A=!1,E="",$=!1;for(let B of f){if($)$=!1;else if(B==="\\")$=!0;else if(A){if(B===E)A=!1}else if(B==='"'||B==="'")A=!0,E=B;else if(B==="(")q+=1;else if(B===")"){if(q>0)q-=1}else if(q===0){if(h.includes(B))w=!0}if(w){if(O!=="")r.push(O.trim());O="",w=!1}else O+=B}if(i||O!=="")r.push(O.trim());return r}};yr.exports=Pf;Pf.default=Pf});var rh=V((sw,vr)=>{var mr=ff(),qO=ii();class Tf extends mr{get selectors(){return qO.comma(this.selector)}set selectors(f){let h=this.selector?this.selector.match(/,\s*/):null,i=h?h[0]:","+this.raw("between","beforeOpen");this.selector=f.join(i)}constructor(f){super(f);if(this.type="rule",!this.nodes)this.nodes=[]}}vr.exports=Tf;Tf.default=Tf;mr.registerRule(Tf)});var cr=V((aw,br)=>{var AO=df(),EO=Gf(),UO=Lf(),$O=jf(),BO=nh(),MO=Kf(),JO=rh();function Sf(f,h){if(Array.isArray(f))return f.map((O)=>Sf(O));let{inputs:i,...r}=f;if(i){h=[];for(let O of i){let w={...O,__proto__:$O.prototype};if(w.map)w.map={...w.map,__proto__:BO.prototype};h.push(w)}}if(r.nodes)r.nodes=f.nodes.map((O)=>Sf(O,h));if(r.source){let{inputId:O,...w}=r.source;if(r.source=w,O!=null)r.source.input=h[O]}if(r.type==="root")return new MO(r);else if(r.type==="decl")return new UO(r);else if(r.type==="rule")return new JO(r);else if(r.type==="comment")return new EO(r);else if(r.type==="atrule")return new AO(r);else throw Error("Unknown node type: "+f.type)}br.exports=Sf;Sf.default=Sf});var ri=V((dw,tr)=>{var{dirname:Oh,relative:kr,resolve:lr,sep:sr}=(ef(),If(of)),{SourceMapConsumer:ar,SourceMapGenerator:wh}=(()=>({})),{pathToFileURL:pr}=(dh(),If(ah)),KO=jf(),QO=Boolean(ar&&wh),ZO=Boolean(Oh&&lr&&kr&&sr);class dr{constructor(f,h,i,r){this.stringify=f,this.mapOpts=i.map||{},this.root=h,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;if(this.isInline())f="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")f=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")f=this.mapOpts.annotation(this.opts.to,this.root);else f=this.outputFile()+".map";let h=`
|
|
24
|
+
`;if(this.css.includes(`\r
|
|
25
|
+
`))h=`\r
|
|
26
|
+
`;this.css+=h+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let h=this.toUrl(this.path(f.file)),i=f.root||Oh(f.file),r;if(this.mapOpts.sourcesContent===!1){if(r=new ar(f.text),r.sourcesContent)r.sourcesContent=null}else r=f.consumer();this.map.applySourceMap(r,h,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let f;for(let h=this.root.nodes.length-1;h>=0;h--){if(f=this.root.nodes[h],f.type!=="comment")continue;if(f.text.startsWith("# sourceMappingURL="))this.root.removeChild(h)}}else if(this.css){let f;while((f=this.css.lastIndexOf("/*#"))!==-1){let h=this.css.indexOf("*/",f+3);if(h===-1)break;while(f>0&&this.css[f-1]===`
|
|
27
|
+
`)f--;this.css=this.css.slice(0,f)+this.css.slice(h+2)}}}generate(){if(this.clearAnnotation(),ZO&&QO&&this.isMap())return this.generateMap();else{let f="";return this.stringify(this.root,(h)=>{f+=h}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=wh.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new wh({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new wh({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,h=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},O,w;this.stringify(this.root,(q,A,E)=>{if(this.css+=q,A&&E!=="end")if(r.generated.line=f,r.generated.column=h-1,A.source&&A.source.start)r.source=this.sourcePath(A),r.original.line=A.source.start.line,r.original.column=A.source.start.column-1,this.map.addMapping(r);else r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r);if(w=q.match(/\n/g),w)f+=w.length,O=q.lastIndexOf(`
|
|
28
|
+
`),h=q.length-O;else h+=q.length;if(A&&E!=="start"){let $=A.parent||{raws:{}};if(!(A.type==="decl"||A.type==="atrule"&&!A.nodes)||A!==$.last||$.raws.semicolon)if(A.source&&A.source.end)r.source=this.sourcePath(A),r.original.line=A.source.end.line,r.original.column=A.source.end.column-1,r.generated.line=f,r.generated.column=h-2,this.map.addMapping(r);else r.source=i,r.original.line=1,r.original.column=0,r.generated.line=f,r.generated.column=h-1,this.map.addMapping(r)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((f)=>f.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let f=this.mapOpts.annotation;if(typeof f<"u"&&f!==!0)return!1;if(this.previous().length)return this.previous().some((h)=>h.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((f)=>f.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(f){if(this.mapOpts.absolute)return f;if(f.charCodeAt(0)===60)return f;if(/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let i=this.opts.to?Oh(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")i=Oh(lr(i,this.mapOpts.annotation));let r=kr(i,f);return this.memoizedPaths.set(f,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((f)=>{if(f.source&&f.source.input.map){let h=f.source.input.map;if(!this.previousMaps.includes(h))this.previousMaps.push(h)}});else{let f=new KO(this.originalCSS,this.opts);if(f.map)this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk((h)=>{if(h.source){let i=h.source.input.from;if(i&&!f[i]){f[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(f.source.input.from);else return this.toUrl(this.path(f.source.input.from))}toBase64(f){if(Buffer)return Buffer.from(f).toString("base64");else return window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(pr){let i=pr(f).toString();return this.memoizedFileURLs.set(f,i),i}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;if(sr==="\\")f=f.replace(/\\/g,"/");let i=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,i),i}}tr.exports=dr});var er=V((tw,or)=>{var qh=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ah=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,YO=/.[\r\n"'(/\\]/,nr=/[\da-f]/i;or.exports=function(h,i={}){let r=h.css.valueOf(),O=i.ignoreErrors,w,q,A,E,$,B,U,M,K,X,Y=r.length,J=0,G=[],Z=[],C=-1;function z(){return J}function _(D){throw h.error("Unclosed "+D,J)}function R(){return Z.length===0&&J>=Y}function x(D){if(Z.length)return Z.pop();if(J>=Y)return;let L=D?D.ignoreUnclosed:!1;switch(w=r.charCodeAt(J),w){case 10:case 32:case 9:case 13:case 12:{E=J;do E+=1,w=r.charCodeAt(E);while(w===32||w===10||w===9||w===13||w===12);B=["space",r.slice(J,E)],J=E-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let m=String.fromCharCode(w);B=[m,m,J];break}case 40:{if(X=G.length?G.pop()[1]:"",K=r.charCodeAt(J+1),X==="url"&&K!==39&&K!==34&&K!==32&&K!==10&&K!==9&&K!==12&&K!==13){E=J;do{if(U=!1,E=r.indexOf(")",E+1),E===-1)if(O||L){E=J;break}else _("bracket");M=E;while(r.charCodeAt(M-1)===92)M-=1,U=!U}while(U);B=["brackets",r.slice(J,E+1),J,E],J=E}else if(J<=C)B=["(","(",J];else if(E=r.indexOf(")",J+1),q=r.slice(J,E+1),E===-1||YO.test(q))C=E===-1?Y:E,B=["(","(",J];else B=["brackets",q,J,E],J=E;break}case 39:case 34:{$=w===39?"'":'"',E=J;do{if(U=!1,E=r.indexOf($,E+1),E===-1)if(O||L){E=J+1;break}else _("string");M=E;while(r.charCodeAt(M-1)===92)M-=1,U=!U}while(U);B=["string",r.slice(J,E+1),J,E],J=E;break}case 64:{if(qh.lastIndex=J+1,qh.test(r),qh.lastIndex===0)E=r.length-1;else E=qh.lastIndex-2;B=["at-word",r.slice(J,E+1),J,E],J=E;break}case 92:{E=J,A=!0;while(r.charCodeAt(E+1)===92)E+=1,A=!A;if(w=r.charCodeAt(E+1),A&&w!==47&&w!==32&&w!==10&&w!==9&&w!==13&&w!==12){if(E+=1,nr.test(r.charAt(E))){while(nr.test(r.charAt(E+1)))E+=1;if(r.charCodeAt(E+1)===32)E+=1}}B=["word",r.slice(J,E+1),J,E],J=E;break}default:{if(w===47&&r.charCodeAt(J+1)===42){if(E=r.indexOf("*/",J+2)+1,E===0)if(O||L)E=r.length;else _("comment");B=["comment",r.slice(J,E+1),J,E],J=E}else{if(Ah.lastIndex=J+1,Ah.test(r),Ah.lastIndex===0)E=r.length-1;else E=Ah.lastIndex-2;B=["word",r.slice(J,E+1),J,E],G.push(B),J=E}break}}return J++,B}function W(D){Z.push(D)}return{back:W,endOfFile:R,nextToken:x,position:z}}});var O1=V((nw,r1)=>{var WO=df(),XO=Gf(),FO=Lf(),CO=Kf(),f1=rh(),IO=er(),h1={empty:!0,space:!0};function DO(f){for(let h=f.length-1;h>=0;h--){let i=f[h],r=i[3]||i[2];if(r)return r}}function Oi(f,h,i){let r="";for(let O=h;O<i;O++)r+=f[O][1];return r}class i1{constructor(f){this.input=f,this.root=new CO,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:f,start:{column:1,line:1,offset:0}}}atrule(f){let h=new WO;if(h.name=f[1].slice(1),h.name==="")this.unnamedAtrule(h,f);this.init(h,f[2]);let i,r,O,w=!1,q=!1,A=[],E=[];while(!this.tokenizer.endOfFile()){if(f=this.tokenizer.nextToken(),i=f[0],i==="("||i==="[")E.push(i==="("?")":"]");else if(i==="{"&&E.length>0)E.push("}");else if(i===E[E.length-1])E.pop();if(E.length===0)if(i===";"){h.source.end=this.getPosition(f[2]),h.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){q=!0;break}else if(i==="}"){if(A.length>0){O=A.length-1,r=A[O];while(r&&r[0]==="space")r=A[--O];if(r)h.source.end=this.getPosition(r[3]||r[2]),h.source.end.offset++}this.end(f);break}else A.push(f);else A.push(f);if(this.tokenizer.endOfFile()){w=!0;break}}if(h.raws.between=this.spacesAndCommentsFromEnd(A),A.length){if(h.raws.afterName=this.spacesAndCommentsFromStart(A),this.raw(h,"params",A),w)f=A[A.length-1],h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between=""}else h.raws.afterName="",h.params="";if(q)h.nodes=[],this.current=h}checkMissedSemicolon(f){let h=this.colon(f);if(h===!1)return;let i=0,r;for(let O=h-1;O>=0;O--)if(r=f[O],r[0]!=="space"){if(i+=1,i===2)break}throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(f){let h=0,i,r,O;for(let[w,q]of f.entries()){if(r=q,O=r[0],O==="(")h+=1;if(O===")")h-=1;if(h===0&&O===":")if(!i)this.doubleColon(r);else if(i[0]==="word"&&i[1]==="progid")continue;else return w;i=r}return!1}comment(f){let h=new XO;this.init(h,f[2]),h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++;let i=f[1].slice(2,-2);if(!i.trim())h.text="",h.raws.left=i,h.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);h.text=r[2],h.raws.left=r[1],h.raws.right=r[3]}}createTokenizer(){this.tokenizer=IO(this.input)}decl(f,h){let i=new FO;this.init(i,f[0][2]);let r=f[f.length-1];if(r[0]===";")this.semicolon=!0,f.pop();i.source.end=this.getPosition(r[3]||r[2]||DO(f)),i.source.end.offset++;let O=0;while(f[O][0]!=="word"){if(O===f.length-1)this.unknownWord([f[O]]);O++}i.raws.before+=Oi(f,0,O),i.source.start=this.getPosition(f[O][2]);let w=O;while(O<f.length){let U=f[O][0];if(U===":"||U==="space"||U==="comment")break;O++}i.prop=Oi(f,w,O);let q=O,A;while(O<f.length){if(A=f[O],O++,A[0]===":")break;if(A[0]==="word"&&/\w/.test(A[1]))this.unknownWord([A])}if(i.raws.between=Oi(f,q,O),i.prop[0]==="_"||i.prop[0]==="*")i.raws.before+=i.prop[0],i.prop=i.prop.slice(1);let E=O;while(O<f.length){let U=f[O][0];if(U!=="space"&&U!=="comment")break;O++}let $=f.slice(E,O);f=f.slice(O),this.precheckMissedSemicolon(f);for(let U=f.length-1;U>=0;U--){if(A=f[U],A[1].toLowerCase()==="!important"){i.important=!0;let M=this.stringFrom(f,U);if(M=this.spacesFromEnd(f)+M,M!==" !important")i.raws.important=M;break}else if(A[1].toLowerCase()==="important"){let M=f.slice(0),K="";for(let X=U;X>0;X--){let Y=M[X][0];if(K.trim().startsWith("!")&&Y!=="space")break;K=M.pop()[1]+K}if(K.trim().startsWith("!"))i.important=!0,i.raws.important=K,f=M}if(A[0]!=="space"&&A[0]!=="comment")break}if(f.some((U)=>U[0]!=="space"&&U[0]!=="comment"))i.raws.between+=$.map((U)=>U[1]).join(""),$=[];if(this.raw(i,"value",$.concat(f),h),i.value.includes(":")&&!h)this.checkMissedSemicolon(f)}doubleColon(f){throw this.input.error("Double colon",{offset:f[2]},{offset:f[2]+f[1].length})}emptyRule(f){let h=new f1;this.init(h,f[2]),h.selector="",h.raws.between="",this.current=h}end(f){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(f[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(f)}endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(f){if(this.spaces+=f[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];if(h&&h.type==="rule"&&!h.raws.ownSemicolon)h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(f[2]),h.source.end.offset+=h.raws.ownSemicolon.length}}getPosition(f){let h=this.input.fromOffset(f);return{column:h.col,line:h.line,offset:f}}init(f,h){if(this.current.push(f),f.source={input:this.input,start:this.getPosition(h)},f.raws.before=this.spaces,this.spaces="",f.type!=="comment")this.semicolon=!1}other(f){let h=!1,i=null,r=!1,O=null,w=[],q=f[1].startsWith("--"),A=[],E=f;while(E){if(i=E[0],A.push(E),i==="("||i==="["){if(!O)O=E;w.push(i==="("?")":"]")}else if(q&&r&&i==="{"){if(!O)O=E;w.push("}")}else if(w.length===0){if(i===";")if(r){this.decl(A,q);return}else break;else if(i==="{"){this.rule(A);return}else if(i==="}"){this.tokenizer.back(A.pop()),h=!0;break}else if(i===":")r=!0}else if(i===w[w.length-1]){if(w.pop(),w.length===0)O=null}E=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())h=!0;if(w.length>0)this.unclosedBracket(O);if(h&&r){if(!q)while(A.length){if(E=A[A.length-1][0],E!=="space"&&E!=="comment")break;this.tokenizer.back(A.pop())}this.decl(A,q)}else this.unknownWord(A)}parse(){let f;while(!this.tokenizer.endOfFile())switch(f=this.tokenizer.nextToken(),f[0]){case"space":this.spaces+=f[1];break;case";":this.freeSemicolon(f);break;case"}":this.end(f);break;case"comment":this.comment(f);break;case"at-word":this.atrule(f);break;case"{":this.emptyRule(f);break;default:this.other(f);break}this.endFile()}precheckMissedSemicolon(){}raw(f,h,i,r){let O,w,q=i.length,A="",E=!0,$,B;for(let U=0;U<q;U+=1)if(O=i[U],w=O[0],w==="space"&&U===q-1&&!r)E=!1;else if(w==="comment")if(B=i[U-1]?i[U-1][0]:"empty",$=i[U+1]?i[U+1][0]:"empty",!h1[B]&&!h1[$])if(A.slice(-1)===",")E=!1;else A+=O[1];else E=!1;else A+=O[1];if(!E){let U=i.reduce((M,K)=>M+K[1],"");f.raws[h]={raw:U,value:A}}f[h]=A}rule(f){f.pop();let h=new f1;this.init(h,f[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(f),this.raw(h,"selector",f),this.current=h}spacesAndCommentsFromEnd(f){let h,i="";while(f.length){if(h=f[f.length-1][0],h!=="space"&&h!=="comment")break;i=f.pop()[1]+i}return i}spacesAndCommentsFromStart(f){let h,i="";while(f.length){if(h=f[0][0],h!=="space"&&h!=="comment")break;i+=f.shift()[1]}return i}spacesFromEnd(f){let h,i="";while(f.length){if(h=f[f.length-1][0],h!=="space")break;i=f.pop()[1]+i}return i}stringFrom(f,h){let i="";for(let r=h;r<f.length;r++)i+=f[r][1];return f.splice(h,f.length-h),i}unclosedBlock(){let f=this.current.source.start;throw this.input.error("Unclosed block",f.line,f.column)}unclosedBracket(f){throw this.input.error("Unclosed bracket",{offset:f[2]},{offset:f[2]+1})}unexpectedClose(f){throw this.input.error("Unexpected }",{offset:f[2]},{offset:f[2]+1})}unknownWord(f){throw this.input.error("Unknown word "+f[0][1],{offset:f[0][2]},{offset:f[0][2]+f[0][1].length})}unnamedAtrule(f,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}r1.exports=i1});var Uh=V((ow,w1)=>{var zO=ff(),HO=jf(),VO=O1();function Eh(f,h){let i=new HO(f,h),r=new VO(i);try{r.parse()}catch(O){throw O}return r.root}w1.exports=Eh;Eh.default=Eh;zO.registerParse(Eh)});var wi=V((ew,q1)=>{class $h{constructor(f,h={}){if(this.type="warning",this.text=f,h.node&&h.node.source){let i=h.node.rangeBy(h);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in h)this[i]=h[i]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}}q1.exports=$h;$h.default=$h});var Mh=V((fq,A1)=>{var GO=wi();class Bh{get content(){return this.css}constructor(f,h,i){this.processor=f,this.messages=[],this.root=h,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(f,h={}){if(!h.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)h.plugin=this.lastPlugin.postcssPlugin}let i=new GO(f,h);return this.messages.push(i),i}warnings(){return this.messages.filter((f)=>f.type==="warning")}}A1.exports=Bh;Bh.default=Bh});var qi=V((hq,U1)=>{var E1={};U1.exports=function(h){if(E1[h])return;if(E1[h]=!0,typeof console<"u"&&console.warn)console.warn(h)}});var Ui=V((rq,J1)=>{var LO=ff(),_O=tf(),NO=ri(),jO=Uh(),$1=Mh(),PO=Kf(),TO=zf(),{isClean:l,my:SO}=kf(),iq=qi(),RO={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},uO={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},gO={Once:!0,postcssPlugin:!0,prepare:!0},Qf=0;function Rf(f){return typeof f==="object"&&typeof f.then==="function"}function M1(f){let h=!1,i=RO[f.type];if(f.type==="decl")h=f.prop.toLowerCase();else if(f.type==="atrule")h=f.name.toLowerCase();if(h&&f.append)return[i,i+"-"+h,Qf,i+"Exit",i+"Exit-"+h];else if(h)return[i,i+"-"+h,i+"Exit",i+"Exit-"+h];else if(f.append)return[i,Qf,i+"Exit"];else return[i,i+"Exit"]}function B1(f){let h;if(f.type==="document")h=["Document",Qf,"DocumentExit"];else if(f.type==="root")h=["Root",Qf,"RootExit"];else h=M1(f);return{eventIndex:0,events:h,iterator:0,node:f,visitorIndex:0,visitors:[]}}function Ai(f){if(f[l]=!1,f.nodes)f.nodes.forEach((h)=>Ai(h));return f}var Ei={};class hf{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(f,h,i){this.stringified=!1,this.processed=!1;let r;if(typeof h==="object"&&h!==null&&(h.type==="root"||h.type==="document"))r=Ai(h);else if(h instanceof hf||h instanceof $1){if(r=Ai(h.root),h.map){if(typeof i.map>"u")i.map={};if(!i.map.inline)i.map.inline=!1;i.map.prev=h.map}}else{let O=jO;if(i.syntax)O=i.syntax.parse;if(i.parser)O=i.parser;if(O.parse)O=O.parse;try{r=O(h,i)}catch(w){this.processed=!0,this.error=w}if(r&&!r[SO])LO.rebuild(r)}this.result=new $1(f,r,i),this.helpers={...Ei,postcss:Ei,result:this.result},this.plugins=this.processor.plugins.map((O)=>{if(typeof O==="object"&&O.prepare)return{...O,...O.prepare(this.result)};else return O})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(f,h){let i=this.result.lastPlugin;try{if(h)h.addToError(f);if(this.error=f,f.name==="CssSyntaxError"&&!f.plugin)f.plugin=i.postcssPlugin,f.setMessage();else if(i.postcssVersion);}catch(r){if(console&&console.error)console.error(r)}return f}prepareVisitors(){this.listeners={};let f=(h,i,r)=>{if(!this.listeners[i])this.listeners[i]=[];this.listeners[i].push([h,r])};for(let h of this.plugins)if(typeof h==="object")for(let i in h){if(!uO[i]&&/^[A-Z]/.test(i))throw Error(`Unknown event ${i} in ${h.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gO[i]){if(typeof h[i]==="object")for(let r in h[i])if(r==="*")f(h,i,h[i][r]);else f(h,i+"-"+r.toLowerCase(),h[i][r]);else if(typeof h[i]==="function")f(h,i,h[i])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let f=0;f<this.plugins.length;f++){let h=this.plugins[f],i=this.runOnRoot(h);if(Rf(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let f=this.result.root;while(!f[l]){f[l]=!0;let h=[B1(f)];while(h.length>0){let i=this.visitTick(h);if(Rf(i))try{await i}catch(r){let O=h[h.length-1].node;throw this.handleError(r,O)}}}if(this.listeners.OnceExit)for(let[h,i]of this.listeners.OnceExit){this.result.lastPlugin=h;try{if(f.type==="document"){let r=f.nodes.map((O)=>i(O,this.helpers));await Promise.all(r)}else await i(f,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(f){this.result.lastPlugin=f;try{if(typeof f==="object"&&f.Once){if(this.result.root.type==="document"){let h=this.result.root.nodes.map((i)=>f.Once(i,this.helpers));if(Rf(h[0]))return Promise.all(h);return h}return f.Once(this.result.root,this.helpers)}else if(typeof f==="function")return f(this.result.root,this.result)}catch(h){throw this.handleError(h)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let f=this.result.opts,h=TO;if(f.syntax)h=f.syntax.stringify;if(f.stringifier)h=f.stringifier;if(h.stringify)h=h.stringify;let i=this.result.root.source;if(f.map===void 0&&!(i&&i.input&&i.input.map)){let w="";return h(this.result.root,(q)=>{w+=q}),this.result.css=w,this.result}let O=new NO(h,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let f of this.plugins){let h=this.runOnRoot(f);if(Rf(h))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let f=this.result.root;while(!f[l])f[l]=!0,this.walkSync(f);if(this.listeners.OnceExit)if(f.type==="document")for(let h of f.nodes)this.visitSync(this.listeners.OnceExit,h);else this.visitSync(this.listeners.OnceExit,f)}return this.result}then(f,h){return this.async().then(f,h)}toString(){return this.css}visitSync(f,h){for(let[i,r]of f){this.result.lastPlugin=i;let O;try{O=r(h,this.helpers)}catch(w){throw this.handleError(w,h.proxyOf)}if(h.type!=="root"&&h.type!=="document"&&!h.parent)return!0;if(Rf(O))throw this.getAsyncError()}}visitTick(f){let h=f[f.length-1],{node:i,visitors:r}=h;if(i.type!=="root"&&i.type!=="document"&&!i.parent){f.pop();return}if(r.length>0&&h.visitorIndex<r.length){let[w,q]=r[h.visitorIndex];if(h.visitorIndex+=1,h.visitorIndex===r.length)h.visitors=[],h.visitorIndex=0;this.result.lastPlugin=w;try{return q(i.toProxy(),this.helpers)}catch(A){throw this.handleError(A,i)}}if(h.iterator!==0){let w=h.iterator,q;while(q=i.nodes[i.indexes[w]])if(i.indexes[w]+=1,!q[l]){q[l]=!0,f.push(B1(q));return}h.iterator=0,delete i.indexes[w]}let O=h.events;while(h.eventIndex<O.length){let w=O[h.eventIndex];if(h.eventIndex+=1,w===Qf){if(i.nodes&&i.nodes.length)i[l]=!0,h.iterator=i.getIterator();return}else if(this.listeners[w]){h.visitors=this.listeners[w];return}}f.pop()}walkSync(f){f[l]=!0;let h=M1(f);for(let i of h)if(i===Qf){if(f.nodes)f.each((r)=>{if(!r[l])this.walkSync(r)})}else{let r=this.listeners[i];if(r){if(this.visitSync(r,f.toProxy()))return}}}warnings(){return this.sync().warnings()}}hf.registerPostcss=(f)=>{Ei=f};J1.exports=hf;hf.default=hf;PO.registerLazyResult(hf);_O.registerLazyResult(hf)});var Q1=V((wq,K1)=>{var xO=ri(),yO=Uh(),mO=Mh(),vO=zf(),Oq=qi();class Jh{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let f,h=yO;try{f=h(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;else return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,h,i){h=h.toString(),this.stringified=!1,this._processor=f,this._css=h,this._opts=i,this._map=void 0;let r=vO;this.result=new mO(this._processor,void 0,this._opts),this.result.css=h;let O=this;Object.defineProperty(this.result,"root",{get(){return O.root}});let w=new xO(r,void 0,this._opts,h);if(w.isMap()){let[q,A]=w.generate();if(q)this.result.css=q;if(A)this.result.map=A}else w.clearAnnotation(),this.result.css=w.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,h){return this.async().then(f,h)}toString(){return this._css}warnings(){return[]}}K1.exports=Jh;Jh.default=Jh});var Y1=V((qq,Z1)=>{var bO=tf(),cO=Ui(),pO=Q1(),kO=Kf();class Zf{constructor(f=[]){this.version="8.5.15",this.plugins=this.normalize(f)}normalize(f){let h=[];for(let i of f){if(i.postcss===!0)i=i();else if(i.postcss)i=i.postcss;if(typeof i==="object"&&Array.isArray(i.plugins))h=h.concat(i.plugins);else if(typeof i==="object"&&i.postcssPlugin)h.push(i);else if(typeof i==="function")h.push(i);else if(typeof i==="object"&&(i.parse||i.stringify));else throw Error(i+" is not a PostCSS plugin")}return h}process(f,h={}){if(!this.plugins.length&&!h.parser&&!h.stringifier&&!h.syntax)return new pO(this,f,h);else return new cO(this,f,h)}use(f){return this.plugins=this.plugins.concat(this.normalize([f])),this}}Z1.exports=Zf;Zf.default=Zf;kO.registerProcessor(Zf);bO.registerProcessor(Zf)});var H1=V((Aq,z1)=>{var W1=df(),X1=Gf(),lO=ff(),sO=cf(),F1=Lf(),C1=tf(),aO=cr(),dO=jf(),tO=Ui(),nO=ii(),oO=Vf(),eO=Uh(),$i=Y1(),fw=Mh(),I1=Kf(),D1=rh(),hw=zf(),iw=wi();function N(...f){if(f.length===1&&Array.isArray(f[0]))f=f[0];return new $i(f)}N.plugin=function(h,i){let r=!1;function O(...q){if(console&&console.warn&&!r){if(r=!0,console.warn(h+`: postcss.plugin was deprecated. Migration guide:
|
|
29
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn"))console.warn(h+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
30
|
+
`+"https://www.w3ctech.com/topic/2226")}let A=i(...q);return A.postcssPlugin=h,A.postcssVersion=new $i().version,A}let w;return Object.defineProperty(O,"postcss",{get(){if(!w)w=O();return w}}),O.process=function(q,A,E){return N([O(E)]).process(q,A)},O};N.stringify=hw;N.parse=eO;N.fromJSON=aO;N.list=nO;N.comment=(f)=>new X1(f);N.atRule=(f)=>new W1(f);N.decl=(f)=>new F1(f);N.rule=(f)=>new D1(f);N.root=(f)=>new I1(f);N.document=(f)=>new C1(f);N.CssSyntaxError=sO;N.Declaration=F1;N.Container=lO;N.Processor=$i;N.Document=C1;N.Comment=X1;N.Warning=iw;N.AtRule=W1;N.Result=fw;N.Input=dO;N.Rule=D1;N.Root=I1;N.Node=oO;tO.registerPostcss(N);z1.exports=N;N.default=N});var L1=V((jq,G1)=>{var Bi=40,Mi=41,Qh=39,Ji=34,Ki=92,Yf=47,Qi=44,Zi=58,Zh=42,rw=117,Ow=85,ww=43,qw=/^[a-f0-9?-]+$/i;G1.exports=function(f){var h=[],i=f,r,O,w,q,A,E,$,B,U=0,M=i.charCodeAt(U),K=i.length,X=[{nodes:h}],Y=0,J,G="",Z="",C="";while(U<K)if(M<=32){r=U;do r+=1,M=i.charCodeAt(r);while(M<=32);if(q=i.slice(U,r),w=h[h.length-1],M===Mi&&Y)C=q;else if(w&&w.type==="div")w.after=q,w.sourceEndIndex+=q.length;else if(M===Qi||M===Zi||M===Yf&&i.charCodeAt(r+1)!==Zh&&(!J||J&&J.type==="function"&&J.value!=="calc"))Z=q;else h.push({type:"space",sourceIndex:U,sourceEndIndex:r,value:q});U=r}else if(M===Qh||M===Ji){r=U,O=M===Qh?"'":'"',q={type:"string",sourceIndex:U,quote:O};do if(A=!1,r=i.indexOf(O,r+1),~r){E=r;while(i.charCodeAt(E-1)===Ki)E-=1,A=!A}else i+=O,r=i.length-1,q.unclosed=!0;while(A);q.value=i.slice(U+1,r),q.sourceEndIndex=q.unclosed?r:r+1,h.push(q),U=r+1,M=i.charCodeAt(U)}else if(M===Yf&&i.charCodeAt(U+1)===Zh){if(r=i.indexOf("*/",U),q={type:"comment",sourceIndex:U,sourceEndIndex:r+2},r===-1)q.unclosed=!0,r=i.length,q.sourceEndIndex=r;q.value=i.slice(U+2,r),h.push(q),U=r+2,M=i.charCodeAt(U)}else if((M===Yf||M===Zh)&&J&&J.type==="function"&&J.value==="calc")q=i[U],h.push({type:"word",sourceIndex:U-Z.length,sourceEndIndex:U+q.length,value:q}),U+=1,M=i.charCodeAt(U);else if(M===Yf||M===Qi||M===Zi)q=i[U],h.push({type:"div",sourceIndex:U-Z.length,sourceEndIndex:U+q.length,value:q,before:Z,after:""}),Z="",U+=1,M=i.charCodeAt(U);else if(Bi===M){r=U;do r+=1,M=i.charCodeAt(r);while(M<=32);if(B=U,q={type:"function",sourceIndex:U-G.length,value:G,before:i.slice(B+1,r)},U=r,G==="url"&&M!==Qh&&M!==Ji){r-=1;do if(A=!1,r=i.indexOf(")",r+1),~r){E=r;while(i.charCodeAt(E-1)===Ki)E-=1,A=!A}else i+=")",r=i.length-1,q.unclosed=!0;while(A);$=r;do $-=1,M=i.charCodeAt($);while(M<=32);if(B<$){if(U!==$+1)q.nodes=[{type:"word",sourceIndex:U,sourceEndIndex:$+1,value:i.slice(U,$+1)}];else q.nodes=[];if(q.unclosed&&$+1!==r)q.after="",q.nodes.push({type:"space",sourceIndex:$+1,sourceEndIndex:r,value:i.slice($+1,r)});else q.after=i.slice($+1,r),q.sourceEndIndex=r}else q.after="",q.nodes=[];U=r+1,q.sourceEndIndex=q.unclosed?r:U,M=i.charCodeAt(U),h.push(q)}else Y+=1,q.after="",q.sourceEndIndex=U+1,h.push(q),X.push(q),h=q.nodes=[],J=q;G=""}else if(Mi===M&&Y)U+=1,M=i.charCodeAt(U),J.after=C,J.sourceEndIndex+=C.length,C="",Y-=1,X[X.length-1].sourceEndIndex=U,X.pop(),J=X[Y],h=J.nodes;else{r=U;do{if(M===Ki)r+=1;r+=1,M=i.charCodeAt(r)}while(r<K&&!(M<=32||M===Qh||M===Ji||M===Qi||M===Zi||M===Yf||M===Bi||M===Zh&&J&&J.type==="function"&&J.value==="calc"||M===Yf&&J.type==="function"&&J.value==="calc"||M===Mi&&Y));if(q=i.slice(U,r),Bi===M)G=q;else if((rw===q.charCodeAt(0)||Ow===q.charCodeAt(0))&&ww===q.charCodeAt(1)&&qw.test(q.slice(2)))h.push({type:"unicode-range",sourceIndex:U,sourceEndIndex:r,value:q});else h.push({type:"word",sourceIndex:U,sourceEndIndex:r,value:q});U=r}for(U=X.length-1;U;U-=1)X[U].unclosed=!0,X[U].sourceEndIndex=i.length;return X[0].nodes}});var N1=V((Pq,_1)=>{_1.exports=function f(h,i,r){var O,w,q,A;for(O=0,w=h.length;O<w;O+=1){if(q=h[O],!r)A=i(q,O,h);if(A!==!1&&q.type==="function"&&Array.isArray(q.nodes))f(q.nodes,i,r);if(r)i(q,O,h)}}});var S1=V((Tq,T1)=>{function j1(f,h){var{type:i,value:r}=f,O,w;if(h&&(w=h(f))!==void 0)return w;else if(i==="word"||i==="space")return r;else if(i==="string")return O=f.quote||"",O+r+(f.unclosed?"":O);else if(i==="comment")return"/*"+r+(f.unclosed?"":"*/");else if(i==="div")return(f.before||"")+r+(f.after||"");else if(Array.isArray(f.nodes)){if(O=P1(f.nodes,h),i!=="function")return O;return r+"("+(f.before||"")+O+(f.after||"")+(f.unclosed?"":")")}return r}function P1(f,h){var i,r;if(Array.isArray(f)){i="";for(r=f.length-1;~r;r-=1)i=j1(f[r],h)+i;return i}return j1(f,h)}T1.exports=P1});var u1=V((Sq,R1)=>{var Yh=45,Wh=43,Yi=46,Aw=101,Ew=69;function Uw(f){var h=f.charCodeAt(0),i;if(h===Wh||h===Yh){if(i=f.charCodeAt(1),i>=48&&i<=57)return!0;var r=f.charCodeAt(2);if(i===Yi&&r>=48&&r<=57)return!0;return!1}if(h===Yi){if(i=f.charCodeAt(1),i>=48&&i<=57)return!0;return!1}if(h>=48&&h<=57)return!0;return!1}R1.exports=function(f){var h=0,i=f.length,r,O,w;if(i===0||!Uw(f))return!1;if(r=f.charCodeAt(h),r===Wh||r===Yh)h++;while(h<i){if(r=f.charCodeAt(h),r<48||r>57)break;h+=1}if(r=f.charCodeAt(h),O=f.charCodeAt(h+1),r===Yi&&O>=48&&O<=57){h+=2;while(h<i){if(r=f.charCodeAt(h),r<48||r>57)break;h+=1}}if(r=f.charCodeAt(h),O=f.charCodeAt(h+1),w=f.charCodeAt(h+2),(r===Aw||r===Ew)&&(O>=48&&O<=57||(O===Wh||O===Yh)&&w>=48&&w<=57)){h+=O===Wh||O===Yh?3:2;while(h<i){if(r=f.charCodeAt(h),r<48||r>57)break;h+=1}}return{number:f.slice(0,h),unit:f.slice(h)}}});var uf=V((Rq,y1)=>{var $w=L1(),g1=N1(),x1=S1();function rf(f){if(this instanceof rf)return this.nodes=$w(f),this;return new rf(f)}rf.prototype.toString=function(){return Array.isArray(this.nodes)?x1(this.nodes):""};rf.prototype.walk=function(f,h){return g1(this.nodes,f,h),this};rf.unit=u1();rf.walk=g1;rf.stringify=x1;y1.exports=rf});var jh={};Sh(jh,{inlineResources:()=>Vi,elementToSVG:()=>K0,documentToSVG:()=>_w});var T=Cf(H1(),1);var Eq=T.default.stringify,Uq=T.default.fromJSON,$q=T.default.plugin,Kh=T.default.parse,Bq=T.default.list,Mq=T.default.document,Jq=T.default.comment,Kq=T.default.atRule,Qq=T.default.rule,Zq=T.default.decl,Yq=T.default.root,Wq=T.default.CssSyntaxError,Xq=T.default.Declaration,Fq=T.default.Container,Cq=T.default.Processor,Iq=T.default.Document,Dq=T.default.Comment,zq=T.default.Warning,Hq=T.default.AtRule,Vq=T.default.Result,Gq=T.default.Input,Lq=T.default.Rule,_q=T.default.Root,Nq=T.default.Node;var Gi=Cf(uf(),1);var m1=(f)=>f.type===CSSRule.FONT_FACE_RULE,Wi=(f)=>f.displayOutside==="inline"||f.display.startsWith("inline-"),gf=(f)=>f.position!=="static",Xi=(f)=>f.float!=="none"&&f.position!=="absolute"&&f.position!=="fixed",Ch=(f)=>f==="transparent"||f==="rgba(0, 0, 0, 0)",Ih=(f)=>parseFloat(f.borderTopWidth)!==0&&f.borderTopStyle!=="none"&&f.borderTopStyle!=="inset"&&f.borderTopStyle!=="outset"&&!Ch(f.borderTopColor)&&f.borderTopWidth===f.borderLeftWidth&&f.borderTopWidth===f.borderRightWidth&&f.borderTopWidth===f.borderBottomWidth&&f.borderTopColor===f.borderLeftColor&&f.borderTopColor===f.borderRightColor&&f.borderTopColor===f.borderBottomColor&&f.borderTopStyle===f.borderLeftStyle&&f.borderTopStyle===f.borderRightStyle&&f.borderTopStyle===f.borderBottomStyle,Bw=["top","bottom","right","left"],Fh=(f)=>f==="bottom"||f==="top",Xh={top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]};function Dh(f,h,i){var r,O,w,q;let[A,E]=h.getPropertyValue(Fh(f)?`border-${f}-${Xh[f][0]}-radius`:`border-${Xh[f][0]}-${f}-radius`).split(" "),[$,B]=h.getPropertyValue(Fh(f)?`border-${f}-${Xh[f][1]}-radius`:`border-${Xh[f][1]}-${f}-radius`).split(" ");if(Fh(f))return[(r=y(A||"0px",i.width))!==null&&r!==void 0?r:0,(O=y($||"0px",i.width))!==null&&O!==void 0?O:0];return[(w=y(E||A||"0px",i.height))!==null&&w!==void 0?w:0,(q=y(B||$||"0px",i.height))!==null&&q!==void 0?q:0]}var v1=(f,h)=>Math.min(...Bw.map((i)=>{let r=Fh(i)?h.width:h.height,O=Dh(i,f,h).reduce((w,q)=>w+q,0);return r/O}),1),xf=(f)=>f.displayOutside!=="none"&&f.display!=="none"&&f.visibility!=="hidden"&&f.opacity!=="0";function y(f,h){if(f.endsWith("px"))return parseFloat(f);if(f.endsWith("%"))return parseFloat(f)/100*h;return}var Af=(f)=>f.replace(/\\([\da-f]{1,2})/gi,(h,i)=>String.fromCodePoint(parseInt(i,16))).replace(/\\(.)/g,"$1");function b1(f,h){for(let i of f)h.setProperty(i,f.getPropertyValue(i),f.getPropertyPriority(i))}var j="http://www.w3.org/2000/svg",c1="http://www.w3.org/1999/xlink";var zh=(f)=>f.nodeType===Node.ELEMENT_NODE,Hh=(f)=>f.nodeType===Node.TEXT_NODE;var Of=(f)=>f.namespaceURI==="http://www.w3.org/2000/svg",Vh=(f)=>Of(f)&&f.tagName==="svg",Fi=(f)=>Of(f)&&("getCTM"in f)&&("getScreenCTM"in f);var p1=(f)=>Of(f)&&f.tagName==="a",k1=(f)=>Of(f)&&("textLength"in f),l1=(f)=>f.tagName==="image"&&Of(f),s1=(f)=>f.tagName==="style"&&Of(f),d=(f)=>f.namespaceURI==="http://www.w3.org/1999/xhtml",a1=(f)=>f.tagName==="A"&&d(f);var d1=(f)=>f.tagName==="IMG"&&d(f),t1=(f)=>f.tagName==="INPUT"&&d(f),n1=(f)=>("labels"in f);var Mw=new Set(["clipPath","contain","filter","isolation","mask","maskBorder","maskImage","mixBlendMode","opacity","perspective","position","transform","webkitOverflowScrolling","zIndex"]);function yf(f,h){return!!((f.position==="absolute"||f.position==="relative")&&f.zIndex!=="auto"||f.position==="fixed"||f.position==="sticky"||h&&(h.display==="flex"||h.display==="grid")&&f.zIndex!=="auto"||parseFloat(f.opacity)!==1||f.mixBlendMode!=="normal"||f.transform!=="none"||f.filter!=="none"||f.perspective!=="none"||f.clipPath!=="none"||f.mask!=="none"||f.maskImage!=="none"||f.maskBorder!=="none"||f.isolation==="isolate"||f.webkitOverflowScrolling==="touch"||f.contain==="layout"||f.contain==="paint"||f.contain==="strict"||f.contain==="content"||f.willChange.split(",").some((i)=>Mw.has(i.trim())))}var Jw=["rootBackgroundAndBorders","childStackingContextsWithNegativeStackLevels","inFlowNonInlineNonPositionedDescendants","nonPositionedFloats","inFlowInlineLevelNonPositionedDescendants","childStackingContextsWithStackLevelZeroAndPositionedDescendantsWithStackLevelZero","childStackingContextsWithPositiveStackLevels"];function Ef(f,h){let i=f.ownerDocument.createElementNS(j,"g");return i.dataset.stackingLayer=h,f.append(i),i}function Gh(f){return f.dataset.stackingContext="true",{rootBackgroundAndBorders:Ef(f,"rootBackgroundAndBorders"),childStackingContextsWithNegativeStackLevels:Ef(f,"childStackingContextsWithNegativeStackLevels"),inFlowNonInlineNonPositionedDescendants:Ef(f,"inFlowNonInlineNonPositionedDescendants"),nonPositionedFloats:Ef(f,"nonPositionedFloats"),inFlowInlineLevelNonPositionedDescendants:Ef(f,"inFlowInlineLevelNonPositionedDescendants"),childStackingContextsWithStackLevelZeroAndPositionedDescendantsWithStackLevelZero:Ef(f,"childStackingContextsWithStackLevelZeroAndPositionedDescendantsWithStackLevelZero"),childStackingContextsWithPositiveStackLevels:Ef(f,"childStackingContextsWithPositiveStackLevels")}}function e1(f,h){let i=f.zIndex!=="auto"?parseInt(f.zIndex,10):void 0;if(i!==void 0&&i<0&&yf(f,h))return"childStackingContextsWithNegativeStackLevels";if(Xi(f)&&!Wi(f)&&!gf(f))return"inFlowNonInlineNonPositionedDescendants";if(!gf(f)&&f.float!=="none")return"nonPositionedFloats";if(Xi(f)&&Wi(f)&&!gf(f))return"inFlowInlineLevelNonPositionedDescendants";if(i===0&&(gf(f)||yf(f,h)))return"childStackingContextsWithStackLevelZeroAndPositionedDescendantsWithStackLevelZero";if(i!==void 0&&i>0&&yf(f,h))return"childStackingContextsWithPositiveStackLevels";return}function o1(f){let h=[...f.children].sort((i,r)=>{let O=i.dataset.zIndex,w=r.dataset.zIndex;if(!O||!w)return 0;return parseInt(O,10)-parseInt(w,10)});for(let i of h)f.append(i)}function f0(f){o1(f.childStackingContextsWithNegativeStackLevels),o1(f.childStackingContextsWithPositiveStackLevels)}function h0(f){for(let h of Jw){let i=f[h];if(!i.hasChildNodes())i.remove()}}var _h=Cf(uf(),1);var i0=(f)=>!f.closest('article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]');function r0(f,{labels:h,getUniqueId:i}){var r,O,w;let q=new Map;switch(f.tagName){case"A":q.set("role","link");break;case"ARTICLE":q.set("role","article");break;case"ASIDE":q.set("role","complementary");break;case"BODY":q.set("role","document");break;case"BUTTON":case"SUMMARY":q.set("role","button");break;case"DD":q.set("role","definition");break;case"DETAILS":q.set("role","group");break;case"DFN":q.set("role","term");break;case"DIALOG":q.set("role","dialog");break;case"DT":q.set("role","term");break;case"FIELDSET":q.set("role","group");break;case"FIGURE":q.set("role","figure");break;case"FOOTER":if(i0(f))q.set("role","contentinfo");break;case"FORM":q.set("role","form");break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":q.set("role","heading"),q.set("aria-level",f.tagName.slice(1));break;case"HEADER":if(i0(f))q.set("role","banner");break;case"HR":q.set("role","separator");break;case"IMG":{let $=f.getAttribute("alt");if($===null||$!==""){if(q.set("role","img"),$)q.set("aria-label",$)}break}case"INPUT":switch(f.type){case"button":case"image":case"reset":case"submit":q.set("role","button");break;case"number":q.set("role","spinbutton");break;case"range":q.set("role","slider");break;case"checkbox":q.set("role","checkbox");break;case"radio":q.set("role","radio");break;case"email":case"tel":if(!f.hasAttribute("list"))q.set("role","textbox");break}break;case"LI":if(((r=f.parentElement)===null||r===void 0?void 0:r.tagName)==="OL"||((O=f.parentElement)===null||O===void 0?void 0:O.tagName)==="UL"||((w=f.parentElement)===null||w===void 0?void 0:w.tagName)==="MENU")q.set("role","listitem");break;case"LINK":if(f.href)q.set("role","link");break;case"MAIN":q.set("role","main");break;case"MATH":q.set("role","math");break;case"OL":case"UL":case"MENU":q.set("role","list");break;case"NAV":q.set("role","navigation");break;case"OPTION":q.set("role","option");break;case"PROGRESS":q.set("role","progressbar");break;case"SECTION":q.set("role","region");break;case"SELECT":q.set("role",!f.hasAttribute("multiple")&&f.size<=1?"combobox":"listbox");break;case"TABLE":q.set("role","table");break;case"THEAD":case"TBODY":case"TFOOT":q.set("role","rowgroup");break;case"TEXTAREA":q.set("role","textbox");break;case"TD":q.set("role","cell");break;case"TH":q.set("role",f.closest("thead")?"columnheader":"rowheader");break;case"TR":q.set("role","tablerow");break}if(f.hasAttribute("disabled"))q.set("aria-disabled","true");if(f.hasAttribute("placeholder"))q.set("aria-placeholder",f.getAttribute("placeholder")||"");let A=f.getAttribute("tabindex");if(A)q.set("tabindex",A);if(d(f)&&n1(f)&&f.labels)q.set("aria-labelledby",[...f.labels].map(($)=>{let B=$.id||h.get($);if(!B)B=i("label"),h.set($,B);return B}).join(" "));for(let $ of f.attributes)if($.name.startsWith("aria-"))q.set($.name,$.value);let E=f.getAttribute("role");if(E)q.set("role",E);return q}var t=t||{};t.stringify=function(){var f={"visit_linear-gradient":function(h){return f.visit_gradient(h)},"visit_repeating-linear-gradient":function(h){return f.visit_gradient(h)},"visit_radial-gradient":function(h){return f.visit_gradient(h)},"visit_repeating-radial-gradient":function(h){return f.visit_gradient(h)},"visit_conic-gradient":function(h){return f.visit_gradient(h)},"visit_repeating-conic-gradient":function(h){return f.visit_gradient(h)},visit_gradient:function(h){var i=f.visit(h.orientation);if(i)i+=", ";return h.type+"("+i+f.visit(h.colorStops)+")"},visit_shape:function(h){var i=h.value,r=f.visit(h.at),O=f.visit(h.style);if(O)i+=" "+O;if(r)i+=" at "+r;return i},"visit_default-radial":function(h){var i="",r=f.visit(h.at);if(r)if(h.hasAtKeyword)i+="at "+r;else i+=r;return i},"visit_extent-keyword":function(h){var i=h.value,r=f.visit(h.at);if(r)i+=" at "+r;return i},"visit_position-keyword":function(h){return h.value},visit_position:function(h){return f.visit(h.value.x)+" "+f.visit(h.value.y)},"visit_%":function(h){return h.value+"%"},visit_em:function(h){return h.value+"em"},visit_px:function(h){return h.value+"px"},visit_rem:function(h){return h.value+"rem"},visit_vw:function(h){return h.value+"vw"},visit_vh:function(h){return h.value+"vh"},visit_vmin:function(h){return h.value+"vmin"},visit_vmax:function(h){return h.value+"vmax"},visit_ch:function(h){return h.value+"ch"},visit_ex:function(h){return h.value+"ex"},visit_calc:function(h){return"calc("+h.value+")"},visit_literal:function(h){return f.visit_color(h.value,h)},visit_hex:function(h){return f.visit_color("#"+h.value,h)},visit_rgb:function(h){return f.visit_color("rgb("+h.value.join(", ")+")",h)},visit_rgba:function(h){return f.visit_color("rgba("+h.value.join(", ")+")",h)},visit_hsl:function(h){return f.visit_color("hsl("+h.value[0]+", "+h.value[1]+"%, "+h.value[2]+"%)",h)},visit_hsla:function(h){return f.visit_color("hsla("+h.value[0]+", "+h.value[1]+"%, "+h.value[2]+"%, "+h.value[3]+")",h)},visit_var:function(h){return f.visit_color("var("+h.value+")",h)},visit_color:function(h,i){var r=h,O=f.visit(i.length);if(O)r+=" "+O;var w=f.visit(i.length2);if(w)r+=" "+w;return r},visit_angular:function(h){return h.value+(h.unit||"deg")},visit_directional:function(h){return"to "+h.value},visit_conic:function(h){var i="";if(h.angle)i+="from "+f.visit(h.angle);if(h.at){if(i)i+=" ";i+="at "+f.visit(h.at)}return i},visit_array:function(h){var i="",r=h.length;return h.forEach(function(O,w){if(i+=f.visit(O),w<r-1)i+=", "}),i},visit_object:function(h){if(h.width&&h.height)return f.visit(h.width)+" "+f.visit(h.height);return""},visit:function(h){if(!h)return"";var i="";if(h instanceof Array)return f.visit_array(h);else if(typeof h==="object"&&!h.type)return f.visit_object(h);else if(h.type){var r=f["visit_"+h.type];if(r)return r(h);else throw Error("Missing visitor visit_"+h.type)}else throw Error("Invalid node.")}};return function(h){return f.visit(h)}}();var t=t||{};t.parse=function(){var f={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,conicGradient:/^(\-(webkit|o|ms|moz)\-)?(conic\-gradient)/i,repeatingConicGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,remValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rem/,vwValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))vw/,vhValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))vh/,vminValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))vmin/,vmaxValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))vmax/,chValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))ch/,exValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))ex/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,radianValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rad/,gradianValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))grad/,turnValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))turn/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,slash:/^\//,hexColor:/^\#([0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})(?![0-9a-fA-F])/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-zA-Z0-9-,\s\#]+)/,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i},h="";function i(Q){var F=Error(h+": "+Q);throw F.source=h,F}function r(){var Q=O();if(h.length>0)i("Invalid input not EOF");return Q}function O(){return R(w)}function w(){return q("linear-gradient",f.linearGradient,E)||q("repeating-linear-gradient",f.repeatingLinearGradient,E)||q("radial-gradient",f.radialGradient,X)||q("repeating-radial-gradient",f.repeatingRadialGradient,X)||q("conic-gradient",f.conicGradient,$)||q("repeating-conic-gradient",f.repeatingConicGradient,$)}function q(Q,F,H){return A(F,function(P){var u=H();if(u){if(!S(f.comma))i("Missing comma before color stops")}return{type:Q,orientation:u,colorStops:R(x)}})}function A(Q,F){var H=S(Q);if(H){if(!S(f.startCall))i("Missing (");var P=F(H);if(!S(f.endCall))i("Missing )");return P}}function E(){var Q=U();if(Q)return Q;var F=g("position-keyword",f.positionKeywords,1);if(F)return{type:"directional",value:F.value};return M()}function $(){var Q=B(),F=C();if(Q||F)return{type:"conic",angle:Q||void 0,at:F||void 0}}function B(){if(g("from",/^from/,0)){var Q=M();if(!Q)i('Missing angle after "from" in conic-gradient');return Q}}function U(){return g("directional",f.sideOrCorner,1)}function M(){return K("deg",f.angleValue)||K("rad",f.radianValue)||K("grad",f.gradianValue)||K("turn",f.turnValue)}function K(Q,F){var H=S(F);if(H)return{type:"angular",value:H[1],unit:Q}}function X(){var Q,F=Y(),H;if(F){if(Q=[],Q.push(F),H=h,S(f.comma))if(F=Y(),F)Q.push(F);else h=H}return Q}function Y(){var Q=J()||G();if(Q)Q.at=C();else{var F=Z();if(F){Q=F;var H=C();if(H)Q.at=H}else{var P=C();if(P)Q={type:"default-radial",at:P,hasAtKeyword:!0};else{var u=z();if(u)Q={type:"default-radial",at:u}}}}return Q}function J(){var Q=g("shape",/^(circle)/i,0);if(Q)Q.style=Li()||Z();return Q}function G(){var Q=g("shape",/^(ellipse)/i,0);if(Q)Q.style=z()||Xf()||Z();return Q}function Z(){return g("extent-keyword",f.extentKeywords,1)}function C(){if(g("position",/^at/,0)){var Q=z();if(!Q)i("Missing positioning value");return Q}}function z(){var Q=_();if(Q.x||Q.y)return{type:"position",value:Q}}function _(){return{x:Xf(),y:Xf()}}function R(Q){var F=Q(),H=[];if(F){H.push(F);while(S(f.comma))if(F=Q(),F)H.push(F);else i("One extra comma")}return H}function x(){var Q=W();if(!Q)i("Expected color definition");if(Q.length=Xf(),Q.length)Q.length2=Xf();return Q}function W(){return L()||Uf()||Wf()||o()||m()||s()||D()}function D(){return g("literal",f.literalColor,0)}function L(){return g("hex",f.hexColor,1)}function m(){return A(f.rgbColor,function(){return v("rgb")})}function o(){return A(f.rgbaColor,function(){return v("rgba")})}function v(Q){var F=p();if(S(f.comma)){var H=p();S(f.comma);var P=p(),u=[F,H,P];if(S(f.comma))return u.push(p()),{type:"rgba",value:u};return{type:Q,value:u}}else{var H=p(),P=p(),u=[F,H,P];if(S(f.slash))return u.push(p()),{type:"rgba",value:u};return{type:Q,value:u}}}function s(){return A(f.varColor,function(){return{type:"var",value:Q0()}})}function Wf(){return A(f.hslColor,function(){return bf("hsl")})}function Uf(){return A(f.hslaColor,function(){return bf("hsla")})}function bf(Q){var F=S(f.percentageValue);if(F)i("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");var H=p();if(S(f.comma)){var P=S(f.percentageValue),u=P?P[1]:null;S(f.comma),P=S(f.percentageValue);var wf=P?P[1]:null;if(!u||!wf)i("Expected percentage value for saturation and lightness in HSL");if(S(f.comma)){var Th=p();return{type:"hsla",value:[H,u,wf,Th]}}return{type:Q,value:[H,u,wf]}}else{var P=S(f.percentageValue),u=P?P[1]:null;P=S(f.percentageValue);var wf=P?P[1]:null;if(!u||!wf)i("Expected percentage value for saturation and lightness in HSL");if(S(f.slash)){var Th=p();return{type:"hsla",value:[H,u,wf,Th]}}return{type:Q,value:[H,u,wf]}}}function Nw(){var Q=S(f.percentageValue);return Q?Q[1]:null}function Q0(){return S(f.variableName)[1]}function p(){return S(f.number)[1]}function Xf(){return g("%",f.percentageValue,1)||Z0()||Y0()||Li()}function Z0(){return g("position-keyword",f.positionKeywords,1)}function Y0(){return A(f.calcValue,function(){var Q=1,F=0;while(Q>0&&F<h.length){var H=h.charAt(F);if(H==="(")Q++;else if(H===")")Q--;F++}if(Q>0)i("Missing closing parenthesis in calc() expression");var P=h.substring(0,F-1);return Ph(F-1),{type:"calc",value:P}})}function Li(){return g("px",f.pixelValue,1)||g("em",f.emValue,1)||g("rem",f.remValue,1)||g("vw",f.vwValue,1)||g("vh",f.vhValue,1)||g("vmin",f.vminValue,1)||g("vmax",f.vmaxValue,1)||g("ch",f.chValue,1)||g("ex",f.exValue,1)}function g(Q,F,H){var P=S(F);if(P)return{type:Q,value:P[H]}}function S(Q){var F,H;if(H=/^[\n\r\t\s]+/.exec(h),H)Ph(H[0].length);if(F=Q.exec(h),F)Ph(F[0].length);return F}function Ph(Q){h=h.substring(Q)}return function(Q){if(h=Q.toString().trim(),h.endsWith(";"))h=h.slice(0,-1);return r()}}();var{parse:O0,stringify:cq}=t,pq={parse:t.parse,stringify:t.stringify};var Qw=(f)=>{let h={x1:"0%",x2:"0%",y1:"0%",y2:"0%"};if((f===null||f===void 0?void 0:f.type)==="angular"){let i=f.value*(Math.PI/180);h.x1=`${Math.round(50+Math.sin(i+Math.PI)*50)}%`,h.y1=`${Math.round(50+Math.cos(i)*50)}%`,h.x2=`${Math.round(50+Math.sin(i)*50)}%`,h.y2=`${Math.round(50+Math.cos(i+Math.PI)*50)}%`}else if((f===null||f===void 0?void 0:f.type)==="directional")switch(f.value){case"left":h.x1="100%";break;case"top":h.y1="100%";break;case"right":h.x2="100%";break;case"bottom":h.y2="100%";break}return h};function w0(f,{svgDocument:h}){let{orientation:i,colorStops:r}=O0(f)[0],{x1:O,x2:w,y1:q,y2:A}=Qw(i),E=(B,U)=>{let M=`${U/(r.length-1)*100}%`,K="rgb(0,0,0)",X=1;switch(B.type){case"rgb":{let[J,G,Z]=B.value;K=`rgb(${J},${G},${Z})`;break}case"rgba":{let[J,G,Z,C]=B.value;K=`rgb(${J},${G},${Z})`,X=C;break}case"hex":{K=`#${B.value}`;break}case"literal":{K=B.value;break}}let Y=h.createElementNS(j,"stop");return Y.setAttribute("offset",M),Y.setAttribute("stop-color",K),Y.setAttribute("stop-opacity",X.toString()),Y},$=h.createElementNS(j,"linearGradient");return $.setAttribute("x1",O),$.setAttribute("y1",q),$.setAttribute("x2",w),$.setAttribute("y2",A),$.append(...r.map(E)),$}var Di=Cf(uf(),1);var q0=()=>{let f=new Map;return(h)=>{var i;let r=(i=f.get(h))!==null&&i!==void 0?i:1;return f.set(h,r+1),`${h}${r}`}};var Lh=(f,h)=>!(f.bottom<h.top||f.top>h.bottom||f.right<h.left||f.left>h.right);function A0(f){return Math.sqrt(f.width**2+f.height**2)}function Ci(f,h,i){return Promise.race([i(),new Promise((r,O)=>setTimeout(()=>O(Error(h)),f))])}var Ii=(f,h)=>(i)=>i[f]===h;function n(f,h){if(!f)throw Error(h)}function E0(f,h){if(!f.ownerDocument.defaultView)throw Error("Element's ownerDocument has no defaultView");let i=f.ownerDocument.defaultView,r=f.parentElement,O=i.getComputedStyle(r);if(!xf(O))return;let w=i.getSelection();n(w,"Could not obtain selection from window. Selection is needed for detecting whitespace collapsing in text.");let q=h.svgDocument.createElementNS(j,"text");mf(O,q);let A=parseInt(O.tabSize,10);q.setAttribute("dominant-baseline","text-after-edge");let E=f.ownerDocument.createRange();E.setStart(f,0),E.setEnd(f,0);while(!0){let $=()=>{if(E.collapsed)return;let U=E.getClientRects()[0];if(!Lh(U,h.options.captureArea))return;let M=h.svgDocument.createElementNS(j,"tspan");M.setAttribute("xml:space","preserve");let K=r.style.userSelect;r.style.userSelect="all";try{w.removeAllRanges(),w.addRange(E),M.textContent=w.toString().replace(/\t/g," ".repeat(A))}finally{r.style.userSelect=K,w.removeAllRanges()}M.setAttribute("x",U.x.toString()),M.setAttribute("y",U.bottom.toString()),M.setAttribute("textLength",U.width.toString()),M.setAttribute("lengthAdjust","spacingAndGlyphs"),q.append(M)};try{E.setEnd(f,E.endOffset+1)}catch(U){if(U.code===DOMException.INDEX_SIZE_ERR){$();break}throw U}let B=E.getClientRects();if(!B[0])return;if(B[1]&&B[0].top!==B[1].top)E.setEnd(f,E.endOffset-1),$(),E.setStart(f,E.endOffset)}h.currentSvgParent.append(q)}var Zw=new Set(["color","dominant-baseline","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","direction","letter-spacing","text-decoration","text-anchor","text-decoration","text-rendering","unicode-bidi","word-spacing","writing-mode","user-select"]);function mf(f,h){for(let i of Zw){let r=f.getPropertyValue(i);if(r)h.setAttribute(i,r)}h.setAttribute("fill",f.color)}function vf(f,h){if(zh(f)){if(!Of(f))return;Ww(f,h)}else if(Hh(f)){let i=f.cloneNode(!0);h.currentSvgParent.append(i)}}var Yw=new Set(["script","style","foreignElement"]),U0=/\burl\(["']?#/;function Ww(f,h){var i,r,O,w;if(Yw.has(f.tagName))return;let q;if(Vh(f)){let A=h.svgDocument.createElementNS(j,"g");q=A,A.classList.add("svg-content",...f.classList),A.dataset.viewBox=(i=f.getAttribute("viewBox"))!==null&&i!==void 0?i:"",A.dataset.width=(r=f.getAttribute("width"))!==null&&r!==void 0?r:"",A.dataset.height=(O=f.getAttribute("height"))!==null&&O!==void 0?O:"";for(let E of f.children){if(!Fi(E))continue;let $=E.ownerDocument!==h.svgDocument&&!((w=f.parentElement)===null||w===void 0?void 0:w.closest("svg"))?E.getScreenCTM():E.getCTM();if(!$)break;if(E.transform.baseVal.numberOfItems>0){E.transform.baseVal.consolidate();let B=E.transform.baseVal.getItem(0).matrix;$=$.multiply(B.inverse())}A.transform.baseVal.appendItem(A.transform.baseVal.createSVGTransformFromMatrix($));break}}else{if(p1(f)&&!h.options.keepLinks)q=h.svgDocument.createElementNS(j,"g");else q=f.cloneNode(!1);for(let B of q.attributes)if(B.localName.startsWith("on"))q.attributes.removeNamedItemNS(B.namespaceURI,B.localName);else if(B.localName==="href"&&B.value.startsWith("javascript:"))q.attributes.removeNamedItemNS(B.namespaceURI,B.localName);let A=f.ownerDocument.defaultView;n(A,"Element's ownerDocument has no defaultView");let E=f.ownerSVGElement;n(E,"Expected element to have ownerSVGElement");let $=A.getComputedStyle(f);if(Fi(f)){if(Cw($,q,E.viewBox.animVal),k1(f))mf($,q)}for(let B of q.attributes)if(B.localName==="href"){if(B.value.startsWith("#"))B.value=B.value.replace("#",`#${h.idPrefix}`)}else if(U0.test(B.value))B.value=$0(B.value,h);for(let B of q.style){let U=q.style.getPropertyValue(B);if(U0.test(U))q.style.setProperty(B,$0(U,h),q.style.getPropertyPriority(B))}}if(q.id)q.id=h.idPrefix+q.id;h.currentSvgParent.append(q);for(let A of f.childNodes)vf(A,{...h,currentSvgParent:q})}var Xw=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","direction","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","image-rendering","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","transform","vector-effect","visibility"],Fw={"alignment-baseline":"auto","baseline-shift":"0px","clip-path":"none","clip-rule":"nonzero","color-interpolation-filters":"linearrgb","color-interpolation":"srgb","color-rendering":"auto","fill-opacity":"1","fill-rule":"nonzero","flood-color":"rgb(0, 0, 0)","flood-opacity":"1","image-rendering":"auto","lighting-color":"rgb(255, 255, 255)","marker-end":"none","marker-mid":"none","marker-start":"none","pointer-events":"auto","shape-rendering":"auto","stop-color":"rgb(0, 0, 0)","stop-opacity":"1","stroke-dasharray":"none","stroke-dashoffset":"0px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-opacity":"1","stroke-width":"1px","vector-effect":"none",color:"",direction:"ltr",fill:"",filter:"none",mask:"none",opacity:"1",stroke:"",transform:"none",visibility:"visible"};function $0(f,{idPrefix:h}){let i=Di.default(f);return i.walk((r)=>{if(r.type!=="function"||r.value!=="url")return;let O=r.nodes[0];if(!O)return;O.value=O.value.replace("#",`#${h}`)}),Di.default.stringify(i.nodes)}function Cw(f,h,i){var r;for(let O of Xw){let w=f.getPropertyValue(O);if(w&&w!==Fw[O]){if(w.endsWith("%"))w=(r=y(w,A0(i)))!==null&&r!==void 0?r:0;h.setAttribute(O,w.toString())}}}function B0(f,h){var i,r,O,w,q,A,E;let $=[];try{let B=f.ownerDocument.defaultView;if(!B)throw Error("Element's ownerDocument has no defaultView");let U=f.getBoundingClientRect(),M=Lh(U,h.options.captureArea),K=B.getComputedStyle(f),X=f.parentElement&&B.getComputedStyle(f.parentElement),Y=a1(f)&&h.options.keepLinks?Gw(f,h):h.svgDocument.createElementNS(j,"g");Y.dataset.tag=f.tagName.toLowerCase();let J=f.id||h.getUniqueId(f.classList[0]||f.tagName.toLowerCase());Y.id=J;let G=f.getAttribute("class");if(G)Y.setAttribute("class",G);if(d(f)&&f.title){let W=h.svgDocument.createElementNS(j,"title");W.textContent=f.title,Y.prepend(W)}let Z=e1(K,X),C=Z?h.stackingLayers[Z]:h.parentStackingLayer;if(C)h.currentSvgParent.setAttribute("aria-owns",[h.currentSvgParent.getAttribute("aria-owns"),Y.id].filter(Boolean).join(" "));let z=h.parentStackingLayer===C?h.currentSvgParent:C;Y.dataset.zIndex=K.zIndex,z.append(Y);let _,R,x;if(yf(K,X))x=Gh(Y),R=x.rootBackgroundAndBorders,_={...h,currentSvgParent:Y,stackingLayers:x,parentStackingLayer:C};else R=Y,_={...h,currentSvgParent:Y,parentStackingLayer:C};if(K.opacity!=="1")Y.setAttribute("opacity",K.opacity);for(let[W,D]of r0(f,h))Y.setAttribute(W,D);if(d(f)&&!f.dataset.pseudoElement){let W=(D,L)=>{let m=B.getComputedStyle(f,D),o=_h.default(m.content).nodes.find(Ii("type","string"));if(!o)return;let v=f.ownerDocument.createElement("span");v.dataset.pseudoElement=D,b1(m,v.style),v.textContent=Af(o.value),f.dataset.pseudoElementOwner=J,$.push(()=>f.removeAttribute("data-pseudo-element-owner"));let s=f.ownerDocument.createElement("style");s.textContent=`[data-pseudo-element-owner="${J}"]${D} { display: none !important; }`,f.before(s),$.push(()=>s.remove()),f[L](v),$.push(()=>v.remove())};W("::before","prepend"),W("::after","append")}if(M)Iw(K,U,R,B,h);if(K.overflow!=="visible"){let W=h.svgDocument.createElementNS(j,"mask");W.id=h.getUniqueId("mask-for-"+J);let D=zi(U,h);D.setAttribute("fill","#ffffff"),W.append(D),Y.append(W),Y.setAttribute("mask",`url(#${W.id})`),_={..._,ancestorMasks:[{mask:W,forElement:f},..._.ancestorMasks]}}if(d(f)&&(K.position==="absolute"||K.position==="fixed")&&h.ancestorMasks.length>0&&f.offsetParent)for(let{mask:W,forElement:D}of h.ancestorMasks)if(f.offsetParent.contains(D)||f.offsetParent===D){let L=zi(U,h);L.setAttribute("fill","#ffffff"),W.append(L)}else break;if(M&&d1(f)&&(f.getAttribute("src")||f.getAttribute("srcset"))){let W=h.svgDocument.createElementNS(j,"image");W.id=`${J}-image`,W.setAttribute("xlink:href",f.currentSrc||f.src);let D=(i=y(K.paddingLeft,U.width))!==null&&i!==void 0?i:0,L=(r=y(K.paddingRight,U.width))!==null&&r!==void 0?r:0,m=(O=y(K.paddingTop,U.height))!==null&&O!==void 0?O:0,o=(w=y(K.paddingBottom,U.height))!==null&&w!==void 0?w:0;if(W.setAttribute("x",(U.x+D).toString()),W.setAttribute("y",(U.y+m).toString()),W.setAttribute("width",(U.width-D-L).toString()),W.setAttribute("height",(U.height-m-o).toString()),f.alt)W.setAttribute("aria-label",f.alt);Y.append(W)}else if(M&&t1(f)&&U.width>0&&U.height>0){if(f.value){let W=h.svgDocument.createElementNS(j,"text");mf(K,W),W.setAttribute("dominant-baseline","central"),W.setAttribute("xml:space","preserve"),W.setAttribute("x",(U.x+((q=y(K.paddingLeft,U.width))!==null&&q!==void 0?q:0)).toString());let D=U.top+((A=y(K.paddingTop,U.height))!==null&&A!==void 0?A:0),L=U.bottom+((E=y(K.paddingBottom,U.height))!==null&&E!==void 0?E:0),m=(D+L)/2;W.setAttribute("y",m.toString()),W.textContent=f.value,_.stackingLayers.inFlowInlineLevelNonPositionedDescendants.append(W)}}else if(M&&Vh(f)&&xf(K))vf(f,{..._,idPrefix:`${J}-`});else{for(let W of f.childNodes)Nh(W,_);if(x)f0(x),h0(x)}}finally{for(let B of $)B()}}function Iw(f,h,i,r,O){var w,q,A,E;if(xf(f)){if(h.width>0&&h.height>0&&(!Ch(f.backgroundColor)||Ih(f)||f.backgroundImage!=="none")){let $=Dw(h,f,O);if(i.append($),f.backgroundImage!=="none"){let B=_h.default(f.backgroundImage).nodes.filter(Ii("type","function")).reverse(),U=f.backgroundPositionX.split(/\s*,\s*/g),M=f.backgroundPositionY.split(/\s*,\s*/g),K=f.backgroundRepeat.split(/\s*,\s*/g);for(let[X,Y]of B.entries()){let J=(w=y(U[X],h.width))!==null&&w!==void 0?w:0,G=(q=y(M[X],h.height))!==null&&q!==void 0?q:0,Z=K[X];if(Y.value==="url"&&Y.nodes[0]){let C=Y.nodes[0],z=O.svgDocument.createElementNS(j,"image");z.id=O.getUniqueId("background-image");let[_="auto",R="auto"]=f.backgroundSize.split(" "),x=(A=y(_,h.width))!==null&&A!==void 0?A:h.width,W=(E=y(R,h.height))!==null&&E!==void 0?E:h.height;if(z.setAttribute("width",x.toString()),z.setAttribute("height",W.toString()),_!=="auto"&&R!=="auto")z.setAttribute("preserveAspectRatio","none");else if(f.backgroundSize==="contain")z.setAttribute("preserveAspectRatio","xMidYMid meet");else if(f.backgroundSize==="cover")z.setAttribute("preserveAspectRatio","xMidYMid slice");let D=new URL(Af(C.value),r.location.href);if(z.setAttribute("xlink:href",D.href),Z==="no-repeat"||J===0&&G===0&&x===h.width&&W===h.height)z.setAttribute("x",h.x.toString()),z.setAttribute("y",h.y.toString()),i.append(z);else{z.setAttribute("x","0"),z.setAttribute("y","0");let L=O.svgDocument.createElementNS(j,"pattern");L.setAttribute("patternUnits","userSpaceOnUse"),L.setAttribute("patternContentUnits","userSpaceOnUse"),L.setAttribute("x",(h.x+J).toString()),L.setAttribute("y",(h.y+G).toString()),L.setAttribute("width",(Z==="repeat"||Z==="repeat-x"?x:x+h.x+J).toString()),L.setAttribute("height",(Z==="repeat"||Z==="repeat-y"?W:W+h.y+G).toString()),L.id=O.getUniqueId("pattern"),L.append(z),$.before(L),$.setAttribute("fill",`url(#${L.id})`)}}else if(/^(-webkit-)?linear-gradient$/.test(Y.value)){let C=_h.default.stringify(Y),z=w0(C,O);if(J!==0||G!==0)z.setAttribute("gradientTransform",`translate(${J}, ${G})`);z.id=O.getUniqueId("linear-gradient"),$.before(z),$.setAttribute("fill",`url(#${z.id})`)}}}}if(!Ih(f))for(let $ of zw(f,h,O))i.append($)}}function zi(f,h){let i=h.svgDocument.createElementNS(j,"rect");return i.setAttribute("width",f.width.toString()),i.setAttribute("height",f.height.toString()),i.setAttribute("x",f.x.toString()),i.setAttribute("y",f.y.toString()),i}function Dw(f,h,i){let r=zi(f,i);if(h.backgroundColor)r.setAttribute("fill",h.backgroundColor);if(Ih(h)){if(r.setAttribute("stroke",h.borderTopColor),r.setAttribute("stroke-width",h.borderTopWidth),h.borderTopStyle==="dashed")r.setAttribute("stroke-dasharray","1")}let O=v1(h,f),w=Dh("top",h,f)[0]*O,q=Dh("left",h,f)[0]*O;if(w!==0)r.setAttribute("rx",w.toString());if(q!==0)r.setAttribute("ry",q.toString());return r}function*zw(f,h,i){for(let r of["top","bottom","right","left"])if(Hw(f,r))yield Vw(f,h,r,i)}function Hw(f,h){return!!f.getPropertyValue(`border-${h}-color`)&&!Ch(f.getPropertyValue(`border-${h}-color`))&&f.getPropertyValue(`border-${h}-width`)!=="0px"}function Vw(f,h,i,r){let O=r.svgDocument.createElementNS(j,"line");O.setAttribute("stroke-linecap","square");let w=f.getPropertyValue(`border-${i}-color`);O.setAttribute("stroke",w),O.setAttribute("stroke-width",f.getPropertyValue(`border-${i}-width`));let q=f.getPropertyValue(`border-${i}-style`);if(q==="inset"&&(i==="top"||i==="left")||q==="outset"&&(i==="right"||i==="bottom")){let A=w.match(/rgba?\((\d+), (\d+), (\d+)(?:, ([\d.]+))?\)/);if(!A)throw Error(`Unexpected color: ${w}`);let E=A.slice(1,4).map(($)=>parseInt($,10)*0.3);if(A[4])E.push(parseFloat(A[4]));O.setAttribute("stroke",`rgba(${E.join(", ")})`)}if(i==="top")O.setAttribute("x1",h.left.toString()),O.setAttribute("x2",h.right.toString()),O.setAttribute("y1",h.top.toString()),O.setAttribute("y2",h.top.toString());else if(i==="left")O.setAttribute("x1",h.left.toString()),O.setAttribute("x2",h.left.toString()),O.setAttribute("y1",h.top.toString()),O.setAttribute("y2",h.bottom.toString());else if(i==="right")O.setAttribute("x1",h.right.toString()),O.setAttribute("x2",h.right.toString()),O.setAttribute("y1",h.top.toString()),O.setAttribute("y2",h.bottom.toString());else if(i==="bottom")O.setAttribute("x1",h.left.toString()),O.setAttribute("x2",h.right.toString()),O.setAttribute("y1",h.bottom.toString()),O.setAttribute("y2",h.bottom.toString());return O}function Gw(f,h){let i=h.svgDocument.createElementNS(j,"a");if(f.href&&!f.href.startsWith("javascript:"))i.setAttribute("href",f.href);if(f.rel)i.setAttribute("rel",f.rel);if(f.target)i.setAttribute("target",f.target);if(f.download)i.setAttribute("download",f.download);return i}function Nh(f,h){if(zh(f))B0(f,h);else if(Hh(f))E0(f,h)}var Hi=Cf(uf(),1);async function Vi(f){await Promise.all([...[...f.children].map(Vi),(async()=>{var h;if(l1(f)){let i=await Ci(1e4,`Timeout fetching ${f.href.baseVal}`,()=>M0(f.href.baseVal));if(i.type==="image/svg+xml"){n(f.ownerDocument,"Expected <image> element to have ownerDocument");let O=new DOMParser().parseFromString(await i.text(),"image/svg+xml").documentElement;O.setAttribute("x",f.getAttribute("x")),O.setAttribute("y",f.getAttribute("y")),O.setAttribute("width",f.getAttribute("width")),O.setAttribute("height",f.getAttribute("height")),O.remove(),f.replaceWith(O);try{let w=f.ownerDocument,q=w.createElementNS(j,"g");n(f.id,"<image> element must have ID"),vf(O,{currentSvgParent:q,svgDocument:w,idPrefix:`${f.id}-`,options:{keepLinks:!1,captureArea:O.viewBox.baseVal}}),q.dataset.tag="img",q.setAttribute("role","img"),O.replaceWith(q)}finally{O.remove()}}else{let r=await J0(i);f.dataset.src=f.href.baseVal,f.setAttribute("xlink:href",r.href)}}else if(s1(f))try{let i=[],r=Kh((h=f.textContent)!==null&&h!==void 0?h:"");r.walkAtRules("font-face",(O)=>{O.walkDecls("src",(w)=>{let q=Hi.default(w.value);q.walk((A)=>{if(A.type==="function"&&A.value==="url"&&A.nodes[0]){let E=A.nodes[0];if(E.type==="string"||E.type==="word")i.push(Lw(E))}}),w.value=Hi.default.stringify(q.nodes)})}),await Promise.all(i),f.textContent=r.toString()}catch(i){console.error("Error inlining stylesheet",f.sheet,i)}})().catch((h)=>{console.error("Error inlining resource for element",f,h)})])}async function Lw(f){try{let h=new URL(Af(f.value)),i=await Ci(1e4,`Timeout fetching ${h.href}`,()=>M0(h.href));if(!i.type.startsWith("font/")&&!i.type.startsWith("application/font-")&&!i.type.startsWith("application/x-font-")&&!i.type.startsWith("image/svg+xml")&&!i.type.startsWith("application/vnd.ms-fontobject"))throw Error(`Invalid response MIME type inlining font at ${h.href}: Expected font MIME type, got ${i.type}`);let r=await J0(i);f.value=r.href}catch(h){console.error(`Error inlining ${f.value}`,h)}}async function M0(f){n(f,"No URL passed");let i=await fetch(f,{headers:new Headers});if(!i.ok)throw Error(i.statusText);return await i.blob()}async function J0(f){let h=new FileReader;return await new Promise((i,r)=>{h.addEventListener("error",()=>r(Error("Error loading resource with FileLoader"))),h.addEventListener("load",()=>i()),h.readAsDataURL(f)}),new URL(h.result)}function _w(f,h){return K0(f.documentElement,h)}function K0(f,h){var i,r,O,w;let q=f.ownerDocument.implementation.createDocument(j,"svg",null),A=q.documentElement;A.setAttribute("xmlns",j),A.setAttribute("xmlns:xlink",c1),A.append(q.createComment(` Generated by dom-to-svg from ${f.ownerDocument.location.href.replace(/--/g,"%2D%2D")} `));let E=q.createElementNS(j,"style");for(let B of f.ownerDocument.styleSheets)try{for(let U of(i=B.rules)!==null&&i!==void 0?i:[]){if(!m1(U))continue;let M=(r=U.parentStyleSheet)===null||r===void 0?void 0:r.href;if(M){let K=Gi.default(U.style.getPropertyValue("src"));K.walk((Y)=>{if(Y.type==="function"&&Y.value==="url"&&Y.nodes[0]){let J=Y.nodes[0];if(J.type==="string"||J.type==="word")J.value=new URL(Af(J.value),M).href}});let X=Kh(U.cssText);X.walkDecls("src",(Y)=>{Y.value=Gi.default.stringify(K.nodes)}),E.append(X.toString()+`
|
|
31
|
+
`)}}}catch(U){console.error("Error resolving @font-face src URLs for styleSheet, skipping",B,U)}A.append(E),Nh(f,{svgDocument:q,currentSvgParent:A,stackingLayers:Gh(A),parentStackingLayer:A,getUniqueId:q0(),labels:new Map,ancestorMasks:[],options:{captureArea:(O=h===null||h===void 0?void 0:h.captureArea)!==null&&O!==void 0?O:f.getBoundingClientRect(),keepLinks:(h===null||h===void 0?void 0:h.keepLinks)!==!1}});let $=(w=h===null||h===void 0?void 0:h.captureArea)!==null&&w!==void 0?w:f.getBoundingClientRect();return A.setAttribute("width",$.width.toString()),A.setAttribute("height",$.height.toString()),A.setAttribute("viewBox",`${$.x} ${$.y} ${$.width} ${$.height}`),q}var{documentToSVG:LA,elementToSVG:_A,inlineResources:NA}=jh;var PA=jh;export{NA as inlineResources,_A as elementToSVG,LA as documentToSVG,PA as default};
|
|
@@ -26,6 +26,11 @@ import {
|
|
|
26
26
|
useState,
|
|
27
27
|
} from 'react';
|
|
28
28
|
|
|
29
|
+
import {
|
|
30
|
+
defaultScopeForFormat,
|
|
31
|
+
isScopeValidForFormat,
|
|
32
|
+
validScopesForFormat,
|
|
33
|
+
} from './exporters/format-scopes.ts';
|
|
29
34
|
import { useSelectionSetOptional } from './use-selection-set.tsx';
|
|
30
35
|
|
|
31
36
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -228,16 +233,6 @@ const SCOPE_META: Record<Scope, { label: string; description: string }> = {
|
|
|
228
233
|
},
|
|
229
234
|
};
|
|
230
235
|
|
|
231
|
-
const VALID_SCOPES_PER_FORMAT: Record<Format, Scope[]> = {
|
|
232
|
-
png: ['selection', 'artboard', 'canvas-as-separate'],
|
|
233
|
-
pdf: ['selection', 'artboard', 'canvas-as-separate'],
|
|
234
|
-
svg: ['selection', 'artboard', 'canvas-as-separate'],
|
|
235
|
-
html: ['artboard', 'canvas-as-separate'],
|
|
236
|
-
pptx: ['canvas-as-separate'],
|
|
237
|
-
canva: ['canvas-as-separate'],
|
|
238
|
-
zip: ['project-raw'],
|
|
239
|
-
};
|
|
240
|
-
|
|
241
236
|
export interface ExportHistoryEntry {
|
|
242
237
|
format: Format;
|
|
243
238
|
scope: Scope;
|
|
@@ -435,7 +430,13 @@ export function ExportDialogProvider({ children }: { children: ReactNode }): Rea
|
|
|
435
430
|
await loadHistory();
|
|
436
431
|
const last = history[0];
|
|
437
432
|
if (!last) return;
|
|
438
|
-
|
|
433
|
+
// ⌘⇧E replays a history entry verbatim. An entry whose (format, scope)
|
|
434
|
+
// pair is no longer legal — or never was — would otherwise be re-sent as
|
|
435
|
+
// an unrenderable job; fall back to that format's default scope.
|
|
436
|
+
const scope = isScopeValidForFormat(last.format, last.scope)
|
|
437
|
+
? last.scope
|
|
438
|
+
: defaultScopeForFormat(last.format);
|
|
439
|
+
await submit(last.format, scope, last.options ?? {});
|
|
439
440
|
}, [history, loadHistory, submit]);
|
|
440
441
|
|
|
441
442
|
const ctxValue = useMemo<ExportDialogValue>(
|
|
@@ -528,16 +529,20 @@ const DialogShell = (() => {
|
|
|
528
529
|
|
|
529
530
|
useEffect(() => {
|
|
530
531
|
if (!openState) return;
|
|
532
|
+
const next = openState.format ?? format;
|
|
531
533
|
if (openState.format) setFormat(openState.format);
|
|
532
|
-
|
|
533
|
-
|
|
534
|
+
// DDR-231 Phase 2 T4 — a hint the incoming FORMAT can't render (a
|
|
535
|
+
// context menu's `project-raw`, a re-opened zip entry) must not be
|
|
536
|
+
// adopted: it resolves to a file-tree target the render service refuses.
|
|
537
|
+
if (openState.scope && isScopeValidForFormat(next, openState.scope)) {
|
|
538
|
+
setScope(openState.scope);
|
|
539
|
+
}
|
|
540
|
+
}, [openState, format]);
|
|
534
541
|
|
|
535
|
-
// Keep the scope valid against the chosen format
|
|
542
|
+
// Keep the scope valid against the chosen format — one shared table,
|
|
543
|
+
// exporters/format-scopes.ts (DDR-231 Phase 2 T4).
|
|
536
544
|
useEffect(() => {
|
|
537
|
-
|
|
538
|
-
if (!valid.includes(scope)) {
|
|
539
|
-
setScope(valid[0] ?? 'artboard');
|
|
540
|
-
}
|
|
545
|
+
if (!isScopeValidForFormat(format, scope)) setScope(defaultScopeForFormat(format));
|
|
541
546
|
}, [format, scope]);
|
|
542
547
|
|
|
543
548
|
if (!openState) {
|
|
@@ -575,7 +580,7 @@ const DialogShell = (() => {
|
|
|
575
580
|
value={scope}
|
|
576
581
|
onChange={(e) => setScope(e.target.value as Scope)}
|
|
577
582
|
>
|
|
578
|
-
{
|
|
583
|
+
{validScopesForFormat(format).map((s) => (
|
|
579
584
|
<option key={s} value={s}>
|
|
580
585
|
{SCOPE_META[s].label}
|
|
581
586
|
</option>
|
|
@@ -70,6 +70,36 @@ async function buildIife(entry: string, globalName: string, cachePath: string):
|
|
|
70
70
|
return cachePath;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* DDR-231 (hybrid export lanes) — bundle the SHARED capture spine
|
|
75
|
+
* (`capture-core.ts`) for injection into the playwright SVG shim's page. The
|
|
76
|
+
* module's top-level side effect assigns `window.__maudeCaptureCore`; the shim
|
|
77
|
+
* injects it as a module script next to the dom-to-svg IIFE and calls the SAME
|
|
78
|
+
* functions the canvas runtime's export-capture bridge imports directly —
|
|
79
|
+
* one source, two hosts (the single-spine rule).
|
|
80
|
+
*/
|
|
81
|
+
let captureCoreReady: Promise<string> | null = null;
|
|
82
|
+
export function getCaptureCoreBundle(): Promise<string> {
|
|
83
|
+
if (captureCoreReady) return captureCoreReady;
|
|
84
|
+
const entry = path.join(DEV_SERVER_ROOT, 'exporters', 'capture-core.ts');
|
|
85
|
+
captureCoreReady = (async () => {
|
|
86
|
+
const built = await Bun.build({
|
|
87
|
+
entrypoints: [entry],
|
|
88
|
+
target: 'browser',
|
|
89
|
+
format: 'esm',
|
|
90
|
+
minify: true,
|
|
91
|
+
conditions: ['browser', 'import'],
|
|
92
|
+
});
|
|
93
|
+
if (!built.success) {
|
|
94
|
+
throw new Error(`capture-core bundle failed: ${built.logs.map((l) => l.message).join('; ')}`);
|
|
95
|
+
}
|
|
96
|
+
const first = built.outputs[0];
|
|
97
|
+
if (!first) throw new Error('capture-core bundle produced no outputs');
|
|
98
|
+
return writeHashedBundle(await first.text(), 'maude-capture-core');
|
|
99
|
+
})();
|
|
100
|
+
return captureCoreReady;
|
|
101
|
+
}
|
|
102
|
+
|
|
73
103
|
/**
|
|
74
104
|
* DDR-148 — build the in-page video encoder (`video-encode-lib.ts`) to a
|
|
75
105
|
* self-contained browser ESM module cached under the OS temp dir. It imports
|
|
@@ -126,7 +126,37 @@ export async function spawnShim(args: string[], opts: SpawnShimOptions): Promise
|
|
|
126
126
|
};
|
|
127
127
|
opts.signal?.addEventListener('abort', onAbort);
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
// Stream the shim's stderr LIVE to this process's stderr (prefixed) as well
|
|
130
|
+
// as buffering it for the exit-code error path. Buffering-only (the old
|
|
131
|
+
// `new Response(proc.stderr).text()`) hid every diagnostic until the child
|
|
132
|
+
// EXITED — so a shim that hung (a headless video encode that never resolves)
|
|
133
|
+
// produced total silence, and even on success the per-stage logs never
|
|
134
|
+
// surfaced. Live teeing makes the render worker's log show what a shim is
|
|
135
|
+
// doing while it does it, which is the only window CI/production has into it.
|
|
136
|
+
const shimTag = path.basename(args[0]).replace(/\.mjs$/, '');
|
|
137
|
+
const stderrPromise = (async () => {
|
|
138
|
+
let acc = '';
|
|
139
|
+
try {
|
|
140
|
+
const reader = proc.stderr.pipeThrough(new TextDecoderStream()).getReader();
|
|
141
|
+
let buf = '';
|
|
142
|
+
for (;;) {
|
|
143
|
+
const { done, value } = await reader.read();
|
|
144
|
+
if (done) break;
|
|
145
|
+
acc += value;
|
|
146
|
+
buf += value;
|
|
147
|
+
let nl = buf.indexOf('\n');
|
|
148
|
+
while (nl !== -1) {
|
|
149
|
+
process.stderr.write(`[${shimTag}] ${buf.slice(0, nl)}\n`);
|
|
150
|
+
buf = buf.slice(nl + 1);
|
|
151
|
+
nl = buf.indexOf('\n');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (buf) process.stderr.write(`[${shimTag}] ${buf}\n`);
|
|
155
|
+
} catch {
|
|
156
|
+
/* stream closed mid-read — the buffered `acc` still feeds the error path */
|
|
157
|
+
}
|
|
158
|
+
return acc;
|
|
159
|
+
})();
|
|
130
160
|
const stdoutLines: string[] = [];
|
|
131
161
|
let buffer = '';
|
|
132
162
|
const consumeLine = (line: string) => {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// capture-chrome.ts — the ONE list of editor-chrome selectors an export must
|
|
2
|
+
// never carry (DDR-231 Phase 2 T2).
|
|
3
|
+
//
|
|
4
|
+
// `_shell.html` has owned this list since the print-marks RCA, as the
|
|
5
|
+
// `<style id="canvas-hide-chrome" media="not all">` block that `?hide-chrome=1`
|
|
6
|
+
// flips to `media="all"`. That works for every host that NAVIGATES to the shell
|
|
7
|
+
// — the desktop / render-worker playwright spine does exactly that.
|
|
8
|
+
//
|
|
9
|
+
// The browser lane does not navigate: it captures the LIVE canvas the member is
|
|
10
|
+
// looking at, where the block is still `media="not all"` and every overlay is
|
|
11
|
+
// visible by design. The first cloud export shipped the artboard's own
|
|
12
|
+
// `.dc-artboard-label` header straight into the SVG because of it.
|
|
13
|
+
//
|
|
14
|
+
// So the list needs a second consumer, and a list with two consumers drifts —
|
|
15
|
+
// this file is the shared source, and `test/canvas-hide-chrome.test.ts` is the
|
|
16
|
+
// tripwire that fails the moment it and the `_shell.html` block disagree in
|
|
17
|
+
// either direction. Add a new overlay in ONE place and the test tells you the
|
|
18
|
+
// other.
|
|
19
|
+
//
|
|
20
|
+
// Pure data + a DOM helper — no Node imports (this file bundles for the
|
|
21
|
+
// browser through capture-core).
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Every editor-affordance selector suppressed during a capture. Kept in the
|
|
25
|
+
* same order and grouping as the `_shell.html` block so a diff of the two
|
|
26
|
+
* reads side by side.
|
|
27
|
+
*/
|
|
28
|
+
export const CAPTURE_HIDDEN_SELECTORS: readonly string[] = [
|
|
29
|
+
// Minimap + zoom + tool palette (and its portaled popovers)
|
|
30
|
+
'.dc-mm',
|
|
31
|
+
'.dc-zoom-tb',
|
|
32
|
+
'.dc-tool-palette',
|
|
33
|
+
'.dc-tp-popover',
|
|
34
|
+
'.dc-tp-shape-popover',
|
|
35
|
+
'.dc-context-menu',
|
|
36
|
+
// Presence — avatars (top-right) + live cursors
|
|
37
|
+
'.dc-participants',
|
|
38
|
+
'.dc-cursor-overlay',
|
|
39
|
+
// Selection + manipulation chrome
|
|
40
|
+
'.dc-cv-halo',
|
|
41
|
+
'.dc-cv-group-bbox',
|
|
42
|
+
'.dc-cv-eq-spacing-layer',
|
|
43
|
+
'.dc-multi-artboard-tb',
|
|
44
|
+
'.dc-elem-ctx-tb',
|
|
45
|
+
'.dc-snap-guide',
|
|
46
|
+
'.dc-snap-pill',
|
|
47
|
+
// Annotations (FigJam-style draw layer)
|
|
48
|
+
'.dc-annot-svg',
|
|
49
|
+
'.dc-annot-ctx',
|
|
50
|
+
'.dc-annot-resize-handle',
|
|
51
|
+
// Comments — pins, threads, composer, @mention popup
|
|
52
|
+
'.cm-layer',
|
|
53
|
+
'.cm-pin',
|
|
54
|
+
'.cm-thread',
|
|
55
|
+
'.cm-composer',
|
|
56
|
+
'.cm-mention-popup',
|
|
57
|
+
// Inspector pin overlay injected into every served shell (inspect.ts)
|
|
58
|
+
'.dgn-pin',
|
|
59
|
+
'#dgn-pin-layer',
|
|
60
|
+
// HUDs + banners
|
|
61
|
+
'.dc-ai-banner',
|
|
62
|
+
'.dc-undo-hud',
|
|
63
|
+
// Activity overlay — live "agent works here" chrome (Phase 13 / DDR-029)
|
|
64
|
+
'.dc-activity-rim',
|
|
65
|
+
// HMR "holding last good" toast (Phase 13.1 / DDR-077)
|
|
66
|
+
'.dc-hmr-holding',
|
|
67
|
+
// Artboard title/label button (editor affordance, not design content)
|
|
68
|
+
'.dc-artboard-label',
|
|
69
|
+
// Print/bleed/trim/margin guide overlay (feature-2-print-artboards)
|
|
70
|
+
'.dc-artboard-guides',
|
|
71
|
+
// Generic opt-in hooks for any future floating overlay
|
|
72
|
+
'[data-dc-overlay]',
|
|
73
|
+
'[data-mdcc-annotations]',
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
/** The CSS rule body both hosts apply. */
|
|
77
|
+
export function captureChromeCss(): string {
|
|
78
|
+
return `${CAPTURE_HIDDEN_SELECTORS.join(',')}{display:none !important}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const STYLE_ID = 'maude-capture-chrome';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Hide editor chrome for the duration of a capture and return the undo.
|
|
85
|
+
*
|
|
86
|
+
* Idempotent and ref-counted: a multi-artboard capture calls this once per
|
|
87
|
+
* target through {@link import('./capture-core.ts').svgForElement}, and nesting
|
|
88
|
+
* (the shim host navigates with `?hide-chrome=1` AND runs this) must not leave
|
|
89
|
+
* a half-removed style behind. The live-canvas host MUST call the returned undo
|
|
90
|
+
* — the member is looking at this DOM.
|
|
91
|
+
*/
|
|
92
|
+
export function applyCaptureChrome(doc: Document): () => void {
|
|
93
|
+
const existing = doc.getElementById(STYLE_ID) as (HTMLStyleElement & { _refs?: number }) | null;
|
|
94
|
+
if (existing) {
|
|
95
|
+
existing._refs = (existing._refs ?? 1) + 1;
|
|
96
|
+
return () => releaseCaptureChrome(doc);
|
|
97
|
+
}
|
|
98
|
+
const style = doc.createElement('style') as HTMLStyleElement & { _refs?: number };
|
|
99
|
+
style.id = STYLE_ID;
|
|
100
|
+
style._refs = 1;
|
|
101
|
+
style.textContent = captureChromeCss();
|
|
102
|
+
(doc.head ?? doc.documentElement).appendChild(style);
|
|
103
|
+
return () => releaseCaptureChrome(doc);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function releaseCaptureChrome(doc: Document): void {
|
|
107
|
+
const style = doc.getElementById(STYLE_ID) as (HTMLStyleElement & { _refs?: number }) | null;
|
|
108
|
+
if (!style) return;
|
|
109
|
+
style._refs = (style._refs ?? 1) - 1;
|
|
110
|
+
if (style._refs <= 0) style.remove();
|
|
111
|
+
}
|