vite-plugin-taro 0.7.6 → 0.7.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/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import{createRequire as e}from"node:module";import t from"@vitejs/plugin-react";import n from"node:path";import{fileURLToPath as r,pathToFileURL as i}from"node:url";import{isCSSRequest as a,normalizePath as o,rolldownVersion as s,transformWithOxc as c,version as l}from"vite";import u from"@tailwindcss/vite";import{RolldownMagicString as d,build as f}from"rolldown";import{parseSync as p}from"rolldown/utils";import{mkdirSync as m,promises as h,readdirSync as g,unlinkSync as _,writeFileSync as v}from"node:fs";import{dev as y,viteReporterPlugin as b}from"rolldown/experimental";import{createHash as x,randomUUID as S}from"node:crypto";import C,{readFile as w,readdir as ee,stat as T}from"node:fs/promises";import{parseAst as te}from"rolldown/parseAst";import{Scanner as E}from"@tailwindcss/oxide";import ne from"node:process";import{performance as D}from"node:perf_hooks";import{channel as re,tracingChannel as ie}from"node:diagnostics_channel";import{RecursiveTemplate as ae,UnRecursiveTemplate as oe,capitalize as se,toCamelCase as ce}from"@tarojs/shared/dist/template.js";import{components as le}from"vite-plugin-taro-runtime/plugin-platform-tt/runtime-utils";import{components as O}from"vite-plugin-taro-runtime/plugin-platform-weapp/runtime-utils";import{components as ue}from"vite-plugin-taro-runtime/plugin-platform-alipay/runtime-utils";var de=Object.create,fe=Object.defineProperty,k=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),he=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=A(t),a=0,o=i.length,s;a<o;a++)s=i[a],!me.call(e,s)&&s!==n&&fe(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=k(t,s))||r.enumerable});return e},ge=(e,t,n)=>(n=e==null?{}:de(pe(e)),he(t||!e||!e.__esModule||!me.call(e,`default`)?fe(n,`default`,{value:e,enumerable:!0}):n,e)),_e=/* @__PURE__ */ e(import.meta.url);const M=e(import.meta.url),ve=n.dirname(M.resolve(`vite-plugin-taro/package.json`)),ye={".ts":{root:`src/runtime`,extension:`.ts`},".js":{root:`dist/runtime`,extension:`.js`}}[n.extname(r(import.meta.url))];function N(...e){return o(n.join(ve,...e))}function P(e){return N(ye.root,`${e}${ye.extension}`)}const be=`virtual:taro/native`;function xe(e){let t=P(e===`h5`?`h5/taro-api`:`client/taro/api`),n=/* @__PURE__ */ new Map([[`virtual:taro/api`,t],[`@tarojs/taro`,t],[`virtual:taro/components`,P(`client/taro/component`)],[be,P(`client/taro/native`)]]);return{name:`vpt:client-taro`,enforce:`pre`,resolveId:e=>n.get(e)}}function Se({appPath:e,projectRoot:t}){return o(n.resolve(t,e))}function Ce({pagePath:e,projectRoot:t}){return o(n.resolve(t,`src`,`${e}.tsx`))}function we(e){return De(Ce(e))}function Te(e){let t=o(e).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`^${t}(?:\\?.*)?$`)}function Ee(e){return o(e.replace(/\?.*$/,``))}function De(e){return`/@fs/${o(n.resolve(e))}`}function Oe(e){return{name:`vpt:conditional-directives`,enforce:`pre`,transform:{filter:{id:{include:/^[^?]*\.(?:[cm]?[jt]sx?|css|s[ac]ss|less|styl)(?:\?.*)?$/,exclude:/^[^?]*\/node_modules\//},code:`#if`},handler(t,n){if(ke(n)&&t.includes(`#if`))return{code:Ae(t,e),map:null}}}}}function ke(e){let t=Ee(e);return!t.includes(`/node_modules/`)&&/\.(?:[cm]?[jt]sx?|css|s[ac]ss|less|styl)$/.test(t)}function Ae(e,t){let n=Array.from(e.matchAll(/[^\n]*(?:\n|$)/g),e=>e[0]),r=[],i=``;for(let e of n){if(!e)continue;let n=je(e),a=e.match(/\r?\n$/)?.[0]??``;if(!n){i+=r.every(e=>e.active)?e:a;continue}if(n.name===`ifdef`||n.name===`ifndef`){let e=r.every(e=>e.active),i=n.target.toLowerCase()===t,a=n.name===`ifdef`?i:!i;r.push({parentActive:e,matched:a,active:e&&a})}else if(n.name===`else`){let e=r.at(-1);e&&(e.active=e.parentActive&&!e.matched)}else r.pop();i+=a}return i}function je(e){let t=e.match(/^\s*(?:(?:\/\/)|(?:\/\*))\s*#(ifdef|ifndef|if|elif|else|endif)\b([^*\r\n]*)/);if(!t)return;let n=t[1];if(n===`if`||n===`elif`)throw Error(`vpt no longer supports #${n}; use #ifdef, #ifndef, or #else`);return{name:n,target:t[2].replace(/\*\/$/,``).trim()}}const Me=`es2018`,Ne=n.dirname(M.resolve(`tailwindcss/package.json`)),Pe=P(`h5/app`);function Fe(e){return typeof e==`object`&&!!e&&typeof e.type==`string`}var Ie=class{scopeTracker;enter;leave;contextEnter={skip:()=>{this._skip=!0},remove:()=>{this._remove=!0},replace:e=>{this._replacement=e}};contextLeave={remove:this.contextEnter.remove,replace:this.contextEnter.replace};_skip=!1;_remove=!1;_replacement=null;constructor(e,t){this.enter=e.enter,this.leave=e.leave,this.scopeTracker=t?.scopeTracker}replace(e,t,n,r){e&&t!==null&&(n===null?e[t]=r:e[t][n]=r)}insert(e,t,n,r){e&&t!==null&&(n===null?e[t]=r:e[t].splice(n,0,r))}remove(e,t,n){e&&t!==null&&(n===null?delete e[t]:e[t].splice(n,1))}},Le=class extends Ie{constructor(e,t){super(e,t)}traverse(e,t,n,r){let i={key:null,index:n??null,ast:e},a=this.scopeTracker,o=this.enter,s=this.leave,c=this.contextEnter,l=this.contextLeave,u=(e,t,n,r,d)=>{a&&a.processNodeEnter(e);let f=e,p=!1,m=!1,h=d;if(o&&!d){let s=this._skip,l=this._remove,u=this._replacement;this._skip=!1,this._remove=!1,this._replacement=null,i.key=n,i.index=r,o.call(c,e,t,i),this._replacement&&!this._remove&&(f=this._replacement,m=!0,this.replace(t,n,r,this._replacement),a&&a.processNodeEnter(f)),this._remove&&(p=!0,f=null,this.remove(t,n,r)),this._skip&&(h=!0),this._skip=s,this._remove=l,this._replacement=u}if((!h||a)&&f)for(let e in f){if(e===`type`||e===`start`||e===`end`)continue;let t=f[e];if(t&&typeof t==`object`){if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];Fe(r)&&u(r,f,e,n,h)===null&&n--}else typeof t.type==`string`&&u(t,f,e,null,h)}}if(a&&(m&&a.processNodeLeave(f),a.processNodeLeave(e)),s&&!d){let a=this._replacement,o=this._remove;this._replacement=null,this._remove=!1,i.key=n,i.index=r,s.call(l,e,t,i),this._replacement&&!this._remove&&(f=this._replacement,p?this.insert(t,n,r,this._replacement):this.replace(t,n,r,this._replacement)),this._remove&&(f=null,this.remove(t,n,r)),this._replacement=a,this._remove=o}return f};if(!Fe(e))return null;if(a&&a.onWalkStart(e),a&&!o&&!s){let t=e=>{a.processNodeEnter(e);for(let n in e){if(n===`type`||n===`start`||n===`end`)continue;let r=e[n];if(r&&typeof r==`object`){if(Array.isArray(r))for(let e=0;e<r.length;e++){let n=r[e];Fe(n)&&t(n)}else typeof r.type==`string`&&t(r)}}a.processNodeLeave(e)};return t(e),e}return u(e,r??null,t??null,n??null,!1)}};function Re(e,t){return new Le({enter:t.enter,leave:t.leave},{scopeTracker:t.scopeTracker}).traverse(e)}const ze=/* @__PURE__ */ new Set(/* @__PURE__ */ `Program.BlockStatement.StaticBlock.TSModuleBlock.FunctionDeclaration.FunctionExpression.ArrowFunctionExpression.VariableDeclaration.ClassDeclaration.ClassExpression.ImportDeclaration.TSEnumDeclaration.TSModuleDeclaration.TSImportEqualsDeclaration.TSDeclareFunction.TSInterfaceDeclaration.TSTypeAliasDeclaration.TSTypeParameter.TSMappedType.TSEnumBody.TSMethodSignature.TSCallSignatureDeclaration.TSConstructSignatureDeclaration.TSFunctionType.TSConstructorType.TSConditionalType.CatchClause.ForStatement.ForOfStatement.ForInStatement.SwitchStatement`.split(`.`));var Be=class{scopeIndexStack=[];scopeKeyStack=[];scopeOwnerStack=[];scopeIndexKey=``;scopes=/* @__PURE__ */ new Map;typeScopes=/* @__PURE__ */ new Map;implicitArguments=/* @__PURE__ */ new WeakMap;options;isFrozen=!1;constructor(e={}){this.options=e}onWalkStart=e=>{this.scopeIndexStack.length===0&&e.type!==`Program`&&this.scopeIndexStack.push(0)};pushScope(e){let t=this.scopeIndexStack[this.scopeIndexStack.length-1];this.scopeKeyStack.push(this.scopeIndexKey),this.scopeOwnerStack.push(e),this.scopeIndexStack.push(0),t!==void 0&&(this.scopeIndexKey=this.scopeIndexKey?`${this.scopeIndexKey}-${t}`:`${t}`)}popScope(){this.scopeOwnerStack.pop(),this.scopeIndexStack.pop(),this.scopeIndexStack[this.scopeIndexStack.length-1]!==void 0&&this.scopeIndexStack[this.scopeIndexStack.length-1]++,this.options.preserveExitedScopes||(this.scopes.delete(this.scopeIndexKey),this.typeScopes.delete(this.scopeIndexKey)),this.scopeIndexKey=this.scopeKeyStack.pop()??``}getScopeKeyAt(e){return e===this.scopeKeyStack.length-1?this.scopeIndexKey:this.scopeKeyStack[e+1]}getVarScopeKey(){let e=this.scopeOwnerStack;for(let t=e.length-1;t>=0;t--)switch(e[t].type){case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`TSDeclareFunction`:case`Program`:case`StaticBlock`:case`TSModuleBlock`:return this.getScopeKeyAt(t)}return``}declareInNamespace(e,t,n){let r=e.get(n.scope);r||(r=/* @__PURE__ */ new Map,e.set(n.scope,r)),r.set(t,n)}declareIdentifier(e,t,n={value:!0}){this.isFrozen||(n.value&&this.declareInNamespace(this.scopes,e,t),n.type&&this.declareInNamespace(this.typeScopes,e,t))}declareFunctionParameter(e,t){if(this.isFrozen)return;let n=Ve(e);for(let e of n)this.declareIdentifier(e.name,new Je(e,this.scopeIndexKey,t))}declarePattern(e,t){if(this.isFrozen)return;let n=t.type===`VariableDeclaration`&&t.kind===`var`?this.getVarScopeKey():this.scopeIndexKey,r=Ve(e);for(let e of r)this.declareIdentifier(e.name,t.type===`VariableDeclaration`?new Ze(e,n,t):t.type===`CatchClause`?new $e(e,n,t):new Je(e,n,t))}processNodeEnter=e=>{if(ze.has(e.type))switch(e.type){case`Program`:case`BlockStatement`:case`StaticBlock`:case`SwitchStatement`:case`TSModuleBlock`:case`TSMethodSignature`:case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:case`TSFunctionType`:case`TSConstructorType`:case`TSConditionalType`:this.pushScope(e);break;case`FunctionDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new Ye(e,this.scopeIndexKey)),this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`FunctionExpression`:this.pushScope(e),e.id?.name&&this.declareIdentifier(e.id.name,new Ye(e,this.scopeIndexKey)),this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`ArrowFunctionExpression`:this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`VariableDeclaration`:for(let t of e.declarations)this.declarePattern(t.id,e);break;case`ClassDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0}),e.typeParameters&&this.pushScope(e);break;case`ClassExpression`:this.pushScope(e),e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0});break;case`ImportDeclaration`:for(let t of e.specifiers){let n=e.importKind===`type`||t.type===`ImportSpecifier`&&t.importKind===`type`;this.declareIdentifier(t.local.name,new Qe(t,this.scopeIndexKey,e),{value:!n,type:!0})}break;case`TSEnumDeclaration`:case`TSModuleDeclaration`:case`TSImportEqualsDeclaration`:if(e.type===`TSModuleDeclaration`&&e.kind===`global`)break;e.id?.type===`Identifier`&&e.id.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0});break;case`TSDeclareFunction`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey)),this.pushScope(e);break;case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{type:!0}),this.pushScope(e);break;case`TSTypeParameter`:e.name?.name&&this.declareIdentifier(e.name.name,new qe(e.name,this.scopeIndexKey),{type:!0});break;case`TSMappedType`:this.pushScope(e),this.declareIdentifier(e.key.name,new qe(e.key,this.scopeIndexKey),{type:!0});break;case`TSEnumBody`:this.pushScope(e);for(let t of e.members)t.id.type===`Identifier`&&this.declareIdentifier(t.id.name,new qe(t.id,this.scopeIndexKey));break;case`CatchClause`:this.pushScope(e),e.param&&this.declarePattern(e.param,e);break;case`ForStatement`:case`ForOfStatement`:case`ForInStatement`:if(this.pushScope(e),e.type===`ForStatement`&&e.init?.type===`VariableDeclaration`)for(let t of e.init.declarations)this.declarePattern(t.id,e.init);else if((e.type===`ForOfStatement`||e.type===`ForInStatement`)&&e.left.type===`VariableDeclaration`)for(let t of e.left.declarations)this.declarePattern(t.id,e.left)}};processNodeLeave=e=>{let t=this.scopeOwnerStack;for(;t.length>0&&t[t.length-1]===e;)this.popScope()};getDeclarationIn(e,t){let n=this.scopeIndexKey;for(;;){let r=e.get(n)?.get(t);if(r)return r;if(!n)return null;let i=n.lastIndexOf(`-`);n=i===-1?``:n.slice(0,i)}}isDeclared(e,t){return this.getDeclaration(e,t)!==null}getDeclaration(e,t){let n=t?.mode??`value`,r=(n===`type`?null:this.getDeclarationIn(this.scopes,e))??(n===`value`?null:this.getDeclarationIn(this.typeScopes,e));if(e===`arguments`&&n!==`type`){let e=this.scopeOwnerStack;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`FunctionDeclaration`||n.type===`FunctionExpression`){let e=this.getScopeKeyAt(t);if(!r||Ge(e,r.scope)){let t=this.implicitArguments.get(n);return t||(t=new Xe(n,e),this.implicitArguments.set(n,t)),t}break}}}return r}getCurrentScope(){return this.scopeIndexKey}isCurrentScopeUnder(e){return Ge(this.scopeIndexKey,e)}freeze(){this.isFrozen=!0,this.scopeIndexStack=[],this.scopeKeyStack=[],this.scopeOwnerStack=[],this.scopeIndexKey=``}};function Ve(e){let t=[];function n(e){switch(e.type){case`Identifier`:t.push(e);break;case`AssignmentPattern`:n(e.left);break;case`RestElement`:n(e.argument);break;case`TSParameterProperty`:n(e.parameter);break;case`ArrayPattern`:for(let t of e.elements)t&&n(t.type===`RestElement`?t.argument:t);break;case`ObjectPattern`:for(let t of e.properties)n(t.type===`RestElement`?t.argument:t.value)}}return n(e),t}function He(e,t){switch(e.type){case`Identifier`:return e===t;case`AssignmentPattern`:return He(e.left,t);case`RestElement`:return He(e.argument,t);case`TSParameterProperty`:return He(e.parameter,t);case`ArrayPattern`:for(let n of e.elements)if(n&&He(n.type===`RestElement`?n.argument:n,t))return!0;return!1;case`ObjectPattern`:for(let n of e.properties)if(He(n.type===`RestElement`?n.argument:n.value,t))return!0;return!1}return!1}function Ue(e,t){if(!t||e.type!==`Identifier`)return!1;switch(t.type){case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`TSDeclareFunction`:case`TSEmptyBodyFunctionExpression`:if(t.type!==`ArrowFunctionExpression`&&t.id===e)return!0;for(let n of t.params)if(He(n,e))return!0;return!1;case`ClassDeclaration`:case`ClassExpression`:return t.id===e;case`VariableDeclarator`:return He(t.id,e);case`CatchClause`:return t.param?He(t.param,e):!1;case`ImportSpecifier`:return t.local===e;case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:return!0;case`TSEnumDeclaration`:case`TSModuleDeclaration`:return t.id===e;case`TSImportEqualsDeclaration`:return t.id===e;case`TSParameterProperty`:return He(t.parameter,e)}return!1}function We(e,t,n){if(!t)return!1;let r=n?.mode??`value`;if(e.type===`JSXIdentifier`){if(r===`type`)return!1;switch(t.type){case`JSXOpeningElement`:case`JSXClosingElement`:return t.name===e&&!/^[a-z]/.test(e.name);case`JSXMemberExpression`:return t.object===e;case`JSXAttribute`:case`JSXNamespacedName`:return!1}return!1}if(e.type!==`Identifier`||Ue(e,t))return!1;switch(t.type){case`MemberExpression`:return r!==`type`&&(t.object===e||t.computed);case`Property`:return r!==`type`&&(t.value===e||t.computed);case`MethodDefinition`:case`PropertyDefinition`:case`AccessorProperty`:case`TSAbstractMethodDefinition`:case`TSAbstractPropertyDefinition`:case`TSAbstractAccessorProperty`:return r!==`type`&&(t.value===e||t.computed);case`ExportSpecifier`:return r!==`type`&&t.local===e;case`ExportAllDeclaration`:return!1;case`ImportSpecifier`:return!1;case`LabeledStatement`:case`BreakStatement`:case`ContinueStatement`:return!1;case`MetaProperty`:return!1;case`ImportAttribute`:return!1;case`TSEnumMember`:return r!==`type`&&t.id!==e;case`TSMappedType`:return!1;case`TSTypeReference`:return r!==`value`;case`TSQualifiedName`:return r!==`value`&&t.left===e;case`TSClassImplements`:case`TSInterfaceHeritage`:return r!==`value`&&t.expression===e;case`TSTypeParameter`:case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:case`TSPropertySignature`:case`TSMethodSignature`:case`TSIndexSignature`:return!1;case`TSFunctionType`:case`TSConstructorType`:case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:return!1}return r!==`type`}function Ge(e,t){return e.length>t.length&&e.startsWith(t)&&(t===``||e[t.length]===`-`)}var Ke=class{scope;node;constructor(e,t){this.node=e,this.scope=t}isUnderScope(e){return Ge(this.scope,e)}},qe=class extends Ke{type=`Identifier`;get start(){return this.node.start}get end(){return this.node.end}},Je=class extends Ke{type=`FunctionParam`;fnNode;constructor(e,t,n){super(e,t),this.fnNode=n}get start(){return this.fnNode.start}get end(){return this.fnNode.end}},Ye=class extends Ke{type=`Function`;get start(){return this.node.start}get end(){return this.node.end}},Xe=class extends Ke{type=`FunctionArguments`;get start(){return this.node.start}get end(){return this.node.end}},Ze=class extends Ke{type=`Variable`;variableNode;constructor(e,t,n){super(e,t),this.variableNode=n}get start(){return this.variableNode.start}get end(){return this.variableNode.end}},Qe=class extends Ke{type=`Import`;importNode;constructor(e,t,n){super(e,t),this.importNode=n}get start(){return this.importNode.start}get end(){return this.importNode.end}},$e=class extends Ke{type=`CatchParam`;catchNode;constructor(e,t,n){super(e,t),this.catchNode=n}get start(){return this.catchNode.start}get end(){return this.catchNode.end}};function et({code:e,filename:t,sourcemap:n,createVisitor:r}){let i=new d(e,{filename:t}),a=p(t,e);if(a.errors.length>0){let e=a.errors.map(e=>e.message).join(`; `);throw Error(`Failed to parse ${t} with Oxc: ${e}`)}Re(a.program,{enter:r(i)});let o=n?i.generateMap({file:t,hires:`boundary`,includeContent:!0,source:t}):null;return{code:i.toString(),map:o?{version:o.version,file:o.file,sources:o.sources,sourcesContent:o.sourcesContent,names:o.names,mappings:o.mappings}:null}}const tt=e(M.resolve(`vite-plugin-taro-runtime/components`)).resolve(`@stencil/core/internal/client`),nt=o(tt);function rt(){return{name:`vpt:h5-stencil-client`,transform:{filter:{id:Te(tt)},handler:it}}}function it(e,t){if(Ee(t)===nt)return et({code:e,filename:t,sourcemap:!0,createVisitor:at})}function at(e){return function(t){if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.callee.computed||t.callee.object.type!==`Identifier`||t.callee.object.name!==`styleContainerNode`||t.callee.property.type!==`Identifier`||t.callee.property.name!==`insertBefore`)return;let[n,r]=t.arguments;if(t.arguments.length!==2||n?.type!==`Identifier`||n.name!==`styleElm`||r?.type!==`CallExpression`||r.callee.type!==`MemberExpression`||r.callee.computed||r.callee.object.type!==`Identifier`||r.callee.object.name!==`styleContainerNode`||r.callee.property.type!==`Identifier`||r.callee.property.name!==`querySelector`)return;let[i]=r.arguments;i?.type===`Literal`&&i.value===`link`&&e.overwrite(r.start,r.end,`scopeId.startsWith("sc-taro-") ? styleContainerNode.querySelector("style,link[rel=\\"stylesheet\\"]") : styleContainerNode.querySelector("link")`)}}function ot(e){return e.config??{}}function st(e){let{subPackages:t,subpackages:n,...r}=e.appJson;return{...r,pages:e.pages.map(e=>e.path)}}function ct(e,t){let n=e.split(t).length-1;if(n!==1)throw Error(`Expected one placeholder ${t}, found ${n}`)}function lt(e,t,n,r){let i=new d(e,{filename:t});for(let[t,r]of Object.entries(n)){ct(e,t);let n=e.indexOf(t);i.overwrite(n,n+t.length,r)}return{code:i.toString(),map:r?ut(i,t):null}}function ut(e,t){let n=e.generateMap({file:t,source:t,includeContent:!0,hires:`boundary`});return{version:n.version,file:n.file,sources:n.sources,sourcesContent:n.sourcesContent,names:n.names,mappings:n.mappings}}function dt({code:e,id:t,options:n,projectRoot:r,sourcemap:i}){return lt(e,t,{__VPT_H5_APP_CONFIG__:JSON.stringify({router:{},...st(n)}),__VPT_H5_ROUTES__:`[${n.pages.map(e=>ft(e,r)).join(`,`)}]`},i??!0)}function ft(e,t){let n=JSON.stringify(we({pagePath:e.path,projectRoot:t}));return`{path:${JSON.stringify(e.path)},load:async function(context,params){const page=await import(${n});return [page,context,params]},...${JSON.stringify(ot(e))}}`}function pt(e){return{resolveId({id:t,projectRoot:n}){if(t===`\0vpt:app-component`)return Se({appPath:e.app,projectRoot:n})},transform({code:t,id:n,projectRoot:r,sourcemap:i=!0}){if(Ee(n)===o(Pe))return dt({code:t,id:n,options:e,projectRoot:r,sourcemap:i})}}}function mt(e){return[...u({optimize:!1}),rt(),ht(e)]}function ht(e){let t=pt(e);return{name:`vpt:h5`,config(){return{define:yt(),resolve:{mainFields:[`main:h5`,`browser`,`module`,`jsnext:main`,`jsnext`],alias:[{find:/^tailwindcss(?=\/|$)/,replacement:Ne},{find:/^(?:@tarojs\/plugin-platform-h5\/dist|vite-plugin-taro-runtime\/plugin-platform-h5)\/runtime\/apis$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`)},{find:/^(?:@tarojs\/plugin-platform-h5\/dist|vite-plugin-taro-runtime\/plugin-platform-h5)\/definition\.json$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/definition.json`)},{find:/^(?:@tarojs\/plugin-framework-react\/dist|vite-plugin-taro-runtime\/plugin-framework-react)\/runtime$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-framework-react/runtime`)},{find:/^(?:@tarojs\/runtime|vite-plugin-taro-runtime\/runtime\/h5)$/,replacement:M.resolve(`vite-plugin-taro-runtime/runtime/h5`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/api$/,replacement:M.resolve(`vite-plugin-taro-runtime/api`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/taro-h5\/dist\/api\/taro$/,replacement:M.resolve(`vite-plugin-taro-runtime/taro-h5/dist/api/taro`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/taro-h5\/dist\/api\/index$/,replacement:M.resolve(`vite-plugin-taro-runtime/taro-h5/dist/api/index`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/global\.css$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/global.css`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/dist\/taro-components\/taro-components\.css$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/dist/taro-components/taro-components.css`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/router$/,replacement:M.resolve(`vite-plugin-taro-runtime/router`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components$/,replacement:M.resolve(`vite-plugin-taro-runtime/components`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/dist\/components$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/dist/components`)}]},optimizeDeps:{include:[`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`,`vite-plugin-taro-runtime/plugin-framework-react/runtime`,`vite-plugin-taro-runtime/router`,`vite-plugin-taro-runtime/runtime/h5`,`react-dom/client`],rolldownOptions:{plugins:[_t(),rt()]}},build:{target:Me}}},resolveId:{order:`pre`,handler(e){return t.resolveId({id:e,projectRoot:this.environment.config.root})}},transform:{order:`pre`,filter:{id:Te(Pe)},handler(e,n){return t.transform({code:e,id:n,projectRoot:this.environment.config.root,sourcemap:!!this.environment.config.build.sourcemap})}},transformIndexHtml:{order:`pre`,handler(){return gt()}}}}function gt(){return[{tag:`script`,attrs:{type:`module`},children:`import '${De(Pe)}'`,injectTo:`body`}]}function _t(){return{name:`vpt:h5-optimizer-taro`,resolveId:vt}}function vt(e){if(e===`@tarojs/taro`)return M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`)}function yt(){return{"process.env.FRAMEWORK":JSON.stringify(`react`),"process.env.SUPPORT_TARO_POLYFILL":JSON.stringify(`disabled`),"process.env.TARO_ENV":JSON.stringify(`h5`),"process.env.TARO_PLATFORM":JSON.stringify(`web`),"process.env.SUPPORT_DINGTALK_NAVIGATE":JSON.stringify(`disabled`),DEPRECATED_ADAPTER_COMPONENT:`false`}}function bt(e){m(e,{recursive:!0});for(let t of g(e,{recursive:!0,withFileTypes:!0})){let e=n.resolve(t.parentPath,t.name);t.isDirectory()||_(e)}}function xt(e,t={}){let{cache:n=/* @__PURE__ */ new Map,getCacheKey:r}=t,i=function(t){let i=r?r(t):t;if(n.has(i))return n.get(i);let a=e.call(this,t);return n.set(i,a),a};return i.cache=n,i}const St=M.resolve(`vite-plugin-taro-runtime/runtime/mini`),Ct=`\0rolldown/runtime.js`,wt=`\0vpt:global-binding`,Tt=`\0vpt:mini-polyfills`,Et=`common/vpt/transport.js`,Dt=[n.resolve(n.dirname(St),`../..`),...[`react`,`react-dom`].map(e=>n.dirname(M.resolve(`${e}/package.json`)))].map(e=>`${o(e)}/`),Ot=`${o(n.dirname(M.resolve(`core-js/package.json`)))}/`,kt=RegExp(`^${Ot.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}`);function At(e){let t=o(e);return t===`\0vpt:mini-polyfills`||t===`\0vpt:global-binding`||t.startsWith(Ot)}function jt(e){let t=o(e);return Dt.some(e=>t.startsWith(e))}function Mt(e){let t=/* @__PURE__ */ new Map([[e.appShell,`native`],[e.componentShell,`native`],[e.customWrapperShell,`native`],[e.pageShell,`native`],[e.appCapsule,`entry-capsule`],[e.componentCapsule,`entry-capsule`],[e.pageCapsule,`entry-capsule`],[e.bootstrap,`amphibious`],[wt,`amphibious`],[Tt,`amphibious`],[Ct,`amphibious`]]);return e=>{for(let n of e.moduleIds){let e=t.get(Ee(n));if(e!==void 0)return e}return`normal-capsule`}}var Nt=/* @__PURE__ */ j(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c}));function Pt(e){return typeof e==`function`}function Ft(e){let t=e(e=>{Error.call(e),e.stack=(/* @__PURE__ */ Error()).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const It=Ft(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
1
+ import{createRequire as e}from"node:module";import t from"@vitejs/plugin-react";import n from"node:path";import{fileURLToPath as r,pathToFileURL as i}from"node:url";import{isCSSRequest as a,normalizePath as o,rolldownVersion as s,transformWithOxc as c,version as l}from"vite";import u from"@tailwindcss/vite";import{RolldownMagicString as d,build as f}from"rolldown";import{parseSync as p}from"rolldown/utils";import{mkdirSync as m,promises as h,readdirSync as g,unlinkSync as _,writeFileSync as v}from"node:fs";import{dev as y,viteReporterPlugin as b}from"rolldown/experimental";import{createHash as x,randomUUID as S}from"node:crypto";import C,{readFile as w,readdir as ee,stat as T}from"node:fs/promises";import{parseAst as te}from"rolldown/parseAst";import{Scanner as E}from"@tailwindcss/oxide";import ne from"node:process";import{performance as D}from"node:perf_hooks";import{channel as re,tracingChannel as ie}from"node:diagnostics_channel";import{RecursiveTemplate as ae,UnRecursiveTemplate as oe,capitalize as se,toCamelCase as ce}from"@tarojs/shared/dist/template.js";import{components as le}from"vite-plugin-taro-runtime/plugin-platform-tt/runtime-utils";import{components as O}from"vite-plugin-taro-runtime/plugin-platform-weapp/runtime-utils";import{components as ue}from"vite-plugin-taro-runtime/plugin-platform-alipay/runtime-utils";var de=Object.create,fe=Object.defineProperty,k=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,pe=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),he=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=A(t),a=0,o=i.length,s;a<o;a++)s=i[a],!me.call(e,s)&&s!==n&&fe(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=k(t,s))||r.enumerable});return e},ge=(e,t,n)=>(n=e==null?{}:de(pe(e)),he(t||!e||!e.__esModule||!me.call(e,`default`)?fe(n,`default`,{value:e,enumerable:!0}):n,e)),_e=/* @__PURE__ */ e(import.meta.url);const M=e(import.meta.url),ve=n.dirname(M.resolve(`vite-plugin-taro/package.json`)),ye={".ts":{root:`src/runtime`,extension:`.ts`},".js":{root:`dist/runtime`,extension:`.js`}}[n.extname(r(import.meta.url))];function N(...e){return o(n.join(ve,...e))}function P(e){return N(ye.root,`${e}${ye.extension}`)}const be=`virtual:taro/native`;function xe(e){let t=P(e===`h5`?`h5/taro-api`:`client/taro/api`),n=/* @__PURE__ */ new Map([[`virtual:taro/api`,t],[`@tarojs/taro`,t],[`virtual:taro/components`,P(`client/taro/component`)],[be,P(`client/taro/native`)]]);return{name:`vpt:client-taro`,enforce:`pre`,resolveId:e=>n.get(e)}}function Se({appPath:e,projectRoot:t}){return o(n.resolve(t,e))}function Ce({pagePath:e,projectRoot:t}){return o(n.resolve(t,`src`,`${e}.tsx`))}function we(e){return De(Ce(e))}function Te(e){let t=o(e).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`^${t}(?:\\?.*)?$`)}function Ee(e){return o(e.replace(/\?.*$/,``))}function De(e){return`/@fs/${o(n.resolve(e))}`}function Oe(e){return{name:`vpt:conditional-directives`,enforce:`pre`,transform:{filter:{id:{include:/^[^?]*\.(?:[cm]?[jt]sx?|css|s[ac]ss|less|styl)(?:\?.*)?$/,exclude:/^[^?]*\/node_modules\//},code:`#if`},handler(t,n){if(ke(n)&&t.includes(`#if`))return{code:Ae(t,e),map:null}}}}}function ke(e){let t=Ee(e);return!t.includes(`/node_modules/`)&&/\.(?:[cm]?[jt]sx?|css|s[ac]ss|less|styl)$/.test(t)}function Ae(e,t){let n=Array.from(e.matchAll(/[^\n]*(?:\n|$)/g),e=>e[0]),r=[],i=``;for(let e of n){if(!e)continue;let n=je(e),a=e.match(/\r?\n$/)?.[0]??``;if(!n){i+=r.every(e=>e.active)?e:a;continue}if(n.name===`ifdef`||n.name===`ifndef`){let e=r.every(e=>e.active),i=n.target.toLowerCase()===t,a=n.name===`ifdef`?i:!i;r.push({parentActive:e,matched:a,active:e&&a})}else if(n.name===`else`){let e=r.at(-1);e&&(e.active=e.parentActive&&!e.matched)}else r.pop();i+=a}return i}function je(e){let t=e.match(/^\s*(?:(?:\/\/)|(?:\/\*))\s*#(ifdef|ifndef|if|elif|else|endif)\b([^*\r\n]*)/);if(!t)return;let n=t[1];if(n===`if`||n===`elif`)throw Error(`vpt no longer supports #${n}; use #ifdef, #ifndef, or #else`);return{name:n,target:t[2].replace(/\*\/$/,``).trim()}}const Me=`es2018`,Ne=n.dirname(M.resolve(`tailwindcss/package.json`)),Pe=P(`h5/app`);function Fe(e){return typeof e==`object`&&!!e&&typeof e.type==`string`}var Ie=class{scopeTracker;enter;leave;contextEnter={skip:()=>{this._skip=!0},remove:()=>{this._remove=!0},replace:e=>{this._replacement=e}};contextLeave={remove:this.contextEnter.remove,replace:this.contextEnter.replace};_skip=!1;_remove=!1;_replacement=null;constructor(e,t){this.enter=e.enter,this.leave=e.leave,this.scopeTracker=t?.scopeTracker}replace(e,t,n,r){e&&t!==null&&(n===null?e[t]=r:e[t][n]=r)}insert(e,t,n,r){e&&t!==null&&(n===null?e[t]=r:e[t].splice(n,0,r))}remove(e,t,n){e&&t!==null&&(n===null?delete e[t]:e[t].splice(n,1))}},Le=class extends Ie{constructor(e,t){super(e,t)}traverse(e,t,n,r){let i={key:null,index:n??null,ast:e},a=this.scopeTracker,o=this.enter,s=this.leave,c=this.contextEnter,l=this.contextLeave,u=(e,t,n,r,d)=>{a&&a.processNodeEnter(e);let f=e,p=!1,m=!1,h=d;if(o&&!d){let s=this._skip,l=this._remove,u=this._replacement;this._skip=!1,this._remove=!1,this._replacement=null,i.key=n,i.index=r,o.call(c,e,t,i),this._replacement&&!this._remove&&(f=this._replacement,m=!0,this.replace(t,n,r,this._replacement),a&&a.processNodeEnter(f)),this._remove&&(p=!0,f=null,this.remove(t,n,r)),this._skip&&(h=!0),this._skip=s,this._remove=l,this._replacement=u}if((!h||a)&&f)for(let e in f){if(e===`type`||e===`start`||e===`end`)continue;let t=f[e];if(t&&typeof t==`object`){if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];Fe(r)&&u(r,f,e,n,h)===null&&n--}else typeof t.type==`string`&&u(t,f,e,null,h)}}if(a&&(m&&a.processNodeLeave(f),a.processNodeLeave(e)),s&&!d){let a=this._replacement,o=this._remove;this._replacement=null,this._remove=!1,i.key=n,i.index=r,s.call(l,e,t,i),this._replacement&&!this._remove&&(f=this._replacement,p?this.insert(t,n,r,this._replacement):this.replace(t,n,r,this._replacement)),this._remove&&(f=null,this.remove(t,n,r)),this._replacement=a,this._remove=o}return f};if(!Fe(e))return null;if(a&&a.onWalkStart(e),a&&!o&&!s){let t=e=>{a.processNodeEnter(e);for(let n in e){if(n===`type`||n===`start`||n===`end`)continue;let r=e[n];if(r&&typeof r==`object`){if(Array.isArray(r))for(let e=0;e<r.length;e++){let n=r[e];Fe(n)&&t(n)}else typeof r.type==`string`&&t(r)}}a.processNodeLeave(e)};return t(e),e}return u(e,r??null,t??null,n??null,!1)}};function Re(e,t){return new Le({enter:t.enter,leave:t.leave},{scopeTracker:t.scopeTracker}).traverse(e)}const ze=/* @__PURE__ */ new Set(/* @__PURE__ */ `Program.BlockStatement.StaticBlock.TSModuleBlock.FunctionDeclaration.FunctionExpression.ArrowFunctionExpression.VariableDeclaration.ClassDeclaration.ClassExpression.ImportDeclaration.TSEnumDeclaration.TSModuleDeclaration.TSImportEqualsDeclaration.TSDeclareFunction.TSInterfaceDeclaration.TSTypeAliasDeclaration.TSTypeParameter.TSMappedType.TSEnumBody.TSMethodSignature.TSCallSignatureDeclaration.TSConstructSignatureDeclaration.TSFunctionType.TSConstructorType.TSConditionalType.CatchClause.ForStatement.ForOfStatement.ForInStatement.SwitchStatement`.split(`.`));var Be=class{scopeIndexStack=[];scopeKeyStack=[];scopeOwnerStack=[];scopeIndexKey=``;scopes=/* @__PURE__ */ new Map;typeScopes=/* @__PURE__ */ new Map;implicitArguments=/* @__PURE__ */ new WeakMap;options;isFrozen=!1;constructor(e={}){this.options=e}onWalkStart=e=>{this.scopeIndexStack.length===0&&e.type!==`Program`&&this.scopeIndexStack.push(0)};pushScope(e){let t=this.scopeIndexStack[this.scopeIndexStack.length-1];this.scopeKeyStack.push(this.scopeIndexKey),this.scopeOwnerStack.push(e),this.scopeIndexStack.push(0),t!==void 0&&(this.scopeIndexKey=this.scopeIndexKey?`${this.scopeIndexKey}-${t}`:`${t}`)}popScope(){this.scopeOwnerStack.pop(),this.scopeIndexStack.pop(),this.scopeIndexStack[this.scopeIndexStack.length-1]!==void 0&&this.scopeIndexStack[this.scopeIndexStack.length-1]++,this.options.preserveExitedScopes||(this.scopes.delete(this.scopeIndexKey),this.typeScopes.delete(this.scopeIndexKey)),this.scopeIndexKey=this.scopeKeyStack.pop()??``}getScopeKeyAt(e){return e===this.scopeKeyStack.length-1?this.scopeIndexKey:this.scopeKeyStack[e+1]}getVarScopeKey(){let e=this.scopeOwnerStack;for(let t=e.length-1;t>=0;t--)switch(e[t].type){case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`TSDeclareFunction`:case`Program`:case`StaticBlock`:case`TSModuleBlock`:return this.getScopeKeyAt(t)}return``}declareInNamespace(e,t,n){let r=e.get(n.scope);r||(r=/* @__PURE__ */ new Map,e.set(n.scope,r)),r.set(t,n)}declareIdentifier(e,t,n={value:!0}){this.isFrozen||(n.value&&this.declareInNamespace(this.scopes,e,t),n.type&&this.declareInNamespace(this.typeScopes,e,t))}declareFunctionParameter(e,t){if(this.isFrozen)return;let n=Ve(e);for(let e of n)this.declareIdentifier(e.name,new Je(e,this.scopeIndexKey,t))}declarePattern(e,t){if(this.isFrozen)return;let n=t.type===`VariableDeclaration`&&t.kind===`var`?this.getVarScopeKey():this.scopeIndexKey,r=Ve(e);for(let e of r)this.declareIdentifier(e.name,t.type===`VariableDeclaration`?new Ze(e,n,t):t.type===`CatchClause`?new $e(e,n,t):new Je(e,n,t))}processNodeEnter=e=>{if(ze.has(e.type))switch(e.type){case`Program`:case`BlockStatement`:case`StaticBlock`:case`SwitchStatement`:case`TSModuleBlock`:case`TSMethodSignature`:case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:case`TSFunctionType`:case`TSConstructorType`:case`TSConditionalType`:this.pushScope(e);break;case`FunctionDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new Ye(e,this.scopeIndexKey)),this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`FunctionExpression`:this.pushScope(e),e.id?.name&&this.declareIdentifier(e.id.name,new Ye(e,this.scopeIndexKey)),this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`ArrowFunctionExpression`:this.pushScope(e);for(let t of e.params)this.declareFunctionParameter(t,e);break;case`VariableDeclaration`:for(let t of e.declarations)this.declarePattern(t.id,e);break;case`ClassDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0}),e.typeParameters&&this.pushScope(e);break;case`ClassExpression`:this.pushScope(e),e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0});break;case`ImportDeclaration`:for(let t of e.specifiers){let n=e.importKind===`type`||t.type===`ImportSpecifier`&&t.importKind===`type`;this.declareIdentifier(t.local.name,new Qe(t,this.scopeIndexKey,e),{value:!n,type:!0})}break;case`TSEnumDeclaration`:case`TSModuleDeclaration`:case`TSImportEqualsDeclaration`:if(e.type===`TSModuleDeclaration`&&e.kind===`global`)break;e.id?.type===`Identifier`&&e.id.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{value:!0,type:!0});break;case`TSDeclareFunction`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey)),this.pushScope(e);break;case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:e.id?.name&&this.declareIdentifier(e.id.name,new qe(e.id,this.scopeIndexKey),{type:!0}),this.pushScope(e);break;case`TSTypeParameter`:e.name?.name&&this.declareIdentifier(e.name.name,new qe(e.name,this.scopeIndexKey),{type:!0});break;case`TSMappedType`:this.pushScope(e),this.declareIdentifier(e.key.name,new qe(e.key,this.scopeIndexKey),{type:!0});break;case`TSEnumBody`:this.pushScope(e);for(let t of e.members)t.id.type===`Identifier`&&this.declareIdentifier(t.id.name,new qe(t.id,this.scopeIndexKey));break;case`CatchClause`:this.pushScope(e),e.param&&this.declarePattern(e.param,e);break;case`ForStatement`:case`ForOfStatement`:case`ForInStatement`:if(this.pushScope(e),e.type===`ForStatement`&&e.init?.type===`VariableDeclaration`)for(let t of e.init.declarations)this.declarePattern(t.id,e.init);else if((e.type===`ForOfStatement`||e.type===`ForInStatement`)&&e.left.type===`VariableDeclaration`)for(let t of e.left.declarations)this.declarePattern(t.id,e.left)}};processNodeLeave=e=>{let t=this.scopeOwnerStack;for(;t.length>0&&t[t.length-1]===e;)this.popScope()};getDeclarationIn(e,t){let n=this.scopeIndexKey;for(;;){let r=e.get(n)?.get(t);if(r)return r;if(!n)return null;let i=n.lastIndexOf(`-`);n=i===-1?``:n.slice(0,i)}}isDeclared(e,t){return this.getDeclaration(e,t)!==null}getDeclaration(e,t){let n=t?.mode??`value`,r=(n===`type`?null:this.getDeclarationIn(this.scopes,e))??(n===`value`?null:this.getDeclarationIn(this.typeScopes,e));if(e===`arguments`&&n!==`type`){let e=this.scopeOwnerStack;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`FunctionDeclaration`||n.type===`FunctionExpression`){let e=this.getScopeKeyAt(t);if(!r||Ge(e,r.scope)){let t=this.implicitArguments.get(n);return t||(t=new Xe(n,e),this.implicitArguments.set(n,t)),t}break}}}return r}getCurrentScope(){return this.scopeIndexKey}isCurrentScopeUnder(e){return Ge(this.scopeIndexKey,e)}freeze(){this.isFrozen=!0,this.scopeIndexStack=[],this.scopeKeyStack=[],this.scopeOwnerStack=[],this.scopeIndexKey=``}};function Ve(e){let t=[];function n(e){switch(e.type){case`Identifier`:t.push(e);break;case`AssignmentPattern`:n(e.left);break;case`RestElement`:n(e.argument);break;case`TSParameterProperty`:n(e.parameter);break;case`ArrayPattern`:for(let t of e.elements)t&&n(t.type===`RestElement`?t.argument:t);break;case`ObjectPattern`:for(let t of e.properties)n(t.type===`RestElement`?t.argument:t.value)}}return n(e),t}function He(e,t){switch(e.type){case`Identifier`:return e===t;case`AssignmentPattern`:return He(e.left,t);case`RestElement`:return He(e.argument,t);case`TSParameterProperty`:return He(e.parameter,t);case`ArrayPattern`:for(let n of e.elements)if(n&&He(n.type===`RestElement`?n.argument:n,t))return!0;return!1;case`ObjectPattern`:for(let n of e.properties)if(He(n.type===`RestElement`?n.argument:n.value,t))return!0;return!1}return!1}function Ue(e,t){if(!t||e.type!==`Identifier`)return!1;switch(t.type){case`FunctionDeclaration`:case`FunctionExpression`:case`ArrowFunctionExpression`:case`TSDeclareFunction`:case`TSEmptyBodyFunctionExpression`:if(t.type!==`ArrowFunctionExpression`&&t.id===e)return!0;for(let n of t.params)if(He(n,e))return!0;return!1;case`ClassDeclaration`:case`ClassExpression`:return t.id===e;case`VariableDeclarator`:return He(t.id,e);case`CatchClause`:return t.param?He(t.param,e):!1;case`ImportSpecifier`:return t.local===e;case`ImportDefaultSpecifier`:case`ImportNamespaceSpecifier`:return!0;case`TSEnumDeclaration`:case`TSModuleDeclaration`:return t.id===e;case`TSImportEqualsDeclaration`:return t.id===e;case`TSParameterProperty`:return He(t.parameter,e)}return!1}function We(e,t,n){if(!t)return!1;let r=n?.mode??`value`;if(e.type===`JSXIdentifier`){if(r===`type`)return!1;switch(t.type){case`JSXOpeningElement`:case`JSXClosingElement`:return t.name===e&&!/^[a-z]/.test(e.name);case`JSXMemberExpression`:return t.object===e;case`JSXAttribute`:case`JSXNamespacedName`:return!1}return!1}if(e.type!==`Identifier`||Ue(e,t))return!1;switch(t.type){case`MemberExpression`:return r!==`type`&&(t.object===e||t.computed);case`Property`:return r!==`type`&&(t.value===e||t.computed);case`MethodDefinition`:case`PropertyDefinition`:case`AccessorProperty`:case`TSAbstractMethodDefinition`:case`TSAbstractPropertyDefinition`:case`TSAbstractAccessorProperty`:return r!==`type`&&(t.value===e||t.computed);case`ExportSpecifier`:return r!==`type`&&t.local===e;case`ExportAllDeclaration`:return!1;case`ImportSpecifier`:return!1;case`LabeledStatement`:case`BreakStatement`:case`ContinueStatement`:return!1;case`MetaProperty`:return!1;case`ImportAttribute`:return!1;case`TSEnumMember`:return r!==`type`&&t.id!==e;case`TSMappedType`:return!1;case`TSTypeReference`:return r!==`value`;case`TSQualifiedName`:return r!==`value`&&t.left===e;case`TSClassImplements`:case`TSInterfaceHeritage`:return r!==`value`&&t.expression===e;case`TSTypeParameter`:case`TSInterfaceDeclaration`:case`TSTypeAliasDeclaration`:case`TSPropertySignature`:case`TSMethodSignature`:case`TSIndexSignature`:return!1;case`TSFunctionType`:case`TSConstructorType`:case`TSCallSignatureDeclaration`:case`TSConstructSignatureDeclaration`:return!1}return r!==`type`}function Ge(e,t){return e.length>t.length&&e.startsWith(t)&&(t===``||e[t.length]===`-`)}var Ke=class{scope;node;constructor(e,t){this.node=e,this.scope=t}isUnderScope(e){return Ge(this.scope,e)}},qe=class extends Ke{type=`Identifier`;get start(){return this.node.start}get end(){return this.node.end}},Je=class extends Ke{type=`FunctionParam`;fnNode;constructor(e,t,n){super(e,t),this.fnNode=n}get start(){return this.fnNode.start}get end(){return this.fnNode.end}},Ye=class extends Ke{type=`Function`;get start(){return this.node.start}get end(){return this.node.end}},Xe=class extends Ke{type=`FunctionArguments`;get start(){return this.node.start}get end(){return this.node.end}},Ze=class extends Ke{type=`Variable`;variableNode;constructor(e,t,n){super(e,t),this.variableNode=n}get start(){return this.variableNode.start}get end(){return this.variableNode.end}},Qe=class extends Ke{type=`Import`;importNode;constructor(e,t,n){super(e,t),this.importNode=n}get start(){return this.importNode.start}get end(){return this.importNode.end}},$e=class extends Ke{type=`CatchParam`;catchNode;constructor(e,t,n){super(e,t),this.catchNode=n}get start(){return this.catchNode.start}get end(){return this.catchNode.end}};function et({code:e,filename:t,sourcemap:n,createVisitor:r}){let i=new d(e,{filename:t}),a=p(t,e);if(a.errors.length>0){let e=a.errors.map(e=>e.message).join(`; `);throw Error(`Failed to parse ${t} with Oxc: ${e}`)}Re(a.program,{enter:r(i)});let o=n?i.generateMap({file:t,hires:`boundary`,includeContent:!0,source:t}):null;return{code:i.toString(),map:o?{version:o.version,file:o.file,sources:o.sources,sourcesContent:o.sourcesContent,names:o.names,mappings:o.mappings}:null}}const tt=e(M.resolve(`vite-plugin-taro-runtime/components`)).resolve(`@stencil/core/internal/client`),nt=o(tt);function rt(){return{name:`vpt:h5-stencil-client`,transform:{filter:{id:Te(tt)},handler:it}}}function it(e,t){if(Ee(t)===nt)return et({code:e,filename:t,sourcemap:!0,createVisitor:at})}function at(e){return function(t){if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.callee.computed||t.callee.object.type!==`Identifier`||t.callee.object.name!==`styleContainerNode`||t.callee.property.type!==`Identifier`||t.callee.property.name!==`insertBefore`)return;let[n,r]=t.arguments;if(t.arguments.length!==2||n?.type!==`Identifier`||n.name!==`styleElm`||r?.type!==`CallExpression`||r.callee.type!==`MemberExpression`||r.callee.computed||r.callee.object.type!==`Identifier`||r.callee.object.name!==`styleContainerNode`||r.callee.property.type!==`Identifier`||r.callee.property.name!==`querySelector`)return;let[i]=r.arguments;i?.type===`Literal`&&i.value===`link`&&e.overwrite(r.start,r.end,`scopeId.startsWith("sc-taro-") ? styleContainerNode.querySelector("style,link[rel=\\"stylesheet\\"]") : styleContainerNode.querySelector("link")`)}}function ot(e){return e.config??{}}function st(e){let{subPackages:t,subpackages:n,...r}=e.appJson;return{...r,pages:e.pages.map(e=>e.path)}}function ct(e,t){let n=e.split(t).length-1;if(n!==1)throw Error(`Expected one placeholder ${t}, found ${n}`)}function lt(e,t,n,r){let i=new d(e,{filename:t});for(let[t,r]of Object.entries(n)){ct(e,t);let n=e.indexOf(t);i.overwrite(n,n+t.length,r)}return{code:i.toString(),map:r?ut(i,t):null}}function ut(e,t){let n=e.generateMap({file:t,source:t,includeContent:!0,hires:`boundary`});return{version:n.version,file:n.file,sources:n.sources,sourcesContent:n.sourcesContent,names:n.names,mappings:n.mappings}}function dt({code:e,id:t,options:n,projectRoot:r,sourcemap:i}){return lt(e,t,{__VPT_H5_APP_CONFIG__:JSON.stringify({router:{},...st(n)}),__VPT_H5_ROUTES__:`[${n.pages.map(e=>ft(e,r)).join(`,`)}]`},i??!0)}function ft(e,t){let n=JSON.stringify(we({pagePath:e.path,projectRoot:t}));return`{path:${JSON.stringify(e.path)},load:async function(context,params){const page=await import(${n});return [page,context,params]},...${JSON.stringify(ot(e))}}`}function pt(e){return{resolveId({id:t,projectRoot:n}){if(t===`\0vpt:app-component`)return Se({appPath:e.app,projectRoot:n})},transform({code:t,id:n,projectRoot:r,sourcemap:i=!0}){if(Ee(n)===o(Pe))return dt({code:t,id:n,options:e,projectRoot:r,sourcemap:i})}}}function mt(e){return[...u({optimize:!1}),rt(),ht(e)]}function ht(e){let t=pt(e);return{name:`vpt:h5`,config(){return{define:yt(),resolve:{mainFields:[`main:h5`,`browser`,`module`,`jsnext:main`,`jsnext`],alias:[{find:/^tailwindcss(?=\/|$)/,replacement:Ne},{find:/^(?:@tarojs\/plugin-platform-h5\/dist|vite-plugin-taro-runtime\/plugin-platform-h5)\/runtime\/apis$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`)},{find:/^(?:@tarojs\/plugin-platform-h5\/dist|vite-plugin-taro-runtime\/plugin-platform-h5)\/definition\.json$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/definition.json`)},{find:/^(?:@tarojs\/plugin-framework-react\/dist|vite-plugin-taro-runtime\/plugin-framework-react)\/runtime$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-framework-react/runtime`)},{find:/^(?:@tarojs\/runtime|vite-plugin-taro-runtime\/runtime\/h5)$/,replacement:M.resolve(`vite-plugin-taro-runtime/runtime/h5`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/api$/,replacement:M.resolve(`vite-plugin-taro-runtime/api`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/taro-h5\/dist\/api\/taro$/,replacement:M.resolve(`vite-plugin-taro-runtime/taro-h5/dist/api/taro`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/taro-h5\/dist\/api\/index$/,replacement:M.resolve(`vite-plugin-taro-runtime/taro-h5/dist/api/index`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/global\.css$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/global.css`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/dist\/taro-components\/taro-components\.css$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/dist/taro-components/taro-components.css`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/router$/,replacement:M.resolve(`vite-plugin-taro-runtime/router`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components$/,replacement:M.resolve(`vite-plugin-taro-runtime/components`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components\/dist\/components$/,replacement:M.resolve(`vite-plugin-taro-runtime/components/dist/components`)}]},optimizeDeps:{include:[`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`,`vite-plugin-taro-runtime/plugin-framework-react/runtime`,`vite-plugin-taro-runtime/router`,`vite-plugin-taro-runtime/runtime/h5`,`react-dom/client`],rolldownOptions:{plugins:[_t(),rt()]}},build:{target:Me}}},resolveId:{order:`pre`,handler(e){return t.resolveId({id:e,projectRoot:this.environment.config.root})}},transform:{order:`pre`,filter:{id:Te(Pe)},handler(e,n){return t.transform({code:e,id:n,projectRoot:this.environment.config.root,sourcemap:!!this.environment.config.build.sourcemap})}},transformIndexHtml:{order:`pre`,handler(){return gt()}}}}function gt(){return[{tag:`script`,attrs:{type:`module`},children:`import '${De(Pe)}'`,injectTo:`body`}]}function _t(){return{name:`vpt:h5-optimizer-taro`,resolveId:vt}}function vt(e){if(e===`@tarojs/taro`)return M.resolve(`vite-plugin-taro-runtime/plugin-platform-h5/runtime/apis`)}function yt(){return{"process.env.FRAMEWORK":JSON.stringify(`react`),"process.env.SUPPORT_TARO_POLYFILL":JSON.stringify(`disabled`),"process.env.TARO_ENV":JSON.stringify(`h5`),"process.env.TARO_PLATFORM":JSON.stringify(`web`),"process.env.SUPPORT_DINGTALK_NAVIGATE":JSON.stringify(`disabled`),DEPRECATED_ADAPTER_COMPONENT:`false`}}function bt(e,t){m(e,{recursive:!0});let r=new Set(t.map(t=>n.resolve(e,t)));for(let t of g(e,{recursive:!0,withFileTypes:!0})){let e=n.resolve(t.parentPath,t.name);!t.isDirectory()&&!r.has(e)&&_(e)}}function xt(e,t={}){let{cache:n=/* @__PURE__ */ new Map,getCacheKey:r}=t,i=function(t){let i=r?r(t):t;if(n.has(i))return n.get(i);let a=e.call(this,t);return n.set(i,a),a};return i.cache=n,i}const St=M.resolve(`vite-plugin-taro-runtime/runtime/mini`),Ct=`\0rolldown/runtime.js`,wt=`\0vpt:global-binding`,Tt=`\0vpt:mini-polyfills`,Et=`common/vpt/transport.js`,Dt=[n.resolve(n.dirname(St),`../..`),...[`react`,`react-dom`].map(e=>n.dirname(M.resolve(`${e}/package.json`)))].map(e=>`${o(e)}/`),Ot=`${o(n.dirname(M.resolve(`core-js/package.json`)))}/`,kt=RegExp(`^${Ot.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}`);function At(e){let t=o(e);return t===`\0vpt:mini-polyfills`||t===`\0vpt:global-binding`||t.startsWith(Ot)}function jt(e){let t=o(e);return Dt.some(e=>t.startsWith(e))}function Mt(e){let t=/* @__PURE__ */ new Map([[e.appShell,`native`],[e.componentShell,`native`],[e.customWrapperShell,`native`],[e.pageShell,`native`],[e.appCapsule,`entry-capsule`],[e.componentCapsule,`entry-capsule`],[e.pageCapsule,`entry-capsule`],[e.bootstrap,`amphibious`],[wt,`amphibious`],[Tt,`amphibious`],[Ct,`amphibious`]]);return e=>{for(let n of e.moduleIds){let e=t.get(Ee(n));if(e!==void 0)return e}return`normal-capsule`}}var Nt=/* @__PURE__ */ j(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c}));function Pt(e){return typeof e==`function`}function Ft(e){let t=e(e=>{Error.call(e),e.stack=(/* @__PURE__ */ Error()).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const It=Ft(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
2
2
  ${t.map((e,t)=>`${t+1}) ${e.toString()}`).join(`
3
- `)}`:``,this.name=`UnsubscriptionError`,this.errors=t});function Lt(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Rt=class e{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t){if(this._parentage=null,Array.isArray(t))for(let e of t)e.remove(this);else t.remove(this)}let{initialTeardown:n}=this;if(Pt(n))try{n()}catch(t){e=t instanceof It?t.errors:[t]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let t of r)try{Vt(t)}catch(t){e??=[],t instanceof It?e=[...e,...t.errors]:e.push(t)}}if(e)throw new It(e)}}add(t){if(t&&t!==this){if(this.closed)Vt(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Lt(t,e)}remove(t){let{_finalizers:n}=this;n&&Lt(n,t),t instanceof e&&t._removeParent(this)}};Rt.EMPTY=(()=>{let e=new Rt;return e.closed=!0,e})();const zt=Rt.EMPTY;function Bt(e){return e instanceof Rt||e&&`closed`in e&&Pt(e.remove)&&Pt(e.add)&&Pt(e.unsubscribe)}function Vt(e){Pt(e)?e():e.unsubscribe()}const Ht={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ut={setTimeout(e,t,...n){let{delegate:r}=Ut;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Ut;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Wt(e){Ut.setTimeout(()=>{let{onUnhandledError:t}=Ht;if(t)t(e);else throw e})}function Gt(){}const Kt=Yt(`C`,void 0,void 0);function qt(e){return Yt(`E`,void 0,e)}function Jt(e){return Yt(`N`,e,void 0)}function Yt(e,t,n){return{kind:e,value:t,error:n}}let Xt=null;function Zt(e){if(Ht.useDeprecatedSynchronousErrorHandling){let t=!Xt;if(t&&(Xt={errorThrown:!1,error:null}),e(),t){let{errorThrown:e,error:t}=Xt;if(Xt=null,e)throw t}}else e()}function Qt(e){Ht.useDeprecatedSynchronousErrorHandling&&Xt&&(Xt.errorThrown=!0,Xt.error=e)}var $t=class extends Rt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Bt(e)&&e.add(this)):this.destination=cn}static create(e,t,n){return new rn(e,t,n)}next(e){this.isStopped?sn(Jt(e),this):this._next(e)}error(e){this.isStopped?sn(qt(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?sn(Kt,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}};const en=Function.prototype.bind;function tn(e,t){return en.call(e,t)}var nn=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(e){an(e)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(e){an(e)}else an(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(e){an(e)}}},rn=class extends $t{constructor(e,t,n){super();let r;if(Pt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let t;this&&Ht.useDeprecatedNextContext?(t=Object.create(e),t.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&tn(e.next,t),error:e.error&&tn(e.error,t),complete:e.complete&&tn(e.complete,t)}):r=e}this.destination=new nn(r)}};function an(e){Ht.useDeprecatedSynchronousErrorHandling?Qt(e):Wt(e)}function on(e){throw e}function sn(e,t){let{onStoppedNotification:n}=Ht;n&&Ut.setTimeout(()=>n(e,t))}const cn={closed:!0,next:Gt,error:on,complete:Gt},ln=typeof Symbol==`function`&&Symbol.observable||`@@observable`;function un(e){return e}function dn(e){return e.length===0?un:e.length===1?e[0]:function(t){return e.reduce((e,t)=>t(e),t)}}var fn=class e{constructor(e){e&&(this._subscribe=e)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(e,t,n){let r=hn(e)?e:new rn(e,t,n);return Zt(()=>{let{operator:e,source:t}=this;r.add(e?e.call(r,t):t?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(t){e.error(t)}}forEach(e,t){return t=pn(t),new t((t,n)=>{let r=new rn({next:t=>{try{e(t)}catch(e){n(e),r.unsubscribe()}},error:n,complete:t});this.subscribe(r)})}_subscribe(e){return this.source?.subscribe(e)}[ln](){return this}pipe(...e){return dn(e)(this)}toPromise(e){return e=pn(e),new e((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}};fn.create=e=>new fn(e);function pn(e){return e??Ht.Promise??Promise}function mn(e){return e&&Pt(e.next)&&Pt(e.error)&&Pt(e.complete)}function hn(e){return e&&e instanceof $t||mn(e)&&Bt(e)}function gn(e){return Pt(e?.lift)}function _n(e){return t=>{if(gn(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function vn(e,t,n,r,i){return new yn(e,t,n,r,i)}var yn=class extends $t{constructor(e,t,n,r,i,a){super(e),this.onFinalize=i,this.shouldUnsubscribe=a,this._next=t?function(n){try{t(n)}catch(t){e.error(t)}}:super._next,this._error=r?function(t){try{r(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)==null||e.call(this))}}};const bn=Ft(e=>function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`});var xn=class extends fn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let t=new Sn(this,this);return t.operator=e,t}_throwIfClosed(){if(this.closed)throw new bn}next(e){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||=Array.from(this.observers);for(let t of this.currentObservers)t.next(e)}})}error(e){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:t}=this;for(;t.length;)t.shift().error(e)}})}complete(){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){return this.observers?.length>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:t,isStopped:n,observers:r}=this;return t||n?zt:(this.currentObservers=null,r.push(e),new Rt(()=>{this.currentObservers=null,Lt(r,e)}))}_checkFinalizedStatuses(e){let{hasError:t,thrownError:n,isStopped:r}=this;t?e.error(n):r&&e.complete()}asObservable(){let e=new fn;return e.source=this,e}};xn.create=(e,t)=>new Sn(e,t);var Sn=class extends xn{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)}_subscribe(e){return this.source?.subscribe(e)??zt}};const Cn={now(){return(Cn.delegate||Date).now()},delegate:void 0};var wn=class extends Rt{constructor(e,t){super()}schedule(e,t=0){return this}};const Tn={setInterval(e,t,...n){let{delegate:r}=Tn;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Tn;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var En=class extends wn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;let n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,n=0){return Tn.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Tn.clearInterval(t)}execute(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Lt(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Dn=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(e,t=0,n){return new this.schedulerActionCtor(this,e).schedule(n,t)}};Dn.now=Cn.now;const On=new class extends Dn{constructor(e,t=Dn.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}(En),kn=new fn(e=>e.complete());function An(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function jn(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Mn(e){return this instanceof Mn?(this.v=e,this):new Mn(e)}function Nn(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Mn?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Pn(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof jn==`function`?jn(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}const Fn=(e=>e&&typeof e.length==`number`&&typeof e!=`function`);function In(e){return Pt(e?.then)}function Ln(e){return Pt(e[ln])}function Rn(e){return Symbol.asyncIterator&&Pt(e?.[Symbol.asyncIterator])}function zn(e){return/* @__PURE__ */ TypeError(`You provided ${typeof e==`object`&&e?`an invalid object`:`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Bn(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}const Vn=Bn();function Hn(e){return Pt(e?.[Vn])}function Un(e){return Nn(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:e,done:n}=yield Mn(t.read());if(n)return yield Mn(void 0);yield yield Mn(e)}}finally{t.releaseLock()}})}function Wn(e){return Pt(e?.getReader)}function Gn(e){if(e instanceof fn)return e;if(e!=null){if(Ln(e))return Kn(e);if(Fn(e))return qn(e);if(In(e))return Jn(e);if(Rn(e))return Xn(e);if(Hn(e))return Yn(e);if(Wn(e))return Zn(e)}throw zn(e)}function Kn(e){return new fn(t=>{let n=e[ln]();if(Pt(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function qn(e){return new fn(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Jn(e){return new fn(t=>{e.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Wt)})}function Yn(e){return new fn(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Xn(e){return new fn(t=>{Qn(e,t).catch(e=>t.error(e))})}function Zn(e){return Xn(Un(e))}function Qn(e,t){var n,r,i,a;return An(this,void 0,void 0,function*(){try{for(n=Pn(e);r=yield n.next(),!r.done;){let e=r.value;if(t.next(e),t.closed)return}}catch(e){i={error:e}}finally{try{r&&!r.done&&(a=n.return)&&(yield a.call(n))}finally{if(i)throw i.error}}t.complete()})}function $n(e,t,n,r=0,i=!1){let a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}const er=Ft(e=>function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`});function tr(e,t){let n=typeof t==`object`;return new Promise((r,i)=>{let a=!1,o;e.subscribe({next:e=>{o=e,a=!0},error:i,complete:()=>{a?r(o):n?r(t.defaultValue):i(new er)}})})}function nr(e,t){let n=typeof t==`object`;return new Promise((r,i)=>{let a=new rn({next:e=>{r(e),a.unsubscribe()},error:i,complete:()=>{n?r(t.defaultValue):i(new er)}});e.subscribe(a)})}function rr(e,t){return _n((n,r)=>{let i=0;n.subscribe(vn(r,n=>{r.next(e.call(t,n,i++))}))})}function ir(e,t,n,r,i,a,o,s){let c=[],l=0,u=0,d=!1,f=()=>{d&&!c.length&&!l&&t.complete()},p=e=>l<r?m(e):c.push(e),m=e=>{a&&t.next(e),l++;let s=!1;Gn(n(e,u++)).subscribe(vn(t,e=>{i?.(e),a?p(e):t.next(e)},()=>{s=!0},void 0,()=>{if(s)try{for(l--;c.length&&l<r;){let e=c.shift();o?$n(t,o,()=>m(e)):m(e)}f()}catch(e){t.error(e)}}))};return e.subscribe(vn(t,p,()=>{d=!0,f()})),()=>{s?.()}}function ar(e,t,n=1/0){return Pt(t)?ar((n,r)=>rr((e,i)=>t(n,e,r,i))(Gn(e(n,r))),n):(typeof t==`number`&&(n=t),_n((t,r)=>ir(t,r,e,n)))}function or(e){return new fn(t=>{Gn(e()).subscribe(t)})}function sr(e,t){return _n((n,r)=>{let i=0;n.subscribe(vn(r,n=>e.call(t,n,i++)&&r.next(n)))})}function cr(e){return _n((t,n)=>{let r=[];return t.subscribe(vn(n,e=>r.push(e),()=>{n.next(r),n.complete()})),Gn(e).subscribe(vn(n,()=>{let e=r;r=[],n.next(e)},Gt)),()=>{r=null}})}function lr(e){return _n((t,n)=>{let r=null,i=!1,a;r=t.subscribe(vn(n,void 0,void 0,o=>{a=Gn(e(o,lr(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function ur(e,t){return Pt(t)?ar(e,t,1):ar(e,1)}function dr(e,t=On){return _n((n,r)=>{let i=null,a=null,o=null,s=()=>{if(i){i.unsubscribe(),i=null;let e=a;a=null,r.next(e)}};function c(){let n=o+e,a=t.now();if(a<n){i=this.schedule(void 0,n-a),r.add(i);return}s()}n.subscribe(vn(r,n=>{a=n,o=t.now(),i||(i=t.schedule(c,e),r.add(i))},()=>{s(),r.complete()},void 0,()=>{a=i=null}))})}var fr=/* @__PURE__ */ ge(Nt(),1);const pr=`vpt:mini-hmr:control`;function mr(e,t,n,r){let i=new xn;return i.pipe(cr(i.pipe(dr(e,t))),sr(e=>e.length>0)).subscribe(e=>{let t=e.findLast(e=>e instanceof Error);t&&r(t);let i=e.filter(e=>!(e instanceof Error));i.length>0&&n({updates:i.flatMap(e=>e.updates),changedFiles:i.flatMap(e=>e.changedFiles)})}),i}const hr=`hmr/info.js`;function gr(e){return`module.exports = Object.freeze(${JSON.stringify(e)});\n`}function _r(e,t){return`@import "./${e}";\n/* vpt-build:${t} */\n`}async function vr(e,t,r){let i=n.join(e,t),a=n.dirname(i);await C.mkdir(a,{recursive:!0});let o=n.join(a,`.${n.basename(i)}.${S()}.txt`);try{await C.writeFile(o,r),await C.rename(o,i)}finally{await C.rm(o,{force:!0})}}const yr=`/__vpt_hmr__`;function br(e,t){let n=new xn,r=tr(n.pipe(ur(n=>n.kind===`barrier`?or(()=>(n.resolve(),kn)):or(()=>Promise.resolve(e(n.action))).pipe(lr(e=>(t(n.action,e),kn))))),{defaultValue:void 0});return{complete:async()=>{n.complete(),await r},next(e){n.next({kind:`action`,action:e})},waitForAction(e){return nr(n.pipe(sr(e=>e.kind===`action`),rr(e=>e.action),sr(e)))},waitForIdle(){let e=Promise.withResolvers();return n.next({kind:`barrier`,resolve:e.resolve}),e.promise}}}function xr({bundledDev:e,server:t,contract:n,hmrMode:r}){let i=e.getRolldownOptions.bind(e);e.getRolldownOptions=async()=>{let e=await i(),a=Cr(e),o=t.config.build.rolldownOptions.output;if(Array.isArray(o))throw Error(`Mini Program development supports one configured Rolldown output.`);let s=o??{},c=new Set(n.options.pages.map(e=>`${e.path}.js`));Object.assign(a,s,{banner:r.createEntryBanner(c),format:`es`,minify:!0,sourcemap:!1}),e.experimental??={};let l=e.experimental.devMode;return e.experimental.devMode={...typeof l==`object`?l:{},implement:await Er(r.runtimeFile),lazy:!1,skipCommonRuntimeInjection:!1},e.plugins=[e.plugins,Tr(t)],wr(e.plugins),e}}function Sr(e){if(!e.output||Array.isArray(e.output))throw Error(`Mini Program development requires exactly one Rolldown output.`);return e.output}function Cr(e){if(Array.isArray(e.output))throw Error(`Mini Program development requires one configured Rolldown output.`);return e.output??={},e.output}function wr(e){if(Array.isArray(e)){e.forEach(wr);return}if(!e||typeof e!=`object`)return;let t=e;t.name===`builtin:vite-transform`&&t._options?.transformOptions&&(t._options.transformOptions.sourcemap=!1)}function Tr(e){let{build:t,logger:r,root:i}=e.config;return b({assetsDir:n.join(t.assetsDir,`/`),chunkLimit:2e3,isLib:!!t.lib,isTty:!(!process.stdout.isTTY||process.env.CI),logInfo:e=>r.info(e),reportCompressedSize:!1,root:i,warnLargeChunks:!1})}const Er=xt(async function(e){return`__rolldown_runtime__ = (function (globalThis) {\n${(await f({input:e,output:{format:`iife`,minify:!1,sourcemap:!1},write:!1})).output[0].code}\nreturn globalThis.__rolldown_runtime__;\n})(__VPT_GLOBAL__);`});var Dr=class{publishPatches;buildId;pendingPatches=[];hasPublishedPatches=!1;constructor(e){this.publishPatches=e}isCurrentBuild(e){return e===this.buildId}startBuild(){let e=this.buildId,t=S();return this.buildId=t,this.pendingPatches.length=0,this.hasPublishedPatches=!1,{buildId:t,previousBuildId:e}}async produce(e){this.buildId!==void 0&&e.length!==0&&(this.pendingPatches.push(...e),await this.publishPatches({buildId:this.buildId,patches:this.pendingPatches}),this.hasPublishedPatches=!0)}isBaselineCurrent(){return!this.hasPublishedPatches}acknowledge(e){let t=0;for(;t<this.pendingPatches.length&&this.pendingPatches[t].seq<=e;)t++;this.pendingPatches.splice(0,t)}};async function Or({server:e,contract:t,styles:n,hmrMode:r}){let i=Fr(e),a=br(m,(n,r)=>Nr(e.config.logger,`${t.options.target} HMR ${n.kind} failed`,r)),o=(t,n)=>vr(e.config.build.outDir,t,n),s=new Dr(e=>f(r.publish?.(e)));e.ws.on(`vpt:mini-hmr:report`,e=>{a.next({kind:`report`,report:e})}),xr({bundledDev:i,server:e,contract:t,hmrMode:r});let c=await _(),l=mr(16,On,e=>{a.next({kind:`publish`,result:e})},e=>{a.next({kind:`error`,error:e})});return i._devEngine=c,i.triggerBundleRegenerationIfStale=async()=>!1,i.listen=async()=>{let e=a.waitForAction(e=>e.kind===`output`);await c.run();let{result:t}=await e;if(t instanceof Error)throw t;await c.ensureCurrentBuildFinish(),await a.waitForIdle()},r.rebuildStrategy===`on-failure`&&e.httpServer?.once(`listening`,()=>{a.next({kind:`listening`})}),jr(e),{close:async()=>{l.complete(),await a.waitForIdle(),await c.ensureCurrentBuildFinish(),await a.complete(),e.ws.send(pr,{kind:`close`,reason:`host closed`})}};async function u(e){await o(t.styles.globalFileName,e)}async function d(){if(r.rebuildStrategy===`always`){let{buildId:e}=s.startBuild();await o(t.styles.appFileName,_r(t.styles.globalFileName,e));return}let n=kr(e);if(n===void 0)return;e.ws.send(pr,{kind:`close`,reason:`build replaced`});let{buildId:i,previousBuildId:a}=s.startBuild();a&&await c.removeClient(a),await c.registerClient(i),await p(i,n)}async function f(t){if(t)switch(t.kind){case`write`:await o(t.fileName,t.source);return;case`event`:e.ws.send(t.event,t.data);return}}async function p(n,i){let a={buildId:n,endpoint:Ar(e,i)};await f(r.reset?.()),await o(hr,gr(a)),await o(t.styles.appFileName,_r(t.styles.globalFileName,n))}function m(n){switch(n.kind){case`publish`:return b(n.result);case`error`:Nr(e.config.logger,`${t.options.target} HMR update failed`,n.error);return;case`report`:return g(n.report);case`output`:if(n.result instanceof Error){Nr(e.config.logger,`${t.options.target} dev build failed`,n.result);return}return h();case`listening`:return d()}}async function h(){await n.finalizeUpdate([],u),await d()}function g(e){if(s.isCurrentBuild(e.buildId))switch(e.kind){case`startup`:s.isBaselineCurrent()||v(`App started after published patches; replacing baseline`);return;case`rebuild`:v(e.reason);return;case`applied`:s.acknowledge(e.seq);return}}async function _(){let e=await i.getRolldownOptions(),t=Sr(e);return y(e,t,{onHmrUpdates:r.rebuildStrategy===`on-failure`?e=>{l.next(e)}:void 0,onOutput:e=>{a.next({kind:`output`,result:e})},rebuildStrategy:r.rebuildStrategy===`always`?`always`:`never`,watch:{skipWrite:!1,useDebounce:!0}})}function v(n){e.config.logger.info(`[vpt] ${t.options.target} full rebuild required${n?`: ${n}`:``}`),c.triggerFullBuild()}async function b(e){let t=[];for(let{clientId:n,update:r}of e.updates)if(s.isCurrentBuild(n)&&r.type!==`Noop`){if(r.type===`Patch`){t.push(r);continue}v(r.reason);return}await x(t)}async function x(e){if(e.length===0)return;let t=await n.finalizeUpdate(e,u);await s.produce(t),await S(t)}async function S(e){for(let t of e)await c.notifyPayloadDelivered(t.filename)}}function kr(e){let t=e.httpServer;if(!t)return;let n=t.address();if(n&&typeof n!=`string`)return n.port}function Ar(e,t){let n=typeof e.config.server.ws==`object`?e.config.server.ws:void 0;if(e.config.server.ws===!1||e.config.base!==`/`||n?.path!==`/__vpt_hmr__`||n?.protocol!==void 0||n?.host!==void 0||n?.port!==void 0||n?.clientPort!==void 0||n?.server!==void 0)throw Error(`Mini Program HMR requires Vite WebSocket on the development HTTP server.`);let r=e.config.server.https?`wss`:`ws`,i=new URL(`${r}://${Pr(e)}:${t}${yr}`);return i.searchParams.set(`token`,e.config.webSocketToken),i.href}function jr(e){e.printUrls=()=>{e.config.logger.info(` ${fr.default.green(`➜`)} ${fr.default.bold(`Mini Program project`)}: ${fr.default.cyan(Mr(e.config.build.outDir,e.config.configFile,e.config.root))}`)}}function Mr(e,t,r){let i=t?n.dirname(t):r,a=n.relative(i,e).replaceAll(`\\`,`/`);return a?a.startsWith(`.`)?a:`./${a}`:`.`}function Nr(e,t,n){Error.isError(n)?e.error(`[vpt] ${t}`,{error:n}):e.error(`[vpt] ${t} with unknown error: ${n}`)}function Pr(e){let t=e.httpServer?.address();return!t||typeof t==`string`||t.address===`0.0.0.0`||t.address===`::`?`127.0.0.1`:t.address.includes(`:`)?`[${t.address}]`:t.address}function Fr(e){let t=e.environments.client.bundledDev;if(!t)throw Error(`Vite did not create the Mini Program bundled-development environment.`);return t}const Ir=`hmr/patches.js`;function Lr(e){return{rebuildStrategy:`on-failure`,runtimeFile:e.devtoolsHmrRuntime,plugins:[Vr(e.pageShell)],createEntryBanner:Br,reset:()=>({kind:`write`,fileName:Ir,source:Rr()}),publish:e=>({kind:`write`,fileName:Ir,source:zr(e.buildId,e.patches)})}}function Rr(){return`module.exports = undefined;
3
+ `)}`:``,this.name=`UnsubscriptionError`,this.errors=t});function Lt(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Rt=class e{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t){if(this._parentage=null,Array.isArray(t))for(let e of t)e.remove(this);else t.remove(this)}let{initialTeardown:n}=this;if(Pt(n))try{n()}catch(t){e=t instanceof It?t.errors:[t]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let t of r)try{Vt(t)}catch(t){e??=[],t instanceof It?e=[...e,...t.errors]:e.push(t)}}if(e)throw new It(e)}}add(t){if(t&&t!==this){if(this.closed)Vt(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Lt(t,e)}remove(t){let{_finalizers:n}=this;n&&Lt(n,t),t instanceof e&&t._removeParent(this)}};Rt.EMPTY=(()=>{let e=new Rt;return e.closed=!0,e})();const zt=Rt.EMPTY;function Bt(e){return e instanceof Rt||e&&`closed`in e&&Pt(e.remove)&&Pt(e.add)&&Pt(e.unsubscribe)}function Vt(e){Pt(e)?e():e.unsubscribe()}const Ht={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ut={setTimeout(e,t,...n){let{delegate:r}=Ut;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Ut;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Wt(e){Ut.setTimeout(()=>{let{onUnhandledError:t}=Ht;if(t)t(e);else throw e})}function Gt(){}const Kt=Yt(`C`,void 0,void 0);function qt(e){return Yt(`E`,void 0,e)}function Jt(e){return Yt(`N`,e,void 0)}function Yt(e,t,n){return{kind:e,value:t,error:n}}let Xt=null;function Zt(e){if(Ht.useDeprecatedSynchronousErrorHandling){let t=!Xt;if(t&&(Xt={errorThrown:!1,error:null}),e(),t){let{errorThrown:e,error:t}=Xt;if(Xt=null,e)throw t}}else e()}function Qt(e){Ht.useDeprecatedSynchronousErrorHandling&&Xt&&(Xt.errorThrown=!0,Xt.error=e)}var $t=class extends Rt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Bt(e)&&e.add(this)):this.destination=cn}static create(e,t,n){return new rn(e,t,n)}next(e){this.isStopped?sn(Jt(e),this):this._next(e)}error(e){this.isStopped?sn(qt(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?sn(Kt,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}};const en=Function.prototype.bind;function tn(e,t){return en.call(e,t)}var nn=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(e){an(e)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(e){an(e)}else an(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(e){an(e)}}},rn=class extends $t{constructor(e,t,n){super();let r;if(Pt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let t;this&&Ht.useDeprecatedNextContext?(t=Object.create(e),t.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&tn(e.next,t),error:e.error&&tn(e.error,t),complete:e.complete&&tn(e.complete,t)}):r=e}this.destination=new nn(r)}};function an(e){Ht.useDeprecatedSynchronousErrorHandling?Qt(e):Wt(e)}function on(e){throw e}function sn(e,t){let{onStoppedNotification:n}=Ht;n&&Ut.setTimeout(()=>n(e,t))}const cn={closed:!0,next:Gt,error:on,complete:Gt},ln=typeof Symbol==`function`&&Symbol.observable||`@@observable`;function un(e){return e}function dn(e){return e.length===0?un:e.length===1?e[0]:function(t){return e.reduce((e,t)=>t(e),t)}}var fn=class e{constructor(e){e&&(this._subscribe=e)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(e,t,n){let r=hn(e)?e:new rn(e,t,n);return Zt(()=>{let{operator:e,source:t}=this;r.add(e?e.call(r,t):t?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(t){e.error(t)}}forEach(e,t){return t=pn(t),new t((t,n)=>{let r=new rn({next:t=>{try{e(t)}catch(e){n(e),r.unsubscribe()}},error:n,complete:t});this.subscribe(r)})}_subscribe(e){return this.source?.subscribe(e)}[ln](){return this}pipe(...e){return dn(e)(this)}toPromise(e){return e=pn(e),new e((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}};fn.create=e=>new fn(e);function pn(e){return e??Ht.Promise??Promise}function mn(e){return e&&Pt(e.next)&&Pt(e.error)&&Pt(e.complete)}function hn(e){return e&&e instanceof $t||mn(e)&&Bt(e)}function gn(e){return Pt(e?.lift)}function _n(e){return t=>{if(gn(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function vn(e,t,n,r,i){return new yn(e,t,n,r,i)}var yn=class extends $t{constructor(e,t,n,r,i,a){super(e),this.onFinalize=i,this.shouldUnsubscribe=a,this._next=t?function(n){try{t(n)}catch(t){e.error(t)}}:super._next,this._error=r?function(t){try{r(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)==null||e.call(this))}}};const bn=Ft(e=>function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`});var xn=class extends fn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let t=new Sn(this,this);return t.operator=e,t}_throwIfClosed(){if(this.closed)throw new bn}next(e){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||=Array.from(this.observers);for(let t of this.currentObservers)t.next(e)}})}error(e){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:t}=this;for(;t.length;)t.shift().error(e)}})}complete(){Zt(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){return this.observers?.length>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:t,isStopped:n,observers:r}=this;return t||n?zt:(this.currentObservers=null,r.push(e),new Rt(()=>{this.currentObservers=null,Lt(r,e)}))}_checkFinalizedStatuses(e){let{hasError:t,thrownError:n,isStopped:r}=this;t?e.error(n):r&&e.complete()}asObservable(){let e=new fn;return e.source=this,e}};xn.create=(e,t)=>new Sn(e,t);var Sn=class extends xn{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)}_subscribe(e){return this.source?.subscribe(e)??zt}};const Cn={now(){return(Cn.delegate||Date).now()},delegate:void 0};var wn=class extends Rt{constructor(e,t){super()}schedule(e,t=0){return this}};const Tn={setInterval(e,t,...n){let{delegate:r}=Tn;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Tn;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var En=class extends wn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;let n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,n=0){return Tn.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Tn.clearInterval(t)}execute(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Lt(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Dn=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(e,t=0,n){return new this.schedulerActionCtor(this,e).schedule(n,t)}};Dn.now=Cn.now;const On=new class extends Dn{constructor(e,t=Dn.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}(En),kn=new fn(e=>e.complete());function An(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function jn(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Mn(e){return this instanceof Mn?(this.v=e,this):new Mn(e)}function Nn(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Mn?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Pn(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof jn==`function`?jn(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}const Fn=(e=>e&&typeof e.length==`number`&&typeof e!=`function`);function In(e){return Pt(e?.then)}function Ln(e){return Pt(e[ln])}function Rn(e){return Symbol.asyncIterator&&Pt(e?.[Symbol.asyncIterator])}function zn(e){return/* @__PURE__ */ TypeError(`You provided ${typeof e==`object`&&e?`an invalid object`:`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Bn(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}const Vn=Bn();function Hn(e){return Pt(e?.[Vn])}function Un(e){return Nn(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:e,done:n}=yield Mn(t.read());if(n)return yield Mn(void 0);yield yield Mn(e)}}finally{t.releaseLock()}})}function Wn(e){return Pt(e?.getReader)}function Gn(e){if(e instanceof fn)return e;if(e!=null){if(Ln(e))return Kn(e);if(Fn(e))return qn(e);if(In(e))return Jn(e);if(Rn(e))return Xn(e);if(Hn(e))return Yn(e);if(Wn(e))return Zn(e)}throw zn(e)}function Kn(e){return new fn(t=>{let n=e[ln]();if(Pt(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function qn(e){return new fn(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Jn(e){return new fn(t=>{e.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Wt)})}function Yn(e){return new fn(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Xn(e){return new fn(t=>{Qn(e,t).catch(e=>t.error(e))})}function Zn(e){return Xn(Un(e))}function Qn(e,t){var n,r,i,a;return An(this,void 0,void 0,function*(){try{for(n=Pn(e);r=yield n.next(),!r.done;){let e=r.value;if(t.next(e),t.closed)return}}catch(e){i={error:e}}finally{try{r&&!r.done&&(a=n.return)&&(yield a.call(n))}finally{if(i)throw i.error}}t.complete()})}function $n(e,t,n,r=0,i=!1){let a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}const er=Ft(e=>function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`});function tr(e,t){let n=typeof t==`object`;return new Promise((r,i)=>{let a=!1,o;e.subscribe({next:e=>{o=e,a=!0},error:i,complete:()=>{a?r(o):n?r(t.defaultValue):i(new er)}})})}function nr(e,t){let n=typeof t==`object`;return new Promise((r,i)=>{let a=new rn({next:e=>{r(e),a.unsubscribe()},error:i,complete:()=>{n?r(t.defaultValue):i(new er)}});e.subscribe(a)})}function rr(e,t){return _n((n,r)=>{let i=0;n.subscribe(vn(r,n=>{r.next(e.call(t,n,i++))}))})}function ir(e,t,n,r,i,a,o,s){let c=[],l=0,u=0,d=!1,f=()=>{d&&!c.length&&!l&&t.complete()},p=e=>l<r?m(e):c.push(e),m=e=>{a&&t.next(e),l++;let s=!1;Gn(n(e,u++)).subscribe(vn(t,e=>{i?.(e),a?p(e):t.next(e)},()=>{s=!0},void 0,()=>{if(s)try{for(l--;c.length&&l<r;){let e=c.shift();o?$n(t,o,()=>m(e)):m(e)}f()}catch(e){t.error(e)}}))};return e.subscribe(vn(t,p,()=>{d=!0,f()})),()=>{s?.()}}function ar(e,t,n=1/0){return Pt(t)?ar((n,r)=>rr((e,i)=>t(n,e,r,i))(Gn(e(n,r))),n):(typeof t==`number`&&(n=t),_n((t,r)=>ir(t,r,e,n)))}function or(e){return new fn(t=>{Gn(e()).subscribe(t)})}function sr(e,t){return _n((n,r)=>{let i=0;n.subscribe(vn(r,n=>e.call(t,n,i++)&&r.next(n)))})}function cr(e){return _n((t,n)=>{let r=[];return t.subscribe(vn(n,e=>r.push(e),()=>{n.next(r),n.complete()})),Gn(e).subscribe(vn(n,()=>{let e=r;r=[],n.next(e)},Gt)),()=>{r=null}})}function lr(e){return _n((t,n)=>{let r=null,i=!1,a;r=t.subscribe(vn(n,void 0,void 0,o=>{a=Gn(e(o,lr(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function ur(e,t){return Pt(t)?ar(e,t,1):ar(e,1)}function dr(e,t=On){return _n((n,r)=>{let i=null,a=null,o=null,s=()=>{if(i){i.unsubscribe(),i=null;let e=a;a=null,r.next(e)}};function c(){let n=o+e,a=t.now();if(a<n){i=this.schedule(void 0,n-a),r.add(i);return}s()}n.subscribe(vn(r,n=>{a=n,o=t.now(),i||(i=t.schedule(c,e),r.add(i))},()=>{s(),r.complete()},void 0,()=>{a=i=null}))})}var fr=/* @__PURE__ */ ge(Nt(),1);const pr=`vpt:mini-hmr:control`;function mr(e,t,n,r){let i=new xn;return i.pipe(cr(i.pipe(dr(e,t))),sr(e=>e.length>0)).subscribe(e=>{let t=e.findLast(e=>e instanceof Error);t&&r(t);let i=e.filter(e=>!(e instanceof Error));i.length>0&&n({updates:i.flatMap(e=>e.updates),changedFiles:i.flatMap(e=>e.changedFiles)})}),i}const hr=`hmr/info.js`;function gr(e){return`module.exports = Object.freeze(${JSON.stringify(e)});\n`}function _r(e,t){return`@import "./${e}";\n/* vpt-build:${t} */\n`}async function vr(e,t,r){let i=n.join(e,t),a=n.dirname(i);await C.mkdir(a,{recursive:!0});let o=n.join(a,`.${n.basename(i)}.${S()}.txt`);try{await C.writeFile(o,r),await C.rename(o,i)}finally{await C.rm(o,{force:!0})}}const yr=`/__vpt_hmr__`;function br(e,t){let n=new xn,r=tr(n.pipe(ur(n=>n.kind===`barrier`?or(()=>(n.resolve(),kn)):or(()=>Promise.resolve(e(n.action))).pipe(lr(e=>(t(n.action,e),kn))))),{defaultValue:void 0});return{complete:async()=>{n.complete(),await r},next(e){n.next({kind:`action`,action:e})},waitForAction(e){return nr(n.pipe(sr(e=>e.kind===`action`),rr(e=>e.action),sr(e)))},waitForIdle(){let e=Promise.withResolvers();return n.next({kind:`barrier`,resolve:e.resolve}),e.promise}}}function xr({bundledDev:e,server:t,contract:n,hmrMode:r}){let i=e.getRolldownOptions.bind(e);e.getRolldownOptions=async()=>{let e=await i(),a=Cr(e),o=t.config.build.rolldownOptions.output;if(Array.isArray(o))throw Error(`Mini Program development supports one configured Rolldown output.`);let s=o??{},c=new Set(n.options.pages.map(e=>`${e.path}.js`));Object.assign(a,s,{banner:r.createEntryBanner(c),format:`es`,minify:!0,keepNames:!0,sourcemap:!1}),e.experimental??={};let l=e.experimental.devMode;return e.experimental.devMode={...typeof l==`object`?l:{},implement:await Er(r.runtimeFile),lazy:!1,skipCommonRuntimeInjection:!1},e.plugins=[e.plugins,Tr(t)],wr(e.plugins),e}}function Sr(e){if(!e.output||Array.isArray(e.output))throw Error(`Mini Program development requires exactly one Rolldown output.`);return e.output}function Cr(e){if(Array.isArray(e.output))throw Error(`Mini Program development requires one configured Rolldown output.`);return e.output??={},e.output}function wr(e){if(Array.isArray(e)){e.forEach(wr);return}if(!e||typeof e!=`object`)return;let t=e;t.name===`builtin:vite-transform`&&t._options?.transformOptions&&(t._options.transformOptions.sourcemap=!1)}function Tr(e){let{build:t,logger:r,root:i}=e.config;return b({assetsDir:n.join(t.assetsDir,`/`),chunkLimit:2e3,isLib:!!t.lib,isTty:!(!process.stdout.isTTY||process.env.CI),logInfo:e=>r.info(e),reportCompressedSize:!1,root:i,warnLargeChunks:!1})}const Er=xt(async function(e){return`__rolldown_runtime__ = (function (globalThis) {\n${(await f({input:e,output:{format:`iife`,minify:!1,sourcemap:!1},write:!1})).output[0].code}\nreturn globalThis.__rolldown_runtime__;\n})(__VPT_GLOBAL__);`});var Dr=class{publishPatches;buildId;pendingPatches=[];hasPublishedPatches=!1;constructor(e){this.publishPatches=e}isCurrentBuild(e){return e===this.buildId}startBuild(){let e=this.buildId,t=S();return this.buildId=t,this.pendingPatches.length=0,this.hasPublishedPatches=!1,{buildId:t,previousBuildId:e}}async produce(e){this.buildId!==void 0&&e.length!==0&&(this.pendingPatches.push(...e),await this.publishPatches({buildId:this.buildId,patches:this.pendingPatches}),this.hasPublishedPatches=!0)}isBaselineCurrent(){return!this.hasPublishedPatches}acknowledge(e){let t=0;for(;t<this.pendingPatches.length&&this.pendingPatches[t].seq<=e;)t++;this.pendingPatches.splice(0,t)}};async function Or({server:e,contract:t,styles:n,hmrMode:r}){let i=Fr(e),a=br(m,(n,r)=>Nr(e.config.logger,`${t.options.target} HMR ${n.kind} failed`,r)),o=(t,n)=>vr(e.config.build.outDir,t,n),s=new Dr(e=>f(r.publish?.(e)));e.ws.on(`vpt:mini-hmr:report`,e=>{a.next({kind:`report`,report:e})}),xr({bundledDev:i,server:e,contract:t,hmrMode:r});let c=await _(),l=mr(16,On,e=>{a.next({kind:`publish`,result:e})},e=>{a.next({kind:`error`,error:e})});return i._devEngine=c,i.triggerBundleRegenerationIfStale=async()=>!1,i.listen=async()=>{let e=a.waitForAction(e=>e.kind===`output`);await c.run();let{result:t}=await e;if(t instanceof Error)throw t;await c.ensureCurrentBuildFinish(),await a.waitForIdle()},r.rebuildStrategy===`on-failure`&&e.httpServer?.once(`listening`,()=>{a.next({kind:`listening`})}),jr(e),{close:async()=>{l.complete(),await a.waitForIdle(),await c.ensureCurrentBuildFinish(),await a.complete(),e.ws.send(pr,{kind:`close`,reason:`host closed`})}};async function u(e){await o(t.styles.globalFileName,e)}async function d(){if(r.rebuildStrategy===`always`){let{buildId:e}=s.startBuild();await o(t.styles.appFileName,_r(t.styles.globalFileName,e));return}let n=kr(e);if(n===void 0)return;e.ws.send(pr,{kind:`close`,reason:`build replaced`});let{buildId:i,previousBuildId:a}=s.startBuild();a&&await c.removeClient(a),await c.registerClient(i),await p(i,n)}async function f(t){if(t)switch(t.kind){case`write`:await o(t.fileName,t.source);return;case`event`:e.ws.send(t.event,t.data);return}}async function p(n,i){let a={buildId:n,endpoint:Ar(e,i)};await f(r.reset?.()),await o(hr,gr(a)),await o(t.styles.appFileName,_r(t.styles.globalFileName,n))}function m(n){switch(n.kind){case`publish`:return b(n.result);case`error`:Nr(e.config.logger,`${t.options.target} HMR update failed`,n.error);return;case`report`:return g(n.report);case`output`:if(n.result instanceof Error){Nr(e.config.logger,`${t.options.target} dev build failed`,n.result);return}return h();case`listening`:return d()}}async function h(){await n.finalizeUpdate([],u),await d()}function g(e){if(s.isCurrentBuild(e.buildId))switch(e.kind){case`startup`:s.isBaselineCurrent()||v(`App started after published patches; replacing baseline`);return;case`rebuild`:v(e.reason);return;case`applied`:s.acknowledge(e.seq);return}}async function _(){let e=await i.getRolldownOptions(),t=Sr(e);return y(e,t,{onHmrUpdates:r.rebuildStrategy===`on-failure`?e=>{l.next(e)}:void 0,onOutput:e=>{a.next({kind:`output`,result:e})},rebuildStrategy:r.rebuildStrategy===`always`?`always`:`never`,watch:{skipWrite:!1,useDebounce:!0}})}function v(n){e.config.logger.info(`[vpt] ${t.options.target} full rebuild required${n?`: ${n}`:``}`),c.triggerFullBuild()}async function b(e){let t=[];for(let{clientId:n,update:r}of e.updates)if(s.isCurrentBuild(n)&&r.type!==`Noop`){if(r.type===`Patch`){t.push(r);continue}v(r.reason);return}await x(t)}async function x(e){if(e.length===0)return;let t=await n.finalizeUpdate(e,u);await s.produce(t),await S(t)}async function S(e){for(let t of e)await c.notifyPayloadDelivered(t.filename)}}function kr(e){let t=e.httpServer;if(!t)return;let n=t.address();if(n&&typeof n!=`string`)return n.port}function Ar(e,t){let n=typeof e.config.server.ws==`object`?e.config.server.ws:void 0;if(e.config.server.ws===!1||e.config.base!==`/`||n?.path!==`/__vpt_hmr__`||n?.protocol!==void 0||n?.host!==void 0||n?.port!==void 0||n?.clientPort!==void 0||n?.server!==void 0)throw Error(`Mini Program HMR requires Vite WebSocket on the development HTTP server.`);let r=e.config.server.https?`wss`:`ws`,i=new URL(`${r}://${Pr(e)}:${t}${yr}`);return i.searchParams.set(`token`,e.config.webSocketToken),i.href}function jr(e){e.printUrls=()=>{e.config.logger.info(` ${fr.default.green(`➜`)} ${fr.default.bold(`Mini Program project`)}: ${fr.default.cyan(Mr(e.config.build.outDir,e.config.configFile,e.config.root))}`)}}function Mr(e,t,r){let i=t?n.dirname(t):r,a=n.relative(i,e).replaceAll(`\\`,`/`);return a?a.startsWith(`.`)?a:`./${a}`:`.`}function Nr(e,t,n){Error.isError(n)?e.error(`[vpt] ${t}`,{error:n}):e.error(`[vpt] ${t} with unknown error: ${n}`)}function Pr(e){let t=e.httpServer?.address();return!t||typeof t==`string`||t.address===`0.0.0.0`||t.address===`::`?`127.0.0.1`:t.address.includes(`:`)?`[${t.address}]`:t.address}function Fr(e){let t=e.environments.client.bundledDev;if(!t)throw Error(`Vite did not create the Mini Program bundled-development environment.`);return t}const Ir=`hmr/patches.js`;function Lr(e){return{rebuildStrategy:`on-failure`,runtimeFile:e.devtoolsHmrRuntime,plugins:[Vr(e.pageShell)],createEntryBanner:Br,reset:()=>({kind:`write`,fileName:Ir,source:Rr()}),publish:e=>({kind:`write`,fileName:Ir,source:zr(e.buildId,e.patches)})}}function Rr(){return`module.exports = undefined;
4
4
  `}function zr(e,t){if(t.length===0)throw Error(`Cannot render an empty Mini Program patch range.`);let n=t.map(e=>`{seq: ${e.seq}, changedIds: ${JSON.stringify(e.changedIds)}, factory: (__rolldown_runtime__) => {\n${e.code}\n}}`);return`module.exports = {buildId: ${JSON.stringify(e)}, patches: [${n.join(`,`)}]};\n`}function Br(e){return t=>t.name===`app.js`?`__rolldown_runtime__.initialize(require('./${hr}'));\n`:e.has(t.name)?`__rolldown_runtime__.applyPatches(require('${n.posix.relative(n.posix.dirname(t.fileName),Ir)}'));\n`:``}function Vr(e){return{name:`vpt:mini-page-shell-hmr`,apply:`serve`,transform:{order:`post`,filter:{id:Te(e)},handler(e){return Hr(e)}}}}function Hr(e){let t=`Page(pageConfig)`;if(!e.includes(t))throw Error(`Mini Program Page shell must register pageConfig`);return{code:e.replace(t,`Page(__rolldown_runtime__.injectPageHmr(pageConfig))`),map:null}}function Ur(e){return{rebuildStrategy:`on-failure`,runtimeFile:e.interpreterHmrRuntime,plugins:[],createEntryBanner:Wr,publish:e=>({kind:`event`,event:`vpt:hmr-interpreter:source`,data:{kind:`patches`,buildId:e.buildId,patches:e.patches}})}}function Wr(e){return e=>e.name===`app.js`?`__rolldown_runtime__.initialize(require('./${hr}'));\n`:``}function Gr(e){return{rebuildStrategy:`always`,runtimeFile:e.devtoolsHmrRuntime,plugins:[],createEntryBanner:Kr}}function Kr(e){return e=>``}function qr(e,t){switch(e?.mode??`devtools`){case`devtools`:return Lr(t);case`interpreter`:return Ur(t);case`rebuild`:return Gr(t)}}const Jr=`/@react-refresh`,Yr=o(n.join(n.dirname(M.resolve(`react-reconciler/package.json`)),`cjs/react-reconciler.development.js`));function Xr(){return[{name:`vpt:mini-react-refresh-runtime`,apply:`serve`,config(){return{define:{queueMicrotask:`globalThis.queueMicrotask`,"window.$RefreshReg$":`globalThis.$RefreshReg$`,"window.$RefreshSig$":`globalThis.$RefreshSig$`,"window.__registerBeforePerformReactRefresh":`globalThis.__registerBeforePerformReactRefresh`,"window.__getReactRefreshIgnoredExports":`globalThis.__getReactRefreshIgnoredExports`}}},transform:{order:`post`,filter:{id:Te(Jr)},handler(e){return Zr(e)}}},{name:`vpt:mini-react-refresh-renderer-dependency`,apply:`serve`,transform:{order:`post`,filter:{id:Te(Yr)},handler(e){return Qr(e)}}}]}function Zr(e){return{code:`${e}
5
5
  injectIntoGlobalHook(globalThis);
6
6
  globalThis.$RefreshReg$ = () => {};
7
- globalThis.$RefreshSig$ = () => (type) => type;`,map:null}}function Qr(e){if(!/\bhook\.inject\(internals\)/.test(e))throw Error(`React Reconciler must inject its renderer into the DevTools hook`);return{code:`import '${Jr}'\n${e}`,map:null}}function $r(e){return e.name===`client`}function ei(e,t){let r=qr(e.options.hmr,e.runtime.modules),i=null;return[{name:`vpt:mini-dev`,apply:`serve`,applyToEnvironment:$r,config(){return{define:{"performance.now":`Date.now`},build:{emptyOutDir:!1,sourcemap:!1},experimental:{bundledDev:!0},server:{ws:{path:yr}}}},configureServer:{order:`post`,async handler(a){bt(n.resolve(a.config.root,a.config.build.outDir)),i=await Or({server:a,contract:e,styles:t,hmrMode:r})}},generateBundle:{order:`post`,handler(t,n){ti(n,e.styles.appFileName)}},closeBundle(){return i?.close()}},{name:`vpt:mini-runtime-lowering`,apply:`serve`,transform:{order:`post`,filter:{id:Te(Ct)},handler(e){return ni(e)}}},...r.plugins,...Xr()]}function ti(e,t){delete e[t]}const ni=xt(e=>c(e,Ct,{lang:`js`,target:Me,sourcemap:!1,assumptions:{setPublicClassFields:!0}})),ri=P(`global/vpt-global`),ii=`common/vpt/global.js`;function ai(e){function t(t){let r=n.posix.relative(n.posix.dirname(e.getPhysicalChunkId(t)),ii),i=r.startsWith(`.`)?r:`./${r}`;return`require(${JSON.stringify(i)}).vptGlobal`}return[{name:`vpt:mini-global`,resolveId:{filter:{id:Te(wt)},handler(){return wt}},load:{filter:{id:Te(wt)},handler(){return`export const vptGlobal = __VPT_GLOBAL__;`}},config(){return{build:{rolldownOptions:{transform:{inject:{globalThis:[wt,`vptGlobal`]}}}}}},renderChunk:{order:`pre`,filter:{code:/__VPT_GLOBAL__/},handler(e,n,r){if(n.moduleIds.includes(`\0vpt:global-binding`)||n.moduleIds.includes(`\0rolldown/runtime.js`))return c(e,n.fileName,{define:{__VPT_GLOBAL__:t(n)},sourcemap:!!r.sourcemap})}},generateBundle:{order:`post`,async handler(e){let t=await oi({dir:e.dir,minify:e.minify!==!1,sourcemap:e.sourcemap});for(let e of t.output)e.type===`asset`?this.emitFile({type:`asset`,fileName:e.fileName,source:e.source}):this.emitFile({type:`prebuilt-chunk`,fileName:e.fileName,code:e.code,exports:e.exports,facadeModuleId:ri,isEntry:!0})}}},{name:`vpt:mini-global-dev`,apply:`serve`,renderChunk:{order:`pre`,filter:{code:/__rolldown_runtime__/},handler(e,n){return{code:(n.moduleIds.includes(`\0rolldown/runtime.js`)?`let __rolldown_runtime__;
8
- `:`const __rolldown_runtime__ = ${t(n)}.__rolldown_runtime__;\n`)+e,map:null}}}}]}const oi=xt(e=>f({input:ri,transform:{target:Me},output:{...e,format:`cjs`,strict:!0,generatedCode:{symbols:!1},entryFileNames:ii},write:!1}),{getCacheKey:e=>JSON.stringify(e)});function si(e){return e?.[`vpt:native-components`]?.assetBytes??0}function ci(e){return e?.[`vpt:native-components`]?.sources??[]}async function li(e,t){await ui(e.folder),await di(e);let n=[];return await fi(e.folder,[],n,o(t)),{...e,assets:n}}async function ui(e){try{if((await T(e)).isDirectory())return}catch(t){throw Error.isError(t)&&`code`in t&&t.code===`ENOENT`?Error(`Native component folder does not exist: ${e}`,{cause:t}):t}throw Error(`Native component source is not a directory: ${e}`)}async function di(e){let t=n.join(e.folder,`${e.entry}.js`);try{if((await T(t)).isFile())return}catch(e){throw Error.isError(e)&&`code`in e&&e.code===`ENOENT`?Error(`Native component entry file does not exist: ${t}`,{cause:e}):e}throw Error(`Native component entry is not a file: ${t}`)}async function fi(e,t,r,i){let a=n.join(e,...t),s=await ee(a,{withFileTypes:!0});s.sort((e,t)=>e.name.localeCompare(t.name));for(let a of s){let s=[...t,a.name];if(a.isDirectory()){await fi(e,s,r,i);continue}if(!a.isFile())continue;let c=n.join(e,...s);o(c)!==i&&r.push({relativePath:s.join(`/`),byteLength:(await T(c)).size})}}function pi(e,t,r){let i=Ee(t),a=te(e,{astType:`ts`,lang:`tsx`,preserveParens:!1,sourceType:`module`},i),o=yi(a),s=hi(a),c=gi(a,new Set(s.flatMap(e=>e.names))).map(t=>({call:t,definition:vi(t,i,o,n=>Ti(n,i,e,t.start))})),l=new d(e,{filename:i});return c.forEach(({call:e,definition:t})=>{l.overwrite(e.start,e.end,JSON.stringify(n.posix.basename(t.folder)))}),s.forEach(({declaration:e})=>{l.remove(e.start,e.end)}),{code:l.toString(),map:r?mi(l,i):null,definitions:c.map(({definition:e})=>e)}}function mi(e,t){let n=e.generateMap({hires:`boundary`,includeContent:!0,source:t});return{file:n.file,mappings:n.mappings,names:n.names,sources:n.sources,sourcesContent:n.sourcesContent,version:n.version}}function hi(e){return e.body.flatMap(e=>{if(e.type!==`ImportDeclaration`||e.source.value!==`virtual:taro/native`)return[];let t=e.specifiers.flatMap(e=>e.type!==`ImportSpecifier`||Si(e.imported)!==`defineNativeComponent`?[]:[e.local.name]);return t.length===0?[]:[{declaration:e,names:t}]})}function gi(e,t){return e.body.flatMap(e=>{if(e.type===`ExpressionStatement`)return _i(e.expression,t)?[e.expression]:[];if(e.type===`ExportDefaultDeclaration`)return _i(e.declaration,t)?[e.declaration]:[];let n=e.type===`ExportNamedDeclaration`?e.declaration:e;return n?.type===`VariableDeclaration`?n.declarations.flatMap(({init:e})=>_i(e,t)?[e]:[]):[]})}function _i(e,t){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&t.has(e.callee.name)}function vi(e,t,r,i){if(e.arguments.length!==1)throw i(`defineNativeComponent() requires exactly one entry loader`);let a=Ci(e.arguments[0]);if(!a)throw i(`Native component entry must use () => import(...) with a static relative .js path`);let s=o(n.resolve(n.dirname(t),a));return{folder:n.posix.dirname(s),entry:n.posix.basename(s,`.js`),fields:xi(e.typeArguments,r,i)}}function yi(e){let t=/* @__PURE__ */ new Map;for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;if(e?.type===`TSTypeAliasDeclaration`&&!e.typeParameters&&e.typeAnnotation.type===`TSTypeLiteral`){t.set(e.id.name,e.typeAnnotation.members);continue}e?.type===`TSInterfaceDeclaration`&&!e.typeParameters&&e.extends.length===0&&t.set(e.id.name,e.body.body)}return t}function bi(e,t){if(e.type===`TSTypeLiteral`)return e.members;if(e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&!e.typeArguments)return t.get(e.typeName.name)}function xi(e,t,n){if(!e)return[];if(e.params.length!==1)throw n(`Native component interface must be one TypeScript object type`);let r=e.params[0],i=bi(r,t);if(!i)throw n(`Native component interface must be inline or declared in the same module`);let a=/* @__PURE__ */ new Set;for(let e of i){if(e.type!==`TSPropertySignature`&&e.type!==`TSMethodSignature`)throw n(`Native component interface must contain only static fields`);if(e.computed)throw n(`Native component interface contains a computed field`);let t=Si(e.key);if(!t)throw n(`Native component interface contains a computed field`);if(a.has(t))throw n(`Duplicate native component interface field: ${t}`);a.add(t)}return[...a].filter(e=>e!==`children`)}function Si(e){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`&&typeof e.value==`string`)return e.value}function Ci(e){if(e?.type!==`ArrowFunctionExpression`||e.params.length!==0||e.body.type!==`ImportExpression`)return;let t=e.body;if(t.source.type===`Literal`&&typeof t.source.value==`string`&&t.options===null&&wi(t.source.value))return t.source.value}function wi(e){return(e.startsWith(`./`)||e.startsWith(`../`))&&n.posix.extname(e)===`.js`}function Ti(e,t,n,r){let i=n.slice(0,r),a=i.split(`
7
+ globalThis.$RefreshSig$ = () => (type) => type;`,map:null}}function Qr(e){if(!/\bhook\.inject\(internals\)/.test(e))throw Error(`React Reconciler must inject its renderer into the DevTools hook`);return{code:`import '${Jr}'\n${e}`,map:null}}function $r(e){return e.name===`client`}function ei(e,t){let r=qr(e.options.hmr,e.runtime.modules),i=null;return[{name:`vpt:mini-dev`,apply:`serve`,applyToEnvironment:$r,config(){return{define:{"performance.now":`Date.now`},build:{emptyOutDir:!1,sourcemap:!1},experimental:{bundledDev:!0},server:{ws:{path:yr}}}},configureServer:{order:`post`,async handler(a){bt(n.resolve(a.config.root,a.config.build.outDir),[e.output.projectConfigFilename,e.output.projectPrivateConfigFilename]),i=await Or({server:a,contract:e,styles:t,hmrMode:r})}},generateBundle:{order:`post`,handler(t,n){ti(n,e.styles.appFileName)}},closeBundle(){return i?.close()}},{name:`vpt:mini-runtime-lowering`,apply:`serve`,transform:{order:`post`,filter:{id:Te(Ct)},handler(e){return ni(e)}}},...r.plugins,...Xr()]}function ti(e,t){delete e[t]}const ni=xt(e=>c(e,Ct,{lang:`js`,target:Me,sourcemap:!1,assumptions:{setPublicClassFields:!0}})),ri=P(`global/vpt-global`),ii=`common/vpt/global.js`;function ai(e){function t(t){let r=n.posix.relative(n.posix.dirname(e.getPhysicalChunkId(t)),ii),i=r.startsWith(`.`)?r:`./${r}`;return`require(${JSON.stringify(i)}).vptGlobal`}return[{name:`vpt:mini-global`,resolveId:{filter:{id:Te(wt)},handler(){return wt}},load:{filter:{id:Te(wt)},handler(){return`export const vptGlobal = __VPT_GLOBAL__;`}},config(){return{build:{rolldownOptions:{transform:{inject:{globalThis:[wt,`vptGlobal`]}}}}}},renderChunk:{order:`pre`,filter:{code:/__VPT_GLOBAL__/},handler(e,n,r){if(n.moduleIds.includes(`\0vpt:global-binding`)||n.moduleIds.includes(`\0rolldown/runtime.js`))return c(e,n.fileName,{define:{__VPT_GLOBAL__:t(n)},sourcemap:!!r.sourcemap})}},generateBundle:{order:`post`,async handler(e){let t=await oi({dir:e.dir,minify:e.minify!==!1,sourcemap:e.sourcemap});for(let e of t.output)e.type===`asset`?this.emitFile({type:`asset`,fileName:e.fileName,source:e.source}):this.emitFile({type:`prebuilt-chunk`,fileName:e.fileName,code:e.code,exports:e.exports,facadeModuleId:ri,isEntry:!0})}}},{name:`vpt:mini-global-dev`,apply:`serve`,renderChunk:{order:`pre`,filter:{code:/__rolldown_runtime__/},handler(e,n){return{code:(n.moduleIds.includes(`\0rolldown/runtime.js`)?`let __rolldown_runtime__;
8
+ `:`const __rolldown_runtime__ = ${t(n)}.__rolldown_runtime__;\n`)+e,map:null}}}}]}const oi=xt(e=>f({input:ri,transform:{target:Me},output:{...e,format:`cjs`,strict:!1,generatedCode:{symbols:!1},entryFileNames:ii},write:!1}),{getCacheKey:e=>JSON.stringify(e)});function si(e){return e?.[`vpt:native-components`]?.assetBytes??0}function ci(e){return e?.[`vpt:native-components`]?.sources??[]}async function li(e,t){await ui(e.folder),await di(e);let n=[];return await fi(e.folder,[],n,o(t)),{...e,assets:n}}async function ui(e){try{if((await T(e)).isDirectory())return}catch(t){throw Error.isError(t)&&`code`in t&&t.code===`ENOENT`?Error(`Native component folder does not exist: ${e}`,{cause:t}):t}throw Error(`Native component source is not a directory: ${e}`)}async function di(e){let t=n.join(e.folder,`${e.entry}.js`);try{if((await T(t)).isFile())return}catch(e){throw Error.isError(e)&&`code`in e&&e.code===`ENOENT`?Error(`Native component entry file does not exist: ${t}`,{cause:e}):e}throw Error(`Native component entry is not a file: ${t}`)}async function fi(e,t,r,i){let a=n.join(e,...t),s=await ee(a,{withFileTypes:!0});s.sort((e,t)=>e.name.localeCompare(t.name));for(let a of s){let s=[...t,a.name];if(a.isDirectory()){await fi(e,s,r,i);continue}if(!a.isFile())continue;let c=n.join(e,...s);o(c)!==i&&r.push({relativePath:s.join(`/`),byteLength:(await T(c)).size})}}function pi(e,t,r){let i=Ee(t),a=te(e,{astType:`ts`,lang:`tsx`,preserveParens:!1,sourceType:`module`},i),o=yi(a),s=hi(a),c=gi(a,new Set(s.flatMap(e=>e.names))).map(t=>({call:t,definition:vi(t,i,o,n=>Ti(n,i,e,t.start))})),l=new d(e,{filename:i});return c.forEach(({call:e,definition:t})=>{l.overwrite(e.start,e.end,JSON.stringify(n.posix.basename(t.folder)))}),s.forEach(({declaration:e})=>{l.remove(e.start,e.end)}),{code:l.toString(),map:r?mi(l,i):null,definitions:c.map(({definition:e})=>e)}}function mi(e,t){let n=e.generateMap({hires:`boundary`,includeContent:!0,source:t});return{file:n.file,mappings:n.mappings,names:n.names,sources:n.sources,sourcesContent:n.sourcesContent,version:n.version}}function hi(e){return e.body.flatMap(e=>{if(e.type!==`ImportDeclaration`||e.source.value!==`virtual:taro/native`)return[];let t=e.specifiers.flatMap(e=>e.type!==`ImportSpecifier`||Si(e.imported)!==`defineNativeComponent`?[]:[e.local.name]);return t.length===0?[]:[{declaration:e,names:t}]})}function gi(e,t){return e.body.flatMap(e=>{if(e.type===`ExpressionStatement`)return _i(e.expression,t)?[e.expression]:[];if(e.type===`ExportDefaultDeclaration`)return _i(e.declaration,t)?[e.declaration]:[];let n=e.type===`ExportNamedDeclaration`?e.declaration:e;return n?.type===`VariableDeclaration`?n.declarations.flatMap(({init:e})=>_i(e,t)?[e]:[]):[]})}function _i(e,t){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&t.has(e.callee.name)}function vi(e,t,r,i){if(e.arguments.length!==1)throw i(`defineNativeComponent() requires exactly one entry loader`);let a=Ci(e.arguments[0]);if(!a)throw i(`Native component entry must use () => import(...) with a static relative .js path`);let s=o(n.resolve(n.dirname(t),a));return{folder:n.posix.dirname(s),entry:n.posix.basename(s,`.js`),fields:xi(e.typeArguments,r,i)}}function yi(e){let t=/* @__PURE__ */ new Map;for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;if(e?.type===`TSTypeAliasDeclaration`&&!e.typeParameters&&e.typeAnnotation.type===`TSTypeLiteral`){t.set(e.id.name,e.typeAnnotation.members);continue}e?.type===`TSInterfaceDeclaration`&&!e.typeParameters&&e.extends.length===0&&t.set(e.id.name,e.body.body)}return t}function bi(e,t){if(e.type===`TSTypeLiteral`)return e.members;if(e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&!e.typeArguments)return t.get(e.typeName.name)}function xi(e,t,n){if(!e)return[];if(e.params.length!==1)throw n(`Native component interface must be one TypeScript object type`);let r=e.params[0],i=bi(r,t);if(!i)throw n(`Native component interface must be inline or declared in the same module`);let a=/* @__PURE__ */ new Set;for(let e of i){if(e.type!==`TSPropertySignature`&&e.type!==`TSMethodSignature`)throw n(`Native component interface must contain only static fields`);if(e.computed)throw n(`Native component interface contains a computed field`);let t=Si(e.key);if(!t)throw n(`Native component interface contains a computed field`);if(a.has(t))throw n(`Duplicate native component interface field: ${t}`);a.add(t)}return[...a].filter(e=>e!==`children`)}function Si(e){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`&&typeof e.value==`string`)return e.value}function Ci(e){if(e?.type!==`ArrowFunctionExpression`||e.params.length!==0||e.body.type!==`ImportExpression`)return;let t=e.body;if(t.source.type===`Literal`&&typeof t.source.value==`string`&&t.options===null&&wi(t.source.value))return t.source.value}function wi(e){return(e.startsWith(`./`)||e.startsWith(`../`))&&n.posix.extname(e)===`.js`}function Ti(e,t,n,r){let i=n.slice(0,r),a=i.split(`
9
9
  `).length,o=r-i.lastIndexOf(`
10
- `);return/* @__PURE__ */ Error(`${e}\n${t}:${a}:${o}`)}async function Ei({code:e,id:t,sourcemap:r,addWatchFile:i}){let a=pi(e,t,r),s=Ee(t),c=await Promise.all(a.definitions.map(e=>li(e,s)));c.forEach(e=>{i(e.folder),e.assets.forEach(t=>{i(o(n.join(e.folder,t.relativePath)))})});let l=c.reduce((e,t)=>e+t.assets.reduce((e,t)=>e+t.byteLength,0),0);return{code:a.code,map:a.map,meta:{"vpt:native-components":{sources:c,assetBytes:l}}}}function Di(){return{name:`vpt:mini-native-component`,transform:{order:`pre`,filter:{code:be},handler(e,t){return Ei({code:e,id:t,sourcemap:!!this.environment.config.build.sourcemap,addWatchFile:e=>this.addWatchFile(e)})}}}}function Oi(e){return n.posix.normalize(e)}function ki(e,t){if(!t.startsWith(`./`)&&!t.startsWith(`../`))throw Error(`Expected a relative chunk reference in ${e}: ${t}`);return n.posix.join(n.posix.dirname(e),t)}function Ai(e,t){return Oi(ki(e,t))}function ji({bundle:e,classifyModule:t,getPackageLocation:r}){let i=[],a=n.posix.dirname(Et);for(let o of Object.keys(e).sort()){let s=e[o];if(s.type!==`chunk`)continue;let c=t(s);if(c===`native`)continue;let l=r(s),u=l.kind===`subpackage`;if(c===`amphibious`&&u)throw Error(`Amphibious module must be in the main package: ${s.fileName}`);let d=Oi(u?s.fileName.slice(l.root.length+1):s.fileName),f=n.posix.relative(a,s.fileName),p=JSON.stringify(f.startsWith(`.`)?f:`./${f}`),m=`${u?`require.async`:`require`}(${p})`,h=c===`amphibious`?`[[],function(e){return{execute:function(){e(${m})}}}]`:m;i.push(`case ${JSON.stringify(d)}:return ${h};`)}return{type:`asset`,fileName:Et,source:`"use strict";exports.transport=function(m){switch(m){${i.join(``)}default:throw new Error('Unknown module: '+m)}};`}}async function Mi({bundle:e,getModuleInfo:t,getPackageLocation:r}){let i=[],a=[];for(let o of Object.values(e)){if(o.type!==`chunk`)continue;let e=r(o),s=e.kind===`subpackage`?e.root:void 0;for(let e of o.moduleIds){let r=ci(t(e)?.meta);for(let e of r){let t=n.posix.basename(e.folder),r=n.posix.join(`components`,t),o=s?n.posix.join(s,r):r;a.push({name:t,componentPath:`/${n.posix.join(o,e.entry)}`,fields:e.fields});for(let t of e.assets)i.push({type:`asset`,fileName:n.posix.join(o,t.relativePath),source:await w(n.join(e.folder,t.relativePath))})}}}return{files:i,registrations:a}}async function Ni({bundle:e,contract:t,subpackages:n,isProduction:r,getModuleInfo:i,getPackageLocation:a}){let o=await Mi({bundle:e,getModuleInfo:i,getPackageLocation:a});return[{type:`asset`,fileName:t.styles.appFileName,source:`@import "./${t.styles.globalFileName}";\n`},...t.output.generateProjectSkeleton({bundle:e,subpackages:n,nativeComponents:o.registrations,isProduction:r}),...o.files]}const Pi=`sub/p_`,Fi={kind:`main`};function Ii({chunks:e,planningBudgetBytes:t,getAdditionalModuleBytes:n}){let r=new Map(Object.entries(e).sort(([e],[t])=>e.localeCompare(t))),i=new Map([...r.values()].flatMap(e=>e.facadeModuleId===null?[]:[[e.facadeModuleId,e]])),a=Li(r),o=Ri({chunks:r,mainChunkIds:a}),s=Bi({chunks:[...r].filter(([e])=>!a.has(e)).map(([e,t])=>({chunkId:e,estimatedBytes:Ki(t)+t.moduleIds.reduce((e,t)=>e+n(t),0),transitions:o.get(e)??/* @__PURE__ */ new Set})),planningBudgetBytes:t}).map(qi),c=/* @__PURE__ */ new Map;for(let e of a)c.set(e,Fi);for(let e of s)for(let t of e.chunkIds)c.set(t,e);function l(e){let t=c.get(e);if(!t)throw Error(`Mini Program placement is missing final chunk: ${e}`);return t}function u(e){return l(`preliminaryFileName`in e?e.preliminaryFileName:e.fileName)}return{getPackageLocation:u,getPhysicalChunkId(e){let t=typeof e==`string`?i.get(e):e;if(!t)throw Error(`Mini Program placement is missing entry module: ${e}`);let n=u(t);return n.kind===`main`?t.fileName:`${n.root}/${t.fileName}`},finalize(e){let t=Object.values(e).filter(e=>e.type===`chunk`),n=/* @__PURE__ */ new Set;for(let e of t){let t=l(e.preliminaryFileName);t.kind===`subpackage`&&(e.fileName=`${t.root}/${e.fileName}`,n.add(t.root))}return[...n].sort().map(e=>({root:e}))}}}function Li(e){let t=/* @__PURE__ */ new Set,n=[...e].filter(([,e])=>e.isEntry).map(([e])=>e);for(;n.length>0;){let r=n.pop();if(!r||t.has(r))continue;let i=e.get(r);i&&(t.add(r),n.push(...i.imports))}return t}function Ri({chunks:e,mainChunkIds:t}){let n=/* @__PURE__ */ new Map,r=0;for(let i of e.values())for(let a of[...i.dynamicImports].sort())if(e.has(a)&&!t.has(a)){for(let i of zi({rootId:a,chunks:e,mainChunkIds:t})){let e=n.get(i)??/* @__PURE__ */ new Set;e.add(r),n.set(i,e)}r++}return n}function zi({rootId:e,chunks:t,mainChunkIds:n}){let r=/* @__PURE__ */ new Set,i=[e];for(;i.length>0;){let e=i.pop();if(!e||r.has(e)||n.has(e))continue;let a=t.get(e);a&&(r.add(e),i.push(...a.imports))}return[...r].sort()}function Bi({chunks:e,planningBudgetBytes:t}){let n=[],r=[...e].sort(Vi);for(let e of r)Gi(e.estimatedBytes<=t?Hi({bins:n,chunk:e,planningBudgetBytes:t})??Wi(n):Wi(n),e);return n}function Vi(e,t){return t.transitions.size-e.transitions.size||t.estimatedBytes-e.estimatedBytes||e.chunkId.localeCompare(t.chunkId)}function Hi({bins:e,chunk:t,planningBudgetBytes:n}){let r;for(let i of e){if(i.estimatedBytes+t.estimatedBytes>n)continue;let e={bin:i,overlap:Ui(i.transitions,t.transitions),remainingBytes:n-i.estimatedBytes-t.estimatedBytes};(!r||e.overlap>r.overlap||e.overlap===r.overlap&&e.remainingBytes<r.remainingBytes)&&(r=e)}return r?.bin}function Ui(e,t){let[n,r]=e.size<=t.size?[e,t]:[t,e],i=0;for(let e of n)r.has(e)&&i++;return i}function Wi(e){let t={chunkIds:[],estimatedBytes:0,transitions:/* @__PURE__ */ new Set};return e.push(t),t}function Gi(e,t){e.chunkIds.push(t.chunkId),e.estimatedBytes+=t.estimatedBytes;for(let n of t.transitions)e.transitions.add(n)}function Ki(e){let t=Object.values(e.modules).reduce((e,t)=>e+(t.code?Buffer.byteLength(t.code,`utf8`):0),0),n=e.moduleIds.length*64,r=(e.imports.length+e.dynamicImports.length)*32;return t+n+r+64}function qi(e){let t=[...e.chunkIds].sort(),n=x(`sha256`).update(t.join(`\0`)).digest(`hex`).slice(0,8);return{kind:`subpackage`,root:`${Pi}${n}`,chunkIds:t}}function Ji(e){return e.startsWith(Pi)}function Yi(e){return{output:{codeSplitting:{groups:[{name:`polyfills`,test:At,priority:200,includeDependenciesRecursively:!1},{name:`vendor`,test:jt,priority:100,includeDependenciesRecursively:!0}]},entryFileNames(t){switch(e(t)){case`native`:return`[name]`;case`entry-capsule`:return`[name].js`;default:return`common/[name].js`}},chunkFileNames:`common/[name].js`},preserveEntrySignatures:`allow-extension`}}function Xi(e){let t=Mt(e),n={phase:`idle`};function r(){if(n.phase===`idle`||n.phase===`awaiting-chunks`)throw Error(`Mini Program placement is unavailable before Rolldown exposes the final chunk graph`);return n.placement}return{name:`vpt:mini-placer`,config(){return{build:{rolldownOptions:Yi(t)}}},renderStart(){n={phase:`awaiting-chunks`}},renderChunk:{order:`pre`,handler(e,t,r,i){if(n.phase!==`planned`){if(n.phase!==`awaiting-chunks`)throw Error(`Mini Program placement received final chunks during the ${n.phase} phase`);n={phase:`planned`,placement:Ii({chunks:i.chunks,planningBudgetBytes:19e5,getAdditionalModuleBytes:e=>si(this.getModuleInfo(e)?.meta)})}}}},generateBundle:{order:`pre`,handler(e,t){let i=r();n={phase:`finalized`,placement:i,subpackages:i.finalize(t)}}},classifyChunk(e){return t(e)},getPackageLocation(e){return r().getPackageLocation(e)},getPhysicalChunkId(e){return r().getPhysicalChunkId(e)},getSubpackages(){if(n.phase!==`finalized`)throw Error(`Mini Program subpackages are unavailable before output finalization`);return n.subpackages}}}const Zi={document:[St,`document`],navigator:[St,`navigator`],requestAnimationFrame:[St,`requestAnimationFrame`],cancelAnimationFrame:[St,`cancelAnimationFrame`],Element:[St,`TaroElement`],SVGElement:[St,`SVGElement`],MutationObserver:[St,`MutationObserver`],history:[St,`history`],location:[St,`location`]},Qi=Object.fromEntries(Object.keys(Zi).map(e=>[e,`globalThis.${e}`]));function $i(e){let t=[...new Set(e.options.polyfills??[])];return{name:`vpt:mini-polyfills`,config(){return{build:{rolldownOptions:{input:{polyfills:Tt},transform:{inject:Zi}}}}},transform:{filter:{id:kt,code:RegExp(`\\\\|\\b(?:${Object.keys(Zi).join(`|`)})\\b`)},handler(e,t){return c(e,t,{define:Qi,sourcemap:!!this.environment.config.build.sourcemap})}},resolveId:{filter:{id:Te(Tt)},handler(){return Tt}},load:{filter:{id:Te(Tt)},handler(){return t.map(e=>`import ${JSON.stringify(ea(e))};`).join(`
10
+ `);return/* @__PURE__ */ Error(`${e}\n${t}:${a}:${o}`)}async function Ei({code:e,id:t,sourcemap:r,addWatchFile:i}){let a=pi(e,t,r),s=Ee(t),c=await Promise.all(a.definitions.map(e=>li(e,s)));c.forEach(e=>{i(e.folder),e.assets.forEach(t=>{i(o(n.join(e.folder,t.relativePath)))})});let l=c.reduce((e,t)=>e+t.assets.reduce((e,t)=>e+t.byteLength,0),0);return{code:a.code,map:a.map,meta:{"vpt:native-components":{sources:c,assetBytes:l}}}}function Di(){return{name:`vpt:mini-native-component`,transform:{order:`pre`,filter:{code:be},handler(e,t){return Ei({code:e,id:t,sourcemap:!!this.environment.config.build.sourcemap,addWatchFile:e=>this.addWatchFile(e)})}}}}function Oi(e){return n.posix.normalize(e)}function ki(e,t){if(!t.startsWith(`./`)&&!t.startsWith(`../`))throw Error(`Expected a relative chunk reference in ${e}: ${t}`);return n.posix.join(n.posix.dirname(e),t)}function Ai(e,t){return Oi(ki(e,t))}function ji({bundle:e,classifyModule:t,getPackageLocation:r}){let i=[],a=n.posix.dirname(Et);for(let o of Object.keys(e).sort()){let s=e[o];if(s.type!==`chunk`)continue;let c=t(s);if(c===`native`)continue;let l=r(s),u=l.kind===`subpackage`;if(c===`amphibious`&&u)throw Error(`Amphibious module must be in the main package: ${s.fileName}`);let d=Oi(u?s.fileName.slice(l.root.length+1):s.fileName),f=n.posix.relative(a,s.fileName),p=JSON.stringify(f.startsWith(`.`)?f:`./${f}`),m=`${u?`require.async`:`require`}(${p})`,h=c===`amphibious`?`amphibious(function(){return ${m}})`:m;i.push(`case ${JSON.stringify(d)}:return ${h};`)}return{type:`asset`,fileName:Et,source:`"use strict";function amphibious(r){return[[],function(e){return{execute:function(){e(r())}}}]}exports.transport=function(m){switch(m){${i.join(``)}default:throw new Error('Unknown module: '+m)}};`}}async function Mi({bundle:e,getModuleInfo:t,getPackageLocation:r}){let i=[],a=[];for(let o of Object.values(e)){if(o.type!==`chunk`)continue;let e=r(o),s=e.kind===`subpackage`?e.root:void 0;for(let e of o.moduleIds){let r=ci(t(e)?.meta);for(let e of r){let t=n.posix.basename(e.folder),r=n.posix.join(`components`,t),o=s?n.posix.join(s,r):r;a.push({name:t,componentPath:`/${n.posix.join(o,e.entry)}`,fields:e.fields});for(let t of e.assets)i.push({type:`asset`,fileName:n.posix.join(o,t.relativePath),source:await w(n.join(e.folder,t.relativePath))})}}}return{files:i,registrations:a}}async function Ni({bundle:e,contract:t,subpackages:n,isProduction:r,getModuleInfo:i,getPackageLocation:a}){let o=await Mi({bundle:e,getModuleInfo:i,getPackageLocation:a});return[{type:`asset`,fileName:t.styles.appFileName,source:`@import "./${t.styles.globalFileName}";\n`},...t.output.generateProjectSkeleton({bundle:e,subpackages:n,nativeComponents:o.registrations,isProduction:r},t),...o.files]}const Pi=`sub/p_`,Fi={kind:`main`};function Ii({chunks:e,planningBudgetBytes:t,getAdditionalModuleBytes:n}){let r=new Map(Object.entries(e).sort(([e],[t])=>e.localeCompare(t))),i=new Map([...r.values()].flatMap(e=>e.facadeModuleId===null?[]:[[e.facadeModuleId,e]])),a=Li(r),o=Ri({chunks:r,mainChunkIds:a}),s=Bi({chunks:[...r].filter(([e])=>!a.has(e)).map(([e,t])=>({chunkId:e,estimatedBytes:Ki(t)+t.moduleIds.reduce((e,t)=>e+n(t),0),transitions:o.get(e)??/* @__PURE__ */ new Set})),planningBudgetBytes:t}).map(qi),c=/* @__PURE__ */ new Map;for(let e of a)c.set(e,Fi);for(let e of s)for(let t of e.chunkIds)c.set(t,e);function l(e){let t=c.get(e);if(!t)throw Error(`Mini Program placement is missing final chunk: ${e}`);return t}function u(e){return l(`preliminaryFileName`in e?e.preliminaryFileName:e.fileName)}return{getPackageLocation:u,getPhysicalChunkId(e){let t=typeof e==`string`?i.get(e):e;if(!t)throw Error(`Mini Program placement is missing entry module: ${e}`);let n=u(t);return n.kind===`main`?t.fileName:`${n.root}/${t.fileName}`},finalize(e){let t=Object.values(e).filter(e=>e.type===`chunk`),n=/* @__PURE__ */ new Set;for(let e of t){let t=l(e.preliminaryFileName);t.kind===`subpackage`&&(e.fileName=`${t.root}/${e.fileName}`,n.add(t.root))}return[...n].sort().map(e=>({root:e}))}}}function Li(e){let t=/* @__PURE__ */ new Set,n=[...e].filter(([,e])=>e.isEntry).map(([e])=>e);for(;n.length>0;){let r=n.pop();if(!r||t.has(r))continue;let i=e.get(r);i&&(t.add(r),n.push(...i.imports))}return t}function Ri({chunks:e,mainChunkIds:t}){let n=/* @__PURE__ */ new Map,r=0;for(let i of e.values())for(let a of[...i.dynamicImports].sort())if(e.has(a)&&!t.has(a)){for(let i of zi({rootId:a,chunks:e,mainChunkIds:t})){let e=n.get(i)??/* @__PURE__ */ new Set;e.add(r),n.set(i,e)}r++}return n}function zi({rootId:e,chunks:t,mainChunkIds:n}){let r=/* @__PURE__ */ new Set,i=[e];for(;i.length>0;){let e=i.pop();if(!e||r.has(e)||n.has(e))continue;let a=t.get(e);a&&(r.add(e),i.push(...a.imports))}return[...r].sort()}function Bi({chunks:e,planningBudgetBytes:t}){let n=[],r=[...e].sort(Vi);for(let e of r)Gi(e.estimatedBytes<=t?Hi({bins:n,chunk:e,planningBudgetBytes:t})??Wi(n):Wi(n),e);return n}function Vi(e,t){return t.transitions.size-e.transitions.size||t.estimatedBytes-e.estimatedBytes||e.chunkId.localeCompare(t.chunkId)}function Hi({bins:e,chunk:t,planningBudgetBytes:n}){let r;for(let i of e){if(i.estimatedBytes+t.estimatedBytes>n)continue;let e={bin:i,overlap:Ui(i.transitions,t.transitions),remainingBytes:n-i.estimatedBytes-t.estimatedBytes};(!r||e.overlap>r.overlap||e.overlap===r.overlap&&e.remainingBytes<r.remainingBytes)&&(r=e)}return r?.bin}function Ui(e,t){let[n,r]=e.size<=t.size?[e,t]:[t,e],i=0;for(let e of n)r.has(e)&&i++;return i}function Wi(e){let t={chunkIds:[],estimatedBytes:0,transitions:/* @__PURE__ */ new Set};return e.push(t),t}function Gi(e,t){e.chunkIds.push(t.chunkId),e.estimatedBytes+=t.estimatedBytes;for(let n of t.transitions)e.transitions.add(n)}function Ki(e){let t=Object.values(e.modules).reduce((e,t)=>e+(t.code?Buffer.byteLength(t.code,`utf8`):0),0),n=e.moduleIds.length*64,r=(e.imports.length+e.dynamicImports.length)*32;return t+n+r+64}function qi(e){let t=[...e.chunkIds].sort(),n=x(`sha256`).update(t.join(`\0`)).digest(`hex`).slice(0,8);return{kind:`subpackage`,root:`${Pi}${n}`,chunkIds:t}}function Ji(e){return e.startsWith(Pi)}function Yi(e){return{output:{codeSplitting:{groups:[{name:`polyfills`,test:At,priority:200,includeDependenciesRecursively:!1},{name:`vendor`,test:jt,priority:100,includeDependenciesRecursively:!0}]},entryFileNames(t){switch(e(t)){case`native`:return`[name]`;case`entry-capsule`:return`[name].js`;default:return`common/[name].js`}},chunkFileNames:`common/[name].js`},preserveEntrySignatures:`allow-extension`}}function Xi(e){let t=Mt(e),n={phase:`idle`};function r(){if(n.phase===`idle`||n.phase===`awaiting-chunks`)throw Error(`Mini Program placement is unavailable before Rolldown exposes the final chunk graph`);return n.placement}return{name:`vpt:mini-placer`,config(){return{build:{rolldownOptions:Yi(t)}}},renderStart(){n={phase:`awaiting-chunks`}},renderChunk:{order:`pre`,handler(e,t,r,i){if(n.phase!==`planned`){if(n.phase!==`awaiting-chunks`)throw Error(`Mini Program placement received final chunks during the ${n.phase} phase`);n={phase:`planned`,placement:Ii({chunks:i.chunks,planningBudgetBytes:19e5,getAdditionalModuleBytes:e=>si(this.getModuleInfo(e)?.meta)})}}}},generateBundle:{order:`pre`,handler(e,t){let i=r();n={phase:`finalized`,placement:i,subpackages:i.finalize(t)}}},classifyChunk(e){return t(e)},getPackageLocation(e){return r().getPackageLocation(e)},getPhysicalChunkId(e){return r().getPhysicalChunkId(e)},getSubpackages(){if(n.phase!==`finalized`)throw Error(`Mini Program subpackages are unavailable before output finalization`);return n.subpackages}}}const Zi={document:[St,`document`],navigator:[St,`navigator`],requestAnimationFrame:[St,`requestAnimationFrame`],cancelAnimationFrame:[St,`cancelAnimationFrame`],Element:[St,`TaroElement`],SVGElement:[St,`SVGElement`],MutationObserver:[St,`MutationObserver`],history:[St,`history`],location:[St,`location`]},Qi=Object.fromEntries(Object.keys(Zi).map(e=>[e,`globalThis.${e}`]));function $i(e){let t=[...new Set(e.options.polyfills??[])];return{name:`vpt:mini-polyfills`,config(){return{build:{rolldownOptions:{transform:{inject:Zi}}}}},transform:{filter:{id:kt,code:RegExp(`\\\\|\\b(?:${Object.keys(Zi).join(`|`)})\\b`)},handler(e,t){return c(e,t,{define:Qi,sourcemap:!!this.environment.config.build.sourcemap})}},resolveId:{filter:{id:Te(Tt)},handler(){return Tt}},load:{filter:{id:Te(Tt)},handler(){return t.map(e=>`import ${JSON.stringify(ea(e))};`).join(`
11
11
  `)}}}}function ea(e){if(!/^[a-z][a-z\d]*(?:[.-][a-z\d]+)*$/.test(e))throw Error(`Invalid core-js polyfill module: ${JSON.stringify(e)}. Use a module name such as "web.url".`);try{return M.resolve(`core-js/modules/${e}.js`)}catch(t){throw Error(`Unknown core-js polyfill module: ${JSON.stringify(e)}.`,{cause:t})}}var ta=class{original;#e=/* @__PURE__ */ new Map;#t=[];constructor(e){this.original=e}overwrite(e,t,n){this.#t.push({content:n,end:t,start:e})}prependLeft(e,t){this.#n(e).prepend.push(t)}appendLeft(e,t){this.#n(e).append.push(t)}appendRight(e,t){this.#n(e).append.push(t)}compile(){let e={original:this.original,replacements:this.#t.toSorted((e,t)=>e.start-t.start||t.end-e.end),insertions:[...this.#e].sort(([e],[t])=>e-t).map(([e,t])=>({start:e,content:t.prepend.toReversed().join(``)+t.append.join(``)}))};return{render:(t,n)=>ra(e,t,n,!0,!0),renderOutside:t=>na(e,t)}}#n(e){let t=this.#e.get(e);if(t)return t;let n={append:[],prepend:[]};return this.#e.set(e,n),n}};function na(e,t){let n=[],r=0,i=!0;for(let a of t)n.push(ra(e,r,a.start,i,!1)),r=a.end,i=!1;return n.push(ra(e,r,e.original.length,i,!0)),n.join(``)}function ra(e,t,n,r,i){let a=t,o=ia(e.insertions,t),s=[],c=(n,i)=>{for(;o<e.insertions.length;){let c=e.insertions[o];if(c.start>n||c.start===n&&!i)break;o++,!(c.start<a||c.start===t&&!r)&&(s.push(e.original.slice(a,c.start),c.content),a=c.start)}s.push(e.original.slice(a,n)),a=n};for(let r=ia(e.replacements,t);r<e.replacements.length;r++){let t=e.replacements[r];if(t.start>=n)break;if(!(t.end>n||t.end<=a)){if(t.start<a)throw Error(`Partially overlapping source edits at ${t.start}:${t.end}`);c(t.start,!1),s.push(t.content),a=t.end}}return c(n,i),s.join(``)}function ia(e,t){let n=0,r=e.length;for(;n<r;){let i=Math.floor((n+r)/2);e[i].start<t?n=i+1:r=i}return n}function aa(e){let t=p(e.filename,e.code);if(t.errors.length>0){let n=t.errors.map(e=>e.message).join(`; `);throw Error(`Failed to parse ${e.filename} with Oxc: ${n}`)}let n=oa(t.program,e.filename);if(!e.sourcemap){let t=new ta(e.code);return ua(t,n),ha(t,n,e),{code:ya(t,n,e),map:null}}let r=new d(e.code,{filename:e.filename});return ua(r,n),ha(r,n,e),ba(r,n,e),{code:r.toString(),map:Ka(r,e.filename)}}function oa(e,t){let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=[],o=[],s=[],c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set,u=new Be({preserveExitedScopes:!0}),d=0,f=!1,p=!1;Re(e,{scopeTracker:u,enter(e,t){if(e.type===`Identifier`&&n.add(e.name),e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`eval`&&(f=!0),Ba(e)&&(d+=1),e.type===`AwaitExpression`&&d===0&&(p=!0),e.type===`VariableDeclaration`&&d===0&&(e.kind===`var`||t?.type===`Program`)&&(o.push(e),e.kind===`var`)){if(t?.type!==`Program`){let n=(t?.type===`ForInStatement`||t?.type===`ForOfStatement`)&&t.left===e;s.push({declaration:e,isForIterationBinding:n})}Fa(e).forEach(e=>{l.add(e)})}},leave(e){Ba(e)&&--d}});for(let n of e.body)switch(n.type){case`ImportDeclaration`:sa(n,i,c,l,t);break;case`ExportNamedDeclaration`:ca(n,r,t);break;case`ExportDefaultDeclaration`:case`ExportAllDeclaration`:throw Ga(t,`source-level ${n.type}`);case`VariableDeclaration`:Ua(n,t),n.declarations.flatMap(e=>Ia(e.id)).forEach(e=>{l.add(e)});break;case`FunctionDeclaration`:{let e=n.id;a.push(n),l.add(e.name);break}case`ClassDeclaration`:{let e=n.id;l.add(e.name);break}}u.freeze(),Ha(f,t);let m=Ma(n,i.size);return la(r,l,t),{dependencies:[...i.values()],exportNamesByLocal:r,functions:a,generatedNames:m,hasTopLevelAwait:p,importBindings:c,moduleVariables:o,nestedHoistedVariables:s,outerBindings:l,program:e,scopes:u}}function sa(e,t,n,r,i){if(e.phase||e.attributes.length>0||e.importKind===`type`)throw Ga(i,`import phases, attributes, or type-only imports`);let a=e.source.value,o=t.get(a)??{source:a,imports:[]};t.has(a)||t.set(a,o);for(let t of e.specifiers)switch(n.add(t.local.name),r.add(t.local.name),t.type){case`ImportDefaultSpecifier`:o.imports.push({imported:`default`,local:t.local.name});break;case`ImportNamespaceSpecifier`:o.imports.push({imported:null,local:t.local.name});break;case`ImportSpecifier`:o.imports.push({imported:Na(t.imported),local:t.local.name})}}function ca(e,t,n){if(e.declaration||e.source||e.attributes.length>0||e.exportKind===`type`)throw Ga(n,`declaration exports, re-exports, export attributes, or type-only exports`);for(let n of e.specifiers){let e=Na(n.local),r=Na(n.exported),i=t.get(e)??[];i.push(r),t.has(e)||t.set(e,i)}}function la(e,t,n){for(let r of e.keys())if(!t.has(r))throw Ga(n,`export of non-module binding ${JSON.stringify(r)}`)}function ua(e,t){for(let n of t.program.body)switch(n.type){case`ImportDeclaration`:e.overwrite(n.start,n.end,``);break;case`ExportNamedDeclaration`:e.overwrite(n.start,n.end,Ca(n.specifiers,t));break;case`VariableDeclaration`:da(e,n,t.generatedNames.exportBinding,t.exportNamesByLocal);break;case`ClassDeclaration`:ma(e,n,t.generatedNames.exportBinding,t.exportNamesByLocal)}for(let{declaration:n,isForIterationBinding:r}of t.nestedHoistedVariables)fa(e,n,r,t.generatedNames.exportBinding,t.exportNamesByLocal)}function da(e,t,n,r){let i=t.declarations[0];e.overwrite(t.start,i.start,`(`),e.appendLeft(Wa(e.original,t.end),`)`),pa(e,t,n,r)}function fa(e,t,n,r,i){let a=t.declarations[0];e.overwrite(t.start,a.start,n?``:`(`),n||e.appendLeft(Wa(e.original,t.end),`)`),pa(e,t,r,i)}function pa(e,t,n,r){for(let i of t.declarations){if(!i.init)continue;let t=Ia(i.id).flatMap(e=>(r.get(e)??[]).map(t=>({exported:t,local:e})));if(t.length!==0){if(i.id.type===`Identifier`){let t=r.get(i.id.name);e.prependLeft(i.start,Ea(n,t,``)),e.appendRight(i.end,Da(t));continue}e.prependLeft(i.start,`(`),e.appendRight(i.end,`,${t.map(({exported:e,local:t})=>Aa(n,e,t)).join(`,`)})`)}}}function ma(e,t,n,r){let i=t.id,a=r.get(i.name)??[];e.prependLeft(t.start,Ea(n,a,`${i.name}=`)),e.appendRight(t.end,Da(a))}function ha(e,t,n){let r=t.scopes,i=0;Re(t.program,{scopeTracker:r,enter(a){switch(Va(a)&&(i+=1),a.type){case`ImportExpression`:if(a.options||a.phase)throw Ga(n.filename,`dynamic import options or phases`);e.overwrite(a.start,a.source.start,`${t.generatedNames.context}.import(`),a.source.type===`Literal`&&typeof a.source.value==`string`&&e.overwrite(a.source.start,a.source.end,JSON.stringify(n.resolveReference(a.source.value,`dynamic`)));break;case`MetaProperty`:a.meta.name===`import`&&a.property.name===`meta`&&e.overwrite(a.start,a.end,`${t.generatedNames.context}.meta`);break;case`ThisExpression`:i===0&&e.overwrite(a.start,a.end,`void 0`);break;case`AssignmentExpression`:ga(e,a.left,a.start,a.end,r,t,n.filename);break;case`UpdateExpression`:_a(e,a,r,t);break;case`ForInStatement`:case`ForOfStatement`:a.left.type!==`VariableDeclaration`&&va(a.left,r,t.exportNamesByLocal,n.filename)}},leave(e){Va(e)&&--i}})}function ga(e,t,n,r,i,a,o){if(t.type===`Identifier`){let o=Ta(t.name,i,a.exportNamesByLocal);if(o.length===0)return;e.prependLeft(n,Ea(a.generatedNames.exportBinding,o,``)),e.appendRight(r,Da(o));return}va(t,i,a.exportNamesByLocal,o)}function _a(e,t,n,r){if(t.argument.type!==`Identifier`)return;let i=Ta(t.argument.name,n,r.exportNamesByLocal);if(i.length===0)return;if(t.prefix){e.prependLeft(t.start,Ea(r.generatedNames.exportBinding,i,``)),e.appendRight(t.end,Da(i));return}let a=`+${t.argument.name}${t.operator[0]}1`;e.prependLeft(t.start,`(${Oa(r.generatedNames.exportBinding,i,a)},`),e.appendRight(t.end,`)`)}function va(e,t,n,r){let i=La(e).filter(e=>Ta(e,t,n).length>0);if(i.length>0)throw Ga(r,`destructuring write to exported binding ${JSON.stringify(i[0])}`)}function ya(e,t,n){let r=xa(t,n),i=e.compile(),a=t.functions.map(e=>i.render(e.start,e.end)).join(``);return`${r.prefix}${i.renderOutside(t.functions)}}};${a}${r.suffix}`}function ba(e,t,n){let r=xa(t,n);for(let n of t.functions)e.move(n.start,n.end,e.original.length);e.prepend(r.prefix),e.prependLeft(e.original.length,`}};`),e.append(r.suffix)}function xa(e,t){let n=e.dependencies.map(e=>t.resolveReference(e.source,`static`)),r=e.dependencies.map((t,n)=>wa(t,n,e.generatedNames)),i=Sa(e),a=e.outerBindings.size>0?`var ${[...e.outerBindings].join(`,`)};`:``,o=e.hasTopLevelAwait?`async function`:`function`,s=`function(${e.generatedNames.exportBinding},${e.generatedNames.context}){"use strict";${a}${i}return {setters:[${r.join(`,`)}],execute:${o}(){`;return t.format===`system-register`?{prefix:`System.register(${JSON.stringify(n)},${s}`,suffix:`})`}:{prefix:`module.exports=[${JSON.stringify(n)},${s}`,suffix:`}]`}}function Sa(e){let t=new Set(e.functions.map(e=>e.id.name)),n=[];for(let[r,i]of e.exportNamesByLocal)if(t.has(r))for(let e of i)n.push({exported:e,value:r});for(let t of e.moduleVariables)for(let r of t.declarations)if(!r.init)for(let t of Ia(r.id))for(let r of e.exportNamesByLocal.get(t)??[])n.push({exported:r,value:`void 0`});if(n.length===0)return``;if(n.length===1){let[t]=n;return ja(e.generatedNames.exportBinding,t.exported,t.value)}let r=n.map(({exported:e,value:t})=>`[${JSON.stringify(e)}]:${t}`).join(`,`);return`${e.generatedNames.exportBinding}({${r}});`}function Ca(e,t){return e.filter(e=>t.importBindings.has(Na(e.local))).map(e=>{let n=Na(e.local);return ja(t.generatedNames.exportBinding,Na(e.exported),n)}).join(``)}function wa(e,t,n){let r=`${n.dependencyPrefix}${t}`;return`function(${r}){${e.imports.flatMap(e=>{let t=e.imported===null?r:Pa(r,e.imported);return[`${e.local}=${t};`]}).join(``)}}`}function Ta(e,t,n){let r=n.get(e)??[];return r.length===0||t.getDeclaration(e)?.scope===``?r:[]}function Ea(e,t,n){return t.length===0?n:t.reduce((t,n)=>`${ka(e,n)}${t}`,n)}function Da(e){return`)`.repeat(e.length)}function Oa(e,t,n){return t.reduce((t,n)=>`${ka(e,n)}${t})`,n)}function ka(e,t){return`${e}(${JSON.stringify(t)},`}function Aa(e,t,n){return`${e}(${JSON.stringify(t)},${n})`}function ja(e,t,n){return`${e}(${JSON.stringify(t)},${n});`}function Ma(e,t){let n=t=>{let n=0,r=t;for(;e.has(r);)n+=1,r=`${t}${n}`;return r};return{context:n(`__systemContext`),exportBinding:n(`__systemExport`),dependencyPrefix:(n=>{let r=0,i=n;for(;;){let a=0;for(;a<t&&!e.has(`${i}${a}`);)a+=1;if(a===t)return i;r+=1,i=`${n}${r}`}})(`__systemDependency`)}}function Na(e){return e.type===`Literal`?String(e.value):e.name}function Pa(e,t){return/^[$A-Z_a-z][$\w]*$/.test(t)?`${e}.${t}`:`${e}[${JSON.stringify(t)}]`}function Fa(e){return e.declarations.flatMap(e=>Ia(e.id))}function Ia(e){return Ra(e)}function La(e){return Ra(e)}function Ra(e){switch(e.type){case`Identifier`:return[e.name];case`AssignmentPattern`:return Ra(e.left);case`ArrayPattern`:return e.elements.flatMap(e=>e?Ra(e):[]);case`ObjectPattern`:return e.properties.flatMap(e=>e.type===`Property`?Ra(e.value):Ra(e.argument));case`RestElement`:return Ra(e.argument);default:return[]}}function za(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`||e.type===`TSEmptyBodyFunctionExpression`}function Ba(e){return za(e)||e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Va(e){return za(e)&&e.type!==`ArrowFunctionExpression`||e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Ha(e,t){if(e)throw Ga(t,`direct eval`)}function Ua(e,t){if(e.kind===`using`||e.kind===`await using`||e.declare)throw Ga(t,`using or ambient variable declaration`)}function Wa(e,t){return e[t-1]===`;`?t-1:t}function Ga(e,t){return/* @__PURE__ */ Error(`Unsupported final Rolldown chunk ${e}: ${t}`)}function Ka(e,t){let n=e.generateMap({file:t,hires:`boundary`,includeContent:!0,source:t});return{version:n.version,file:n.file,sources:n.sources,sourcesContent:n.sourcesContent,names:n.names,mappings:n.mappings}}function qa(e,t,n){return aa({code:e,filename:t.fileName,format:`commonjs-registration`,sourcemap:n,resolveReference(e,n){return Ja(t.fileName,e,n)}})}function Ja(e,t,n){return n===`dynamic`&&!t.startsWith(`./`)&&!t.startsWith(`../`)?t:Ai(e,t)}function Ya({code:e,chunk:t,chunks:n,bootstrapModuleId:r,getPhysicalChunkId:i,classifyModule:a,sourcemap:o}){let s=p(t.fileName,e);if(s.errors.length>0){let e=s.errors.map(e=>e.message).join(`; `);throw Error(`Failed to parse ${t.fileName} with Oxc: ${e}`)}let c=Xa(s.program,t,n,r,i,a),l=new d(e,{filename:t.fileName});Qa(l,c,t.fileName);let u=$a(l,c,t.fileName);Za(l,c);let f=c.exportNamesByLocal.size>0,m=vo(c),h=u?`var ${c.postfixTemp};`:``,g=go(c);return f?l.prepend(`"use strict";Object.defineProperty(exports,"__esModule",{value:true});${m}${h}${g}`):l.prepend(`"use strict";${m}${h}${g}`),{code:l.toString(),map:o?Eo(l,t.fileName):null}}function Xa(e,t,r,i,a,o){let s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Map,l=[],u=/* @__PURE__ */ new Map,d=new Be({preserveExitedScopes:!0}),f=[],m=!1;if(Re(e,{scopeTracker:d,enter(e){e.type===`Identifier`&&s.add(e.name),e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`eval`&&(m=!0),e.type===`ImportExpression`&&f.push(e)}}),d.freeze(),m)throw To(t.fileName,`direct eval`);let h=0;function g(e,t){let n=t;if(n===void 0){for(n=h===0?`__nativeImport`:`__nativeImport${h}`;s.has(n);)h+=1,n=`__nativeImport${h}`;s.add(n),h+=1}let r=n;return{bindings:e.specifiers.map(e=>{let t={imported:e.type===`ImportNamespaceSpecifier`?null:e.type===`ImportDefaultSpecifier`?`default`:xo(e.imported),local:e.local.name,namespace:r};return u.set(t.local,t),t}),capsuleBinding:null,interop:_o(e),namespace:r,reference:e.source.value}}for(let n of e.body)switch(n.type){case`ImportDeclaration`:{yo(n,t.fileName);let e=ho(t.fileName,n.source.value,r,o);if(e){let[r]=n.specifiers;if(n.specifiers.length!==1||!r||r.type===`ImportNamespaceSpecifier`)throw Error(`Expected one capsule value import from ${e.fileName} in ${t.fileName}`);l.push({bindings:[],capsuleBinding:{imported:r.type===`ImportDefaultSpecifier`?`default`:xo(r.imported),local:r.local.name,logicalId:Ai(t.fileName,n.source.value)},interop:`none`,namespace:``,reference:n.source.value});continue}l.push(g(n,void 0));break}case`ExportNamedDeclaration`:io(n,c,t.fileName);break;case`ExportDefaultDeclaration`:case`ExportAllDeclaration`:throw To(t.fileName,`source-level ${n.type}`)}if(f.length>0||l.some(e=>e.capsuleBinding)){let e=n.posix.relative(n.posix.dirname(a(t)),a(i)),r=e.startsWith(`../`)?e:`./${e}`,o=bo(`__nativeSystem`,s),c=p(t.fileName,`import { System as ${o} } from ${JSON.stringify(r)}`).program.body[0],u=l.findIndex(e=>e.reference===r),d=u<0?void 0:l.splice(u,1)[0],f=g(c,d?.namespace);l.unshift(d?{...d,bindings:[...f.bindings,...d.bindings]}:f)}return{defaultInterop:bo(`__nativeDefault`,s),dynamicImports:f,exportNamesByLocal:c,imports:l,importBindingsByLocal:u,namespaceInterop:bo(`__nativeNamespace`,s),postfixTemp:bo(`__nativePostfix`,s),program:e,scopes:d}}function Za(e,t){for(let n of t.program.body)switch(n.type){case`ImportDeclaration`:e.remove(n.start,n.end);break;case`ExportNamedDeclaration`:n.declaration?(e.remove(n.start,n.declaration.start),ao(e,n.declaration,t.exportNamesByLocal)):e.overwrite(n.start,n.end,oo(n.specifiers,t));break;case`VariableDeclaration`:so(e,n,t.exportNamesByLocal);break;case`FunctionDeclaration`:n.id&&co(e,n.end,n.id.name,t.exportNamesByLocal);break;case`ClassDeclaration`:n.id&&co(e,n.end,n.id.name,t.exportNamesByLocal)}}function Qa(e,t,n){for(let r of t.dynamicImports){if(r.options||r.phase)throw To(n,`dynamic import options or phases`);let i=po(t.imports[0].bindings[0]);e.overwrite(r.start,r.source.start,`${i}.import(`),r.source.type===`Literal`&&typeof r.source.value==`string`&&(r.source.value.startsWith(`./`)||r.source.value.startsWith(`../`))&&e.overwrite(r.source.start,r.source.end,JSON.stringify(Ai(n,r.source.value)))}}function $a(e,t,n){let r=[],i=0,a=!1;return Re(t.program,{scopeTracker:t.scopes,enter(o,s){if(wo(o)&&(i+=1),o.type===`ThisExpression`&&i===0&&e.overwrite(o.start,o.end,`void 0`),o.type===`Identifier`&&s?.type!==`ImportDeclaration`&&We(o,s)){let n=t.importBindingsByLocal.get(o.name),i=n?t.scopes.getDeclaration(o.name):null;if(n&&i?.type===`Import`){let t=fo(o,s,r),i=po(n),a=t===`unbound`?`(0,${i})`:i;e.overwrite(o.start,o.end,s?.type===`Property`&&s.shorthand&&s.value===o?`${o.name}:${a}`:a)}}switch(o.type){case`AssignmentExpression`:eo(e,o.left,o.start,t,n);break;case`UpdateExpression`:to(e,o,t)&&(a=!0);break;case`ForInStatement`:case`ForOfStatement`:o.left.type!==`VariableDeclaration`&&no(o.left,t,n)}r.push(o)},leave(e){r.pop(),wo(e)&&--i}}),a}function eo(e,t,n,r,i){if(t.type===`Identifier`){let i=ro(t.name,r);i.length>0&&e.prependLeft(n,lo(i));return}no(t,r,i)}function to(e,t,n){if(t.argument.type!==`Identifier`)return!1;let r=ro(t.argument.name,n);return r.length===0?!1:t.prefix?(e.prependLeft(t.start,lo(r)),!1):(e.prependLeft(t.start,`(${n.postfixTemp}=`),e.appendRight(t.end,`,${uo(r,t.argument.name)},${n.postfixTemp})`),!0)}function no(e,t,n){let r=Co(e).filter(e=>ro(e,t).length>0);if(r.length>0)throw To(n,`destructuring write to exported binding ${JSON.stringify(r[0])}`)}function ro(e,t){let n=t.exportNamesByLocal.get(e)??[];return n.length===0||t.scopes.getDeclaration(e)?.scope===``?n:[]}function io(e,t,n){if(e.source||e.attributes.length>0||e.exportKind===`type`)throw To(n,`re-exports, export attributes, or type-only exports`);if(e.declaration){for(let r of So(e.declaration,n)){let e=t.get(r)??[];e.push(r),t.has(r)||t.set(r,e)}return}for(let n of e.specifiers){let e=xo(n.local),r=t.get(e)??[];r.push(xo(n.exported)),t.has(e)||t.set(e,r)}}function ao(e,t,n){switch(t.type){case`VariableDeclaration`:so(e,t,n);break;case`FunctionDeclaration`:case`ClassDeclaration`:t.id&&co(e,t.end,t.id.name,n)}}function oo(e,t){return e.map(e=>{let n=xo(e.local),r=xo(e.exported),i=t.importBindingsByLocal.get(n);return i?`Object.defineProperty(exports,${JSON.stringify(r)},{enumerable:true,get:function(){return ${po(i)}}});`:``}).join(``)}function so(e,t,n){for(let r of t.declarations){if(r.id.type!==`Identifier`){if(Co(r.id).filter(e=>n.has(e)).length>0)throw To(`native chunk`,`exported destructuring declaration`);continue}let t=n.get(r.id.name)??[];t.length!==0&&(r.init?e.prependLeft(r.init.start,lo(t)):e.appendRight(r.end,`=${uo(t,`void 0`)}`))}}function co(e,t,n,r){let i=r.get(n)??[];i.length>0&&e.appendRight(t,`;${uo(i,n)};`)}function lo(e){return e.reduce((e,t)=>`exports[${JSON.stringify(t)}]=${e}`,``)}function uo(e,t){return`${lo(e)}${t}`}function fo(e,t,n){let r=e,i=t,a=n.length-1;for(;i?.type===`ParenthesizedExpression`&&i.expression===r;)r=i,--a,i=n[a];return i?.type===`CallExpression`&&i.callee===r?`unbound`:i?.type===`NewExpression`&&i.callee===r?`plain`:i?.type===`TaggedTemplateExpression`&&i.tag===r?`unbound`:`plain`}function po(e){return e.imported===null?e.namespace:mo(e.namespace,e.imported)}function mo(e,t){return/^[$A-Z_a-z][$\w]*$/.test(t)?`${e}.${t}`:`${e}[${JSON.stringify(t)}]`}function ho(e,t,n,r){if(!t.startsWith(`./`)&&!t.startsWith(`../`))return;let i=n[ki(e,t)];return i&&r(i)===`entry-capsule`?i:void 0}function go(e){return e.imports.map(t=>{if(t.capsuleBinding){let{imported:n,local:r,logicalId:i}=t.capsuleBinding;return`var ${r}=${mo(`${po(e.imports[0].bindings[0])}.importSync(${JSON.stringify(i)})`,n)};`}let n=`require(${JSON.stringify(t.reference)})`;if(t.bindings.length===0)return`${n};`;let r=t.interop==="default"?`${e.defaultInterop}(${n})`:t.interop===`namespace`?`${e.namespaceInterop}(${n})`:n;return`var ${t.namespace}=${r};`}).join(``)}function _o(e){return e.specifiers.some(e=>e.type===`ImportNamespaceSpecifier`)?`namespace`:e.specifiers.some(e=>e.type===`ImportDefaultSpecifier`)?`default`:`none`}function vo(e){let t=new Set(e.imports.map(({interop:e})=>e));return`${t.has(`default`)?`function ${e.defaultInterop}(value){return value&&value.__esModule?value:{default:value};}`:``}${t.has(`namespace`)?`function ${e.namespaceInterop}(value){if(value&&value.__esModule)return value;var namespace={default:value};if(value!==null&&(typeof value==="object"||typeof value==="function")){for(var key in value)if(key!=="default"&&Object.prototype.hasOwnProperty.call(value,key))Object.defineProperty(namespace,key,{enumerable:true,get:function(key){return function(){return value[key]}}(key)});}return namespace;}`:``}`}function yo(e,t){if(e.phase||e.attributes.length>0||e.importKind===`type`)throw To(t,`import phases, attributes, or type-only imports`)}function bo(e,t){let n=0,r=e;for(;t.has(r);)n+=1,r=`${e}${n}`;return t.add(r),r}function xo(e){return e.type===`Literal`?String(e.value):e.name}function So(e,t){return e.type===`VariableDeclaration`?e.declarations.flatMap(({id:e})=>Co(e)):[e.id.name]}function Co(e){switch(e.type){case`Identifier`:return[e.name];case`AssignmentPattern`:return Co(e.left);case`ArrayPattern`:return e.elements.flatMap(e=>e?Co(e):[]);case`ObjectPattern`:return e.properties.flatMap(e=>e.type===`Property`?Co(e.value):Co(e.argument));case`RestElement`:return Co(e.argument);default:return[]}}function wo(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ClassDeclaration`||e.type===`ClassExpression`}function To(e,t){return/* @__PURE__ */ Error(`Unsupported final Rolldown native chunk ${e}: ${t}`)}function Eo(e,t){let n=e.generateMap({file:t,hires:`boundary`,includeContent:!0,source:t});return{version:n.version,file:n.file,sources:n.sources,sourcesContent:n.sourcesContent,names:n.names,mappings:n.mappings}}function Do({code:e,id:t,appConfig:n,sourcemap:r}){return lt(e,t,{__VPT_APP_CONFIG__:JSON.stringify(n)},r??!1)}function Oo({code:e,id:t,page:n,sourcemap:r}){return lt(e,t,{__VPT_PAGE_PATH__:JSON.stringify(n.path),__VPT_PAGE_CONFIG__:JSON.stringify(ot(n))},r??!1)}function ko(e){let t=o(e.runtime.modules.appCapsule),r=o(e.runtime.modules.pageCapsule),i=Ao(e.options.pages,e.runtime.modules),a=new Map(e.options.pages.map(e=>[e.path,e])),s=/* @__PURE__ */ new Map([[`\0vite/preload-helper.js`,()=>e.runtime.modules.bootstrap],[`\0vpt:taro-target-runtime`,()=>e.taro.targetRuntimePath],[`\0vpt:app-component`,(t,n)=>Se({appPath:e.options.app,projectRoot:n})],[`\0vpt:page-component`,(e,t)=>Ce({pagePath:Mo({moduleId:e,pageByPath:a}).path,projectRoot:t})],[`\0vpt:page-capsule`,t=>{let n=Mo({moduleId:t,pageByPath:a});return jo({moduleId:e.runtime.modules.pageCapsule,pagePath:n.path})}]]);return{...i,resolveId(e,t,r){return e===`\0vpt:mini-transport`?{id:`./${n.posix.relative(`common`,Et)}`,external:!0}:s.get(e)?.(t,r)},specialize(n,i,o){let s=Ee(i);if(s===t)return Do({code:n,id:i,appConfig:st(e.options),sourcemap:o});if(s===r)return Oo({code:n,id:i,page:Mo({moduleId:i,pageByPath:a}),sourcemap:o})}}}function Ao(e,t){let n=e.map(e=>({capsuleId:jo({moduleId:t.pageCapsule,pagePath:e.path}),capsuleName:`${e.path}-capsule`,shellId:jo({moduleId:t.pageShell,pagePath:e.path}),shellName:`${e.path}.js`}));return{applicationEntryIds:[t.appCapsule,...n.map(e=>e.capsuleId)],input:Object.fromEntries([[`bootstrap`,t.bootstrap],[`app.js`,t.appShell],[`app-capsule`,t.appCapsule],[`comp.js`,t.componentShell],[`component-capsule`,t.componentCapsule],[`custom-wrapper.js`,t.customWrapperShell],...n.flatMap(e=>[[e.shellName,e.shellId],[e.capsuleName,e.capsuleId]])])}}function jo({moduleId:e,pagePath:t}){return`${e}?route=${encodeURIComponent(t)}`}function Mo({moduleId:e,pageByPath:t}){let n=e?.indexOf(`?`)??-1,r=n===-1?void 0:new URLSearchParams(e?.slice(n+1)).get(`route`),i=r?t.get(r):void 0;if(!i)throw Error(r?`Unknown Page capsule: ${r}`:`Page capsule import must originate from a route module`);return i}var No;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(No||={});var Po;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Po||={});var Fo;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Fo||={});var Io;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Io||={});var Lo;(function(e){e[e.Tab=9]=`Tab`,e[e.NewLine=10]=`NewLine`,e[e.FormFeed=12]=`FormFeed`,e[e.CarriageReturn=13]=`CarriageReturn`,e[e.Space=32]=`Space`,e[e.ExclamationMark=33]=`ExclamationMark`,e[e.Number=35]=`Number`,e[e.Amp=38]=`Amp`,e[e.SingleQuote=39]=`SingleQuote`,e[e.DoubleQuote=34]=`DoubleQuote`,e[e.Dash=45]=`Dash`,e[e.Slash=47]=`Slash`,e[e.Zero=48]=`Zero`,e[e.Nine=57]=`Nine`,e[e.Semi=59]=`Semi`,e[e.Lt=60]=`Lt`,e[e.Eq=61]=`Eq`,e[e.Gt=62]=`Gt`,e[e.Questionmark=63]=`Questionmark`,e[e.UpperA=65]=`UpperA`,e[e.LowerA=97]=`LowerA`,e[e.UpperF=70]=`UpperF`,e[e.LowerF=102]=`LowerF`,e[e.UpperZ=90]=`UpperZ`,e[e.LowerZ=122]=`LowerZ`,e[e.LowerX=120]=`LowerX`,e[e.OpeningSquareBracket=91]=`OpeningSquareBracket`})(Lo||={});var Ro;(function(e){e[e.Text=1]=`Text`,e[e.BeforeTagName=2]=`BeforeTagName`,e[e.InTagName=3]=`InTagName`,e[e.InSelfClosingTag=4]=`InSelfClosingTag`,e[e.BeforeClosingTagName=5]=`BeforeClosingTagName`,e[e.InClosingTagName=6]=`InClosingTagName`,e[e.AfterClosingTagName=7]=`AfterClosingTagName`,e[e.BeforeAttributeName=8]=`BeforeAttributeName`,e[e.InAttributeName=9]=`InAttributeName`,e[e.AfterAttributeName=10]=`AfterAttributeName`,e[e.BeforeAttributeValue=11]=`BeforeAttributeValue`,e[e.InAttributeValueDq=12]=`InAttributeValueDq`,e[e.InAttributeValueSq=13]=`InAttributeValueSq`,e[e.InAttributeValueNq=14]=`InAttributeValueNq`,e[e.BeforeDeclaration=15]=`BeforeDeclaration`,e[e.InDeclaration=16]=`InDeclaration`,e[e.InProcessingInstruction=17]=`InProcessingInstruction`,e[e.BeforeComment=18]=`BeforeComment`,e[e.CDATASequence=19]=`CDATASequence`,e[e.DeclarationSequence=20]=`DeclarationSequence`,e[e.InSpecialComment=21]=`InSpecialComment`,e[e.InCommentLike=22]=`InCommentLike`,e[e.SpecialStartSequence=23]=`SpecialStartSequence`,e[e.InSpecialTag=24]=`InSpecialTag`,e[e.InPlainText=25]=`InPlainText`,e[e.InEntity=26]=`InEntity`})(Ro||={});var zo;(function(e){e[e.NoValue=0]=`NoValue`,e[e.Unquoted=1]=`Unquoted`,e[e.Single=2]=`Single`,e[e.Double=3]=`Double`})(zo||={});const Bo={Empty:/* @__PURE__ */ new Uint8Array,Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};Bo.IframeEnd[2],Bo.IframeEnd,Bo.NoembedEnd[2],Bo.NoembedEnd,Bo.Plaintext[2],Bo.Plaintext,Bo.ScriptEnd[2],Bo.ScriptEnd,Bo.TitleEnd[2],Bo.TitleEnd,Bo.XmpEnd[2],Bo.XmpEnd;const{fromCodePoint:Vo}=String;var Ho;(function(e){e[e.None=0]=`None`,e[e.Svg=1]=`Svg`,e[e.MathML=2]=`MathML`})(Ho||={});let Uo=()=>{var e=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})},a=(i,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of n(a))!r.call(i,c)&&c!==o&&e(i,c,{get:()=>a[c],enumerable:!(s=t(a,c))||s.enumerable});return i},o=t=>a(e({},`__esModule`,{value:!0}),t),s={};i(s,{default:()=>Ie});var c=e=>Array.isArray(e),l=e=>typeof e==`function`,u=e=>e.length===0,d=e=>typeof e==`number`,f=e=>typeof e==`object`&&!!e,p=e=>e instanceof RegExp,m=e=>typeof e==`string`,h=e=>e===void 0,g=e=>{let t=/* @__PURE__ */ new Map;return n=>{let r=t.get(n);if(r)return r;let i=e(n);return t.set(n,i),i}},_=(e,t,n={})=>{let r={cache:{},input:e,index:0,indexMax:0,options:n,output:[]};if(re(t)(r)&&r.index===e.length)return r.output;throw Error(`Failed to parse at index ${r.indexMax}`)},v=(e,t)=>c(e)?y(e,t):m(e)?x(e,t):b(e,t),y=(e,t)=>{let n={};for(let t of e){if(t.length!==1)throw Error(`Invalid character: "${t}"`);let e=t.charCodeAt(0);n[e]=!0}return e=>{let r=e.index,i=e.input;for(;e.index<i.length&&i.charCodeAt(e.index)in n;)e.index+=1;let a=e.index;if(a>r){if(!h(t)&&!e.options.silent){let n=e.input.slice(r,a),o=l(t)?t(n,i,String(r)):t;h(o)||e.output.push(o)}e.indexMax=Math.max(e.indexMax,e.index)}return!0}},b=(e,t)=>{let n=e.source,r=e.flags.replace(/y|$/,`y`),i=new RegExp(n,r);return ne(e=>{i.lastIndex=e.index;let n=i.exec(e.input);if(n){if(!h(t)&&!e.options.silent){let r=l(t)?t(...n,e.input,String(e.index)):t;h(r)||e.output.push(r)}return e.index+=n[0].length,e.indexMax=Math.max(e.indexMax,e.index),!0}return!1})},x=(e,t)=>n=>{if(n.input.startsWith(e,n.index)){if(!h(t)&&!n.options.silent){let r=l(t)?t(e,n.input,String(n.index)):t;h(r)||n.output.push(r)}return n.index+=e.length,n.indexMax=Math.max(n.indexMax,n.index),!0}return!1},S=(e,t,n,r)=>{let i=re(e);return ne(E(te(e=>{let r=0;for(;r<n;){let t=e.index;if(!i(e)||(r+=1,e.index===t))break}return r>=t})))},C=(e,t)=>S(e,0,1),w=(e,t)=>S(e,0,1/0),ee=(e,t)=>{let n=e.map(re);return ne(E(te(e=>{for(let t=0,r=n.length;t<r;t++)if(!n[t](e))return!1;return!0})))},T=(e,t)=>{let n=e.map(re);return ne(E(e=>{for(let t=0,r=n.length;t<r;t++)if(n[t](e))return!0;return!1}))},te=(e,t=!1)=>{let n=re(e);return e=>{let r=e.index,i=e.output.length,a=n(e);return(!a||t)&&(e.index=r,e.output.length!==i&&(e.output.length=i)),a}},E=(e,t)=>re(e),ne=(()=>{let e=0;return t=>{let n=re(t),r=e+=1;return e=>{var t;if(e.options.memoization===!1)return n(e);let i=e.index,a=(t=e.cache)[r]||(t[r]=/* @__PURE__ */ new Map),o=a.get(i);if(o===!1)return!1;if(d(o))return e.index=o,!0;if(o)return e.index=o.index,o.output?.length&&e.output.push(...o.output),!0;{let t=e.output.length;if(n(e)){let n=e.index,r=e.output.length;if(r>t){let o=e.output.slice(t,r);a.set(i,{index:n,output:o})}else a.set(i,n);return!0}return a.set(i,!1),!1}}}})(),D=e=>{let t;return n=>(t||=re(e()),t(n))},re=g(e=>{if(l(e))return u(e)?D(e):e;if(m(e)||p(e))return v(e);if(c(e))return ee(e);if(f(e))return T(Object.values(e));throw Error(`Invalid rule`)}),ie=`abcdefghijklmnopqrstuvwxyz`,ae=e=>{let t=``;for(;e>0;)t=ie[(e-1)%26]+t,e=Math.floor((e-1)/26);return t},oe=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t=t*26+ie.indexOf(e[n])+1;return t},se=(e,t)=>{if(t<e)return se(t,e);let n=[];for(;e<=t;)n.push(e++);return n},ce=(e,t,n)=>se(e,t).map(e=>String(e).padStart(n,`0`)),le=(e,t)=>se(oe(e),oe(t)).map(ae),O=e=>e,ue=e=>de(t=>_(t,e,{memoization:!1}).join(``)),de=e=>{let t={};return n=>t[n]??(t[n]=e(n))},fe=v(/^\*\*\/\*$/,`.*`),k=v(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(e,t,n)=>`.*${t?``:`(?:^|/)`}${n.replaceAll(`.`,`\\.`)}`),A=v(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(e,t,n,r)=>`.*${t?``:`(?:^|/)`}${n.replaceAll(`.`,`\\.`)}(?:${r.replaceAll(`,`,`|`).replaceAll(`.`,`\\.`)})`),pe=v(/\\./,O),me=v(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),j=v(/./,O),he=T([v(/^(?:!!)*!(.*)$/,(e,t)=>`(?!^${je(t)}$).*?`),v(/^(!!)+/,``)]),ge=T([v(/\/(\*\*\/)+/,`(?:/.+/|/)`),v(/^(\*\*\/)+/,`(?:^|.*/)`),v(/\/(\*\*)$/,`(?:/.*|$)`),v(/\*\*/,`.*`)]),_e=T([v(/\*\/(?!\*\*\/)/,`[^/]*/`),v(/\*/,`[^/]*`)]),M=v(`?`,`[^/]`),ve=v(`[`,O),ye=v(`]`,O),N=v(/[!^]/,`^/`),P=v(/[a-z]-[a-z]|[0-9]-[0-9]/i,O),be=T([pe,v(/[$.*+?^(){}[\|]/,e=>`\\${e}`),P,v(/[^\]]/,O)]),xe=ee([ve,C(N),w(be),ye]),Se=v(`{`,`(?:`),Ce=v(`}`,`)`),we=ee([Se,T([v(/(\d+)\.\.(\d+)/,(e,t,n)=>ce(+t,+n,Math.min(t.length,n.length)).join(`|`)),v(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>le(t,n).join(`|`)),v(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>le(t.toLowerCase(),n.toLowerCase()).join(`|`).toUpperCase())]),Ce]),Te=v(`{`,`(?:`),Ee=v(`}`,`)`),De=v(`,`,`|`),Oe=v(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),ke=v(/[^}]/,O),Ae=ee([Te,w(T([ge,_e,M,xe,we,D(()=>Ae),pe,Oe,De,ke])),Ee]),je=ue(w(T([fe,k,A,he,ge,_e,M,xe,we,Ae,pe,me,j]))),Me=v(/\\./,O),Ne=v(/./,O),Pe=ue(w(T([Me,v(/\*\*\*+/,`*`),v(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),v(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),Ne]))),Fe=(e,t)=>{let n=Array.isArray(e)?e:[e];if(!n.length)return!1;let r=n.map(Fe.compile),i=n.every(e=>/(\/(?:\*\*)?|\[\/\])$/.test(e)),a=t.replace(/[\\\/]+/g,`/`).replace(/\/$/,i?`/`:``);return r.some(e=>e.test(a))};Fe.compile=e=>RegExp(`^${je(Pe(e))}$`,`s`);var Ie=Fe;return o(s)})();return e.default||e},Wo;const Go=(e,t)=>(Wo||(Wo=Uo(),Uo=null),Wo(e,t)),Ko=/^[A-Za-z]:\//;function qo(e=``){return e&&e.replace(/\\/g,`/`).replace(Ko,e=>e.toUpperCase())}const Jo=/^[/\\]{2}/,Yo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Xo=/^[A-Za-z]:$/,Zo=/^\/([A-Za-z]:)?$/,Qo=/.(\.[^./]+|\.)$/,$o=/^[/\\]|^[a-zA-Z]:[/\\]/,es=function(e){if(e.length===0)return`.`;e=qo(e);let t=e.match(Jo),n=as(e),r=e[e.length-1]===`/`;return e=is(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),Xo.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!as(e)?`/${e}`:e)},ts=function(...e){let t=``;for(let n of e)if(n){if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n}return es(t)};function ns(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const rs=function(...e){e=e.map(e=>qo(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:ns();i&&i.length!==0&&(t=`${i}/${t}`,n=as(i))}return t=is(t,!n),n&&!as(t)?`/${t}`:t.length>0?t:`.`};function is(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(i!==s-1&&a!==1){if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1}i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const as=function(e){return Yo.test(e)},os=function(e){return qo(e)},ss=function(e){if(e===`..`)return``;let t=Qo.exec(qo(e));return t&&t[1]||``},cs=function(e,t){let n=rs(e).replace(Zo,`$1`).split(`/`),r=rs(t).replace(Zo,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},ls=function(e){let t=qo(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&Xo.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(as(e)?`/`:`.`)},us=function(e){let t=e.ext?e.ext.startsWith(`.`)?e.ext:`.${e.ext}`:``,n=[e.root,e.dir,e.base??(e.name??``)+t].filter(Boolean);return qo(e.root?rs(...n):n.join(`/`))},ds=function(e,t){let n=qo(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r},fs={__proto__:null,basename:ds,dirname:ls,extname:ss,format:us,isAbsolute:as,join:ts,matchesGlob:(e,t)=>Go(t,es(e)),normalize:es,normalizeString:is,parse:function(e){let t=$o.exec(e)?.[0]?.replace(/\\/g,`/`)||``,n=ds(e),r=ss(n);return{root:t,dir:ls(e),base:n,ext:r,name:n.slice(0,n.length-r.length)}},relative:cs,resolve:rs,sep:`/`,toNamespacedPath:os},ps=globalThis.process?.platform===`win32`?`;`:`:`,ms={posix:void 0,win32:void 0},hs=(e=ps)=>new Proxy(fs,{get(t,n){return n===`delimiter`?e:n===`posix`?gs:n===`win32`?_s:ms[n]||fs[n]}}),gs=/* @__PURE__ */ hs(`:`),_s=/* @__PURE__ */ hs(`;`);var vs=/* @__PURE__ */ j(((e,t)=>{let n=/[\t\n\f\r "#'()/;[\\\]{}]/g,r=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,i=/.[\r\n"'(/\\]/,a=/[\da-f]/i;t.exports=function(e,t={}){let o=e.css.valueOf(),s=t.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[],S=-1;function C(){return y}function w(t){throw e.error(`Unclosed `+t,y)}function ee(){return x.length===0&&y>=v}function T(e){if(x.length)return x.pop();if(y>=v)return;let t=e?e.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:d=y;do d+=1,c=o.charCodeAt(d);while(c===32||c===10||c===9||c===13||c===12);p=[`space`,o.slice(y,d)],y=d-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);p=[e,e,y];break}case 40:if(_=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),_===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){d=y;do{if(m=!1,d=o.indexOf(`)`,d+1),d===-1){if(s||t){d=y;break}w(`bracket`)}for(h=d;o.charCodeAt(h-1)===92;)--h,m=!m}while(m);p=[`brackets`,o.slice(y,d+1),y,d],y=d}else y<=S?p=[`(`,`(`,y]:(d=o.indexOf(`)`,y+1),l=o.slice(y,d+1),d===-1||i.test(l)?(S=d===-1?v:d,p=[`(`,`(`,y]):(p=[`brackets`,l,y,d],y=d));break;case 39:case 34:f=c===39?`'`:`"`,d=y;do{if(m=!1,d=o.indexOf(f,d+1),d===-1){if(s||t){d=y+1;break}w(`string`)}for(h=d;o.charCodeAt(h-1)===92;)--h,m=!m}while(m);p=[`string`,o.slice(y,d+1),y,d],y=d;break;case 64:n.lastIndex=y+1,n.test(o),d=n.lastIndex===0?o.length-1:n.lastIndex-2,p=[`at-word`,o.slice(y,d+1),y,d],y=d;break;case 92:for(d=y,u=!0;o.charCodeAt(d+1)===92;)d+=1,u=!u;if(c=o.charCodeAt(d+1),u&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(d+=1,a.test(o.charAt(d)))){for(;a.test(o.charAt(d+1));)d+=1;o.charCodeAt(d+1)===32&&(d+=1)}p=[`word`,o.slice(y,d+1),y,d],y=d;break;default:c===47&&o.charCodeAt(y+1)===42?(d=o.indexOf(`*/`,y+2)+1,d===0&&(s||t?d=o.length:w(`comment`)),p=[`comment`,o.slice(y,d+1),y,d],y=d):(r.lastIndex=y+1,r.test(o),d=r.lastIndex===0?o.length-1:r.lastIndex-2,p=[`word`,o.slice(y,d+1),y,d],b.push(p),y=d)}return y++,p}function te(e){x.push(e)}return{back:te,endOfFile:ee,nextToken:T,position:C}}})),ys=/* @__PURE__ */ j(((e,t)=>{let n=Nt(),r=vs(),i;function a(e){i=e}let o={";":n.yellow,":":n.yellow,"(":n.cyan,")":n.cyan,"[":n.yellow,"]":n.yellow,"{":n.yellow,"}":n.yellow,"at-word":n.cyan,brackets:n.cyan,call:n.cyan,class:n.yellow,comment:n.gray,hash:n.magenta,string:n.green};function s([e,t],n){if(e===`word`){if(t[0]===`.`)return`class`;if(t[0]===`#`)return`hash`}if(!n.endOfFile()){let e=n.nextToken();if(n.back(e),e[0]===`brackets`||e[0]===`(`)return`call`}return e}function c(e){let t=r(new i(e),{ignoreErrors:!0}),n=``;for(;!t.endOfFile();){let e=t.nextToken(),r=o[s(e,t)];n+=r?e[1].split(/\r?\n/).map(e=>r(e)).join(`
12
12
  `):e[1]}return n}c.registerInput=a,t.exports=c})),bs=/* @__PURE__ */ j(((e,t)=>{let n=Nt(),r=ys();var i=class e extends Error{constructor(t,n,r,i,a,o){super(t),this.name=`CssSyntaxError`,this.reason=t,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),n!==void 0&&r!==void 0&&(typeof n==`number`?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(e){if(!this.source)return``;let t=this.source;e??=n.isColorSupported;let i=e=>e,a=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);a=t=>e(s(t)),i=e=>t(e),r&&(o=e=>r(e))}let s=t.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length;return s.slice(c,l).map((e,t)=>{let n=c+1+t,r=` `+(` `+n).slice(-u)+` | `;if(n===this.line){if(e.length>160){let t=Math.max(0,this.column-20),n=Math.max(this.column+20,this.endColumn+20),s=e.slice(t,n),c=i(r.replace(/\d/g,` `))+e.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g,` `);return a(`>`)+i(r)+o(s)+`
13
13
  `+c+a(`^`)}let t=i(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return a(`>`)+i(r)+o(e)+`
@@ -2868,7 +2868,7 @@ let f=e.rootValue===void 0?u??Zj.rootValue:e.rootValue,p=e.rootValue===void 0&&t
2868
2868
  /* c8 ignore end */
2869
2869
  if(!g)return{postcssPlugin:tM};let y=(()=>{if(!p)return e=>nM(m.rootValue);let e=/* @__PURE__ */ new WeakMap;return t=>{let n=e.get(t);if(n)return n;let r=m.rootValue(t,``,``),i=()=>r;return e.set(t,i),i}})(),b=d===`harmony`,x=l??c,S=m.unitPrecision??Zj.unitPrecision,C=m.minPixelValue??Zj.minPixelValue,w=_?Tj(m.selectorBlackList,{cache:!0}):void 0,ee=Jj({exclude:[],keepZeroUnit:!0,mediaQuery:m.mediaQuery??Zj.mediaQuery,minValue:0,propList:[`*`],replace:m.replace??Zj.replace,rules:[{from:e=>e===`px`||e===`rpx`,transform(e,t){if(!t.prop||v(t.prop))return t.rule&&w?.(t.rule)?b?{value:e,unit:x}:void 0:b&&eM.has(t.rawUnit)?{value:e,unit:x}:!h&&e===1||e<C?b?{value:e,unit:x}:void 0:{value:e/y(t.input)(t.input,t.match,t.rawValue),unit:c}}}],unitPrecision:S,unitRegex:Xj(r)});return{postcssPlugin:tM,prepare(e){let t=e.opts.from,r=n?Array.isArray(n)?n.some(e=>typeof e==`string`?t?.includes(e):t?!!t.match(e):!1):n(t):!1;return{Once(e){var t;e.walkComments(t=>{if(t.text===`postcss-pxtrans disable`)return e.raws.__pxtransSkip=!0,!1}),!(e.raws.__pxtransSkip||r)&&((t=ee.Once)==null||t.call(ee,e))}}}}}rM.postcss=!0;var iM=`postcss-rule-unit-converter`;const aM={rules:[],unitRegex:void 0,unitPrecision:5,minValue:0,keepZeroUnit:!1,selectorBlackList:[],propList:[`*`],replace:!0,mediaQuery:!1,exclude:[/node_modules/i],disabled:!1},oM=String.raw`\d+(?:\.\d+)?|\.\d+`,sM=iM,cM=Sj(aM);function lM(e){let t=e.map(e=>e.replace(/[\\^$.*+?()[\]{}|]/g,String.raw`\$&`)).join(`|`),n=[String.raw`"[^"]+"`,String.raw`'[^']+'`,String.raw`url\([^)]+\)`,String.raw`var\([^)]+\)`,String.raw`(${oM})(${t})`];return new RegExp(n.join(`|`),`g`)}function uM(){let e=[String.raw`"[^"]+"`,String.raw`'[^']+'`,String.raw`url\([^)]+\)`,String.raw`var\([^)]+\)`,String.raw`(${oM})([a-zA-Z%]+)`];return new RegExp(e.join(`|`),`g`)}function dM(e,t){return typeof e==`function`?e(t):e}function fM(e,t){if(typeof e==`string`){let n=e.trim().toLowerCase();return n?{matcher:n,rule:t,type:`string`,unit:n}:null}return e instanceof RegExp?{matcher:e,rule:t,type:`regex`}:typeof e==`function`?{matcher:e,rule:t,type:`function`}:null}function pM(e){let t=[];for(let n of e){let e=fM(n.from,n);e&&t.push(e)}let n=t.some(e=>e.type!==`string`);if(n)return{entries:t,stringRules:void 0,hasComplexMatcher:n};let r=/* @__PURE__ */ new Map;for(let e of t)e.type===`string`&&!r.has(e.unit)&&r.set(e.unit,e.rule);return{entries:t,stringRules:r,hasComplexMatcher:n}}function mM(e,t){for(let n of e){if(n.type===`string`){if(n.unit===t)return n.rule;continue}if(n.type===`regex`){if((n.matcher.global||n.matcher.sticky)&&(n.matcher.lastIndex=0),n.matcher.test(t))return n.rule;continue}if(n.matcher(t))return n.rule}}function hM(e,t){return e===void 0||Number.isNaN(e)?null:typeof e==`number`?{unit:t,value:e}:Number.isNaN(e.value)?null:{unit:e.unit??t,value:e.value}}function gM(e,t,n,r,i,a){let o=t>=0&&t<=100;return function(s,c,l){if(!c||!l)return s;let u=Number(c);if(Number.isNaN(u))return s;let d=l,f=i?d.toLowerCase():d,p=e(f);if(!p||u<(p.minValue??n))return s;let m={...a,fromUnit:f,match:s,rawUnit:d,rawValue:c},h=p.to??f,g=hM(typeof p.transform==`function`?p.transform(u,m):typeof p.factor==`number`?u*p.factor:void 0,h);if(!g)return s;let _=o?yj(g.value,t):g.value;return _===0&&!r?`0`:`${_}${g.unit}`}}const _M=(e={})=>{let{rules:t,unitRegex:n,unitPrecision:r,minValue:i,keepZeroUnit:a,selectorBlackList:o,propList:s,replace:c,mediaQuery:l,exclude:u,disabled:d}=cM(e);if(d||t.length===0)return{postcssPlugin:sM};let{entries:f,stringRules:p,hasComplexMatcher:m}=pM(t);if(f.length===0)return{postcssPlugin:sM};let h,g,_=!0;if(n)h=n,g=e=>mM(f,e);else if(m)h=uM(),g=e=>mM(f,e);else{let e=Array.from(p?.keys()??[]).sort((e,t)=>t.length-e.length);if(e.length===0)return{postcssPlugin:sM};h=lM(e),g=e=>p?.get(e),_=!1}return{postcssPlugin:sM,Once(e){Nj({root:e,unitRegex:h,propList:s,selectorBlackList:o,exclude:u,replace:c,mediaQuery:l,createReplacer:e=>gM(g,r,i,a,_,e),shouldProcessAtRule:e=>e.name===`media`})}}};_M.postcss=!0;function Z(e){return e===void 0?{}:{minValue:e}}function vM(e,t,n,r){return{from:e,to:t,factor:r,...Z(n)}}const yM={rem:16,em:16,vw:3.75,vh:6.67,vmin:3.75,vmax:6.67,rpx:.5};function bM(e){return Object.prototype.toString.call(e)===`[object Object]`}function xM(e){return e===void 0?null:e}function SM(e){let t=[],n=(e,n)=>{if(typeof e==`string`){let r=e.trim().toLowerCase();if(!r)return;t.push({matcher:r,rule:xM(n)});return}t.push({matcher:e,rule:xM(n)})};if(Array.isArray(e)){for(let t of e){if(!t)continue;let[e,r]=t;n(e,r)}return t}if(e instanceof Map){for(let[t,r]of e.entries())n(t,r);return t}for(let[t,r]of Object.entries(e))n(t,r);return t}function CM(e){return e===void 0?yM:bM(e)?{...yM,...e}:e}function wM(e,t,n,r,i){return typeof t==`number`?{from:e,to:n,factor:t,...Z(r)}:{from:e,to:n,...Z(r),transform(e,n){if(t!==!1&&i!==!1){if(typeof t==`function`)return t(e,n);if(i)return i(e,n.fromUnit,n)}}}}function TM(e){return e}function EM(e){return e}function DM(e={}){let{minValue:t,rootValue:n=16,to:r=`px`}=e;return typeof n==`number`?vM(`rem`,r,t,n):{from:`rem`,to:r,...Z(t),transform:(e,t)=>e*dM(n,t.input)}}function OM(e={}){return DM({...e,to:e.to??`rpx`})}function kM(e={}){return DM(e)}function AM(e={}){let{minValue:t,rootValue:n=16,viewportWidth:r=375,to:i=`vw`}=e;return typeof n==`number`&&typeof r==`number`?vM(`rem`,i,t,n*100/r):{from:`rem`,to:i,...Z(t),transform:(e,t)=>{let i=dM(n,t.input),a=dM(r,t.input);return e*i*100/a}}}function jM(e={}){return AM({...e,to:e.to??`vw`})}function MM(e={}){let{minValue:t,rootValue:n=16,viewportHeight:r=667,to:i=`vh`}=e;return typeof n==`number`&&typeof r==`number`?vM(`rem`,i,t,n*100/r):{from:`rem`,to:i,...Z(t),transform:(e,t)=>{let i=dM(n,t.input),a=dM(r,t.input);return e*i*100/a}}}function NM(e={}){let{minValue:t,rootValue:n=16,to:r=`rem`}=e;return typeof n==`number`?vM(`px`,r,t,1/n):{from:`px`,to:r,...Z(t),transform:(e,t)=>e/dM(n,t.input)}}function PM(e={}){let{minValue:t,viewportWidth:n=375,to:r=`vw`}=e;return typeof n==`number`?vM(`px`,r,t,100/n):{from:`px`,to:r,...Z(t),transform:(e,t)=>e*100/dM(n,t.input)}}function FM(e={}){return PM({...e,to:e.to??`vw`})}function IM(e={}){let{minValue:t,viewportHeight:n=667,to:r=`vh`}=e;return typeof n==`number`?vM(`px`,r,t,100/n):{from:`px`,to:r,...Z(t),transform:(e,t)=>e*100/dM(n,t.input)}}function LM(e={}){let{minValue:t,ratio:n=.5,to:r=`px`}=e;return{from:`rpx`,to:r,...Z(t),factor:n}}function RM(e={}){let{minValue:t,ratio:n=2,to:r=`rpx`}=e;return{from:`px`,to:r,...Z(t),factor:n}}function zM(e={}){let{minValue:t,rootValue:n=16,ratio:r=.5,to:i=`rem`}=e;return typeof n==`number`?vM(`rpx`,i,t,r/n):{from:`rpx`,to:i,...Z(t),transform:(e,t)=>e*r/dM(n,t.input)}}function BM(e={}){let{minValue:t,rootValue:n=16,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?vM(`rem`,i,t,n*r):{from:`rem`,to:i,...Z(t),transform:(e,t)=>e*dM(n,t.input)*r}}function VM(e={}){return BM(e)}function HM(e={}){let{minValue:t,viewportWidth:n=375,ratio:r=.5,to:i=`vw`}=e;return typeof n==`number`?vM(`rpx`,i,t,r*100/n):{from:`rpx`,to:i,...Z(t),transform:(e,t)=>e*r*100/dM(n,t.input)}}function UM(e={}){let{minValue:t,viewportHeight:n=667,ratio:r=.5,to:i=`vh`}=e;return typeof n==`number`?vM(`rpx`,i,t,r*100/n):{from:`rpx`,to:i,...Z(t),transform:(e,t)=>e*r*100/dM(n,t.input)}}function WM(e={}){let{minValue:t,viewportWidth:n=375,to:r=`px`}=e;return typeof n==`number`?vM(`vw`,r,t,n/100):{from:`vw`,to:r,...Z(t),transform:(e,t)=>e*dM(n,t.input)/100}}function GM(e={}){let{minValue:t,viewportHeight:n=667,to:r=`px`}=e;return typeof n==`number`?vM(`vh`,r,t,n/100):{from:`vh`,to:r,...Z(t),transform:(e,t)=>e*dM(n,t.input)/100}}function KM(e={}){let{minValue:t,rootValue:n=16,viewportWidth:r=375,to:i=`rem`}=e;return{from:`vw`,to:i,...Z(t),transform:(e,t)=>{let i=dM(r,t.input),a=dM(n,t.input);return e*i/100/a}}}function qM(e={}){let{minValue:t,rootValue:n=16,viewportHeight:r=667,to:i=`rem`}=e;return{from:`vh`,to:i,...Z(t),transform:(e,t)=>{let i=dM(r,t.input),a=dM(n,t.input);return e*i/100/a}}}function JM(e={}){let{minValue:t,viewportWidth:n=375,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?vM(`vw`,i,t,n/100*r):{from:`vw`,to:i,...Z(t),transform:(e,t)=>e*dM(n,t.input)/100*r}}function YM(e={}){let{minValue:t,viewportHeight:n=667,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?vM(`vh`,i,t,n/100*r):{from:`vh`,to:i,...Z(t),transform:(e,t)=>e*dM(n,t.input)/100*r}}function XM(e={}){let{minValue:t,to:n=`px`,transform:r,unitMap:i}=e;return r===!1?[]:SM(CM(i)).map(e=>wM(e.matcher,e.rule,n,t,r))}function ZM(e={}){let{minValue:t,ratio:n=2,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[RM({...Z(t),ratio:n,to:`rpx`}),BM({...Z(t),ratio:n,rootValue:r,to:`rpx`}),JM({...Z(t),ratio:n,viewportWidth:i,to:`rpx`}),YM({...Z(t),ratio:n,viewportHeight:a,to:`rpx`})]}function QM(e={}){let{minValue:t,ratio:n=.5,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[DM({...Z(t),rootValue:r,to:`px`}),LM({...Z(t),ratio:n,to:`px`}),WM({...Z(t),viewportWidth:i,to:`px`}),GM({...Z(t),viewportHeight:a,to:`px`})]}function $M(e={}){let{minValue:t,ratio:n=.5,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667,viewportUnit:o=`vw`}=e;return o===`vh`?[IM({...Z(t),viewportHeight:a,to:`vh`}),MM({...Z(t),rootValue:r,viewportHeight:a,to:`vh`}),UM({...Z(t),ratio:n,viewportHeight:a,to:`vh`})]:[FM({...Z(t),viewportWidth:i,to:`vw`}),jM({...Z(t),rootValue:r,viewportWidth:i,to:`vw`}),HM({...Z(t),ratio:n,viewportWidth:i,to:`vw`})]}function eN(e={}){let{minValue:t,ratio:n=2,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[NM({...Z(t),rootValue:r,to:`rem`}),FM({...Z(t),viewportWidth:i,to:`vw`}),IM({...Z(t),viewportHeight:a,to:`vh`}),KM({...Z(t),rootValue:r,viewportWidth:i,to:`rem`}),qM({...Z(t),rootValue:r,viewportHeight:a,to:`rem`}),JM({...Z(t),ratio:n,viewportWidth:i,to:`rpx`}),YM({...Z(t),ratio:n,viewportHeight:a,to:`rpx`})]}const tN={definePreset:TM,definePresetGroup:EM,remToPx:DM,remToRpx:OM,remToRpxByRatio:VM,remToRpxRatio:BM,remToResponsivePixel:kM,remToViewport:AM,remToVw:jM,remToVh:MM,pxToRem:NM,pxToViewport:PM,pxToVw:FM,pxToVh:IM,pxToRpx:RM,rpxToPx:LM,rpxToRem:zM,rpxToVw:HM,rpxToVh:UM,vwToPx:WM,vhToPx:GM,vwToRem:KM,vhToRem:qM,vwToRpx:JM,vhToRpx:YM,pxPresetGroup:QM,rpxPresetGroup:ZM,viewportPresetGroup:$M,webPresetGroup:eN,unitsToPx:XM};var nN=_M;const rN={rootValue:16,unitPrecision:5,selectorBlackList:[],propList:[`font`,`font-size`,`line-height`,`letter-spacing`],replace:!0,mediaQuery:!1,minRemValue:0,exclude:[/node_modules/i],transformUnit:`px`,disabled:!1,processorStage:`Once`},iN=`postcss-rem-to-responsive-pixel`,aN=Sj(rN),oN=(e={})=>{let{exclude:t,mediaQuery:n,minRemValue:r,propList:i,replace:a,rootValue:o,selectorBlackList:s,transformUnit:c,unitPrecision:l,disabled:u,processorStage:d}=aN(e);if(u)return{postcssPlugin:iN};let f=nN({disabled:u,exclude:t,mediaQuery:n,minValue:r,propList:i,replace:a,rules:[c===`rpx`?tN.remToRpx({rootValue:o}):tN.remToPx({rootValue:o})],selectorBlackList:s,unitPrecision:l});return{postcssPlugin:iN,[d]:e=>{var t;(t=f.Once)==null||t.call(f,e)}}};oN.postcss=!0;var sN=`postcss-rule-unit-converter`;const cN={rules:[],unitRegex:void 0,unitPrecision:5,minValue:0,keepZeroUnit:!1,selectorBlackList:[],propList:[`*`],replace:!0,mediaQuery:!1,exclude:[/node_modules/i],disabled:!1},lN=String.raw`\d+(?:\.\d+)?|\.\d+`,uN=sN,dN=Sj(cN);function fN(e){let t=e.map(e=>e.replace(/[\\^$.*+?()[\]{}|]/g,String.raw`\$&`)).join(`|`),n=[String.raw`"[^"]+"`,String.raw`'[^']+'`,String.raw`url\([^)]+\)`,String.raw`var\([^)]+\)`,String.raw`(${lN})(${t})`];return new RegExp(n.join(`|`),`g`)}function pN(){let e=[String.raw`"[^"]+"`,String.raw`'[^']+'`,String.raw`url\([^)]+\)`,String.raw`var\([^)]+\)`,String.raw`(${lN})([a-zA-Z%]+)`];return new RegExp(e.join(`|`),`g`)}function mN(e,t){return typeof e==`function`?e(t):e}function Q(e){return e===void 0?{}:{minValue:e}}function hN(e,t,n,r){return{from:e,to:t,factor:r,...Q(n)}}const gN={rem:16,em:16,vw:3.75,vh:6.67,vmin:3.75,vmax:6.67,rpx:.5};function _N(e){return Object.prototype.toString.call(e)===`[object Object]`}function vN(e){return e===void 0?null:e}function yN(e){let t=[],n=(e,n)=>{if(typeof e==`string`){let r=e.trim().toLowerCase();if(!r)return;t.push({matcher:r,rule:vN(n)});return}t.push({matcher:e,rule:vN(n)})};if(Array.isArray(e)){for(let t of e){if(!t)continue;let[e,r]=t;n(e,r)}return t}if(e instanceof Map){for(let[t,r]of e.entries())n(t,r);return t}for(let[t,r]of Object.entries(e))n(t,r);return t}function bN(e){return e===void 0?gN:_N(e)?{...gN,...e}:e}function xN(e,t,n,r,i){return typeof t==`number`?{from:e,to:n,factor:t,...Q(r)}:{from:e,to:n,...Q(r),transform(e,n){if(t!==!1&&i!==!1){if(typeof t==`function`)return t(e,n);if(i)return i(e,n.fromUnit,n)}}}}function SN(e){return e}function CN(e){return e}function wN(e={}){let{minValue:t,rootValue:n=16,to:r=`px`}=e;return typeof n==`number`?hN(`rem`,r,t,n):{from:`rem`,to:r,...Q(t),transform:(e,t)=>e*mN(n,t.input)}}function TN(e={}){return wN({...e,to:e.to??`rpx`})}function EN(e={}){return wN(e)}function DN(e={}){let{minValue:t,rootValue:n=16,viewportWidth:r=375,to:i=`vw`}=e;return typeof n==`number`&&typeof r==`number`?hN(`rem`,i,t,n*100/r):{from:`rem`,to:i,...Q(t),transform:(e,t)=>{let i=mN(n,t.input),a=mN(r,t.input);return e*i*100/a}}}function ON(e={}){return DN({...e,to:e.to??`vw`})}function kN(e={}){let{minValue:t,rootValue:n=16,viewportHeight:r=667,to:i=`vh`}=e;return typeof n==`number`&&typeof r==`number`?hN(`rem`,i,t,n*100/r):{from:`rem`,to:i,...Q(t),transform:(e,t)=>{let i=mN(n,t.input),a=mN(r,t.input);return e*i*100/a}}}function AN(e={}){let{minValue:t,rootValue:n=16,to:r=`rem`}=e;return typeof n==`number`?hN(`px`,r,t,1/n):{from:`px`,to:r,...Q(t),transform:(e,t)=>e/mN(n,t.input)}}function jN(e={}){let{minValue:t,viewportWidth:n=375,to:r=`vw`}=e;return typeof n==`number`?hN(`px`,r,t,100/n):{from:`px`,to:r,...Q(t),transform:(e,t)=>e*100/mN(n,t.input)}}function MN(e={}){return jN({...e,to:e.to??`vw`})}function NN(e={}){let{minValue:t,viewportHeight:n=667,to:r=`vh`}=e;return typeof n==`number`?hN(`px`,r,t,100/n):{from:`px`,to:r,...Q(t),transform:(e,t)=>e*100/mN(n,t.input)}}function PN(e={}){let{minValue:t,ratio:n=.5,to:r=`px`}=e;return{from:`rpx`,to:r,...Q(t),factor:n}}function FN(e={}){let{minValue:t,ratio:n=2,to:r=`rpx`}=e;return{from:`px`,to:r,...Q(t),factor:n}}function IN(e={}){let{minValue:t,rootValue:n=16,ratio:r=.5,to:i=`rem`}=e;return typeof n==`number`?hN(`rpx`,i,t,r/n):{from:`rpx`,to:i,...Q(t),transform:(e,t)=>e*r/mN(n,t.input)}}function LN(e={}){let{minValue:t,rootValue:n=16,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?hN(`rem`,i,t,n*r):{from:`rem`,to:i,...Q(t),transform:(e,t)=>e*mN(n,t.input)*r}}function RN(e={}){return LN(e)}function zN(e={}){let{minValue:t,viewportWidth:n=375,ratio:r=.5,to:i=`vw`}=e;return typeof n==`number`?hN(`rpx`,i,t,r*100/n):{from:`rpx`,to:i,...Q(t),transform:(e,t)=>e*r*100/mN(n,t.input)}}function BN(e={}){let{minValue:t,viewportHeight:n=667,ratio:r=.5,to:i=`vh`}=e;return typeof n==`number`?hN(`rpx`,i,t,r*100/n):{from:`rpx`,to:i,...Q(t),transform:(e,t)=>e*r*100/mN(n,t.input)}}function VN(e={}){let{minValue:t,viewportWidth:n=375,to:r=`px`}=e;return typeof n==`number`?hN(`vw`,r,t,n/100):{from:`vw`,to:r,...Q(t),transform:(e,t)=>e*mN(n,t.input)/100}}function HN(e={}){let{minValue:t,viewportHeight:n=667,to:r=`px`}=e;return typeof n==`number`?hN(`vh`,r,t,n/100):{from:`vh`,to:r,...Q(t),transform:(e,t)=>e*mN(n,t.input)/100}}function UN(e={}){let{minValue:t,rootValue:n=16,viewportWidth:r=375,to:i=`rem`}=e;return{from:`vw`,to:i,...Q(t),transform:(e,t)=>{let i=mN(r,t.input),a=mN(n,t.input);return e*i/100/a}}}function WN(e={}){let{minValue:t,rootValue:n=16,viewportHeight:r=667,to:i=`rem`}=e;return{from:`vh`,to:i,...Q(t),transform:(e,t)=>{let i=mN(r,t.input),a=mN(n,t.input);return e*i/100/a}}}function GN(e={}){let{minValue:t,viewportWidth:n=375,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?hN(`vw`,i,t,n/100*r):{from:`vw`,to:i,...Q(t),transform:(e,t)=>e*mN(n,t.input)/100*r}}function KN(e={}){let{minValue:t,viewportHeight:n=667,ratio:r=2,to:i=`rpx`}=e;return typeof n==`number`?hN(`vh`,i,t,n/100*r):{from:`vh`,to:i,...Q(t),transform:(e,t)=>e*mN(n,t.input)/100*r}}function qN(e={}){let{minValue:t,to:n=`px`,transform:r,unitMap:i}=e;return r===!1?[]:yN(bN(i)).map(e=>xN(e.matcher,e.rule,n,t,r))}function JN(e={}){let{minValue:t,ratio:n=2,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[FN({...Q(t),ratio:n,to:`rpx`}),LN({...Q(t),ratio:n,rootValue:r,to:`rpx`}),GN({...Q(t),ratio:n,viewportWidth:i,to:`rpx`}),KN({...Q(t),ratio:n,viewportHeight:a,to:`rpx`})]}function YN(e={}){let{minValue:t,ratio:n=.5,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[wN({...Q(t),rootValue:r,to:`px`}),PN({...Q(t),ratio:n,to:`px`}),VN({...Q(t),viewportWidth:i,to:`px`}),HN({...Q(t),viewportHeight:a,to:`px`})]}function XN(e={}){let{minValue:t,ratio:n=.5,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667,viewportUnit:o=`vw`}=e;return o===`vh`?[NN({...Q(t),viewportHeight:a,to:`vh`}),kN({...Q(t),rootValue:r,viewportHeight:a,to:`vh`}),BN({...Q(t),ratio:n,viewportHeight:a,to:`vh`})]:[MN({...Q(t),viewportWidth:i,to:`vw`}),ON({...Q(t),rootValue:r,viewportWidth:i,to:`vw`}),zN({...Q(t),ratio:n,viewportWidth:i,to:`vw`})]}function ZN(e={}){let{minValue:t,ratio:n=2,rootValue:r=16,viewportWidth:i=375,viewportHeight:a=667}=e;return[AN({...Q(t),rootValue:r,to:`rem`}),MN({...Q(t),viewportWidth:i,to:`vw`}),NN({...Q(t),viewportHeight:a,to:`vh`}),UN({...Q(t),rootValue:r,viewportWidth:i,to:`rem`}),WN({...Q(t),rootValue:r,viewportHeight:a,to:`rem`}),GN({...Q(t),ratio:n,viewportWidth:i,to:`rpx`}),KN({...Q(t),ratio:n,viewportHeight:a,to:`rpx`})]}const QN={definePreset:SN,definePresetGroup:CN,remToPx:wN,remToRpx:TN,remToRpxByRatio:RN,remToRpxRatio:LN,remToResponsivePixel:EN,remToViewport:DN,remToVw:ON,remToVh:kN,pxToRem:AN,pxToViewport:jN,pxToVw:MN,pxToVh:NN,pxToRpx:FN,rpxToPx:PN,rpxToRem:IN,rpxToVw:zN,rpxToVh:BN,vwToPx:VN,vhToPx:HN,vwToRem:UN,vhToRem:WN,vwToRpx:GN,vhToRpx:KN,pxPresetGroup:YN,rpxPresetGroup:JN,viewportPresetGroup:XN,webPresetGroup:ZN,unitsToPx:qN};function $N(e,t){if(typeof e==`string`){let n=e.trim().toLowerCase();return n?{matcher:n,rule:t,type:`string`,unit:n}:null}return e instanceof RegExp?{matcher:e,rule:t,type:`regex`}:typeof e==`function`?{matcher:e,rule:t,type:`function`}:null}function eP(e){let t=[];for(let n of e){let e=$N(n.from,n);e&&t.push(e)}let n=t.some(e=>e.type!==`string`);if(n)return{entries:t,stringRules:void 0,hasComplexMatcher:n};let r=/* @__PURE__ */ new Map;for(let e of t)e.type===`string`&&!r.has(e.unit)&&r.set(e.unit,e.rule);return{entries:t,stringRules:r,hasComplexMatcher:n}}function tP(e,t){for(let n of e){if(n.type===`string`){if(n.unit===t)return n.rule;continue}if(n.type===`regex`){if((n.matcher.global||n.matcher.sticky)&&(n.matcher.lastIndex=0),n.matcher.test(t))return n.rule;continue}if(n.matcher(t))return n.rule}}function nP(e,t){return e===void 0||Number.isNaN(e)?null:typeof e==`number`?{unit:t,value:e}:Number.isNaN(e.value)?null:{unit:e.unit??t,value:e.value}}function rP(e,t,n,r,i,a){let o=t>=0&&t<=100;return function(s,c,l){if(!c||!l)return s;let u=Number(c);if(Number.isNaN(u))return s;let d=l,f=i?d.toLowerCase():d,p=e(f);if(!p||u<(p.minValue??n))return s;let m={...a,fromUnit:f,match:s,rawUnit:d,rawValue:c},h=p.to??f,g=nP(typeof p.transform==`function`?p.transform(u,m):typeof p.factor==`number`?u*p.factor:void 0,h);if(!g)return s;let _=o?yj(g.value,t):g.value;return _===0&&!r?`0`:`${_}${g.unit}`}}const iP=(e={})=>{let{rules:t,unitRegex:n,unitPrecision:r,minValue:i,keepZeroUnit:a,selectorBlackList:o,propList:s,replace:c,mediaQuery:l,exclude:u,disabled:d}=dN(e);if(d||t.length===0)return{postcssPlugin:uN};let{entries:f,stringRules:p,hasComplexMatcher:m}=eP(t);if(f.length===0)return{postcssPlugin:uN};let h,g,_=!0;if(n)h=n,g=e=>tP(f,e);else if(m)h=pN(),g=e=>tP(f,e);else{let e=Array.from(p?.keys()??[]).sort((e,t)=>t.length-e.length);if(e.length===0)return{postcssPlugin:uN};h=fN(e),g=e=>p?.get(e),_=!1}return{postcssPlugin:uN,Once(e){Nj({root:e,unitRegex:h,propList:s,selectorBlackList:o,exclude:u,replace:c,mediaQuery:l,createReplacer:e=>rP(g,r,i,a,_,e),shouldProcessAtRule:e=>e.name===`media`})}}};iP.postcss=!0;var aP=iP;function oP(e,t){return e}const sP=/* @__PURE__ */ new Set([`*`,`view`,`text`,`::before`,`::after`,`:before`,`:after`,`::backdrop`]),cP=/var\(\s*(--tw-[\w-]+)\s*\)/g,lP=/\.[\w-]+/,uP=/\s+/g;function dP(e){return!!e?.uniAppX}function fP(e){return e.replace(uP,``).toLowerCase()}function pP(e){return sP.has(fP(e))}function mP(e){return Array.isArray(e.selectors)&&e.selectors.length>0&&e.selectors.every(pP)}function hP(e){return Array.isArray(e.selectors)&&e.selectors.some(e=>lP.test(e))}function gP(e){let t=/* @__PURE__ */ new Set;for(let n of e.matchAll(cP)){let e=n[1];e&&t.add(e)}return t}function _P(e){let t=/* @__PURE__ */ new Map;return e.root.walkRules(e=>{mP(e)&&(e.walkDecls(e=>{e.prop.startsWith(`--tw-`)&&!t.has(e.prop)&&t.set(e.prop,{prop:e.prop,value:e.value,important:e.important})}),e.remove())}),t}function vP(e,t){t.size!==0&&e.root.walkRules(e=>{if(!hP(e))return;let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set;e.walkDecls(e=>{n.add(e.prop);for(let t of gP(e.value))r.add(t)});let i=[];for(let e of r){if(n.has(e))continue;let r=t.get(e);r&&i.push(r)}for(let t of i.reverse())e.prepend(ac.decl({prop:t.prop,value:t.value,important:t.important}))})}function yP(e,t){if(!dP(t))return e;let n=_P(e);return vP(e,n),n.size===0?e:e.root.toResult(e.opts)}function bP(e,t){t&&e.value!==`:host`&&e.remove()}function xP(e,t){return dP(t)&&(e.type===`attribute`||e.type===`pseudo`)?(e.remove(),!0):!1}function SP(e,t){return dP(t)&&e.nodes.length===0}const CP=/\b(?:var|env)\(|--[\w-]+\b/,wP=/var\(\s*--tw-[^)]+-alpha\s*\)/,TP=/^transparent$/i,EP=/^currentcolor$/i,DP=/^(?:inherit|initial|unset|revert|revert-layer)$/i,OP=/^--[\w-]+$/;function kP(e){let t=[],n=[];for(let r of e){if(r.type===`div`&&r.value===`,`){t.push(n),n=[];continue}n.push(r)}return t.push(n),t}function AP(e){let t=[],n=[];for(let r of e){if(r.type===`space`){n.length>0&&(t.push(n),n=[]);continue}n.push(r)}return n.length>0&&t.push(n),t}function jP(e){let t=0,n=e.length;for(;t<n&&e[t]?.type===`space`;)t+=1;for(;n>t&&e[n-1]?.type===`space`;)--n;return e.slice(t,n)}function MP(e){try{return ny(Ih(qf({css:e})))}catch{return!1}}function NP(e){let t=Number.parseFloat(e);if(Number.isFinite(t))return e.trim().endsWith(`%`)?t/100:t}function PP(e,t,n=0){if(n>5)return;let r=(0,I.default)(e.trim()),i=r.nodes.length===1?r.nodes[0]:void 0;if(i?.type!==`function`||i.value.toLowerCase()!==`var`)return;let a=kP(i.nodes),o=I.default.stringify(jP(a[0]??[])).trim();if(!OP.test(o))return;let s=t.get(o);if(!s){let e=a[1]?I.default.stringify(jP(a[1])).trim():void 0;return e?FP(e,t,n+1):void 0}return FP(s,t,n+1)}function FP(e,t,n=0){if(typeof e!=`string`)return;let r=e.trim();return TP.test(r)?MP(r)||void 0:EP.test(r)||DP.test(r)?void 0:PP(r,t,n)||MP(r)||void 0}function IP(e,t,n){let r=FP(e,n);if(r)return r.alpha=t,ey(r).toString()}function LP(e,t,n){let r=FP(e,n),i=MP(`rgb(0 0 0 / ${t})`);if(r&&i&&typeof i.alpha!=`number`)return r.alpha=i.alpha,ey(r).toString()}function RP(e,t,n){let r=t.trim();return LP(e,OP.test(r)?`var(${r})`:r,n)}function zP(e,t){let n=kP(e.nodes);if(n.length<3)return;let r=AP(n[1]??[]);if(r.length<2)return;let i=jP(r[0]??[]),a=jP(r[1]??[]),o=jP(n[2]??[]);if(!i.length||!a.length||I.default.stringify(o).trim().toLowerCase()!==`transparent`)return;let s=I.default.stringify(i).trim(),c=I.default.stringify(a).trim();if(!s||!c||wP.test(c))return;if(EP.test(s))return{value:s,deferred:!1};if(CP.test(c)){let e=RP(s,c,t);return e?{value:e,deferred:!0}:{value:s,deferred:!0}}let l=NP(c);if(l===void 0)return;let u=IP(s,l,t);return u?{value:u,deferred:!1}:{value:s,deferred:!1}}function $(e,t,n){return{prop:e,value:t||``}}const BP=`0 0 #0000`,VP=[$(`--tw-border-spacing-x`,`0`,`<length>`),$(`--tw-border-spacing-y`,`0`,`<length>`),$(`--tw-translate-x`,`0`),$(`--tw-translate-y`,`0`),$(`--tw-translate-z`,`0`),$(`--tw-scale-x`,`1`),$(`--tw-scale-y`,`1`),$(`--tw-scale-z`,`1`),$(`--tw-rotate-x`),$(`--tw-rotate-y`),$(`--tw-rotate-z`),$(`--tw-skew-x`),$(`--tw-skew-y`),$(`--tw-pan-x`),$(`--tw-pan-y`),$(`--tw-pinch-zoom`),$(`--tw-scroll-snap-strictness`,`proximity`,`*`),$(`--tw-space-x-reverse`,`0`),$(`--tw-space-y-reverse`,`0`),$(`--tw-scrollbar-thumb`,`#0000`,`<color>`),$(`--tw-scrollbar-track`,`#0000`,`<color>`),$(`--tw-border-style`,`solid`),$(`--tw-divide-x-reverse`,`0`),$(`--tw-divide-y-reverse`,`0`),$(`--tw-gradient-position`,`initial`),$(`--tw-gradient-from`,`#0000`,`<color>`),$(`--tw-gradient-via`,`#0000`,`<color>`),$(`--tw-gradient-to`,`#0000`,`<color>`),$(`--tw-gradient-stops`,`initial`),$(`--tw-gradient-via-stops`,`initial`),$(`--tw-gradient-from-position`,`0%`,`<length-percentage>`),$(`--tw-gradient-via-position`,`50%`,`<length-percentage>`),$(`--tw-gradient-to-position`,`100%`,`<length-percentage>`),$(`--tw-mask-linear`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-radial`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-conic`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-left`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-right`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-bottom`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-top`,`linear-gradient(#fff, #fff)`),$(`--tw-mask-linear-position`,`0deg`),$(`--tw-mask-linear-from-position`,`0%`),$(`--tw-mask-linear-to-position`,`100%`),$(`--tw-mask-linear-from-color`,`black`),$(`--tw-mask-linear-to-color`,`transparent`),$(`--tw-mask-radial-from-position`,`0%`),$(`--tw-mask-radial-to-position`,`100%`),$(`--tw-mask-radial-from-color`,`black`),$(`--tw-mask-radial-to-color`,`transparent`),$(`--tw-mask-radial-shape`,`ellipse`),$(`--tw-mask-radial-size`,`farthest-corner`),$(`--tw-mask-radial-position`,`center`),$(`--tw-mask-conic-position`,`0deg`),$(`--tw-mask-conic-from-position`,`0%`),$(`--tw-mask-conic-to-position`,`100%`),$(`--tw-mask-conic-from-color`,`black`),$(`--tw-mask-conic-to-color`,`transparent`),$(`--tw-font-weight`),$(`--tw-blur`),$(`--tw-brightness`),$(`--tw-contrast`),$(`--tw-grayscale`),$(`--tw-hue-rotate`),$(`--tw-invert`),$(`--tw-opacity`),$(`--tw-saturate`),$(`--tw-sepia`),$(`--tw-drop-shadow`),$(`--tw-drop-shadow-color`),$(`--tw-drop-shadow-alpha`,`100%`,`<percentage>`),$(`--tw-drop-shadow-size`),$(`--tw-backdrop-blur`),$(`--tw-backdrop-brightness`),$(`--tw-backdrop-contrast`),$(`--tw-backdrop-grayscale`),$(`--tw-backdrop-hue-rotate`),$(`--tw-backdrop-invert`),$(`--tw-backdrop-opacity`),$(`--tw-backdrop-saturate`),$(`--tw-backdrop-sepia`),$(`--tw-duration`,`initial`),$(`--tw-ease`,`initial`),$(`--tw-content`,`""`),$(`--tw-contain-size`),$(`--tw-contain-layout`),$(`--tw-contain-paint`),$(`--tw-contain-style`),$(`--tw-leading`),$(`--tw-tracking`),$(`--tw-ordinal`),$(`--tw-slashed-zero`),$(`--tw-numeric-figure`),$(`--tw-numeric-spacing`),$(`--tw-numeric-fraction`),$(`--tw-outline-style`,`solid`),$(`--tw-text-shadow-color`,`initial`),$(`--tw-text-shadow-alpha`,`100%`,`<percentage>`),$(`--tw-shadow`,BP),$(`--tw-shadow-color`,`initial`),$(`--tw-shadow-alpha`,`100%`,`<percentage>`),$(`--tw-inset-shadow`,BP),$(`--tw-inset-shadow-color`,`initial`),$(`--tw-inset-shadow-alpha`,`100%`,`<percentage>`),$(`--tw-ring-color`),$(`--tw-ring-shadow`,BP),$(`--tw-inset-ring-color`),$(`--tw-inset-ring-shadow`,BP),$(`--tw-ring-inset`),$(`--tw-ring-offset-width`,`0px`,`<length>`),$(`--tw-ring-offset-color`,`#fff`),$(`--tw-ring-offset-shadow`,BP)];for(let e of[`top`,`right`,`bottom`,`left`])VP.push($(`--tw-mask-${e}-from-position`,`0%`),$(`--tw-mask-${e}-to-position`,`100%`),$(`--tw-mask-${e}-from-color`,`black`),$(`--tw-mask-${e}-to-color`,`transparent`));function HP(e){return e.map(e=>new sc({prop:e.prop,value:e.value}))}const UP=9999,WP=/^calc\(\s*infinity\s*\*\s*(\d+(?:\.\d*)?|\.\d+)r?px\s*\)$/i,GP=/-webkit-hyphens\s*:\s*none/,KP=/margin-trim\s*:\s*inline/,qP=/-moz-orient\s*:\s*inline/,JP=/color\s*:\s*rgb\(\s*from\s+red\s+r\s+g\s+b\s*\)/,YP=/background-image\s*:\s*linear-gradient\(\s*in\s+lab\s*,\s*red\s*,\s*red\s*\)/,XP=/color\s*:\s*color\(\s*display-p3\s+0\s+0\s+0%\s*\)/,ZP=/color\(\s*display-p3\b/i,QP=/\(\s*color-gamut\s*:\s*p3\s*\)/i,$P=/^(linear|radial|conic)-gradient\(/i,eF=/^(?:linear|radial|conic)-gradient\(\s*var\(\s*--tw-gradient-stops\b/i,tF=/^\.([_a-z\u00A0-\uFFFF\\-][\w\u00A0-\uFFFF\\-]*)$/i,nF=/^var\(\s*(--color-[\w-]+)\s*\)$/i,rF=/^--(?:animate|aspect|blur|breakpoint|color|container|drop-shadow|ease|font|inset-shadow|leading|perspective|radius|shadow|spacing|text|tracking)(?:-|$)/,iF=/^(?:-?bg-linear|bg-gradient-to-|-?bg-conic|bg-radial)/,aF=/\b([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\s*(r?px)\b/gi,oF=/e/i,sF=/var\(\s*(--tw-[\w-]+)\b/g,cF=/var\(\s*--tw-content\b/,lF=/* @__PURE__ */ new Set([`--tw-gradient-from-position`,`--tw-gradient-via-position`,`--tw-gradient-to-position`]),uF=/* @__PURE__ */ new Set([`--tw-gradient-via-stops`]),dF=/* @__PURE__ */ new Set([`*`,`view`,`text`,`:before`,`:after`,`::before`,`::after`,`::backdrop`]);function fF(e){return e?.majorVersion===4}function pF(e){return e.startsWith(`--tw-`)||rF.test(e)}function mF(e){return e.type===`rule`&&e.selector.includes(`:root`)&&e.selector.includes(`:host`)}HP(VP);function hF(e){let t=/* @__PURE__ */ new Set;return e.walkDecls(e=>{e.prop.startsWith(`--tw-`)&&t.add(e.prop),sF.lastIndex=0;let n=sF.exec(e.value);for(;n!==null;){let r=n[1];r&&t.add(r),n=sF.exec(e.value)}}),e.walkAtRules(`property`,e=>{let n=e.params.trim();n.startsWith(`--tw-`)&&t.add(n)}),t}function gF(e){let t=!1;return e.walkDecls(e=>{cF.test(e.value)&&(t=!0)}),t}function _F(e){return VP.filter(t=>e.has(t.prop)&&!uF.has(t.prop)).map(e=>new sc({prop:e.prop,value:e.value}))}function vF(e,t){let n=e.parent;for(;n;){if(n.type===`atrule`&&n.name===t)return!0;n=n.parent}return!1}function yF(e){let t=e.selectors.map(e=>e.trim());if(!t.every(e=>dF.has(e))||!t.some(e=>e===`*`||e===`view`||e===`text`))return!1;let n=!1,r=!0;return e.each(e=>{e.type===`decl`&&(n=!0,e.prop.startsWith(`--`)||(r=!1))}),n&&r}function bF(e){let t=/* @__PURE__ */ new Set;return e.walkDecls(e=>{e.prop.startsWith(`--tw-`)&&(vF(e,`supports`)||e.parent?.type===`rule`&&yF(e.parent)&&t.add(e.prop))}),t}function xF(e,t){let n=bF(e);return VP.filter(e=>t.has(e.prop)&&!n.has(e.prop)&&!uF.has(e.prop)).map(e=>new sc({prop:e.prop,value:e.value}))}function SF(e){let t=(0,I.default)(e).nodes.filter(e=>e.type!==`space`&&e.type!==`comment`),n=t.length===1?t[0]:void 0,r=n?.type===`function`?n.nodes.find(e=>e.type===`word`&&e.value.startsWith(`--`)):void 0;if(n?.type===`function`&&n.value.toLowerCase()===`var`&&r?.type===`word`&&!pF(r.value)&&n.nodes.some(e=>e.type===`div`&&e.value===`,`))return n}function CF(e){if(!e.includes(`var(`)||!e.includes(`,`))return{css:e,restore:e=>e};let t=/* @__PURE__ */ new Map,n;try{n=ac.parse(e)}catch{return{css:e,restore:e=>e}}return n.walkDecls(e=>{if(!SF(e.value))return;let n=`__weapp_tw_var_fallback_${t.size}__`;t.set(n,e.value),e.value=n}),t.size===0?{css:e,restore:e=>e}:{css:n.toString(),restore(e){let n=e;for(let[e,r]of t)n=n.split(e).join(r);return n}}}function wF(e){return`__weapp_tw_color_mix_${e}__`}function TF(e){e.walkAtRules(`supports`,e=>{e.nodes&&e.toString().includes(`__weapp_tw_color_mix_`)&&e.replaceWith(e.nodes)})}function EF(e,t={}){if(!e.includes(`color-mix`))return{css:e,restore:e=>e};let n=/* @__PURE__ */ new Map,r=ac.parse(e),i=new Map(t.customPropertyValues),a=!1;return r.walkDecls(e=>{e.prop.startsWith(`--`)&&!e.value.includes(`color-mix`)&&i.set(e.prop,e.value.trim())}),r.walkDecls(e=>{if(!e.value.includes(`color-mix`))return;let t=(0,I.default)(e.value),r=!1;t.walk(e=>{if(e.type!==`function`||e.value.toLowerCase()!==`color-mix`)return;let t=zP(e,i);if(t){if(t.deferred){let i=wF(n.size);n.set(i,t.value);let a=e;a.type=`word`,a.value=i,delete a.nodes,r=!0;return}let i=e;i.type=`word`,i.value=t.value,delete i.nodes,r=!0}}),r&&(e.value=t.toString(),a=!0)}),n.size>0&&TF(r),{css:a?r.toString():e,restore(e){let t=e;for(let[e,r]of n)t=t.split(e).join(r);return t}}}const DF=/* @__PURE__ */ new Set([`view`,`text`,`:before`,`:after`,`::before`,`::after`]);[...DF],[...DF];const OF=/* @__PURE__ */ new Set([`:host`,`:root`,`page`,`.tw-root`,`wx-root-portal-content`]);[.../* @__PURE__ */ new Set(/* @__PURE__ */ `a.abbr:where([title]).audio.b.button.canvas.code.embed.h1.h2.h3.h4.h5.h6.hr.html.iframe.img.input.input:where([type='button'],[type='reset'],[type='submit']).kbd.menu.object.ol.optgroup.pre.progress.samp.select.select[multiple]optgroup.select[multiple]optgroupoption.select[size]optgroup.select[size]optgroupoption.small.strong.sub.summary.sup.svg.table.textarea.ul.video`.split(`.`))];function kF(e){return e.trim().replace(/\s+/g,``)}function AF(e){return kF(e).replace(/^:(before|after)$/,`::$1`)}function jF(e){return e.selector.split(`,`).map(AF).filter(Boolean)}function MF(e){return e.length>0&&e.every(e=>OF.has(e))}function NF(e){return e.nodes!==void 0&&e.nodes.every(e=>e.type===`comment`)}function PF(e){let t=0;return e.walkAtRules(e=>{e.nodes?.length===0&&(e.remove(),t++)}),t}function FF(e){for(;e?.type===`atrule`&&NF(e);){let t=e.parent;e.remove(),e=t?.type===`atrule`?t:void 0}}function IF(e){let t=e.parent;if(e.remove(),t?.type===`rule`&&t.nodes.length===0){let e=t.parent;t.remove(),FF(e)}}function LF(e){e.walkDecls(e=>{!e.prop.startsWith(`--`)&&e.value.trim().length===0&&e.next()?.type!==`comment`&&IF(e)})}function RF(e){let t=/* @__PURE__ */ new Map;return e.walkRules(e=>{(mF(e)||e.selector.includes(`page`)||e.selector.includes(`.tw-root`))&&e.walkDecls(e=>{e.prop.startsWith(`--color-`)&&t.set(e.prop,e.value)})}),t}function zF(e,t){let n=e.trim(),r=nF.exec(n);return r?t.get(r[1])??n:n}function BF(e){let t=tF.exec(e.trim());return t?t[1]:void 0}function VF(e){return e.replace(/\s+/g,` `).trim()}function HF(e){return e.replace(/calc\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:deg|grad|rad|turn))\s*\*\s*-1\s*\)/gi,`-$1`).replace(/^in\s+(?:oklab|oklch|hsl|srgb)(?:\s+(?:longer|shorter|increasing|decreasing)\s+hue)?$/i,``).replace(/\s+in\s+(?:oklab|oklch|hsl|srgb)(?:\s+(?:longer|shorter|increasing|decreasing)\s+hue)?\s*$/i,``).replace(/\s+(?:longer|shorter|increasing|decreasing)\s*$/i,``).trim()}function UF(e){return WP.test(e.trim())?`${UP}px`:e}function WF(e,t){let n=HF(t.value);if(n)return n;let r=e.nodes.find(e=>e.type===`decl`&&e.prop===`background-image`);return r?/^radial-gradient\(/i.test(r.value)?`at center`:/^conic-gradient\(/i.test(r.value)?`from 0deg`:n:n}function GF(e,t){let n=t?.trim();return n?`${e} ${n}`:e}function KF(e){if(!e.includes(`var(`)||!e.includes(`--tw-gradient-stops`))return;let t=(0,I.default)(e),n;return t.walk(e=>{if(n||e.type!==`function`||e.value.toLowerCase()!==`var`)return;let t=e.nodes.findIndex(e=>e.type===`div`&&e.value===`,`),r=e.nodes.find(e=>e.type!==`space`);r?.type!==`word`||r.value!==`--tw-gradient-stops`||t<0||(n=I.default.stringify(e.nodes.slice(t+1)).trim())}),n}function qF(e){let t=BF(e.selector);return!t||!iF.test(t)?!1:e.nodes.some(e=>e.type===`decl`&&(e.prop===`--tw-gradient-position`||e.prop===`background-image`&&e.value.includes(`linear-gradient(`)))}function JF(e){let t=[],n=[];for(let r of e.nodes)r.type===`decl`&&(r.prop===`--tw-gradient-position`?t.push(r):r.prop===`background-image`&&r.value.includes(`linear-gradient(`)&&n.push(r));if(t.length===0||n.length===0)return;for(let n of t)n.value=WF(e,n);let r=e.nodes.find(e=>e.type===`decl`&&(e.prop===`--tw-gradient-position`||e.prop===`background-image`&&e.value.includes(`linear-gradient(`)));if(!r)return;let i=[...t,...n],a=i.map(e=>e.clone());r.replaceWith(...a);for(let e of i)e.parent&&e.remove()}function YF(e){let t=/* @__PURE__ */ new Map;e.walkRules(e=>{if(!qF(e))return;e.walkDecls(`--tw-gradient-position`,t=>{t.value=WF(e,t)});let n=e.selector.trim(),r=t.get(n);if(!r||r.parent!==e.parent){t.set(n,e);return}for(let t of[...e.nodes])t.type===`decl`&&(t.prop===`--tw-gradient-position`||t.prop===`background-image`)&&r.append(t.clone());JF(r),e.remove()})}function XF(e,t,n,r){let i=[e.position,GF(t.color,t.position)];return r&&i.push(GF(r.color,r.position)),i.push(GF(n.color,n.position)),`${e.type}-gradient(${i.filter(Boolean).join(`, `)})`}function ZF(e){let t=RF(e),n=[],r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map,o=[],s=[],c=[],l=[],u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,f=0;e.walkRules(e=>{let p=BF(e.selector),m=f++;if(p&&d.set(p,m),e.walkDecls(`background-image`,t=>{let n=e.selector.trim(),r=u.get(n);r?r.add(VF(t.value)):u.set(n,/* @__PURE__ */ new Set([VF(t.value)]))}),p){let u=e.nodes.find(e=>e.type===`decl`&&e.prop===`--tw-gradient-position`),d=e.nodes.find(e=>e.type===`decl`&&e.prop===`background-image`&&$P.test(e.value));if(u&&d){let t=$P.exec(d.value)?.[1];if(t){n.push({classSelector:p,order:m,position:WF(e,u),type:t});let r=eF.test(d.value)?KF(d.value):void 0;r&&l.push({selector:e.selector.trim(),value:`${t}-gradient(${r})`})}}e.walkDecls(e=>{e.prop===`--tw-gradient-from`?r.set(p,{classSelector:p,color:zF(e.value,t),order:m}):e.prop===`--tw-gradient-from-position`?o.push({classSelector:p,position:e.value}):e.prop===`--tw-gradient-via`?i.set(p,{classSelector:p,color:zF(e.value,t),order:m}):e.prop===`--tw-gradient-via-position`?s.push({classSelector:p,position:e.value}):e.prop===`--tw-gradient-to`?a.set(p,{classSelector:p,color:zF(e.value,t),order:m}):e.prop===`--tw-gradient-to-position`&&c.push({classSelector:p,position:e.value})})}});let p=[],m=[],h=[],g=[],_=[],v=[];for(let e of r.values()){p.push(e);for(let t of o)g.push({...e,classSelector:`${e.classSelector}.${t.classSelector}`,order:Math.max(e.order,d.get(t.classSelector)??e.order),position:t.position})}for(let e of i.values()){m.push(e);for(let t of s)_.push({...e,classSelector:`${e.classSelector}.${t.classSelector}`,order:Math.max(e.order,d.get(t.classSelector)??e.order),position:t.position})}for(let e of a.values()){h.push(e);for(let t of c)v.push({...e,classSelector:`${e.classSelector}.${t.classSelector}`,order:Math.max(e.order,d.get(t.classSelector)??e.order),position:t.position})}function y(t,n){let r=VF(n);u.get(t)?.has(r)||(u.set(t,/* @__PURE__ */ new Set([...u.get(t)??[],r])),e.append(oc({selector:t,nodes:[new sc({prop:`background-image`,value:n})]})))}for(let{selector:e,value:t}of l)y(e,t);function b(e,t,n,r){for(let i of t)for(let t of r){y(`.${e.classSelector}.${i.classSelector}.${t.classSelector}`,XF(e,i,t));for(let r of n)y(`.${e.classSelector}.${i.classSelector}.${r.classSelector}.${t.classSelector}`,XF(e,i,t,r))}}for(let e of n)e.position.includes(`,`)||/^var\(/i.test(e.position)||(b(e,p,m,h),b(e,g,_,v))}function QF(e){if(!e.includes(`var(`)||!e.includes(`--tw-`))return e;let t=(0,I.default)(e),n=!1;return t.walk(e=>{if(e.type!==`function`||e.value.toLowerCase()!==`var`)return;let t=e.nodes.find(e=>e.type!==`space`),r=e.nodes.findLast(e=>e.type!==`space`);t?.type===`word`&&t.value.startsWith(`--tw-`)&&r?.type===`div`&&r.value===`,`&&e.after!==` `&&(e.after=` `,n=!0)}),n?t.toString():e}function $F(e){if(!e.includes(`var(`)||!e.includes(`--tw-gradient-via-stops`))return e;let t=(0,I.default)(e),n=!1;function r(e){for(let t=0;t<e.length;t++){let i=e[t];if(!i)continue;if(i.type===`function`&&i.value.toLowerCase()!==`var`){r(i.nodes);continue}if(i.type!==`function`)continue;let a=i.nodes.filter(e=>e.type!==`space`)[0];if(a?.type!==`word`||a.value!==`--tw-gradient-via-stops`){r(i.nodes);continue}let o=i.nodes.findIndex(e=>e.type===`div`&&e.value===`,`);if(o<0)continue;let s=i.nodes.slice(o+1),c=s.findIndex(e=>e.type===`div`&&e.value===`,`);if(c<0)continue;let l=s.slice(0,c),u=s.slice(c),d={...i,nodes:[{type:`word`,value:`--tw-gradient-via-stops`},{type:`div`,value:`,`,before:``,after:` `},...l],sourceEndIndex:void 0,sourceIndex:void 0};e.splice(t,1,d,...u),n=!0,t+=u.length}}return r(t.nodes),n?t.toString():e}function eI(e){if(!e.includes(`var(`)||!e.includes(`--tw-gradient-`))return e;let t=(0,I.default)(e),n=!1;return t.walk(e=>{if(e.type!==`function`||e.value.toLowerCase()!==`var`)return;let t=e.nodes.filter(e=>e.type!==`space`),r=t[0];if(r?.type!==`word`||!lF.has(r.value))return;let i=t.findIndex(e=>e.type===`div`&&e.value===`,`);if(i!==-1&&t[i]){!t.slice(i+1).some(e=>e.type!==`space`)&&e.after!==` `&&(e.after=` `,n=!0);return}e.nodes.push({type:`div`,value:`,`,before:``,after:``}),e.after=` `,n=!0}),n?t.toString():e}function tI(e){let t=!1;if(e.prop===`--tw-gradient-via-stops`&&e.value.trim()===`initial`)return e.remove(),!0;let n=QF(e.value);n!==e.value&&(e.value=n,t=!0);let r=$F(e.value);r!==e.value&&(e.value=r,t=!0);let i=eI(e.value);if(i!==e.value&&(e.value=i,t=!0),e.prop===`--tw-gradient-position`){let t=e.parent?.type===`rule`?WF(e.parent,e):HF(e.value);if(t!==e.value)return e.value=t,!0}let a=UF(e.value);if(a!==e.value)return e.value=a,!0;if(e.prop.includes(`radius`)){aF.lastIndex=0;let t=e.value.replace(aF,(e,t)=>{let n=Number(t);return!Number.isFinite(n)||oF.test(String(t))||n>1e5?`${UP}px`:e});if(t!==e.value)return e.value=t,!0}return t}function nI(e){return e.name===`supports`&&[GP,KP,qP,JP].every(t=>t.test(e.params))}function rI(e){return e.name===`supports`&&YP.test(e.params)}function iI(e){return e.name===`supports`&&XP.test(e.params)}function aI(e){return e.name===`media`&&QP.test(e.params)}function oI(e){return ZP.test(e.value)}const sI=/* @__PURE__ */ new Set([`view`,`text`,`::after`,`::before`]),cI=/* @__PURE__ */ new Set([`*`,`::after`,`::before`,`::backdrop`,`::file-selector-button`]),lI=/tailwindcss v\d/i,uI=/\[data-v-[^\]]+\]/gi,dI=/\.data-v-[\w-]+/gi,fI=/* @__PURE__ */ new Set(/* @__PURE__ */ `-moz-tab-size:4,-webkit-appearance:none,-webkit-appearance:button,-webkit-tap-highlight-color:transparent,-webkit-text-decoration:inherit,-webkit-text-decoration:underline dotted,-webkit-text-size-adjust:100%,-o-tab-size:4,appearance:button,background-color:transparent,border-collapse:collapse,border-color:inherit,border-radius:0,border-top-width:1px,bottom:-.25em,color:inherit,display:block,display:inline-flex,display:list-item,font:inherit,font-family:inherit,font-feature-settings:inherit,font-size:1em,font-size:75%,font-size:80%,font-size:inherit,font-variation-settings:inherit,font-weight:bolder,font-weight:inherit,height:0,height:auto,letter-spacing:inherit,line-height:1,line-height:1.5,line-height:0,line-height:inherit,list-style:none,margin-inline-end:4px,max-width:100%,min-height:1lh,opacity:1,outline:auto,padding:0,padding-block:0,position:relative,resize:vertical,tab-size:4,text-align:inherit,text-decoration:inherit,text-decoration:underline dotted,text-indent:0,text-transform:none,top:-.5em,vertical-align:baseline,vertical-align:middle`.split(`,`));function pI(e){uI.lastIndex=0,dI.lastIndex=0;let t=uI.test(e)||dI.test(e);return uI.lastIndex=0,dI.lastIndex=0,t}function mI(e){return e.replace(uI,``).replace(dI,``).replace(/\s+/g,` `).replace(/\s*([>+~])\s*/g,`$1`).replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`).trim()}function hI(e){if(typeof e!=`string`)return!1;let t=e.indexOf(`?`);if(t<0||!e.slice(0,t).toLowerCase().endsWith(`.uvue`))return!1;let n=e.indexOf(`#`,t),r=e.slice(t+1,n<0?void 0:n);return new URLSearchParams(r).get(`type`)===`style`}function gI(e){if(hI(e.opts.from)||(e.root.nodes??[]).some(e=>hI(e.source?.input.from)))return!0;let t=!1;return e.root.walkRules(e=>{if((e.selectors??[e.selector]).some(pI))return t=!0,!1}),t}function _I(e){return e.nodes?.filter(e=>e.type===`decl`)??[]}function vI(e){let t=mI(e);return t===`*`||t.startsWith(`::`)||t.startsWith(`:root`)||t.startsWith(`:host`)||/^(?:html|body|hr|abbr|h1|h2|h3|h4|h5|h6|a|b|strong|code|kbd|samp|pre|small|sub|sup|table|button|input|select|optgroup|textarea|summary|blockquote|dl|dd|fieldset|legend|ol|ul|menu|dialog|progress|video|audio|canvas|embed|iframe|img|object|svg|details|template|[uo]ni-progress)(?:$|[:,[\s>+~.#])/.test(t)}function yI(e){let t=e.prop.trim().toLowerCase(),n=mI(e.value.trim().toLowerCase());return t.startsWith(`--tw-`)||t===`color`&&n.startsWith(`color-mix(`)&&n.includes(`currentcolor`)&&n.includes(`transparent`)||t===`color`&&n===`currentcolor`||t===`font-family`&&n.startsWith(`var(--default-font-family`)||t===`font-feature-settings`&&n.startsWith(`var(--default-font-feature-settings`)||t===`font-variation-settings`&&n.startsWith(`var(--default-font-variation-settings`)?!0:fI.has(`${t}:${n}`)}function bI(e,t){return t||e.some(e=>e.prop.startsWith(`--tw-`))}function xI(e,t){let n=e.selectors??[e.selector],r=_I(e);return n.length>0&&n.every(e=>{let t=mI(e);return pI(e)&&(t.startsWith(`:root`)||t.startsWith(`:host`))})&&r.length>0&&r.every(e=>e.prop.startsWith(`--`))&&bI(r,t)}function SI(e,t){let n=e.selectors??[e.selector],r=_I(e);return n.length>0&&n.every(e=>pI(e)&&cI.has(mI(e)))&&r.length>0&&r.every(e=>e.prop.startsWith(`--tw-`)||[`box-sizing`,`margin`,`padding`,`border`].includes(e.prop))&&bI(r,t)}function CI(e,t){if(!t)return!1;let n=e.selectors??[e.selector],r=_I(e);return n.length>0&&n.every(e=>pI(e)&&vI(e))&&r.length>0&&r.every(yI)}function wI(e,t){let n=e.selectors??[e.selector];if(n.length===0||!n.every(e=>{let t=mI(e);return!pI(e)&&sI.has(t)}))return!1;let r=_I(e);return r.length>0&&r.every(e=>e.prop.startsWith(`--tw-`)||[`box-sizing`,`margin`,`padding`,`border`].includes(e.prop))&&bI(r,t)}function TI(e){let t=e.selectors??[e.selector];if(t.length===0||!t.every(e=>{let t=mI(e);return pI(e)&&sI.has(t)}))return!1;let n=_I(e);return n.length>0&&n.every(e=>e.prop===`--tw-content`)}function EI(e){return typeof e.name==`string`&&e.name.toLowerCase()===`property`&&mI(e.params).startsWith(`--tw-`)}function DI(e){let t=!1;e.walkComments(e=>{lI.test(e.text)&&(t=!0)}),e.walkComments(e=>{lI.test(e.text)&&e.remove()}),e.walkRules(e=>{(xI(e,t)||SI(e,t)||CI(e,t)||wI(e,t)||TI(e))&&e.remove()}),e.walkAtRules(e=>{if(EI(e)){e.remove();return}(e.nodes?.length??0)===0&&e.remove()})}const OI=/* @__PURE__ */ new Set([`:host`,`:root`,`.tw-root`,`page`,`uni-page-body`,`wx-root-portal-content`]);function kI(e){return e.replace(/\s+/g,``).toLowerCase()}function AI(e){let t=e.selectors??[];if(t.length===0)return!1;let n=!1;for(let e of t){let t=kI(e);if(!OI.has(t))return!1;(t===`:host`||t===`:root`||t===`.tw-root`)&&(n=!0)}return n}function jI(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];if(i?.type!==`function`)continue;if(i.value.toLowerCase()!==`var`){jI(i.nodes,t,n);continue}let a=i.nodes.find(e=>e.type===`word`);if(a?.type!==`word`||!a.value.startsWith(`--`)){jI(i.nodes,t,n);continue}let o=i.nodes.findIndex(e=>e.type===`div`&&e.value===`,`),s=o>=0?I.default.stringify(i.nodes.slice(o+1)).trim():``,c=t.get(a.value),l;if(c!==void 0&&!n.has(a.value)?l=MI(c,t,/* @__PURE__ */ new Set([...n,a.value])):s&&pF(a.value)&&(l=MI(s,t,n)),l===void 0){jI(i.nodes,t,n);continue}let u=(0,I.default)(l).nodes;e.splice(r,1,...u),r+=u.length-1}}function MI(e,t,n=/* @__PURE__ */ new Set){if(!e.includes(`var(`))return e;let r=(0,I.default)(e);return jI(r.nodes,t,n),r.toString()}function NI(e){let t=(0,I.default)(e).nodes.filter(e=>e.type!==`space`&&e.type!==`comment`),n=t.length===1?t[0]:void 0;if(n?.type!==`function`||n.value.toLowerCase()!==`var`)return;let r=n.nodes.find(e=>e.type===`word`),i=n.nodes.findIndex(e=>e.type===`div`&&e.value===`,`);if(r?.type!==`word`||!r.value.startsWith(`--`)||pF(r.value)||r.value.startsWith(`--default-`)||i<0)return;let a=I.default.stringify(n.nodes.slice(i+1)).trim();if(a)return{name:r.value,fallback:a}}function PI(e,t){if(typeof e.walkDecls!=`function`)return!1;let n=!1;return e.walkDecls(e=>{if(e.prop.startsWith(`--`))return;let r=NI(e.value);r&&!t.has(r.name)&&(e.parent?.insertBefore(e,e.clone({value:r.fallback})),e.value=`var(${r.name})`,n=!0)}),n}function FI(e,t){let n=[],r=new Map(t);if(e.walkRules(e=>{AI(e)&&(n.push(e),e.walkDecls(e=>{e.prop.startsWith(`--`)&&r.set(e.prop,e.value)}))}),r.size>0){let t=new Set(n);e.walkDecls(e=>{e.parent?.type===`rule`&&t.has(e.parent)||(e.value=MI(e.value,r))})}PI(e,r);for(let e of n)e.remove()}const II=/* @__PURE__ */ new Set([`flex`,`none`]),LI=/\.((?:\\.|[\w-])+)/g,RI=/\s*!important$/i,zI=/* @__PURE__ */ new Set([`transform`,`-webkit-transform`]);function BI(e){return!!e?.uniAppX&&e?.uniAppXCssTarget===`uvue`}function VI(e){return e??`warn`}function HI(e){return e.trim().toLowerCase().replace(RI,``)}function UI(e){let t=(0,I.default)(e),n=!1;return t.walk(e=>{e.type===`function`&&e.value.toLowerCase()===`calc`&&(n=!0)}),n}function WI(e){if(!e.toLowerCase().includes(`translate(`)||!e.includes(`,`))return e;let t=(0,I.default)(e),n=!1;return t.walk(e=>{if(e.type===`function`&&e.value.toLowerCase()===`translate`)for(let t of e.nodes)t.type===`div`&&t.value===`,`&&(t.value=` `,t.before=``,t.after=``,n=!0)}),n?t.toString():e}function GI(e,t){return e.source?.input.from??t.opts.from??`unknown source`}function KI(e){let t=/* @__PURE__ */ new Set;for(let n of e.selectors??[])try{(0,F.default)().astSync(n).walkClasses(e=>{e.value&&t.add(e.value)})}catch{for(let e of n.matchAll(LI))e[1]&&t.add(e[1].replaceAll(`\\`,``))}return[...t]}function qI(e){let t=e.selectors??[];return t.length!==0&&t.every(e=>{try{return(0,F.default)().astSync(e).nodes.every(e=>e.nodes.length>0&&e.nodes.every(e=>e.type===`class`))}catch{return!1}})}function JI(e,t){let n=e.trim().toLowerCase(),r=HI(t);if(UI(t)||n===`display`&&!II.has(r)||n===`min-height`&&r===`100vh`||n===`grid-template-columns`||n===`grid-template-rows`||n===`grid-auto-columns`||n===`grid-auto-rows`||n===`grid-auto-flow`||n===`gap`||n===`row-gap`||n===`column-gap`)return`${n}: ${t}`}function YI(e,t,n,r,i){if(n===`silent`)return;let a=KI(e),o=`uni-app x uvue unsupported utility: ${a.length>0?a.join(`, `):e.selector} (${i}) in ${GI(e,t)}`;if(n===`error`)throw e.error(o);r.has(o)||(r.add(o),e.warn(t,o))}function XI(e,t){if(!BI(t))return e;let n=VI(t?.uniAppXUnsupported),r=/* @__PURE__ */ new Set,i=t?.isMainChunk!==!0&&gI(e),a=e.root,o=[];if(FI(a,t?.customPropertyValues),a.type===`root`&&Array.isArray(a.nodes)&&typeof a.walkDecls==`function`){a.walkDecls(e=>{tI(e),zI.has(e.prop.toLowerCase())&&(e.value=WI(e.value))});let t=ac([yd()]).process(a,e.opts).sync();a=t.root,o=t.messages,LF(a)}if(i){DI(a);let t=a.toResult(e.opts);return t.messages.push(...e.messages),t.messages.push(...o),t}a.walkRules(t=>{if(!qI(t)){YI(t,e,n,r,`selector must be class-only`),t.remove();return}t.walkDecls(i=>{let a=JI(i.prop,i.value);a&&(YI(t,e,n,r,a),i.remove())}),(t.nodes?.length??0)===0&&t.remove()}),a.walkAtRules(e=>{if(e.name?.toLowerCase()===`property`){e.remove();return}(e.nodes?.length??0)===0&&e.remove()});let s=a.toResult(e.opts);return s.messages.push(...e.messages),s.messages.push(...o),s}function ZI(e,t){return XI(yP(e,t),t)}function QI(e,t){return yP(e,t)}function $I(e,t){return e}function eL(e,t){return e}function tL(e){switch(e){case`mini-program`:return{target:e,postprocess:oP};case`uni-app-x-css-uvue`:return{target:e,postprocess:ZI};case`uni-app-x-css-webview`:return{target:e,postprocess:QI};case`web`:return{target:e,postprocess:$I};default:return{target:e,postprocess:eL}}}function nL(e){let t=e?.trim().toLowerCase();return t===`h5`||t===`web`||t?.startsWith(`web-`)===!0||t===`app`||t===`app-plus`||t?.startsWith(`app-`)===!0}function rL(e,t){return nL(e.platform)?`web`:t}function iL(e,t){return{framework:e,resolveStyleTarget:e=>rL(e,t)}}const aL=iL(`generic`,`generic`),oL=iL(`kbone`,`generic`),sL=iL(`mpx`,`mini-program`),cL=iL(`native`,`mini-program`),lL=iL(`remax`,`mini-program`),uL=iL(`taro`,`mini-program`),dL=iL(`uni-app`,`mini-program`),fL=iL(`uni-app-vite`,`mini-program`),pL={framework:`uni-app-x`,resolveStyleTarget:e=>e.uniAppXCssTarget===`uvue`?`uni-app-x-css-uvue`:`uni-app-x-css-webview`},mL=iL(`weapp-vite`,`mini-program`);function hL(e){return e.uniAppX===!1?!1:e.uniAppX===!0||e.appType===`uni-app-x`}function gL(e){if(hL(e))return pL;switch(e.appType){case`kbone`:return oL;case`mpx`:return sL;case`native`:return cL;case`remax`:return lL;case`taro`:return uL;case`uni-app`:return dL;case`uni-app-vite`:return fL;case`weapp-vite`:return mL;default:return aL}}function _L(e){let t=gL(e),n=t.resolveStyleTarget(e),r=tL(n);return{framework:t.framework,target:n,branch:n,postprocess:r.postprocess}}function vL(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function yL(e){return e.split(`.`).map(e=>e.trim()).filter(Boolean)}function bL(e){return{key:e.join(``),segments:e}}function xL(e){return`nodes`in e&&Array.isArray(e.nodes)}function SL(e,t){let n=e.clone({nodes:[]});return n.append(...t),n}function CL(e,t,n){let r=t,i=e.parent;for(;i&&i!==n;)(i.type!==`atrule`||i.name!==`layer`)&&xL(i)&&(r=[SL(i,r)]),i=i.parent;return r}function wL(e,t){let n=e.parent;for(e.remove();n&&n!==t&&n.type===`atrule`&&n.nodes?.length===0;){let e=n.parent;n.remove(),n=e}}function TL(e,t){return e.length>t.length&&t.every((t,n)=>e[n]===t)}function EL(e,t){let n=e.parent;for(;n;){if(n.type===`atrule`&&n.name===`layer`)return t.get(n)?.segments??[];n=n.parent}return[]}function DL(e,t){let n=t;for(;n.parent&&n.parent!==e;)n=n.parent;let r=ac.comment({text:`__weapp_tailwindcss_layer_anchor__`});return n.before(r),r}function OL(e,t,n){if(!t.parent){e.append(n);return}if(n.length===0){t.remove();return}t.replaceWith(n)}function kL(e){let t=[],n=/* @__PURE__ */ new WeakMap,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map,o=0,s=(e,t)=>{let n=``;for(let[i,o]of e.entries()){let e=r.get(n);e||(e=/* @__PURE__ */ new Map,r.set(n,e)),e.has(o)||e.set(o,e.size),i===0&&!a.has(o)&&a.set(o,t),n=n?`${n}${o}`:o}let o=bL(e);return i.has(o.key)||i.set(o.key,{...o,nodes:[]}),o};if(e.walkAtRules(`layer`,e=>{t.push(e);let r=EL(e,n),i=vL(e.params);if(!e.nodes){for(let t of i)s([...r,...yL(t)],e);return}let a=i[0]?yL(i[0]):[`\u0000anonymous-${o++}`];n.set(e,s([...r,...a],e))}),t.length===0)return;let c=/* @__PURE__ */ new Map;for(let[t,n]of a)c.set(t,DL(e,n));for(let r of[...t].reverse()){if(!r.parent)continue;let t=n.get(r);if(!t||!r.nodes){wL(r,e);continue}let a=r.nodes.map(e=>e.clone());a.length>0&&i.get(t.key)?.nodes.unshift(...CL(r,a,e)),wL(r,e)}let l=(e,t)=>{if(TL(e.segments,t.segments))return-1;if(TL(t.segments,e.segments))return 1;let n=Math.min(e.segments.length,t.segments.length),i=``;for(let a=0;a<n;a++){let n=e.segments[a],o=t.segments[a];if(n!==o){let e=r.get(i);return(e?.get(n)??0)-(e?.get(o)??0)}i=i?`${i}${n}`:n}return e.segments.length-t.segments.length},u=/* @__PURE__ */ new Map;for(let e of i.values()){let t=e.segments[0];if(!t||e.nodes.length===0)continue;let n=u.get(t)??[];n.push(e),u.set(t,n)}for(let[t,n]of c)OL(e,n,(u.get(t)??[]).sort(l).flatMap(e=>e.nodes))}const AL=/* @__PURE__ */ new Set([`-webkit-box-orient`,`-webkit-line-clamp`,`-webkit-overflow-scrolling`,`-webkit-text-fill-color`,`-webkit-text-stroke`,`-webkit-text-stroke-color`,`-webkit-text-stroke-width`]),jL=/* @__PURE__ */ new Map([[`display`,/* @__PURE__ */ new Set([`-webkit-box`])],[`-webkit-background-clip`,/* @__PURE__ */ new Set([`text`])]]),ML=/* @__PURE__ */ new Set([`transition`,`transition-property`]);function NL(e){let t=[],n=0,r=0,i,a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(a){a=!1;continue}if(s===`\\`){a=!0;continue}if(i){s===i&&(i=void 0);continue}if(s===`"`||s===`'`){i=s;continue}if(s===`(`){r++;continue}if(s===`)`){r=Math.max(0,r-1);continue}s===`,`&&r===0&&(t.push(e.slice(n,o)),n=o+1)}return t.push(e.slice(n)),t}function PL(e){let t=e.prop.toLowerCase();return t.startsWith(`-webkit-mask`)||AL.has(t)?!0:jL.get(t)?.has(e.value.trim().toLowerCase())??!1}function FL(e){return NL(e).map(e=>e.trim()).filter(e=>e.length>0&&!e.toLowerCase().startsWith(`-webkit-`)).join(`, `)}function IL(e){let t=e.value.trim().toLowerCase();return!t.startsWith(`-webkit-`)||jL.get(e.prop.toLowerCase())?.has(t)?!1:/^-webkit-[\w-]+$/.test(t)}function LL(e){let t=e.prop.toLowerCase();if(ML.has(t)&&e.value.toLowerCase().includes(`-webkit-`)){let t=FL(e.value);if(t.length===0){e.remove();return}e.value=t}if(t.startsWith(`-webkit-`)&&!PL(e)){e.remove();return}IL(e)&&e.remove()}function RL(e){e.name.toLowerCase()===`-webkit-keyframes`&&e.remove()}const zL=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?rpx$/i;function BL(e,t){let n=t?.majorVersion,r=e.value.trim();if(zL.test(r)&&(n===void 0||n===4)){let t=e.prop.toLowerCase();if(t===`color`)return e.prop=`font-size`,!0;if(t===`background-color`)return e.prop=`background-size`,!0;if(t===`outline-color`)return e.prop=`outline-width`,!0;if(t.startsWith(`border`)&&t.endsWith(`color`))return e.prop=`${e.prop.slice(0,-5)}width`,!0;if(t===`--tw-ring-color`)return e.prop=`--tw-ring-offset-width`,!0}return!1}function VL(e){let t=[];if(e&&typeof e==`object`){let n=Object.entries(e);for(let[e,r]of n)r!==!1&&t.push({prop:e,value:r.toString()})}return()=>t}const HL=/* @__PURE__ */ new WeakMap;function UL(e){let t=HL.get(e);return t||(t={map:e},HL.set(e,t)),t}function WL(e,t){let n=t?.escapeMap;return n===void 0||n===Fu?Xu(e):Xu(e,UL(n))}function GL(e){return typeof e==`string`?e:e.length>1?`:is(${e.join(`,`)})`:e.join(``)}const KL=[`html`,`wxml`,`axml`,`jxml`,`ksml`,`ttml`,`qml`,`tyml`,`xhsml`,`swan`,`vue`,`mpx`,`js`,`jsx`,`ts`,`tsx`],qL=/* @__PURE__ */ `js.jsx.mjs.cjs.ts.tsx.mts.cts.vue.uvue.nvue.svelte.mpx.html.wxml.axml.jxml.ksml.ttml.qml.tyml.xhsml.swan.css.wxss.acss.jxss.ttss.qss.tyss.scss.sass.less.styl.stylus`.split(`.`);function JL(e=KL){return`**/*.{${e.join(`,`)}}`}JL(qL),RegExp(`\\.(?:${qL.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})$`),JL(KL),JL(KL);function YL(e){if(!e.includes(`//`))return e;let t=[],n=0,r=/[/"'(]/g;for(let i=r.exec(e);i;i=r.exec(e)){let a=i.index,o=i[0],s=e[a+1];if(o===`/`&&s===`*`&&!XL(e,a)){let t=e.indexOf(`*/`,a+2);r.lastIndex=t===-1?e.length:t+2;continue}if((o===`"`||o===`'`)&&!XL(e,a)){let t=ZL(e,o,a+1);r.lastIndex=t===-1?e.length:t+1;continue}if(o===`(`&&QL(e,a)){let t=a+1;for(;t<e.length&&/\s/.test(e[t]??``);)t++;let n=e[t];if(n!==`"`&&n!==`'`){let n=ZL(e,`)`,t);r.lastIndex=n===-1?e.length:n+1}continue}if(o===`/`&&s===`/`&&!XL(e,a)){let i=a-1;for(;i>=0&&e[i]!==`
2870
2870
  `&&e[i]!==`\r`;)i--;let o=e.slice(i+1,a),s=o.trimEnd(),c=s.length>0&&!/[;{}]$/.test(s),l=e.slice(n,a);if(c){let e=o.length-s.length,t=l.length-e;l=`${l.slice(0,t)};${l.slice(t)}`}let u=a+2;for(;u<e.length&&e[u]!==`
2871
- `&&e[u]!==`\r`;)u++;t.push(l,`/*`,e.slice(a+2,u),`*/`),n=u,r.lastIndex=u;continue}}return t.length===0?e:(t.push(e.slice(n)),t.join(``))}function XL(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}function ZL(e,t,n){let r=e.indexOf(t,n);for(;r!==-1&&XL(e,r);)r=e.indexOf(t,r+1);return r}function QL(e,t){if(XL(e,t)||t<3)return!1;let n=e.slice(t-3,t),r=e[t-4];return n.toLowerCase()===`url`&&(r===void 0||!/\w/.test(r))}const $L={hasModernColorFunction:!1,hasPresetEnvFeatures:!1},eR=/rgb\w*\s*\([^),][^\s),]*\s[^),][^\s),]*\s[^),][^),/]*\/[^)]+\)/i;function tR(e){return e?{hasModernColorFunction:eR.test(e),hasPresetEnvFeatures:!0}:{...$L}}function nR(e){return`signal:${+!!e.hasPresetEnvFeatures},${+!!e.hasModernColorFunction}`}function rR(e){return{cssPresetEnv:{features:{"is-pseudo-class":{specificityMatchingName:`weapp-tw-ig`},"oklab-function":!0,"color-mix":!0,"color-functional-notation":e?.cssPresetEnv?.features?.[`color-functional-notation`]??{preserve:!1},"custom-properties":e?.cssPresetEnv?.features?.[`custom-properties`]??e?.cssCalc?{preserve:!0}:!1},autoprefixer:{add:!1}},cssRemoveProperty:!0,cssRemoveFocusPseudoClass:!0,uniAppXUnsupported:`warn`,cssSelectorReplacement:{root:[`page`,`.tw-root`,`wx-root-portal-content`],universal:[`view`,`text`]}}}function iR(e,t={map:/* @__PURE__ */ new WeakMap,counter:0}){if(e==null)return String(e);if(typeof e==`function`)return`fn:${e.name||`anonymous`}`;if(typeof e==`symbol`)return`sym:${String(e)}`;if(typeof e!=`object`)return`${typeof e}:${String(e)}`;let n=e,r=t.map.get(n);if(r)return r;let i=`ref:${t.counter++}`;return t.map.set(n,i),Array.isArray(n)?`[${n.map(e=>iR(e,t)).join(`,`)}]`:n instanceof Map?`map:{${[...n.entries()].map(([e,n])=>[iR(e,t),iR(n,t)]).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`,`)}}@${i}`:`{${Object.keys(n).sort().map(e=>`${e}:${iR(n[e],t)}`).join(`,`)}}@${i}`}const aR=`__unset__`,oR=[`cssPreflight`,`cssPreflightRange`,`cssChildCombinatorReplaceValue`,`cssPresetEnv`,`autoprefixer`,`injectAdditionalCssVarScope`,`cssSelectorReplacement`,`rem2rpx`,`px2rpx`,`unitsToPx`,`unitConversion`,`platform`,`cssRemoveActivePseudoClass`,`cssRemoveHoverPseudoClass`,`cssRemoveFocusPseudoClass`,`cssRemoveProperty`,`cssCalc`,`atRules`,`tailwindcssV4GradientFallback`];function sR(e){let t=aR,n=aR,r=aR,i=aR,a=aR,o=aR,s=aR,c=aR,l=aR,u=aR,d=aR,f=aR,p=aR,m=aR,h=aR,g=aR,_=aR,v=aR;for(let y of Object.keys(e)){let b=e[y];switch(y){case`isMainChunk`:if(typeof b!=`boolean`)return;t=b?`1`:`0`;break;case`majorVersion`:if(typeof b!=`number`)return;n=String(b);break;case`cssRemoveProperty`:if(typeof b!=`boolean`)return;r=b?`1`:`0`;break;case`cssRemoveHoverPseudoClass`:if(typeof b!=`boolean`)return;a=b?`1`:`0`;break;case`cssRemoveActivePseudoClass`:if(typeof b!=`boolean`)return;i=b?`1`:`0`;break;case`cssRemoveFocusPseudoClass`:if(typeof b!=`boolean`)return;o=b?`1`:`0`;break;case`uniAppX`:if(typeof b!=`boolean`)return;s=b?`1`:`0`;break;case`cssPreflightRange`:if(typeof b!=`string`)return;c=b;break;case`injectAdditionalCssVarScope`:if(typeof b!=`boolean`)return;l=b?`1`:`0`;break;case`rem2rpx`:if(typeof b!=`boolean`)return;u=b?`1`:`0`;break;case`px2rpx`:if(typeof b!=`boolean`)return;d=b?`1`:`0`;break;case`unitsToPx`:if(typeof b!=`boolean`)return;f=b?`1`:`0`;break;case`unitConversion`:if(b!==!1)return;p=`0`;break;case`platform`:if(typeof b!=`string`)return;m=b;break;case`cssCalc`:if(typeof b!=`boolean`)return;h=b?`1`:`0`;break;case`cssChildCombinatorReplaceValue`:if(typeof b!=`string`)return;g=b;break;case`cssPreflight`:if(b!==!1)return;_=`0`;break;case`autoprefixer`:if(typeof b!=`boolean`)return;v=b?`1`:`0`;break;default:return}}return[`simple`,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v].join(`:`)}function cR(e){return!!(e&&Object.keys(e).length>0)}function lR(e,t=!1){let n=!1,r={...e},i=e.cssOptions!==void 0,a={...e.cssOptions??{}};for(let o of oR){let s=i&&o in e.cssOptions,c=o in e;if(!s&&!c)continue;let l=s?e.cssOptions?.[o]:void 0,u=c?e[o]:void 0,d=s?l:u;d!==u&&(r[o]=d,n=!0),(i||t)&&d!==l&&(a[o]=d,n=!0)}return n?{...r,...i||t?{cssOptions:a}:{}}:e}function uR(e){let t=lR(e),n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new WeakMap,i=/* @__PURE__ */ new WeakMap,a=/* @__PURE__ */ new WeakSet;return n.set(`base`,t),{resolve:e=>{if(!e)return t;let o=r.get(e);if(o)return o;if(a.has(e))return t;if(!cR(e))return a.add(e),t;let s=i.get(e);s||(s=sR(e)??iR(e),i.set(e,s));let c=n.get(s);if(c)return r.set(e,c),c;let l=lR(od(lR({...e},!0),t));return n.set(s,l),r.set(e,l),l}}}const dR=[`iOS >= 8`,`Android >= 4.4`,`ChromeAndroid >= 37`],fR={add:!0,flexbox:!1,grid:!1,remove:!0,supports:!1};function pR(e){return e?.postcssPlugin===`autoprefixer`}function mR(e){if(e===!1)return;let t=e===!0||e===void 0?{}:e;return ry({...fR,...t,overrideBrowserslist:t.overrideBrowserslist??dR})}const hR=e=>e.type===`div`&&e.value===`/`;function gR(e){let t=0,n=e.length;for(;t<n&&e[t]?.type===`space`;)t+=1;for(;n>t&&e[n-1]?.type===`space`;)--n;return e.slice(t,n)}function _R(e){let t=[],n=[];return e.forEach(e=>{if(e.type===`div`&&e.value===`,`){n.length&&(t.push(n),n=[]);return}if(e.type===`space`){n.length&&(t.push(n),n=[]);return}n.push(e)}),n.length&&t.push(n),t}const vR=e=>(0,I.default)(e).nodes;function yR(e){let t=e.nodes.findIndex(hR);if(t===-1)return!1;let n=gR(e.nodes.slice(0,t)),r=gR(e.nodes.slice(t+1));if(!n.length||!r.length)return!1;let i=_R(n);if(i.length!==3)return!1;let a=i.map(e=>I.default.stringify(e).trim()).filter(Boolean);if(a.length!==3)return!1;let o=I.default.stringify(r).trim();if(!o)return!1;e.value=`rgba`;let s=`${a.join(`, `)}, ${o}`;return e.nodes=vR(s),!0}function bR(e){if(!e.value||!e.value.toLowerCase().includes(`rgb`))return;let t=(0,I.default)(e.value),n=!1;t.walk(e=>{e.type===`function`&&e.value.toLowerCase()===`rgb`&&yR(e)&&(n=!0)}),n&&(e.value=t.toString())}function xR(){return{postcssPlugin:`weapp-tailwindcss-color-functional-fallback`,Declaration:bR}}xR.postcss=!0;function SR(){let e=/* @__PURE__ */ new WeakMap;function t(t){return e.get(t)===!0}function n(t){e.set(t,!0)}return{variablesScopeWeakMap:e,isVariablesScope:t,markVariablesScope:n}}const CR=/\((var\([^()]+\)(?:\s*\*\s*-?(?:\d+(?:\.\d+)?|\.\d+|[a-z_][\w-]*))+)\)/gi;function wR(e){if(!e.includes(`calc(`))return e;let t=e.replace(/\s+/g,``),n;do n=t,t=t.replace(CR,`$1`);while(t!==n);return t}const TR={postcssPlugin:`postcss-calc-duplicate-cleaner`,OnceExit(e){e.walkRules(e=>{let t=/* @__PURE__ */ new Set;for(let n of[...e.nodes]){if(n.type!==`decl`)continue;let e=n,r=`${e.prop}\0${e.important?`1`:`0`}\0${wR(e.value)}`;t.has(r)?e.remove():t.add(r)}})}};function ER(e){return e.cssCalc?TR:null}const DR={};function OR(e){return e.cssCalc?e.cssCalc===!0||Array.isArray(e.cssCalc)?yd(Array.isArray(e.cssCalc)?{includeCustomProperties:e.cssCalc,...e.customPropertyValues?{customPropertyValues:e.customPropertyValues}:{}}:e.customPropertyValues?{customPropertyValues:e.customPropertyValues,includeCustomProperties:[...e.customPropertyValues.keys()]}:DR):yd({...e.cssCalc,...e.customPropertyValues?{customPropertyValues:e.customPropertyValues}:{}}):null}function kR(e){let t=Array.isArray(e.cssCalc)?e.cssCalc:typeof e.cssCalc==`object`?e.cssCalc.includeCustomProperties:[];if(!(Array.isArray(t)&&t.length>0))return null;let n=e=>e.includes(`var(`)&&e.includes(`--`),r=e=>{if(!n(e))return!1;let r=(0,I.default)(e),i=!1;return r.walk(e=>{e.type!==`function`||e.value!==`var`||i||e.nodes.find(e=>e.type===`word`&&ad(t,e.value))&&(i=!0)}),i},i=(e,t)=>{let n=e.source,r=t.source;return!n?.start||!n.end||!r?.start||!r.end||n.input!==r.input?!1:n.start.line===r.start.line&&n.start.column===r.start.column&&n.end.line===r.end.line&&n.end.column===r.end.column};return{postcssPlugin:`postcss-remove-include-custom-properties`,OnceExit(e){e.walkDecls(e=>{let t=e.prev();if(t&&t.type===`decl`&&t.prop===e.prop&&t.important===e.important&&t.value===e.value){e.remove();return}if(!r(e.value))return;let n,a=t;for(;a;){if(a.type===`decl`&&a.prop===e.prop){n=a;break}a=a.prev()}!n||n.important!==e.important||n!==t&&!i(n,e)||r(n.value)||e.remove()})}}}const AR={platform:`weapp`,targetUnit:`rpx`,unitPrecision:5,propList:[`*`],selectorBlackList:[],replace:!0,mediaQuery:!1,minPixelValue:0,designWidth:750,deviceRatio:{375:2,640:2.34/2,750:1,828:1.81/2}};function jR(e){return e.px2rpx?e.px2rpx===!0?rM(AR):rM(od(e.px2rpx,AR)):null}const MR={rootValue:32,propList:[`*`],transformUnit:`rpx`},NR={processorStage:`OnceExit`},PR={...MR,...NR};function FR(e){if(!e.rem2rpx)return null;if(e.rem2rpx===!0)return oN(PR);let t=od(e.rem2rpx,NR);return oN(t)}const IR=[`default`,`*`],LR=[`WEAPP_TW_TARGET`,`WEAPP_TAILWINDCSS_TARGET`,`UNI_PLATFORM`,`UNI_UTS_PLATFORM`,`TARO_ENV`,`MPX_CLI_MODE`,`MPX_CURRENT_TARGET_MODE`],RR={weapp:[`mp-weixin`,`weixin`,`wechat`,`wx`,`mp`],"mp-weixin":[`weapp`,`weixin`,`wechat`,`wx`,`mp`],wx:[`weapp`,`mp-weixin`,`weixin`,`wechat`,`mp`],h5:[`web`],web:[`h5`],app:[`app-plus`,`app-android`,`app-ios`,`android`,`ios`],"app-plus":[`app`],"app-android":[`app`,`android`],"app-ios":[`app`,`ios`],android:[`app`,`app-android`],ios:[`app`,`app-ios`]};function zR(e){return e?.trim().toLowerCase()||void 0}function BR(e){return ne===void 0?void 0:ne.env[e]}function VR(e){let t=zR(e.platform);if(t)return t;for(let e of LR){let t=zR(BR(e));if(t)return t}}function HR(e){return!!(e&&typeof e==`object`&&`platforms`in e)}function UR(e){return Array.isArray(e.rules)&&e.rules.length>0}function WR(e){if(!e)return[];let t=zR(e);return t?[t,...RR[t]??[]]:[]}function GR(e,t){if(Object.hasOwn(e,t))return e[t];for(let[n,r]of Object.entries(e))if(zR(n)===t)return r}function KR(e,t){if(!HR(e))return e;let n=e.platforms;for(let e of WR(t)){let t=GR(n,e);if(t!==void 0)return t}if(e.default!==void 0)return e.default;for(let e of IR){let t=GR(n,e);if(t!==void 0)return t}}function qR(e){let t=e.unitConversion;if(!t||t===!1)return;let n=KR(t,VR(e));if(n&&n!==!1&&!n.disabled&&UR(n))return n}function JR(e){let t=qR(e);return t?aP(t):null}function YR(e){if(!e.unitsToPx)return null;let t=typeof e.unitsToPx==`object`?e.unitsToPx:void 0;if(t?.disabled||t?.transform===!1)return aP({disabled:!0});let n={},r={rules:[]};return t?.minValue!==void 0&&(n.minValue=t.minValue,r.minValue=t.minValue),t?.to!==void 0&&(n.to=t.to),t?.transform!==void 0&&(n.transform=t.transform),t?.unitMap!==void 0&&(n.unitMap=t.unitMap),t?.exclude!==void 0&&(r.exclude=t.exclude),t?.mediaQuery!==void 0&&(r.mediaQuery=t.mediaQuery),t?.propList!==void 0&&(r.propList=t.propList),t?.replace!==void 0&&(r.replace=t.replace),t?.selectorBlackList!==void 0&&(r.selectorBlackList=t.selectorBlackList),t?.unitPrecision!==void 0&&(r.unitPrecision=t.unitPrecision),r.rules=QN.unitsToPx(n),aP(r)}const XR=`postcss-weapp-tailwindcss-rename-plugin`;let ZR=null;const QR=/^:?:before$/,$R=/^:?:after$/,ez=(0,F.default)(e=>{let t=ZR;t&&e.walkPseudos(e=>{e.parent?.length===1&&(QR.test(e.value)&&(t.before=!0),$R.test(e.value)&&(t.after=!0))})});function tz(e){let t={before:!1,after:!1};return ZR=t,ez.astSync(e),ZR=null,t.before&&t.after}const nz=/* @__PURE__ */ new WeakMap;function rz(e){return{lossless:!1,updateSelector:!0,...e}}function iz(e){return[e,F.default.combinator({value:`+`}),e.clone()]}function az(e){return typeof e==`string`?iz(F.default.tag({value:e})):e.length>1?iz(F.default.pseudo({value:`:is`,nodes:e.map(e=>F.default.tag({value:e}))})):iz(F.default.tag({value:e[0]}))}function oz(e){let t=nz.get(e);if(!t){t=iz(F.default.tag({value:`view`}));let{cssChildCombinatorReplaceValue:n}=e;(typeof n==`string`||Array.isArray(n)&&n.length>0)&&(t=az(n)),nz.set(e,t)}return t.map(e=>e.clone())}const sz=/* @__PURE__ */ new WeakMap,cz={},lz=rz();function uz(e,t){let n=e.parent;for(;n;){if(n.type===`pseudo`&&n.value===t)return!0;if(n.type===`selector`&&n.parent?.type!==`pseudo`)return!1;n=n.parent}return!1}function dz(e){let t=e.parent,n;for(;t;)t.type===`selector`&&(n=t),t=t.parent;n?.remove()}function fz(e,t){let n=t??cz,r=sz.get(n);if(!r){let e=dP(t),i,a=/* @__PURE__ */ new Map;function o(e,t){a.size>=5e4&&a.clear(),a.set(e,t)}let s=(0,F.default)(t=>{let n=i,r=!1;t.walk((e,t)=>{if(t===0&&(e.type===`id`||e.type===`class`||e.type===`attribute`)&&(r=!0),e.type===`universal`)e.parent?.remove();else if(e.type===`pseudo`){if(e.value===`:is`)r&&e.nodes[0]?.type===`selector`?e.replaceWith(e.nodes[0]):e.parent?.remove();else if(e.value===`:not`)for(let t of e.nodes)t.nodes.length===1&&t.nodes[0].type===`id`&&t.nodes[0].value===`#`&&(t.nodes=[F.default.tag({value:`#n`})])}else e.type===`attribute`&&(e.attribute===`hidden`?n?.remove():uz(e,`:where`)&&dz(e))}),t.walk(t=>{t.type===`pseudo`&&(t.value===`:where`?t.nodes.every(e=>e.nodes.length===0)&&t.remove():t.type===`pseudo`&&bP(t,e))})}),c=s.transformSync.bind(s),l=(e,t=lz)=>{let n=e.selector;if(n){if(t===lz){let t=a.get(n);if(t){t.action===`remove`?(e.selector=``,e.remove()):t.action===`update`&&t.selector&&t.selector!==n&&(e.selector=t.selector);return}}i=e;try{c(e,lz),e.parent&&e.selector.trim().length===0&&(e.selector=``,e.remove())}finally{i=void 0}t===lz&&(e.parent==null?(e.selector=``,o(n,{action:`remove`})):e.selector===n?o(n,{action:`keep`}):o(n,{action:`update`,selector:e.selector}))}};s.transformSync=((e,t)=>{let n=t?rz(t):lz;if(e&&typeof e==`object`&&`type`in e&&e.type===`rule`){l(e,n);return}return c(e,n)}),r={parser:s},sz.set(n,r)}return r.parser}function pz(e,t,n){if(t.length<=1)return;let r=[],i=[];for(let e of t)n(e)?i.push(e):r.push(e);if(r.length===0||i.length===0)return;let a=[...r,...i],o=!0;for(let e=0;e<a.length;e++)if(a[e]!==t[e]){o=!1;break}if(o)return;let s=t.at(-1)?.next()??void 0;for(let e of t)e.remove();for(let t of a)s?e.insertBefore(s,t):e.append(t)}const mz=[[`margin-top`,`margin-bottom`],[`margin-left`,`margin-right`],[`margin-inline-start`,`margin-inline-end`],[`margin-block-start`,`margin-block-end`],[`border-top-width`,`border-bottom-width`],[`border-left-width`,`border-right-width`],[`border-inline-start-width`,`border-inline-end-width`],[`border-block-start-width`,`border-block-end-width`]],hz=/* @__PURE__ */ new Map,gz=/* @__PURE__ */ new Set;for(let[e,t]of mz)hz.set(e,t),hz.set(t,e),gz.add(e),gz.add(t);const _z=/* @__PURE__ */ new Set([`-webkit-margin-start`,`-webkit-margin-end`,`-webkit-margin-before`,`-webkit-margin-after`]),vz=/var\(/i;function yz(e,t){if(t.length<=1)return;let n=[],r=/* @__PURE__ */ new Set;for(let i of t){if(i.parent!==e)continue;let t=`${i.important?`!important@@`:``}${i.value}`;if(r.has(t)){i.remove();continue}r.add(t),n.push(i)}n.length<=1||pz(e,n,e=>vz.test(e.value))}function bz(e){if(!e||e.type!==`pseudo`||e.value!==`:not`)return!1;let t=e.nodes;if(!t||t.length!==1)return!1;let n=t[0];if(!n||n.type!==`selector`)return!1;let r=n.nodes?.[0];return!!(r&&r.type===`pseudo`&&r.value===`:last-child`)}function xz(e,t){if(!e||e.length===0)return!1;for(let n=0;n<e.length;n++){let r=e[n];if(!r||r.type!==`class`&&r.type!==`nesting`)continue;let i=e[n+1];if(!i||i.type!==`combinator`||i.value!==`>`)continue;let a=e[n+2];if(!bz(a))continue;let o=oz(t);return a.replaceWith(...o),!0}return!1}function Sz(e){let t=/* @__PURE__ */ new Map;for(let n of[...e.nodes]){if(n.type!==`decl`)continue;if(_z.has(n.prop)){n.remove();continue}let e=hz.get(n.prop);if(e&&(n.prop=e),!gz.has(n.prop))continue;let r=t.get(n.prop);r?r.push(n):t.set(n.prop,[n])}for(let n of t.values())yz(e,n)}const Cz=/* @__PURE__ */ new Set([`:autofill`,`:checked`,`:default`,`:disabled`,`:enabled`,`:focus-visible`,`:focus-within`,`:fullscreen`,`:indeterminate`,`:in-range`,`:invalid`,`:modal`,`:open`,`:optional`,`:out-of-range`,`:placeholder-shown`,`:read-only`,`:read-write`,`:required`,`:target`,`:valid`,`:visited`]),wz=/* @__PURE__ */ new WeakMap;function Tz(e){let t=wz.get(e);if(t)return t;let n=new Set(Cz);return e.cssRemoveHoverPseudoClass&&n.add(`:hover`),e.cssRemoveActivePseudoClass&&n.add(`:active`),e.cssRemoveFocusPseudoClass&&n.add(`:focus`),wz.set(e,n),n}function Ez(e){let t=e;for(;t.parent&&t.parent.type!==`root`;)t=t.parent;return t.type===`selector`?t:void 0}function Dz(e,t,n=Tz(t)){return e.type!==`pseudo`||!n.has(e.value)?!1:(Ez(e)?.remove(),!0)}const Oz=/* @__PURE__ */ new Set([`:-moz-any`,`:-webkit-any`,`:lang`]),kz=/* @__PURE__ */ new Set([`:not`,`:is`,`:where`,`:has`,`:matches`,`:-webkit-any`,`:-moz-any`,`:lang`]),Az=/* @__PURE__ */ new Set([`:is`,`:where`]),jz=/* @__PURE__ */ new Set([`:after`,`:before`,`::after`,`::before`,`::backdrop`,`::-ms-backdrop`,`::-webkit-backdrop`,`::file-selector-button`]),Mz=/* @__PURE__ */ new Set([`::backdrop`,`::-ms-backdrop`,`::-webkit-backdrop`,`::file-selector-button`]),Nz=/* @__PURE__ */ new Map([[`:before`,`::before`],[`:after`,`::after`]]);function Pz(e){return e.type===`pseudo`&&Oz.has(e.value)}function Fz(e){let t=e,n=e;for(;t.parent;){let e=t.parent;if(e.type===`root`)break;e.type===`selector`&&(n=e),t=e}return n}function Iz(e){let t=e.parent;if(!t||t.type!==`selector`)return;let n=t.parent;if(n&&n.type===`pseudo`&&n.value===`:not`){n.remove();return}Fz(t).remove()}function Lz(e){return e.type===`pseudo`&&kz.has(e.value)&&Array.isArray(e.nodes)&&e.nodes.length===0}function Rz(e,t,n){let r=e.clone(),i=r.nodes[t];if(i&&i.type===`pseudo`&&i.value===`:where`)return i.replaceWith(...n.nodes.map(e=>e.clone())),r}function zz(e,t){let n=[],r=t;for(;r&&r!==e;){let e=r.parent;if(!e||!(`nodes`in e)||!Array.isArray(e.nodes))return;let t=e.nodes.indexOf(r);if(t<0)return;n.unshift(t),r=e}return r===e?n:void 0}function Bz(e,t){let n=e;for(let e of t){if(!(`nodes`in n)||!Array.isArray(n.nodes))return;let t=n.nodes[e];if(!t)return;n=t}return n}function Vz(e){let t;return e.walkPseudos(e=>{!t&&Az.has(e.value)&&Array.isArray(e.nodes)&&e.nodes.some(e=>e.type===`selector`)&&(t=e)}),t}function Hz(e){let t=[e.clone()],n=[];for(;t.length>0;){let e=t.shift();if(!e)continue;let r=Vz(e);if(!r){n.push(e);continue}let i=zz(e,r),a=r.nodes.filter(e=>e.type===`selector`);if(!i||a.length===0){r.remove(),t.push(e);continue}for(let n of a){let r=e.clone(),a=Bz(r,i);a?.type===`pseudo`&&(a.replaceWith(...n.nodes.map(e=>e.clone())),t.push(r))}}return n}function Uz(e,t){e.walk(e=>{e.type===`class`?e.value=t.selectorReplacerOptions===void 0?WL(e.value):WL(e.value,t.selectorReplacerOptions):e.type===`universal`&&t.universalReplacement&&(e.value=t.universalReplacement)})}function Wz(e,t){t.universalReplacement&&e.walk(e=>{e.type===`universal`&&(e.value=t.universalReplacement)})}function Gz(e,t,n,r){let i=e.parent;if(!i)return!1;for(let a of n){let n=Rz(e,t,a);n&&(Uz(n,r),i.insertBefore(e,n))}return e.remove(),!0}function Kz(e,t,n,r){if(dP(t.options)&&(e.value=`:is`),!r||e.length===0)return;let i=e.nodes.filter(e=>e.type===`selector`).flatMap(Hz);for(let e of i)xz(e.nodes,t.options)&&(t.requiresSpacingNormalization=!0);if(i.length>1&&Gz(r,n,i,t))return;let a=i[0];a&&(Wz(a,t),e.replaceWith(...a.nodes.map(e=>e.clone()))),r.type===`selector`&&r.length===0&&r.remove()}function qz(e,t){return dP(t)?e.nodes.some(e=>e.type===`pseudo`&&jz.has(e.value)):e.nodes.some(e=>e.type===`pseudo`&&Mz.has(e.value))}function Jz(e,t,n,r){if(e.type!==`pseudo`||Dz(e,n.options,n.unsupportedPseudoClasses??Tz(n.options)))return;if(Pz(e)){Iz(e);return}if(e.value===`:root`&&n.rootReplacement){e.value=n.rootReplacement;return}let i=Nz.get(e.value);if(i){e.value=i;return}e.value===`:where`&&Kz(e,n,t,r)}function Yz(e,t){e.type===`class`&&(e.value=t.selectorReplacerOptions===void 0?WL(e.value):WL(e.value,t.selectorReplacerOptions))}function Xz(e,t){e.type===`universal`&&t.universalReplacement&&(e.value=t.universalReplacement)}function Zz(e){if(!e||e.type!==`pseudo`||e.value!==`:not`)return!1;let t=e.first;if(!t||t.type!==`selector`)return!1;let n=t.first;return n?n.type===`attribute`?n.attribute===`hidden`:n.type===`tag`&&n.value===`template`:!1}function Qz(e,t,n){if(e.type!==`combinator`||e.value!==`>`)return;let r=e.parent?.nodes;if(!r)return;let i=r[t+1],a=r[t+2],o=r[t+3];if(Zz(i)&&a&&a.type===`combinator`&&(a.value===`~`||a.value===`+`)&&Zz(o)){let e=oz(n.options);r.splice(t+1,3,...e)}}function $z(e,t){xP(e,t.options)}function eB(e,t){if(qz(e,t.options)){e.remove();return}let n=t.unsupportedPseudoClasses??Tz(t.options),r=e.nodes.find(e=>e.type===`pseudo`&&n.has(e.value));if(r){Dz(r,t.options,n);return}xz(e.nodes,t.options)&&(t.requiresSpacingNormalization=!0)}const tB=/* @__PURE__ */ new WeakMap,nB=rz(),rB=/^[#.][\w-]+(?:\s+[#.][\w-]+)*$/;function iB(e){let t=e.selector.trim();return t?rB.test(t):!1}function aB(e,t){e.walk((e,n)=>{let r=e.parent?.type===`selector`?e.parent:void 0;switch(e.type){case`class`:Yz(e,t);break;case`universal`:Xz(e,t);break;case`selector`:eB(e,t);break;case`pseudo`:bz(e)||Jz(e,n,t,r);break;case`combinator`:Qz(e,n,t);break;case`tag`:case`attribute`:$z(e,t)}}),t.requiresSpacingNormalization&&Sz(t.rule),e.walk(e=>{if(Lz(e)){e.remove();return}e.type===`selector`&&e.length===0&&e.remove()}),e.length===0&&t.rule.remove()}function oB(e){let t,n=/* @__PURE__ */ new Map,r=e.cssSelectorReplacement?.root?GL(e.cssSelectorReplacement.root):void 0,i=e.cssSelectorReplacement?.universal?GL(e.cssSelectorReplacement.universal):void 0,a=e.escapeMap?{escapeMap:e.escapeMap}:void 0,o=Tz(e);function s(e,t){n.size>=5e4&&n.clear(),n.set(e,t)}let c=(0,F.default)(e=>{t&&aB(e,t)});return l=>{let u=l.selector;if(!u)return;let d=n.get(u);if(d){d.action===`remove`?l.remove():d.action===`update`&&d.selector&&d.selector!==u&&(l.selector=d.selector);return}if(iB(l)){s(u,{action:`keep`});return}t={options:e,requiresSpacingNormalization:!1,rule:l,rootReplacement:r,universalReplacement:i,selectorReplacerOptions:a,unsupportedPseudoClasses:o};let f=!1,p=!1;try{c.transformSync(l,nB)}finally{let e=t;f=l.parent==null,p=e?.requiresSpacingNormalization===!0,t=void 0}if(f){s(u,{action:`remove`});return}if(p)return;let m=l.selector;m===u?s(u,{action:`keep`}):s(u,{action:`update`,selector:m})}}function sB(e,t){let n=tB.get(t);n||(n=oB(t),tB.set(t,n)),n(e)}const cB=/* @__PURE__ */ new WeakMap;function lB(e){return e.join(`,`)}function uB(e){let t=cB.get(e);if(!t){t={count:0,seen:/* @__PURE__ */ new Set,trace:[]};let n=e.selectors??[];t.seen.add(lB(n)),cB.set(e,t)}return t}function dB(e,t,n){e.trace.push(`${t.phase}:${t.reason}:${lB(n)}`),e.trace.length>24&&e.trace.shift()}function fB(e,t,n){let r=lB(n),i=[...t.trace,`${e.phase}:${e.reason}:${r}`].join(` -> `);return/* @__PURE__ */ Error(`[postcss-selector-guard] 检测到可能的选择器死循环: ${i}`)}function pB(e,t,n){let r=lB(e.selectors??[]),i=lB(t);if(r===i)return!1;let a=uB(e);if(a.seen.has(i)||(a.count+=1,a.count>24))throw fB(n,a,t);return dB(a,n,t),a.seen.add(i),e.selectors=t,!0}function mB(e,t,n){let r=e.selectors??[];return!r.includes(t)&&pB(e,[...r,t],n)}const hB=/* @__PURE__ */ new Map([[`margin-inline-start`,`margin-left`],[`margin-inline-end`,`margin-right`],[`margin-block-start`,`margin-top`],[`margin-block-end`,`margin-bottom`],[`padding-inline-start`,`padding-left`],[`padding-inline-end`,`padding-right`],[`padding-block-start`,`padding-top`],[`padding-block-end`,`padding-bottom`],[`border-inline-start`,`border-left`],[`border-inline-end`,`border-right`],[`border-block-start`,`border-top`],[`border-block-end`,`border-bottom`],[`border-inline-start-width`,`border-left-width`],[`border-inline-end-width`,`border-right-width`]]),gB=/* @__PURE__ */ new Set([`margin-left`,`margin-right`,`margin-top`,`margin-bottom`,`border-left-width`,`border-right-width`,`border-top-width`,`border-bottom-width`]);function _B(e){return hB.get(e)??e}const vB=/calc\(\s*calc\(/gi,yB=/calc\(\s*(1\s*-\s*var\([^()]+\))\s*\)/gi;function bB(e){if(!e.includes(`calc`))return e;let t=e,n;do n=t,vB.lastIndex=0,t=n.replace(vB,`calc((`);while(t!==n);return yB.lastIndex=0,t.replace(yB,`($1)`)}function xB(e){return e.includes(`var(`)}function SB(e){let t=[],n=0,r=0,i,a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(a){a=!1;continue}if(s===`\\`){a=!0;continue}if(i){s===i&&(i=void 0);continue}if(s===`"`||s===`'`){i=s;continue}if(s===`(`){r++;continue}if(s===`)`){r=Math.max(0,r-1);continue}s===`,`&&r===0&&(t.push(e.slice(n,o)),n=o+1)}return t.push(e.slice(n)),t}function CB(e){let t=SB(e).map(e=>e.trim().toLowerCase()).filter(Boolean);return t.length>0?new Set(t):void 0}function wB(e,t){for(let n of e)if(!t.has(n))return!1;return!0}function TB(e){let t=e.nodes.filter(e=>e.type===`decl`&&e.prop.toLowerCase()===`transition-property`).map(e=>({decl:e,items:CB(e.value)}));for(let e=0;e<t.length;e++){let n=t[e];if(n?.items)for(let r=e+1;r<t.length;r++){let e=t[r];if(e?.items){if(e.items.size===n.items.size&&wB(n.items,e.items)){e.decl.remove(),t.splice(r,1),r--;continue}if(e.items.size>n.items.size&&wB(n.items,e.items)){n.decl.remove();break}}}}}function EB(e){let t=[];for(let n of[...e.nodes]){if(n.type!==`decl`)continue;let e=n,r=bB(e.value);r!==e.value&&(e.value=r);let i=_B(e.prop);t.push({decl:e,normalizedValue:r,canonicalProp:i,importantKey:e.important?`!important`:``,isLogical:i!==e.prop})}let n=/* @__PURE__ */ new Map;for(let e of t){let t=`${e.canonicalProp}${e.importantKey}@@${e.normalizedValue}`,r=n.get(t);if(!r){n.set(t,e);continue}r.isLogical&&!e.isLogical?(r.decl.remove(),n.set(t,e)):e.decl.remove()}let r=/* @__PURE__ */ new Map;for(let t of e.nodes){if(t.type!==`decl`)continue;let e=_B(t.prop);if(!gB.has(e))continue;let n=r.get(e);n?n.push(t):r.set(e,[t])}for(let t of r.values())t.length<=1||pz(e,t,e=>xB(e.value));let i=/* @__PURE__ */ new Map;for(let t of[...e.nodes]){if(t.type!==`decl`)continue;let e=_B(t.prop);gB.has(e)&&(xB(t.value)||(i.get(e)?t.remove():i.set(e,t)))}TB(e)}const DB=[`:not(#n)`,`:not(#\\#)`],OB=[`does-not-exist`];function kB(e){return e===void 0||e===!1?[]:Array.isArray(e)?e.filter(Boolean):[e]}function AB(e){let t=e.cssPresetEnv?.features?.[`is-pseudo-class`];if(t&&typeof t==`object`&&`specificityMatchingName`in t){let e=t.specificityMatchingName;return typeof e==`string`&&e.length>0?e:void 0}}function jB(e){let t=e;for(let e of DB)t.includes(e)&&(t=t.split(e).join(``));return t}function MB(){return e=>{if(!e.selectors||e.selectors.length===0)return;let t=!1,n=e.selectors.map(e=>{let n=jB(e);return n!==e&&(t=!0),n});t&&pB(e,n,{phase:`post`,reason:`clean-fallback-placeholder`})}}function NB(e){let t=AB(e),n=kB(e.cssSelectorReplacement?.root);if(n.length===0)return;let r=/* @__PURE__ */ new Set([...OB,...t?[t]:[]]),i=n.map(e=>e?.trim()).filter(e=>!!e?.length).flatMap(e=>[...r].map(t=>({match:`${e}:not(.${t})`,spacedMatch:`${e} :not(.${t})`,replacement:e})));if(i.length)return e=>{if(!e.selectors||e.selectors.length===0)return;let t=!1,n=e.selectors.map(e=>{let n=e;for(let e of i)n.includes(e.match)&&(n=n.split(e.match).join(e.replacement)),n.includes(e.spacedMatch)&&(n=n.split(e.spacedMatch).join(e.replacement));return n!==e&&(t=!0),n});t&&pB(e,n,{phase:`post`,reason:`clean-root-specificity`})}}const PB=[`page`,`.tw-root`,`wx-root-portal-content`],FB=/* @__PURE__ */ new Set([`-webkit-align-content`,`-webkit-align-items`,`-webkit-align-self`,`-webkit-flex`,`-webkit-flex-basis`,`-webkit-flex-direction`,`-webkit-flex-flow`,`-webkit-flex-grow`,`-webkit-flex-shrink`,`-webkit-flex-wrap`,`-webkit-justify-content`,`-webkit-order`]),IB=/* @__PURE__ */ new Set([`-webkit-flex`,`-webkit-inline-flex`]);function LB(e){return e===void 0||e===!1?[]:Array.isArray(e)?e.filter(Boolean):[e]}function RB(e){let t=LB(e.cssSelectorReplacement?.root);if(t.length===PB.length&&t.every((e,t)=>e===PB[t]))return e=>{let t=e.selectors??[];return!t.includes(`:host`)&&PB.every(e=>t.includes(e))}}function zB(e){if(e.prop===`display`&&IB.has(e.value)){e.remove();return}FB.has(e.prop)&&e.remove()}function BB(e,t){e.walkRules(e=>{MF(jF(e))&&(e.walkDecls(e=>{t.has(e.prop)&&e.remove()}),(e.nodes?.length??0)===0&&e.remove())})}function VB(e){let t=xF(e,hF(e));if(t.length===0)return;let n=new Set(t.map(e=>e.prop)),r;if(e.walkRules(e=>{if(e.selector===`view,text,::after,::before`)return r=e,!1}),r){let i=/* @__PURE__ */ new Set;r.walkDecls(e=>{i.add(e.prop)});for(let e of t)i.has(e.prop)||(i.add(e.prop),r.append(e));r.raws.semicolon=!0,BB(e,n);return}e.append({selector:`view,text,::after,::before`,nodes:t}),BB(e,n)}function HB(e){let t=!1;return e.walkDecls(e=>{(e.prop===`--tw-gradient-position`||e.prop===`--tw-gradient-from`||e.prop===`--tw-gradient-to`)&&(t=!0)}),t}const UB=e=>{let t=ed(e,{isMainChunk:!0}),n={postcssPlugin:XR},r=NB(t),i=MB(),a=RB(t),o=!1,s=t.isMainChunk!==!1;if(s||r){let e=s?fz(void 0,t):void 0;n.RuleExit=n=>{s&&e?.transformSync(n),i(n),r?.(n),s&&(a?.(n)&&mB(n,`:host`,{phase:`post`,reason:`append-host-selector`}),EB(n),(n.selectors.length===0||n.selectors.length===1&&n.selector.trim()===``)&&n.remove(),SP(n,t)&&n.remove())}}return n.DeclarationExit=e=>{t.majorVersion===void 0?BL(e):BL(e,{majorVersion:t.majorVersion}),s&&tI(e),zB(e),s&&LL(e)},n.OnceExit=e=>{s&&(e.walkDecls(e=>{tI(e)}),e.walkDecls(e=>{LL(e)}),e.walkRules(e=>{TB(e)}),(t.majorVersion===4||HB(e))&&(YF(e),t.tailwindcssV4GradientFallback===!0&&ZF(e)),e.walkAtRules(e=>{RL(e)})),(o||t.majorVersion===4&&gF(e))&&VB(e)},s&&(n.AtRuleExit=e=>{RL(e),t.cssRemoveProperty&&e.name===`property`&&(t.majorVersion===4&&e.params.trim().startsWith(`--tw-`)&&(o=!0),e.remove()),e.nodes?.length===0&&e.remove()}),n};UB.postcss=!0;function WB(e,t=2){let n=0;for(let r of e.nodes??[])if(r.type===`decl`&&r.prop.startsWith(`--tw-`)&&(n++,n>=t))return!0;return!1}const GB=[`page`,`.tw-root`,`wx-root-portal-content`];function KB(e,t=2){return tz(e)?WB(e,t):!1}function qB(e){return e.prop===`--tw-content`&&(e.value===`""`||e.value===`''`)}function JB(e){e.walkDecls(e=>{qB(e)&&e.remove()})}function YB(e,t){let n=t.cssInjectPreflight?.();n&&n.length!==0&&(e.prepend(...n),e.raws.semicolon=!0)}function XB(e){return e.selectors.some(e=>e.includes(`.`))}function ZB(e){return e.selectors.length>0&&e.selectors.every(e=>e===`:root`||e===`:host`||GB.includes(e))}function QB(e,t){let{cssPreflightRange:n,cssSelectorReplacement:r}=t;return n===`all`&&!e.includes(`:not(not)`)&&e.push(`:not(not)`),r&&(Array.isArray(r.universal)?!r.universal.every(t=>e.includes(t))&&!e.includes(`*`)&&e.unshift(`*`):typeof r.universal==`string`&&!e.includes(r.universal)&&!e.includes(`*`)&&e.unshift(`*`)),e}function $B(e){let t=e.cssSelectorReplacement?.universal;return Array.isArray(t)&&t.length>0?[...t]:typeof t==`string`&&t.length>0?[t]:[`view`,`text`]}function eV(e,t){let{ctx:n,injectAdditionalCssVarScope:r}=t,i=dP(t),a=fF(t),o=t.cssSelectorReplacement?.root,s=o===!1||o===void 0?[]:Array.isArray(o)?o.filter(Boolean):[o],c=e.selectors.some(e=>e.includes(`:host`)),l=e.selectors.some(e=>e.includes(`:root`)),u=GB.every(t=>e.selectors.includes(t));if(!c&&!s.includes(`:host`)&&(l||s.length===GB.length&&s.every((e,t)=>e===GB[t])&&u)&&mB(e,`:host`,{phase:`pre`,reason:`append-host-selector`}),a&&!gF(e.root())&&(!XB(e)||ZB(e))&&JB(e),(KB(e)||i&&e.selectors.includes(`*`)&&WB(e,2))&&(n?.markVariablesScope(e),pB(e,i?$B(t):QB(e.selectors,t),{phase:`pre`,reason:`rewrite-variable-scope`}),YB(e,t)),r&&a&&mF(e)){let n=_F(hF(e.root()));if(n.length===0)return;let r=new cc({selectors:i?$B(t):[`*`,`::after`,`::before`],nodes:n});i||pB(r,QB(r.selectors,t),{phase:`pre`,reason:`rewrite-synthetic-variable-scope`}),e.before(r),YB(r,t)}}const tV=/media\(\s*hover\s*:\s*hover\s*\)/,nV=/\(\s*hover\s*:\s*hover\s*\)/,rV=/color-mix/;function iV(e){return tV.test(e.name)||e.name===`media`&&nV.test(e.params)}function aV(e){let t=e.parent;for(e.remove();t?.type===`atrule`&&(!t.nodes||t.nodes.length===0);){let e=t.parent;t.remove(),t=e}}function oV(e){let t=e.parent;e.remove(),t?.type===`rule`&&t.nodes.length===0&&sV(t)}function sV(e){let t=e.parent;for(e.remove();t?.type===`atrule`&&(!t.nodes||t.nodes.length===0);){let e=t.parent;t.remove(),t=e}}const cV=e=>{let t=ed(e,{isMainChunk:!0}),n={postcssPlugin:XR,Rule(e){sB(e,t)},AtRule(e){iV(e)?e.nodes?e.replaceWith(e.nodes):e.remove():e.name===`supports`?(rV.test(e.params)||rI(e)||iI(e))&&aV(e):aI(e)&&aV(e)},Declaration(e){oI(e)&&oV(e)}};return t.isMainChunk&&(n.Once=e=>{e.walkAtRules(e=>{e.name===`layer`?e.params===`properties`&&e.first?.type===`atrule`&&nI(e.first)&&e.first.replaceWith(e.first.nodes??[]):nI(e)&&e.first?.type===`atrule`&&e.first.name===`layer`&&e.replaceWith(e.first)}),kL(e),e.walkRules(e=>{eV(e,t)})}),n};cV.postcss=!0;function lV(e){return e?Array.isArray(e)?e.filter(Boolean):typeof e==`object`?Object.values(e).filter(Boolean):[]:[]}function uV(e,t,n){return{id:e,stage:t,createPlugin:n}}function dV(e,t){return t.some(e=>pR(e))?!0:e&&!Array.isArray(e)&&typeof e==`object`?!!e.autoprefixer:!1}function fV(e,t){return e.autoprefixer===!1||dV(e.postcssOptions?.plugins,t)?!1:e.autoprefixer===!0||typeof e.autoprefixer==`object`||e.majorVersion===4}function pV(e){let t=e.uniAppXCssSource;return e.uniAppX===!0&&e.uniAppXCssTarget===`uvue`&&(t===`author`||t===`author-apply`)}function mV(e,t){if(t.uniAppXCssSource!==`author-apply`)return;let n=[[`normal:units-to-px`,YR(t)],[`normal:px-transform`,jR(t)],[`normal:rem-transform`,FR(t)],[`normal:unit-conversion`,JR(t)],[`normal:calc`,OR(t)]];for(let[t,r]of n)r&&e.push(uV(t,`normal`,()=>r))}function hV(e,t){let n=[];if(pV(e))return mV(n,e),n;let r=lV(e.postcssOptions?.plugins),i={...e.cssPresetEnv,features:{...e.cssPresetEnv?.features,"cascade-layers":!1}};r.forEach((e,t)=>{n.push(uV(`pre:user-${t}`,`pre`,()=>e))}),n.push(uV(`pre:core`,`pre`,()=>cV(e))),(!t||t.hasPresetEnvFeatures)&&n.push(uV(`normal:preset-env`,`normal`,()=>aj(i))),(!t||t.hasModernColorFunction)&&n.push(uV(`normal:color-functional-fallback`,`normal`,()=>xR()));let a=YR(e);a&&n.push(uV(`normal:units-to-px`,`normal`,()=>a));let o=jR(e);o&&n.push(uV(`normal:px-transform`,`normal`,()=>o));let s=FR(e);s&&n.push(uV(`normal:rem-transform`,`normal`,()=>s));let c=JR(e);c&&n.push(uV(`normal:unit-conversion`,`normal`,()=>c));let l=OR(e);l&&n.push(uV(`normal:calc`,`normal`,()=>l));let u=ER(e);u&&n.push(uV(`normal:calc-duplicate-cleaner`,`normal`,()=>u));let d=kR(e);if(d&&n.push(uV(`normal:custom-property-cleaner`,`normal`,()=>d)),fV(e,r)){let t=mR(e.autoprefixer);t&&n.push(uV(`normal:autoprefixer`,`normal`,()=>t))}return n.push(uV(`post:core`,`post`,()=>UB(e))),n}function gV(e,t){e.ctx=SR();let n=hV(e,t),r=_L(e);if(n.length===0)return{framework:r.framework,target:r.target,branch:r.branch,nodes:[],plugins:[]};let i=/* @__PURE__ */ new Map;n.forEach(e=>{i.set(e.stage,(i.get(e.stage)??0)+1)});let a=/* @__PURE__ */ new Map,o=[],s=n.length;return n.forEach((e,t)=>{let r=a.get(e.stage)??0,c={stage:e.stage,index:t,size:s,stageIndex:r,stageSize:i.get(e.stage)??0};if(t>0){let e=n[t-1];e&&(c.previous={id:e.id,stage:e.stage})}if(t<s-1){let e=n[t+1];e&&(c.next={id:e.id,stage:e.stage})}a.set(e.stage,r+1),o.push({id:e.id,stage:e.stage,plugin:e.createPlugin(c),context:c})}),{framework:r.framework,target:r.target,branch:r.branch,nodes:o,plugins:o.map(e=>e.plugin)}}function _V(e){return{from:void 0,...e.postcssOptions?.options??{}}}function vV(e){let t=[`simple`];for(let n of Object.keys(e).sort()){let r=e[n];switch(typeof r){case`string`:t.push(`${n}:str:${r}`);break;case`number`:t.push(`${n}:num:${r}`);break;case`boolean`:t.push(`${n}:bool:${r?`1`:`0`}`);break;case`undefined`:t.push(`${n}:undefined`);break;case`object`:if(r===null){t.push(`${n}:null`);break}return;default:return}}return t.join(`|`)}var yV=class{pipelineCacheByKey=/* @__PURE__ */ new Map;processOptionsCache=/* @__PURE__ */ new WeakMap;processorCacheByKey=/* @__PURE__ */ new Map;processorKeyCache=/* @__PURE__ */ new WeakMap;createProcessorCacheKey(e){return e.postcssOptions?.options?.from==null?iR(e):iR({...e,postcssOptions:{...e.postcssOptions??{},options:{...e.postcssOptions?.options??{},from:void 0}}})}createCompositeCacheKey(e,t){return t?`${e}|${nR(t)}`:e}getPipeline(e,t){let n=this.processorKeyCache.get(e);n||(n=this.createProcessorCacheKey(e),this.processorKeyCache.set(e,n));let r=this.createCompositeCacheKey(n,t),i=this.pipelineCacheByKey.get(r);return i||(i=gV(e,t),this.pipelineCacheByKey.set(r,i)),i}getProcessOptions(e){let t=e.postcssOptions?.options,n=t?vV(t)??iR(t):void 0,r=this.processOptionsCache.get(e);if(!r||r.cacheKey!==n){let t=_V(e);return this.processOptionsCache.set(e,{value:t,cacheKey:n}),{...t}}return{...r.value}}getProcessor(e,t){let n=this.processorKeyCache.get(e);n||(n=this.createProcessorCacheKey(e),this.processorKeyCache.set(e,n));let r=this.createCompositeCacheKey(n,t),i=this.processorCacheByKey.get(r);return i||(i=ac(this.getPipeline(e,t).plugins),this.processorCacheByKey.set(r,i)),i}};function bV(e){let t=-2128831035;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619|0;return(t>>>0).toString(36)}function xV(e){let t=od(e,rR(e));t.cssInjectPreflight=VL(t.cssPreflight);let n=uR(t),r=new yV,i=n.resolve();r.getProcessor(i),r.getProcessOptions(i);let a=/* @__PURE__ */ new WeakMap;function o(e){let t=a.get(e);if(t)return t;let n=iR(e);return a.set(e,n),n}let s=new vj({max:256}),c=!!(t.postcssOptions?.plugins&&(Array.isArray(t.postcssOptions.plugins)?t.postcssOptions.plugins.length>0:typeof t.postcssOptions.plugins==`object`&&Object.keys(t.postcssOptions.plugins).length>0));function l(e){if(!e.root||typeof e.root.clone!=`function`)return e;let t=e.root.clone().toResult(e.opts);return t.messages.push(...e.messages??[]),t}function u(e,t,i,a){let u=n.resolve(a),d=YL(e),f=u.appType===`uni-app-x`,p=u.uniAppX||f?CF(d):{css:d,restore:e=>e},m=u.majorVersion===4?EF(p.css):void 0,h=m?.css??p.css,g=h===d?t?.clone()??h:h,_;if(!c)try{_=tR(h)}catch{_=void 0}let v=`${o(u)}|${_?nR(_):``}|${bV(h)}`,y=s.get(v);if(y)return u.onDiagnostic?.({phase:`postcss`,durationMs:0,cache:{hit:!0,key:v}}),Promise.resolve(i?l(y):y);let b=r.getProcessor(u,_),x=r.getProcessOptions(u),S=D.now();return b.process(g,x).async().then(async e=>{let t=_L(u).postprocess(e,u);if(u.isMainChunk!==!1&&t.root){let e=0,n=0;do e=PF(t.root),n+=e;while(e>0);if(n>0){let e=t.root.toResult(t.opts);e.messages.push(...t.messages),t=e}}if(m||p.css!==d){let e=p.restore(m?.restore(t.css)??t.css);if(e!==t.css){let n=t.root.clone().toResult(t.opts);n.css=e,n.root=ac.parse(e,t.opts),n.messages.push(...t.messages),t=n}}return u.uniAppX&&(u.uniAppXCssTarget===`uvue`||!f)&&t.root&&PI(t.root,/* @__PURE__ */ new Map)&&(t.css=t.root.toString()),s.set(v,t),await u.onDiagnostic?.({phase:`postcss`,durationMs:D.now()-S,cache:{hit:!1,key:v}}),i?l(t):t}).catch(async e=>{throw await u.onDiagnostic?.({phase:`postcss`,durationMs:D.now()-S,cache:{hit:!1,key:v},error:{name:e instanceof Error?e.name:void 0,message:e instanceof Error?e.message:String(e)}}),e})}let d=((e,t)=>u(e,void 0,!1,t));return d.transformRoot=async(e,t)=>{let n=await u(e.toString(),e,!0,t);return SV(n),n},d.getPipeline=e=>{let t=n.resolve(e);return r.getPipeline(t)},d}function SV(e){if(e.root.type!==`root`)throw TypeError(`StyleHandler.transformRoot must return a single PostCSS Root.`)}const CV={appType:`weapp-vite`,postcssOptions:{plugins:[dd({platform:`weapp`})]},autoprefixer:!1,cssPresetEnv:{autoprefixer:!1},cssCalc:!1,cssChildCombinatorReplaceValue:[`view`,`text`],cssPreflight:{border:`0 solid`,"box-sizing":`border-box`,margin:`0`,padding:`0`},cssRemoveActivePseudoClass:!0,cssRemoveHoverPseudoClass:!0,majorVersion:4,px2rpx:!0,rem2rpx:!0};function wV(){let e=xV(CV),t=/* @__PURE__ */ new WeakMap;return{transformJavaScript:({classSet:e,code:n,filename:r})=>{let i=MV(e,t);return i?.pattern.test(n)?TV(n,r,i.replacements):n},async transformStylesheet(t){return`
2871
+ `&&e[u]!==`\r`;)u++;t.push(l,`/*`,e.slice(a+2,u),`*/`),n=u,r.lastIndex=u;continue}}return t.length===0?e:(t.push(e.slice(n)),t.join(``))}function XL(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}function ZL(e,t,n){let r=e.indexOf(t,n);for(;r!==-1&&XL(e,r);)r=e.indexOf(t,r+1);return r}function QL(e,t){if(XL(e,t)||t<3)return!1;let n=e.slice(t-3,t),r=e[t-4];return n.toLowerCase()===`url`&&(r===void 0||!/\w/.test(r))}const $L={hasModernColorFunction:!1,hasPresetEnvFeatures:!1},eR=/rgb\w*\s*\([^),][^\s),]*\s[^),][^\s),]*\s[^),][^),/]*\/[^)]+\)/i;function tR(e){return e?{hasModernColorFunction:eR.test(e),hasPresetEnvFeatures:!0}:{...$L}}function nR(e){return`signal:${+!!e.hasPresetEnvFeatures},${+!!e.hasModernColorFunction}`}function rR(e){return{cssPresetEnv:{features:{"is-pseudo-class":{specificityMatchingName:`weapp-tw-ig`},"oklab-function":!0,"color-mix":!0,"color-functional-notation":e?.cssPresetEnv?.features?.[`color-functional-notation`]??{preserve:!1},"custom-properties":e?.cssPresetEnv?.features?.[`custom-properties`]??e?.cssCalc?{preserve:!0}:!1},autoprefixer:{add:!1}},cssRemoveProperty:!0,cssRemoveFocusPseudoClass:!0,uniAppXUnsupported:`warn`,cssSelectorReplacement:{root:[`page`,`.tw-root`,`wx-root-portal-content`],universal:[`view`,`text`]}}}function iR(e,t={map:/* @__PURE__ */ new WeakMap,counter:0}){if(e==null)return String(e);if(typeof e==`function`)return`fn:${e.name||`anonymous`}`;if(typeof e==`symbol`)return`sym:${String(e)}`;if(typeof e!=`object`)return`${typeof e}:${String(e)}`;let n=e,r=t.map.get(n);if(r)return r;let i=`ref:${t.counter++}`;return t.map.set(n,i),Array.isArray(n)?`[${n.map(e=>iR(e,t)).join(`,`)}]`:n instanceof Map?`map:{${[...n.entries()].map(([e,n])=>[iR(e,t),iR(n,t)]).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`,`)}}@${i}`:`{${Object.keys(n).sort().map(e=>`${e}:${iR(n[e],t)}`).join(`,`)}}@${i}`}const aR=`__unset__`,oR=[`cssPreflight`,`cssPreflightRange`,`cssChildCombinatorReplaceValue`,`cssPresetEnv`,`autoprefixer`,`injectAdditionalCssVarScope`,`cssSelectorReplacement`,`rem2rpx`,`px2rpx`,`unitsToPx`,`unitConversion`,`platform`,`cssRemoveActivePseudoClass`,`cssRemoveHoverPseudoClass`,`cssRemoveFocusPseudoClass`,`cssRemoveProperty`,`cssCalc`,`atRules`,`tailwindcssV4GradientFallback`];function sR(e){let t=aR,n=aR,r=aR,i=aR,a=aR,o=aR,s=aR,c=aR,l=aR,u=aR,d=aR,f=aR,p=aR,m=aR,h=aR,g=aR,_=aR,v=aR;for(let y of Object.keys(e)){let b=e[y];switch(y){case`isMainChunk`:if(typeof b!=`boolean`)return;t=b?`1`:`0`;break;case`majorVersion`:if(typeof b!=`number`)return;n=String(b);break;case`cssRemoveProperty`:if(typeof b!=`boolean`)return;r=b?`1`:`0`;break;case`cssRemoveHoverPseudoClass`:if(typeof b!=`boolean`)return;a=b?`1`:`0`;break;case`cssRemoveActivePseudoClass`:if(typeof b!=`boolean`)return;i=b?`1`:`0`;break;case`cssRemoveFocusPseudoClass`:if(typeof b!=`boolean`)return;o=b?`1`:`0`;break;case`uniAppX`:if(typeof b!=`boolean`)return;s=b?`1`:`0`;break;case`cssPreflightRange`:if(typeof b!=`string`)return;c=b;break;case`injectAdditionalCssVarScope`:if(typeof b!=`boolean`)return;l=b?`1`:`0`;break;case`rem2rpx`:if(typeof b!=`boolean`)return;u=b?`1`:`0`;break;case`px2rpx`:if(typeof b!=`boolean`)return;d=b?`1`:`0`;break;case`unitsToPx`:if(typeof b!=`boolean`)return;f=b?`1`:`0`;break;case`unitConversion`:if(b!==!1)return;p=`0`;break;case`platform`:if(typeof b!=`string`)return;m=b;break;case`cssCalc`:if(typeof b!=`boolean`)return;h=b?`1`:`0`;break;case`cssChildCombinatorReplaceValue`:if(typeof b!=`string`)return;g=b;break;case`cssPreflight`:if(b!==!1)return;_=`0`;break;case`autoprefixer`:if(typeof b!=`boolean`)return;v=b?`1`:`0`;break;default:return}}return[`simple`,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v].join(`:`)}function cR(e){return!!(e&&Object.keys(e).length>0)}function lR(e,t=!1){let n=!1,r={...e},i=e.cssOptions!==void 0,a={...e.cssOptions??{}};for(let o of oR){let s=i&&o in e.cssOptions,c=o in e;if(!s&&!c)continue;let l=s?e.cssOptions?.[o]:void 0,u=c?e[o]:void 0,d=s?l:u;d!==u&&(r[o]=d,n=!0),(i||t)&&d!==l&&(a[o]=d,n=!0)}return n?{...r,...i||t?{cssOptions:a}:{}}:e}function uR(e){let t=lR(e),n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new WeakMap,i=/* @__PURE__ */ new WeakMap,a=/* @__PURE__ */ new WeakSet;return n.set(`base`,t),{resolve:e=>{if(!e)return t;let o=r.get(e);if(o)return o;if(a.has(e))return t;if(!cR(e))return a.add(e),t;let s=i.get(e);s||(s=sR(e)??iR(e),i.set(e,s));let c=n.get(s);if(c)return r.set(e,c),c;let l=lR(od(lR({...e},!0),t));return n.set(s,l),r.set(e,l),l}}}const dR=[`iOS >= 8`,`Android >= 4.4`,`ChromeAndroid >= 37`],fR={add:!0,flexbox:!1,grid:!1,remove:!0,supports:!1};function pR(e){return e?.postcssPlugin===`autoprefixer`}function mR(e){if(e===!1)return;let t=e===!0||e===void 0?{}:e;return ry({...fR,...t,overrideBrowserslist:t.overrideBrowserslist??dR})}const hR=e=>e.type===`div`&&e.value===`/`;function gR(e){let t=0,n=e.length;for(;t<n&&e[t]?.type===`space`;)t+=1;for(;n>t&&e[n-1]?.type===`space`;)--n;return e.slice(t,n)}function _R(e){let t=[],n=[];return e.forEach(e=>{if(e.type===`div`&&e.value===`,`){n.length&&(t.push(n),n=[]);return}if(e.type===`space`){n.length&&(t.push(n),n=[]);return}n.push(e)}),n.length&&t.push(n),t}const vR=e=>(0,I.default)(e).nodes;function yR(e){let t=e.nodes.findIndex(hR);if(t===-1)return!1;let n=gR(e.nodes.slice(0,t)),r=gR(e.nodes.slice(t+1));if(!n.length||!r.length)return!1;let i=_R(n);if(i.length!==3)return!1;let a=i.map(e=>I.default.stringify(e).trim()).filter(Boolean);if(a.length!==3)return!1;let o=I.default.stringify(r).trim();if(!o)return!1;e.value=`rgba`;let s=`${a.join(`, `)}, ${o}`;return e.nodes=vR(s),!0}function bR(e){if(!e.value||!e.value.toLowerCase().includes(`rgb`))return;let t=(0,I.default)(e.value),n=!1;t.walk(e=>{e.type===`function`&&e.value.toLowerCase()===`rgb`&&yR(e)&&(n=!0)}),n&&(e.value=t.toString())}function xR(){return{postcssPlugin:`weapp-tailwindcss-color-functional-fallback`,Declaration:bR}}xR.postcss=!0;function SR(){let e=/* @__PURE__ */ new WeakMap;function t(t){return e.get(t)===!0}function n(t){e.set(t,!0)}return{variablesScopeWeakMap:e,isVariablesScope:t,markVariablesScope:n}}const CR=/\((var\([^()]+\)(?:\s*\*\s*-?(?:\d+(?:\.\d+)?|\.\d+|[a-z_][\w-]*))+)\)/gi;function wR(e){if(!e.includes(`calc(`))return e;let t=e.replace(/\s+/g,``),n;do n=t,t=t.replace(CR,`$1`);while(t!==n);return t}const TR={postcssPlugin:`postcss-calc-duplicate-cleaner`,OnceExit(e){e.walkRules(e=>{let t=/* @__PURE__ */ new Set;for(let n of[...e.nodes]){if(n.type!==`decl`)continue;let e=n,r=`${e.prop}\0${e.important?`1`:`0`}\0${wR(e.value)}`;t.has(r)?e.remove():t.add(r)}})}};function ER(e){return e.cssCalc?TR:null}const DR={};function OR(e){return e.cssCalc?e.cssCalc===!0||Array.isArray(e.cssCalc)?yd(Array.isArray(e.cssCalc)?{includeCustomProperties:e.cssCalc,...e.customPropertyValues?{customPropertyValues:e.customPropertyValues}:{}}:e.customPropertyValues?{customPropertyValues:e.customPropertyValues,includeCustomProperties:[...e.customPropertyValues.keys()]}:DR):yd({...e.cssCalc,...e.customPropertyValues?{customPropertyValues:e.customPropertyValues}:{}}):null}function kR(e){let t=Array.isArray(e.cssCalc)?e.cssCalc:typeof e.cssCalc==`object`?e.cssCalc.includeCustomProperties:[];if(!(Array.isArray(t)&&t.length>0))return null;let n=e=>e.includes(`var(`)&&e.includes(`--`),r=e=>{if(!n(e))return!1;let r=(0,I.default)(e),i=!1;return r.walk(e=>{e.type!==`function`||e.value!==`var`||i||e.nodes.find(e=>e.type===`word`&&ad(t,e.value))&&(i=!0)}),i},i=(e,t)=>{let n=e.source,r=t.source;return!n?.start||!n.end||!r?.start||!r.end||n.input!==r.input?!1:n.start.line===r.start.line&&n.start.column===r.start.column&&n.end.line===r.end.line&&n.end.column===r.end.column};return{postcssPlugin:`postcss-remove-include-custom-properties`,OnceExit(e){e.walkDecls(e=>{let t=e.prev();if(t&&t.type===`decl`&&t.prop===e.prop&&t.important===e.important&&t.value===e.value){e.remove();return}if(!r(e.value))return;let n,a=t;for(;a;){if(a.type===`decl`&&a.prop===e.prop){n=a;break}a=a.prev()}!n||n.important!==e.important||n!==t&&!i(n,e)||r(n.value)||e.remove()})}}}const AR={platform:`weapp`,targetUnit:`rpx`,unitPrecision:5,propList:[`*`],selectorBlackList:[],replace:!0,mediaQuery:!1,minPixelValue:0,designWidth:750,deviceRatio:{375:2,640:2.34/2,750:1,828:1.81/2}};function jR(e){return e.px2rpx?e.px2rpx===!0?rM(AR):rM(od(e.px2rpx,AR)):null}const MR={rootValue:32,propList:[`*`],transformUnit:`rpx`},NR={processorStage:`OnceExit`},PR={...MR,...NR};function FR(e){if(!e.rem2rpx)return null;if(e.rem2rpx===!0)return oN(PR);let t=od(e.rem2rpx,NR);return oN(t)}const IR=[`default`,`*`],LR=[`WEAPP_TW_TARGET`,`WEAPP_TAILWINDCSS_TARGET`,`UNI_PLATFORM`,`UNI_UTS_PLATFORM`,`TARO_ENV`,`MPX_CLI_MODE`,`MPX_CURRENT_TARGET_MODE`],RR={weapp:[`mp-weixin`,`weixin`,`wechat`,`wx`,`mp`],"mp-weixin":[`weapp`,`weixin`,`wechat`,`wx`,`mp`],wx:[`weapp`,`mp-weixin`,`weixin`,`wechat`,`mp`],h5:[`web`],web:[`h5`],app:[`app-plus`,`app-android`,`app-ios`,`android`,`ios`],"app-plus":[`app`],"app-android":[`app`,`android`],"app-ios":[`app`,`ios`],android:[`app`,`app-android`],ios:[`app`,`app-ios`]};function zR(e){return e?.trim().toLowerCase()||void 0}function BR(e){return ne===void 0?void 0:ne.env[e]}function VR(e){let t=zR(e.platform);if(t)return t;for(let e of LR){let t=zR(BR(e));if(t)return t}}function HR(e){return!!(e&&typeof e==`object`&&`platforms`in e)}function UR(e){return Array.isArray(e.rules)&&e.rules.length>0}function WR(e){if(!e)return[];let t=zR(e);return t?[t,...RR[t]??[]]:[]}function GR(e,t){if(Object.hasOwn(e,t))return e[t];for(let[n,r]of Object.entries(e))if(zR(n)===t)return r}function KR(e,t){if(!HR(e))return e;let n=e.platforms;for(let e of WR(t)){let t=GR(n,e);if(t!==void 0)return t}if(e.default!==void 0)return e.default;for(let e of IR){let t=GR(n,e);if(t!==void 0)return t}}function qR(e){let t=e.unitConversion;if(!t||t===!1)return;let n=KR(t,VR(e));if(n&&n!==!1&&!n.disabled&&UR(n))return n}function JR(e){let t=qR(e);return t?aP(t):null}function YR(e){if(!e.unitsToPx)return null;let t=typeof e.unitsToPx==`object`?e.unitsToPx:void 0;if(t?.disabled||t?.transform===!1)return aP({disabled:!0});let n={},r={rules:[]};return t?.minValue!==void 0&&(n.minValue=t.minValue,r.minValue=t.minValue),t?.to!==void 0&&(n.to=t.to),t?.transform!==void 0&&(n.transform=t.transform),t?.unitMap!==void 0&&(n.unitMap=t.unitMap),t?.exclude!==void 0&&(r.exclude=t.exclude),t?.mediaQuery!==void 0&&(r.mediaQuery=t.mediaQuery),t?.propList!==void 0&&(r.propList=t.propList),t?.replace!==void 0&&(r.replace=t.replace),t?.selectorBlackList!==void 0&&(r.selectorBlackList=t.selectorBlackList),t?.unitPrecision!==void 0&&(r.unitPrecision=t.unitPrecision),r.rules=QN.unitsToPx(n),aP(r)}const XR=`postcss-weapp-tailwindcss-rename-plugin`;let ZR=null;const QR=/^:?:before$/,$R=/^:?:after$/,ez=(0,F.default)(e=>{let t=ZR;t&&e.walkPseudos(e=>{e.parent?.length===1&&(QR.test(e.value)&&(t.before=!0),$R.test(e.value)&&(t.after=!0))})});function tz(e){let t={before:!1,after:!1};return ZR=t,ez.astSync(e),ZR=null,t.before&&t.after}const nz=/* @__PURE__ */ new WeakMap;function rz(e){return{lossless:!1,updateSelector:!0,...e}}function iz(e){return[e,F.default.combinator({value:`+`}),e.clone()]}function az(e){return typeof e==`string`?iz(F.default.tag({value:e})):e.length>1?iz(F.default.pseudo({value:`:is`,nodes:e.map(e=>F.default.tag({value:e}))})):iz(F.default.tag({value:e[0]}))}function oz(e){let t=nz.get(e);if(!t){t=iz(F.default.tag({value:`view`}));let{cssChildCombinatorReplaceValue:n}=e;(typeof n==`string`||Array.isArray(n)&&n.length>0)&&(t=az(n)),nz.set(e,t)}return t.map(e=>e.clone())}const sz=/* @__PURE__ */ new WeakMap,cz={},lz=rz();function uz(e,t){let n=e.parent;for(;n;){if(n.type===`pseudo`&&n.value===t)return!0;if(n.type===`selector`&&n.parent?.type!==`pseudo`)return!1;n=n.parent}return!1}function dz(e){let t=e.parent,n;for(;t;)t.type===`selector`&&(n=t),t=t.parent;n?.remove()}function fz(e,t){let n=t??cz,r=sz.get(n);if(!r){let e=dP(t),i,a=/* @__PURE__ */ new Map;function o(e,t){a.size>=5e4&&a.clear(),a.set(e,t)}let s=(0,F.default)(t=>{let n=i,r=!1;t.walk((e,t)=>{if(t===0&&(e.type===`id`||e.type===`class`||e.type===`attribute`)&&(r=!0),e.type===`universal`)e.parent?.remove();else if(e.type===`pseudo`){if(e.value===`:is`)r&&e.nodes[0]?.type===`selector`?e.replaceWith(e.nodes[0]):e.parent?.remove();else if(e.value===`:not`)for(let t of e.nodes)t.nodes.length===1&&t.nodes[0].type===`id`&&t.nodes[0].value===`#`&&(t.nodes=[F.default.tag({value:`#n`})])}else e.type===`attribute`&&(e.attribute===`hidden`?n?.remove():uz(e,`:where`)&&dz(e))}),t.walk(t=>{t.type===`pseudo`&&(t.value===`:where`?t.nodes.every(e=>e.nodes.length===0)&&t.remove():t.type===`pseudo`&&bP(t,e))})}),c=s.transformSync.bind(s),l=(e,t=lz)=>{let n=e.selector;if(n){if(t===lz){let t=a.get(n);if(t){t.action===`remove`?(e.selector=``,e.remove()):t.action===`update`&&t.selector&&t.selector!==n&&(e.selector=t.selector);return}}i=e;try{c(e,lz),e.parent&&e.selector.trim().length===0&&(e.selector=``,e.remove())}finally{i=void 0}t===lz&&(e.parent==null?(e.selector=``,o(n,{action:`remove`})):e.selector===n?o(n,{action:`keep`}):o(n,{action:`update`,selector:e.selector}))}};s.transformSync=((e,t)=>{let n=t?rz(t):lz;if(e&&typeof e==`object`&&`type`in e&&e.type===`rule`){l(e,n);return}return c(e,n)}),r={parser:s},sz.set(n,r)}return r.parser}function pz(e,t,n){if(t.length<=1)return;let r=[],i=[];for(let e of t)n(e)?i.push(e):r.push(e);if(r.length===0||i.length===0)return;let a=[...r,...i],o=!0;for(let e=0;e<a.length;e++)if(a[e]!==t[e]){o=!1;break}if(o)return;let s=t.at(-1)?.next()??void 0;for(let e of t)e.remove();for(let t of a)s?e.insertBefore(s,t):e.append(t)}const mz=[[`margin-top`,`margin-bottom`],[`margin-left`,`margin-right`],[`margin-inline-start`,`margin-inline-end`],[`margin-block-start`,`margin-block-end`],[`border-top-width`,`border-bottom-width`],[`border-left-width`,`border-right-width`],[`border-inline-start-width`,`border-inline-end-width`],[`border-block-start-width`,`border-block-end-width`]],hz=/* @__PURE__ */ new Map,gz=/* @__PURE__ */ new Set;for(let[e,t]of mz)hz.set(e,t),hz.set(t,e),gz.add(e),gz.add(t);const _z=/* @__PURE__ */ new Set([`-webkit-margin-start`,`-webkit-margin-end`,`-webkit-margin-before`,`-webkit-margin-after`]),vz=/var\(/i;function yz(e,t){if(t.length<=1)return;let n=[],r=/* @__PURE__ */ new Set;for(let i of t){if(i.parent!==e)continue;let t=`${i.important?`!important@@`:``}${i.value}`;if(r.has(t)){i.remove();continue}r.add(t),n.push(i)}n.length<=1||pz(e,n,e=>vz.test(e.value))}function bz(e){if(!e||e.type!==`pseudo`||e.value!==`:not`)return!1;let t=e.nodes;if(!t||t.length!==1)return!1;let n=t[0];if(!n||n.type!==`selector`)return!1;let r=n.nodes?.[0];return!!(r&&r.type===`pseudo`&&r.value===`:last-child`)}function xz(e,t){if(!e||e.length===0)return!1;for(let n=0;n<e.length;n++){let r=e[n];if(!r||r.type!==`class`&&r.type!==`nesting`)continue;let i=e[n+1];if(!i||i.type!==`combinator`||i.value!==`>`)continue;let a=e[n+2];if(!bz(a))continue;let o=oz(t);return a.replaceWith(...o),!0}return!1}function Sz(e){let t=/* @__PURE__ */ new Map;for(let n of[...e.nodes]){if(n.type!==`decl`)continue;if(_z.has(n.prop)){n.remove();continue}let e=hz.get(n.prop);if(e&&(n.prop=e),!gz.has(n.prop))continue;let r=t.get(n.prop);r?r.push(n):t.set(n.prop,[n])}for(let n of t.values())yz(e,n)}const Cz=/* @__PURE__ */ new Set([`:autofill`,`:checked`,`:default`,`:disabled`,`:enabled`,`:focus-visible`,`:focus-within`,`:fullscreen`,`:indeterminate`,`:in-range`,`:invalid`,`:modal`,`:open`,`:optional`,`:out-of-range`,`:placeholder-shown`,`:read-only`,`:read-write`,`:required`,`:target`,`:valid`,`:visited`]),wz=/* @__PURE__ */ new WeakMap;function Tz(e){let t=wz.get(e);if(t)return t;let n=new Set(Cz);return e.cssRemoveHoverPseudoClass&&n.add(`:hover`),e.cssRemoveActivePseudoClass&&n.add(`:active`),e.cssRemoveFocusPseudoClass&&n.add(`:focus`),wz.set(e,n),n}function Ez(e){let t=e;for(;t.parent&&t.parent.type!==`root`;)t=t.parent;return t.type===`selector`?t:void 0}function Dz(e,t,n=Tz(t)){return e.type!==`pseudo`||!n.has(e.value)?!1:(Ez(e)?.remove(),!0)}const Oz=/* @__PURE__ */ new Set([`:-moz-any`,`:-webkit-any`,`:lang`]),kz=/* @__PURE__ */ new Set([`:not`,`:is`,`:where`,`:has`,`:matches`,`:-webkit-any`,`:-moz-any`,`:lang`]),Az=/* @__PURE__ */ new Set([`:is`,`:where`]),jz=/* @__PURE__ */ new Set([`:after`,`:before`,`::after`,`::before`,`::backdrop`,`::-ms-backdrop`,`::-webkit-backdrop`,`::file-selector-button`]),Mz=/* @__PURE__ */ new Set([`::backdrop`,`::-ms-backdrop`,`::-webkit-backdrop`,`::file-selector-button`]),Nz=/* @__PURE__ */ new Map([[`:before`,`::before`],[`:after`,`::after`]]);function Pz(e){return e.type===`pseudo`&&Oz.has(e.value)}function Fz(e){let t=e,n=e;for(;t.parent;){let e=t.parent;if(e.type===`root`)break;e.type===`selector`&&(n=e),t=e}return n}function Iz(e){let t=e.parent;if(!t||t.type!==`selector`)return;let n=t.parent;if(n&&n.type===`pseudo`&&n.value===`:not`){n.remove();return}Fz(t).remove()}function Lz(e){return e.type===`pseudo`&&kz.has(e.value)&&Array.isArray(e.nodes)&&e.nodes.length===0}function Rz(e,t,n){let r=e.clone(),i=r.nodes[t];if(i&&i.type===`pseudo`&&i.value===`:where`)return i.replaceWith(...n.nodes.map(e=>e.clone())),r}function zz(e,t){let n=[],r=t;for(;r&&r!==e;){let e=r.parent;if(!e||!(`nodes`in e)||!Array.isArray(e.nodes))return;let t=e.nodes.indexOf(r);if(t<0)return;n.unshift(t),r=e}return r===e?n:void 0}function Bz(e,t){let n=e;for(let e of t){if(!(`nodes`in n)||!Array.isArray(n.nodes))return;let t=n.nodes[e];if(!t)return;n=t}return n}function Vz(e){let t;return e.walkPseudos(e=>{!t&&Az.has(e.value)&&Array.isArray(e.nodes)&&e.nodes.some(e=>e.type===`selector`)&&(t=e)}),t}function Hz(e){let t=[e.clone()],n=[];for(;t.length>0;){let e=t.shift();if(!e)continue;let r=Vz(e);if(!r){n.push(e);continue}let i=zz(e,r),a=r.nodes.filter(e=>e.type===`selector`);if(!i||a.length===0){r.remove(),t.push(e);continue}for(let n of a){let r=e.clone(),a=Bz(r,i);a?.type===`pseudo`&&(a.replaceWith(...n.nodes.map(e=>e.clone())),t.push(r))}}return n}function Uz(e,t){e.walk(e=>{e.type===`class`?e.value=t.selectorReplacerOptions===void 0?WL(e.value):WL(e.value,t.selectorReplacerOptions):e.type===`universal`&&t.universalReplacement&&(e.value=t.universalReplacement)})}function Wz(e,t){t.universalReplacement&&e.walk(e=>{e.type===`universal`&&(e.value=t.universalReplacement)})}function Gz(e,t,n,r){let i=e.parent;if(!i)return!1;for(let a of n){let n=Rz(e,t,a);n&&(Uz(n,r),i.insertBefore(e,n))}return e.remove(),!0}function Kz(e,t,n,r){if(dP(t.options)&&(e.value=`:is`),!r||e.length===0)return;let i=e.nodes.filter(e=>e.type===`selector`).flatMap(Hz);for(let e of i)xz(e.nodes,t.options)&&(t.requiresSpacingNormalization=!0);if(i.length>1&&Gz(r,n,i,t))return;let a=i[0];a&&(Wz(a,t),e.replaceWith(...a.nodes.map(e=>e.clone()))),r.type===`selector`&&r.length===0&&r.remove()}function qz(e,t){return dP(t)?e.nodes.some(e=>e.type===`pseudo`&&jz.has(e.value)):e.nodes.some(e=>e.type===`pseudo`&&Mz.has(e.value))}function Jz(e,t,n,r){if(e.type!==`pseudo`||Dz(e,n.options,n.unsupportedPseudoClasses??Tz(n.options)))return;if(Pz(e)){Iz(e);return}if(e.value===`:root`&&n.rootReplacement){e.value=n.rootReplacement;return}let i=Nz.get(e.value);if(i){e.value=i;return}e.value===`:where`&&Kz(e,n,t,r)}function Yz(e,t){e.type===`class`&&(e.value=t.selectorReplacerOptions===void 0?WL(e.value):WL(e.value,t.selectorReplacerOptions))}function Xz(e,t){e.type===`universal`&&t.universalReplacement&&(e.value=t.universalReplacement)}function Zz(e){if(!e||e.type!==`pseudo`||e.value!==`:not`)return!1;let t=e.first;if(!t||t.type!==`selector`)return!1;let n=t.first;return n?n.type===`attribute`?n.attribute===`hidden`:n.type===`tag`&&n.value===`template`:!1}function Qz(e,t,n){if(e.type!==`combinator`||e.value!==`>`)return;let r=e.parent?.nodes;if(!r)return;let i=r[t+1],a=r[t+2],o=r[t+3];if(Zz(i)&&a&&a.type===`combinator`&&(a.value===`~`||a.value===`+`)&&Zz(o)){let e=oz(n.options);r.splice(t+1,3,...e)}}function $z(e,t){xP(e,t.options)}function eB(e,t){if(qz(e,t.options)){e.remove();return}let n=t.unsupportedPseudoClasses??Tz(t.options),r=e.nodes.find(e=>e.type===`pseudo`&&n.has(e.value));if(r){Dz(r,t.options,n);return}xz(e.nodes,t.options)&&(t.requiresSpacingNormalization=!0)}const tB=/* @__PURE__ */ new WeakMap,nB=rz(),rB=/^[#.][\w-]+(?:\s+[#.][\w-]+)*$/;function iB(e){let t=e.selector.trim();return t?rB.test(t):!1}function aB(e,t){e.walk((e,n)=>{let r=e.parent?.type===`selector`?e.parent:void 0;switch(e.type){case`class`:Yz(e,t);break;case`universal`:Xz(e,t);break;case`selector`:eB(e,t);break;case`pseudo`:bz(e)||Jz(e,n,t,r);break;case`combinator`:Qz(e,n,t);break;case`tag`:case`attribute`:$z(e,t)}}),t.requiresSpacingNormalization&&Sz(t.rule),e.walk(e=>{if(Lz(e)){e.remove();return}e.type===`selector`&&e.length===0&&e.remove()}),e.length===0&&t.rule.remove()}function oB(e){let t,n=/* @__PURE__ */ new Map,r=e.cssSelectorReplacement?.root?GL(e.cssSelectorReplacement.root):void 0,i=e.cssSelectorReplacement?.universal?GL(e.cssSelectorReplacement.universal):void 0,a=e.escapeMap?{escapeMap:e.escapeMap}:void 0,o=Tz(e);function s(e,t){n.size>=5e4&&n.clear(),n.set(e,t)}let c=(0,F.default)(e=>{t&&aB(e,t)});return l=>{let u=l.selector;if(!u)return;let d=n.get(u);if(d){d.action===`remove`?l.remove():d.action===`update`&&d.selector&&d.selector!==u&&(l.selector=d.selector);return}if(iB(l)){s(u,{action:`keep`});return}t={options:e,requiresSpacingNormalization:!1,rule:l,rootReplacement:r,universalReplacement:i,selectorReplacerOptions:a,unsupportedPseudoClasses:o};let f=!1,p=!1;try{c.transformSync(l,nB)}finally{let e=t;f=l.parent==null,p=e?.requiresSpacingNormalization===!0,t=void 0}if(f){s(u,{action:`remove`});return}if(p)return;let m=l.selector;m===u?s(u,{action:`keep`}):s(u,{action:`update`,selector:m})}}function sB(e,t){let n=tB.get(t);n||(n=oB(t),tB.set(t,n)),n(e)}const cB=/* @__PURE__ */ new WeakMap;function lB(e){return e.join(`,`)}function uB(e){let t=cB.get(e);if(!t){t={count:0,seen:/* @__PURE__ */ new Set,trace:[]};let n=e.selectors??[];t.seen.add(lB(n)),cB.set(e,t)}return t}function dB(e,t,n){e.trace.push(`${t.phase}:${t.reason}:${lB(n)}`),e.trace.length>24&&e.trace.shift()}function fB(e,t,n){let r=lB(n),i=[...t.trace,`${e.phase}:${e.reason}:${r}`].join(` -> `);return/* @__PURE__ */ Error(`[postcss-selector-guard] 检测到可能的选择器死循环: ${i}`)}function pB(e,t,n){let r=lB(e.selectors??[]),i=lB(t);if(r===i)return!1;let a=uB(e);if(a.seen.has(i)||(a.count+=1,a.count>24))throw fB(n,a,t);return dB(a,n,t),a.seen.add(i),e.selectors=t,!0}function mB(e,t,n){let r=e.selectors??[];return!r.includes(t)&&pB(e,[...r,t],n)}const hB=/* @__PURE__ */ new Map([[`margin-inline-start`,`margin-left`],[`margin-inline-end`,`margin-right`],[`margin-block-start`,`margin-top`],[`margin-block-end`,`margin-bottom`],[`padding-inline-start`,`padding-left`],[`padding-inline-end`,`padding-right`],[`padding-block-start`,`padding-top`],[`padding-block-end`,`padding-bottom`],[`border-inline-start`,`border-left`],[`border-inline-end`,`border-right`],[`border-block-start`,`border-top`],[`border-block-end`,`border-bottom`],[`border-inline-start-width`,`border-left-width`],[`border-inline-end-width`,`border-right-width`]]),gB=/* @__PURE__ */ new Set([`margin-left`,`margin-right`,`margin-top`,`margin-bottom`,`border-left-width`,`border-right-width`,`border-top-width`,`border-bottom-width`]);function _B(e){return hB.get(e)??e}const vB=/calc\(\s*calc\(/gi,yB=/calc\(\s*(1\s*-\s*var\([^()]+\))\s*\)/gi;function bB(e){if(!e.includes(`calc`))return e;let t=e,n;do n=t,vB.lastIndex=0,t=n.replace(vB,`calc((`);while(t!==n);return yB.lastIndex=0,t.replace(yB,`($1)`)}function xB(e){return e.includes(`var(`)}function SB(e){let t=[],n=0,r=0,i,a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(a){a=!1;continue}if(s===`\\`){a=!0;continue}if(i){s===i&&(i=void 0);continue}if(s===`"`||s===`'`){i=s;continue}if(s===`(`){r++;continue}if(s===`)`){r=Math.max(0,r-1);continue}s===`,`&&r===0&&(t.push(e.slice(n,o)),n=o+1)}return t.push(e.slice(n)),t}function CB(e){let t=SB(e).map(e=>e.trim().toLowerCase()).filter(Boolean);return t.length>0?new Set(t):void 0}function wB(e,t){for(let n of e)if(!t.has(n))return!1;return!0}function TB(e){let t=e.nodes.filter(e=>e.type===`decl`&&e.prop.toLowerCase()===`transition-property`).map(e=>({decl:e,items:CB(e.value)}));for(let e=0;e<t.length;e++){let n=t[e];if(n?.items)for(let r=e+1;r<t.length;r++){let e=t[r];if(e?.items){if(e.items.size===n.items.size&&wB(n.items,e.items)){e.decl.remove(),t.splice(r,1),r--;continue}if(e.items.size>n.items.size&&wB(n.items,e.items)){n.decl.remove();break}}}}}function EB(e){let t=[];for(let n of[...e.nodes]){if(n.type!==`decl`)continue;let e=n,r=bB(e.value);r!==e.value&&(e.value=r);let i=_B(e.prop);t.push({decl:e,normalizedValue:r,canonicalProp:i,importantKey:e.important?`!important`:``,isLogical:i!==e.prop})}let n=/* @__PURE__ */ new Map;for(let e of t){let t=`${e.canonicalProp}${e.importantKey}@@${e.normalizedValue}`,r=n.get(t);if(!r){n.set(t,e);continue}r.isLogical&&!e.isLogical?(r.decl.remove(),n.set(t,e)):e.decl.remove()}let r=/* @__PURE__ */ new Map;for(let t of e.nodes){if(t.type!==`decl`)continue;let e=_B(t.prop);if(!gB.has(e))continue;let n=r.get(e);n?n.push(t):r.set(e,[t])}for(let t of r.values())t.length<=1||pz(e,t,e=>xB(e.value));let i=/* @__PURE__ */ new Map;for(let t of[...e.nodes]){if(t.type!==`decl`)continue;let e=_B(t.prop);gB.has(e)&&(xB(t.value)||(i.get(e)?t.remove():i.set(e,t)))}TB(e)}const DB=[`:not(#n)`,`:not(#\\#)`],OB=[`does-not-exist`];function kB(e){return e===void 0||e===!1?[]:Array.isArray(e)?e.filter(Boolean):[e]}function AB(e){let t=e.cssPresetEnv?.features?.[`is-pseudo-class`];if(t&&typeof t==`object`&&`specificityMatchingName`in t){let e=t.specificityMatchingName;return typeof e==`string`&&e.length>0?e:void 0}}function jB(e){let t=e;for(let e of DB)t.includes(e)&&(t=t.split(e).join(``));return t}function MB(){return e=>{if(!e.selectors||e.selectors.length===0)return;let t=!1,n=e.selectors.map(e=>{let n=jB(e);return n!==e&&(t=!0),n});t&&pB(e,n,{phase:`post`,reason:`clean-fallback-placeholder`})}}function NB(e){let t=AB(e),n=kB(e.cssSelectorReplacement?.root);if(n.length===0)return;let r=/* @__PURE__ */ new Set([...OB,...t?[t]:[]]),i=n.map(e=>e?.trim()).filter(e=>!!e?.length).flatMap(e=>[...r].map(t=>({match:`${e}:not(.${t})`,spacedMatch:`${e} :not(.${t})`,replacement:e})));if(i.length)return e=>{if(!e.selectors||e.selectors.length===0)return;let t=!1,n=e.selectors.map(e=>{let n=e;for(let e of i)n.includes(e.match)&&(n=n.split(e.match).join(e.replacement)),n.includes(e.spacedMatch)&&(n=n.split(e.spacedMatch).join(e.replacement));return n!==e&&(t=!0),n});t&&pB(e,n,{phase:`post`,reason:`clean-root-specificity`})}}const PB=[`page`,`.tw-root`,`wx-root-portal-content`],FB=/* @__PURE__ */ new Set([`-webkit-align-content`,`-webkit-align-items`,`-webkit-align-self`,`-webkit-flex`,`-webkit-flex-basis`,`-webkit-flex-direction`,`-webkit-flex-flow`,`-webkit-flex-grow`,`-webkit-flex-shrink`,`-webkit-flex-wrap`,`-webkit-justify-content`,`-webkit-order`]),IB=/* @__PURE__ */ new Set([`-webkit-flex`,`-webkit-inline-flex`]);function LB(e){return e===void 0||e===!1?[]:Array.isArray(e)?e.filter(Boolean):[e]}function RB(e){let t=LB(e.cssSelectorReplacement?.root);if(t.length===PB.length&&t.every((e,t)=>e===PB[t]))return e=>{let t=e.selectors??[];return!t.includes(`:host`)&&PB.every(e=>t.includes(e))}}function zB(e){if(e.prop===`display`&&IB.has(e.value)){e.remove();return}FB.has(e.prop)&&e.remove()}function BB(e,t){e.walkRules(e=>{MF(jF(e))&&(e.walkDecls(e=>{t.has(e.prop)&&e.remove()}),(e.nodes?.length??0)===0&&e.remove())})}function VB(e){let t=xF(e,hF(e));if(t.length===0)return;let n=new Set(t.map(e=>e.prop)),r;if(e.walkRules(e=>{if(e.selector===`view,text,::after,::before`)return r=e,!1}),r){let i=/* @__PURE__ */ new Set;r.walkDecls(e=>{i.add(e.prop)});for(let e of t)i.has(e.prop)||(i.add(e.prop),r.append(e));r.raws.semicolon=!0,BB(e,n);return}e.append({selector:`view,text,::after,::before`,nodes:t}),BB(e,n)}function HB(e){let t=!1;return e.walkDecls(e=>{(e.prop===`--tw-gradient-position`||e.prop===`--tw-gradient-from`||e.prop===`--tw-gradient-to`)&&(t=!0)}),t}const UB=e=>{let t=ed(e,{isMainChunk:!0}),n={postcssPlugin:XR},r=NB(t),i=MB(),a=RB(t),o=!1,s=t.isMainChunk!==!1;if(s||r){let e=s?fz(void 0,t):void 0;n.RuleExit=n=>{s&&e?.transformSync(n),i(n),r?.(n),s&&(a?.(n)&&mB(n,`:host`,{phase:`post`,reason:`append-host-selector`}),EB(n),(n.selectors.length===0||n.selectors.length===1&&n.selector.trim()===``)&&n.remove(),SP(n,t)&&n.remove())}}return n.DeclarationExit=e=>{t.majorVersion===void 0?BL(e):BL(e,{majorVersion:t.majorVersion}),s&&tI(e),zB(e),s&&LL(e)},n.OnceExit=e=>{s&&(e.walkDecls(e=>{tI(e)}),e.walkDecls(e=>{LL(e)}),e.walkRules(e=>{TB(e)}),(t.majorVersion===4||HB(e))&&(YF(e),t.tailwindcssV4GradientFallback===!0&&ZF(e)),e.walkAtRules(e=>{RL(e)})),(o||t.majorVersion===4&&gF(e))&&VB(e)},s&&(n.AtRuleExit=e=>{RL(e),t.cssRemoveProperty&&e.name===`property`&&(t.majorVersion===4&&e.params.trim().startsWith(`--tw-`)&&(o=!0),e.remove()),e.nodes?.length===0&&e.remove()}),n};UB.postcss=!0;function WB(e,t=2){let n=0;for(let r of e.nodes??[])if(r.type===`decl`&&r.prop.startsWith(`--tw-`)&&(n++,n>=t))return!0;return!1}const GB=[`page`,`.tw-root`,`wx-root-portal-content`];function KB(e,t=2){return tz(e)?WB(e,t):!1}function qB(e){return e.prop===`--tw-content`&&(e.value===`""`||e.value===`''`)}function JB(e){e.walkDecls(e=>{qB(e)&&e.remove()})}function YB(e,t){let n=t.cssInjectPreflight?.();n&&n.length!==0&&(e.prepend(...n),e.raws.semicolon=!0)}function XB(e){return e.selectors.some(e=>e.includes(`.`))}function ZB(e){return e.selectors.length>0&&e.selectors.every(e=>e===`:root`||e===`:host`||GB.includes(e))}function QB(e,t){let{cssPreflightRange:n,cssSelectorReplacement:r}=t;return n===`all`&&!e.includes(`:not(not)`)&&e.push(`:not(not)`),r&&(Array.isArray(r.universal)?!r.universal.every(t=>e.includes(t))&&!e.includes(`*`)&&e.unshift(`*`):typeof r.universal==`string`&&!e.includes(r.universal)&&!e.includes(`*`)&&e.unshift(`*`)),e}function $B(e){let t=e.cssSelectorReplacement?.universal;return Array.isArray(t)&&t.length>0?[...t]:typeof t==`string`&&t.length>0?[t]:[`view`,`text`]}function eV(e,t){let{ctx:n,injectAdditionalCssVarScope:r}=t,i=dP(t),a=fF(t),o=t.cssSelectorReplacement?.root,s=o===!1||o===void 0?[]:Array.isArray(o)?o.filter(Boolean):[o],c=e.selectors.some(e=>e.includes(`:host`)),l=e.selectors.some(e=>e.includes(`:root`)),u=GB.every(t=>e.selectors.includes(t));if(!c&&!s.includes(`:host`)&&(l||s.length===GB.length&&s.every((e,t)=>e===GB[t])&&u)&&mB(e,`:host`,{phase:`pre`,reason:`append-host-selector`}),a&&!gF(e.root())&&(!XB(e)||ZB(e))&&JB(e),(KB(e)||i&&e.selectors.includes(`*`)&&WB(e,2))&&(n?.markVariablesScope(e),pB(e,i?$B(t):QB(e.selectors,t),{phase:`pre`,reason:`rewrite-variable-scope`}),YB(e,t)),r&&a&&mF(e)){let n=_F(hF(e.root()));if(n.length===0)return;let r=new cc({selectors:i?$B(t):[`*`,`::after`,`::before`],nodes:n});i||pB(r,QB(r.selectors,t),{phase:`pre`,reason:`rewrite-synthetic-variable-scope`}),e.before(r),YB(r,t)}}const tV=/media\(\s*hover\s*:\s*hover\s*\)/,nV=/\(\s*hover\s*:\s*hover\s*\)/,rV=/color-mix/;function iV(e){return tV.test(e.name)||e.name===`media`&&nV.test(e.params)}function aV(e){let t=e.parent;for(e.remove();t?.type===`atrule`&&(!t.nodes||t.nodes.length===0);){let e=t.parent;t.remove(),t=e}}function oV(e){let t=e.parent;e.remove(),t?.type===`rule`&&t.nodes.length===0&&sV(t)}function sV(e){let t=e.parent;for(e.remove();t?.type===`atrule`&&(!t.nodes||t.nodes.length===0);){let e=t.parent;t.remove(),t=e}}const cV=e=>{let t=ed(e,{isMainChunk:!0}),n={postcssPlugin:XR,Rule(e){sB(e,t)},AtRule(e){iV(e)?e.nodes?e.replaceWith(e.nodes):e.remove():e.name===`supports`?(rV.test(e.params)||rI(e)||iI(e))&&aV(e):aI(e)&&aV(e)},Declaration(e){oI(e)&&oV(e)}};return t.isMainChunk&&(n.Once=e=>{e.walkAtRules(e=>{e.name===`layer`?e.params===`properties`&&e.first?.type===`atrule`&&nI(e.first)&&e.first.replaceWith(e.first.nodes??[]):nI(e)&&e.first?.type===`atrule`&&e.first.name===`layer`&&e.replaceWith(e.first)}),kL(e),e.walkRules(e=>{eV(e,t)})}),n};cV.postcss=!0;function lV(e){return e?Array.isArray(e)?e.filter(Boolean):typeof e==`object`?Object.values(e).filter(Boolean):[]:[]}function uV(e,t,n){return{id:e,stage:t,createPlugin:n}}function dV(e,t){return t.some(e=>pR(e))?!0:e&&!Array.isArray(e)&&typeof e==`object`?!!e.autoprefixer:!1}function fV(e,t){return e.autoprefixer===!1||dV(e.postcssOptions?.plugins,t)?!1:e.autoprefixer===!0||typeof e.autoprefixer==`object`||e.majorVersion===4}function pV(e){let t=e.uniAppXCssSource;return e.uniAppX===!0&&e.uniAppXCssTarget===`uvue`&&(t===`author`||t===`author-apply`)}function mV(e,t){if(t.uniAppXCssSource!==`author-apply`)return;let n=[[`normal:units-to-px`,YR(t)],[`normal:px-transform`,jR(t)],[`normal:rem-transform`,FR(t)],[`normal:unit-conversion`,JR(t)],[`normal:calc`,OR(t)]];for(let[t,r]of n)r&&e.push(uV(t,`normal`,()=>r))}function hV(e,t){let n=[];if(pV(e))return mV(n,e),n;let r=lV(e.postcssOptions?.plugins),i={...e.cssPresetEnv,features:{...e.cssPresetEnv?.features,"cascade-layers":!1}};r.forEach((e,t)=>{n.push(uV(`pre:user-${t}`,`pre`,()=>e))}),n.push(uV(`pre:core`,`pre`,()=>cV(e))),(!t||t.hasPresetEnvFeatures)&&n.push(uV(`normal:preset-env`,`normal`,()=>aj(i))),(!t||t.hasModernColorFunction)&&n.push(uV(`normal:color-functional-fallback`,`normal`,()=>xR()));let a=YR(e);a&&n.push(uV(`normal:units-to-px`,`normal`,()=>a));let o=jR(e);o&&n.push(uV(`normal:px-transform`,`normal`,()=>o));let s=FR(e);s&&n.push(uV(`normal:rem-transform`,`normal`,()=>s));let c=JR(e);c&&n.push(uV(`normal:unit-conversion`,`normal`,()=>c));let l=OR(e);l&&n.push(uV(`normal:calc`,`normal`,()=>l));let u=ER(e);u&&n.push(uV(`normal:calc-duplicate-cleaner`,`normal`,()=>u));let d=kR(e);if(d&&n.push(uV(`normal:custom-property-cleaner`,`normal`,()=>d)),fV(e,r)){let t=mR(e.autoprefixer);t&&n.push(uV(`normal:autoprefixer`,`normal`,()=>t))}return n.push(uV(`post:core`,`post`,()=>UB(e))),n}function gV(e,t){e.ctx=SR();let n=hV(e,t),r=_L(e);if(n.length===0)return{framework:r.framework,target:r.target,branch:r.branch,nodes:[],plugins:[]};let i=/* @__PURE__ */ new Map;n.forEach(e=>{i.set(e.stage,(i.get(e.stage)??0)+1)});let a=/* @__PURE__ */ new Map,o=[],s=n.length;return n.forEach((e,t)=>{let r=a.get(e.stage)??0,c={stage:e.stage,index:t,size:s,stageIndex:r,stageSize:i.get(e.stage)??0};if(t>0){let e=n[t-1];e&&(c.previous={id:e.id,stage:e.stage})}if(t<s-1){let e=n[t+1];e&&(c.next={id:e.id,stage:e.stage})}a.set(e.stage,r+1),o.push({id:e.id,stage:e.stage,plugin:e.createPlugin(c),context:c})}),{framework:r.framework,target:r.target,branch:r.branch,nodes:o,plugins:o.map(e=>e.plugin)}}function _V(e){return{from:void 0,...e.postcssOptions?.options??{}}}function vV(e){let t=[`simple`];for(let n of Object.keys(e).sort()){let r=e[n];switch(typeof r){case`string`:t.push(`${n}:str:${r}`);break;case`number`:t.push(`${n}:num:${r}`);break;case`boolean`:t.push(`${n}:bool:${r?`1`:`0`}`);break;case`undefined`:t.push(`${n}:undefined`);break;case`object`:if(r===null){t.push(`${n}:null`);break}return;default:return}}return t.join(`|`)}var yV=class{pipelineCacheByKey=/* @__PURE__ */ new Map;processOptionsCache=/* @__PURE__ */ new WeakMap;processorCacheByKey=/* @__PURE__ */ new Map;processorKeyCache=/* @__PURE__ */ new WeakMap;createProcessorCacheKey(e){return e.postcssOptions?.options?.from==null?iR(e):iR({...e,postcssOptions:{...e.postcssOptions??{},options:{...e.postcssOptions?.options??{},from:void 0}}})}createCompositeCacheKey(e,t){return t?`${e}|${nR(t)}`:e}getPipeline(e,t){let n=this.processorKeyCache.get(e);n||(n=this.createProcessorCacheKey(e),this.processorKeyCache.set(e,n));let r=this.createCompositeCacheKey(n,t),i=this.pipelineCacheByKey.get(r);return i||(i=gV(e,t),this.pipelineCacheByKey.set(r,i)),i}getProcessOptions(e){let t=e.postcssOptions?.options,n=t?vV(t)??iR(t):void 0,r=this.processOptionsCache.get(e);if(!r||r.cacheKey!==n){let t=_V(e);return this.processOptionsCache.set(e,{value:t,cacheKey:n}),{...t}}return{...r.value}}getProcessor(e,t){let n=this.processorKeyCache.get(e);n||(n=this.createProcessorCacheKey(e),this.processorKeyCache.set(e,n));let r=this.createCompositeCacheKey(n,t),i=this.processorCacheByKey.get(r);return i||(i=ac(this.getPipeline(e,t).plugins),this.processorCacheByKey.set(r,i)),i}};function bV(e){let t=-2128831035;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619|0;return(t>>>0).toString(36)}function xV(e){let t=od(e,rR(e));t.cssInjectPreflight=VL(t.cssPreflight);let n=uR(t),r=new yV,i=n.resolve();r.getProcessor(i),r.getProcessOptions(i);let a=/* @__PURE__ */ new WeakMap;function o(e){let t=a.get(e);if(t)return t;let n=iR(e);return a.set(e,n),n}let s=new vj({max:256}),c=!!(t.postcssOptions?.plugins&&(Array.isArray(t.postcssOptions.plugins)?t.postcssOptions.plugins.length>0:typeof t.postcssOptions.plugins==`object`&&Object.keys(t.postcssOptions.plugins).length>0));function l(e){if(!e.root||typeof e.root.clone!=`function`)return e;let t=e.root.clone().toResult(e.opts);return t.messages.push(...e.messages??[]),t}function u(e,t,i,a){let u=n.resolve(a),d=YL(e),f=u.appType===`uni-app-x`,p=u.uniAppX||f?CF(d):{css:d,restore:e=>e},m=u.majorVersion===4?EF(p.css):void 0,h=m?.css??p.css,g=h===d?t?.clone()??h:h,_;if(!c)try{_=tR(h)}catch{_=void 0}let v=`${o(u)}|${_?nR(_):``}|${bV(h)}`,y=s.get(v);if(y)return u.onDiagnostic?.({phase:`postcss`,durationMs:0,cache:{hit:!0,key:v}}),Promise.resolve(i?l(y):y);let b=r.getProcessor(u,_),x=r.getProcessOptions(u),S=D.now();return b.process(g,x).async().then(async e=>{let t=_L(u).postprocess(e,u);if(u.isMainChunk!==!1&&t.root){let e=0,n=0;do e=PF(t.root),n+=e;while(e>0);if(n>0){let e=t.root.toResult(t.opts);e.messages.push(...t.messages),t=e}}if(m||p.css!==d){let e=p.restore(m?.restore(t.css)??t.css);if(e!==t.css){let n=t.root.clone().toResult(t.opts);n.css=e,n.root=ac.parse(e,t.opts),n.messages.push(...t.messages),t=n}}return u.uniAppX&&(u.uniAppXCssTarget===`uvue`||!f)&&t.root&&PI(t.root,/* @__PURE__ */ new Map)&&(t.css=t.root.toString()),s.set(v,t),await u.onDiagnostic?.({phase:`postcss`,durationMs:D.now()-S,cache:{hit:!1,key:v}}),i?l(t):t}).catch(async e=>{throw await u.onDiagnostic?.({phase:`postcss`,durationMs:D.now()-S,cache:{hit:!1,key:v},error:{name:e instanceof Error?e.name:void 0,message:e instanceof Error?e.message:String(e)}}),e})}let d=((e,t)=>u(e,void 0,!1,t));return d.transformRoot=async(e,t)=>{let n=await u(e.toString(),e,!0,t);return SV(n),n},d.getPipeline=e=>{let t=n.resolve(e);return r.getPipeline(t)},d}function SV(e){if(e.root.type!==`root`)throw TypeError(`StyleHandler.transformRoot must return a single PostCSS Root.`)}const CV={appType:`weapp-vite`,postcssOptions:{plugins:[dd({platform:`weapp`})]},autoprefixer:!1,cssPresetEnv:{autoprefixer:!1},cssCalc:!1,cssChildCombinatorReplaceValue:[`view`,`text`],cssPreflight:{border:`0 solid`,"box-sizing":`border-box`,margin:`0`,padding:`0`},cssRemoveActivePseudoClass:!0,cssRemoveHoverPseudoClass:!0,majorVersion:4,cssOptions:{px2rpx:!0,rem2rpx:!0}};function wV(){let e=xV(CV),t=/* @__PURE__ */ new WeakMap;return{transformJavaScript:({classSet:e,code:n,filename:r})=>{let i=MV(e,t);return i?.pattern.test(n)?TV(n,r,i.replacements):n},async transformStylesheet(t){return`
2872
2872
  .h5-span,
2873
2873
  .h5-a {
2874
2874
  display: inline;
@@ -2887,7 +2887,7 @@ if(!g)return{postcssPlugin:tM};let y=(()=>{if(!p)return e=>nM(m.rootValue);let e
2887
2887
  }
2888
2888
  \n${(await e(t)).css}`}}}function TV(e,t,n){let r=p(t,e);if(r.errors.length>0){let e=r.errors.map(e=>e.message).join(`; `);throw Error(`Failed to transform Tailwind classes in ${t}: ${e}`)}let i=new d(e,{filename:t});return Re(r.program,{enter:EV(e,n,i)}),i.toString()}function EV(e,t,n){return r=>{if(PV(r)){DV(e,r,t,n);return}r.type===`TemplateElement`&&OV(e,r,t,n)}}function DV(e,t,n,r){let i=jV(t.value,n);i!==void 0&&AV(e,t.start+1,t.end-1,FV(i),r)}function OV(e,t,n,r){let i=jV(t.value.raw,n);i!==void 0&&kV(e,t,i,r)}function kV(e,t,n,r){let i=e[t.start],a=e[t.end-1];AV(e,t.start+ +(i==="`"||i===`}`),t.end-(a==="`"?1:a===`{`?2:0),n,r)}function AV(e,t,n,r,i){t<n&&r!==e.slice(t,n)&&i.overwrite(t,n,r)}function jV(e,t){let n=ju(e),r=e;return n.forEach(e=>{let n=t.get(e);n!==void 0&&(r=r.replace(e,n))}),r===e?void 0:r}function MV(e,t){let n=t.get(e);if(n!==void 0)return n??void 0;let r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Map;e.forEach(e=>{let t=Xu(e,{map:Fu});t===e||NV(e)||(i.set(e,t),r.add(RegExp.escape(e)),r.add(RegExp.escape(FV(e))))});let a=r.size>0?{pattern:new RegExp([...r].join(`|`)),replacements:i}:null;return t.set(e,a),a??void 0}function NV(e){if(e.startsWith(`//`)||e.startsWith(`http://`)||e.startsWith(`https://`))return!0;let t=e.indexOf(`/`);return t<=0||e.includes(`[`)||e.includes(`]`)||e.includes(`:`)?!1:!e.slice(0,t).includes(`-`)}function PV(e){return e.type===`Literal`&&typeof e.value==`string`}function FV(e){return e.replaceAll(/[\n\r"'\\\u2028\u2029]/g,e=>{switch(e){case`
2889
2889
  `:return`\\n`;case`\r`:return`\\r`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`}return`\\${e}`})}async function IV(e,t){if(!t.minify)return e;let{transform:n}=await import(`lightningcss`);return n({filename:t.filename,code:Buffer.from(e),minify:!0}).code.toString()}const LV=[`direct`,`inline`,`inline-css`,`raw`,`style-attr`,`transform-only`,`url`],RV=/(@(?:import|reference)\s+(?:url\(\s*)?)(['"])tailwindcss\2(?=\s*\)?(?:\s|;|$))/g,zV=o(n.join(Ne,`index.css`));function BV(e,t){let n,r=t,i,a,o=/* @__PURE__ */ new Map,s,c=e=>{o.forEach((t,n)=>{t.tailwind?.dependencies.has(e)&&o.set(n,{css:t.css,tailwind:{...t.tailwind,invalidated:!0}})})};return{name:`vpt:mini-styles`,config:{order:`post`,handler(e){return n=e.build?.cssMinify,{build:{cssMinify:!1}}}},configResolved(t){n??=!!t.build.minify,i=VV({filename:e.styles.globalFileName,minify:n}),Cu(t.plugins.find(e=>e.name===`vite:css-post`),e=>async function(t,n,r){let i=await e.call(this,t,n,r);if(KV(n)){let e=Ee(n);o.set(e,{css:t,tailwind:o.get(e)?.tailwind})}return i})},async buildStart(){r=await Promise.all(t.map(async e=>(await this.resolve(e)).id)),a=this},transform:{filter:{id:/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/},order:`pre`,async handler(e,t){if(!KV(t))return;let n=Ee(t),r=o.get(n),i=r?.tailwind;if(!JV(e)){o.set(n,{css:r?.css,tailwind:void 0});return}let a=i?.invalidated?void 0:i,s=await WV(this.environment.config.root,n,e,a);return o.set(n,{css:r?.css,tailwind:s.root}),s.root.dependencies.forEach(e=>{this.addWatchFile(e)}),s.root.files.forEach(e=>{this.addWatchFile(e)}),{code:s.css,map:null}}},hotUpdate(e){c(Ee(e.file))},watchChange(e){c(Ee(e))},generateBundle:{order:`post`,async handler(t,n){let a=Object.values(n).filter(e=>e.type===`chunk`),s=await i(UV(r,o,this),a.map(e=>({code:e.code,filename:e.fileName})));a.forEach((e,t)=>{e.code=s.javaScript[t],e.map=null}),Object.entries(n).forEach(([e,t])=>{YV(t)&&delete n[e]}),this.emitFile({type:`asset`,fileName:e.styles.globalFileName,source:s.stylesheet})}},closeBundle(){this.environment.config.command===`build`&&o.clear()},closeWatcher(){o.clear()},finalizeUpdate:async(e,t)=>{let n=e.map(e=>({code:qV(e.code),filename:e.filename})),c=await i(UV(r,o,a),n);return c.stylesheet!==s&&(await t(c.stylesheet),s=c.stylesheet),e.map((e,t)=>({...e,code:c.javaScript[t]}))}}}function VV(e){let t=wV(),n;return async function(r,i){let a=n&&HV(n.classSet,r.classSet)?n.classSet:r.classSet,o=n?.css===r.css?n.stylesheet:await IV(await t.transformStylesheet(r.css),e),s=i.map(e=>t.transformJavaScript({classSet:a,code:e.code,filename:e.filename}));return n={css:r.css,classSet:a,stylesheet:o},{javaScript:s,stylesheet:o}}}function HV(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function UV(e,t,n){let r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set,a=[],o=/* @__PURE__ */ new Set,s=e=>{if(r.has(e))return;r.add(e);let c=n.getModuleInfo(e);if(!c)return;c.importedIds.forEach(s),c.dynamicallyImportedIds.forEach(s);let l=Ee(e),u=t.get(l);u?.css===void 0||i.has(l)||(i.add(l),a.push(u.css),u.tailwind?.classSet.forEach(e=>{o.add(e)}))};return e.forEach(s),{classSet:o,css:a.join(`
2890
- `)}}async function WV(e,t,r,i){let a=i?.source===r,o=a?i.generator:du(await Su({projectRoot:e,cwd:Ne,cssSources:[{css:GV(r),base:n.dirname(t),file:t}]})),s=await o.generate({scanSources:!0});return{css:s.css,root:{source:r,classSet:s.classSet,dependencies:new Set(s.dependencies.map(Ee)),generator:o,files:a?i.files:new E({sources:s.sources}).files,invalidated:!1}}}function GV(e){return e.replace(RV,(e,t,n)=>`${t}${n}${zV}${n}`)}function KV(e){if(!a(e))return!1;let t=e.indexOf(`?`);if(t<0)return!0;let n=e.indexOf(`#`,t),r=e.slice(t+1,n<0?void 0:n),i=new URLSearchParams(r);return LV.every(e=>!i.has(e))}function qV(e){return e.replace(/(\b(?:const|let|var)\s+__vite__css[\w$]*\s*=\s*)"(?:\\[\s\S]|[^"\\])*"(?=;\s*\b__vite__updateStyle[\w$]*\s*\()/g,`$1""`)}function JV(e){return/@(?:import|reference)\s+(?:url\(\s*)?['"]tailwindcss(?:\/[^'"]*)?['"]/.test(e)}function YV(e){return e.type===`asset`&&/\.(?:acss|css|ttss|wxss)$/.test(e.fileName)}function XV(e,...t){for(let n of t)n!==void 0&&ZV(e,n);return e}function ZV(e,t){for(let n in t){let r=t[n],i=e[n];if(Array.isArray(i)&&Array.isArray(r)){e[n]=i.concat(r);continue}if($V(i)&&$V(r)){ZV(i,r);continue}e[n]=QV(r)}}function QV(e){if(Array.isArray(e)){let t=Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=QV(e[n]);return t}if($V(e)){let t={};return ZV(t,e),t}return e}function $V(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const eH=`custom-wrapper`;function tH(e,t){return{...st(e),...t.length>0?{subPackages:t}:{}}}function nH(e,t){let n=ot(e),r=fH(n.usingComponents)?n.usingComponents:{},i=fH(n.componentPlaceholder)?n.componentPlaceholder:{},a=Object.keys(t.componentPlaceholder).length>0;return{...n,usingComponents:{...r,...t.usingComponents,comp:lH(e.path,`comp`),[eH]:lH(e.path,eH)},...a?{componentPlaceholder:{...i,...t.componentPlaceholder}}:{}}}function rH(e){let t=Object.keys(e.componentPlaceholder).length>0;return{component:!0,styleIsolation:`apply-shared`,usingComponents:{...e.usingComponents,comp:`./comp`,[eH]:`./${eH}`},...t?{componentPlaceholder:e.componentPlaceholder}:{}}}function iH(e){return{usingComponents:Object.fromEntries(e.map(({name:e,componentPath:t})=>[e,t])),componentPlaceholder:Object.fromEntries(e.flatMap(({name:e,componentPath:t})=>Ji(t.slice(1))?[[e,`view`]]:[]))}}function aH(e,t,n){let r=(uH(e,t)?.renderedExports??[]).map(dH);return{includes:/* @__PURE__ */ new Set([`view`,`catch-view`,`static-view`,`pure-view`,`click-view`,`scroll-view`,`image`,`static-image`,`text`,`static-text`,`navigator`,`web-view`,`input`,`checkbox`,`radio`,`slot`,`form`,`video`,`canvas`,`label`,`textarea`,`progress`,`button`,...r.filter(e=>e!==eH)]),exclude:/* @__PURE__ */ new Set,thirdPartyComponents:new Map([[eH,/* @__PURE__ */ new Set],...n.map(e=>[e.name,new Set(e.fields)])]),includeAll:!1}}function oH(e,t,n){return sH(e,n?JSON.stringify(t):`${JSON.stringify(t,null,4)}\n`)}function sH(e,t){return{type:`asset`,fileName:e,source:t}}function cH(e,t,n,r){let i=e.indexOf(t),a=i===-1?-1:e.indexOf(t,i+t.length);if(i===-1||a!==-1)throw Error(`Expected one ${r}, found ${i===-1?0:`multiple`}`);return`${e.slice(0,i)}${n}${e.slice(i+t.length)}`}function lH(e,t){let r=n.posix.relative(n.posix.dirname(e),t);return r.startsWith(`.`)?r:`./${r}`}function uH(e,t){let n=Ee(t);for(let t of Object.values(e)){if(t.type!==`chunk`)continue;let e=Object.entries(t.modules).find(([e])=>Ee(e)===n);if(e)return e[1]}}function dH(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function fH(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const pH={wx:{"project.config.json":{setting:{compileHotReLoad:!1}},"project.private.config.json":{setting:{compileHotReLoad:!1}}},zfb:{"mini.project.json":{developOptions:{hotReload:!1}}},tt:{"project.config.json":{compileHotReload:!1,setting:{compileHotReLoad:!1}},"project.private.config.json":{setting:{compileHotReLoad:!1}}},h5:{}};function mH(e){let t=!1;return{name:`vpt:mini-watch`,enforce:`post`,apply:(e,{command:t})=>t===`build`&&!!e.build?.watch&&e.build?.write!==!1&&!e.build?.watch?.skipWrite,applyToEnvironment:$r,config(){return{build:{emptyOutDir:!1}}},configResolved({root:e,build:t}){bt(n.resolve(e,t.outDir))},buildStart(){t=!1},closeWatcher(){t=!0},generateBundle:{order:`post`,handler(t,n){for(let[t,r]of Object.entries(pH[e])){let e=n[t];if(e?.type===`asset`){let n=JSON.parse(String(e.source));Object.assign(e,oH(t,XV({},n,r),this.environment.config.isProduction))}}}},closeBundle:{order:`post`,sequential:!0,handler(e){if(e||t)return;let{root:r,build:i}=this.environment.config,a=n.resolve(r,i.outDir,`hmr`);m(a,{recursive:!0}),v(n.join(a,`watch.js`),`// ${S()}\n`)}}}}function hH(e){let t=ko(e),n=Xi(e.runtime.modules),r=BV(e,t.applicationEntryIds);return[n,r,gH(e,t,n),Di(),$i(e),ai(n),ei(e,r),mH(e.options.target)]}function gH(e,t,n){return{name:`vpt:mini`,config(){return{define:_H(e.taro.env),appType:`custom`,oxc:{target:Me},resolve:{alias:[{find:/^@tarojs\/plugin-framework-react\/dist\/runtime$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-framework-react/runtime`)},{find:/^@tarojs\/runtime$/,replacement:St},{find:/^@tarojs\/api$/,replacement:M.resolve(`vite-plugin-taro-runtime/api`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components$/,replacement:e.taro.componentsReactPath}]},build:{modulePreload:!1,cssCodeSplit:!1,assetsInlineLimit:0,target:Me,rolldownOptions:{input:t.input}}}},resolveId(e,n){return t.resolveId(e,n,this.environment.config.root)},transform:{order:`pre`,filter:{id:[e.runtime.modules.appCapsule,e.runtime.modules.pageCapsule].map(Te)},handler(e,n){return t.specialize(e,n,!!this.environment.config.build.sourcemap)}},renderChunk:{order:`post`,handler(t,r,i,a){let o=n.classifyChunk(r),s=!!i.sourcemap;switch(o){case`entry-capsule`:case`normal-capsule`:return qa(t,r,s);case`native`:case`amphibious`:return Ya({code:t,chunk:r,chunks:a.chunks,bootstrapModuleId:e.runtime.modules.bootstrap,getPhysicalChunkId:n.getPhysicalChunkId,classifyModule:n.classifyChunk,sourcemap:s})}}},generateBundle:{order:`post`,async handler(t,r){let i=n.getSubpackages();this.emitFile(ji({bundle:r,classifyModule:n.classifyChunk,getPackageLocation:n.getPackageLocation})),(await Ni({bundle:r,contract:e,subpackages:i,isProduction:this.environment.config.isProduction,getModuleInfo:e=>this.getModuleInfo(e),getPackageLocation:n.getPackageLocation})).forEach(e=>{this.emitFile(e)})}}}}function _H(e){let t=String(M(`vite-plugin-taro-runtime/taro/package.json`).version);return{"process.env.FRAMEWORK":JSON.stringify(`react`),"process.env.SUPPORT_TARO_POLYFILL":JSON.stringify(`disabled`),"process.env.TARO_ENV":JSON.stringify(e),"process.env.TARO_PLATFORM":JSON.stringify(`mini`),"process.env.TARO_VERSION":JSON.stringify(t),ENABLE_ADJACENT_HTML:`true`,ENABLE_CLONE_NODE:`true`,ENABLE_CONTAINS:`true`,ENABLE_INNER_HTML:`true`,ENABLE_MUTATION_OBSERVER:`true`,ENABLE_SIZE_APIS:`true`,ENABLE_TEMPLATE_CONTENT:`true`}}function vH(e,t){let n=`data="{{i:item}}"`;if(!e.includes(n))throw Error(`Recursive base templates must recurse through compact child data`);return`${cH(e.replaceAll(n,`data="{{i:item,p:p}}"`),`<custom-wrapper i="{{i}}"`,`<custom-wrapper i="{{i}}" p="{{p}}"`,`CustomWrapper Page-root bridge`)}
2890
+ `)}}async function WV(e,t,r,i){let a=i?.source===r,o=a?i.generator:du(await Su({projectRoot:e,cwd:Ne,cssSources:[{css:GV(r),base:n.dirname(t),file:t}]})),s=await o.generate({scanSources:!0});return{css:s.css,root:{source:r,classSet:s.classSet,dependencies:new Set(s.dependencies.map(Ee)),generator:o,files:a?i.files:new E({sources:s.sources}).files,invalidated:!1}}}function GV(e){return e.replace(RV,(e,t,n)=>`${t}${n}${zV}${n}`)}function KV(e){if(!a(e))return!1;let t=e.indexOf(`?`);if(t<0)return!0;let n=e.indexOf(`#`,t),r=e.slice(t+1,n<0?void 0:n),i=new URLSearchParams(r);return LV.every(e=>!i.has(e))}function qV(e){return e.replace(/(\b(?:const|let|var)\s+__vite__css[\w$]*\s*=\s*)"(?:\\[\s\S]|[^"\\])*"(?=;\s*\b__vite__updateStyle[\w$]*\s*\()/g,`$1""`)}function JV(e){return/@(?:import|reference)\s+(?:url\(\s*)?['"]tailwindcss(?:\/[^'"]*)?['"]/.test(e)}function YV(e){return e.type===`asset`&&/\.(?:acss|css|ttss|wxss)$/.test(e.fileName)}function XV(e,...t){for(let n of t)n!==void 0&&ZV(e,n);return e}function ZV(e,t){for(let n in t){let r=t[n],i=e[n];if(Array.isArray(i)&&Array.isArray(r)){e[n]=i.concat(r);continue}if($V(i)&&$V(r)){ZV(i,r);continue}e[n]=QV(r)}}function QV(e){if(Array.isArray(e)){let t=Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=QV(e[n]);return t}if($V(e)){let t={};return ZV(t,e),t}return e}function $V(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const eH=`custom-wrapper`;function tH(e,t){return{...st(e),...t.length>0?{subPackages:t}:{}}}function nH(e,t){let n=ot(e),r=fH(n.usingComponents)?n.usingComponents:{},i=fH(n.componentPlaceholder)?n.componentPlaceholder:{},a=Object.keys(t.componentPlaceholder).length>0;return{...n,usingComponents:{...r,...t.usingComponents,comp:lH(e.path,`comp`),[eH]:lH(e.path,eH)},...a?{componentPlaceholder:{...i,...t.componentPlaceholder}}:{}}}function rH(e){let t=Object.keys(e.componentPlaceholder).length>0;return{component:!0,styleIsolation:`apply-shared`,usingComponents:{...e.usingComponents,comp:`./comp`,[eH]:`./${eH}`},...t?{componentPlaceholder:e.componentPlaceholder}:{}}}function iH(e){return{usingComponents:Object.fromEntries(e.map(({name:e,componentPath:t})=>[e,t])),componentPlaceholder:Object.fromEntries(e.flatMap(({name:e,componentPath:t})=>Ji(t.slice(1))?[[e,`view`]]:[]))}}function aH(e,t,n){let r=(uH(e,t)?.renderedExports??[]).map(dH);return{includes:/* @__PURE__ */ new Set([`view`,`catch-view`,`static-view`,`pure-view`,`click-view`,`scroll-view`,`image`,`static-image`,`text`,`static-text`,`navigator`,`web-view`,`input`,`checkbox`,`radio`,`slot`,`form`,`video`,`canvas`,`label`,`textarea`,`progress`,`button`,...r.filter(e=>e!==eH)]),exclude:/* @__PURE__ */ new Set,thirdPartyComponents:new Map([[eH,/* @__PURE__ */ new Set],...n.map(e=>[e.name,new Set(e.fields)])]),includeAll:!1}}function oH(e,t,n){return sH(e,n?JSON.stringify(t):`${JSON.stringify(t,null,4)}\n`)}function sH(e,t){return{type:`asset`,fileName:e,source:t}}function cH(e,t,n,r){let i=e.indexOf(t),a=i===-1?-1:e.indexOf(t,i+t.length);if(i===-1||a!==-1)throw Error(`Expected one ${r}, found ${i===-1?0:`multiple`}`);return`${e.slice(0,i)}${n}${e.slice(i+t.length)}`}function lH(e,t){let r=n.posix.relative(n.posix.dirname(e),t);return r.startsWith(`.`)?r:`./${r}`}function uH(e,t){let n=Ee(t);for(let t of Object.values(e)){if(t.type!==`chunk`)continue;let e=Object.entries(t.modules).find(([e])=>Ee(e)===n);if(e)return e[1]}}function dH(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function fH(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const pH={wx:{"project.config.json":{setting:{compileHotReLoad:!1}},"project.private.config.json":{setting:{compileHotReLoad:!1}}},zfb:{"mini.project.json":{developOptions:{hotReload:!1}}},tt:{"project.config.json":{compileHotReload:!1,setting:{compileHotReLoad:!1}},"project.private.config.json":{setting:{compileHotReLoad:!1}}},h5:{}};function mH(e){let t=!1;return{name:`vpt:mini-watch`,enforce:`post`,apply:(e,{command:t})=>t===`build`&&!!e.build?.watch&&e.build?.write!==!1&&!e.build?.watch?.skipWrite,applyToEnvironment:$r,config(){return{build:{emptyOutDir:!1}}},configResolved({root:e,build:t}){bt(n.resolve(e,t.outDir),[])},buildStart(){t=!1},closeWatcher(){t=!0},generateBundle:{order:`post`,handler(t,n){for(let[t,r]of Object.entries(pH[e])){let e=n[t];if(e?.type===`asset`){let n=JSON.parse(String(e.source));Object.assign(e,oH(t,XV({},n,r),this.environment.config.isProduction))}}}},closeBundle:{order:`post`,sequential:!0,handler(e){if(e||t)return;let{root:r,build:i}=this.environment.config,a=n.resolve(r,i.outDir,`hmr`);m(a,{recursive:!0}),v(n.join(a,`watch.js`),`// ${S()}\n`)}}}}function hH(e){let t=ko(e),n=Xi(e.runtime.modules),r=BV(e,t.applicationEntryIds);return[n,r,gH(e,t,n),Di(),$i(e),ai(n),ei(e,r),mH(e.options.target)]}function gH(e,t,n){return{name:`vpt:mini`,config(){return{define:_H(e.taro.env),appType:`custom`,oxc:{target:Me},resolve:{alias:[{find:/^@tarojs\/plugin-framework-react\/dist\/runtime$/,replacement:M.resolve(`vite-plugin-taro-runtime/plugin-framework-react/runtime`)},{find:/^@tarojs\/runtime$/,replacement:St},{find:/^@tarojs\/api$/,replacement:M.resolve(`vite-plugin-taro-runtime/api`)},{find:/^(?:@tarojs|vite-plugin-taro-runtime)\/components$/,replacement:e.taro.componentsReactPath}]},build:{modulePreload:!1,cssCodeSplit:!1,assetsInlineLimit:0,target:Me,rolldownOptions:{input:t.input}}}},resolveId(e,n){return t.resolveId(e,n,this.environment.config.root)},transform:{order:`pre`,filter:{id:[e.runtime.modules.appCapsule,e.runtime.modules.pageCapsule].map(Te)},handler(e,n){return t.specialize(e,n,!!this.environment.config.build.sourcemap)}},renderChunk:{order:`post`,handler(t,r,i,a){let o=n.classifyChunk(r),s=!!i.sourcemap;switch(o){case`entry-capsule`:case`normal-capsule`:return qa(t,r,s);case`native`:case`amphibious`:return Ya({code:t,chunk:r,chunks:a.chunks,bootstrapModuleId:e.runtime.modules.bootstrap,getPhysicalChunkId:n.getPhysicalChunkId,classifyModule:n.classifyChunk,sourcemap:s})}}},generateBundle:{order:`post`,async handler(t,r){let i=n.getSubpackages();this.emitFile(ji({bundle:r,classifyModule:n.classifyChunk,getPackageLocation:n.getPackageLocation})),(await Ni({bundle:r,contract:e,subpackages:i,isProduction:this.environment.config.isProduction,getModuleInfo:e=>this.getModuleInfo(e),getPackageLocation:n.getPackageLocation})).forEach(e=>{this.emitFile(e)})}}}}function _H(e){let t=String(M(`vite-plugin-taro-runtime/taro/package.json`).version);return{"process.env.FRAMEWORK":JSON.stringify(`react`),"process.env.SUPPORT_TARO_POLYFILL":JSON.stringify(`disabled`),"process.env.TARO_ENV":JSON.stringify(e),"process.env.TARO_PLATFORM":JSON.stringify(`mini`),"process.env.TARO_VERSION":JSON.stringify(t),ENABLE_ADJACENT_HTML:`true`,ENABLE_CLONE_NODE:`true`,ENABLE_CONTAINS:`true`,ENABLE_INNER_HTML:`true`,ENABLE_MUTATION_OBSERVER:`true`,ENABLE_SIZE_APIS:`true`,ENABLE_TEMPLATE_CONTENT:`true`}}function vH(e,t){let n=`data="{{i:item}}"`;if(!e.includes(n))throw Error(`Recursive base templates must recurse through compact child data`);return`${cH(e.replaceAll(n,`data="{{i:item,p:p}}"`),`<custom-wrapper i="{{i}}"`,`<custom-wrapper i="{{i}}" p="{{p}}"`,`CustomWrapper Page-root bridge`)}
2891
2891
  <template name="tmpl_0_vpt_fragment">
2892
2892
  <template
2893
2893
  is="{{xs.a(0, item.nn)}}"
@@ -2899,12 +2899,12 @@ if(!g)return{postcssPlugin:tM};let y=(()=>{if(!p)return e=>nM(m.rootValue);let e
2899
2899
  <template name="tmpl_0_vpt_page_outlet">
2900
2900
  <template is="taro_tmpl" data="{{root:p}}" />
2901
2901
  </template>
2902
- `}function yH(e){return cH(e,`data="{{i:i}}"`,`data="{{i:i,p:p}}"`,`recursive component entry`)}function bH(e){return cH(e,`data="{{i:item}}"`,`data="{{i:item,p:p}}"`,`CustomWrapper recursion`)}var xH=class extends ae{supportXS=!0;Adapter={if:`tt:if`,else:`tt:else`,elseif:`tt:elif`,for:`tt:for`,forItem:`tt:for-item`,forIndex:`tt:for-index`,key:`tt:key`,xs:`sjs`,type:`tt`};replacePropName(e,t){if(t===`eh`){let t=e.toLowerCase();return t===`bindlongtap`?`bindlongpress`:t}return e}buildXsTemplate(e){return`<sjs module="xs" src="${e??`./utils`}.sjs" />`}};function SH(){let e=new xH;return e.mergeComponents({helper:{recursiveMerge:XV}},le),e}function CH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r,options:i,componentsModulePath:a}){let o=SH(),s=iH(n),c=rH(s),l=(e,t)=>oH(e,t,r);return[l(`app.json`,tH(i,t.map(({root:e})=>({root:e,pages:[],common:!0})))),sH(`base.ttml`,vH(o.buildTemplate(aH(e,a,n)),`tt`)),sH(`utils.sjs`,o.buildXScript()),sH(`comp.ttml`,yH(o.buildBaseComponentTemplate(`.ttml`))),l(`comp.json`,c),sH(`custom-wrapper.ttml`,bH(o.buildCustomComponentTemplate(`.ttml`))),l(`custom-wrapper.json`,c),...i.pages.flatMap(e=>[l(`${e.path}.json`,nH(e,s)),sH(`${e.path}.ttml`,cH(o.buildPageTemplate(lH(e.path,`base.ttml`),{content:ot(e),path:e.path}),`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}" p="{{page}}" />`,`TT Page template entry`)),sH(`${e.path}.ttss`,``)]),l(`project.config.json`,i.projectConfigJson),...i.projectPrivateConfigJson?[l(`project.private.config.json`,i.projectPrivateConfigJson)]:[]]}function wH(e){return hH(TH(e))}function TH(e){let t=M.resolve(`vite-plugin-taro-runtime/plugin-platform-tt/components-react`);return{options:e,taro:{env:`tt`,componentsReactPath:t,targetRuntimePath:P(`tt/taro-runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`tt/dev/devtools-runtime`),interpreterHmrRuntime:P(`tt/dev/interpreter-runtime`)}},styles:{appFileName:`app.ttss`,globalFileName:`assets/global.ttss`},output:{generateProjectSkeleton(n){return CH({...n,options:e,componentsModulePath:t})}}}}var EH=class extends oe{supportXS=!0;Adapter={if:`wx:if`,else:`wx:else`,elseif:`wx:elif`,for:`wx:for`,forItem:`wx:for-item`,forIndex:`wx:for-index`,key:`wx:key`,xs:`wxs`,type:`weapp`};transferComponents={};constructor(){super(),this.nestElements.set(`root-portal`,3)}buildXsTemplate(e){return`<wxs module="xs" src="${e??`./utils`}.wxs" />`}createMiniComponents(e){let t=super.createMiniComponents(e);return this.transferComponents[`page-meta`]=t[`page-meta`],this.transferComponents[`navigation-bar`]=t[`navigation-bar`],delete t[`page-meta`],delete t[`navigation-bar`],t}replacePropName(e,t,n,r){if(t===`eh`){let t=e.toLowerCase();return t===`bindlongtap`&&n!==`canvas`?`bindlongpress`:t}return n===`share-element`&&t===`i.${r.mapkey}`?`key`:e}modifyTemplateResult=(e,t)=>t===`keyboard-accessory`?``:e;buildPageTemplate=(e,t)=>`<import src="${e}"/>${t?.content.enablePageMeta?this.buildPageMeta(e):``}
2902
+ `}function yH(e){return cH(e,`data="{{i:i}}"`,`data="{{i:i,p:p}}"`,`recursive component entry`)}function bH(e){return cH(e,`data="{{i:item}}"`,`data="{{i:item,p:p}}"`,`CustomWrapper recursion`)}var xH=class extends ae{supportXS=!0;Adapter={if:`tt:if`,else:`tt:else`,elseif:`tt:elif`,for:`tt:for`,forItem:`tt:for-item`,forIndex:`tt:for-index`,key:`tt:key`,xs:`sjs`,type:`tt`};replacePropName(e,t){if(t===`eh`){let t=e.toLowerCase();return t===`bindlongtap`?`bindlongpress`:t}return e}buildXsTemplate(e){return`<sjs module="xs" src="${e??`./utils`}.sjs" />`}};function SH(){let e=new xH;return e.mergeComponents({helper:{recursiveMerge:XV}},le),e}function CH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r},i){let{options:a,output:o,taro:s}=i,c=SH(),l=iH(n),u=rH(l),d=(e,t)=>oH(e,t,r);return[d(`app.json`,tH(a,t.map(({root:e})=>({root:e,pages:[],common:!0})))),sH(`base.ttml`,vH(c.buildTemplate(aH(e,s.componentsReactPath,n)),`tt`)),sH(`utils.sjs`,c.buildXScript()),sH(`comp.ttml`,yH(c.buildBaseComponentTemplate(`.ttml`))),d(`comp.json`,u),sH(`custom-wrapper.ttml`,bH(c.buildCustomComponentTemplate(`.ttml`))),d(`custom-wrapper.json`,u),...a.pages.flatMap(e=>[d(`${e.path}.json`,nH(e,l)),sH(`${e.path}.ttml`,cH(c.buildPageTemplate(lH(e.path,`base.ttml`),{content:ot(e),path:e.path}),`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}" p="{{page}}" />`,`TT Page template entry`)),sH(`${e.path}.ttss`,``)]),d(o.projectConfigFilename,a.projectConfigJson),...a.projectPrivateConfigJson?[d(o.projectPrivateConfigFilename,a.projectPrivateConfigJson)]:[]]}function wH(e){return hH(TH(e))}function TH(e){return{options:e,taro:{env:`tt`,componentsReactPath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-tt/components-react`),targetRuntimePath:P(`tt/taro-runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`tt/dev/devtools-runtime`),interpreterHmrRuntime:P(`tt/dev/interpreter-runtime`)}},styles:{appFileName:`app.ttss`,globalFileName:`assets/global.ttss`},output:{projectConfigFilename:`project.config.json`,projectPrivateConfigFilename:`project.private.config.json`,generateProjectSkeleton:CH}}}var EH=class extends oe{supportXS=!0;Adapter={if:`wx:if`,else:`wx:else`,elseif:`wx:elif`,for:`wx:for`,forItem:`wx:for-item`,forIndex:`wx:for-index`,key:`wx:key`,xs:`wxs`,type:`weapp`};transferComponents={};constructor(){super(),this.nestElements.set(`root-portal`,3)}buildXsTemplate(e){return`<wxs module="xs" src="${e??`./utils`}.wxs" />`}createMiniComponents(e){let t=super.createMiniComponents(e);return this.transferComponents[`page-meta`]=t[`page-meta`],this.transferComponents[`navigation-bar`]=t[`navigation-bar`],delete t[`page-meta`],delete t[`navigation-bar`],t}replacePropName(e,t,n,r){if(t===`eh`){let t=e.toLowerCase();return t===`bindlongtap`&&n!==`canvas`?`bindlongpress`:t}return n===`share-element`&&t===`i.${r.mapkey}`?`key`:e}modifyTemplateResult=(e,t)=>t===`keyboard-accessory`?``:e;buildPageTemplate=(e,t)=>`<import src="${e}"/>${t?.content.enablePageMeta?this.buildPageMeta(e):``}
2903
2903
  <template is="taro_tmpl" data="{{${this.dataKeymap(`root:root`)}}}" />`;buildPageMeta(e){let t=this.buildTransferredAttributes(`page-meta`,`pageMeta.`),n=this.buildTransferredAttributes(`navigation-bar`,`navigationBar.`);return`
2904
2904
  <wxs module="xs" src="${e.replace(`base.wxml`,`utils.wxs`)}" />
2905
2905
  <page-meta data-sid="{{pageMeta.sid}}" ${t}>
2906
2906
  <navigation-bar ${n}/>
2907
- </page-meta>`}buildTransferredAttributes(e,t){return Object.entries(this.transferComponents[e]).map(([e,n])=>`${e}="${n===`eh`?n:`{{${n.replace(`i.`,t)}}}`}" `).join(``)}};function DH(){let e=new EH;return e.mergeComponents({helper:{recursiveMerge:XV}},O),e.voidElements.add(`voip-room`),e.voidElements.add(`native-slot`),e.focusComponents.add(`editor`),e}function OH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r,options:i,componentsModulePath:a}){let o=DH(),s=iH(n),c=rH(s),l=(e,t)=>oH(e,t,r);return[l(`app.json`,tH(i,t.map(e=>jH(e.root)))),sH(`base.wxml`,kH(o.buildTemplate(aH(e,a,n)))),sH(`utils.wxs`,o.buildXScript()),sH(`comp.wxml`,o.buildBaseComponentTemplate(`.wxml`)),l(`comp.json`,c),sH(`custom-wrapper.wxml`,o.buildCustomComponentTemplate(`.wxml`)),l(`custom-wrapper.json`,c),...i.pages.flatMap(e=>[l(`${e.path}.json`,nH(e,s)),sH(`${e.path}.wxml`,AH(o.buildPageTemplate(lH(e.path,`base.wxml`),{content:ot(e),path:e.path}))),sH(`${e.path}.wxss`,``)]),l(`project.config.json`,i.projectConfigJson),...i.projectPrivateConfigJson?[l(`project.private.config.json`,i.projectPrivateConfigJson)]:[],...i.sitemapJson?[l(`sitemap.json`,i.sitemapJson)]:[]]}function kH(e){return`${cH(e,`<comp i="{{i}}" l="{{l}}" />`,`<comp i="{{i}}" l="{{l}}"><slot wx:if="{{i.vo}}" /></comp>`,`recursive comp call`)}
2907
+ </page-meta>`}buildTransferredAttributes(e,t){return Object.entries(this.transferComponents[e]).map(([e,n])=>`${e}="${n===`eh`?n:`{{${n.replace(`i.`,t)}}}`}" `).join(``)}};function DH(){let e=new EH;return e.mergeComponents({helper:{recursiveMerge:XV}},O),e.voidElements.add(`voip-room`),e.voidElements.add(`native-slot`),e.focusComponents.add(`editor`),e}function OH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r},i){let{options:a,output:o,taro:s}=i,c=DH(),l=iH(n),u=rH(l),d=(e,t)=>oH(e,t,r);return[d(`app.json`,tH(a,t.map(e=>jH(e.root)))),sH(`base.wxml`,kH(c.buildTemplate(aH(e,s.componentsReactPath,n)))),sH(`utils.wxs`,c.buildXScript()),sH(`comp.wxml`,c.buildBaseComponentTemplate(`.wxml`)),d(`comp.json`,u),sH(`custom-wrapper.wxml`,c.buildCustomComponentTemplate(`.wxml`)),d(`custom-wrapper.json`,u),...a.pages.flatMap(e=>[d(`${e.path}.json`,nH(e,l)),sH(`${e.path}.wxml`,AH(c.buildPageTemplate(lH(e.path,`base.wxml`),{content:ot(e),path:e.path}))),sH(`${e.path}.wxss`,``)]),d(o.projectConfigFilename,a.projectConfigJson),...a.projectPrivateConfigJson?[d(o.projectPrivateConfigFilename,a.projectPrivateConfigJson)]:[],...a.sitemapJson?[d(`sitemap.json`,a.sitemapJson)]:[]]}function kH(e){return`${cH(e,`<comp i="{{i}}" l="{{l}}" />`,`<comp i="{{i}}" l="{{l}}"><slot wx:if="{{i.vo}}" /></comp>`,`recursive comp call`)}
2908
2908
  <template name="tmpl_0_vpt_fragment">
2909
2909
  <template
2910
2910
  is="{{xs.a(0, item.nn, '')}}"
@@ -2914,7 +2914,7 @@ if(!g)return{postcssPlugin:tM};let y=(()=>{if(!p)return e=>nM(m.rootValue);let e
2914
2914
  />
2915
2915
  </template>
2916
2916
  <template name="tmpl_0_vpt_page_outlet"><slot /></template>
2917
- `}function AH(e){return cH(e,`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}"><template is="taro_tmpl" data="{{root:page}}" /></comp>`,`Page template entry`)}function jH(e){return{name:e.slice(e.lastIndexOf(`/`)+1),root:e,pages:[]}}function MH(e){return hH(NH(e))}function NH(e){let t=M.resolve(`vite-plugin-taro-runtime/plugin-platform-weapp/components-react`);return{options:e,taro:{env:`weapp`,componentsReactPath:t,targetRuntimePath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-weapp/runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`wx/dev/devtools-runtime`),interpreterHmrRuntime:P(`wx/dev/interpreter-runtime`)}},styles:{appFileName:`app.wxss`,globalFileName:`assets/global.wxss`},output:{generateProjectSkeleton(n){return OH({...n,options:e,componentsModulePath:t})}}}}var PH=class extends ae{exportExpr=`export default`;supportXS=!0;isXMLSupportRecursiveReference=!1;Adapter={if:`a:if`,else:`a:else`,elseif:`a:elif`,for:`a:for`,forItem:`a:for-item`,forIndex:`a:for-index`,key:`a:key`,xs:`sjs`,type:`alipay`};transferComponents={};constructor(){super(),this.nestElements.set(`root-portal`,3)}buildXsTemplate(e){return`<import-sjs name="xs" from="${e??`./utils`}.sjs" />`}replacePropName(e,t,n,r){return t===`eh`?e.replace(`bind`,`on`):n===`map`&&t.includes(r.polygons)?`polygon`:e}getClickEvent(){return{onTap:`eh`}}getEvents(){return{onTap:`eh`,onTouchMove:`eh`,onTouchEnd:`eh`,onTouchCancel:`eh`,onLongTap:`eh`}}buildThirdPartyAttr(e){return[...e].map(e=>e.startsWith(`@`)?`on${se(e.slice(1))}="eh" `:e.startsWith(`bind`)||e.startsWith(`on`)?`${e}="eh" `:` ${e}="{{ i.${ce(e)} }}" `).join(``)}createMiniComponents(e){let t=super.createMiniComponents(e);return delete t.slot,delete t[`slot-view`],delete t[`native-slot`],this.transferComponents[`page-meta`]=t[`page-meta`],delete t[`page-meta`],t}modifyLoopBody=e=>e;modifyLoopContainer=(e,t)=>t===`picker`?`
2917
+ `}function AH(e){return cH(e,`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}"><template is="taro_tmpl" data="{{root:page}}" /></comp>`,`Page template entry`)}function jH(e){return{name:e.slice(e.lastIndexOf(`/`)+1),root:e,pages:[]}}function MH(e){return hH(NH(e))}function NH(e){return{options:e,taro:{env:`weapp`,componentsReactPath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-weapp/components-react`),targetRuntimePath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-weapp/runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`wx/dev/devtools-runtime`),interpreterHmrRuntime:P(`wx/dev/interpreter-runtime`)}},styles:{appFileName:`app.wxss`,globalFileName:`assets/global.wxss`},output:{projectConfigFilename:`project.config.json`,projectPrivateConfigFilename:`project.private.config.json`,generateProjectSkeleton:OH}}}var PH=class extends ae{exportExpr=`export default`;supportXS=!0;isXMLSupportRecursiveReference=!1;Adapter={if:`a:if`,else:`a:else`,elseif:`a:elif`,for:`a:for`,forItem:`a:for-item`,forIndex:`a:for-index`,key:`a:key`,xs:`sjs`,type:`alipay`};transferComponents={};constructor(){super(),this.nestElements.set(`root-portal`,3)}buildXsTemplate(e){return`<import-sjs name="xs" from="${e??`./utils`}.sjs" />`}replacePropName(e,t,n,r){return t===`eh`?e.replace(`bind`,`on`):n===`map`&&t.includes(r.polygons)?`polygon`:e}getClickEvent(){return{onTap:`eh`}}getEvents(){return{onTap:`eh`,onTouchMove:`eh`,onTouchEnd:`eh`,onTouchCancel:`eh`,onLongTap:`eh`}}buildThirdPartyAttr(e){return[...e].map(e=>e.startsWith(`@`)?`on${se(e.slice(1))}="eh" `:e.startsWith(`bind`)||e.startsWith(`on`)?`${e}="eh" `:` ${e}="{{ i.${ce(e)} }}" `).join(``)}createMiniComponents(e){let t=super.createMiniComponents(e);return delete t.slot,delete t[`slot-view`],delete t[`native-slot`],this.transferComponents[`page-meta`]=t[`page-meta`],delete t[`page-meta`],t}modifyLoopBody=e=>e;modifyLoopContainer=(e,t)=>t===`picker`?`
2918
2918
  <view>${e}</view>
2919
2919
  `:t===`swiper`?`
2920
2920
  <block a:for="{{xs.f(i.cn)}}" a:key="sid">
@@ -2934,4 +2934,4 @@ if(!g)return{postcssPlugin:tM};let y=(()=>{if(!p)return e=>nM(m.rootValue);let e
2934
2934
  }`}buildPageTemplate=(e,t)=>`<import src="${e}"/>${t?.content.enablePageMeta?this.buildPageMeta(e):``}
2935
2935
  <template is="taro_tmpl" data="{{${this.dataKeymap(`root:root`)}}}" />`;buildPageMeta(e){let t=this.buildTransferredAttributes(`page-meta`,`pageMeta.`);return`
2936
2936
  <import-sjs name="xs" from="${e.replace(`base.axml`,`utils.sjs`)}" />
2937
- <page-meta data-sid="{{pageMeta.sid}}" ${t}></page-meta>`}buildTransferredAttributes(e,t){return Object.entries(this.transferComponents[e]).map(([e,n])=>`${e}="${n===`eh`?n:`{{${n.replace(`i.`,t)}}}`}" `).join(``)}};function FH(){let e=new PH;return e.mergeComponents({helper:{recursiveMerge:XV}},ue),delete e.internalComponents.Slider[`block-size`],delete e.internalComponents.Slider[`block-color`],delete e.internalComponents.Swiper.bindAnimationFinish,e}function IH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r,options:i,componentsModulePath:a}){let o=FH(),s=aH(e,a,n),c=iH(n),l=rH(c),u=LH(o.buildTemplate(s)),d=yH(o.buildBaseComponentTemplate(`.axml`)),f=bH(o.buildCustomComponentTemplate(`.axml`)),p=t.map(e=>zH(e.root)),m=(e,t)=>oH(e,t,r);return[m(`app.json`,tH(i,p)),sH(`base.axml`,u),sH(`utils.sjs`,o.buildXScript()),sH(`comp.axml`,d),m(`comp.json`,l),sH(`custom-wrapper.axml`,f),m(`custom-wrapper.json`,l),...i.pages.flatMap(e=>{let t=lH(e.path,`base.axml`),n=o.buildPageTemplate(t,{content:ot(e),path:e.path});return[m(`${e.path}.json`,nH(e,c)),sH(`${e.path}.axml`,RH({source:n,baseTemplatePath:t})),sH(`${e.path}.acss`,``)]}),m(`mini.project.json`,i.projectConfigJson),...i.projectPrivateConfigJson?[m(`.mini-ide/project-ide.json`,i.projectPrivateConfigJson)]:[],sH(`.browserslistrc`,`defaults and fully supports es6-module`)]}function LH(e){return vH(e,`a`)}function RH({source:e,baseTemplatePath:t}){return cH(cH(e,`<import src="${t}"/>`,``,`Alipay Page base import`),`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}" p="{{page}}" />`,`Alipay Page template entry`)}function zH(e){return{root:e,pages:[]}}function BH(e){return hH(VH(e))}function VH(e){let t=M.resolve(`vite-plugin-taro-runtime/plugin-platform-alipay/components-react`);return{options:e,taro:{env:`alipay`,componentsReactPath:t,targetRuntimePath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-alipay/runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`zfb/dev/devtools-runtime`),interpreterHmrRuntime:P(`zfb/dev/interpreter-runtime`)}},styles:{appFileName:`app.acss`,globalFileName:`assets/global.acss`},output:{generateProjectSkeleton(n){return IH({...n,options:e,componentsModulePath:t})}}}}const HH=M(`vite-plugin-taro/package.json`),UH=HH.peerDependencies.vite,WH=HH.dependencies.rolldown;function GH(){KH(l,s)}function KH(e,t){if(e!==UH)throw Error(`vpt requires vite@${UH}, but found vite@${e}.`);if(t!==WH)throw Error(`vpt requires rolldown@${WH}, but found rolldown@${t}.`)}function qH(e){return GH(),[Oe(e.target),xe(e.target),...t(),...e.target===`wx`?MH(e):[],...e.target===`zfb`?BH(e):[],...e.target===`tt`?wH(e):[],...e.target===`h5`?mt(e):[]]}export{qH as default};
2937
+ <page-meta data-sid="{{pageMeta.sid}}" ${t}></page-meta>`}buildTransferredAttributes(e,t){return Object.entries(this.transferComponents[e]).map(([e,n])=>`${e}="${n===`eh`?n:`{{${n.replace(`i.`,t)}}}`}" `).join(``)}};function FH(){let e=new PH;return e.mergeComponents({helper:{recursiveMerge:XV}},ue),delete e.internalComponents.Slider[`block-size`],delete e.internalComponents.Slider[`block-color`],delete e.internalComponents.Swiper.bindAnimationFinish,e}function IH({bundle:e,subpackages:t,nativeComponents:n,isProduction:r},i){let{options:a,output:o,taro:s}=i,c=FH(),l=aH(e,s.componentsReactPath,n),u=iH(n),d=rH(u),f=LH(c.buildTemplate(l)),p=yH(c.buildBaseComponentTemplate(`.axml`)),m=bH(c.buildCustomComponentTemplate(`.axml`)),h=t.map(e=>zH(e.root)),g=(e,t)=>oH(e,t,r);return[g(`app.json`,tH(a,h)),sH(`base.axml`,f),sH(`utils.sjs`,c.buildXScript()),sH(`comp.axml`,p),g(`comp.json`,d),sH(`custom-wrapper.axml`,m),g(`custom-wrapper.json`,d),...a.pages.flatMap(e=>{let t=lH(e.path,`base.axml`),n=c.buildPageTemplate(t,{content:ot(e),path:e.path});return[g(`${e.path}.json`,nH(e,u)),sH(`${e.path}.axml`,RH({source:n,baseTemplatePath:t})),sH(`${e.path}.acss`,``)]}),g(o.projectConfigFilename,a.projectConfigJson),...a.projectPrivateConfigJson?[g(o.projectPrivateConfigFilename,a.projectPrivateConfigJson)]:[],sH(`.browserslistrc`,`defaults and fully supports es6-module`)]}function LH(e){return vH(e,`a`)}function RH({source:e,baseTemplatePath:t}){return cH(cH(e,`<import src="${t}"/>`,``,`Alipay Page base import`),`<template is="taro_tmpl" data="{{root:root}}" />`,`<comp i="{{app}}" p="{{page}}" />`,`Alipay Page template entry`)}function zH(e){return{root:e,pages:[]}}function BH(e){return hH(VH(e))}function VH(e){return{options:e,taro:{env:`alipay`,componentsReactPath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-alipay/components-react`),targetRuntimePath:M.resolve(`vite-plugin-taro-runtime/plugin-platform-alipay/runtime`)},runtime:{modules:{bootstrap:P(`mini/amphibious/bootstrap`),appShell:P(`mini/native/app`),appCapsule:P(`mini/capsule/app`),componentShell:P(`mini/native/component`),componentCapsule:P(`mini/capsule/component`),customWrapperShell:P(`mini/native/custom-wrapper`),pageShell:P(`mini/native/page`),pageCapsule:P(`mini/capsule/page`),devtoolsHmrRuntime:P(`zfb/dev/devtools-runtime`),interpreterHmrRuntime:P(`zfb/dev/interpreter-runtime`)}},styles:{appFileName:`app.acss`,globalFileName:`assets/global.acss`},output:{projectConfigFilename:`mini.project.json`,projectPrivateConfigFilename:`.mini-ide/project-ide.json`,generateProjectSkeleton:IH}}}const HH=M(`vite-plugin-taro/package.json`),UH=HH.peerDependencies.vite,WH=HH.dependencies.rolldown;function GH(){KH(l,s)}function KH(e,t){if(e!==UH)throw Error(`vpt requires vite@${UH}, but found vite@${e}.`);if(t!==WH)throw Error(`vpt requires rolldown@${WH}, but found rolldown@${t}.`)}function qH(e){return GH(),[Oe(e.target),xe(e.target),...t(),...e.target===`wx`?MH(e):[],...e.target===`zfb`?BH(e):[],...e.target===`tt`?wH(e):[],...e.target===`h5`?mt(e):[]]}export{qH as default};
@@ -12,7 +12,7 @@ export declare function isMiniClientEnvironment(environment: Readonly<{
12
12
  * The shared style pipeline already owns the resolver's ordered App/Page cascade policy, so the host does not reconstruct it
13
13
  * from unrelated Rolldown shell and bootstrap entries.
14
14
  */
15
- export declare function createMiniDevelopmentPlugin(contract: Pick<MiniContract, 'options' | 'runtime' | 'styles'>, styles: MiniStylePlugin): PluginOption[];
15
+ export declare function createMiniDevelopmentPlugin(contract: MiniContract, styles: MiniStylePlugin): PluginOption[];
16
16
  /**
17
17
  * Transfers development ownership of the App stylesheet from complete output to the dev host.
18
18
  *
@@ -25,8 +25,8 @@ export declare function createMiniDevelopmentPlugin(contract: Pick<MiniContract,
25
25
  * rebuild-mode transaction has completed;
26
26
  * 3. let the host replace the wrapper again with the new marker, causing a second App reload.
27
27
  *
28
- * Deleting the in-memory bundle entry avoids both premature writes. Startup cleanup removes all physical files; live recovery
29
- * builds do not clean, so their prior App stylesheet remains available. The host publishes the stylesheet once afterward.
28
+ * Deleting the in-memory bundle entry avoids both premature writes. Startup cleanup retains DevTools project configuration
29
+ * but removes the prior physical App stylesheet; recovery builds do not clean. The host publishes the stylesheet once afterward.
30
30
  * Patch modes first reset delivery and publish matching `hmr/info.js`; rebuild mode has no patch state and writes a fresh marker
31
31
  * directly. Incremental HMR never enters this complete-output hook and changes only the imported global stylesheet; rewriting
32
32
  * the App root would reload the heap while a JavaScript patch is awaiting acknowledgement. The serve-only plugin leaves
@@ -45,9 +45,11 @@ export type MiniProjectSkeletonInput = Readonly<{
45
45
  nativeComponents: readonly MiniNativeComponentRegistration[];
46
46
  isProduction: boolean;
47
47
  }>;
48
- /** One target-owned native project-skeleton generator. */
48
+ /** Target-owned native project filenames and project-skeleton generator. */
49
49
  export type OutputContract = {
50
- generateProjectSkeleton(input: MiniProjectSkeletonInput): Rolldown.EmittedAsset[];
50
+ projectConfigFilename: string;
51
+ projectPrivateConfigFilename: string;
52
+ generateProjectSkeleton(input: MiniProjectSkeletonInput, contract: MiniContract): Rolldown.EmittedAsset[];
51
53
  };
52
54
  /** Complete input consumed by the shared Mini Program pipeline. */
53
55
  export type MiniContract = {
@@ -5,7 +5,7 @@ export declare const miniRuntimeId: string;
5
5
  export declare const rolldownRuntimeId = "\0rolldown/runtime.js";
6
6
  /** Identifies the virtual binding shared by native files, SystemJS capsules and HMR factories. */
7
7
  export declare const vptGlobalBindingId = "\0vpt:global-binding";
8
- /** Generates the selected core-js imports as one independently executable output entry. */
8
+ /** Generates the selected core-js imports loaded by bootstrap from the native polyfill chunk. */
9
9
  export declare const miniPolyfillsId = "\0vpt:mini-polyfills";
10
10
  /** External bootstrap dependency emitted only after the bundled graph is finalized. */
11
11
  export declare const miniTransportId = "\0vpt:mini-transport";
@@ -4,7 +4,7 @@ import type { GeneratedSubpackage, PackageLocation } from '../placer/placement.t
4
4
  /** Creates every compiler-owned Mini Program file derived from the final Rolldown bundle. */
5
5
  export declare function createOutputFiles({ bundle, contract, subpackages, isProduction, getModuleInfo, getPackageLocation }: {
6
6
  bundle: Rolldown.OutputBundle;
7
- contract: Pick<MiniContract, 'output' | 'styles'>;
7
+ contract: MiniContract;
8
8
  subpackages: readonly GeneratedSubpackage[];
9
9
  isProduction: boolean;
10
10
  getModuleInfo: (moduleId: string) => {
@@ -1,14 +1,8 @@
1
1
  import type { Rolldown } from 'vite';
2
- import type { VptOptions } from '../../../options.ts';
3
- import type { MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
4
- type TtSkeletonInput = MiniProjectSkeletonInput & Readonly<{
5
- options: VptOptions;
6
- componentsModulePath: string;
7
- }>;
2
+ import type { MiniContract, MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
8
3
  /**
9
4
  * TT supports recursive named templates. Like Alipay, its App host carries the independent Page root as p through each
10
5
  * template scope and CustomWrapper boundary. The TT runtime declares p as a native property on both generated components.
11
6
  * This preserves the App → Page React tree without copying Page nodes into the shared App projection or adding layout nodes.
12
7
  */
13
- export declare function createTtSkeleton({ bundle, subpackages, nativeComponents, isProduction, options, componentsModulePath }: TtSkeletonInput): Rolldown.EmittedAsset[];
14
- export {};
8
+ export declare function createTtSkeleton({ bundle, subpackages, nativeComponents, isProduction }: MiniProjectSkeletonInput, contract: MiniContract): Rolldown.EmittedAsset[];
@@ -1,10 +1,5 @@
1
1
  import type { Rolldown } from 'vite';
2
- import type { VptOptions } from '../../../options.ts';
3
- import type { MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
4
- type WxSkeletonInput = MiniProjectSkeletonInput & Readonly<{
5
- options: VptOptions;
6
- componentsModulePath: string;
7
- }>;
2
+ import type { MiniContract, MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
8
3
  /**
9
4
  * Generates the WX templates that project one React ownership tree through two native Page data roots.
10
5
  *
@@ -53,5 +48,4 @@ type WxSkeletonInput = MiniProjectSkeletonInput & Readonly<{
53
48
  * Page root mutates the in-memory outlet but does not serialize that root into App data. A newly pushed native Page receives the
54
49
  * current complete App snapshot with its initial Page batch; retained and hidden Pages need no navigation synchronization.
55
50
  */
56
- export declare function createWxSkeleton({ bundle, subpackages, nativeComponents, isProduction, options, componentsModulePath }: WxSkeletonInput): Rolldown.EmittedAsset[];
57
- export {};
51
+ export declare function createWxSkeleton({ bundle, subpackages, nativeComponents, isProduction }: MiniProjectSkeletonInput, contract: MiniContract): Rolldown.EmittedAsset[];
@@ -1,10 +1,5 @@
1
1
  import type { Rolldown } from 'vite';
2
- import type { VptOptions } from '../../../options.ts';
3
- import type { MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
4
- type ZfbSkeletonInput = MiniProjectSkeletonInput & Readonly<{
5
- options: VptOptions;
6
- componentsModulePath: string;
7
- }>;
2
+ import type { MiniContract, MiniProjectSkeletonInput } from '../mini/mini-contract.ts';
8
3
  /**
9
4
  * Generates the Alipay templates that project one React ownership tree through two independent native Page data roots.
10
5
  *
@@ -53,7 +48,6 @@ type ZfbSkeletonInput = MiniProjectSkeletonInput & Readonly<{
53
48
  * declaration, but accepts an empty array and still packages the files beneath that root. Keeping `pages: []` preserves the real
54
49
  * model: no synthetic Page, native lifecycle, route, or template exists merely to make code eligible for asynchronous loading.
55
50
  */
56
- export declare function createZfbSkeleton({ bundle, subpackages, nativeComponents, isProduction, options, componentsModulePath }: ZfbSkeletonInput): Rolldown.EmittedAsset[];
51
+ export declare function createZfbSkeleton({ bundle, subpackages, nativeComponents, isProduction }: MiniProjectSkeletonInput, contract: MiniContract): Rolldown.EmittedAsset[];
57
52
  /** Adds Alipay's transparent App collection and threads the independent Page root through every recursive data scope. */
58
53
  export declare function buildZfbBaseTemplate(source: string): string;
59
- export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * WeChat DevTools can retain stale file contents when output directories are deleted and recreated.
3
- * Preserve every directory so its watcher stays attached, but unlink every file to invalidate cached contents.
3
+ * Preserve every directory so its watcher stays attached, retain caller-owned project files, and unlink the rest.
4
4
  */
5
- export declare function cleanOutputFiles(directory: string): void;
5
+ export declare function cleanOutputFiles(directory: string, preservedRelativePaths: readonly string[]): void;
package/dist/options.d.ts CHANGED
@@ -102,7 +102,7 @@ export interface VptOptions {
102
102
  *
103
103
  * Use core-js module names without the `core-js/modules/` prefix or `.js` suffix; no separate core-js installation is needed.
104
104
  * For example, `web.url` provides `URL` and `URLSearchParams`, while `es.array.at` provides `Array.prototype.at`.
105
- * On WX, use `globalThis.URL` or add `define: { URL: 'globalThis.URL' }` to your Vite config for bare `URL` references.
105
+ * Installed APIs support both `globalThis` access and unshadowed bare identifiers on every mini target.
106
106
  *
107
107
  * Selected polyfills run before your app in development and production, updating global APIs and prototypes when needed.
108
108
  * Omit this option or use `[]` to add no optional polyfills. H5 ignores this option.
@@ -27,6 +27,10 @@ function getGlobalThis() {
27
27
  configurable: true
28
28
  });
29
29
  resolved = __vpt_global__;
30
+ if (!resolved) {
31
+ console.error('Unable to resolve globalThis, might in strict mode');
32
+ resolved = getOrCreateFakeGlobal();
33
+ }
30
34
  }
31
35
  catch (cause) {
32
36
  console.error('Unable to resolve globalThis', cause);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-taro",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "author": "sep2",
5
5
  "description": "Vite 8 plugin for building one React/Taro codebase for WeChat, Alipay, TikTok, and H5 targets.",
6
6
  "type": "module",
@@ -67,7 +67,7 @@
67
67
  "rolldown": "1.2.9",
68
68
  "sval": "0.6.12",
69
69
  "tailwindcss": "^4.3.3",
70
- "vite-plugin-taro-runtime": "0.7.6"
70
+ "vite-plugin-taro-runtime": "0.7.8"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react": "^19.3.0",
@@ -91,6 +91,7 @@
91
91
  "c8": "^12.0.0",
92
92
  "oxc-walker": "1.1.1",
93
93
  "picocolors": "^1.1.1",
94
+ "postcss-pxtrans": "1.0.4",
94
95
  "rxjs": "^7.8.2",
95
96
  "typescript": "^7.0.2",
96
97
  "vite": "8.3.0"