Files
ComfyUI/custom_nodes/ComfyUI-Easy-Use/web_version/v2/assets/primeuix-CNMLIuxO.js
jaidaken f09734b0ee
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Add custom nodes, Civitai loras (LFS), and vast.ai setup script
Includes 30 custom nodes committed directly, 7 Civitai-exclusive
loras stored via Git LFS, and a setup script that installs all
dependencies and downloads HuggingFace-hosted models on vast.ai.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:56:42 +00:00

2 lines
26 KiB
JavaScript

var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,s=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;function o(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}function i(e,t,n=new WeakSet){if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;if(n.has(e)||n.has(t))return!1;n.add(e).add(t);let r,s,o,a=Array.isArray(e),l=Array.isArray(t);if(a&&l){if(s=e.length,s!=t.length)return!1;for(r=s;0!=r--;)if(!i(e[r],t[r],n))return!1;return!0}if(a!=l)return!1;let u=e instanceof Date,c=t instanceof Date;if(u!=c)return!1;if(u&&c)return e.getTime()==t.getTime();let d=e instanceof RegExp,h=t instanceof RegExp;if(d!=h)return!1;if(d&&h)return e.toString()==t.toString();let f=Object.keys(e);if(s=f.length,s!==Object.keys(t).length)return!1;for(r=s;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,f[r]))return!1;for(r=s;0!=r--;)if(o=f[r],!i(e[o],t[o],n))return!1;return!0}function a(e,t){return i(e,t)}function l(e){return!!(e&&e.constructor&&e.call&&e.apply)}function u(e){return!o(e)}function c(e,t){if(!e||!t)return null;try{const n=e[t];if(u(n))return n}catch(n){}if(Object.keys(e).length){if(l(t))return t(e);if(-1===t.indexOf("."))return e[t];{let n=t.split("."),r=e;for(let e=0,t=n.length;e<t;++e){if(null==r)return null;r=r[n[e]]}return r}}return null}function d(e,t,n){return n?c(e,n)===c(t,n):a(e,t)}function h(e,t){if(null!=e&&t&&t.length)for(let n of t)if(d(e,n))return!0;return!1}function f(e,t){let n=-1;if(u(e))try{n=e.findLastIndex(t)}catch(r){n=e.lastIndexOf([...e].reverse().find(t))}return n}function p(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||0!==Object.keys(e).length)}function m(e,...t){return l(e)?e(...t):e}function g(e,t=!0){return"string"==typeof e&&(t||""!==e)}function y(e){return g(e)?e.replace(/(-|_)/g,"").toLowerCase():e}function v(e,t="",n={}){const r=y(t).split("."),s=r.shift();return s?p(e)?v(m(e[Object.keys(e).find((e=>y(e)===s))||""],n),r.join("."),n):void 0:m(e,n)}function b(e,t=!0){return Array.isArray(e)&&(t||0!==e.length)}function S(e=""){return u(e)&&1===e.length&&!!e.match(/\S| /)}function x(e,t){if(t){const n=t.test(e);return t.lastIndex=0,n}return!1}function $(...e){const o=(e={},i={})=>{const a=((e,o)=>{for(var i in o||(o={}))n.call(o,i)&&s(e,i,o[i]);if(t)for(var i of t(o))r.call(o,i)&&s(e,i,o[i]);return e})({},e);return Object.keys(i).forEach((t=>{p(i[t])&&t in e&&p(e[t])?a[t]=o(e[t],i[t]):a[t]=i[t]})),a};return e.reduce(((e,t,n)=>0===n?t:o(e,t)),{})}function k(e){return e?e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":"):e}function w(e){if(e&&/[\xC0-\xFF\u0100-\u017E]/.test(e)){const t={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let n in t)e=e.replace(t[n],n)}return e}function C(e){return g(e,!1)?e[0].toUpperCase()+e.slice(1):e}function O(e){return g(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,((e,t)=>0===t?e:"-"+e.toLowerCase())).toLowerCase():e}function L(e){return g(e)?e.replace(/[A-Z]/g,((e,t)=>0===t?e:"."+e.toLowerCase())).toLowerCase():e}function E(){const e=new Map;return{on(t,n){let r=e.get(t);return r?r.push(n):r=[n],e.set(t,r),this},off(t,n){let r=e.get(t);return r&&r.splice(r.indexOf(n)>>>0,1),this},emit(t,n){let r=e.get(t);r&&r.slice().map((e=>{e(n)}))},clear(){e.clear()}}}var j=Object.defineProperty,N=Object.defineProperties,_=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,D=(e,t,n)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))P.call(t,n)&&D(e,n,t[n]);if(A)for(var n of A(t))T.call(t,n)&&D(e,n,t[n]);return e},R=(e,t)=>N(e,_(t)),B=(e,t)=>{var n={};for(var r in e)P.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&A)for(var r of A(e))t.indexOf(r)<0&&T.call(e,r)&&(n[r]=e[r]);return n},W=E();function V(e,t){b(e)?e.push(...t||[]):p(e)&&Object.assign(e,t)}function H(e="",t=""){return function(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}(`${g(e,!1)&&g(t,!1)?`${e}-`:e}${t}`)}function I(e="",t=""){return`--${H(e,t)}`}function M(e,t="",n="",r=[],s){if(g(e)){const t=/{([^}]*)}/g,o=e.trim();if(function(e=""){return((e.match(/{/g)||[]).length+(e.match(/}/g)||[]).length)%2!=0}(o))return;if(x(o,t)){const e=o.replaceAll(t,(e=>{const t=e.replace(/{|}/g,"").split(".").filter((e=>!r.some((t=>x(e,t)))));return`var(${I(n,O(t.join("-")))}${u(s)?`, ${s}`:""})`})),i=/(\d+\s+[\+\-\*\/]\s+\d+)/g,a=/var\([^)]+\)/g;return x(e.replace(a,"0"),i)?`calc(${e})`:e}return o}if(function(e){return u(e)&&!isNaN(e)}(e))return e}function z(e,t){return e?`${e}{${t}}`:""}var K=(...e)=>Z(U.getTheme(),...e),Z=(e={},t,n,r)=>{if(t){const{variable:s,options:i}=U.defaults||{},{prefix:a,transform:l}=(null==e?void 0:e.options)||i||{},u=x(t,/{([^}]*)}/g)?t:`{${t}}`;return"value"===r||o(r)&&"strict"===l?U.getTokenValue(t):M(u,void 0,a,[s.excludedKeyRegex],n)}return""};function q(e,t={}){const n=U.defaults.variable,{prefix:r=n.prefix,selector:s=n.selector,excludedKeyRegex:o=n.excludedKeyRegex}=t,i=(e,t="")=>Object.entries(e).reduce(((e,[n,s])=>{const a=x(n,o)?H(t):H(t,O(n)),l=function(e){return p(e)&&e.hasOwnProperty("value")&&e.hasOwnProperty("type")?e.value:e}(s);if(p(l)){const{variables:t,tokens:n}=i(l,a);V(e.tokens,n),V(e.variables,t)}else e.tokens.push((r?a.replace(`${r}-`,""):a).replaceAll("-",".")),function(e,t,n){g(t,!1)&&e.push(`${t}:${n};`)}(e.variables,I(a),M(l,a,r,[o]));return e}),{variables:[],tokens:[]}),{variables:a,tokens:l}=i(e,r);return{value:a,tokens:l,declarations:a.join(""),css:z(s,a.join(""))}}var Y={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve:e=>({type:"custom",selector:e,matched:!0})}},resolve(e){const t=Object.keys(this.rules).filter((e=>"custom"!==e)).map((e=>this.rules[e]));return[e].flat().map((e=>{var n;return null!=(n=t.map((t=>t.resolve(e))).find((e=>e.matched)))?n:this.rules.custom.resolve(e)}))}},_toVariables:(e,t)=>q(e,{prefix:null==t?void 0:t.prefix}),getCommon({name:e="",theme:t={},params:n,set:r,defaults:s}){var o,i,a,l,c,d,h;const{preset:f,options:p}=t;let g,y,v,b,S,x,$;if(u(f)&&"strict"!==p.transform){const{primitive:t,semantic:n,extend:k}=f,w=n||{},{colorScheme:C}=w,O=B(w,["colorScheme"]),L=k||{},{colorScheme:E}=L,j=B(L,["colorScheme"]),N=C||{},{dark:_}=N,A=B(N,["dark"]),P=E||{},{dark:T}=P,D=B(P,["dark"]),F=u(t)?this._toVariables({primitive:t},p):{},R=u(O)?this._toVariables({semantic:O},p):{},W=u(A)?this._toVariables({light:A},p):{},V=u(_)?this._toVariables({dark:_},p):{},H=u(j)?this._toVariables({semantic:j},p):{},I=u(D)?this._toVariables({light:D},p):{},M=u(T)?this._toVariables({dark:T},p):{},[z,Z]=[null!=(o=F.declarations)?o:"",F.tokens],[q,Y]=[null!=(i=R.declarations)?i:"",R.tokens||[]],[U,X]=[null!=(a=W.declarations)?a:"",W.tokens||[]],[J,G]=[null!=(l=V.declarations)?l:"",V.tokens||[]],[Q,ee]=[null!=(c=H.declarations)?c:"",H.tokens||[]],[te,ne]=[null!=(d=I.declarations)?d:"",I.tokens||[]],[re,se]=[null!=(h=M.declarations)?h:"",M.tokens||[]];g=this.transformCSS(e,z,"light","variable",p,r,s),y=Z;v=`${this.transformCSS(e,`${q}${U}`,"light","variable",p,r,s)}${this.transformCSS(e,`${J}`,"dark","variable",p,r,s)}`,b=[...new Set([...Y,...X,...G])];S=`${this.transformCSS(e,`${Q}${te}color-scheme:light`,"light","variable",p,r,s)}${this.transformCSS(e,`${re}color-scheme:dark`,"dark","variable",p,r,s)}`,x=[...new Set([...ee,...ne,...se])],$=m(f.css,{dt:K})}return{primitive:{css:g,tokens:y},semantic:{css:v,tokens:b},global:{css:S,tokens:x},style:$}},getPreset({name:e="",preset:t={},options:n,params:r,set:s,defaults:o,selector:i}){var a,l,c;let d,h,f;if(u(t)&&"strict"!==n.transform){const r=e.replace("-directive",""),p=t,{colorScheme:g,extend:y,css:v}=p,b=B(p,["colorScheme","extend","css"]),S=y||{},{colorScheme:x}=S,$=B(S,["colorScheme"]),k=g||{},{dark:w}=k,C=B(k,["dark"]),O=x||{},{dark:L}=O,E=B(O,["dark"]),j=u(b)?this._toVariables({[r]:F(F({},b),$)},n):{},N=u(C)?this._toVariables({[r]:F(F({},C),E)},n):{},_=u(w)?this._toVariables({[r]:F(F({},w),L)},n):{},[A,P]=[null!=(a=j.declarations)?a:"",j.tokens||[]],[T,D]=[null!=(l=N.declarations)?l:"",N.tokens||[]],[R,W]=[null!=(c=_.declarations)?c:"",_.tokens||[]];d=`${this.transformCSS(r,`${A}${T}`,"light","variable",n,s,o,i)}${this.transformCSS(r,R,"dark","variable",n,s,o,i)}`,h=[...new Set([...P,...D,...W])],f=m(v,{dt:K})}return{css:d,tokens:h,style:f}},getPresetC({name:e="",theme:t={},params:n,set:r,defaults:s}){var o;const{preset:i,options:a}=t,l=null==(o=null==i?void 0:i.components)?void 0:o[e];return this.getPreset({name:e,preset:l,options:a,params:n,set:r,defaults:s})},getPresetD({name:e="",theme:t={},params:n,set:r,defaults:s}){var o;const i=e.replace("-directive",""),{preset:a,options:l}=t,u=null==(o=null==a?void 0:a.directives)?void 0:o[i];return this.getPreset({name:i,preset:u,options:l,params:n,set:r,defaults:s})},applyDarkColorScheme:e=>!("none"===e.darkModeSelector||!1===e.darkModeSelector),getColorSchemeOption(e,t){var n;return this.applyDarkColorScheme(e)?this.regex.resolve(!0===e.darkModeSelector?t.options.darkModeSelector:null!=(n=e.darkModeSelector)?n:t.options.darkModeSelector):[]},getLayerOrder(e,t={},n,r){const{cssLayer:s}=t;if(s){return`@layer ${m(s.order||"primeui",n)}`}return""},getCommonStyleSheet({name:e="",theme:t={},params:n,props:r={},set:s,defaults:o}){const i=this.getCommon({name:e,theme:t,params:n,set:s,defaults:o}),a=Object.entries(r).reduce(((e,[t,n])=>e.push(`${t}="${n}"`)&&e),[]).join(" ");return Object.entries(i||{}).reduce(((e,[t,n])=>{if(null==n?void 0:n.css){const r=k(null==n?void 0:n.css),s=`${t}-variables`;e.push(`<style type="text/css" data-primevue-style-id="${s}" ${a}>${r}</style>`)}return e}),[]).join("")},getStyleSheet({name:e="",theme:t={},params:n,props:r={},set:s,defaults:o}){var i;const a={name:e,theme:t,params:n,set:s,defaults:o},l=null==(i=e.includes("-directive")?this.getPresetD(a):this.getPresetC(a))?void 0:i.css,u=Object.entries(r).reduce(((e,[t,n])=>e.push(`${t}="${n}"`)&&e),[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${e}-variables" ${u}>${k(l)}</style>`:""},createTokens(e={},t,n="",r="",s={}){return Object.entries(e).forEach((([e,i])=>{const a=x(e,t.variable.excludedKeyRegex)?n:n?`${n}.${L(e)}`:L(e),l=r?`${r}.${e}`:e;p(i)?this.createTokens(i,t,a,l,s):(s[a]||(s[a]={paths:[],computed(e,t={}){var n,r;return 1===this.paths.length?null==(n=this.paths[0])?void 0:n.computed(this.paths[0].scheme,t.binding):e&&"none"!==e?null==(r=this.paths.find((t=>t.scheme===e)))?void 0:r.computed(e,t.binding):this.paths.map((e=>e.computed(e.scheme,t[e.scheme])))}}),s[a].paths.push({path:l,value:i,scheme:l.includes("colorScheme.light")?"light":l.includes("colorScheme.dark")?"dark":"none",computed(e,t={}){const n=/{([^}]*)}/g;let r=i;if(t.name=this.path,t.binding||(t.binding={}),x(i,n)){const o=i.trim().replaceAll(n,(n=>{var r;const o=n.replace(/{|}/g,""),i=null==(r=s[o])?void 0:r.computed(e,t);return b(i)&&2===i.length?`light-dark(${i[0].value},${i[1].value})`:null==i?void 0:i.value})),a=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,l=/var\([^)]+\)/g;r=x(o.replace(l,"0"),a)?`calc(${o})`:o}return o(t.binding)&&delete t.binding,{colorScheme:e,path:this.path,paths:t,value:r.includes("undefined")?void 0:r}}}))})),s},getTokenValue(e,t,n){var r;const s=t.split(".").filter((e=>!x(e.toLowerCase(),n.variable.excludedKeyRegex))).join(".");const o=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,i=[null==(r=e[s])?void 0:r.computed(o)].flat().filter((e=>e));return 1===i.length?i[0].value:i.reduce(((e={},t)=>{const n=t,{colorScheme:r}=n,s=B(n,["colorScheme"]);return e[r]=s,e}),void 0)},getSelectorRule:(e,t,n,r)=>"class"===n||"attr"===n?z(u(t)?`${e}${t},${e} ${t}`:e,r):z(e,u(t)?z(t,r):r),transformCSS(e,t,n,r,s={},o,i,a){if(u(t)){const{cssLayer:l}=s;if("style"!==r){const e=this.getColorSchemeOption(s,i);t="dark"===n?e.reduce(((e,{type:n,selector:r})=>(u(r)&&(e+=r.includes("[CSS]")?r.replace("[CSS]",t):this.getSelectorRule(r,a,n,t)),e)),""):z(null!=a?a:":root",t)}if(l){const n={name:"primeui",order:"primeui"};p(l)&&(n.name=m(l.name,{name:e,type:r})),u(n.name)&&(t=z(`@layer ${n.name}`,t),null==o||o.layerNames(n.name))}return t}return""}},U={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=R(F({},t),{options:F(F({},this.defaults.options),t.options)}),this._tokens=Y.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return(null==(e=this.theme)?void 0:e.preset)||{}},get options(){var e;return(null==(e=this.theme)?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),W.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=R(F({},this.theme),{preset:e}),this._tokens=Y.createTokens(e,this.defaults),this.clearLoadedStyleNames(),W.emit("preset:change",e),W.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=R(F({},this.theme),{options:e}),this.clearLoadedStyleNames(),W.emit("options:change",e),W.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return Y.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return Y.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Y.getPresetC(n)},getDirective(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Y.getPresetD(n)},getCustomPreset(e="",t,n,r){const s={name:e,preset:t,options:this.options,selector:n,params:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Y.getPreset(s)},getLayerOrderCSS(e=""){return Y.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,n="style",r){return Y.transformCSS(e,t,r,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,n={}){return Y.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,n={}){return Y.getStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),W.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&W.emit("theme:load"))}};function X(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}function J(e,t){if(e&&t){const n=t=>{X(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(n)))}}function G(e){for(const n of null==document?void 0:document.styleSheets)try{for(const t of null==n?void 0:n.cssRules)for(const n of null==t?void 0:t.style)if(e.test(n))return{name:n,value:t.style.getPropertyValue(n).trim()}}catch(t){}return null}function Q(e,t){if(e&&t){const n=t=>{e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(n)))}}function ee(e){let t={width:0,height:0};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}function te(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}function ne(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function re(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function se(e,t,n=!0){var r,s,o,i;if(e){const a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ee(e),l=a.height,u=a.width,c=t.offsetHeight,d=t.offsetWidth,h=t.getBoundingClientRect(),f=re(),p=ne(),m=te();let g,y,v="top";h.top+c+l>m.height?(g=h.top+f-l,v="bottom",g<0&&(g=f)):g=c+h.top+f,y=h.left+u>m.width?Math.max(0,h.left+p+d-u):h.left+p,e.style.top=g+"px",e.style.left=y+"px",e.style.transformOrigin=v,n&&(e.style.marginTop="bottom"===v?`calc(${null!=(s=null==(r=G(/-anchor-gutter$/))?void 0:r.value)?s:"2px"} * -1)`:null!=(i=null==(o=G(/-anchor-gutter$/))?void 0:o.value)?i:"")}}function oe(e,t){e&&("string"==typeof t?e.style.cssText=t:Object.entries(t||{}).forEach((([t,n])=>e.style[t]=n)))}function ie(e,t){if(e instanceof HTMLElement){return e.offsetWidth}return 0}function ae(e,t,n=!0){var r,s,o,i;if(e){const a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ee(e),l=t.offsetHeight,u=t.getBoundingClientRect(),c=te();let d,h,f="top";u.top+l+a.height>c.height?(d=-1*a.height,f="bottom",u.top+d<0&&(d=-1*u.top)):d=l,h=a.width>c.width?-1*u.left:u.left+a.width>c.width?-1*(u.left+a.width-c.width):0,e.style.top=d+"px",e.style.left=h+"px",e.style.transformOrigin=f,n&&(e.style.marginTop="bottom"===f?`calc(${null!=(s=null==(r=G(/-anchor-gutter$/))?void 0:r.value)?s:"2px"} * -1)`:null!=(i=null==(o=G(/-anchor-gutter$/))?void 0:o.value)?i:"")}}function le(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}var ue=void 0;function ce(e){{if(null!=ue)return ue;let e=document.createElement("div");oe(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);let t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),ue=t,t}}function de(e,t={}){if(le(e)){const n=(t,r)=>{var s,o;const i=(null==(s=null==e?void 0:e.$attrs)?void 0:s[t])?[null==(o=null==e?void 0:e.$attrs)?void 0:o[t]]:[];return[r].flat().reduce(((e,r)=>{if(null!=r){const s=typeof r;if("string"===s||"number"===s)e.push(r);else if("object"===s){const s=Array.isArray(r)?n(t,r):Object.entries(r).map((([e,n])=>"style"!==t||!n&&0!==n?n?e:void 0:`${e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${n}`));e=s.length?e.concat(s.filter((e=>!!e))):e}}return e}),i)};Object.entries(t).forEach((([t,r])=>{if(null!=r){const s=t.match(/^on(.+)/);s?e.addEventListener(s[1].toLowerCase(),r):"p-bind"===t||"pBind"===t?de(e,r):(r="class"===t?[...new Set(n("class",r))].join(" ").trim():"style"===t?n("style",r).join(";").trim():r,(e.$attrs=e.$attrs||{})&&(e.$attrs[t]=r),e.setAttribute(t,r))}}))}}function he(e,t={},...n){if(e){const r=document.createElement(e);return de(r,t),r.append(...n),r}}function fe(e,t){if(e){e.style.opacity="0";let n=+new Date,r="0",s=function(){r=""+(+e.style.opacity+((new Date).getTime()-n)/t),e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}}function pe(e,t){return le(e)?e.matches(t)?e:e.querySelector(t):null}function me(e,t){e&&document.activeElement!==e&&e.focus(t)}function ge(e,t){if(le(e)){const n=e.getAttribute(t);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}}function ye(e,t=""){let n=function(e,t){return le(e)?Array.from(e.querySelectorAll(t)):[]}(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`),r=[];for(let s of n)"none"!=getComputedStyle(s).display&&"hidden"!=getComputedStyle(s).visibility&&r.push(s);return r}function ve(e,t){const n=ye(e,t);return n.length>0?n[0]:null}function be(e){if(e){let t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0}function Se(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}function xe(e){if(e){e.style.visibility="hidden",e.style.display="block";let t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}function $e(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function ke(e,t){const n=ye(e,t);return n.length>0?n[n.length-1]:null}function we(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}function Ce(e,t){if(e){return e.offsetHeight}return 0}function Oe(e,t=[]){const n=$e(e);return null===n?t:Oe(n,t.concat([n]))}function Le(e){let t=[];if(e){let n=Oe(e);const r=/(auto|scroll)/,s=e=>{try{let t=window.getComputedStyle(e,null);return r.test(t.getPropertyValue("overflow"))||r.test(t.getPropertyValue("overflowX"))||r.test(t.getPropertyValue("overflowY"))}catch(t){return!1}};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let r=n.split(",");for(let n of r){let r=pe(e,n);r&&s(r)&&t.push(r)}}9!==e.nodeType&&s(e)&&t.push(e)}}return t}function Ee(e){return!(null==e||!e.nodeName||!$e(e))}function je(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0}function Ne(){return/(android)/i.test(navigator.userAgent)}function _e(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function Ae(e){return!(!e||null==e.offsetParent)}function Pe(e){return!!e&&"rtl"===getComputedStyle(e).direction}function Te(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function De(e,t){var n,r;if(e){const s=e.parentElement,o=we(s),i=te(),a=e.offsetParent?e.offsetWidth:xe(e),l=e.offsetParent?e.offsetHeight:Se(e),u=ie(null==(n=null==s?void 0:s.children)?void 0:n[0]),c=Ce(null==(r=null==s?void 0:s.children)?void 0:r[0]);let d="",h="";o.left+u+a>i.width-ce()?o.left<a?t%2==1?d=o.left?"-"+o.left+"px":"100%":t%2==0&&(d=i.width-a-ce()+"px"):d="-100%":d="100%",h=e.getBoundingClientRect().top+c+l>i.height?`-${l-c}px`:"0px",e.style.top=h,e.style.left=d}}function Fe(e,t="",n){le(e)&&null!=n&&e.setAttribute(t,n)}var Re={};function Be(e="pui_id_"){return Re.hasOwnProperty(e)||(Re[e]=0),Re[e]++,`${e}${Re[e]}`}var We=function(){let e=[];const t=(t,n,r=0)=>[...e].reverse().find((e=>!0))||{key:t,value:r},n=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:n,set:(n,r,s)=>{r&&(r.style.zIndex=String(((n,r,s=999)=>{const o=t(n,r,s),i=o.value+(o.key===n?0:s)+1;return e.push({key:n,value:i}),i})(n,!0,s)))},clear:t=>{var r;t&&(r=n(t),e=e.filter((e=>e.value!==r)),t.style.zIndex="")},getCurrent:e=>(e=>t(e).value)(e)}}();export{h as $,Q as A,be as B,je as C,ie as D,E,Ce as F,we as G,J as H,ge as I,Ae as J,me as K,Ne as L,S as M,ve as N,ke as O,oe as P,ae as Q,se as R,Te as S,ye as T,f as U,fe as V,ne as W,re as X,te as Y,We as Z,X as _,w as a,Pe as a0,xe as a1,Se as a2,De as a3,Fe as b,_e as c,m as d,d as e,u as f,U as g,K as h,Ee as i,$ as j,W as k,pe as l,k as m,l as n,v as o,g as p,b as q,c as r,de as s,y as t,Be as u,o as v,p as w,C as x,Le as y,he as z};