UNPKG

@amaui/style-react

Version:

Amaui CSS in JS styling solution for React

6 lines 176 kB
/** @license AmauiStyleReact v1.1.35 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).AmauiStyleReact={},e.React)}(this,(function(e,t){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t);function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})})),t}var o={},n={},l="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},a="undefined"!=typeof window&&void 0!==window.document,i=!(void 0===l||!e.exports);t.default=function e(t,s,o={}){var n;const l=Object.assign(Object.assign({},r),o),{variant:u}=l,c=s&&"object"==typeof s&&Object.getPrototypeOf(s);switch(t){case"string":return"string"==typeof s;case"number":return"number"==typeof s&&!Number.isNaN(s);case"boolean":return"boolean"==typeof s;case"array":return Array.isArray(s);case"object":return"object"==typeof s&&!!s&&s.constructor===Object;case"object-like":return"object"==typeof s&&(null===s||s.constructor!==Object);case"class":return("object"==typeof s||"function"==typeof s)&&(/class/gi.test(String(s))||/class/gi.test(String(null==s?void 0:s.constructor)));case"function":return!!(s&&s instanceof Function);case"async":return!(!e("function",s)||!(a?"AsyncFunction"===s.constructor.name:s()instanceof Promise));case"map":return!(c!==Map.prototype);case"weakmap":return!(c!==WeakMap.prototype);case"set":return!(c!==Set.prototype);case"weakset":return!(c!==WeakSet.prototype);case"promise":return!(c!==Promise.prototype);case"int8array":return!(c!==Int8Array.prototype);case"uint8array":return!(c!==Uint8Array.prototype);case"uint8clampedarray":return!(c!==Uint8ClampedArray.prototype);case"int16array":return!(c!==Int16Array.prototype);case"uint16array":return!(c!==Uint16Array.prototype);case"int32array":return!(c!==Int32Array.prototype);case"uint32array":return!(c!==Uint32Array.prototype);case"float32array":return!(c!==Float32Array.prototype);case"float64array":return!(c!==Float64Array.prototype);case"bigint64array":return!(c!==BigInt64Array.prototype);case"biguint64array":return!(c!==BigUint64Array.prototype);case"typedarray":return e("int8array",s)||e("uint8array",s)||e("uint8clampedarray",s)||e("int16array",s)||e("uint16array",s)||e("int32array",s)||e("uint32array",s)||e("float32array",s)||e("float64array",s)||e("bigint64array",s)||e("biguint64array",s);case"dataview":return!(c!==DataView.prototype);case"arraybuffer":return!(c!==ArrayBuffer.prototype);case"sharedarraybuffer":return"undefined"!=typeof SharedArrayBuffer&&!(c!==SharedArrayBuffer.prototype);case"symbol":return!("symbol"!=typeof s);case"error":return!!(s&&s instanceof Error);case"date":return!!(s&&s instanceof Date);case"regexp":return!!(s&&s instanceof RegExp);case"arguments":return!(!s||"[object Arguments]"!==s.toString());case"null":return null===s;case"undefined":return void 0===s;case"blob":return a&&s instanceof Blob;case"buffer":return!(!i||"function"!=typeof(null===(n=null==s?void 0:s.constructor)||void 0===n?void 0:n.isBuffer)||!s.constructor.isBuffer(s));case"element":if(s)switch(u){case void 0:case"html":case"element":return a&&("object"==typeof HTMLElement?s instanceof HTMLElement:s&&"object"==typeof s&&null!==s&&1===s.nodeType&&"string"==typeof s.nodeName);case"node":return a&&("object"==typeof Node?s instanceof Node:s&&"object"==typeof s&&null!==s&&"number"==typeof s.nodeType&&"string"==typeof s.nodeName);case"react":return s.elementType||s.hasOwnProperty("$$typeof");default:return!1}return!1;case"simple":return e("string",s,l)||e("number",s,l)||e("boolean",s,l)||e("undefined",s,l)||e("null",s,l);case"not-array-object":return!e("array",s,l)&&!e("object",s,l);default:return!1}}}(u,u.exports);var c={},d={},p={},h={},f=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h,"__esModule",{value:!0});const m=f(u.exports),v={decode:!1,decodeMethod:decodeURIComponent};var y=h.default=(e,t={})=>{const r=Object.assign(Object.assign({},v),t);let a=e;try{(0,m.default)("string",e)&&r.decode&&(0,m.default)("function",r.decodeMethod)&&(a=r.decodeMethod(e))}catch(e){}try{if((0,m.default)("string",a)){if("undefined"===a)return;return"NaN"===a?NaN:JSON.parse(a)}return a}catch(e){}return a};!function(e){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getObjectPropertyValue=void 0;const r=t(u.exports),a=t(h);e.getObjectPropertyValue=(t,i)=>{if(t&&i){if((0,r.default)("string",i)){const r=i.split(".").filter(Boolean).map((e=>(0,a.default)(e)));return(0,e.getObjectPropertyValue)(t,r)}if((0,r.default)("array",i)){const r=i[0];if(1===i.length)return t[r];if(t.hasOwnProperty(r))return(0,e.getObjectPropertyValue)(t[r],i.slice(1))}}},e.default=e.getObjectPropertyValue}(p);var b=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});const g=b(p);d.default=(e,...t)=>{if(!e||!t.length)return;let r;const a=t.filter(Boolean);for(const t of a)if(r=(0,g.default)(e,t),void 0!==r)return r};var w=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c,"__esModule",{value:!0});const x=w(u.exports),S=w(d);var j=c.default=(e,...t)=>{const r={simple:[],array:[],object:[]},a=[];return(0,x.default)("array",e)&&e.forEach((e=>{const i=(0,x.default)("not-array-object",e),s=(0,x.default)("array",e),o=i||!t.length?e:(0,S.default)(e,...t);r[i?"simple":s?"array":"object"].find((e=>o===e))||void 0===o||(a.push(e),r[i?"simple":s?"array":"object"].push(o))})),a},_=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});const k=_(u.exports),O=_(c),A={response:"array"};n.default=function(e,t={}){const r=Object.assign(Object.assign({},A),t);if((0,k.default)("array",e)){const t=(0,O.default)(e),a=t.length,i=(0,k.default)("number",r.items)?r.items:a;if(i<1)return[t];if(1===i)return t.map((e=>[e]));const s=new Array(i).fill(0);let o=i-2;const n=[];if("array"===r.response){for(;o>=0;){o=i-2;for(let e=0;e<a;e++)s[i-1]=e,n.push(s.map((e=>t[e])));for(;;){if(s[o]!==a-1){s[o]++;break}if(s[o]=0,o--,o<0)break}}return n}if("yield"===r.response)return function*(){for(;o>=0;){o=i-2;for(let e=0;e<a;e++){s[i-1]=e;const r=s.map((e=>t[e]));yield r,n.push(r)}for(;;){if(s[o]!==a-1){s[o]++;break}if(s[o]=0,o--,o<0)break}}return n}}};var E=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});const F=E(n),M={response:"array"};var N=o.default=function(e,t=0,r={}){const a=Object.assign(Object.assign({},M),r);return(0,F.default)(e,Object.assign(Object.assign({},a),{items:t}))},C={};Object.defineProperty(C,"__esModule",{value:!0});var B=C.default=()=>"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==l?l:void 0;function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function z(e){var t=function(e,t){if("object"!==$(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==$(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$(t)?t:String(t)}function P(e,t,r){return(t=z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},a="undefined"!=typeof window&&void 0!==window.document,i=!(void 0===l||!e.exports);t.default=function e(t,s,o={}){var n;const l=Object.assign(Object.assign({},r),o),{variant:u}=l,c=s&&"object"==typeof s&&Object.getPrototypeOf(s);switch(t){case"string":return"string"==typeof s;case"number":return"number"==typeof s&&!Number.isNaN(s);case"boolean":return"boolean"==typeof s;case"array":return Array.isArray(s);case"object":return"object"==typeof s&&!!s&&s.constructor===Object;case"object-like":return"object"==typeof s&&(null===s||s.constructor!==Object);case"class":return("object"==typeof s||"function"==typeof s)&&(/class/gi.test(String(s))||/class/gi.test(String(null==s?void 0:s.constructor)));case"function":return!!(s&&s instanceof Function);case"async":return!(!e("function",s)||!(a?"AsyncFunction"===s.constructor.name:s()instanceof Promise));case"map":return!(c!==Map.prototype);case"weakmap":return!(c!==WeakMap.prototype);case"set":return!(c!==Set.prototype);case"weakset":return!(c!==WeakSet.prototype);case"promise":return!(c!==Promise.prototype);case"int8array":return!(c!==Int8Array.prototype);case"uint8array":return!(c!==Uint8Array.prototype);case"uint8clampedarray":return!(c!==Uint8ClampedArray.prototype);case"int16array":return!(c!==Int16Array.prototype);case"uint16array":return!(c!==Uint16Array.prototype);case"int32array":return!(c!==Int32Array.prototype);case"uint32array":return!(c!==Uint32Array.prototype);case"float32array":return!(c!==Float32Array.prototype);case"float64array":return!(c!==Float64Array.prototype);case"bigint64array":return!(c!==BigInt64Array.prototype);case"biguint64array":return!(c!==BigUint64Array.prototype);case"typedarray":return e("int8array",s)||e("uint8array",s)||e("uint8clampedarray",s)||e("int16array",s)||e("uint16array",s)||e("int32array",s)||e("uint32array",s)||e("float32array",s)||e("float64array",s)||e("bigint64array",s)||e("biguint64array",s);case"dataview":return!(c!==DataView.prototype);case"arraybuffer":return!(c!==ArrayBuffer.prototype);case"sharedarraybuffer":return"undefined"!=typeof SharedArrayBuffer&&!(c!==SharedArrayBuffer.prototype);case"symbol":return!("symbol"!=typeof s);case"error":return!!(s&&s instanceof Error);case"date":return!!(s&&s instanceof Date);case"regexp":return!!(s&&s instanceof RegExp);case"arguments":return!(!s||"[object Arguments]"!==s.toString());case"null":return null===s;case"undefined":return void 0===s;case"blob":return a&&s instanceof Blob;case"buffer":return!(!i||"function"!=typeof(null===(n=null==s?void 0:s.constructor)||void 0===n?void 0:n.isBuffer)||!s.constructor.isBuffer(s));case"element":if(s)switch(u){case void 0:case"html":case"element":return a&&("object"==typeof HTMLElement?s instanceof HTMLElement:s&&"object"==typeof s&&null!==s&&1===s.nodeType&&"string"==typeof s.nodeName);case"node":return a&&("object"==typeof Node?s instanceof Node:s&&"object"==typeof s&&null!==s&&"number"==typeof s.nodeType&&"string"==typeof s.nodeName);case"react":return s.elementType||s.hasOwnProperty("$$typeof");default:return!1}return!1;case"simple":return e("string",s,l)||e("number",s,l)||e("boolean",s,l)||e("undefined",s,l)||e("null",s,l);case"not-array-object":return!e("array",s,l)&&!e("object",s,l);default:return!1}}}(D,D.exports);var R=i(D.exports),T={};Object.defineProperty(T,"__esModule",{value:!0});const I=e=>Array.isArray(e),U=e=>"object"==typeof e&&!!e&&e.constructor===Object,W=(e,t)=>{const r=t||new WeakSet;if(!r.has(e)){if((U(e)||I(e))&&r.add(e),I(e))return e.map((e=>W(e,r)));if(U(e)){const t={};return Object.keys(e).forEach((a=>t[a]=W(e[a],r))),t}return e}};var H=T.default=W,V={},q={};Object.defineProperty(q,"__esModule",{value:!0});q.default=()=>"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==l?l:void 0;var L={},Z={},G={},J=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G,"__esModule",{value:!0});const K=J(D.exports);G.default=e=>(0,K.default)("string",e)?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,function(e){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.optionsDefault=void 0;const r=t(D.exports),a=t(G);e.optionsDefault={filters:[",",".","-","_","s+"],replaceWith:" ",trim:!0};e.default=(t,i={})=>{try{const s=Object.assign(Object.assign({},e.optionsDefault),i);if(s.className&&(s.replaceWith="-",s.cammelCaseTransform=!0,s.lowercase=!0),(0,r.default)("string",t)){let e=t;if(s.url){const t=e.split("?").filter(Boolean);let r=t[0];const a=t[1];return"/"===r.slice(-1)&&(r=r.slice(0,-1)),e=a?[r,a].join("?"):r,e}return s.cammelCaseTransform&&(e=e.split(/(?=[A-Z])/g).join(s.replaceWith||" ")),s.filters.forEach((t=>{const r=new RegExp(`\\${t}`,"g");e=e.replace(r,s.replaceWith||" ")})),s.trim&&(e=e.trim()),s.capitalize&&(e=(0,a.default)(e)),s.lowercase&&(e=e.toLocaleLowerCase()),e}return t}catch(e){}return t}}(Z);var X={},Q=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});const Y=Q(D.exports),ee={decode:!1,decodeMethod:decodeURIComponent};X.default=(e,t={})=>{const r=Object.assign(Object.assign({},ee),t);let a=e;try{(0,Y.default)("string",e)&&r.decode&&(0,Y.default)("function",r.decodeMethod)&&(a=r.decodeMethod(e))}catch(e){}try{if((0,Y.default)("string",a)){if("undefined"===a)return;return"NaN"===a?NaN:JSON.parse(a)}return a}catch(e){}return a};var te=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});const re=te(D.exports),ae=te(Z),ie=te(X),se={valueOverride:!1},oe=(e,t="",r=void 0,a={})=>{const i=Object.assign(Object.assign({},se),a);if(!e&&!t)return e;if((0,re.default)("string",t)){const a=t.split(".").filter(Boolean).map((e=>(0,ie.default)(e)));return oe(e,a,r,i)}if((0,re.default)("array",t)){const a=t[0],s=(0,ae.default)(String(a),{filters:[".",","],replaceWith:""});if(1!==t.length||void 0===r){e.hasOwnProperty(a)&&!i.valueOverride||(e[s]=(0,re.default)("number",t[1])?[]:{});const o=e[s];return(0,re.default)("object",o)||(0,re.default)("array",o)?oe(e[a],t.slice(1),r,i):e}((0,re.default)("array",e)&&(0,re.default)("number",a)||(0,re.default)("object",e)&&(0,re.default)("string",a))&&(e[(0,re.default)("string",a)?s:a]=r)}return e};L.default=oe;var ne=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(V,"__esModule",{value:!0});const le=ne(D.exports),ue=ne(q),ce=ne(L),de={};var pe=V.default=(e,t={})=>{var r,a,i,s;const o=Object.assign(Object.assign({},de),t);try{return(0,le.default)("function",e)?e():void 0}catch(e){if(o.log){console.error("Try: ",e);const t=(0,ue.default)();"test"===(null===(r=t.AMAUI)||void 0===r?void 0:r.env)&&((null===(s=null===(i=null===(a=t.AMAUI)||void 0===a?void 0:a.test)||void 0===i?void 0:i.Try)||void 0===s?void 0:s.logs)||(0,ce.default)(t,"AMAUI.test.Try.logs",[]),t.AMAUI.test.Try.logs.push(e))}}};const he={emit:{priorValue:!0,copy:!1,pre:{},post:{}}};var fe=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};P(this,"methods",[]),this.value=e,this.options=t,this.options={...he,...this.options}}get length(){return this.methods.length}emit(){for(var e,t,r,a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];const o=i;null!==(e=this.options.emit)&&void 0!==e&&e.priorValue&&(this.value=1===o.length?o[0]:o),R("function",null===(t=this.options.emit.pre)||void 0===t?void 0:t.method)&&this.options.emit.pre.method(...o);const n=this.options.emit.copy?H(o):o,l=this.methods.filter((e=>R("function",e)));for(const e of l)pe((()=>e(...n)));R("function",null===(r=this.options.emit.post)||void 0===r?void 0:r.method)&&this.options.emit.post.method(...o)}forEach(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.methods.forEach((e=>pe((()=>e(...t)))))}map(e){if(!this.methods.length)return;let t=e;for(const e of this.methods)t=pe((()=>e(t)));return t}subscribe(e){R("function",e)&&-1===this.methods.indexOf(e)&&this.methods.push(e);const t=this;return{unsubscribe:()=>{t.unsubscribe(e)}}}unsubscribe(e){if(R("function",e)&&this.methods.indexOf(e)>-1){const t=this.methods.findIndex((t=>t===e));t>-1&&this.methods.splice(t,1)}}};const me=e=>ge("string",e)?e.replace(/[A-Z]/g,(e=>"-".concat(e[0]))).toLowerCase():e,ve=e=>ge("string",e)?e.replace(/-./g,(e=>void 0!==e[1]?e[1].toUpperCase():"")):e,ye=e=>be(ve(e)),be=e=>ge("string",e)?e.charAt(0).toUpperCase()+e.slice(1):e,ge=(e,t)=>{switch(e){case"string":return"string"==typeof t;case"number":return"number"==typeof t&&!Number.isNaN(t);case"array":return Array.isArray(t);case"boolean":return"boolean"==typeof t;case"null":return null===t;case"undefined":return void 0===t;case"object":return"object"==typeof t&&!!t&&t.constructor===Object;case"function":return!!(t&&t instanceof Function);case"simple":return ge("string",t)||ge("number",t)||ge("boolean",t)||ge("undefined",t)||ge("null",t);default:return}},we=e=>e instanceof fe||ge("function",null==e?void 0:e.emit),xe=e=>{const t=[];if(ge("string",e)){const r=/\$[a-zA-Z1-9_]+/g;t.push(...(e.match(r)||[]).map((e=>e.replace("$",""))))}return t},Se=(e,t,r)=>{const a={value:[],options:{}};if(ge("string",e)&&e.length&&void 0!==t&&r)if(ge("string",t))a.value=[t];else if(ge("number",t)){var i;const s=null===(i=r.subscriptions.rule.unit.map({property:e,value:t}))||void 0===i?void 0:i.value;a.value=[(null==s?void 0:s.value)||t]}else if(ge("array",t)&&t.every((e=>ge("simple",e))))a.value=[t.flatMap((t=>Se(e,t,r).value)).join(" ")];else if(ge("array",t)&&t.every((e=>ge("array",e)||ge("object",e))))a.value=[t.flatMap((t=>Se(e,t,r).value)).join(", ")];else if(ge("object",t))if(t.value){const i=(t.fallbacks||[]).flatMap((t=>Se(e,t,r).value));a.value=[i,Se(e,t.value,r).value].flat().filter(Boolean),t.rule&&(a.options.rule=t.rule)}else{var s;const i=null===(s=r.subscriptions.rule.value.map({property:e,value:t}))||void 0===s?void 0:s.value;a.value=i||[]}else a.value=[t];return a},je=e=>ge("function",e)||we(e)||ge("object",e)&&Object.keys(e).some((t=>je(e[t])));function*_e(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"abcdefghijklmnopqrstuvwxyz";const r=ge("array",t)?t:t.split("");let a,i=e,s=N(r,i,{response:"yield"})();for(;;){var o;a=s.next(),null!==(o=a)&&void 0!==o&&o.done&&(s=N(r,++i,{response:"yield"})(),a=s.next()),yield a.value.join("")}}const ke=function(e){return Number((e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:16)).toFixed(4))};B().amaui_methods={makeName:_e()};const Oe=e=>ge("object",e)?(e.hasOwnProperty("className")||Object.defineProperty(e,"className",{get:function(){return Object.keys(e.classNames).map((t=>e.classNames[t])).join(" ")}}),e.hasOwnProperty("class")||Object.defineProperty(e,"class",{get:function(){return Object.keys(e.classes).map((t=>e.classes[t])).join(" ")}}),e.hasOwnProperty("styles")||(e.styles=function(){const t=[];for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return a.forEach((r=>{e.classes[r]&&t.push(e.classes[r])})),t.join(" ")}),e):e;let Ae=0;const Ee=()=>"".concat(Ae++,"-").concat((new Date).getTime());var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});const Me=e=>Array.isArray(e),Ne=e=>"object"==typeof e&&!!e&&e.constructor===Object,Ce=(e,t)=>{const r=t||new WeakSet;if(!r.has(e)){if((Ne(e)||Me(e))&&r.add(e),Me(e))return e.map((e=>Ce(e,r)));if(Ne(e)){const t={};return Object.keys(e).forEach((a=>t[a]=Ce(e[a],r))),t}return e}};var Be=Fe.default=Ce,$e={},ze={},Pe=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});const De=Pe(u.exports);var Re=ze.default=function e(t,r){let a;switch(t){case"browser":return"undefined"!=typeof window&&void 0!==window.document;case"worker":return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;case"nodejs":return new Function("try {return this===global;}catch(e){return false;}")();case"localhost":return a=void 0!==r?r:e("browser")&&window.location.hostname,(0,De.default)("string",a)&&["localhost","127.0.0.1"].some((e=>a.indexOf(e)>-1));default:return!1}},Te={},Ie={},Ue={},We={},He=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(We,"__esModule",{value:!0});const Ve=He(u.exports);We.default=e=>(0,Ve.default)("string",e)?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,function(e){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.optionsDefault=void 0;const r=t(u.exports),a=t(We);e.optionsDefault={filters:[",",".","-","_","s+"],replaceWith:" ",trim:!0};e.default=(t,i={})=>{try{const s=Object.assign(Object.assign({},e.optionsDefault),i);if(s.className&&(s.replaceWith="-",s.cammelCaseTransform=!0,s.lowercase=!0),(0,r.default)("string",t)){let e=t;if(s.url){const t=e.split("?").filter(Boolean);let r=t[0];const a=t[1];return"/"===r.slice(-1)&&(r=r.slice(0,-1)),e=a?[r,a].join("?"):r,e}return s.cammelCaseTransform&&(e=e.split(/(?=[A-Z])/g).join(s.replaceWith||" ")),s.filters.forEach((t=>{const r=new RegExp(`\\${t}`,"g");e=e.replace(r,s.replaceWith||" ")})),s.trim&&(e=e.trim()),s.capitalize&&(e=(0,a.default)(e)),s.lowercase&&(e=e.toLocaleLowerCase()),e}return t}catch(e){}return t}}(Ue);var qe=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ie,"__esModule",{value:!0});const Le=qe(u.exports),Ze=qe(Ue),Ge=qe(h),Je={valueOverride:!1},Ke=(e,t="",r=void 0,a={})=>{const i=Object.assign(Object.assign({},Je),a);if(!e&&!t)return e;if((0,Le.default)("string",t)){const a=t.split(".").filter(Boolean).map((e=>(0,Ge.default)(e)));return Ke(e,a,r,i)}if((0,Le.default)("array",t)){const a=t[0],s=(0,Ze.default)(String(a),{filters:[".",","],replaceWith:""});if(1!==t.length||void 0===r){e.hasOwnProperty(a)&&!i.valueOverride||(e[s]=(0,Le.default)("number",t[1])?[]:{});const o=e[s];return(0,Le.default)("object",o)||(0,Le.default)("array",o)?Ke(e[a],t.slice(1),r,i):e}((0,Le.default)("array",e)&&(0,Le.default)("number",a)||(0,Le.default)("object",e)&&(0,Le.default)("string",a))&&(e[(0,Le.default)("string",a)?s:a]=r)}return e};Ie.default=Ke;var Xe=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Te,"__esModule",{value:!0});const Qe=Xe(u.exports),Ye=Xe(C),et=Xe(Ie),tt={};var rt=Te.default=(e,t={})=>{var r,a,i,s;const o=Object.assign(Object.assign({},tt),t);try{return(0,Qe.default)("function",e)?e():void 0}catch(e){if(o.log){console.error("Try: ",e);const t=(0,Ye.default)();"test"===(null===(r=t.AMAUI)||void 0===r?void 0:r.env)&&((null===(s=null===(i=null===(a=t.AMAUI)||void 0===a?void 0:a.test)||void 0===i?void 0:i.Try)||void 0===s?void 0:s.logs)||(0,et.default)(t,"AMAUI.test.Try.logs",[]),t.AMAUI.test.Try.logs.push(e))}}},at=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});const it=at(u.exports),st=at(ze),ot=at(Te);var nt=$e.default=function e(t){const r={};r.value=t,(0,it.default)("string",t)&&(r.value=window.document.querySelector(t)),(0,it.default)("element",r.value)||delete r.value;const a=(e=r.value)=>{const t=(0,it.default)("element",e)&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.msMatchesSelector);return t?t.bind(e):()=>!1};return r.parent=function(){if(this.value&&(0,st.default)("browser")&&this.value.parentNode)return this.value.parentNode},r.parents=function(t,r="some"){const i=[];let s=this.value;for(;s&&s!==document;)s=e(s).parent(),s&&(!(null==t?void 0:t.length)||t[r]&&t[r]((e=>(0,ot.default)((()=>a(s)(e))))))&&i.push(s);return i},r.nearest=function(t,r="some"){if(!(null==t?void 0:t.length)||t[r]&&t[r]((e=>(0,ot.default)((()=>a(this.value)(e))))))return this.value;let i=this.value;for(;i&&i!==document;)if(i=e(i).parent(),i&&(!(null==t?void 0:t.length)||t[r]&&t[r]((e=>(0,ot.default)((()=>a(i)(e)))))))return i},r.furthest=function(e,t="some"){const r=this.parents(e,t);return r[r.length-1]},r.hasParent=function(t,r=!0,i="some"){let s=this.value;if(!r)return!(null==t?void 0:t.length)||t[i]&&t[i]((e=>(0,ot.default)((()=>a(this.parent())(e)))));for(;s&&s!==document;)if(s=e(s).parent(),s&&(!(null==t?void 0:t.length)||t[i]&&t[i]((e=>(0,ot.default)((()=>a(s)(e)))))))return!0;return!1},r.hasParents=function(e,t=!0,r="some"){if(!(null==e?void 0:e.length))return!!this.parent();const i=this.parents();return!!(this.value&&(null==e?void 0:e.length)&&e[r]&&e[r]((e=>{const r=i.findIndex((t=>(0,it.default)("string",e)?(0,ot.default)((()=>a(t)(e))):t===e));return r>-1&&(t&&i.splice(r,1),!0)})))},r},lt={},ut=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});const ct=ut(u.exports),dt=ut(Fe),pt={copy:!1,merge:{array:!1}},ht=(e,t,r={})=>{const a=Object.assign(Object.assign({},pt),r);if(a.merge.array&&(0,ct.default)("array",e)&&(0,ct.default)("array",t)){const r=Math.max(e.length,t.length);for(let i=0;i<r;i++)void 0===e[i]&&(e[i]=t[i]),((0,ct.default)("object",e[i])&&(0,ct.default)("object",t[i])||(0,ct.default)("array",e[i])&&(0,ct.default)("array",t[i]))&&(e[i]=ht(e[i],t[i],a))}return(0,ct.default)("object",e)&&(0,ct.default)("object",t)&&Object.keys(t).forEach((r=>{e.hasOwnProperty(r)?(0,ct.default)("object",e[r])&&(0,ct.default)("object",t[r])&&(e[r]=ht(e[r],t[r],a)):e[r]=a.copy?(0,dt.default)(t[r]):t[r]})),e};var ft=lt.default=ht,mt={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},a="undefined"!=typeof window&&void 0!==window.document,i=!(void 0===l||!e.exports);t.default=function e(t,s,o={}){var n;const l=Object.assign(Object.assign({},r),o),{variant:u}=l,c=s&&"object"==typeof s&&Object.getPrototypeOf(s);switch(t){case"string":return"string"==typeof s;case"number":return"number"==typeof s&&!Number.isNaN(s);case"boolean":return"boolean"==typeof s;case"array":return Array.isArray(s);case"object":return"object"==typeof s&&!!s&&s.constructor===Object;case"object-like":return"object"==typeof s&&(null===s||s.constructor!==Object);case"class":return("object"==typeof s||"function"==typeof s)&&(/class/gi.test(String(s))||/class/gi.test(String(null==s?void 0:s.constructor)));case"function":return!!(s&&s instanceof Function);case"async":return!(!e("function",s)||!(a?"AsyncFunction"===s.constructor.name:s()instanceof Promise));case"map":return!(c!==Map.prototype);case"weakmap":return!(c!==WeakMap.prototype);case"set":return!(c!==Set.prototype);case"weakset":return!(c!==WeakSet.prototype);case"promise":return!(c!==Promise.prototype);case"int8array":return!(c!==Int8Array.prototype);case"uint8array":return!(c!==Uint8Array.prototype);case"uint8clampedarray":return!(c!==Uint8ClampedArray.prototype);case"int16array":return!(c!==Int16Array.prototype);case"uint16array":return!(c!==Uint16Array.prototype);case"int32array":return!(c!==Int32Array.prototype);case"uint32array":return!(c!==Uint32Array.prototype);case"float32array":return!(c!==Float32Array.prototype);case"float64array":return!(c!==Float64Array.prototype);case"bigint64array":return!(c!==BigInt64Array.prototype);case"biguint64array":return!(c!==BigUint64Array.prototype);case"typedarray":return e("int8array",s)||e("uint8array",s)||e("uint8clampedarray",s)||e("int16array",s)||e("uint16array",s)||e("int32array",s)||e("uint32array",s)||e("float32array",s)||e("float64array",s)||e("bigint64array",s)||e("biguint64array",s);case"dataview":return!(c!==DataView.prototype);case"arraybuffer":return!(c!==ArrayBuffer.prototype);case"sharedarraybuffer":return"undefined"!=typeof SharedArrayBuffer&&!(c!==SharedArrayBuffer.prototype);case"symbol":return!("symbol"!=typeof s);case"error":return!!(s&&s instanceof Error);case"date":return!!(s&&s instanceof Date);case"regexp":return!!(s&&s instanceof RegExp);case"arguments":return!(!s||"[object Arguments]"!==s.toString());case"null":return null===s;case"undefined":return void 0===s;case"blob":return a&&s instanceof Blob;case"buffer":return!(!i||"function"!=typeof(null===(n=null==s?void 0:s.constructor)||void 0===n?void 0:n.isBuffer)||!s.constructor.isBuffer(s));case"element":if(s)switch(u){case void 0:case"html":case"element":return a&&("object"==typeof HTMLElement?s instanceof HTMLElement:s&&"object"==typeof s&&null!==s&&1===s.nodeType&&"string"==typeof s.nodeName);case"node":return a&&("object"==typeof Node?s instanceof Node:s&&"object"==typeof s&&null!==s&&"number"==typeof s.nodeType&&"string"==typeof s.nodeName);case"react":return s.elementType||s.hasOwnProperty("$$typeof");default:return!1}return!1;case"simple":return e("string",s,l)||e("number",s,l)||e("boolean",s,l)||e("undefined",s,l)||e("null",s,l);case"not-array-object":return!e("array",s,l)&&!e("object",s,l);default:return!1}}}(mt,mt.exports);var vt=i(mt.exports),yt={};Object.defineProperty(yt,"__esModule",{value:!0});const bt=e=>Array.isArray(e),gt=e=>"object"==typeof e&&!!e&&e.constructor===Object,wt=(e,t)=>{const r=t||new WeakSet;if(!r.has(e)){if((gt(e)||bt(e))&&r.add(e),bt(e))return e.map((e=>wt(e,r)));if(gt(e)){const t={};return Object.keys(e).forEach((a=>t[a]=wt(e[a],r))),t}return e}};var xt=yt.default=wt;const St=()=>Math.floor((new Date).getTime()/1e3),jt={value:{copy:!1},add:{override:!0}};class _t{static meta=new WeakMap;static options_=jt;static get options(){return this.options_}static set options(e){this.options_={...this.options,...e}}static class(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>{const[r,a]=t;this.add(r,a,e)}}static method(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(e,r)=>{const a=e.constructor,[i,s]=t;this.add(i,s,a,r)}}static property(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(e,r)=>{const a=e.constructor,[i,s]=t;this.add(i,s,a,r)}}static parameter(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(e,r,a)=>{const i=e.constructor,[s]=t;this.add("amaui-meta-param:".concat(a),s,i,r)}}static add(e,t,r,a){if(!vt("simple",r)){const i=this.options.value.copy?xt(t):t;let s=this.meta.get(r);if(s||(s=new Map,this.meta.set(r,s)),void 0!==a){let r=s.get(a);if(r||(r=new Map,s.set(a,r)),!r.has(e)||this.options.add.override)return r.set(e,{value:this.options.value.copy?xt(t):t,added_at:St()}),i}else if(!s.has(e)||this.options.add.override)return s.set(e,{value:this.options.value.copy?xt(t):t,added_at:St()}),i}}static update(e,t,r,a){if(!vt("simple",r)){const i=this.options.value.copy?xt(t):t;let s=this.meta.get(r);if(s||(s=new Map,this.meta.set(r,s)),void 0!==a){let t=s.get(a);if(t||(t=new Map,s.set(a,t)),t.has(e)){const r=t.get(e);return r.value=i,r.updated_at=St(),t.set(e,r),i}}else if(s.has(e)){const t=s.get(e);return t.value=i,t.updated_at=St(),s.set(e,t),i}}}static values(e,t){if(!vt("simple",e)){const r=this.meta.get(e);if(!r)return;if(void 0!==t){const e=r.get(t);return e&&Array.from(e.values())}return r&&Array.from(r.values()).map((e=>e.value))}}static keys(e,t){if(!vt("simple",e)){const r=this.meta.get(e);if(!r)return;if(void 0!==t){const e=r.get(t);return e&&Array.from(e.keys())}return r&&Array.from(r.keys())}}static get(e,t,r){if(!vt("simple",t)){const a=this.meta.get(t);if(!a)return;if(void 0!==r){const t=a.get(r);if(!t)return;if(!t.has(e))return;return this.options.value.copy?xt(t.get(e).value):t.get(e).value}if(!a.has(e))return;return this.options.value.copy?xt(a.get(e).value):a.get(e).value}}static has(e,t,r){if(!vt("simple",t)){const a=this.meta.get(t);if(!a)return!1;if(void 0!==r){const t=a.get(r);return!!t&&t.has(e)}return a.has(e)}}static remove(e,t,r){if(!vt("simple",t)){const a=this.meta.get(t);if(!a)return;if(void 0!==r){const t=a.get(r);if(!t)return;t.delete(e)}else a.delete(e)}}static reset(){this.meta=new WeakMap,this.options=jt}}var kt=_t;var Ot=class{make(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{element:{},data:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"style";if(Re("browser")){const r=window.document.createElement(t);return Object.keys((null==e?void 0:e.element)||{}).forEach((t=>r.setAttribute(t,e.element[t]))),Object.keys((null==e?void 0:e.data)||{}).forEach((t=>{r[t]=e.data[t],r.setAttribute(0===t.indexOf("data-")?t:"data-".concat(t),e.data[t])})),r}}add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lower",r=arguments.length>2?arguments[2]:void 0;if(Re("browser")){const s=window.document.styleSheets;if(s.length&&"upper"!==t){var a,i;const o=Array.from(s).find((e=>"reset"===e.ownerNode.method));let n=Array.from(s).filter((e=>"pure"===e.ownerNode.method));n=n[n.length-1],"reset"===(null==r||null===(a=r.data)||void 0===a?void 0:a.method)||"lower"===t&&!n&&!o?window.document.head.insertBefore(e,(null===(i=s[0])||void 0===i?void 0:i.ownerNode)||null):"lower"===t?n?window.document.head.insertBefore(e,n.ownerNode.nextElementSibling):o&&window.document.head.insertBefore(e,o.ownerNode.nextElementSibling):window.document.head.append(e)}else window.document.head.append(e);return e}}remove(e){var t;let r=e;null!=e&&e.ownerNode&&(r=r.ownerNode),null!==(t=r)&&void 0!==t&&t.remove&&r.remove()}};const At={mode:"regular",rule:{sort:!0,prefix:!0,rtl:!1},minify:!0,optimize:!1,classNamePrefix:""};class Et{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Be(At);P(this,"mode","regular"),P(this,"subscriptions",{className:{pre:new fe,name:new fe,post:new fe},keyframes:{pre:new fe,name:new fe,post:new fe},rule:{pre:new fe,unit:new fe,value:new fe,prefix:new fe,rtl:new fe,add:new fe,update:new fe,update_props:new fe,remove:new fe,post:new fe},rules:{sort:new fe},sheet:{add:new fe,update:new fe,update_props:new fe,remove:new fe},sheet_manager:{add:new fe,update:new fe,update_props:new fe,remove:new fe}}),P(this,"values",{css:""}),P(this,"refs",{}),P(this,"sheets",[]),P(this,"sheet_managers",[]),this.options=e,this.options=ft(e,At,{copy:!0}),this.init()}get response(){return this.values.css="",this.sheets.forEach((e=>{const t=e.css;t&&(this.values.css+=t)})),this.values.css&&(this.values.css="\n".concat(this.values.css,"\n")),this.options.minify&&(this.values.css=this.values.css.replace(/\n/g,"").replace(/ ?(\{|:|,|>|~) ?/g,"$1").replace(/;(\})/g,"$1")),this.values}get css(){return this.response.css}get plugins(){const e=this;return{set add(t){(ge("array",t)?t:[t]).filter((t=>ge("object",t)&&ge("function",t.method)&&!kt.get(t.method,e,"plugin")||ge("function",t)&&!kt.get(t,e,"plugin"))).forEach((t=>{try{const r=ge("function",t)?t:t.method,a=ge("object",t)?t.arguments:[],i=r(e,...a);kt.add(r,i,e,"plugin")}catch(e){console.error("AmauiStyle use: ",e)}}))},set remove(t){(ge("array",t)?t:[t]).filter((t=>ge("object",t)&&ge("function",t.method)&&!kt.get(t.method,e,"plugin")||ge("function",t)&&!kt.get(t,e,"plugin"))).forEach((t=>{try{const r=ge("function",t)?t:t.method,a=kt.get(r,e,"plugin");ge("function",null==a?void 0:a.remove)&&a.remove()}catch(e){console.error("AmauiStyle remove plugin: ",e)}}))}}}init(){if(this.element=this.options.element||this.element,this.mode=this.options.mode||"regular",this.renderer=this.options.renderer||new Ot,void 0===this.id&&(this.id=Ee()),Re("browser")){this.element||(this.element=window.document.body),this.element.setAttribute("data-amaui-style","true"),this.element["amaui-style"]=!0,this.element.amaui_style=this;const e=rt((()=>window.getComputedStyle(this.element)));this.direction=(null==e?void 0:e.direction)||rt((()=>window.getComputedStyle(document.documentElement).direction))||"ltr",this.options.rule.rtl="rtl"===this.direction}}static get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.all(e);return r[-1===t?r.length-1:t]}static first(e){return this.get(e)}static last(e){return this.get(e,-1)}static nearest(e){var t;return null===(t=nt(e).nearest(this.attributes.map((e=>"[".concat(e,"]")))))||void 0===t?void 0:t.amaui_style}static furthest(e){var t;return null===(t=nt(e).furthest(this.attributes.map((e=>"[".concat(e,"]")))))||void 0===t?void 0:t.amaui_style}static all(e){return[e,...nt(e).parents(this.attributes.map((e=>"[".concat(e,"]"))))].filter(Boolean).map((e=>e.amaui_style)).filter(Boolean)||[]}}P(Et,"counter",{className:0,keyframesName:0}),P(Et,"attributes",["data-amaui-style","amaui-style"]);var Ft=Et,Mt={},Nt={exports:{}},Ct={exports:{}};!function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==l&&l.crypto&&(r=l.crypto),!r)try{r=require("crypto")}catch(e){}var a=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},o=s.lib={},n=o.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=o.WordArray=n.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,r=e.words,a=this.sigBytes,i=e.sigBytes;if(this.clamp(),a%4)for(var s=0;s<i;s++){var o=r[s>>>2]>>>24-s%4*8&255;t[a+s>>>2]|=o<<24-(a+s)%4*8}else for(var n=0;n<i;n+=4)t[a+n>>>2]=r[n>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=n.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(a());return new u.init(t,e)}}),c=s.enc={},d=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,a=[],i=0;i<r;i++){var s=t[i>>>2]>>>24-i%4*8&255;a.push((s>>>4).toString(16)),a.push((15&s).toString(16))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a<t;a+=2)r[a>>>3]|=parseInt(e.substr(a,2),16)<<24-a%8*4;return new u.init(r,t/2)}},p=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,a=[],i=0;i<r;i++){var s=t[i>>>2]>>>24-i%4*8&255;a.push(String.fromCharCode(s))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a<t;a++)r[a>>>2]|=(255&e.charCodeAt(a))<<24-a%4*8;return new u.init(r,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},f=o.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,a=this._data,i=a.words,s=a.sigBytes,o=this.blockSize,n=s/(4*o),l=(n=t?e.ceil(n):e.max((0|n)-this._minBufferSize,0))*o,c=e.min(4*l,s);if(l){for(var d=0;d<l;d+=o)this._doProcessBlock(i,d);r=i.splice(0,l),a.sigBytes-=c}return new u.init(r,c)},clone:function(){var e=n.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=f.extend({cfg:n.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new m.HMAC.init(e,r).finalize(t)}}});var m=s.algo={};return s}(Math),r)}(Ct),function(e,t){var r;e.exports=(r=Ct.exports,function(e){var t=r,a=t.lib,i=a.WordArray,s=a.Hasher,o=t.algo,n=[],l=[];!function(){function t(t){for(var r=e.sqrt(t),a=2;a<=r;a++)if(!(t%a))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var a=2,i=0;i<64;)t(a)&&(i<8&&(n[i]=r(e.pow(a,.5))),l[i]=r(e.pow(a,1/3)),i++),a++}();var u=[],c=o.SHA256=s.extend({_doReset:function(){this._hash=new i.init(n.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,a=r[0],i=r[1],s=r[2],o=r[3],n=r[4],c=r[5],d=r[6],p=r[7],h=0;h<64;h++){if(h<16)u[h]=0|e[t+h];else{var f=u[h-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,v=u[h-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=m+u[h-7]+y+u[h-16]}var b=a&i^a&s^i&s,g=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),w=p+((n<<26|n>>>6)^(n<<21|n>>>11)^(n<<7|n>>>25))+(n&c^~n&d)+l[h]+u[h];p=d,d=c,c=n,n=o+w|0,o=s,s=i,i=a,a=w+(g+b)|0}r[0]=r[0]+a|0,r[1]=r[1]+i|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+n|0,r[5]=r[5]+c|0,r[6]=r[6]+d|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,a=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(a/4294967296),r[15+(i+64>>>9<<4)]=a,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(c),t.HmacSHA256=s._createHmacHelper(c)}(Math),r.SHA256)}(Nt);var Bt=Nt.exports,$t={},zt=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($t,"__esModule",{value:!0});const Pt=zt(u.exports),Dt=(e,t)=>{let r=t(e);if(void 0===r)return"";try{(0,Pt.default)("object-like",r)&&(0,Pt.default)("not-array-object",r)&&null!==r&&(r=Object.assign({},r))}catch(e){}return(0,Pt.default)("object",r)?`{${Object.keys(r).sort().map((e=>`"${e}":${Dt(r[e],t)}`)).filter((e=>":"!==e.slice(-1))).join(",")}}`:(0,Pt.default)("array",r)?`[${r.map((e=>Dt(e,t))).filter(Boolean).join(",")}]`:(0,Pt.default)("string",r)?`"${r}"`:(e=>(0,Pt.default)("string",e)?e.replace(/(\s|\r|\n)+/," "):e)(JSON.stringify((e=>void 0===e?"undefined":e instanceof Function||e instanceof Object?e.toString():e)(r)))};$t.default=e=>{const t=new WeakSet;return Dt(e,(e=>{if("object"==typeof e&&null!==e){if(t.has(e))return;t.add(e)}return e}))};var Rt=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mt,"__esModule",{value:!0});const Tt=Rt(Nt.exports),It=Rt($t),Ut={serialize:!0,withPrefix:!0};var Wt=Mt.default=(e,t={})=>{const r=Object.assign(Object.assign({},Ut),t);let a=e;return r.serialize&&(a=(0,It.default)(a)),a=(0,Tt.default)(a).toString(),r.withPrefix?`0x${a}`:a};const Ht={value_version:"value",pure:!1,parents:[],sort:!0,prefix:!0,rtl:!0};class Vt{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ht;P(this,"value_version","value"),P(this,"pure",!1),P(this,"parents",[]),P(this,"values",{property:"",value:"",css:""}),this.value=e,this.property=t,this.options=r,this.init()}get parent(){return this.parents[this.parents.length-1]}get response(){return{css:this.values.css}}get css(){return this.response.css}updateValues(){this.values.css="".concat(this.values.property,": ").concat(this.values.value,";"),this.values.css.indexOf("undefined")>-1&&(this.values.css="")}init(e){var t,r,a,i;this.values.property=me(this.property),this.values.value=void 0!==e?e:this.value,this.value_version=this.options.value_version||"value",this.pure=void 0!==this.options.pure&&this.options.pure,this.owner=this.options.owner,this.parents=this.options.parents||[],this.amauiStyle=this.options.amauiStyle,this.amauiStyleSheet=this.options.amauiStyleSheet,this.amauiStyleRule=this.options.amauiStyleRule,void 0===this.id&&(this.id=Ee()),void 0===this.level&&(this.level=this.parents.length-1),this.parents.filter((e=>!(e instanceof er))).forEach((e=>e.rules_owned.push(this))),void 0===e&&["method","amaui_subscription"].indexOf(this.value_version)>-1&&("method"===this.value_version?this.values.value=rt((()=>this.value(this.amauiStyleSheet.props))):"amaui_subscription"===this.value_version&&(this.values.value=this.value.value,this.value.subscribed||(this.value.subscribed=[]),-1===this.value.subscribed.indexOf(this)&&(this.value.subscribe(this.update.bind(this)),this.value.subscribed.push(this))),this.values.value=ge("function",this.values.value)?rt((()=>this.values.value(this.amauiStyleSheet.props))):this.values.value),this.values.value=Se(this.values.property,this.values.value,this.amauiStyle).value[0];if(this.amauiStyle.options.rule.rtl&&(void 0===this.amauiStyleSheet||!1!==this.amauiStyleSheet.options.rule.rtl)&&(void 0===(null===(t=this.amauiStyleSheet)||void 0===t?void 0:t.amauiTheme)||this.amauiStyleSheet.amauiTheme.options.rule.rtl)&&!1!==(null===(r=this.parent)||void 0===r?void 0:r.options.rtl)){const e=this.amauiStyle.subscriptions.rule.rtl.map(this.values);var s,o;if(null!=e&&e.value)null!=e&&null!==(s=e.value)&&void 0!==s&&s.property&&(this.values.property=e.value.property),null!=e&&null!==(o=e.value)&&void 0!==o&&o.value&&(this.values.value=e.value.value)}if(this.amauiStyle.options.rule.prefix&&(void 0===this.amauiStyleSheet||!1!==this.amauiStyleSheet.options.rule.prefix)&&(void 0===(null===(a=this.amauiStyleSheet)||void 0===a?void 0:a.amauiTheme)||!1!==this.amauiStyleSheet.amauiTheme.options.rule.prefix)&&!1!==(null===(i=this.parent)||void 0===i?void 0:i.options.prefix)&&0!==this.values.property.indexOf("-")&&rt((()=>0!==this.values.value.indexOf("-")))){var n;const e=(null===(n=this.amauiStyle.subscriptions.rule.prefix.map({value:this.values.value,property:this.values.property}))||void 0===n?void 0:n.value)||[];e.length&&e.forEach((e=>{var t;!((null===(t=this.parent)||void 0===t?void 0:t.rules)||[]).find((t=>t instanceof Vt&&t.values.property===e.property&&t.values.value===e.value))&&this.parent&&Vt.make(e.value,e.property,{value_version:"value",pure:this.pure,owner:this.parent,parents:this.parents,amauiStyleRule:this.amauiStyleRule,amauiStyleSheet:this.parent.amauiStyleSheet,amauiStyle:this.parent.amauiStyle})}))}if(this.owner){this.owner.rules.find((e=>e.value.id===this.id))||this.owner.rules.push({property:this.property,value:this}),this.level_actual=this.owner.level_actual+1}this.updateValues()}update(e){var t;void 0!==e&&this.init(e),this.makeSelector(),void 0===e&&["method","amaui_subscription"].indexOf(this.value_version)>-1&&("method"===this.value_version?this.values.value=rt((()=>this.value(this.amauiStyleSheet.props))):"amaui_subscription"===this.value_version&&(this.values.value=this.value.value),this.values.value=ge("function",this.values.value)?rt((()=>this.values.value(this.amauiStyleSheet.props))):this.values.value,this.values.value=Se(this.values.property,this.values.value,this.amauiStyle).value[0]),this.updateValues();const r=this.amauiStyleSheet.domElementForTesting||Re("browser")&&window.document.createElement("div");r&&(r.style[this.values.property]=this.values.value);const a=(null==r||null===(t=r.style)||void 0===t?void 0:t[this.values.property])||this.values.value;if(this.owner.rule&&this.owner.rule.style[this.values.property]!==a){var i;const e=this.owner.owner.rule||this.owner.owner.sheet;if(ge("string",this.values.value)&&null!==(i=this.values.value)&&void 0!==i&&i.includes("!important")){let t=Array.from((null==e?void 0:e.cssRules)||[]).findIndex((e=>e===this.owner.rule));t>-1&&(rt((()=>e.deleteRule(t))),this.owner.updateValues(),t=rt((()=>e.insertRule(this.owner.values.css))),t>-1&&(this.owner.rule=e.cssRules[t]))}else rt((()=>this.owner.rule.style[this.values.property]=this.values.value));this.values.css="".concat(this.values.property,": ").concat(this.values.value,";")}}remove(){this.clear()}makeSelector(){if(["animation","animation-name"].some((e=>this.values.property.indexOf(e)>-1))){const e=xe(this.values.value),t=e.map((e=>this.amauiStyleSheet.amauiStyleSheetManager.names.keyframes[e])).filter(Boolean);e.forEach(((e,r)=>this.values.value=this.values.value.replace("$".concat(e),t[r]))),this.updateValues()}}clear(){var e;if(null!==(e=this.owner)&&void 0!==e&&e.rule&&(this.owner.rule.style[this.values.property]=""),this.owner){const e=this.owner.rules.findIndex((e=>e.value===this));e>-1&&this.owner.rules.splice(e,1)}this.parents.filter((e=>!(e instanceof er))).forEach((e=>{const t=e.rules_owned.findIndex((e=>e.value===this));t>-1&&e.rules_owned.splice(t,1)}))}static make(e,t){return new Vt(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{value_version:"value",pure:!1,parents:[this]})}}var qt=Vt;function Lt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[];const i=(e,t)=>{ge("string",e)&&e.length?a.push(e):ge("object",e)?Object.keys(e).forEach((t=>i(e[t],t))):ge("array",e)?e.forEach((e=>i(e))):t&&e&&a.push(t)};return i(e),a=a.filter(Boolean).map((e=>{let r=e.trim();return[".","#"].indexOf(r[0])>-1&&(r=r.slice(1)),"".concat(t||"").concat(r)})),a=j(a),r?a:a.join(" ")}const Zt={mode:"regular",value_version:"value",version:"property",pure:!1,index:0,sort:!0,prefix:!0,rtl:!0},Gt=B();class Jt{constructor(e,t){var r=this;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Zt;P(this,"value_version","value"),P(this,"mode","regular"),P(this,"version","property"),P(this,"pure",!1),P(this,"index",0),P(this,"parents",[]),P(this,"status","idle"),P(this,"isVariable",!1),P(this,"static",!0),P(this,"rules_owned",[]),P(this,"className_",""),P(this,"selector_",""),P(this,"classNames_",""),P(this,"keyframesName_",""),P(this,"values",{value:void 0,css:""}),P(this,"rules",[]),P(this,"makeRuleClassNameDefault",(function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"a";return"".concat((null===(e=