ranui 0.2.1-alpha.5 → 0.3.1-alpha.1
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/{button-Cj-XSCsd.js → button-Dw6YKyNd.js} +8 -8
- package/dist/button.js +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.js +1 -1
- package/dist/ranui.css +1 -1
- package/docs/COMPONENTS.md +2 -2
- package/docs/DESIGN.md +21 -22
- package/docs/style-tokens-public.md +89 -23
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as a, n as b, o as d, s as l, t as h, v as i } from "./utils-D1iZnChu.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
var
|
|
2
|
+
import { t as u } from "./events-C59wGdni.js";
|
|
3
|
+
import { _ as v, i as s, p as f } from "./factory-ZNhcQ4tf.js";
|
|
4
|
+
import { a as p, n as m } from "./ssr-DSGwPtEd.js";
|
|
5
|
+
var g = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #171717));color:var(--ran-btn-content-color, var(--ran-color-primary-text, #fff))}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-primary-text, #fff) 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-primary-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}', y = class extends m {
|
|
6
6
|
_btn;
|
|
7
7
|
_btnContent;
|
|
8
8
|
_iconElement;
|
|
9
9
|
_slot;
|
|
10
10
|
_shadowDom;
|
|
11
|
-
_events = new
|
|
11
|
+
_events = new u();
|
|
12
12
|
debounceTimeId;
|
|
13
13
|
static get observedAttributes() {
|
|
14
14
|
return [
|
|
@@ -21,7 +21,7 @@ var m = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
|
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
constructor() {
|
|
24
|
-
super(), this._shadowDom = b(this,
|
|
24
|
+
super(), this._shadowDom = b(this, g);
|
|
25
25
|
const t = h(this._shadowDom, ".ran-btn", () => s().class("ran-btn").attr("part", "button").role("button").tabIndex(0).children(s().class("ran-btn-content").attr("part", "content").children(f().class("slot"))).build());
|
|
26
26
|
this._btn = t, this._btnContent = t.querySelector(".ran-btn-content"), this._slot = t.querySelector("slot");
|
|
27
27
|
}
|
|
@@ -71,7 +71,7 @@ var m = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
|
|
|
71
71
|
if (this._iconElement) this._iconElement.setAttribute("name", t);
|
|
72
72
|
else {
|
|
73
73
|
let e = this._shadowDom.querySelector("r-icon");
|
|
74
|
-
e || (e =
|
|
74
|
+
e || (e = v("r-icon").attr("color", "currentColor").class("icon").build(), this._slot.insertAdjacentElement("beforebegin", e)), this._iconElement = e, this._iconElement.setAttribute("name", t);
|
|
75
75
|
}
|
|
76
76
|
const { width: n, height: r } = this._slot.getBoundingClientRect(), o = Math.min(n, r) || 16, c = this.iconSize || `${o > 5 ? o - 5 : o}`;
|
|
77
77
|
this._iconElement.setAttribute("size", String(c));
|
|
@@ -111,7 +111,7 @@ var m = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
|
|
|
111
111
|
n !== r && (t === "disabled" && this._btnContent && this.syncA11yState(), (t === "icon" || t === "iconSize") && this.setIcon(), t === "sheet" && this.handlerExternalCss());
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
p("r-button", y);
|
|
115
115
|
export {
|
|
116
116
|
y as t
|
|
117
117
|
};
|
package/dist/button.js
CHANGED
|
@@ -20,7 +20,7 @@ export declare class Button extends RanElement {
|
|
|
20
20
|
set icon(value: string | null);
|
|
21
21
|
get effect(): string;
|
|
22
22
|
set effect(value: string | null);
|
|
23
|
-
/** Visual variant: `''` (default) | `'primary'`
|
|
23
|
+
/** Visual variant: `''` (default) | `'primary'` (monochrome) | `'warning'` | `'text'`. Drives the `:host([type=...])` styles. */
|
|
24
24
|
get type(): string;
|
|
25
25
|
set type(value: string | null);
|
|
26
26
|
/**
|
package/dist/iife/button.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ranui_button=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=e=>typeof e==`function`,i=()=>{if(typeof window<`u`){let e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?`ipad`:/android/.test(e)?`android`:/iphone/.test(e)?`iphone`:`pc`}return`pc`},a=12e4,o=`__ranuts_bridge__`,s=`default`,c=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},l=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=s){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,c.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:o,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,i)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},a),s=e=>{clearTimeout(o),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{c.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new l(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new d(u[0],3609767458),new d(u[1],602891725),new d(u[2],3964484399),new d(u[3],2173295548),new d(u[4],4081628472),new d(u[5],3053834265),new d(u[6],2937671579),new d(u[7],3664609560),new d(u[8],2734883394),new d(u[9],1164996542),new d(u[10],1323610764),new d(u[11],3590304994),new d(u[12],4068182383),new d(u[13],991336113),new d(u[14],633803317),new d(u[15],3479774868),new d(u[16],2666613458),new d(u[17],944711139),new d(u[18],2341262773),new d(u[19],2007800933),new d(u[20],1495990901),new d(u[21],1856431235),new d(u[22],3175218132),new d(u[23],2198950837),new d(u[24],3999719339),new d(u[25],766784016),new d(u[26],2566594879),new d(u[27],3203337956),new d(u[28],1034457026),new d(u[29],2466948901),new d(u[30],3758326383),new d(u[31],168717936),new d(u[32],1188179964),new d(u[33],1546045734),new d(u[34],1522805485),new d(u[35],2643833823),new d(u[36],2343527390),new d(u[37],1014477480),new d(u[38],1206759142),new d(u[39],344077627),new d(u[40],1290863460),new d(u[41],3158454273),new d(u[42],3505952657),new d(u[43],106217008),new d(u[44],3606008344),new d(u[45],1432725776),new d(u[46],1467031594),new d(u[47],851169720),new d(u[48],3100823752),new d(u[49],1363258195),new d(u[50],3750685593),new d(u[51],3785050280),new d(u[52],3318307427),new d(u[53],3812723403),new d(u[54],2003034995),new d(u[55],3602036899),new d(u[56],1575990012),new d(u[57],1125592928),new d(u[58],2716904306),new d(u[59],442776044),new d(u[60],593698344),new d(u[61],3733110249),new d(u[62],2999351573),new d(u[63],3815920427),new d(3391569614,3928383900),new d(3515267271,566280711),new d(3940187606,3454069534),new d(4118630271,4000239992),new d(116418474,1914138554),new d(174292421,2731055270),new d(289380356,3203993006),new d(460393269,320620315),new d(685471733,587496836),new d(852142971,1086792851),new d(1017036298,365543100),new d(1126000580,2618297676),new d(1288033470,3409855158),new d(1501505948,4234509866),new d(1607167915,987167468),new d(1816402316,1246189591),new d(0,1),new d(0,32898),new d(2147483648,32906),new d(2147483648,2147516416),new d(0,32907),new d(0,2147483649),new d(2147483648,2147516545),new d(2147483648,32777),new d(0,138),new d(0,136),new d(0,2147516425),new d(0,2147483658),new d(0,2147516555),new d(2147483648,139),new d(2147483648,32905),new d(2147483648,32771),new d(2147483648,32770),new d(2147483648,128),new d(0,32778),new d(2147483648,2147483658),new d(2147483648,2147516545),new d(2147483648,32896),new d(0,2147483649),new d(2147483648,2147516424);var f=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(f),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(f);var ee=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{box-sizing:var(--ran-btn-box-sizing,border-box);position:var(--ran-btn-position,relative);display:var(--ran-btn-display,inline-flex);background-image:var(--ran-btn-background-image,none);box-shadow:var(--ran-btn-box-shadow,var(--ran-skin-raised-shadow,0 2px #00000004));cursor:var(--ran-btn-cursor,pointer);user-select:var(--ran-btn-user-select,none);touch-action:var(--ran-btn-touch-action,manipulation);overflow:var(--ran-btn-overflow,hidden);pointer-events:var(--ran-btn-pointer-events,auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing,border-box);position:var(--ran-btn-contain-position,relative);display:var(--ran-btn-contain-display,block);background-image:var(--ran-btn-contain-background-image,none);cursor:var(--ran-btn-contain-cursor,pointer);transition:var(--ran-btn-contain-transition,opacity var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-standard,cubic-bezier(.645, .045, .355, 1)));user-select:var(--ran-btn-contain-user-select,none);touch-action:var(--ran-btn-contain-touch-action,manipulation);border-radius:var(--ran-btn-content-border-radius,var(--ran-radius-sm,6px));background:var(--ran-btn-contain-background,var(--ran-color-bg-elevated,#fff))}:host,:host(:active),:host(:focus){-webkit-tap-highlight-color:transparent;outline:0}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline,0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset,2px)}:host([type=primary]) .ran-btn-content{background-color:var(--ran-btn-content-background-color,var(--ran-color-primary,#006bff));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-content-border-color,var(--ran-color-primary,#006bff));color:var(--ran-btn-content-color,#fff)}:host([type=primary]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type=primary]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color,var(--ran-color-primary-active,#005ff2));border-color:var(--ran-btn-content-active-border-color,var(--ran-color-primary-active,#005ff2))}:host([type=contrast]) .ran-btn-content{background-color:var(--ran-btn-content-background-color,var(--ran-color-contrast-bg,#171717));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-content-border-color,var(--ran-color-contrast-bg,#171717));color:var(--ran-btn-content-color,var(--ran-color-contrast-text,#fff))}:host([type=contrast]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, var(--ran-color-contrast-text,#fff) 10%, transparent 10.01%))}:host([type=contrast]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color,var(--ran-color-contrast-bg-active,#4d4d4d));border-color:var(--ran-btn-content-active-border-color,var(--ran-color-contrast-bg-active,#4d4d4d))}@media (width>=1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color,var(--ran-color-border-hover,#c9c9c9));color:var(--ran-btn-content-hover-color,var(--ran-color-text,#171717))}:host([type=primary]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color,var(--ran-color-primary-hover,#0059ec));border-color:var(--ran-btn-content-hover-border-color,var(--ran-color-primary-hover,#0059ec));color:var(--ran-btn-content-hover-color,#fff)}:host([type=contrast]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color,var(--ran-color-contrast-bg-hover,#383838));border-color:var(--ran-btn-content-hover-border-color,var(--ran-color-contrast-bg-hover,#383838));color:var(--ran-btn-content-hover-color,var(--ran-color-contrast-text,#fff))}:host([type=warning]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-content-warning-background-color,var(--ran-color-danger,#ff4d4f));color:var(--ran-btn-content-warning-color,#fff)}}:host([type=warning]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-content-warning-background-color,var(--ran-color-danger,#ff4d4f));background-image:var(--ran-btn-content-background-image,none);color:var(--ran-btn-content-warning-color,#fff)}:host([type=warning]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type=text]) .ran-btn-content{border:var(--ran-btn-content-text-border,none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events,all);opacity:var(--ran-btn-disabled-opacity,.6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events,all);opacity:var(--ran-btn-disabled-container-opacity,.6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform,translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity,.3);transition:var(--ran-btn-after-transition,0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform,scale(.96))}@media (width>=1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";width:100%;height:100%;left:var(--ran-x,0);top:var(--ran-y,0);pointer-events:none;background-image:radial-gradient(circle, var(--ran-gray-alpha-400,#00000014) 10%, transparent 10.01%);opacity:0;background-position:50%;background-repeat:no-repeat;transition:transform .3s,opacity .8s;display:block;position:absolute;transform:translate(-50%,-50%)scale(10)}}:host .slot{display:var(--ran-btn-slot-display,block)}.ran-btn-content{display:var(--ran-btn-content-display,flex);justify-content:var(--ran-btn-content-display,space-between);align-items:var(--ran-btn-content-align-items,center);padding:var(--ran-btn-content-padding,4px 15px);border:var(--ran-btn-content-border,1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source,none);border-image-slice:var(--ran-btn-content-border-image-slice,8);border-image-width:var(--ran-btn-content-border-image-width,4px);border-radius:var(--ran-btn-content-border-radius,var(--ran-radius-sm,6px));border-color:var(--ran-btn-content-border-color,var(--ran-color-border,#eaeaea));color:var(--ran-btn-content-color,var(--ran-color-text,#000000d9));line-height:var(--ran-btn-content-line-height,22px);font-size:var(--ran-btn-content-font-size,14px);font-weight:var(--ran-btn-content-font-weight,400);font-family:var(--ran-btn-content-font-family,var(--ran-skin-font-family,inherit));white-space:var(--ran-btn-content-white-space,nowrap);text-align:var(--ran-btn-content-text-align,center);box-sizing:var(--ran-btn-content-box-sizing,border-box);transition:var(--ran-btn-content-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));border-image-outset:0;border-image-repeat:stretch}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right,2px)}@media (prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}`,p=typeof document>`u`,te=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},m=0,h=1,g=2,_=null,v=null,y=0,b=new Set,x=!1;function S(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ie(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)E(e,g);y===0&&D()}}]}function C(e){let t=ne(e,!0);return re(t),k(t),()=>j(t)}function w(e){let t={owned:[],cleanups:[],owner:v},n=v,r=_;v=t,_=null;try{return e(()=>ae(t))}finally{v=n,_=r}}function T(e){v&&v.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:g,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:v}}function re(e){v&&v.owned.push(e)}function ie(e){_&&(_.sources.add(e),e.observers.add(_))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===m;if(e.state=t,e.isEffect)b.add(e);else if(n)for(let t of e.observers)E(t,h)}function D(){if(!(y>0||x)){x=!0;try{for(;b.size>0;){let e=[...b];b.clear();for(let t of e)t.disposed||O(t)}}finally{x=!1}}}function O(e){if(!(e.disposed||e.state===m)){if(e.state===h)for(let t of e.sources)`fn`in t&&O(t);e.state===g&&k(e),e.state=m}}function k(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);A(e);let t=_,n=v;_=e,v=e,e.running=!0,e.state=m;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)E(t,g)}}finally{e.running=!1,_=t,v=n}}function A(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function j(e){e.disposed||(e.disposed=!0,A(e),e.observers.clear())}function ae(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function M(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function N(e){return M(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},P=(e,t,n)=>{for(let r of e)oe(r)&&(se(r,t)&&n.push(r),P(r.childrenList,t,n))},F=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?M(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}},I=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new F)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ce(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``):a+=M(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ce=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${M(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``)}</template>`}},L=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(L(t)):e.concat(t),[]),R=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?p?e:document.createTextNode(e):e,le=(e,t)=>{if(p){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};C(()=>{let e=t();a();let n=document.createDocumentFragment();i=w(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),T(()=>i?.())},ue=`__ranFor`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,z=(e,t,n)=>{let[r,i]=S(t),a=null,o=w(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},B=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},V=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;T(()=>{for(let e of r.values())e.dispose();r.clear()}),C(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=z(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();B(n,a),r=i})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=S(e),a=null,o=w(e=>{let i=R(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];T(()=>{for(let e of r)e.dispose();r=[]}),C(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(me(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}B(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{L(t).forEach(t=>{if(de(t)){V(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){le(e,t);return}let n=R(t);n!=null&&e.appendChild(n)})},U=class{el;constructor(e){this.el=p?new I(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?C(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{p?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(p){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(p)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(p)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return p?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),_e=()=>W(`slot`),K=[!1,`false`,null,void 0],q=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!K.includes(n))},ve=new Map;function ye(e,t){p?(ve.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var be=typeof document<`u`?HTMLElement:I,J=new Map,Y=new Map,xe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!J.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),J.set(t,e)}let n=J.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},X=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Y.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Y.set(t,e)}let n=Y.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Se=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),xe(r,t?`${t}\n${Q}`:Q),r},Ce=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},we=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&X(t,a)},$=class extends be{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new te;debounceTimeId;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`type`,`sheet`]}constructor(){super(),this._shadowDom=Se(this,ee);let e=Ce(this._shadowDom,`.ran-btn`,()=>G().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(G().class(`ran-btn-content`).attr(`part`,`content`).children(_e().class(`slot`))).build());this._btn=e,this._btnContent=e.querySelector(`.ran-btn-content`),this._slot=e.querySelector(`slot`)}get sheet(){return this.getAttribute(`sheet`)||``}set sheet(e){this.setAttribute(`sheet`,e||``),this.handlerExternalCss()}get disabled(){return q(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`)):(this.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`))}get iconSize(){return this.getAttribute(`iconSize`)||``}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):(this.setAttribute(`iconSize`,e),this.setIcon())}get icon(){return this.getAttribute(`icon`)||``}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):(this.setAttribute(`icon`,e),this.setIcon())}get effect(){return this.getAttribute(`effect`)||``}set effect(e){K.includes(e)||!e?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}setIcon=()=>{if(typeof document>`u`||!this._slot)return;let e=this.icon;if(!e){this._iconElement&&=(this._iconElement.remove(),void 0);return}if(this._iconElement)this._iconElement.setAttribute(`name`,e);else{let t=this._shadowDom.querySelector(`r-icon`);t||(t=W(`r-icon`).attr(`color`,`currentColor`).class(`icon`).build(),this._slot.insertAdjacentElement(`beforebegin`,t)),this._iconElement=t,this._iconElement.setAttribute(`name`,e)}let{width:t,height:n}=this._slot.getBoundingClientRect(),r=Math.min(t,n)||16,i=this.iconSize||`${r>5?r-5:r}`;this._iconElement.setAttribute(`size`,String(i))};mousedown=e=>{if(i()===`pc`&&!this.disabled){this.debounceMouseEvent();let{left:t,top:n}=this.getBoundingClientRect();this._btn.style.setProperty(`--ran-x`,`${e.clientX-t}px`),this._btn.style.setProperty(`--ran-y`,`${e.clientY-n}px`)}};mouseup=()=>{i()===`pc`&&(this.debounceTimeId||=setTimeout(()=>{this._btn.style.removeProperty(`--ran-x`),this._btn.style.removeProperty(`--ran-y`),this.debounceMouseEvent()},600))};keydown=e=>{q(this)||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{we(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=q(this);this._btn.setAttribute(`aria-disabled`,e?`true`:`false`),this._btn.tabIndex=e?-1:0,e?(this.setAttribute(`aria-disabled`,`true`),this._btnContent.setAttribute(`disabled`,`true`)):(this.removeAttribute(`aria-disabled`),this._btnContent.removeAttribute(`disabled`))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this._events.on(this._btn,`mousedown`,this.mousedown).on(this._btn,`mouseup`,this.mouseup).on(this._btn,`keydown`,this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._btnContent&&this.syncA11yState(),(e===`icon`||e===`iconSize`)&&this.setIcon(),e===`sheet`&&this.handlerExternalCss())}};return ye(`r-button`,$),e.Button=$,e.default=$,e})({});
|
|
1
|
+
var ranui_button=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=e=>typeof e==`function`,i=()=>{if(typeof window<`u`){let e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?`ipad`:/android/.test(e)?`android`:/iphone/.test(e)?`iphone`:`pc`}return`pc`},a=12e4,o=`__ranuts_bridge__`,s=`default`,c=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},l=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=s){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,c.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:o,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,i)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},a),s=e=>{clearTimeout(o),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{c.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new l(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new d(u[0],3609767458),new d(u[1],602891725),new d(u[2],3964484399),new d(u[3],2173295548),new d(u[4],4081628472),new d(u[5],3053834265),new d(u[6],2937671579),new d(u[7],3664609560),new d(u[8],2734883394),new d(u[9],1164996542),new d(u[10],1323610764),new d(u[11],3590304994),new d(u[12],4068182383),new d(u[13],991336113),new d(u[14],633803317),new d(u[15],3479774868),new d(u[16],2666613458),new d(u[17],944711139),new d(u[18],2341262773),new d(u[19],2007800933),new d(u[20],1495990901),new d(u[21],1856431235),new d(u[22],3175218132),new d(u[23],2198950837),new d(u[24],3999719339),new d(u[25],766784016),new d(u[26],2566594879),new d(u[27],3203337956),new d(u[28],1034457026),new d(u[29],2466948901),new d(u[30],3758326383),new d(u[31],168717936),new d(u[32],1188179964),new d(u[33],1546045734),new d(u[34],1522805485),new d(u[35],2643833823),new d(u[36],2343527390),new d(u[37],1014477480),new d(u[38],1206759142),new d(u[39],344077627),new d(u[40],1290863460),new d(u[41],3158454273),new d(u[42],3505952657),new d(u[43],106217008),new d(u[44],3606008344),new d(u[45],1432725776),new d(u[46],1467031594),new d(u[47],851169720),new d(u[48],3100823752),new d(u[49],1363258195),new d(u[50],3750685593),new d(u[51],3785050280),new d(u[52],3318307427),new d(u[53],3812723403),new d(u[54],2003034995),new d(u[55],3602036899),new d(u[56],1575990012),new d(u[57],1125592928),new d(u[58],2716904306),new d(u[59],442776044),new d(u[60],593698344),new d(u[61],3733110249),new d(u[62],2999351573),new d(u[63],3815920427),new d(3391569614,3928383900),new d(3515267271,566280711),new d(3940187606,3454069534),new d(4118630271,4000239992),new d(116418474,1914138554),new d(174292421,2731055270),new d(289380356,3203993006),new d(460393269,320620315),new d(685471733,587496836),new d(852142971,1086792851),new d(1017036298,365543100),new d(1126000580,2618297676),new d(1288033470,3409855158),new d(1501505948,4234509866),new d(1607167915,987167468),new d(1816402316,1246189591),new d(0,1),new d(0,32898),new d(2147483648,32906),new d(2147483648,2147516416),new d(0,32907),new d(0,2147483649),new d(2147483648,2147516545),new d(2147483648,32777),new d(0,138),new d(0,136),new d(0,2147516425),new d(0,2147483658),new d(0,2147516555),new d(2147483648,139),new d(2147483648,32905),new d(2147483648,32771),new d(2147483648,32770),new d(2147483648,128),new d(0,32778),new d(2147483648,2147483658),new d(2147483648,2147516545),new d(2147483648,32896),new d(0,2147483649),new d(2147483648,2147516424);var f=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(f),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(f);var ee=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{box-sizing:var(--ran-btn-box-sizing,border-box);position:var(--ran-btn-position,relative);display:var(--ran-btn-display,inline-flex);background-image:var(--ran-btn-background-image,none);box-shadow:var(--ran-btn-box-shadow,var(--ran-skin-raised-shadow,0 2px #00000004));cursor:var(--ran-btn-cursor,pointer);user-select:var(--ran-btn-user-select,none);touch-action:var(--ran-btn-touch-action,manipulation);overflow:var(--ran-btn-overflow,hidden);pointer-events:var(--ran-btn-pointer-events,auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing,border-box);position:var(--ran-btn-contain-position,relative);display:var(--ran-btn-contain-display,block);background-image:var(--ran-btn-contain-background-image,none);cursor:var(--ran-btn-contain-cursor,pointer);transition:var(--ran-btn-contain-transition,opacity var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-standard,cubic-bezier(.645, .045, .355, 1)));user-select:var(--ran-btn-contain-user-select,none);touch-action:var(--ran-btn-contain-touch-action,manipulation);border-radius:var(--ran-btn-content-border-radius,var(--ran-radius-sm,6px));background:var(--ran-btn-contain-background,var(--ran-color-bg-elevated,#fff))}:host,:host(:active),:host(:focus){-webkit-tap-highlight-color:transparent;outline:0}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline,0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset,2px)}:host([type=primary]) .ran-btn-content{background-color:var(--ran-btn-content-background-color,var(--ran-color-primary,#171717));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-content-border-color,var(--ran-color-primary,#171717));color:var(--ran-btn-content-color,var(--ran-color-primary-text,#fff))}:host([type=primary]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, var(--ran-color-primary-text,#fff) 10%, transparent 10.01%))}:host([type=primary]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color,var(--ran-color-primary-active,#4d4d4d));border-color:var(--ran-btn-content-active-border-color,var(--ran-color-primary-active,#4d4d4d))}@media (width>=1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color,var(--ran-color-border-hover,#c9c9c9));color:var(--ran-btn-content-hover-color,var(--ran-color-text,#171717))}:host([type=primary]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color,var(--ran-color-primary-hover,#383838));border-color:var(--ran-btn-content-hover-border-color,var(--ran-color-primary-hover,#383838));color:var(--ran-btn-content-hover-color,var(--ran-color-primary-text,#fff))}:host([type=warning]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-content-warning-background-color,var(--ran-color-danger,#ff4d4f));color:var(--ran-btn-content-warning-color,#fff)}}:host([type=warning]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-content-warning-background-color,var(--ran-color-danger,#ff4d4f));background-image:var(--ran-btn-content-background-image,none);color:var(--ran-btn-content-warning-color,#fff)}:host([type=warning]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type=text]) .ran-btn-content{border:var(--ran-btn-content-text-border,none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events,all);opacity:var(--ran-btn-disabled-opacity,.6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events,all);opacity:var(--ran-btn-disabled-container-opacity,.6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform,translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity,.3);transition:var(--ran-btn-after-transition,0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform,scale(.96))}@media (width>=1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";width:100%;height:100%;left:var(--ran-x,0);top:var(--ran-y,0);pointer-events:none;background-image:radial-gradient(circle, var(--ran-gray-alpha-400,#00000014) 10%, transparent 10.01%);opacity:0;background-position:50%;background-repeat:no-repeat;transition:transform .3s,opacity .8s;display:block;position:absolute;transform:translate(-50%,-50%)scale(10)}}:host .slot{display:var(--ran-btn-slot-display,block)}.ran-btn-content{display:var(--ran-btn-content-display,flex);justify-content:var(--ran-btn-content-display,space-between);align-items:var(--ran-btn-content-align-items,center);padding:var(--ran-btn-content-padding,4px 15px);border:var(--ran-btn-content-border,1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source,none);border-image-slice:var(--ran-btn-content-border-image-slice,8);border-image-width:var(--ran-btn-content-border-image-width,4px);border-radius:var(--ran-btn-content-border-radius,var(--ran-radius-sm,6px));border-color:var(--ran-btn-content-border-color,var(--ran-color-border,#eaeaea));color:var(--ran-btn-content-color,var(--ran-color-text,#000000d9));line-height:var(--ran-btn-content-line-height,22px);font-size:var(--ran-btn-content-font-size,14px);font-weight:var(--ran-btn-content-font-weight,400);font-family:var(--ran-btn-content-font-family,var(--ran-skin-font-family,inherit));white-space:var(--ran-btn-content-white-space,nowrap);text-align:var(--ran-btn-content-text-align,center);box-sizing:var(--ran-btn-content-box-sizing,border-box);transition:var(--ran-btn-content-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));border-image-outset:0;border-image-repeat:stretch}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right,2px)}@media (prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}`,p=typeof document>`u`,te=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},m=0,h=1,g=2,_=null,v=null,y=0,b=new Set,x=!1;function S(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ie(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)E(e,g);y===0&&D()}}]}function C(e){let t=ne(e,!0);return re(t),k(t),()=>j(t)}function w(e){let t={owned:[],cleanups:[],owner:v},n=v,r=_;v=t,_=null;try{return e(()=>ae(t))}finally{v=n,_=r}}function T(e){v&&v.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:g,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:v}}function re(e){v&&v.owned.push(e)}function ie(e){_&&(_.sources.add(e),e.observers.add(_))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===m;if(e.state=t,e.isEffect)b.add(e);else if(n)for(let t of e.observers)E(t,h)}function D(){if(!(y>0||x)){x=!0;try{for(;b.size>0;){let e=[...b];b.clear();for(let t of e)t.disposed||O(t)}}finally{x=!1}}}function O(e){if(!(e.disposed||e.state===m)){if(e.state===h)for(let t of e.sources)`fn`in t&&O(t);e.state===g&&k(e),e.state=m}}function k(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);A(e);let t=_,n=v;_=e,v=e,e.running=!0,e.state=m;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)E(t,g)}}finally{e.running=!1,_=t,v=n}}function A(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function j(e){e.disposed||(e.disposed=!0,A(e),e.observers.clear())}function ae(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function M(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function N(e){return M(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},P=(e,t,n)=>{for(let r of e)oe(r)&&(se(r,t)&&n.push(r),P(r.childrenList,t,n))},F=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?M(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}},I=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new F)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ce(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``):a+=M(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ce=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${M(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``)}</template>`}},L=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(L(t)):e.concat(t),[]),R=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?p?e:document.createTextNode(e):e,le=(e,t)=>{if(p){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};C(()=>{let e=t();a();let n=document.createDocumentFragment();i=w(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),T(()=>i?.())},ue=`__ranFor`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,z=(e,t,n)=>{let[r,i]=S(t),a=null,o=w(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},B=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},V=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;T(()=>{for(let e of r.values())e.dispose();r.clear()}),C(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=z(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();B(n,a),r=i})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=S(e),a=null,o=w(e=>{let i=R(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];T(()=>{for(let e of r)e.dispose();r=[]}),C(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(me(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}B(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{L(t).forEach(t=>{if(de(t)){V(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){le(e,t);return}let n=R(t);n!=null&&e.appendChild(n)})},U=class{el;constructor(e){this.el=p?new I(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?C(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{p?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(p){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(p)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(p)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return p?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),_e=()=>W(`slot`),K=[!1,`false`,null,void 0],q=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!K.includes(n))},ve=new Map;function ye(e,t){p?(ve.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var be=typeof document<`u`?HTMLElement:I,J=new Map,Y=new Map,xe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!J.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),J.set(t,e)}let n=J.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},X=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Y.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Y.set(t,e)}let n=Y.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Se=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),xe(r,t?`${t}\n${Q}`:Q),r},Ce=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},we=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&X(t,a)},$=class extends be{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new te;debounceTimeId;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`type`,`sheet`]}constructor(){super(),this._shadowDom=Se(this,ee);let e=Ce(this._shadowDom,`.ran-btn`,()=>G().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(G().class(`ran-btn-content`).attr(`part`,`content`).children(_e().class(`slot`))).build());this._btn=e,this._btnContent=e.querySelector(`.ran-btn-content`),this._slot=e.querySelector(`slot`)}get sheet(){return this.getAttribute(`sheet`)||``}set sheet(e){this.setAttribute(`sheet`,e||``),this.handlerExternalCss()}get disabled(){return q(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`)):(this.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`))}get iconSize(){return this.getAttribute(`iconSize`)||``}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):(this.setAttribute(`iconSize`,e),this.setIcon())}get icon(){return this.getAttribute(`icon`)||``}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):(this.setAttribute(`icon`,e),this.setIcon())}get effect(){return this.getAttribute(`effect`)||``}set effect(e){K.includes(e)||!e?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}setIcon=()=>{if(typeof document>`u`||!this._slot)return;let e=this.icon;if(!e){this._iconElement&&=(this._iconElement.remove(),void 0);return}if(this._iconElement)this._iconElement.setAttribute(`name`,e);else{let t=this._shadowDom.querySelector(`r-icon`);t||(t=W(`r-icon`).attr(`color`,`currentColor`).class(`icon`).build(),this._slot.insertAdjacentElement(`beforebegin`,t)),this._iconElement=t,this._iconElement.setAttribute(`name`,e)}let{width:t,height:n}=this._slot.getBoundingClientRect(),r=Math.min(t,n)||16,i=this.iconSize||`${r>5?r-5:r}`;this._iconElement.setAttribute(`size`,String(i))};mousedown=e=>{if(i()===`pc`&&!this.disabled){this.debounceMouseEvent();let{left:t,top:n}=this.getBoundingClientRect();this._btn.style.setProperty(`--ran-x`,`${e.clientX-t}px`),this._btn.style.setProperty(`--ran-y`,`${e.clientY-n}px`)}};mouseup=()=>{i()===`pc`&&(this.debounceTimeId||=setTimeout(()=>{this._btn.style.removeProperty(`--ran-x`),this._btn.style.removeProperty(`--ran-y`),this.debounceMouseEvent()},600))};keydown=e=>{q(this)||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{we(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=q(this);this._btn.setAttribute(`aria-disabled`,e?`true`:`false`),this._btn.tabIndex=e?-1:0,e?(this.setAttribute(`aria-disabled`,`true`),this._btnContent.setAttribute(`disabled`,`true`)):(this.removeAttribute(`aria-disabled`),this._btnContent.removeAttribute(`disabled`))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this._events.on(this._btn,`mousedown`,this.mousedown).on(this._btn,`mouseup`,this.mouseup).on(this._btn,`keydown`,this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._btnContent&&this.syncA11yState(),(e===`icon`||e===`iconSize`)&&this.setIcon(),e===`sheet`&&this.handlerExternalCss())}};return ye(`r-button`,$),e.Button=$,e.default=$,e})({});
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fs=require("./rolldown-runtime-CAnuVJ4g.cjs");var hi="ran-theme",kr=null,Ir=null,pi=r=>{if(r&&"style"in r)return r;if(r&&"documentElement"in r)return r.documentElement;if(!(typeof document>"u"))return document.documentElement},_o=r=>{const c=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;r.setAttribute("data-ran-theme",c?"dark":"light"),r.setAttribute("theme",c?"dark":"light")},xd=()=>{kr&&Ir&&(kr.removeEventListener("change",Ir),kr=null,Ir=null)},Va=(r,c)=>{const g=pi(c);if(g){if(xd(),r==="system"){if(typeof window>"u")return;_o(g),kr=window.matchMedia("(prefers-color-scheme: dark)"),Ir=()=>_o(g),kr.addEventListener("change",Ir);try{localStorage.setItem(hi,"system")}catch{}return}g.setAttribute("data-ran-theme",r),g.setAttribute("theme",r);try{localStorage.setItem(hi,r)}catch{}}},ps=r=>{const c=pi(r);if(!c)return"";const g=c.getAttribute("data-ran-theme")||c.getAttribute("theme")||"";if(g==="light"||g==="dark"){try{if(localStorage.getItem(hi)==="system")return"system"}catch{}return g}return""},As=(r,c,g)=>{const A=pi(g);A&&A.style.setProperty(r,String(c))},ms=(r,c)=>{const g=pi(c);g&&g.style.removeProperty(r)},Td=(r,c)=>{Object.entries(r).forEach(([g,A])=>{if(A==null){ms(g,c);return}As(g,A,c)})},Dd=r=>{if(!(typeof localStorage>"u"))try{const c=localStorage.getItem(hi);(c==="light"||c==="dark"||c==="system")&&Va(c,r)}catch{}},vs=class{_events=new Map;tap=(r,c)=>{this._events.get(r)&&r!==Symbol.for("NEW_LISTENER")&&this.call(Symbol.for("NEW_LISTENER"),r);const g=this._events.get(r)||new Set;return typeof c=="function"?g.add({name:r,callback:c}):g.add(c),this._events.set(r,g),this};call=(r,...c)=>((this._events.get(r)||new Set).forEach(g=>{const{callback:A}=g;A(...c)}),this);callSync=async(r,...c)=>{const g=this._events.get(r)||new Set;for(const A of g){const{callback:k}=A;await k(...c)}return this};once=(r,c)=>{let g;if(typeof c=="function")g={name:r,callback:(...A)=>{c(...A),this.off(r,g)},initialCallback:c};else{const{callback:A}=c;g={name:r,callback:(...k)=>{A(...k),this.off(r,g)},initialCallback:A}}return this.tap(r,g),this};off=(r,c)=>{const g=[...this._events.get(r)||new Set].filter(A=>{if(typeof c=="function")return A.callback!==c&&A.initialCallback!==c;{const{callback:k}=c;return A.callback!==k&&A.initialCallback!==k}});return this._events.set(r,new Set(g)),this}},Qa=(r=8)=>Math.random().toString(36).substring(2,r+2),Wo=(r="")=>{if(r.length===0)return 0;if(r.endsWith("%")){const c=Number(r.replace("%",""));return c>1?c/100:c}return Number(r)},Gt=(r,c=0,g=1)=>Math.min(g,Math.max(c,r)),Rd=r=>typeof r=="function";function si(r){return r<10?`0${r}`:r}var Je=r=>{if(r===0)return"00:00";if(!r)return"";const c=Math.trunc(r/3600),g=Math.trunc(r%3600/60),A=si(Math.trunc(r-3600*c-60*g));return c===0?`${si(g)}:${A}`:`${si(c)}:${si(g)}:${A}`},Xo=()=>{if(typeof window<"u"){const r=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(r)?"ipad":/android/.test(r)?"android":/iphone/.test(r)?"iphone":"pc"}return"pc"},bs=typeof window<"u",Br=()=>{if(!bs)return!1;const r=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(r)},vr=r=>{const c=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||1;return(bs&&window.devicePixelRatio||1)/c},Md=12e4,Fd="__ranuts_bridge__",Od="default",Zo=new class{bridges=new Set;attachedWindow=null;handleMessage=r=>{for(const c of Array.from(this.bridges))c.receive(r)};add(r){this.bridges.add(r),typeof window<"u"&&this.attachedWindow!==window&&(window.addEventListener("message",this.handleMessage),this.attachedWindow=window)}remove(r){this.bridges.delete(r),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener("message",this.handleMessage),this.attachedWindow=null)}},Pd=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(r,c="*",g=Od){this.targetOrigin=c,this.channel=g,this.senderId=Qa(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<"u",this.available?(this.targetWindow=r??window,Zo.add(this)):this.targetWindow=void 0}post(r,c){const g={...c,__bridge:Fd,channel:this.channel,senderId:this.senderId};r.postMessage(g,this.targetOrigin)}receive=r=>{if(!this.available||this.targetOrigin!=="*"&&r.origin!==this.targetOrigin||r.source&&r.source!==this.targetWindow)return;const c=r.data;if(!c||typeof c!="object"||c.__bridge!=="__ranuts_bridge__"||(c.channel??"default")!==this.channel)return;const{type:g,payload:A,id:k,isResponse:B,isError:D,senderId:O}=c;if(B&&k){const X=this.pendingRequests.get(k);X&&(D?X.reject(new Error(typeof A=="string"?A:"Bridge request failed")):X.resolve(A),this.pendingRequests.delete(k));return}if(O&&O===this.senderId||typeof g!="string"||!this.messageHandlers.has(g))return;const Y=this.messageHandlers.get(g);if(Rd(Y)){const X=r.source??this.targetWindow;Promise.resolve(Y(A)).then(wt=>{k&&this.post(X,{type:g,payload:wt,id:k,isResponse:!0})}).catch(wt=>{k&&this.post(X,{type:g,payload:wt instanceof Error?wt.message:String(wt),id:k,isResponse:!0,isError:!0})})}};on=(r,c)=>{this.messageHandlers.set(r,c)};off=r=>{this.messageHandlers.delete(r)};send=async(r,c)=>{if(!this.available)return Promise.reject(new Error("PostMessageBridge is unavailable outside a browser environment"));const g=Qa(10);return new Promise((A,k)=>{const B=setTimeout(()=>{this.pendingRequests.has(g)&&(this.pendingRequests.delete(g),k(new Error("Request timeout")))},Md),D=O=>{clearTimeout(B),k(O)};this.pendingRequests.set(g,{resolve:O=>{clearTimeout(B),A(O)},reject:D});try{this.post(this.targetWindow,{type:r,payload:c,id:g})}catch(O){this.pendingRequests.delete(g),D(O instanceof Error?O:new Error("Failed to post message"))}})};broadcast=r=>{if(this.available)try{this.post(this.targetWindow,{type:r.type,payload:r.payload})}catch{}};destroy=()=>{Zo.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(r=>{r.reject(new Error("Bridge destroyed"))}),this.pendingRequests.clear()}},Ud=class Cr{static instance;bridges=new Map;constructor(){}static getInstance(){return Cr.instance||(Cr.instance=new Cr),Cr.instance}connectClient=({id:c,targetOrigin:g,targetWindow:A,channel:k})=>{const B=new Pd(A,g,k);if(c||(c=Qa(10)),this.bridges.has(c))throw new Error(`Bridge ${c} already exists`);return this.bridges.set(c,B),{bridge:B,id:c}};getClient=c=>this.bridges.get(c);removeClient=c=>{const g=this.bridges.get(c);g&&(g.destroy(),this.bridges.delete(c))};removeAllClient=()=>{this.bridges.forEach(c=>{c.destroy()}),this.bridges.clear()};broadcast=c=>{this.bridges.forEach(g=>{g.broadcast(c)})};sendTo=(c,g,A)=>{const k=this.getClient(c);return k?k.send(g,A):Promise.reject(new Error(`Bridge ${c} not found`))}},zg=Ud.getInstance(),Vg=new vs,z=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],N=class{highOrder;lowOrder;constructor(r,c){this.highOrder=r,this.lowOrder=c}},qg=[new N(z[0],3609767458),new N(z[1],602891725),new N(z[2],3964484399),new N(z[3],2173295548),new N(z[4],4081628472),new N(z[5],3053834265),new N(z[6],2937671579),new N(z[7],3664609560),new N(z[8],2734883394),new N(z[9],1164996542),new N(z[10],1323610764),new N(z[11],3590304994),new N(z[12],4068182383),new N(z[13],991336113),new N(z[14],633803317),new N(z[15],3479774868),new N(z[16],2666613458),new N(z[17],944711139),new N(z[18],2341262773),new N(z[19],2007800933),new N(z[20],1495990901),new N(z[21],1856431235),new N(z[22],3175218132),new N(z[23],2198950837),new N(z[24],3999719339),new N(z[25],766784016),new N(z[26],2566594879),new N(z[27],3203337956),new N(z[28],1034457026),new N(z[29],2466948901),new N(z[30],3758326383),new N(z[31],168717936),new N(z[32],1188179964),new N(z[33],1546045734),new N(z[34],1522805485),new N(z[35],2643833823),new N(z[36],2343527390),new N(z[37],1014477480),new N(z[38],1206759142),new N(z[39],344077627),new N(z[40],1290863460),new N(z[41],3158454273),new N(z[42],3505952657),new N(z[43],106217008),new N(z[44],3606008344),new N(z[45],1432725776),new N(z[46],1467031594),new N(z[47],851169720),new N(z[48],3100823752),new N(z[49],1363258195),new N(z[50],3750685593),new N(z[51],3785050280),new N(z[52],3318307427),new N(z[53],3812723403),new N(z[54],2003034995),new N(z[55],3602036899),new N(z[56],1575990012),new N(z[57],1125592928),new N(z[58],2716904306),new N(z[59],442776044),new N(z[60],593698344),new N(z[61],3733110249),new N(z[62],2999351573),new N(z[63],3815920427),new N(3391569614,3928383900),new N(3515267271,566280711),new N(3940187606,3454069534),new N(4118630271,4000239992),new N(116418474,1914138554),new N(174292421,2731055270),new N(289380356,3203993006),new N(460393269,320620315),new N(685471733,587496836),new N(852142971,1086792851),new N(1017036298,365543100),new N(1126000580,2618297676),new N(1288033470,3409855158),new N(1501505948,4234509866),new N(1607167915,987167468),new N(1816402316,1246189591)],_g=[new N(0,1),new N(0,32898),new N(2147483648,32906),new N(2147483648,2147516416),new N(0,32907),new N(0,2147483649),new N(2147483648,2147516545),new N(2147483648,32777),new N(0,138),new N(0,136),new N(0,2147516425),new N(0,2147483658),new N(0,2147516555),new N(2147483648,139),new N(2147483648,32905),new N(2147483648,32771),new N(2147483648,32770),new N(2147483648,128),new N(0,32778),new N(2147483648,2147483658),new N(2147483648,2147516545),new N(2147483648,32896),new N(0,2147483649),new N(2147483648,2147516424)],br=(r,c=500)=>{let g;return(...A)=>{clearTimeout(g),g=setTimeout(()=>{r.apply(void 0,A)},c)}},de=(r,c)=>{if(typeof document>"u")return;const g=r.classList;g.contains(c)||g.add(c)},be=(r,c)=>{if(typeof document>"u")return;const g=r.classList;g.contains(c)&&g.remove(c)},ys=()=>{let r=0,c=null;return function(g,A=300){return function(...k){const B=Date.now();B-r>=A?(c!=null&&(clearTimeout(c),c=null),r=B,g.apply(this,k)):c??=window.setTimeout(()=>{r=Date.now(),g.apply(this,k),c=null},A-(B-r))}}},Ia=new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[103,"Early Hints"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[208,"Already Reported"],[226,"IM Used"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Found"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[308,"Permanent Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a Teapot"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]]),Wg={message:Ia,code:(function(r){const c=new Map;for(const[g,A]of r)c.set(A.toLowerCase(),g);return c})(Ia),codes:(function(r){const c=[];for(const[g,A]of r)c.push(g);return c})(Ia),redirect:{300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},empty:{204:!0,205:!0,304:!0},retry:{502:!0,503:!0,504:!0}},Qd='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #006bff));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #006bff));color:var(--ran-btn-content-color, #fff)}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #005ff2));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #005ff2))}:host([type="contrast"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-contrast-bg, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-contrast-bg, #171717));color:var(--ran-btn-content-color, var(--ran-color-contrast-text, #fff))}:host([type="contrast"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-contrast-text, #fff) 10%, transparent 10.01%))}:host([type="contrast"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-contrast-bg-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-contrast-bg-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #0059ec));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #0059ec));color:var(--ran-btn-content-hover-color, #fff)}:host([type="contrast"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-contrast-bg-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-contrast-bg-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-contrast-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}',zt=typeof document>"u",xt=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(r,c,g,A){return r.addEventListener(c,g,{...A,signal:this.ac.signal}),this}delegate(r,c,g,A,k){return r.addEventListener(g,B=>{const D=B.target?.closest(c);D&&r.contains(D)&&A(B,D)},{...k,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},ui=0,ws=1,Ai=2,ye=null,jt=null,Cs=0,di=new Set,Ba=!1;function qa(r,c){const g=c?.equals??Object.is,A={value:r,observers:new Set};return[()=>(Kd(A),A.value),D=>{const O=typeof D=="function"?D(A.value):D;if(!g(A.value,O)){A.value=O;for(const Y of A.observers)_a(Y,Ai);Cs===0&&Yd()}}]}function Ee(r){const c=Nd(r,!0);return Hd(c),ks(c),()=>Wa(c)}function mi(r){const c={owned:[],cleanups:[],owner:jt},g=jt,A=ye;jt=c,ye=null;try{return r(()=>Gd(c))}finally{jt=g,ye=A}}function vi(r){jt&&jt.cleanups.push(r)}function Nd(r,c,g){return{fn:r,sources:new Set,isEffect:c,running:!1,disposed:!1,state:Ai,observers:new Set,value:void 0,equals:g??Object.is,owned:[],cleanups:[],owner:jt}}function Hd(r){jt&&jt.owned.push(r)}function Kd(r){ye&&(ye.sources.add(r),r.observers.add(ye))}function _a(r,c){if(r.disposed||r.state>=c)return;const g=r.state===ui;if(r.state=c,r.isEffect)di.add(r);else if(g)for(const A of r.observers)_a(A,ws)}function Yd(){if(!(Cs>0||Ba)){Ba=!0;try{for(;di.size>0;){const r=[...di];di.clear();for(const c of r)c.disposed||Es(c)}}finally{Ba=!1}}}function Es(r){if(!(r.disposed||r.state===ui)){if(r.state===ws)for(const c of r.sources)"fn"in c&&Es(c);r.state===Ai&&ks(r),r.state=ui}}function ks(r){if(r.running)throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");Is(r);const c=ye,g=jt;ye=r,jt=r,r.running=!0,r.state=ui;try{const A=r.fn();if(r.isEffect)typeof A=="function"&&r.cleanups.push(A);else{const k=r.value;if(r.value=A,r.observers.size>0&&!r.equals(k,A))for(const B of r.observers)_a(B,Ai)}}finally{r.running=!1,ye=c,jt=g}}function Is(r){for(const c of r.owned)Wa(c);r.owned.length=0;for(const c of r.cleanups)c();r.cleanups.length=0;for(const c of r.sources)c.observers.delete(r);r.sources.clear()}function Wa(r){r.disposed||(r.disposed=!0,Is(r),r.observers.clear())}function Gd(r){for(const c of r.owned)Wa(c);r.owned.length=0;for(const c of r.cleanups)c();r.cleanups.length=0}function je(r){return typeof r!="string"?String(r):r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Jo(r){return je(r)}var zd=r=>typeof r=="string"?!1:"tagName"in r&&"childrenList"in r,Vd=(r,c)=>{const g=c.trim();if(!g)return!1;if(g.startsWith("."))return r.classList.contains(g.slice(1));if(g.startsWith("#"))return r.getAttribute("id")===g.slice(1);if(g.startsWith("[")&&g.endsWith("]")){const[A,k]=g.slice(1,-1).trim().split("="),B=(A||"").trim();if(!B)return!1;if(k==null)return r.hasAttribute(B);const D=k.trim().replace(/^['"]|['"]$/g,"");return r.getAttribute(B)===D}return r.tagName===g.toLowerCase()},bi=(r,c,g)=>{for(const A of r)zd(A)&&(Vd(A,c)&&g.push(A),bi(A.childrenList,c,g))},Na=class{childrenList=[];appendChild(r){return this.childrenList.push(r),r}serialize(){return this.childrenList.map(r=>typeof r=="string"?je(r):r.serialize()).join("")}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}},Xa=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(r,c)=>{const g=r.startsWith("--")?r:r.replace(/([A-Z])/g,"-$1").toLowerCase();this.inlineStyles.set(g,c)},removeProperty:r=>this.inlineStyles.delete(r)};classList={add:(...r)=>{const c=this.attributes.get("class")||"",g=new Set([...c.split(" ").filter(Boolean),...r]);this.attributes.set("class",Array.from(g).join(" "))},remove:(...r)=>{const c=(this.attributes.get("class")||"").split(" ").filter(g=>!r.includes(g));this.attributes.set("class",c.join(" "))},toggle:r=>{this.classList.contains(r)?this.classList.remove(r):this.classList.add(r)},contains:r=>(this.attributes.get("class")||"").split(" ").includes(r)};_innerHTML="";get innerHTML(){return this._innerHTML}set innerHTML(r){this._innerHTML=r,this.tagName==="template"&&this.content&&(this.content.childrenList=[r])}constructor(r="div"){this.tagName=r.toLowerCase(),this.tagName==="template"&&(this.content=new Na)}get hidden(){return this.hasAttribute("hidden")}set hidden(r){r?this.setAttribute("hidden",""):this.removeAttribute("hidden")}setAttribute(r,c){this.attributes.set(r,c)}getAttribute(r){return this.attributes.get(r)||null}removeAttribute(r){this.attributes.delete(r)}hasAttribute(r){return this.attributes.has(r)}appendChild(r){return this.childrenList.push(r),r}attachShadow(r){return this.shadowRoot=new qd(this,r),this.shadowRoot}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}addEventListener(r,c){const g=this.eventListeners.get(r)||new Set;g.add(c),this.eventListeners.set(r,g)}removeEventListener(r,c){const g=this.eventListeners.get(r);g&&(g.delete(c),g.size===0&&this.eventListeners.delete(r))}dispatchEvent(r){const c=this.eventListeners.get(r.type);if(!c||c.size===0)return!0;for(const g of c)typeof g=="function"?g.call(this,r):g.handleEvent(r);return!r.defaultPrevented}serialize(r){typeof this._preSerialize=="function"&&this._preSerialize();const c=r||this._ssrTag||this.tagName,g=Array.from(this.attributes.entries()).map(([D,O])=>` ${D}="${Jo(O)}"`).join(""),A=Array.from(this.inlineStyles.entries()).map(([D,O])=>`${D}:${O}`).join(";"),k=A?` style="${Jo(A)}"`:"";let B="";return this.shadowRoot&&(B+=this.shadowRoot.serialize()),this.textContent!==null?B+=je(this.textContent):this._innerHTML?B+=this._innerHTML:B+=this.childrenList.map(D=>typeof D=="string"?je(D):(D instanceof Na,D.serialize())).join(""),["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(c)&&!B?`<${c}${g}${k} />`:`<${c}${g}${k}>${B}</${c}>`}},qd=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(r,c){this.host=r,this.options=c}appendChild(r){return this.childrenList.push(r),r}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?" shadowrootdelegatesfocus":""}>${this.adoptedStyleSheets.map(r=>`<style>${je(r)}</style>`).join("")}${this.childrenList.map(r=>typeof r=="string"?je(r):(r instanceof Na,r.serialize())).join("")}</template>`}},Bs=r=>r.reduce((c,g)=>Array.isArray(g)?c.concat(Bs(g)):c.concat(g),[]),Sr=r=>r==null?null:r instanceof Ss?r.build():typeof r=="string"?zt?r:document.createTextNode(r):r,_d=(r,c)=>{if(zt){gi(r,[c()]);return}const g=document.createComment(""),A=document.createComment("");r.appendChild(g),r.appendChild(A);let k=null;const B=()=>{k?.(),k=null;let D=g.nextSibling;for(;D&&D!==A;){const O=D.nextSibling;D.parentNode?.removeChild(D),D=O}};Ee(()=>{const D=c();B();const O=document.createDocumentFragment();k=mi(Y=>(gi(O,[D]),Y)),A.parentNode?.insertBefore(O,A)}),vi(()=>k?.())},Wd="__ranFor",Xd=r=>typeof r=="object"&&r!==null&&r[Wd]===!0,Zd=(r,c,g)=>{const[A,k]=qa(c);let B=null;const D=mi(O=>{const Y=Sr(g(r,A));return B=typeof Y=="string"?document.createTextNode(Y):Y,O});return{node:B,index:k,dispose:D}},Ls=(r,c)=>{const g=r.parentNode;if(!g)return;let A=r;for(const k of c)A.nextSibling!==k&&g.insertBefore(k,A.nextSibling),A=k},Jd=(r,c)=>{if(zt){(c.each()??[]).forEach((k,B)=>{const D=Sr(c.render(k,()=>B));D!=null&&r.appendChild(D)});return}const g=document.createComment("");r.appendChild(g);let A=new Map;vi(()=>{for(const k of A.values())k.dispose();A.clear()}),Ee(()=>{const k=c.each()??[],B=new Map,D=[];k.forEach((O,Y)=>{const X=c.key(O,Y);if(B.has(X))return;let wt=A.get(X);wt?(A.delete(X),wt.index(Y)):wt=Zd(O,Y,c.render),B.set(X,wt),wt.node&&D.push(wt.node)});for(const O of A.values())O.node?.parentNode?.removeChild(O.node),O.dispose();Ls(g,D),A=B})},jd="__ranIndex",$d=r=>typeof r=="object"&&r!==null&&r[jd]===!0,th=(r,c,g)=>{const[A,k]=qa(r);let B=null;const D=mi(O=>{const Y=Sr(g(A,c));return B=typeof Y=="string"?document.createTextNode(Y):Y,O});return{node:B,setItem:k,dispose:D}},eh=(r,c)=>{if(zt){(c.each()??[]).forEach((k,B)=>{const D=Sr(c.render(()=>k,B));D!=null&&r.appendChild(D)});return}const g=document.createComment("");r.appendChild(g);let A=[];vi(()=>{for(const k of A)k.dispose();A=[]}),Ee(()=>{const k=c.each()??[];for(let B=0;B<k.length;B++)B<A.length?A[B].setItem(k[B]):A.push(th(k[B],B,c.render));for(let B=A.length-1;B>=k.length;B--){const{node:D}=A[B];D?.parentNode?.removeChild(D),A[B].dispose(),A.pop()}Ls(g,A.map(B=>B.node).filter(B=>B!=null))})},gi=(r,c)=>{Bs(c).forEach(g=>{if(Xd(g)){Jd(r,g);return}if($d(g)){eh(r,g);return}if(typeof g=="function"){_d(r,g);return}const A=Sr(g);A!=null&&r.appendChild(A)})},Ss=class{el;constructor(r){this.el=zt?new Xa(r):document.createElement(r)}id(r){return this.el.setAttribute("id",r),this}bind(r,c){typeof r=="function"?Ee(()=>c(r())):c(r)}class(r){return this.bind(r,c=>{zt?this.el.attributes.set("class",c):this.el.className=c}),this}addClass(...r){return r.forEach(c=>this.el.classList.add(c)),this}removeClass(...r){return r.forEach(c=>this.el.classList.remove(c)),this}attr(r,c){return this.bind(c,g=>this.el.setAttribute(r,g)),this}attrs(r){return Object.entries(r).forEach(([c,g])=>{g!=null&&this.el.setAttribute(c,String(g))}),this}boolAttr(r,c,g=""){return this.bind(c,A=>{A?this.el.setAttribute(r,g):this.el.removeAttribute(r)}),this}part(r){return this.attr("part",r)}data(r,c){return this.attr(`data-${r}`,c)}style(r,c){return typeof r=="string"?this.bind(c??"",g=>this.el.style.setProperty(r,g)):Object.entries(r).forEach(([g,A])=>this.el.style.setProperty(g,A)),this}cssVar(r,c){const g=r.startsWith("--")?r:`--${r}`;return this.style(g,c)}aria(r,c){return this.attr(`aria-${r}`,c)}role(r){return this.attr("role",r)}tabIndex(r){return this.attr("tabindex",String(r))}label(r){return this.aria("label",r)}labelledBy(r){return this.aria("labelledby",r)}describedBy(r){return this.aria("describedby",r)}ariaHidden(r=!0){return this.aria("hidden",String(r))}on(r,c,g){return this.el.addEventListener(r,c,g),this}listen(r,c,g,A){return r.on(this.el,c,g,A),this}delegate(r,c,g,A,k){return r.delegate(this.el,c,g,A,k),this}children(...r){return gi(this.el,r),this}replaceChildren(...r){if(zt){const c=this.el;c.childrenList=[]}else this.el.replaceChildren();return this.children(...r)}text(r){return this.bind(r,c=>{this.el.textContent=c}),this}ref(r){return r.current=this.el,this}shadow(r={mode:"closed"}){const c=this.el.attachShadow(r);return new rh(this.el,c,r)}build(){return this.el}serialize(){if(zt)return this.el.serialize();const r=document.createElement("div");return r.appendChild(this.el.cloneNode(!0)),r.innerHTML}},rh=class{root;hostEl;options;constructor(r,c,g){this.hostEl=r,this.root=c,this.options=g}children(...r){return gi(this.root,r),this}adoptSheet(...r){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...r],this}css(r){if(zt)return this.root.adoptedStyleSheets.push(r),this;if(typeof CSSStyleSheet<"u")try{const g=new CSSStyleSheet;return g.replaceSync(r),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,g],this}catch{}const c=document.createElement("style");return c.textContent=r,this.root.appendChild(c),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return zt?this.root.serialize():this.root.innerHTML}},rt=r=>new Ss(r),x=()=>rt("div"),ke=()=>rt("span"),Bt=()=>rt("slot"),Ha=()=>rt("button"),Za=()=>rt("input"),ih=()=>rt("style"),ah=()=>rt("label"),ce=[!1,"false",null,void 0],yt=r=>{const c=r.hasAttribute("disabled"),g=r.getAttribute("disabled");return!!(c&&!ce.includes(g))},xs=new Map;function dt(r,c){zt?(xs.set(r,c),c.prototype._ssrTag=r):customElements.get(r)||customElements.define(r,c)}function nh(){return xs}var Ts=()=>typeof document<"u"?HTMLElement:Xa,ct=Ts(),oh=r=>{if(r.tagName&&r.tagName!=="div")return r.tagName;const c=nh();for(const[g,A]of c)if(r instanceof A)return g;return r.constructor.name.toLowerCase()},sh=r=>{if(!r)return"";const c=oh(r);return typeof r.serialize=="function"||r instanceof Xa?r.serialize(c):""},La=new Map,Sa=new Map,lh=(r,c)=>{if(!(typeof document>"u")&&c){if(typeof CSSStyleSheet<"u")try{if(!La.has(c)){const A=new CSSStyleSheet;A.replaceSync(c),La.set(c,A)}const g=La.get(c);r.adoptedStyleSheets.includes(g)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,g]);return}catch{}if(!r.querySelector("style[data-ranui]")){const g=document.createElement("style");g.setAttribute("data-ranui",""),g.textContent=c,r.appendChild(g)}}},ch=(r,c)=>{if(!(typeof document>"u")&&c){if(typeof CSSStyleSheet<"u")try{if(!Sa.has(c)){const A=new CSSStyleSheet;A.replaceSync(c),Sa.set(c,A)}const g=Sa.get(c);r.adoptedStyleSheets.includes(g)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,g]);return}catch{}if(!Array.from(r.querySelectorAll("style[data-ranui-sheet]")).some(g=>g.textContent===c)){const g=document.createElement("style");g.setAttribute("data-ranui-sheet",""),g.textContent=c,r.appendChild(g)}}},jo=new WeakMap,$o="@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}",ht=(r,c="",g={mode:"closed"})=>{const A=r.shadowRoot||jo.get(r)||r.attachShadow(g);return jo.set(r,A),lh(A,c?`${c}
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fs=require("./rolldown-runtime-CAnuVJ4g.cjs");var hi="ran-theme",kr=null,Ir=null,pi=r=>{if(r&&"style"in r)return r;if(r&&"documentElement"in r)return r.documentElement;if(!(typeof document>"u"))return document.documentElement},_o=r=>{const c=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;r.setAttribute("data-ran-theme",c?"dark":"light"),r.setAttribute("theme",c?"dark":"light")},xd=()=>{kr&&Ir&&(kr.removeEventListener("change",Ir),kr=null,Ir=null)},Va=(r,c)=>{const g=pi(c);if(g){if(xd(),r==="system"){if(typeof window>"u")return;_o(g),kr=window.matchMedia("(prefers-color-scheme: dark)"),Ir=()=>_o(g),kr.addEventListener("change",Ir);try{localStorage.setItem(hi,"system")}catch{}return}g.setAttribute("data-ran-theme",r),g.setAttribute("theme",r);try{localStorage.setItem(hi,r)}catch{}}},ps=r=>{const c=pi(r);if(!c)return"";const g=c.getAttribute("data-ran-theme")||c.getAttribute("theme")||"";if(g==="light"||g==="dark"){try{if(localStorage.getItem(hi)==="system")return"system"}catch{}return g}return""},As=(r,c,g)=>{const A=pi(g);A&&A.style.setProperty(r,String(c))},ms=(r,c)=>{const g=pi(c);g&&g.style.removeProperty(r)},Td=(r,c)=>{Object.entries(r).forEach(([g,A])=>{if(A==null){ms(g,c);return}As(g,A,c)})},Dd=r=>{if(!(typeof localStorage>"u"))try{const c=localStorage.getItem(hi);(c==="light"||c==="dark"||c==="system")&&Va(c,r)}catch{}},vs=class{_events=new Map;tap=(r,c)=>{this._events.get(r)&&r!==Symbol.for("NEW_LISTENER")&&this.call(Symbol.for("NEW_LISTENER"),r);const g=this._events.get(r)||new Set;return typeof c=="function"?g.add({name:r,callback:c}):g.add(c),this._events.set(r,g),this};call=(r,...c)=>((this._events.get(r)||new Set).forEach(g=>{const{callback:A}=g;A(...c)}),this);callSync=async(r,...c)=>{const g=this._events.get(r)||new Set;for(const A of g){const{callback:k}=A;await k(...c)}return this};once=(r,c)=>{let g;if(typeof c=="function")g={name:r,callback:(...A)=>{c(...A),this.off(r,g)},initialCallback:c};else{const{callback:A}=c;g={name:r,callback:(...k)=>{A(...k),this.off(r,g)},initialCallback:A}}return this.tap(r,g),this};off=(r,c)=>{const g=[...this._events.get(r)||new Set].filter(A=>{if(typeof c=="function")return A.callback!==c&&A.initialCallback!==c;{const{callback:k}=c;return A.callback!==k&&A.initialCallback!==k}});return this._events.set(r,new Set(g)),this}},Qa=(r=8)=>Math.random().toString(36).substring(2,r+2),Wo=(r="")=>{if(r.length===0)return 0;if(r.endsWith("%")){const c=Number(r.replace("%",""));return c>1?c/100:c}return Number(r)},Gt=(r,c=0,g=1)=>Math.min(g,Math.max(c,r)),Rd=r=>typeof r=="function";function si(r){return r<10?`0${r}`:r}var Je=r=>{if(r===0)return"00:00";if(!r)return"";const c=Math.trunc(r/3600),g=Math.trunc(r%3600/60),A=si(Math.trunc(r-3600*c-60*g));return c===0?`${si(g)}:${A}`:`${si(c)}:${si(g)}:${A}`},Xo=()=>{if(typeof window<"u"){const r=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(r)?"ipad":/android/.test(r)?"android":/iphone/.test(r)?"iphone":"pc"}return"pc"},bs=typeof window<"u",Br=()=>{if(!bs)return!1;const r=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(r)},vr=r=>{const c=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||1;return(bs&&window.devicePixelRatio||1)/c},Md=12e4,Fd="__ranuts_bridge__",Od="default",Zo=new class{bridges=new Set;attachedWindow=null;handleMessage=r=>{for(const c of Array.from(this.bridges))c.receive(r)};add(r){this.bridges.add(r),typeof window<"u"&&this.attachedWindow!==window&&(window.addEventListener("message",this.handleMessage),this.attachedWindow=window)}remove(r){this.bridges.delete(r),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener("message",this.handleMessage),this.attachedWindow=null)}},Pd=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(r,c="*",g=Od){this.targetOrigin=c,this.channel=g,this.senderId=Qa(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<"u",this.available?(this.targetWindow=r??window,Zo.add(this)):this.targetWindow=void 0}post(r,c){const g={...c,__bridge:Fd,channel:this.channel,senderId:this.senderId};r.postMessage(g,this.targetOrigin)}receive=r=>{if(!this.available||this.targetOrigin!=="*"&&r.origin!==this.targetOrigin||r.source&&r.source!==this.targetWindow)return;const c=r.data;if(!c||typeof c!="object"||c.__bridge!=="__ranuts_bridge__"||(c.channel??"default")!==this.channel)return;const{type:g,payload:A,id:k,isResponse:B,isError:D,senderId:O}=c;if(B&&k){const X=this.pendingRequests.get(k);X&&(D?X.reject(new Error(typeof A=="string"?A:"Bridge request failed")):X.resolve(A),this.pendingRequests.delete(k));return}if(O&&O===this.senderId||typeof g!="string"||!this.messageHandlers.has(g))return;const Y=this.messageHandlers.get(g);if(Rd(Y)){const X=r.source??this.targetWindow;Promise.resolve(Y(A)).then(wt=>{k&&this.post(X,{type:g,payload:wt,id:k,isResponse:!0})}).catch(wt=>{k&&this.post(X,{type:g,payload:wt instanceof Error?wt.message:String(wt),id:k,isResponse:!0,isError:!0})})}};on=(r,c)=>{this.messageHandlers.set(r,c)};off=r=>{this.messageHandlers.delete(r)};send=async(r,c)=>{if(!this.available)return Promise.reject(new Error("PostMessageBridge is unavailable outside a browser environment"));const g=Qa(10);return new Promise((A,k)=>{const B=setTimeout(()=>{this.pendingRequests.has(g)&&(this.pendingRequests.delete(g),k(new Error("Request timeout")))},Md),D=O=>{clearTimeout(B),k(O)};this.pendingRequests.set(g,{resolve:O=>{clearTimeout(B),A(O)},reject:D});try{this.post(this.targetWindow,{type:r,payload:c,id:g})}catch(O){this.pendingRequests.delete(g),D(O instanceof Error?O:new Error("Failed to post message"))}})};broadcast=r=>{if(this.available)try{this.post(this.targetWindow,{type:r.type,payload:r.payload})}catch{}};destroy=()=>{Zo.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(r=>{r.reject(new Error("Bridge destroyed"))}),this.pendingRequests.clear()}},Ud=class Cr{static instance;bridges=new Map;constructor(){}static getInstance(){return Cr.instance||(Cr.instance=new Cr),Cr.instance}connectClient=({id:c,targetOrigin:g,targetWindow:A,channel:k})=>{const B=new Pd(A,g,k);if(c||(c=Qa(10)),this.bridges.has(c))throw new Error(`Bridge ${c} already exists`);return this.bridges.set(c,B),{bridge:B,id:c}};getClient=c=>this.bridges.get(c);removeClient=c=>{const g=this.bridges.get(c);g&&(g.destroy(),this.bridges.delete(c))};removeAllClient=()=>{this.bridges.forEach(c=>{c.destroy()}),this.bridges.clear()};broadcast=c=>{this.bridges.forEach(g=>{g.broadcast(c)})};sendTo=(c,g,A)=>{const k=this.getClient(c);return k?k.send(g,A):Promise.reject(new Error(`Bridge ${c} not found`))}},zg=Ud.getInstance(),Vg=new vs,z=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],N=class{highOrder;lowOrder;constructor(r,c){this.highOrder=r,this.lowOrder=c}},qg=[new N(z[0],3609767458),new N(z[1],602891725),new N(z[2],3964484399),new N(z[3],2173295548),new N(z[4],4081628472),new N(z[5],3053834265),new N(z[6],2937671579),new N(z[7],3664609560),new N(z[8],2734883394),new N(z[9],1164996542),new N(z[10],1323610764),new N(z[11],3590304994),new N(z[12],4068182383),new N(z[13],991336113),new N(z[14],633803317),new N(z[15],3479774868),new N(z[16],2666613458),new N(z[17],944711139),new N(z[18],2341262773),new N(z[19],2007800933),new N(z[20],1495990901),new N(z[21],1856431235),new N(z[22],3175218132),new N(z[23],2198950837),new N(z[24],3999719339),new N(z[25],766784016),new N(z[26],2566594879),new N(z[27],3203337956),new N(z[28],1034457026),new N(z[29],2466948901),new N(z[30],3758326383),new N(z[31],168717936),new N(z[32],1188179964),new N(z[33],1546045734),new N(z[34],1522805485),new N(z[35],2643833823),new N(z[36],2343527390),new N(z[37],1014477480),new N(z[38],1206759142),new N(z[39],344077627),new N(z[40],1290863460),new N(z[41],3158454273),new N(z[42],3505952657),new N(z[43],106217008),new N(z[44],3606008344),new N(z[45],1432725776),new N(z[46],1467031594),new N(z[47],851169720),new N(z[48],3100823752),new N(z[49],1363258195),new N(z[50],3750685593),new N(z[51],3785050280),new N(z[52],3318307427),new N(z[53],3812723403),new N(z[54],2003034995),new N(z[55],3602036899),new N(z[56],1575990012),new N(z[57],1125592928),new N(z[58],2716904306),new N(z[59],442776044),new N(z[60],593698344),new N(z[61],3733110249),new N(z[62],2999351573),new N(z[63],3815920427),new N(3391569614,3928383900),new N(3515267271,566280711),new N(3940187606,3454069534),new N(4118630271,4000239992),new N(116418474,1914138554),new N(174292421,2731055270),new N(289380356,3203993006),new N(460393269,320620315),new N(685471733,587496836),new N(852142971,1086792851),new N(1017036298,365543100),new N(1126000580,2618297676),new N(1288033470,3409855158),new N(1501505948,4234509866),new N(1607167915,987167468),new N(1816402316,1246189591)],_g=[new N(0,1),new N(0,32898),new N(2147483648,32906),new N(2147483648,2147516416),new N(0,32907),new N(0,2147483649),new N(2147483648,2147516545),new N(2147483648,32777),new N(0,138),new N(0,136),new N(0,2147516425),new N(0,2147483658),new N(0,2147516555),new N(2147483648,139),new N(2147483648,32905),new N(2147483648,32771),new N(2147483648,32770),new N(2147483648,128),new N(0,32778),new N(2147483648,2147483658),new N(2147483648,2147516545),new N(2147483648,32896),new N(0,2147483649),new N(2147483648,2147516424)],br=(r,c=500)=>{let g;return(...A)=>{clearTimeout(g),g=setTimeout(()=>{r.apply(void 0,A)},c)}},de=(r,c)=>{if(typeof document>"u")return;const g=r.classList;g.contains(c)||g.add(c)},be=(r,c)=>{if(typeof document>"u")return;const g=r.classList;g.contains(c)&&g.remove(c)},ys=()=>{let r=0,c=null;return function(g,A=300){return function(...k){const B=Date.now();B-r>=A?(c!=null&&(clearTimeout(c),c=null),r=B,g.apply(this,k)):c??=window.setTimeout(()=>{r=Date.now(),g.apply(this,k),c=null},A-(B-r))}}},Ia=new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[103,"Early Hints"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[208,"Already Reported"],[226,"IM Used"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Found"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[308,"Permanent Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a Teapot"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]]),Wg={message:Ia,code:(function(r){const c=new Map;for(const[g,A]of r)c.set(A.toLowerCase(),g);return c})(Ia),codes:(function(r){const c=[];for(const[g,A]of r)c.push(g);return c})(Ia),redirect:{300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},empty:{204:!0,205:!0,304:!0},retry:{502:!0,503:!0,504:!0}},Qd='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #171717));color:var(--ran-btn-content-color, var(--ran-color-primary-text, #fff))}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-primary-text, #fff) 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-primary-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}',zt=typeof document>"u",xt=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(r,c,g,A){return r.addEventListener(c,g,{...A,signal:this.ac.signal}),this}delegate(r,c,g,A,k){return r.addEventListener(g,B=>{const D=B.target?.closest(c);D&&r.contains(D)&&A(B,D)},{...k,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},ui=0,ws=1,Ai=2,ye=null,jt=null,Cs=0,di=new Set,Ba=!1;function qa(r,c){const g=c?.equals??Object.is,A={value:r,observers:new Set};return[()=>(Kd(A),A.value),D=>{const O=typeof D=="function"?D(A.value):D;if(!g(A.value,O)){A.value=O;for(const Y of A.observers)_a(Y,Ai);Cs===0&&Yd()}}]}function Ee(r){const c=Nd(r,!0);return Hd(c),ks(c),()=>Wa(c)}function mi(r){const c={owned:[],cleanups:[],owner:jt},g=jt,A=ye;jt=c,ye=null;try{return r(()=>Gd(c))}finally{jt=g,ye=A}}function vi(r){jt&&jt.cleanups.push(r)}function Nd(r,c,g){return{fn:r,sources:new Set,isEffect:c,running:!1,disposed:!1,state:Ai,observers:new Set,value:void 0,equals:g??Object.is,owned:[],cleanups:[],owner:jt}}function Hd(r){jt&&jt.owned.push(r)}function Kd(r){ye&&(ye.sources.add(r),r.observers.add(ye))}function _a(r,c){if(r.disposed||r.state>=c)return;const g=r.state===ui;if(r.state=c,r.isEffect)di.add(r);else if(g)for(const A of r.observers)_a(A,ws)}function Yd(){if(!(Cs>0||Ba)){Ba=!0;try{for(;di.size>0;){const r=[...di];di.clear();for(const c of r)c.disposed||Es(c)}}finally{Ba=!1}}}function Es(r){if(!(r.disposed||r.state===ui)){if(r.state===ws)for(const c of r.sources)"fn"in c&&Es(c);r.state===Ai&&ks(r),r.state=ui}}function ks(r){if(r.running)throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");Is(r);const c=ye,g=jt;ye=r,jt=r,r.running=!0,r.state=ui;try{const A=r.fn();if(r.isEffect)typeof A=="function"&&r.cleanups.push(A);else{const k=r.value;if(r.value=A,r.observers.size>0&&!r.equals(k,A))for(const B of r.observers)_a(B,Ai)}}finally{r.running=!1,ye=c,jt=g}}function Is(r){for(const c of r.owned)Wa(c);r.owned.length=0;for(const c of r.cleanups)c();r.cleanups.length=0;for(const c of r.sources)c.observers.delete(r);r.sources.clear()}function Wa(r){r.disposed||(r.disposed=!0,Is(r),r.observers.clear())}function Gd(r){for(const c of r.owned)Wa(c);r.owned.length=0;for(const c of r.cleanups)c();r.cleanups.length=0}function je(r){return typeof r!="string"?String(r):r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Jo(r){return je(r)}var zd=r=>typeof r=="string"?!1:"tagName"in r&&"childrenList"in r,Vd=(r,c)=>{const g=c.trim();if(!g)return!1;if(g.startsWith("."))return r.classList.contains(g.slice(1));if(g.startsWith("#"))return r.getAttribute("id")===g.slice(1);if(g.startsWith("[")&&g.endsWith("]")){const[A,k]=g.slice(1,-1).trim().split("="),B=(A||"").trim();if(!B)return!1;if(k==null)return r.hasAttribute(B);const D=k.trim().replace(/^['"]|['"]$/g,"");return r.getAttribute(B)===D}return r.tagName===g.toLowerCase()},bi=(r,c,g)=>{for(const A of r)zd(A)&&(Vd(A,c)&&g.push(A),bi(A.childrenList,c,g))},Na=class{childrenList=[];appendChild(r){return this.childrenList.push(r),r}serialize(){return this.childrenList.map(r=>typeof r=="string"?je(r):r.serialize()).join("")}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}},Xa=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(r,c)=>{const g=r.startsWith("--")?r:r.replace(/([A-Z])/g,"-$1").toLowerCase();this.inlineStyles.set(g,c)},removeProperty:r=>this.inlineStyles.delete(r)};classList={add:(...r)=>{const c=this.attributes.get("class")||"",g=new Set([...c.split(" ").filter(Boolean),...r]);this.attributes.set("class",Array.from(g).join(" "))},remove:(...r)=>{const c=(this.attributes.get("class")||"").split(" ").filter(g=>!r.includes(g));this.attributes.set("class",c.join(" "))},toggle:r=>{this.classList.contains(r)?this.classList.remove(r):this.classList.add(r)},contains:r=>(this.attributes.get("class")||"").split(" ").includes(r)};_innerHTML="";get innerHTML(){return this._innerHTML}set innerHTML(r){this._innerHTML=r,this.tagName==="template"&&this.content&&(this.content.childrenList=[r])}constructor(r="div"){this.tagName=r.toLowerCase(),this.tagName==="template"&&(this.content=new Na)}get hidden(){return this.hasAttribute("hidden")}set hidden(r){r?this.setAttribute("hidden",""):this.removeAttribute("hidden")}setAttribute(r,c){this.attributes.set(r,c)}getAttribute(r){return this.attributes.get(r)||null}removeAttribute(r){this.attributes.delete(r)}hasAttribute(r){return this.attributes.has(r)}appendChild(r){return this.childrenList.push(r),r}attachShadow(r){return this.shadowRoot=new qd(this,r),this.shadowRoot}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}addEventListener(r,c){const g=this.eventListeners.get(r)||new Set;g.add(c),this.eventListeners.set(r,g)}removeEventListener(r,c){const g=this.eventListeners.get(r);g&&(g.delete(c),g.size===0&&this.eventListeners.delete(r))}dispatchEvent(r){const c=this.eventListeners.get(r.type);if(!c||c.size===0)return!0;for(const g of c)typeof g=="function"?g.call(this,r):g.handleEvent(r);return!r.defaultPrevented}serialize(r){typeof this._preSerialize=="function"&&this._preSerialize();const c=r||this._ssrTag||this.tagName,g=Array.from(this.attributes.entries()).map(([D,O])=>` ${D}="${Jo(O)}"`).join(""),A=Array.from(this.inlineStyles.entries()).map(([D,O])=>`${D}:${O}`).join(";"),k=A?` style="${Jo(A)}"`:"";let B="";return this.shadowRoot&&(B+=this.shadowRoot.serialize()),this.textContent!==null?B+=je(this.textContent):this._innerHTML?B+=this._innerHTML:B+=this.childrenList.map(D=>typeof D=="string"?je(D):(D instanceof Na,D.serialize())).join(""),["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(c)&&!B?`<${c}${g}${k} />`:`<${c}${g}${k}>${B}</${c}>`}},qd=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(r,c){this.host=r,this.options=c}appendChild(r){return this.childrenList.push(r),r}querySelector(r){const c=this.querySelectorAll(r);return c.length>0?c[0]:null}querySelectorAll(r){const c=[];return bi(this.childrenList,r,c),c}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?" shadowrootdelegatesfocus":""}>${this.adoptedStyleSheets.map(r=>`<style>${je(r)}</style>`).join("")}${this.childrenList.map(r=>typeof r=="string"?je(r):(r instanceof Na,r.serialize())).join("")}</template>`}},Bs=r=>r.reduce((c,g)=>Array.isArray(g)?c.concat(Bs(g)):c.concat(g),[]),Sr=r=>r==null?null:r instanceof Ss?r.build():typeof r=="string"?zt?r:document.createTextNode(r):r,_d=(r,c)=>{if(zt){gi(r,[c()]);return}const g=document.createComment(""),A=document.createComment("");r.appendChild(g),r.appendChild(A);let k=null;const B=()=>{k?.(),k=null;let D=g.nextSibling;for(;D&&D!==A;){const O=D.nextSibling;D.parentNode?.removeChild(D),D=O}};Ee(()=>{const D=c();B();const O=document.createDocumentFragment();k=mi(Y=>(gi(O,[D]),Y)),A.parentNode?.insertBefore(O,A)}),vi(()=>k?.())},Wd="__ranFor",Xd=r=>typeof r=="object"&&r!==null&&r[Wd]===!0,Zd=(r,c,g)=>{const[A,k]=qa(c);let B=null;const D=mi(O=>{const Y=Sr(g(r,A));return B=typeof Y=="string"?document.createTextNode(Y):Y,O});return{node:B,index:k,dispose:D}},Ls=(r,c)=>{const g=r.parentNode;if(!g)return;let A=r;for(const k of c)A.nextSibling!==k&&g.insertBefore(k,A.nextSibling),A=k},Jd=(r,c)=>{if(zt){(c.each()??[]).forEach((k,B)=>{const D=Sr(c.render(k,()=>B));D!=null&&r.appendChild(D)});return}const g=document.createComment("");r.appendChild(g);let A=new Map;vi(()=>{for(const k of A.values())k.dispose();A.clear()}),Ee(()=>{const k=c.each()??[],B=new Map,D=[];k.forEach((O,Y)=>{const X=c.key(O,Y);if(B.has(X))return;let wt=A.get(X);wt?(A.delete(X),wt.index(Y)):wt=Zd(O,Y,c.render),B.set(X,wt),wt.node&&D.push(wt.node)});for(const O of A.values())O.node?.parentNode?.removeChild(O.node),O.dispose();Ls(g,D),A=B})},jd="__ranIndex",$d=r=>typeof r=="object"&&r!==null&&r[jd]===!0,th=(r,c,g)=>{const[A,k]=qa(r);let B=null;const D=mi(O=>{const Y=Sr(g(A,c));return B=typeof Y=="string"?document.createTextNode(Y):Y,O});return{node:B,setItem:k,dispose:D}},eh=(r,c)=>{if(zt){(c.each()??[]).forEach((k,B)=>{const D=Sr(c.render(()=>k,B));D!=null&&r.appendChild(D)});return}const g=document.createComment("");r.appendChild(g);let A=[];vi(()=>{for(const k of A)k.dispose();A=[]}),Ee(()=>{const k=c.each()??[];for(let B=0;B<k.length;B++)B<A.length?A[B].setItem(k[B]):A.push(th(k[B],B,c.render));for(let B=A.length-1;B>=k.length;B--){const{node:D}=A[B];D?.parentNode?.removeChild(D),A[B].dispose(),A.pop()}Ls(g,A.map(B=>B.node).filter(B=>B!=null))})},gi=(r,c)=>{Bs(c).forEach(g=>{if(Xd(g)){Jd(r,g);return}if($d(g)){eh(r,g);return}if(typeof g=="function"){_d(r,g);return}const A=Sr(g);A!=null&&r.appendChild(A)})},Ss=class{el;constructor(r){this.el=zt?new Xa(r):document.createElement(r)}id(r){return this.el.setAttribute("id",r),this}bind(r,c){typeof r=="function"?Ee(()=>c(r())):c(r)}class(r){return this.bind(r,c=>{zt?this.el.attributes.set("class",c):this.el.className=c}),this}addClass(...r){return r.forEach(c=>this.el.classList.add(c)),this}removeClass(...r){return r.forEach(c=>this.el.classList.remove(c)),this}attr(r,c){return this.bind(c,g=>this.el.setAttribute(r,g)),this}attrs(r){return Object.entries(r).forEach(([c,g])=>{g!=null&&this.el.setAttribute(c,String(g))}),this}boolAttr(r,c,g=""){return this.bind(c,A=>{A?this.el.setAttribute(r,g):this.el.removeAttribute(r)}),this}part(r){return this.attr("part",r)}data(r,c){return this.attr(`data-${r}`,c)}style(r,c){return typeof r=="string"?this.bind(c??"",g=>this.el.style.setProperty(r,g)):Object.entries(r).forEach(([g,A])=>this.el.style.setProperty(g,A)),this}cssVar(r,c){const g=r.startsWith("--")?r:`--${r}`;return this.style(g,c)}aria(r,c){return this.attr(`aria-${r}`,c)}role(r){return this.attr("role",r)}tabIndex(r){return this.attr("tabindex",String(r))}label(r){return this.aria("label",r)}labelledBy(r){return this.aria("labelledby",r)}describedBy(r){return this.aria("describedby",r)}ariaHidden(r=!0){return this.aria("hidden",String(r))}on(r,c,g){return this.el.addEventListener(r,c,g),this}listen(r,c,g,A){return r.on(this.el,c,g,A),this}delegate(r,c,g,A,k){return r.delegate(this.el,c,g,A,k),this}children(...r){return gi(this.el,r),this}replaceChildren(...r){if(zt){const c=this.el;c.childrenList=[]}else this.el.replaceChildren();return this.children(...r)}text(r){return this.bind(r,c=>{this.el.textContent=c}),this}ref(r){return r.current=this.el,this}shadow(r={mode:"closed"}){const c=this.el.attachShadow(r);return new rh(this.el,c,r)}build(){return this.el}serialize(){if(zt)return this.el.serialize();const r=document.createElement("div");return r.appendChild(this.el.cloneNode(!0)),r.innerHTML}},rh=class{root;hostEl;options;constructor(r,c,g){this.hostEl=r,this.root=c,this.options=g}children(...r){return gi(this.root,r),this}adoptSheet(...r){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...r],this}css(r){if(zt)return this.root.adoptedStyleSheets.push(r),this;if(typeof CSSStyleSheet<"u")try{const g=new CSSStyleSheet;return g.replaceSync(r),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,g],this}catch{}const c=document.createElement("style");return c.textContent=r,this.root.appendChild(c),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return zt?this.root.serialize():this.root.innerHTML}},rt=r=>new Ss(r),x=()=>rt("div"),ke=()=>rt("span"),Bt=()=>rt("slot"),Ha=()=>rt("button"),Za=()=>rt("input"),ih=()=>rt("style"),ah=()=>rt("label"),ce=[!1,"false",null,void 0],yt=r=>{const c=r.hasAttribute("disabled"),g=r.getAttribute("disabled");return!!(c&&!ce.includes(g))},xs=new Map;function dt(r,c){zt?(xs.set(r,c),c.prototype._ssrTag=r):customElements.get(r)||customElements.define(r,c)}function nh(){return xs}var Ts=()=>typeof document<"u"?HTMLElement:Xa,ct=Ts(),oh=r=>{if(r.tagName&&r.tagName!=="div")return r.tagName;const c=nh();for(const[g,A]of c)if(r instanceof A)return g;return r.constructor.name.toLowerCase()},sh=r=>{if(!r)return"";const c=oh(r);return typeof r.serialize=="function"||r instanceof Xa?r.serialize(c):""},La=new Map,Sa=new Map,lh=(r,c)=>{if(!(typeof document>"u")&&c){if(typeof CSSStyleSheet<"u")try{if(!La.has(c)){const A=new CSSStyleSheet;A.replaceSync(c),La.set(c,A)}const g=La.get(c);r.adoptedStyleSheets.includes(g)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,g]);return}catch{}if(!r.querySelector("style[data-ranui]")){const g=document.createElement("style");g.setAttribute("data-ranui",""),g.textContent=c,r.appendChild(g)}}},ch=(r,c)=>{if(!(typeof document>"u")&&c){if(typeof CSSStyleSheet<"u")try{if(!Sa.has(c)){const A=new CSSStyleSheet;A.replaceSync(c),Sa.set(c,A)}const g=Sa.get(c);r.adoptedStyleSheets.includes(g)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,g]);return}catch{}if(!Array.from(r.querySelectorAll("style[data-ranui-sheet]")).some(g=>g.textContent===c)){const g=document.createElement("style");g.setAttribute("data-ranui-sheet",""),g.textContent=c,r.appendChild(g)}}},jo=new WeakMap,$o="@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}",ht=(r,c="",g={mode:"closed"})=>{const A=r.shadowRoot||jo.get(r)||r.attachShadow(g);return jo.set(r,A),lh(A,c?`${c}
|
|
2
2
|
${$o}`:$o),A},gt=(r,c,g)=>{const A=r.querySelector(c);if(A)return A;const k=g();return r.appendChild(k),k},_=(r,c,g="")=>r.getAttribute(c)??g,$=(r,c,g,A={})=>{if(A.removeEmpty&&!g){r.removeAttribute(c);return}r.setAttribute(c,g??"")},xa=(r,c,g,A={})=>{if(g){r.setAttribute(c,""),A.aria&&r.setAttribute(`aria-${A.aria}`,"true");return}r.removeAttribute(c),A.aria&&r.removeAttribute(`aria-${A.aria}`)},ut=(r,c,g,A,k)=>{if(g!=="sheet"||A===k)return;const B=r.getAttribute("sheet")||"";B&&ch(c,B)},Ds=class extends ct{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new xt;debounceTimeId;static get observedAttributes(){return["disabled","icon","effect","iconSize","type","sheet"]}constructor(){super(),this._shadowDom=ht(this,Qd);const r=gt(this._shadowDom,".ran-btn",()=>x().class("ran-btn").attr("part","button").role("button").tabIndex(0).children(x().class("ran-btn-content").attr("part","content").children(Bt().class("slot"))).build());this._btn=r,this._btnContent=r.querySelector(".ran-btn-content"),this._slot=r.querySelector("slot")}get sheet(){return this.getAttribute("sheet")||""}set sheet(r){this.setAttribute("sheet",r||""),this.handlerExternalCss()}get disabled(){return yt(this)}set disabled(r){!r||r==="false"?(this.removeAttribute("disabled"),this.removeAttribute("aria-disabled")):(this.setAttribute("disabled",""),this.setAttribute("aria-disabled","true"))}get iconSize(){return this.getAttribute("iconSize")||""}set iconSize(r){!r||r==="false"?this.removeAttribute("iconSize"):(this.setAttribute("iconSize",r),this.setIcon())}get icon(){return this.getAttribute("icon")||""}set icon(r){!r||r==="false"?this.removeAttribute("icon"):(this.setAttribute("icon",r),this.setIcon())}get effect(){return this.getAttribute("effect")||""}set effect(r){ce.includes(r)||!r?this.removeAttribute("effect"):this.setAttribute("effect",r)}get type(){return this.getAttribute("type")||""}set type(r){r?this.setAttribute("type",r):this.removeAttribute("type")}setIcon=()=>{if(typeof document>"u"||!this._slot)return;const r=this.icon;if(!r){this._iconElement&&(this._iconElement.remove(),this._iconElement=void 0);return}if(this._iconElement)this._iconElement.setAttribute("name",r);else{let B=this._shadowDom.querySelector("r-icon");B||(B=rt("r-icon").attr("color","currentColor").class("icon").build(),this._slot.insertAdjacentElement("beforebegin",B)),this._iconElement=B,this._iconElement.setAttribute("name",r)}const{width:c,height:g}=this._slot.getBoundingClientRect(),A=Math.min(c,g)||16,k=this.iconSize||`${A>5?A-5:A}`;this._iconElement.setAttribute("size",String(k))};mousedown=r=>{if(Xo()==="pc"&&!this.disabled){this.debounceMouseEvent();const{left:c,top:g}=this.getBoundingClientRect();this._btn.style.setProperty("--ran-x",`${r.clientX-c}px`),this._btn.style.setProperty("--ran-y",`${r.clientY-g}px`)}};mouseup=()=>{Xo()==="pc"&&(this.debounceTimeId||(this.debounceTimeId=setTimeout(()=>{this._btn.style.removeProperty("--ran-x"),this._btn.style.removeProperty("--ran-y"),this.debounceMouseEvent()},600)))};keydown=r=>{yt(this)||(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&(clearTimeout(this.debounceTimeId),this.debounceTimeId=void 0)};handlerExternalCss=()=>{ut(this,this._shadowDom,"sheet",null,this.sheet)};syncA11yState=()=>{const r=yt(this);this._btn.setAttribute("aria-disabled",r?"true":"false"),this._btn.tabIndex=r?-1:0,r?(this.setAttribute("aria-disabled","true"),this._btnContent.setAttribute("disabled","true")):(this.removeAttribute("aria-disabled"),this._btnContent.removeAttribute("disabled"))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this._events.on(this._btn,"mousedown",this.mousedown).on(this._btn,"mouseup",this.mouseup).on(this._btn,"keydown",this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}attributeChangedCallback(r,c,g){c!==g&&(r==="disabled"&&this._btnContent&&this.syncA11yState(),(r==="icon"||r==="iconSize")&&this.setIcon(),r==="sheet"&&this.handlerExternalCss())}};dt("r-button",Ds);var dh=".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{display:var(--ran-icon-host-display, inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name, rotate);animation-duration:var(--ran-icon-host-spin-animation-name, 1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name, infinite)}.ran-icon{display:var(--ran-icon-display, flex);align-items:var(--ran-icon-align-items, center);justify-content:var(--ran-icon-justify-content, center);color:var(--ran-icon-color, inherit);font-size:var(--ran-icon-font-size, 1em);margin:var(--ran-icon-margin, 0)}.ran-icon svg{width:var(--ran-icon-svg-width, 1em);height:var(--ran-icon-svg-height, 1em);fill:var(--ran-icon-svg-fill, currentColor);stroke:var(--ran-icon-svg-stroke, currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform, rotate(360deg))}}",Rs={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>'},Ms={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>'},Fs={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>'},Os={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>'},Ps={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>'},Us={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>'},Qs={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>'},hh={copy:Rs,check:Ms,download:Fs,fullscreen:Os,"zoom-in":Ps,"zoom-out":Us,refresh:Qs},uh=!1,Ns=new Map,Ja=!1,Er=r=>/<svg[\s>]/i.test(r),gh=r=>{if(typeof r=="string")return Er(r)?r:void 0;if(!r||typeof r!="object")return;const c=r,g=c.data;if(typeof g=="string"&&Er(g))return g;const A=c.default;if(typeof A=="string"&&Er(A))return A;if(A&&typeof A=="object"){const k=A;if(typeof k.data=="string"&&Er(k.data))return k.data}},ja=(r,c)=>{Ja=!0;const g=gh(c);g&&(Ns.set(`inline:${r}`,g),typeof window<"u"&&window.dispatchEvent(new CustomEvent("ranui-icon-registered",{detail:{name:r}})))},yi=r=>{Ja=!0,Object.entries(r).forEach(([c,g])=>{ja(c,g)})};yi(hh);var fh=["add-user","arrow-down","book","check","check-circle","check-circle-fill","close","close-circle","close-circle-fill","copy","download","drop","eye","eye-close","fullscreen","github","globe","home","info-circle","info-circle-fill","issue","loading","loading-scene","lock","menu","message","more","plus","power-off","preview","refresh","search","setting","sort","team","unlock","user","warning-circle","warning-circle-fill","without-content","zoom-in","zoom-out"],Hs=class extends ct{isDev=uh;_events=new xt;static get observedAttributes(){return["name","size","color","spin","decorative","aria-label","sheet"]}_icon;_div;_shadowDom;_onIconRegistered=r=>{const c=r.detail?.name;c&&c===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=ht(this,dh);const r=gt(this._shadowDom,".ran-icon",()=>x().class("ran-icon").part("ran-icon").build());this._div=r}get name(){return _(this,"name")}set name(r){r&&this.setAttribute("name",r)}get size(){return _(this,"size")}set size(r){r&&this.setAttribute("size",r)}get color(){return _(this,"color")}set color(r){r&&this.setAttribute("color",r)}get spin(){return this.hasAttribute("spin")}set spin(r){r?this.setAttribute("spin",""):this.removeAttribute("spin")}get decorative(){const r=this.getAttribute("decorative");return r==null?!this.hasAttribute("aria-label"):r!=="false"&&r!=="0"}set decorative(r){this.setAttribute("decorative",r?"true":"false")}get ariaLabel(){return _(this,"aria-label")}set ariaLabel(r){$(this,"aria-label",r,{removeEmpty:!0})}get sheet(){return _(this,"sheet")}set sheet(r){$(this,"sheet",r)}handlerExternalCss=()=>{ut(this,this._shadowDom,"sheet",null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute("aria-hidden","true"),this.removeAttribute("role"),this._icon.setAttribute("aria-hidden","true"),this._icon.setAttribute("focusable","false");return}this.removeAttribute("aria-hidden"),this.setAttribute("role","img"),this._icon.removeAttribute("aria-hidden"),this._icon.setAttribute("focusable","false")}};setIcon=()=>{if(typeof document>"u")return;this._icon&&(this._icon.remove(),this._icon=void 0);const r=this.name;if(r)if(r.startsWith("<svg"))this.renderSvg(r,r);else try{const c=`inline:${r}`,g=Ns.get(c);if(!g){this.isDev&&Ja&&console.warn(`[ranui-icon] icon not registered: ${r}`);return}g&&this.isSvgText(g)?this.renderSvg(g,r):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${r}`)}catch(c){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${r}`,c)}};isSvgText=r=>Er(r);parseSvg=r=>{const c=new window.DOMParser().parseFromString(r,"image/svg+xml").documentElement;if(!c||c.tagName.toLowerCase()==="parsererror"||c.tagName.toLowerCase()!=="svg")return;const g=new XMLSerializer().serializeToString(c),A=rt("template").build();A.innerHTML=g.trim();const k=A.content.firstElementChild;if(!(!k||k.tagName.toLowerCase()!=="svg"))return k};renderSvg=(r,c)=>{const g=this.parseSvg(r);g?(this._icon=g,this._icon.setAttribute("part","icon-svg"),this._icon.setAttribute("data-name",c),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${c}`)};setSize=()=>{if(this._icon){const r=this.size||"1em";this._icon.setAttribute("width",r),this._icon.setAttribute("height",r);const c=/^\d+(\.\d+)?$/.test(r)?`${r}px`:r;this._icon.style.setProperty("width",c),this._icon.style.setProperty("height",c)}};setColor=()=>{if(this._icon){const r=this.color||"currentColor";this._icon.style.setProperty("color",r),this._icon.style.setProperty("fill",r),this._icon.style.setProperty("stroke",r)}};setSpin=()=>{this.spin?this._div.classList.add("ran-icon-spin"):this._div.classList.remove("ran-icon-spin")};connectedCallback(){this._events.on(window,"ranui-icon-registered",this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(r,c,g){c!==g&&(r==="name"&&this.setIcon(),r==="size"&&this.setSize(),r==="color"&&this.setColor(),r==="spin"&&this.setSpin(),(r==="decorative"||r==="aria-label")&&this.syncA11y(),r==="sheet"&&this.handlerExternalCss())}};dt("r-icon",Hs);var ph={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
3
3
|
xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">
|
|
4
4
|
<path
|
package/dist/index.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var n=this,a=function(){"use strict";var ranui=(function(vr){Object.defineProperty(vr,Symbol.toStringTag,{value:"Module"});var C0t=Object.create,ck=Object.defineProperty,k0t=Object.getOwnPropertyDescriptor,E0t=Object.getOwnPropertyNames,S0t=Object.getPrototypeOf,L0t=Object.prototype.hasOwnProperty,J=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}},Fl=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zr=(e,t)=>{let r={};for(var i in e)ck(r,i,{get:e[i],enumerable:!0});return t||ck(r,Symbol.toStringTag,{value:"Module"}),r},I0t=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=E0t(t),a=0,s=n.length,o;a<s;a++)o=n[a],!L0t.call(e,o)&&o!==r&&ck(e,o,{get:(l=>t[l]).bind(null,o),enumerable:!(i=k0t(t,o))||i.enumerable});return e},sf=(e,t,r)=>(r=e!=null?C0t(S0t(e)):{},I0t(t||!e||!e.__esModule?ck(r,"default",{value:e,enumerable:!0}):r,e)),Fx,Rv,_v,$x,bM,Lhe,hk,xM,AM,wM,Ihe,Rhe,TM=J((()=>{Fx="ran-theme",Rv=null,_v=null,$x=e=>{if(e&&"style"in e)return e;if(e&&"documentElement"in e)return e.documentElement;if(!(typeof document>"u"))return document.documentElement},bM=e=>{const t=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;e.setAttribute("data-ran-theme",t?"dark":"light"),e.setAttribute("theme",t?"dark":"light")},Lhe=()=>{Rv&&_v&&(Rv.removeEventListener("change",_v),Rv=null,_v=null)},hk=(e,t)=>{const r=$x(t);if(r){if(Lhe(),e==="system"){if(typeof window>"u")return;bM(r),Rv=window.matchMedia("(prefers-color-scheme: dark)"),_v=()=>bM(r),Rv.addEventListener("change",_v);try{localStorage.setItem(Fx,"system")}catch{}return}r.setAttribute("data-ran-theme",e),r.setAttribute("theme",e);try{localStorage.setItem(Fx,e)}catch{}}},xM=e=>{const t=$x(e);if(!t)return"";const r=t.getAttribute("data-ran-theme")||t.getAttribute("theme")||"";if(r==="light"||r==="dark"){try{if(localStorage.getItem(Fx)==="system")return"system"}catch{}return r}return""},AM=(e,t,r)=>{const i=$x(r);i&&i.style.setProperty(e,String(t))},wM=(e,t)=>{const r=$x(t);r&&r.style.removeProperty(e)},Ihe=(e,t)=>{Object.entries(e).forEach(([r,i])=>{if(i==null){wM(r,t);return}AM(r,i,t)})},Rhe=e=>{if(!(typeof localStorage>"u"))try{const t=localStorage.getItem(Fx);(t==="light"||t==="dark"||t==="system")&&hk(t,e)}catch{}}})),CM,_he=J((()=>{CM=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for("NEW_LISTENER")&&this.call(Symbol.for("NEW_LISTENER"),e);const r=this._events.get(e)||new Set;return typeof t=="function"?r.add({name:e,callback:t}):r.add(t),this._events.set(e,r),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(r=>{const{callback:i}=r;i(...t)}),this);callSync=async(e,...t)=>{const r=this._events.get(e)||new Set;for(const i of r){const{callback:n}=i;await n(...t)}return this};once=(e,t)=>{let r;if(typeof t=="function")r={name:e,callback:(...i)=>{t(...i),this.off(e,r)},initialCallback:t};else{const{callback:i}=t;r={name:e,callback:(...n)=>{i(...n),this.off(e,r)},initialCallback:i}}return this.tap(e,r),this};off=(e,t)=>{const r=[...this._events.get(e)||new Set].filter(i=>{if(typeof t=="function")return i.callback!==t&&i.initialCallback!==t;{const{callback:n}=t;return i.callback!==n&&i.initialCallback!==n}});return this._events.set(e,new Set(r)),this}}})),uk,R0t=J((()=>{uk=(e=8)=>Math.random().toString(36).substring(2,e+2)}));function dk(e){return e<10?`0${e}`:e}var kM,$l,Dhe,X0,EM,SM,Dv,Bv,Bhe,Mhe,Ohe,LM,Nhe,Phe,_0t,D0t,$r,rr,B0t,M0t,Mv,Ih,Nu,IM,fk,O0t,N0t=J((()=>{_he(),R0t(),kM=(e="")=>{if(e.length===0)return 0;if(e.endsWith("%")){const t=Number(e.replace("%",""));return t>1?t/100:t}return Number(e)},$l=(e,t=0,r=1)=>Math.min(r,Math.max(t,e)),Dhe=e=>typeof e=="function",X0=e=>{if(e===0)return"00:00";if(!e)return"";const t=Math.trunc(e/3600),r=Math.trunc(e%3600/60),i=dk(Math.trunc(e-3600*t-60*r));return t===0?`${dk(r)}:${i}`:`${dk(t)}:${dk(r)}:${i}`},EM=()=>{if(typeof window<"u"){const e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?"ipad":/android/.test(e)?"android":/iphone/.test(e)?"iphone":"pc"}return"pc"},SM=typeof window<"u",Dv=()=>{if(!SM)return!1;const e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},Bv=e=>{const t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||1;return(SM&&window.devicePixelRatio||1)/t},Bhe=12e4,Mhe="__ranuts_bridge__",Ohe="default",LM=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(const t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<"u"&&this.attachedWindow!==window&&(window.addEventListener("message",this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener("message",this.handleMessage),this.attachedWindow=null)}},Nhe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t="*",r=Ohe){this.targetOrigin=t,this.channel=r,this.senderId=uk(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<"u",this.available?(this.targetWindow=e??window,LM.add(this)):this.targetWindow=void 0}post(e,t){const r={...t,__bridge:Mhe,channel:this.channel,senderId:this.senderId};e.postMessage(r,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!=="*"&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;const t=e.data;if(!t||typeof t!="object"||t.__bridge!=="__ranuts_bridge__"||(t.channel??"default")!==this.channel)return;const{type:r,payload:i,id:n,isResponse:a,isError:s,senderId:o}=t;if(a&&n){const h=this.pendingRequests.get(n);h&&(s?h.reject(new Error(typeof i=="string"?i:"Bridge request failed")):h.resolve(i),this.pendingRequests.delete(n));return}if(o&&o===this.senderId||typeof r!="string"||!this.messageHandlers.has(r))return;const l=this.messageHandlers.get(r);if(Dhe(l)){const h=e.source??this.targetWindow;Promise.resolve(l(i)).then(u=>{n&&this.post(h,{type:r,payload:u,id:n,isResponse:!0})}).catch(u=>{n&&this.post(h,{type:r,payload:u instanceof Error?u.message:String(u),id:n,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(new Error("PostMessageBridge is unavailable outside a browser environment"));const r=uk(10);return new Promise((i,n)=>{const a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),n(new Error("Request timeout")))},Bhe),s=o=>{clearTimeout(a),n(o)};this.pendingRequests.set(r,{resolve:o=>{clearTimeout(a),i(o)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(o){this.pendingRequests.delete(r),s(o instanceof Error?o:new Error("Failed to post message"))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{LM.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(new Error("Bridge destroyed"))}),this.pendingRequests.clear()}},Phe=class lk{static instance;bridges=new Map;constructor(){}static getInstance(){return lk.instance||(lk.instance=new lk),lk.instance}connectClient=({id:t,targetOrigin:r,targetWindow:i,channel:n})=>{const a=new Nhe(i,r,n);if(t||(t=uk(10)),this.bridges.has(t))throw new Error(`Bridge ${t} already exists`);return this.bridges.set(t,a),{bridge:a,id:t}};getClient=t=>this.bridges.get(t);removeClient=t=>{const r=this.bridges.get(t);r&&(r.destroy(),this.bridges.delete(t))};removeAllClient=()=>{this.bridges.forEach(t=>{t.destroy()}),this.bridges.clear()};broadcast=t=>{this.bridges.forEach(r=>{r.broadcast(t)})};sendTo=(t,r,i)=>{const n=this.getClient(t);return n?n.send(r,i):Promise.reject(new Error(`Bridge ${t} not found`))}},_0t=Phe.getInstance(),D0t=new CM,$r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],rr=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}},B0t=[new rr($r[0],3609767458),new rr($r[1],602891725),new rr($r[2],3964484399),new rr($r[3],2173295548),new rr($r[4],4081628472),new rr($r[5],3053834265),new rr($r[6],2937671579),new rr($r[7],3664609560),new rr($r[8],2734883394),new rr($r[9],1164996542),new rr($r[10],1323610764),new rr($r[11],3590304994),new rr($r[12],4068182383),new rr($r[13],991336113),new rr($r[14],633803317),new rr($r[15],3479774868),new rr($r[16],2666613458),new rr($r[17],944711139),new rr($r[18],2341262773),new rr($r[19],2007800933),new rr($r[20],1495990901),new rr($r[21],1856431235),new rr($r[22],3175218132),new rr($r[23],2198950837),new rr($r[24],3999719339),new rr($r[25],766784016),new rr($r[26],2566594879),new rr($r[27],3203337956),new rr($r[28],1034457026),new rr($r[29],2466948901),new rr($r[30],3758326383),new rr($r[31],168717936),new rr($r[32],1188179964),new rr($r[33],1546045734),new rr($r[34],1522805485),new rr($r[35],2643833823),new rr($r[36],2343527390),new rr($r[37],1014477480),new rr($r[38],1206759142),new rr($r[39],344077627),new rr($r[40],1290863460),new rr($r[41],3158454273),new rr($r[42],3505952657),new rr($r[43],106217008),new rr($r[44],3606008344),new rr($r[45],1432725776),new rr($r[46],1467031594),new rr($r[47],851169720),new rr($r[48],3100823752),new rr($r[49],1363258195),new rr($r[50],3750685593),new rr($r[51],3785050280),new rr($r[52],3318307427),new rr($r[53],3812723403),new rr($r[54],2003034995),new rr($r[55],3602036899),new rr($r[56],1575990012),new rr($r[57],1125592928),new rr($r[58],2716904306),new rr($r[59],442776044),new rr($r[60],593698344),new rr($r[61],3733110249),new rr($r[62],2999351573),new rr($r[63],3815920427),new rr(3391569614,3928383900),new rr(3515267271,566280711),new rr(3940187606,3454069534),new rr(4118630271,4000239992),new rr(116418474,1914138554),new rr(174292421,2731055270),new rr(289380356,3203993006),new rr(460393269,320620315),new rr(685471733,587496836),new rr(852142971,1086792851),new rr(1017036298,365543100),new rr(1126000580,2618297676),new rr(1288033470,3409855158),new rr(1501505948,4234509866),new rr(1607167915,987167468),new rr(1816402316,1246189591)],M0t=[new rr(0,1),new rr(0,32898),new rr(2147483648,32906),new rr(2147483648,2147516416),new rr(0,32907),new rr(0,2147483649),new rr(2147483648,2147516545),new rr(2147483648,32777),new rr(0,138),new rr(0,136),new rr(0,2147516425),new rr(0,2147483658),new rr(0,2147516555),new rr(2147483648,139),new rr(2147483648,32905),new rr(2147483648,32771),new rr(2147483648,32770),new rr(2147483648,128),new rr(0,32778),new rr(2147483648,2147483658),new rr(2147483648,2147516545),new rr(2147483648,32896),new rr(0,2147483649),new rr(2147483648,2147516424)],Mv=(e,t=500)=>{let r;return(...i)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(void 0,i)},t)}},Ih=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)||r.add(t)},Nu=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)&&r.remove(t)},IM=()=>{let e=0,t=null;return function(r,i=300){return function(...n){const a=Date.now();a-e>=i?(t!=null&&(clearTimeout(t),t=null),e=a,r.apply(this,n)):t??=window.setTimeout(()=>{e=Date.now(),r.apply(this,n),t=null},i-(a-e))}}},fk=new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[103,"Early Hints"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[208,"Already Reported"],[226,"IM Used"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Found"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[308,"Permanent Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a Teapot"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]]),O0t={message:fk,code:(function(e){const t=new Map;for(const[r,i]of e)t.set(i.toLowerCase(),r);return t})(fk),codes:(function(e){const t=[];for(const[r,i]of e)t.push(r);return t})(fk),redirect:{300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},empty:{204:!0,205:!0,304:!0},retry:{502:!0,503:!0,504:!0}}})),dc=J((()=>{_he(),N0t()}));dc();var P0t='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #006bff));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #006bff));color:var(--ran-btn-content-color, #fff)}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #005ff2));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #005ff2))}:host([type="contrast"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-contrast-bg, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-contrast-bg, #171717));color:var(--ran-btn-content-color, var(--ran-color-contrast-text, #fff))}:host([type="contrast"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-contrast-text, #fff) 10%, transparent 10.01%))}:host([type="contrast"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-contrast-bg-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-contrast-bg-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #0059ec));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #0059ec));color:var(--ran-btn-content-hover-color, #fff)}:host([type="contrast"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-contrast-bg-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-contrast-bg-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-contrast-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}',zl,RM=J((()=>{zl=typeof document>"u"})),ks,F0t=J((()=>{ks=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,r,i){return e.addEventListener(t,r,{...i,signal:this.ac.signal}),this}delegate(e,t,r,i,n){return e.addEventListener(r,a=>{const s=a.target?.closest(t);s&&e.contains(s)&&i(a,s)},{...n,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}}}));function _M(e,t){const r=t?.equals??Object.is,i={value:e,observers:new Set};return[()=>(U0t(i),i.value),s=>{const o=typeof s=="function"?s(i.value):s;if(!r(i.value,o)){i.value=o;for(const l of i.observers)DM(l,Ux);OM===0&&G0t()}}]}function jp(e){const t=$0t(e,!0);return z0t(t),$he(t),()=>BM(t)}function pk(e){const t={owned:[],cleanups:[],owner:fc},r=fc,i=Pu;fc=t,Pu=null;try{return e(()=>H0t(t))}finally{fc=r,Pu=i}}function gk(e){fc&&fc.cleanups.push(e)}function $0t(e,t,r){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:Ux,observers:new Set,value:void 0,equals:r??Object.is,owned:[],cleanups:[],owner:fc}}function z0t(e){fc&&fc.owned.push(e)}function U0t(e){Pu&&(Pu.sources.add(e),e.observers.add(Pu))}function DM(e,t){if(e.disposed||e.state>=t)return;const r=e.state===zx;if(e.state=t,e.isEffect)Gx.add(e);else if(r)for(const i of e.observers)DM(i,MM)}function G0t(){if(!(OM>0||mk)){mk=!0;try{for(;Gx.size>0;){const e=[...Gx];Gx.clear();for(const t of e)t.disposed||Fhe(t)}}finally{mk=!1}}}function Fhe(e){if(!(e.disposed||e.state===zx)){if(e.state===MM)for(const t of e.sources)"fn"in t&&Fhe(t);e.state===Ux&&$he(e),e.state=zx}}function $he(e){if(e.running)throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");zhe(e);const t=Pu,r=fc;Pu=e,fc=e,e.running=!0,e.state=zx;try{const i=e.fn();if(e.isEffect)typeof i=="function"&&e.cleanups.push(i);else{const n=e.value;if(e.value=i,e.observers.size>0&&!e.equals(n,i))for(const a of e.observers)DM(a,Ux)}}finally{e.running=!1,Pu=t,fc=r}}function zhe(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0;for(const t of e.sources)t.observers.delete(e);e.sources.clear()}function BM(e){e.disposed||(e.disposed=!0,zhe(e),e.observers.clear())}function H0t(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0}var zx,MM,Ux,Pu,fc,OM,Gx,mk,NM=J((()=>{zx=0,MM=1,Ux=2,Pu=null,fc=null,OM=0,Gx=new Set,mk=!1}));function Ov(e){return typeof e!="string"?String(e):e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Uhe(e){return Ov(e)}var Ghe=J((()=>{})),Hhe,Yhe,Hx,Vhe=J((()=>{Hhe=e=>typeof e=="string"?!1:"tagName"in e&&"childrenList"in e,Yhe=(e,t)=>{const r=t.trim();if(!r)return!1;if(r.startsWith("."))return e.classList.contains(r.slice(1));if(r.startsWith("#"))return e.getAttribute("id")===r.slice(1);if(r.startsWith("[")&&r.endsWith("]")){const[i,n]=r.slice(1,-1).trim().split("="),a=(i||"").trim();if(!a)return!1;if(n==null)return e.hasAttribute(a);const s=n.trim().replace(/^['"]|['"]$/g,"");return e.getAttribute(a)===s}return e.tagName===r.toLowerCase()},Hx=(e,t,r)=>{for(const i of e)Hhe(i)&&(Yhe(i,t)&&r.push(i),Hx(i.childrenList,t,r))}})),yk,vk,qhe,Whe=J((()=>{Ghe(),Vhe(),yk=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e=="string"?Ov(e):e.serialize()).join("")}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}},vk=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{const r=e.startsWith("--")?e:e.replace(/([A-Z])/g,"-$1").toLowerCase();this.inlineStyles.set(r,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{const t=this.attributes.get("class")||"",r=new Set([...t.split(" ").filter(Boolean),...e]);this.attributes.set("class",Array.from(r).join(" "))},remove:(...e)=>{const t=(this.attributes.get("class")||"").split(" ").filter(r=>!e.includes(r));this.attributes.set("class",t.join(" "))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get("class")||"").split(" ").includes(e)};_innerHTML="";get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName==="template"&&this.content&&(this.content.childrenList=[e])}constructor(e="div"){this.tagName=e.toLowerCase(),this.tagName==="template"&&(this.content=new yk)}get hidden(){return this.hasAttribute("hidden")}set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new qhe(this,e),this.shadowRoot}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}addEventListener(e,t){const r=this.eventListeners.get(e)||new Set;r.add(t),this.eventListeners.set(e,r)}removeEventListener(e,t){const r=this.eventListeners.get(e);r&&(r.delete(t),r.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){const t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(const r of t)typeof r=="function"?r.call(this,e):r.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize=="function"&&this._preSerialize();const t=e||this._ssrTag||this.tagName,r=Array.from(this.attributes.entries()).map(([s,o])=>` ${s}="${Uhe(o)}"`).join(""),i=Array.from(this.inlineStyles.entries()).map(([s,o])=>`${s}:${o}`).join(";"),n=i?` style="${Uhe(i)}"`:"";let a="";return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent!==null?a+=Ov(this.textContent):this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(s=>typeof s=="string"?Ov(s):(s instanceof yk,s.serialize())).join(""),["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(t)&&!a?`<${t}${r}${n} />`:`<${t}${r}${n}>${a}</${t}>`}},qhe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?" shadowrootdelegatesfocus":""}>${this.adoptedStyleSheets.map(e=>`<style>${Ov(e)}</style>`).join("")}${this.childrenList.map(e=>typeof e=="string"?Ov(e):(e instanceof yk,e.serialize())).join("")}</template>`}}})),PM,Nv,Khe,Qhe,Xhe,jhe,FM,Zhe,Jhe,eue,tue,rue,Yx,$M,iue,nue=J((()=>{RM(),Whe(),NM(),PM=e=>e.reduce((t,r)=>Array.isArray(r)?t.concat(PM(r)):t.concat(r),[]),Nv=e=>e==null?null:e instanceof $M?e.build():typeof e=="string"?zl?e:document.createTextNode(e):e,Khe=(e,t)=>{if(zl){Yx(e,[t()]);return}const r=document.createComment(""),i=document.createComment("");e.appendChild(r),e.appendChild(i);let n=null;const a=()=>{n?.(),n=null;let s=r.nextSibling;for(;s&&s!==i;){const o=s.nextSibling;s.parentNode?.removeChild(s),s=o}};jp(()=>{const s=t();a();const o=document.createDocumentFragment();n=pk(l=>(Yx(o,[s]),l)),i.parentNode?.insertBefore(o,i)}),gk(()=>n?.())},Qhe="__ranFor",Xhe=e=>typeof e=="object"&&e!==null&&e[Qhe]===!0,jhe=(e,t,r)=>{const[i,n]=_M(t);let a=null;const s=pk(o=>{const l=Nv(r(e,i));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,index:n,dispose:s}},FM=(e,t)=>{const r=e.parentNode;if(!r)return;let i=e;for(const n of t)i.nextSibling!==n&&r.insertBefore(n,i.nextSibling),i=n},Zhe=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(n,()=>a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=new Map;gk(()=>{for(const n of i.values())n.dispose();i.clear()}),jp(()=>{const n=t.each()??[],a=new Map,s=[];n.forEach((o,l)=>{const h=t.key(o,l);if(a.has(h))return;let u=i.get(h);u?(i.delete(h),u.index(l)):u=jhe(o,l,t.render),a.set(h,u),u.node&&s.push(u.node)});for(const o of i.values())o.node?.parentNode?.removeChild(o.node),o.dispose();FM(r,s),i=a})},Jhe="__ranIndex",eue=e=>typeof e=="object"&&e!==null&&e[Jhe]===!0,tue=(e,t,r)=>{const[i,n]=_M(e);let a=null;const s=pk(o=>{const l=Nv(r(i,t));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,setItem:n,dispose:s}},rue=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(()=>n,a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=[];gk(()=>{for(const n of i)n.dispose();i=[]}),jp(()=>{const n=t.each()??[];for(let a=0;a<n.length;a++)a<i.length?i[a].setItem(n[a]):i.push(tue(n[a],a,t.render));for(let a=i.length-1;a>=n.length;a--){const{node:s}=i[a];s?.parentNode?.removeChild(s),i[a].dispose(),i.pop()}FM(r,i.map(a=>a.node).filter(a=>a!=null))})},Yx=(e,t)=>{PM(t).forEach(r=>{if(Xhe(r)){Zhe(e,r);return}if(eue(r)){rue(e,r);return}if(typeof r=="function"){Khe(e,r);return}const i=Nv(r);i!=null&&e.appendChild(i)})},$M=class{el;constructor(e){this.el=zl?new vk(e):document.createElement(e)}id(e){return this.el.setAttribute("id",e),this}bind(e,t){typeof e=="function"?jp(()=>t(e())):t(e)}class(e){return this.bind(e,t=>{zl?this.el.attributes.set("class",t):this.el.className=t}),this}addClass(...e){return e.forEach(t=>this.el.classList.add(t)),this}removeClass(...e){return e.forEach(t=>this.el.classList.remove(t)),this}attr(e,t){return this.bind(t,r=>this.el.setAttribute(e,r)),this}attrs(e){return Object.entries(e).forEach(([t,r])=>{r!=null&&this.el.setAttribute(t,String(r))}),this}boolAttr(e,t,r=""){return this.bind(t,i=>{i?this.el.setAttribute(e,r):this.el.removeAttribute(e)}),this}part(e){return this.attr("part",e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e=="string"?this.bind(t??"",r=>this.el.style.setProperty(e,r)):Object.entries(e).forEach(([r,i])=>this.el.style.setProperty(r,i)),this}cssVar(e,t){const r=e.startsWith("--")?e:`--${e}`;return this.style(r,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr("role",e)}tabIndex(e){return this.attr("tabindex",String(e))}label(e){return this.aria("label",e)}labelledBy(e){return this.aria("labelledby",e)}describedBy(e){return this.aria("describedby",e)}ariaHidden(e=!0){return this.aria("hidden",String(e))}on(e,t,r){return this.el.addEventListener(e,t,r),this}listen(e,t,r,i){return e.on(this.el,t,r,i),this}delegate(e,t,r,i,n){return e.delegate(this.el,t,r,i,n),this}children(...e){return Yx(this.el,e),this}replaceChildren(...e){if(zl){const t=this.el;t.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,t=>{this.el.textContent=t}),this}ref(e){return e.current=this.el,this}shadow(e={mode:"closed"}){const t=this.el.attachShadow(e);return new iue(this.el,t,e)}build(){return this.el}serialize(){if(zl)return this.el.serialize();const e=document.createElement("div");return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},iue=class{root;hostEl;options;constructor(e,t,r){this.hostEl=e,this.root=t,this.options=r}children(...e){return Yx(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(zl)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<"u")try{const r=new CSSStyleSheet;return r.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,r],this}catch{}const t=document.createElement("style");return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return zl?this.root.serialize():this.root.innerHTML}}})),Mi,Ct,of,ja,bk,xk,aue,sue,Y0t=J((()=>{nue(),Mi=e=>new $M(e),Ct=()=>Mi("div"),of=()=>Mi("span"),ja=()=>Mi("slot"),bk=()=>Mi("button"),xk=()=>Mi("input"),aue=()=>Mi("style"),sue=()=>Mi("label")})),an=J((()=>{RM(),F0t(),NM(),Vhe(),Whe(),nue(),Y0t()})),Rh,aa,V0t=J((()=>{Rh=[!1,"false",null,void 0],aa=e=>{const t=e.hasAttribute("disabled"),r=e.getAttribute("disabled");return!!(t&&!Rh.includes(r))}})),q0t=J((()=>{}));function wn(e,t){zl?(zM.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}function W0t(){return zM}var zM,pn=J((()=>{RM(),zM=new Map})),UM,gn,oue,lue,cue=J((()=>{an(),pn(),UM=()=>typeof document<"u"?HTMLElement:vk,gn=UM(),oue=e=>{if(e.tagName&&e.tagName!=="div")return e.tagName;const t=W0t();for(const[r,i]of t)if(e instanceof i)return r;return e.constructor.name.toLowerCase()},lue=e=>{if(!e)return"";const t=oue(e);return typeof e.serialize=="function"||e instanceof vk?e.serialize(t):""}})),K0t=J((()=>{})),Ak,wk,hue,uue,Q0t=J((()=>{Ak=new Map,wk=new Map,hue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!Ak.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),Ak.set(t,i)}const r=Ak.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!e.querySelector("style[data-ranui]")){const r=document.createElement("style");r.setAttribute("data-ranui",""),r.textContent=t,e.appendChild(r)}}},uue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!wk.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),wk.set(t,i)}const r=wk.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!Array.from(e.querySelectorAll("style[data-ranui-sheet]")).some(r=>r.textContent===t)){const r=document.createElement("style");r.setAttribute("data-ranui-sheet",""),r.textContent=t,e.appendChild(r)}}}})),GM,HM,mn,Tn,Wr,ai,Tk,Cn,yn=J((()=>{Q0t(),GM=new WeakMap,HM="@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}",mn=(e,t="",r={mode:"closed"})=>{const i=e.shadowRoot||GM.get(e)||e.attachShadow(r);return GM.set(e,i),hue(i,t?`${t}
|
|
1
|
+
var n=this,a=function(){"use strict";var ranui=(function(vr){Object.defineProperty(vr,Symbol.toStringTag,{value:"Module"});var C0t=Object.create,ck=Object.defineProperty,k0t=Object.getOwnPropertyDescriptor,E0t=Object.getOwnPropertyNames,S0t=Object.getPrototypeOf,L0t=Object.prototype.hasOwnProperty,J=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}},Fl=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zr=(e,t)=>{let r={};for(var i in e)ck(r,i,{get:e[i],enumerable:!0});return t||ck(r,Symbol.toStringTag,{value:"Module"}),r},I0t=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=E0t(t),a=0,s=n.length,o;a<s;a++)o=n[a],!L0t.call(e,o)&&o!==r&&ck(e,o,{get:(l=>t[l]).bind(null,o),enumerable:!(i=k0t(t,o))||i.enumerable});return e},sf=(e,t,r)=>(r=e!=null?C0t(S0t(e)):{},I0t(t||!e||!e.__esModule?ck(r,"default",{value:e,enumerable:!0}):r,e)),Fx,Rv,_v,$x,bM,Lhe,hk,xM,AM,wM,Ihe,Rhe,TM=J((()=>{Fx="ran-theme",Rv=null,_v=null,$x=e=>{if(e&&"style"in e)return e;if(e&&"documentElement"in e)return e.documentElement;if(!(typeof document>"u"))return document.documentElement},bM=e=>{const t=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;e.setAttribute("data-ran-theme",t?"dark":"light"),e.setAttribute("theme",t?"dark":"light")},Lhe=()=>{Rv&&_v&&(Rv.removeEventListener("change",_v),Rv=null,_v=null)},hk=(e,t)=>{const r=$x(t);if(r){if(Lhe(),e==="system"){if(typeof window>"u")return;bM(r),Rv=window.matchMedia("(prefers-color-scheme: dark)"),_v=()=>bM(r),Rv.addEventListener("change",_v);try{localStorage.setItem(Fx,"system")}catch{}return}r.setAttribute("data-ran-theme",e),r.setAttribute("theme",e);try{localStorage.setItem(Fx,e)}catch{}}},xM=e=>{const t=$x(e);if(!t)return"";const r=t.getAttribute("data-ran-theme")||t.getAttribute("theme")||"";if(r==="light"||r==="dark"){try{if(localStorage.getItem(Fx)==="system")return"system"}catch{}return r}return""},AM=(e,t,r)=>{const i=$x(r);i&&i.style.setProperty(e,String(t))},wM=(e,t)=>{const r=$x(t);r&&r.style.removeProperty(e)},Ihe=(e,t)=>{Object.entries(e).forEach(([r,i])=>{if(i==null){wM(r,t);return}AM(r,i,t)})},Rhe=e=>{if(!(typeof localStorage>"u"))try{const t=localStorage.getItem(Fx);(t==="light"||t==="dark"||t==="system")&&hk(t,e)}catch{}}})),CM,_he=J((()=>{CM=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for("NEW_LISTENER")&&this.call(Symbol.for("NEW_LISTENER"),e);const r=this._events.get(e)||new Set;return typeof t=="function"?r.add({name:e,callback:t}):r.add(t),this._events.set(e,r),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(r=>{const{callback:i}=r;i(...t)}),this);callSync=async(e,...t)=>{const r=this._events.get(e)||new Set;for(const i of r){const{callback:n}=i;await n(...t)}return this};once=(e,t)=>{let r;if(typeof t=="function")r={name:e,callback:(...i)=>{t(...i),this.off(e,r)},initialCallback:t};else{const{callback:i}=t;r={name:e,callback:(...n)=>{i(...n),this.off(e,r)},initialCallback:i}}return this.tap(e,r),this};off=(e,t)=>{const r=[...this._events.get(e)||new Set].filter(i=>{if(typeof t=="function")return i.callback!==t&&i.initialCallback!==t;{const{callback:n}=t;return i.callback!==n&&i.initialCallback!==n}});return this._events.set(e,new Set(r)),this}}})),uk,R0t=J((()=>{uk=(e=8)=>Math.random().toString(36).substring(2,e+2)}));function dk(e){return e<10?`0${e}`:e}var kM,$l,Dhe,X0,EM,SM,Dv,Bv,Bhe,Mhe,Ohe,LM,Nhe,Phe,_0t,D0t,$r,rr,B0t,M0t,Mv,Ih,Nu,IM,fk,O0t,N0t=J((()=>{_he(),R0t(),kM=(e="")=>{if(e.length===0)return 0;if(e.endsWith("%")){const t=Number(e.replace("%",""));return t>1?t/100:t}return Number(e)},$l=(e,t=0,r=1)=>Math.min(r,Math.max(t,e)),Dhe=e=>typeof e=="function",X0=e=>{if(e===0)return"00:00";if(!e)return"";const t=Math.trunc(e/3600),r=Math.trunc(e%3600/60),i=dk(Math.trunc(e-3600*t-60*r));return t===0?`${dk(r)}:${i}`:`${dk(t)}:${dk(r)}:${i}`},EM=()=>{if(typeof window<"u"){const e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?"ipad":/android/.test(e)?"android":/iphone/.test(e)?"iphone":"pc"}return"pc"},SM=typeof window<"u",Dv=()=>{if(!SM)return!1;const e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},Bv=e=>{const t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||1;return(SM&&window.devicePixelRatio||1)/t},Bhe=12e4,Mhe="__ranuts_bridge__",Ohe="default",LM=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(const t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<"u"&&this.attachedWindow!==window&&(window.addEventListener("message",this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener("message",this.handleMessage),this.attachedWindow=null)}},Nhe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t="*",r=Ohe){this.targetOrigin=t,this.channel=r,this.senderId=uk(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<"u",this.available?(this.targetWindow=e??window,LM.add(this)):this.targetWindow=void 0}post(e,t){const r={...t,__bridge:Mhe,channel:this.channel,senderId:this.senderId};e.postMessage(r,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!=="*"&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;const t=e.data;if(!t||typeof t!="object"||t.__bridge!=="__ranuts_bridge__"||(t.channel??"default")!==this.channel)return;const{type:r,payload:i,id:n,isResponse:a,isError:s,senderId:o}=t;if(a&&n){const h=this.pendingRequests.get(n);h&&(s?h.reject(new Error(typeof i=="string"?i:"Bridge request failed")):h.resolve(i),this.pendingRequests.delete(n));return}if(o&&o===this.senderId||typeof r!="string"||!this.messageHandlers.has(r))return;const l=this.messageHandlers.get(r);if(Dhe(l)){const h=e.source??this.targetWindow;Promise.resolve(l(i)).then(u=>{n&&this.post(h,{type:r,payload:u,id:n,isResponse:!0})}).catch(u=>{n&&this.post(h,{type:r,payload:u instanceof Error?u.message:String(u),id:n,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(new Error("PostMessageBridge is unavailable outside a browser environment"));const r=uk(10);return new Promise((i,n)=>{const a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),n(new Error("Request timeout")))},Bhe),s=o=>{clearTimeout(a),n(o)};this.pendingRequests.set(r,{resolve:o=>{clearTimeout(a),i(o)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(o){this.pendingRequests.delete(r),s(o instanceof Error?o:new Error("Failed to post message"))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{LM.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(new Error("Bridge destroyed"))}),this.pendingRequests.clear()}},Phe=class lk{static instance;bridges=new Map;constructor(){}static getInstance(){return lk.instance||(lk.instance=new lk),lk.instance}connectClient=({id:t,targetOrigin:r,targetWindow:i,channel:n})=>{const a=new Nhe(i,r,n);if(t||(t=uk(10)),this.bridges.has(t))throw new Error(`Bridge ${t} already exists`);return this.bridges.set(t,a),{bridge:a,id:t}};getClient=t=>this.bridges.get(t);removeClient=t=>{const r=this.bridges.get(t);r&&(r.destroy(),this.bridges.delete(t))};removeAllClient=()=>{this.bridges.forEach(t=>{t.destroy()}),this.bridges.clear()};broadcast=t=>{this.bridges.forEach(r=>{r.broadcast(t)})};sendTo=(t,r,i)=>{const n=this.getClient(t);return n?n.send(r,i):Promise.reject(new Error(`Bridge ${t} not found`))}},_0t=Phe.getInstance(),D0t=new CM,$r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],rr=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}},B0t=[new rr($r[0],3609767458),new rr($r[1],602891725),new rr($r[2],3964484399),new rr($r[3],2173295548),new rr($r[4],4081628472),new rr($r[5],3053834265),new rr($r[6],2937671579),new rr($r[7],3664609560),new rr($r[8],2734883394),new rr($r[9],1164996542),new rr($r[10],1323610764),new rr($r[11],3590304994),new rr($r[12],4068182383),new rr($r[13],991336113),new rr($r[14],633803317),new rr($r[15],3479774868),new rr($r[16],2666613458),new rr($r[17],944711139),new rr($r[18],2341262773),new rr($r[19],2007800933),new rr($r[20],1495990901),new rr($r[21],1856431235),new rr($r[22],3175218132),new rr($r[23],2198950837),new rr($r[24],3999719339),new rr($r[25],766784016),new rr($r[26],2566594879),new rr($r[27],3203337956),new rr($r[28],1034457026),new rr($r[29],2466948901),new rr($r[30],3758326383),new rr($r[31],168717936),new rr($r[32],1188179964),new rr($r[33],1546045734),new rr($r[34],1522805485),new rr($r[35],2643833823),new rr($r[36],2343527390),new rr($r[37],1014477480),new rr($r[38],1206759142),new rr($r[39],344077627),new rr($r[40],1290863460),new rr($r[41],3158454273),new rr($r[42],3505952657),new rr($r[43],106217008),new rr($r[44],3606008344),new rr($r[45],1432725776),new rr($r[46],1467031594),new rr($r[47],851169720),new rr($r[48],3100823752),new rr($r[49],1363258195),new rr($r[50],3750685593),new rr($r[51],3785050280),new rr($r[52],3318307427),new rr($r[53],3812723403),new rr($r[54],2003034995),new rr($r[55],3602036899),new rr($r[56],1575990012),new rr($r[57],1125592928),new rr($r[58],2716904306),new rr($r[59],442776044),new rr($r[60],593698344),new rr($r[61],3733110249),new rr($r[62],2999351573),new rr($r[63],3815920427),new rr(3391569614,3928383900),new rr(3515267271,566280711),new rr(3940187606,3454069534),new rr(4118630271,4000239992),new rr(116418474,1914138554),new rr(174292421,2731055270),new rr(289380356,3203993006),new rr(460393269,320620315),new rr(685471733,587496836),new rr(852142971,1086792851),new rr(1017036298,365543100),new rr(1126000580,2618297676),new rr(1288033470,3409855158),new rr(1501505948,4234509866),new rr(1607167915,987167468),new rr(1816402316,1246189591)],M0t=[new rr(0,1),new rr(0,32898),new rr(2147483648,32906),new rr(2147483648,2147516416),new rr(0,32907),new rr(0,2147483649),new rr(2147483648,2147516545),new rr(2147483648,32777),new rr(0,138),new rr(0,136),new rr(0,2147516425),new rr(0,2147483658),new rr(0,2147516555),new rr(2147483648,139),new rr(2147483648,32905),new rr(2147483648,32771),new rr(2147483648,32770),new rr(2147483648,128),new rr(0,32778),new rr(2147483648,2147483658),new rr(2147483648,2147516545),new rr(2147483648,32896),new rr(0,2147483649),new rr(2147483648,2147516424)],Mv=(e,t=500)=>{let r;return(...i)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(void 0,i)},t)}},Ih=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)||r.add(t)},Nu=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)&&r.remove(t)},IM=()=>{let e=0,t=null;return function(r,i=300){return function(...n){const a=Date.now();a-e>=i?(t!=null&&(clearTimeout(t),t=null),e=a,r.apply(this,n)):t??=window.setTimeout(()=>{e=Date.now(),r.apply(this,n),t=null},i-(a-e))}}},fk=new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[103,"Early Hints"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[208,"Already Reported"],[226,"IM Used"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Found"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[308,"Permanent Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a Teapot"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]]),O0t={message:fk,code:(function(e){const t=new Map;for(const[r,i]of e)t.set(i.toLowerCase(),r);return t})(fk),codes:(function(e){const t=[];for(const[r,i]of e)t.push(r);return t})(fk),redirect:{300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},empty:{204:!0,205:!0,304:!0},retry:{502:!0,503:!0,504:!0}}})),dc=J((()=>{_he(),N0t()}));dc();var P0t='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #171717));color:var(--ran-btn-content-color, var(--ran-color-primary-text, #fff))}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-primary-text, #fff) 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-primary-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}',zl,RM=J((()=>{zl=typeof document>"u"})),ks,F0t=J((()=>{ks=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,r,i){return e.addEventListener(t,r,{...i,signal:this.ac.signal}),this}delegate(e,t,r,i,n){return e.addEventListener(r,a=>{const s=a.target?.closest(t);s&&e.contains(s)&&i(a,s)},{...n,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}}}));function _M(e,t){const r=t?.equals??Object.is,i={value:e,observers:new Set};return[()=>(U0t(i),i.value),s=>{const o=typeof s=="function"?s(i.value):s;if(!r(i.value,o)){i.value=o;for(const l of i.observers)DM(l,Ux);OM===0&&G0t()}}]}function jp(e){const t=$0t(e,!0);return z0t(t),$he(t),()=>BM(t)}function pk(e){const t={owned:[],cleanups:[],owner:fc},r=fc,i=Pu;fc=t,Pu=null;try{return e(()=>H0t(t))}finally{fc=r,Pu=i}}function gk(e){fc&&fc.cleanups.push(e)}function $0t(e,t,r){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:Ux,observers:new Set,value:void 0,equals:r??Object.is,owned:[],cleanups:[],owner:fc}}function z0t(e){fc&&fc.owned.push(e)}function U0t(e){Pu&&(Pu.sources.add(e),e.observers.add(Pu))}function DM(e,t){if(e.disposed||e.state>=t)return;const r=e.state===zx;if(e.state=t,e.isEffect)Gx.add(e);else if(r)for(const i of e.observers)DM(i,MM)}function G0t(){if(!(OM>0||mk)){mk=!0;try{for(;Gx.size>0;){const e=[...Gx];Gx.clear();for(const t of e)t.disposed||Fhe(t)}}finally{mk=!1}}}function Fhe(e){if(!(e.disposed||e.state===zx)){if(e.state===MM)for(const t of e.sources)"fn"in t&&Fhe(t);e.state===Ux&&$he(e),e.state=zx}}function $he(e){if(e.running)throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");zhe(e);const t=Pu,r=fc;Pu=e,fc=e,e.running=!0,e.state=zx;try{const i=e.fn();if(e.isEffect)typeof i=="function"&&e.cleanups.push(i);else{const n=e.value;if(e.value=i,e.observers.size>0&&!e.equals(n,i))for(const a of e.observers)DM(a,Ux)}}finally{e.running=!1,Pu=t,fc=r}}function zhe(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0;for(const t of e.sources)t.observers.delete(e);e.sources.clear()}function BM(e){e.disposed||(e.disposed=!0,zhe(e),e.observers.clear())}function H0t(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0}var zx,MM,Ux,Pu,fc,OM,Gx,mk,NM=J((()=>{zx=0,MM=1,Ux=2,Pu=null,fc=null,OM=0,Gx=new Set,mk=!1}));function Ov(e){return typeof e!="string"?String(e):e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Uhe(e){return Ov(e)}var Ghe=J((()=>{})),Hhe,Yhe,Hx,Vhe=J((()=>{Hhe=e=>typeof e=="string"?!1:"tagName"in e&&"childrenList"in e,Yhe=(e,t)=>{const r=t.trim();if(!r)return!1;if(r.startsWith("."))return e.classList.contains(r.slice(1));if(r.startsWith("#"))return e.getAttribute("id")===r.slice(1);if(r.startsWith("[")&&r.endsWith("]")){const[i,n]=r.slice(1,-1).trim().split("="),a=(i||"").trim();if(!a)return!1;if(n==null)return e.hasAttribute(a);const s=n.trim().replace(/^['"]|['"]$/g,"");return e.getAttribute(a)===s}return e.tagName===r.toLowerCase()},Hx=(e,t,r)=>{for(const i of e)Hhe(i)&&(Yhe(i,t)&&r.push(i),Hx(i.childrenList,t,r))}})),yk,vk,qhe,Whe=J((()=>{Ghe(),Vhe(),yk=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e=="string"?Ov(e):e.serialize()).join("")}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}},vk=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{const r=e.startsWith("--")?e:e.replace(/([A-Z])/g,"-$1").toLowerCase();this.inlineStyles.set(r,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{const t=this.attributes.get("class")||"",r=new Set([...t.split(" ").filter(Boolean),...e]);this.attributes.set("class",Array.from(r).join(" "))},remove:(...e)=>{const t=(this.attributes.get("class")||"").split(" ").filter(r=>!e.includes(r));this.attributes.set("class",t.join(" "))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get("class")||"").split(" ").includes(e)};_innerHTML="";get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName==="template"&&this.content&&(this.content.childrenList=[e])}constructor(e="div"){this.tagName=e.toLowerCase(),this.tagName==="template"&&(this.content=new yk)}get hidden(){return this.hasAttribute("hidden")}set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new qhe(this,e),this.shadowRoot}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}addEventListener(e,t){const r=this.eventListeners.get(e)||new Set;r.add(t),this.eventListeners.set(e,r)}removeEventListener(e,t){const r=this.eventListeners.get(e);r&&(r.delete(t),r.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){const t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(const r of t)typeof r=="function"?r.call(this,e):r.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize=="function"&&this._preSerialize();const t=e||this._ssrTag||this.tagName,r=Array.from(this.attributes.entries()).map(([s,o])=>` ${s}="${Uhe(o)}"`).join(""),i=Array.from(this.inlineStyles.entries()).map(([s,o])=>`${s}:${o}`).join(";"),n=i?` style="${Uhe(i)}"`:"";let a="";return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent!==null?a+=Ov(this.textContent):this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(s=>typeof s=="string"?Ov(s):(s instanceof yk,s.serialize())).join(""),["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(t)&&!a?`<${t}${r}${n} />`:`<${t}${r}${n}>${a}</${t}>`}},qhe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?" shadowrootdelegatesfocus":""}>${this.adoptedStyleSheets.map(e=>`<style>${Ov(e)}</style>`).join("")}${this.childrenList.map(e=>typeof e=="string"?Ov(e):(e instanceof yk,e.serialize())).join("")}</template>`}}})),PM,Nv,Khe,Qhe,Xhe,jhe,FM,Zhe,Jhe,eue,tue,rue,Yx,$M,iue,nue=J((()=>{RM(),Whe(),NM(),PM=e=>e.reduce((t,r)=>Array.isArray(r)?t.concat(PM(r)):t.concat(r),[]),Nv=e=>e==null?null:e instanceof $M?e.build():typeof e=="string"?zl?e:document.createTextNode(e):e,Khe=(e,t)=>{if(zl){Yx(e,[t()]);return}const r=document.createComment(""),i=document.createComment("");e.appendChild(r),e.appendChild(i);let n=null;const a=()=>{n?.(),n=null;let s=r.nextSibling;for(;s&&s!==i;){const o=s.nextSibling;s.parentNode?.removeChild(s),s=o}};jp(()=>{const s=t();a();const o=document.createDocumentFragment();n=pk(l=>(Yx(o,[s]),l)),i.parentNode?.insertBefore(o,i)}),gk(()=>n?.())},Qhe="__ranFor",Xhe=e=>typeof e=="object"&&e!==null&&e[Qhe]===!0,jhe=(e,t,r)=>{const[i,n]=_M(t);let a=null;const s=pk(o=>{const l=Nv(r(e,i));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,index:n,dispose:s}},FM=(e,t)=>{const r=e.parentNode;if(!r)return;let i=e;for(const n of t)i.nextSibling!==n&&r.insertBefore(n,i.nextSibling),i=n},Zhe=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(n,()=>a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=new Map;gk(()=>{for(const n of i.values())n.dispose();i.clear()}),jp(()=>{const n=t.each()??[],a=new Map,s=[];n.forEach((o,l)=>{const h=t.key(o,l);if(a.has(h))return;let u=i.get(h);u?(i.delete(h),u.index(l)):u=jhe(o,l,t.render),a.set(h,u),u.node&&s.push(u.node)});for(const o of i.values())o.node?.parentNode?.removeChild(o.node),o.dispose();FM(r,s),i=a})},Jhe="__ranIndex",eue=e=>typeof e=="object"&&e!==null&&e[Jhe]===!0,tue=(e,t,r)=>{const[i,n]=_M(e);let a=null;const s=pk(o=>{const l=Nv(r(i,t));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,setItem:n,dispose:s}},rue=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(()=>n,a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=[];gk(()=>{for(const n of i)n.dispose();i=[]}),jp(()=>{const n=t.each()??[];for(let a=0;a<n.length;a++)a<i.length?i[a].setItem(n[a]):i.push(tue(n[a],a,t.render));for(let a=i.length-1;a>=n.length;a--){const{node:s}=i[a];s?.parentNode?.removeChild(s),i[a].dispose(),i.pop()}FM(r,i.map(a=>a.node).filter(a=>a!=null))})},Yx=(e,t)=>{PM(t).forEach(r=>{if(Xhe(r)){Zhe(e,r);return}if(eue(r)){rue(e,r);return}if(typeof r=="function"){Khe(e,r);return}const i=Nv(r);i!=null&&e.appendChild(i)})},$M=class{el;constructor(e){this.el=zl?new vk(e):document.createElement(e)}id(e){return this.el.setAttribute("id",e),this}bind(e,t){typeof e=="function"?jp(()=>t(e())):t(e)}class(e){return this.bind(e,t=>{zl?this.el.attributes.set("class",t):this.el.className=t}),this}addClass(...e){return e.forEach(t=>this.el.classList.add(t)),this}removeClass(...e){return e.forEach(t=>this.el.classList.remove(t)),this}attr(e,t){return this.bind(t,r=>this.el.setAttribute(e,r)),this}attrs(e){return Object.entries(e).forEach(([t,r])=>{r!=null&&this.el.setAttribute(t,String(r))}),this}boolAttr(e,t,r=""){return this.bind(t,i=>{i?this.el.setAttribute(e,r):this.el.removeAttribute(e)}),this}part(e){return this.attr("part",e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e=="string"?this.bind(t??"",r=>this.el.style.setProperty(e,r)):Object.entries(e).forEach(([r,i])=>this.el.style.setProperty(r,i)),this}cssVar(e,t){const r=e.startsWith("--")?e:`--${e}`;return this.style(r,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr("role",e)}tabIndex(e){return this.attr("tabindex",String(e))}label(e){return this.aria("label",e)}labelledBy(e){return this.aria("labelledby",e)}describedBy(e){return this.aria("describedby",e)}ariaHidden(e=!0){return this.aria("hidden",String(e))}on(e,t,r){return this.el.addEventListener(e,t,r),this}listen(e,t,r,i){return e.on(this.el,t,r,i),this}delegate(e,t,r,i,n){return e.delegate(this.el,t,r,i,n),this}children(...e){return Yx(this.el,e),this}replaceChildren(...e){if(zl){const t=this.el;t.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,t=>{this.el.textContent=t}),this}ref(e){return e.current=this.el,this}shadow(e={mode:"closed"}){const t=this.el.attachShadow(e);return new iue(this.el,t,e)}build(){return this.el}serialize(){if(zl)return this.el.serialize();const e=document.createElement("div");return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},iue=class{root;hostEl;options;constructor(e,t,r){this.hostEl=e,this.root=t,this.options=r}children(...e){return Yx(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(zl)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<"u")try{const r=new CSSStyleSheet;return r.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,r],this}catch{}const t=document.createElement("style");return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return zl?this.root.serialize():this.root.innerHTML}}})),Mi,Ct,of,ja,bk,xk,aue,sue,Y0t=J((()=>{nue(),Mi=e=>new $M(e),Ct=()=>Mi("div"),of=()=>Mi("span"),ja=()=>Mi("slot"),bk=()=>Mi("button"),xk=()=>Mi("input"),aue=()=>Mi("style"),sue=()=>Mi("label")})),an=J((()=>{RM(),F0t(),NM(),Vhe(),Whe(),nue(),Y0t()})),Rh,aa,V0t=J((()=>{Rh=[!1,"false",null,void 0],aa=e=>{const t=e.hasAttribute("disabled"),r=e.getAttribute("disabled");return!!(t&&!Rh.includes(r))}})),q0t=J((()=>{}));function wn(e,t){zl?(zM.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}function W0t(){return zM}var zM,pn=J((()=>{RM(),zM=new Map})),UM,gn,oue,lue,cue=J((()=>{an(),pn(),UM=()=>typeof document<"u"?HTMLElement:vk,gn=UM(),oue=e=>{if(e.tagName&&e.tagName!=="div")return e.tagName;const t=W0t();for(const[r,i]of t)if(e instanceof i)return r;return e.constructor.name.toLowerCase()},lue=e=>{if(!e)return"";const t=oue(e);return typeof e.serialize=="function"||e instanceof vk?e.serialize(t):""}})),K0t=J((()=>{})),Ak,wk,hue,uue,Q0t=J((()=>{Ak=new Map,wk=new Map,hue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!Ak.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),Ak.set(t,i)}const r=Ak.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!e.querySelector("style[data-ranui]")){const r=document.createElement("style");r.setAttribute("data-ranui",""),r.textContent=t,e.appendChild(r)}}},uue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!wk.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),wk.set(t,i)}const r=wk.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!Array.from(e.querySelectorAll("style[data-ranui-sheet]")).some(r=>r.textContent===t)){const r=document.createElement("style");r.setAttribute("data-ranui-sheet",""),r.textContent=t,e.appendChild(r)}}}})),GM,HM,mn,Tn,Wr,ai,Tk,Cn,yn=J((()=>{Q0t(),GM=new WeakMap,HM="@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}",mn=(e,t="",r={mode:"closed"})=>{const i=e.shadowRoot||GM.get(e)||e.attachShadow(r);return GM.set(e,i),hue(i,t?`${t}
|
|
2
2
|
${HM}`:HM),i},Tn=(e,t,r)=>{const i=e.querySelector(t);if(i)return i;const n=r();return e.appendChild(n),n},Wr=(e,t,r="")=>e.getAttribute(t)??r,ai=(e,t,r,i={})=>{if(i.removeEmpty&&!r){e.removeAttribute(t);return}e.setAttribute(t,r??"")},Tk=(e,t,r,i={})=>{if(r){e.setAttribute(t,""),i.aria&&e.setAttribute(`aria-${i.aria}`,"true");return}e.removeAttribute(t),i.aria&&e.removeAttribute(`aria-${i.aria}`)},Cn=(e,t,r,i,n)=>{if(r!=="sheet"||i===n)return;const a=e.getAttribute("sheet")||"";a&&uue(t,a)}})),kn=J((()=>{an(),V0t(),q0t(),NM(),cue(),K0t(),yn(),TM()}));dc(),kn(),an(),pn(),yn();var due=class extends gn{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new ks;debounceTimeId;static get observedAttributes(){return["disabled","icon","effect","iconSize","type","sheet"]}constructor(){super(),this._shadowDom=mn(this,P0t);const e=Tn(this._shadowDom,".ran-btn",()=>Ct().class("ran-btn").attr("part","button").role("button").tabIndex(0).children(Ct().class("ran-btn-content").attr("part","content").children(ja().class("slot"))).build());this._btn=e,this._btnContent=e.querySelector(".ran-btn-content"),this._slot=e.querySelector("slot")}get sheet(){return this.getAttribute("sheet")||""}set sheet(e){this.setAttribute("sheet",e||""),this.handlerExternalCss()}get disabled(){return aa(this)}set disabled(e){!e||e==="false"?(this.removeAttribute("disabled"),this.removeAttribute("aria-disabled")):(this.setAttribute("disabled",""),this.setAttribute("aria-disabled","true"))}get iconSize(){return this.getAttribute("iconSize")||""}set iconSize(e){!e||e==="false"?this.removeAttribute("iconSize"):(this.setAttribute("iconSize",e),this.setIcon())}get icon(){return this.getAttribute("icon")||""}set icon(e){!e||e==="false"?this.removeAttribute("icon"):(this.setAttribute("icon",e),this.setIcon())}get effect(){return this.getAttribute("effect")||""}set effect(e){Rh.includes(e)||!e?this.removeAttribute("effect"):this.setAttribute("effect",e)}get type(){return this.getAttribute("type")||""}set type(e){e?this.setAttribute("type",e):this.removeAttribute("type")}setIcon=()=>{if(typeof document>"u"||!this._slot)return;const e=this.icon;if(!e){this._iconElement&&(this._iconElement.remove(),this._iconElement=void 0);return}if(this._iconElement)this._iconElement.setAttribute("name",e);else{let a=this._shadowDom.querySelector("r-icon");a||(a=Mi("r-icon").attr("color","currentColor").class("icon").build(),this._slot.insertAdjacentElement("beforebegin",a)),this._iconElement=a,this._iconElement.setAttribute("name",e)}const{width:t,height:r}=this._slot.getBoundingClientRect(),i=Math.min(t,r)||16,n=this.iconSize||`${i>5?i-5:i}`;this._iconElement.setAttribute("size",String(n))};mousedown=e=>{if(EM()==="pc"&&!this.disabled){this.debounceMouseEvent();const{left:t,top:r}=this.getBoundingClientRect();this._btn.style.setProperty("--ran-x",`${e.clientX-t}px`),this._btn.style.setProperty("--ran-y",`${e.clientY-r}px`)}};mouseup=()=>{EM()==="pc"&&(this.debounceTimeId||(this.debounceTimeId=setTimeout(()=>{this._btn.style.removeProperty("--ran-x"),this._btn.style.removeProperty("--ran-y"),this.debounceMouseEvent()},600)))};keydown=e=>{aa(this)||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&(clearTimeout(this.debounceTimeId),this.debounceTimeId=void 0)};handlerExternalCss=()=>{Cn(this,this._shadowDom,"sheet",null,this.sheet)};syncA11yState=()=>{const e=aa(this);this._btn.setAttribute("aria-disabled",e?"true":"false"),this._btn.tabIndex=e?-1:0,e?(this.setAttribute("aria-disabled","true"),this._btnContent.setAttribute("disabled","true")):(this.removeAttribute("aria-disabled"),this._btnContent.removeAttribute("disabled"))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this._events.on(this._btn,"mousedown",this.mousedown).on(this._btn,"mouseup",this.mouseup).on(this._btn,"keydown",this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}attributeChangedCallback(e,t,r){t!==r&&(e==="disabled"&&this._btnContent&&this.syncA11yState(),(e==="icon"||e==="iconSize")&&this.setIcon(),e==="sheet"&&this.handlerExternalCss())}};wn("r-button",due);var X0t=".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{display:var(--ran-icon-host-display, inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name, rotate);animation-duration:var(--ran-icon-host-spin-animation-name, 1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name, infinite)}.ran-icon{display:var(--ran-icon-display, flex);align-items:var(--ran-icon-align-items, center);justify-content:var(--ran-icon-justify-content, center);color:var(--ran-icon-color, inherit);font-size:var(--ran-icon-font-size, 1em);margin:var(--ran-icon-margin, 0)}.ran-icon svg{width:var(--ran-icon-svg-width, 1em);height:var(--ran-icon-svg-height, 1em);fill:var(--ran-icon-svg-fill, currentColor);stroke:var(--ran-icon-svg-stroke, currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform, rotate(360deg))}}",fue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>'},pue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>'},gue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>'},mue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>'},yue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>'},vue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>'},bue={success:!0,_identification:!0,data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>'},j0t={copy:fue,check:pue,download:gue,fullscreen:mue,"zoom-in":yue,"zoom-out":vue,refresh:bue};kn(),an(),pn(),yn();var Z0t=!1,xue=new Map,YM=!1,Vx=e=>/<svg[\s>]/i.test(e),J0t=e=>{if(typeof e=="string")return Vx(e)?e:void 0;if(!e||typeof e!="object")return;const t=e,r=t.data;if(typeof r=="string"&&Vx(r))return r;const i=t.default;if(typeof i=="string"&&Vx(i))return i;if(i&&typeof i=="object"){const n=i;if(typeof n.data=="string"&&Vx(n.data))return n.data}},VM=(e,t)=>{YM=!0;const r=J0t(t);r&&(xue.set(`inline:${e}`,r),typeof window<"u"&&window.dispatchEvent(new CustomEvent("ranui-icon-registered",{detail:{name:e}})))},Ck=e=>{YM=!0,Object.entries(e).forEach(([t,r])=>{VM(t,r)})};Ck(j0t);var emt=["add-user","arrow-down","book","check","check-circle","check-circle-fill","close","close-circle","close-circle-fill","copy","download","drop","eye","eye-close","fullscreen","github","globe","home","info-circle","info-circle-fill","issue","loading","loading-scene","lock","menu","message","more","plus","power-off","preview","refresh","search","setting","sort","team","unlock","user","warning-circle","warning-circle-fill","without-content","zoom-in","zoom-out"],Aue=class extends gn{isDev=Z0t;_events=new ks;static get observedAttributes(){return["name","size","color","spin","decorative","aria-label","sheet"]}_icon;_div;_shadowDom;_onIconRegistered=e=>{const t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=mn(this,X0t);const e=Tn(this._shadowDom,".ran-icon",()=>Ct().class("ran-icon").part("ran-icon").build());this._div=e}get name(){return Wr(this,"name")}set name(e){e&&this.setAttribute("name",e)}get size(){return Wr(this,"size")}set size(e){e&&this.setAttribute("size",e)}get color(){return Wr(this,"color")}set color(e){e&&this.setAttribute("color",e)}get spin(){return this.hasAttribute("spin")}set spin(e){e?this.setAttribute("spin",""):this.removeAttribute("spin")}get decorative(){const e=this.getAttribute("decorative");return e==null?!this.hasAttribute("aria-label"):e!=="false"&&e!=="0"}set decorative(e){this.setAttribute("decorative",e?"true":"false")}get ariaLabel(){return Wr(this,"aria-label")}set ariaLabel(e){ai(this,"aria-label",e,{removeEmpty:!0})}get sheet(){return Wr(this,"sheet")}set sheet(e){ai(this,"sheet",e)}handlerExternalCss=()=>{Cn(this,this._shadowDom,"sheet",null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute("aria-hidden","true"),this.removeAttribute("role"),this._icon.setAttribute("aria-hidden","true"),this._icon.setAttribute("focusable","false");return}this.removeAttribute("aria-hidden"),this.setAttribute("role","img"),this._icon.removeAttribute("aria-hidden"),this._icon.setAttribute("focusable","false")}};setIcon=()=>{if(typeof document>"u")return;this._icon&&(this._icon.remove(),this._icon=void 0);const e=this.name;if(e)if(e.startsWith("<svg"))this.renderSvg(e,e);else try{const t=`inline:${e}`,r=xue.get(t);if(!r){this.isDev&&YM&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}r&&this.isSvgText(r)?this.renderSvg(r,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>Vx(e);parseSvg=e=>{const t=new window.DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.tagName.toLowerCase()==="parsererror"||t.tagName.toLowerCase()!=="svg")return;const r=new XMLSerializer().serializeToString(t),i=Mi("template").build();i.innerHTML=r.trim();const n=i.content.firstElementChild;if(!(!n||n.tagName.toLowerCase()!=="svg"))return n};renderSvg=(e,t)=>{const r=this.parseSvg(e);r?(this._icon=r,this._icon.setAttribute("part","icon-svg"),this._icon.setAttribute("data-name",t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){const e=this.size||"1em";this._icon.setAttribute("width",e),this._icon.setAttribute("height",e);const t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty("width",t),this._icon.style.setProperty("height",t)}};setColor=()=>{if(this._icon){const e=this.color||"currentColor";this._icon.style.setProperty("color",e),this._icon.style.setProperty("fill",e),this._icon.style.setProperty("stroke",e)}};setSpin=()=>{this.spin?this._div.classList.add("ran-icon-spin"):this._div.classList.remove("ran-icon-spin")};connectedCallback(){this._events.on(window,"ranui-icon-registered",this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,r){t!==r&&(e==="name"&&this.setIcon(),e==="size"&&this.setSize(),e==="color"&&this.setColor(),e==="spin"&&this.setSpin(),(e==="decorative"||e==="aria-label")&&this.syncA11y(),e==="sheet"&&this.handlerExternalCss())}};wn("r-icon",Aue);var tmt={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
3
3
|
xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">
|
|
4
4
|
<path
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as o } from "./button-
|
|
1
|
+
import { t as o } from "./button-Dw6YKyNd.js";
|
|
2
2
|
import { a, i as m, n as e, o as s, r as i, t as p } from "./theme-kOWZbKCq.js";
|
|
3
3
|
import { i as f, n as c, r as T, t as h } from "./icon-GZrfSeon.js";
|
|
4
4
|
import { t as P } from "./image-CqoQfJoV.js";
|
package/dist/ranui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:root{--ran-background-100: #ffffff;--ran-background-200: #fafafa;--ran-gray-100: #f2f2f2;--ran-gray-200: #ebebeb;--ran-gray-300: #e6e6e6;--ran-gray-400: #eaeaea;--ran-gray-500: #c9c9c9;--ran-gray-600: #a8a8a8;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #4d4d4d;--ran-gray-1000: #171717;--ran-gray-alpha-100: #0000000d;--ran-gray-alpha-200: #00000015;--ran-gray-alpha-300: #0000001a;--ran-gray-alpha-400: #00000014;--ran-gray-alpha-500: #00000036;--ran-gray-alpha-600: #0000003d;--ran-gray-alpha-700: #00000070;--ran-gray-alpha-800: #00000082;--ran-gray-alpha-900: #000000b3;--ran-gray-alpha-1000: #000000e8;--ran-blue-100: #f0f7ff;--ran-blue-200: #e9f4ff;--ran-blue-300: #dfefff;--ran-blue-400: #cae7ff;--ran-blue-500: #94ccff;--ran-blue-600: #48aeff;--ran-blue-700: #006bff;--ran-blue-800: #0059ec;--ran-blue-900: #005ff2;--ran-blue-1000: #002359;--ran-red-100: #ffeeef;--ran-red-200: #ffe8ea;--ran-red-300: #ffe3e4;--ran-red-400: #ffd7d6;--ran-red-500: #ffb1b3;--ran-red-600: #ff676d;--ran-red-700: #fc0035;--ran-red-800: #ea001d;--ran-red-900: #d8001b;--ran-red-1000: #47000c;--ran-amber-100: #fff6de;--ran-amber-200: #fff4cf;--ran-amber-300: #fff1c1;--ran-amber-400: #ffdc73;--ran-amber-500: #ffc543;--ran-amber-600: #ffa600;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #aa4d00;--ran-amber-1000: #561900;--ran-green-100: #ecfdec;--ran-green-200: #e5fce7;--ran-green-300: #d3fad1;--ran-green-400: #b9f5bc;--ran-green-500: #82eb8d;--ran-green-600: #4ce15e;--ran-green-700: #28a948;--ran-green-800: #279141;--ran-green-900: #107d32;--ran-green-1000: #003a00;--ran-color-primary: var(--ran-
|
|
1
|
+
.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:root{--ran-background-100: #ffffff;--ran-background-200: #fafafa;--ran-gray-100: #f2f2f2;--ran-gray-200: #ebebeb;--ran-gray-300: #e6e6e6;--ran-gray-400: #eaeaea;--ran-gray-500: #c9c9c9;--ran-gray-600: #a8a8a8;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #4d4d4d;--ran-gray-1000: #171717;--ran-gray-alpha-100: #0000000d;--ran-gray-alpha-200: #00000015;--ran-gray-alpha-300: #0000001a;--ran-gray-alpha-400: #00000014;--ran-gray-alpha-500: #00000036;--ran-gray-alpha-600: #0000003d;--ran-gray-alpha-700: #00000070;--ran-gray-alpha-800: #00000082;--ran-gray-alpha-900: #000000b3;--ran-gray-alpha-1000: #000000e8;--ran-blue-100: #f0f7ff;--ran-blue-200: #e9f4ff;--ran-blue-300: #dfefff;--ran-blue-400: #cae7ff;--ran-blue-500: #94ccff;--ran-blue-600: #48aeff;--ran-blue-700: #006bff;--ran-blue-800: #0059ec;--ran-blue-900: #005ff2;--ran-blue-1000: #002359;--ran-red-100: #ffeeef;--ran-red-200: #ffe8ea;--ran-red-300: #ffe3e4;--ran-red-400: #ffd7d6;--ran-red-500: #ffb1b3;--ran-red-600: #ff676d;--ran-red-700: #fc0035;--ran-red-800: #ea001d;--ran-red-900: #d8001b;--ran-red-1000: #47000c;--ran-amber-100: #fff6de;--ran-amber-200: #fff4cf;--ran-amber-300: #fff1c1;--ran-amber-400: #ffdc73;--ran-amber-500: #ffc543;--ran-amber-600: #ffa600;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #aa4d00;--ran-amber-1000: #561900;--ran-green-100: #ecfdec;--ran-green-200: #e5fce7;--ran-green-300: #d3fad1;--ran-green-400: #b9f5bc;--ran-green-500: #82eb8d;--ran-green-600: #4ce15e;--ran-green-700: #28a948;--ran-green-800: #279141;--ran-green-900: #107d32;--ran-green-1000: #003a00;--ran-color-primary: var(--ran-gray-1000);--ran-color-primary-hover: #383838;--ran-color-primary-active: #4d4d4d;--ran-color-primary-text: var(--ran-background-100);--ran-color-success: var(--ran-green-700);--ran-color-warning: var(--ran-amber-700);--ran-color-danger: var(--ran-red-700);--ran-color-bg: var(--ran-background-100);--ran-color-bg-subtle: var(--ran-background-200);--ran-color-bg-elevated: var(--ran-background-100);--ran-color-bg-muted: var(--ran-gray-100);--ran-color-bg-hover: var(--ran-gray-200);--ran-color-bg-active: var(--ran-gray-300);--ran-color-text: var(--ran-gray-1000);--ran-color-text-secondary: var(--ran-gray-900);--ran-color-text-disabled: var(--ran-gray-700);--ran-color-border: var(--ran-gray-400);--ran-color-border-secondary: var(--ran-gray-300);--ran-color-border-hover: var(--ran-gray-500);--ran-color-border-active: var(--ran-gray-600);--ran-color-link: var(--ran-blue-700);--ran-font-family: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ran-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--ran-font-size: 14px;--ran-line-height: 1.5715;--ran-radius-sm: 6px;--ran-radius-md: 12px;--ran-radius-lg: 16px;--ran-radius-full: 9999px;--ran-space-1: 4px;--ran-space-2: 8px;--ran-space-3: 12px;--ran-space-4: 16px;--ran-space-6: 24px;--ran-space-8: 32px;--ran-space-10: 40px;--ran-space-16: 64px;--ran-space-24: 96px;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 4px -2px rgba(0, 0, 0, .05);--ran-shadow-menu: 0 2px 4px rgba(0, 0, 0, .05), 0 8px 24px -6px rgba(0, 0, 0, .14);--ran-shadow-modal: 0 4px 12px rgba(0, 0, 0, .08), 0 20px 48px -12px rgba(0, 0, 0, .22);--ran-z-modal: 1000;--ran-z-dropdown: 1100;--ran-z-message: 1200;--ran-focus-ring: 0 0 0 2px var(--ran-background-100), 0 0 0 4px var(--ran-blue-700);--ran-motion-duration-fast: .15s;--ran-motion-duration-base: .2s;--ran-motion-duration-slow: .35s;--ran-motion-ease-standard: cubic-bezier(.645, .045, .355, 1);--ran-motion-ease-snappy: cubic-bezier(.33, 0, .15, 1);--ran-motion-ease-spring: cubic-bezier(.34, 1.26, .5, 1);--ran-motion-ease-bouncy: cubic-bezier(.34, 1.56, .64, 1);--ran-motion-ease-smooth: cubic-bezier(.4, 0, .2, 1);--ran-skin-border-width: 1px;--ran-skin-border-style: solid;--ran-skin-raised-shadow: var(--ran-shadow-elevated);--ran-skin-font-family: var(--ran-font-family)}@media(prefers-color-scheme:dark){:root:not([data-ran-theme=light]):not([theme=light]):not(.light){--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)}}:root[data-ran-theme=dark],:root[theme=dark],:root.dark{--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)}
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -6,7 +6,7 @@ shape), slots, and `::part()` names — extracted from source. For CSS variables
|
|
|
6
6
|
(theming tokens) see [style-tokens-public.md](./style-tokens-public.md); for
|
|
7
7
|
design rules see [DESIGN.md](./DESIGN.md).
|
|
8
8
|
|
|
9
|
-
Generated at: 2026-07-19T06:
|
|
9
|
+
Generated at: 2026-07-19T06:49:49.451Z
|
|
10
10
|
|
|
11
11
|
32 custom elements.
|
|
12
12
|
|
|
@@ -21,7 +21,7 @@ Source: `components/button/index.ts`
|
|
|
21
21
|
- `icon: string`
|
|
22
22
|
- `iconSize: string`
|
|
23
23
|
- `sheet: string`
|
|
24
|
-
- `type: string` — Visual variant: `''` (default) | `'primary'`
|
|
24
|
+
- `type: string` — Visual variant: `''` (default) | `'primary'` (monochrome) | `'warning'` | `'text'`. Drives the `:host([type=...])` styles.
|
|
25
25
|
- **Events**: —
|
|
26
26
|
- **Slots**: `default`
|
|
27
27
|
- **Parts**: `button`, `content`
|
package/docs/DESIGN.md
CHANGED
|
@@ -38,27 +38,26 @@ Scales: `--ran-gray-100..1000`, `--ran-gray-alpha-100..1000` (translucent, layer
|
|
|
38
38
|
|
|
39
39
|
**Use the semantic layer, not the scale, in components:**
|
|
40
40
|
|
|
41
|
-
| Token
|
|
42
|
-
|
|
|
43
|
-
| `--ran-color-bg`
|
|
44
|
-
| `--ran-color-bg-subtle`
|
|
45
|
-
| `--ran-color-bg-elevated`
|
|
46
|
-
| `--ran-color-bg-muted`
|
|
47
|
-
| `--ran-color-bg-hover`
|
|
48
|
-
| `--ran-color-bg-active`
|
|
49
|
-
| `--ran-color-text`
|
|
50
|
-
| `--ran-color-text-secondary`
|
|
51
|
-
| `--ran-color-text-disabled`
|
|
52
|
-
| `--ran-color-border`
|
|
53
|
-
| `--ran-color-border-hover`
|
|
54
|
-
| `--ran-color-border-active`
|
|
55
|
-
| `--ran-color-primary` / `-hover` / `-active`
|
|
56
|
-
| `--ran-color-
|
|
57
|
-
| `--ran-color-
|
|
58
|
-
| `--ran-color-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
**Accent meaning:** blue = primary & links · green = success · amber = warning · red = danger/error. The **contrast** pair is the monochrome "highest-contrast" action (Geist contrast button): black-on-white in light, white-on-black in dark — use it when the primary action should carry no hue.
|
|
41
|
+
| Token | Maps to | Use for |
|
|
42
|
+
| -------------------------------------------- | ------------------------------------- | -------------------------------- |
|
|
43
|
+
| `--ran-color-bg` | background-100 | Page background |
|
|
44
|
+
| `--ran-color-bg-subtle` | background-200 | Subtle page zones |
|
|
45
|
+
| `--ran-color-bg-elevated` | bg-100 / gray-100 (dark) | Cards, surfaces |
|
|
46
|
+
| `--ran-color-bg-muted` | gray-100 | Inset / muted fills |
|
|
47
|
+
| `--ran-color-bg-hover` | gray-200 | Hover background |
|
|
48
|
+
| `--ran-color-bg-active` | gray-300 | Active background |
|
|
49
|
+
| `--ran-color-text` | gray-1000 | Primary text |
|
|
50
|
+
| `--ran-color-text-secondary` | gray-900 | Secondary text |
|
|
51
|
+
| `--ran-color-text-disabled` | gray-700 | Disabled text |
|
|
52
|
+
| `--ran-color-border` | gray-400 | Default border |
|
|
53
|
+
| `--ran-color-border-hover` | gray-500 | Hover border |
|
|
54
|
+
| `--ran-color-border-active` | gray-600 | Active border |
|
|
55
|
+
| `--ran-color-primary` / `-hover` / `-active` | gray-1000 / #383838 / #4d4d4d (flips) | Primary action (monochrome) |
|
|
56
|
+
| `--ran-color-primary-text` | background-100 | Ink on a primary surface (flips) |
|
|
57
|
+
| `--ran-color-success` / `warning` / `danger` | green-700 / amber-700 / red-700 | Status |
|
|
58
|
+
| `--ran-color-link` | blue-700 | Links |
|
|
59
|
+
|
|
60
|
+
**Accent meaning:** the **primary action is monochrome** — `--ran-color-primary` is black-on-white in light, white-on-black in dark (matching Vercel's brand tone), and text/icons on it use `--ran-color-primary-text` (the inverse, which flips too). **Blue** is reserved for **links (`--ran-color-link`) and the focus ring** only · green = success · amber = warning · red = danger/error. There is no separate "contrast" token — primary _is_ the highest-contrast monochrome action.
|
|
62
61
|
|
|
63
62
|
**Light & dark:** same token name, different value. `gray-1000` is `#171717` in light and `#ededed` in dark. Components reference the _semantic name_; dark mode only redefines the base scale (one mixin), and everything re-resolves.
|
|
64
63
|
|
|
@@ -193,7 +192,7 @@ transition: var(--ran-input-transition, none);
|
|
|
193
192
|
|
|
194
193
|
- Use the semantic ranui components (`r-button`, `r-input`, `r-select`, `r-card`, `r-modal`, …) rather than re-building primitives.
|
|
195
194
|
- Theme through **CSS variables**, **`::part()`**, or the **`sheet`** attribute (escape hatch). CSS variables cross Shadow DOM; selectors do not.
|
|
196
|
-
- Component tokens default to semantic tokens: `var(--ran-btn-content-background-color, var(--ran-color-primary, #
|
|
195
|
+
- Component tokens default to semantic tokens: `var(--ran-btn-content-background-color, var(--ran-color-primary, #171717))`.
|
|
197
196
|
- Map states to the color ladder: default → `bg`/`text`; hover → `bg-hover` / `border-hover` / `primary-hover`; active → `bg-active` / `primary-active`; disabled → `text-disabled` + reduced opacity; focus → focus ring.
|
|
198
197
|
- **Interactive cards opt in**: `r-card` only reacts to hover with the `hoverable` attribute (border 400 → 500 + elevated shadow). Non-interactive cards must stay inert — never add hover feedback to something that isn't clickable.
|
|
199
198
|
- **Theme switching UI is a component**: use `<r-theme-switch>` (system / light / dark segmented pill, wired to `setTheme`/localStorage, syncs across instances and updates `theme-color` metas) instead of hand-rolling toggles. Localize with `label` / `label-system` / `label-light` / `label-dark`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This file is auto-generated by `bin/generate-style-docs.ts`.
|
|
4
4
|
It is a filtered, public-facing style API view (structural/internal tokens excluded).
|
|
5
5
|
|
|
6
|
-
Generated at: 2026-07-
|
|
6
|
+
Generated at: 2026-07-19T06:49:49.075Z
|
|
7
7
|
|
|
8
8
|
## Components
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
14
14
|
|
|
15
15
|
#### Tokens
|
|
16
16
|
|
|
17
|
-
<!-- layers: semantic:
|
|
17
|
+
<!-- layers: semantic: 13 · skin: 2 · component: 38 · internal: 1 -->
|
|
18
18
|
|
|
19
19
|
- `--ran-btn-after-background-image`
|
|
20
20
|
- `--ran-btn-after-opacity`
|
|
@@ -28,6 +28,7 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
28
28
|
- `--ran-btn-contain-user-select`
|
|
29
29
|
- `--ran-btn-content-active-background-color`
|
|
30
30
|
- `--ran-btn-content-active-border-color`
|
|
31
|
+
- `--ran-btn-content-active-transform`
|
|
31
32
|
- `--ran-btn-content-align-items`
|
|
32
33
|
- `--ran-btn-content-background-color`
|
|
33
34
|
- `--ran-btn-content-background-image`
|
|
@@ -46,6 +47,7 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
46
47
|
- `--ran-btn-content-padding`
|
|
47
48
|
- `--ran-btn-content-text-align`
|
|
48
49
|
- `--ran-btn-content-text-border`
|
|
50
|
+
- `--ran-btn-content-transition`
|
|
49
51
|
- `--ran-btn-content-warning-background-color`
|
|
50
52
|
- `--ran-btn-content-warning-border-color`
|
|
51
53
|
- `--ran-btn-content-warning-color`
|
|
@@ -55,18 +57,16 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
55
57
|
- `--ran-color-bg-elevated`
|
|
56
58
|
- `--ran-color-border`
|
|
57
59
|
- `--ran-color-border-hover`
|
|
58
|
-
- `--ran-color-contrast-`
|
|
59
|
-
- `--ran-color-contrast-bg`
|
|
60
|
-
- `--ran-color-contrast-bg-active`
|
|
61
|
-
- `--ran-color-contrast-bg-hover`
|
|
62
|
-
- `--ran-color-contrast-text`
|
|
63
60
|
- `--ran-color-danger`
|
|
64
61
|
- `--ran-color-primary`
|
|
65
62
|
- `--ran-color-primary-active`
|
|
66
63
|
- `--ran-color-primary-hover`
|
|
64
|
+
- `--ran-color-primary-text`
|
|
67
65
|
- `--ran-color-text`
|
|
68
66
|
- `--ran-gray-alpha-400`
|
|
69
67
|
- `--ran-motion-duration-base`
|
|
68
|
+
- `--ran-motion-ease-spring`
|
|
69
|
+
- `--ran-motion-ease-standard`
|
|
70
70
|
- `--ran-radius-sm`
|
|
71
71
|
- `--ran-skin-font-family`
|
|
72
72
|
- `--ran-skin-raised-shadow`
|
|
@@ -78,12 +78,12 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
78
78
|
|
|
79
79
|
### `card`
|
|
80
80
|
|
|
81
|
-
- Tokens:
|
|
81
|
+
- Tokens: 20
|
|
82
82
|
- Parts: 7
|
|
83
83
|
|
|
84
84
|
#### Tokens
|
|
85
85
|
|
|
86
|
-
<!-- layers: semantic:
|
|
86
|
+
<!-- layers: semantic: 7 · skin: 1 · internal: 12 -->
|
|
87
87
|
|
|
88
88
|
- `--ran-card-background`
|
|
89
89
|
- `--ran-card-border-color`
|
|
@@ -102,7 +102,6 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
102
102
|
- `--ran-color-border-hover`
|
|
103
103
|
- `--ran-color-text`
|
|
104
104
|
- `--ran-color-text-secondary`
|
|
105
|
-
- `--ran-motion-duration-base`
|
|
106
105
|
- `--ran-radius-md`
|
|
107
106
|
- `--ran-shadow-elevated`
|
|
108
107
|
- `--ran-skin-border-style`
|
|
@@ -119,12 +118,12 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
119
118
|
|
|
120
119
|
### `checkbox`
|
|
121
120
|
|
|
122
|
-
- Tokens:
|
|
121
|
+
- Tokens: 40
|
|
123
122
|
- Parts: 5
|
|
124
123
|
|
|
125
124
|
#### Tokens
|
|
126
125
|
|
|
127
|
-
<!-- layers: semantic:
|
|
126
|
+
<!-- layers: semantic: 7 · skin: 1 · component: 31 · internal: 1 -->
|
|
128
127
|
|
|
129
128
|
- `--ran-blue-400`
|
|
130
129
|
- `--ran-checkbox-border-radius`
|
|
@@ -156,12 +155,15 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
156
155
|
- `--ran-checkbox-label-font-family`
|
|
157
156
|
- `--ran-checkbox-label-font-size`
|
|
158
157
|
- `--ran-checkbox-label-gap`
|
|
158
|
+
- `--ran-checkbox-pop-animation`
|
|
159
159
|
- `--ran-checkbox-white-space`
|
|
160
160
|
- `--ran-color-bg-elevated`
|
|
161
161
|
- `--ran-color-bg-muted`
|
|
162
162
|
- `--ran-color-border`
|
|
163
163
|
- `--ran-color-primary`
|
|
164
164
|
- `--ran-color-text`
|
|
165
|
+
- `--ran-motion-duration-base`
|
|
166
|
+
- `--ran-motion-ease-bouncy`
|
|
165
167
|
- `--ran-skin-font-family`
|
|
166
168
|
|
|
167
169
|
#### Parts
|
|
@@ -251,6 +253,36 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
251
253
|
|
|
252
254
|
- (none)
|
|
253
255
|
|
|
256
|
+
### `glass`
|
|
257
|
+
|
|
258
|
+
- Tokens: 15
|
|
259
|
+
- Parts: 2
|
|
260
|
+
|
|
261
|
+
#### Tokens
|
|
262
|
+
|
|
263
|
+
<!-- layers: semantic: 3 · internal: 12 -->
|
|
264
|
+
|
|
265
|
+
- `--ran-glass-blur`
|
|
266
|
+
- `--ran-glass-border`
|
|
267
|
+
- `--ran-glass-brightness`
|
|
268
|
+
- `--ran-glass-radius`
|
|
269
|
+
- `--ran-glass-refraction`
|
|
270
|
+
- `--ran-glass-saturate`
|
|
271
|
+
- `--ran-glass-shadow`
|
|
272
|
+
- `--ran-glass-sheen-duration`
|
|
273
|
+
- `--ran-glass-specular`
|
|
274
|
+
- `--ran-glass-specular-opacity`
|
|
275
|
+
- `--ran-glass-tint`
|
|
276
|
+
- `--ran-glass-transition`
|
|
277
|
+
- `--ran-motion-duration-base`
|
|
278
|
+
- `--ran-motion-duration-fast`
|
|
279
|
+
- `--ran-motion-ease-spring`
|
|
280
|
+
|
|
281
|
+
#### Parts
|
|
282
|
+
|
|
283
|
+
- `glass`
|
|
284
|
+
- `specular`
|
|
285
|
+
|
|
254
286
|
### `icon`
|
|
255
287
|
|
|
256
288
|
- Tokens: 7
|
|
@@ -287,12 +319,12 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
287
319
|
|
|
288
320
|
### `input`
|
|
289
321
|
|
|
290
|
-
- Tokens:
|
|
322
|
+
- Tokens: 83
|
|
291
323
|
- Parts: 4
|
|
292
324
|
|
|
293
325
|
#### Tokens
|
|
294
326
|
|
|
295
|
-
<!-- layers: semantic:
|
|
327
|
+
<!-- layers: semantic: 10 · skin: 1 · component: 71 · internal: 1 -->
|
|
296
328
|
|
|
297
329
|
- `--ran-blue-400`
|
|
298
330
|
- `--ran-color-bg-elevated`
|
|
@@ -375,7 +407,6 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
375
407
|
- `--ran-input-status-error-border-color`
|
|
376
408
|
- `--ran-input-status-warning-border-color`
|
|
377
409
|
- `--ran-input-transition`
|
|
378
|
-
- `--ran-motion-duration-base`
|
|
379
410
|
- `--ran-radius-sm`
|
|
380
411
|
- `--ran-skin-font-family`
|
|
381
412
|
|
|
@@ -436,6 +467,42 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
436
467
|
|
|
437
468
|
- (none)
|
|
438
469
|
|
|
470
|
+
### `mermaid`
|
|
471
|
+
|
|
472
|
+
- Tokens: 17
|
|
473
|
+
- Parts: 6
|
|
474
|
+
|
|
475
|
+
#### Tokens
|
|
476
|
+
|
|
477
|
+
<!-- layers: semantic: 8 · internal: 9 -->
|
|
478
|
+
|
|
479
|
+
- `--ran-color-bg-elevated`
|
|
480
|
+
- `--ran-color-bg-muted`
|
|
481
|
+
- `--ran-color-primary`
|
|
482
|
+
- `--ran-color-text`
|
|
483
|
+
- `--ran-color-text-secondary`
|
|
484
|
+
- `--ran-mermaid-button-color`
|
|
485
|
+
- `--ran-mermaid-button-hover-background`
|
|
486
|
+
- `--ran-mermaid-button-hover-color`
|
|
487
|
+
- `--ran-mermaid-button-size`
|
|
488
|
+
- `--ran-mermaid-error-color`
|
|
489
|
+
- `--ran-mermaid-menu-item-color`
|
|
490
|
+
- `--ran-mermaid-toolbar-background`
|
|
491
|
+
- `--ran-mermaid-toolbar-gap`
|
|
492
|
+
- `--ran-mermaid-toolbar-shadow`
|
|
493
|
+
- `--ran-radius-md`
|
|
494
|
+
- `--ran-radius-sm`
|
|
495
|
+
- `--ran-shadow-menu`
|
|
496
|
+
|
|
497
|
+
#### Parts
|
|
498
|
+
|
|
499
|
+
- `button`
|
|
500
|
+
- `diagram`
|
|
501
|
+
- `error`
|
|
502
|
+
- `menu`
|
|
503
|
+
- `mermaid`
|
|
504
|
+
- `toolbar`
|
|
505
|
+
|
|
439
506
|
### `message`
|
|
440
507
|
|
|
441
508
|
- Tokens: 28
|
|
@@ -785,12 +852,12 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
785
852
|
|
|
786
853
|
### `select/dropdown-item`
|
|
787
854
|
|
|
788
|
-
- Tokens:
|
|
855
|
+
- Tokens: 19
|
|
789
856
|
- Parts: 2
|
|
790
857
|
|
|
791
858
|
#### Tokens
|
|
792
859
|
|
|
793
|
-
<!-- layers: semantic:
|
|
860
|
+
<!-- layers: semantic: 2 · component: 15 · internal: 2 -->
|
|
794
861
|
|
|
795
862
|
- `--ran-blue-100`
|
|
796
863
|
- `--ran-color-text`
|
|
@@ -810,7 +877,6 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
810
877
|
- `--ran-dropdown-option-item-hover-background-color`
|
|
811
878
|
- `--ran-dropdown-option-item-transition`
|
|
812
879
|
- `--ran-gray-alpha-100`
|
|
813
|
-
- `--ran-motion-duration-base`
|
|
814
880
|
- `--ran-radius-sm`
|
|
815
881
|
|
|
816
882
|
#### Parts
|
|
@@ -895,19 +961,18 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
895
961
|
|
|
896
962
|
### `theme-switch`
|
|
897
963
|
|
|
898
|
-
- Tokens:
|
|
899
|
-
- Parts:
|
|
964
|
+
- Tokens: 18
|
|
965
|
+
- Parts: 2
|
|
900
966
|
|
|
901
967
|
#### Tokens
|
|
902
968
|
|
|
903
|
-
<!-- layers: semantic:
|
|
969
|
+
<!-- layers: semantic: 6 · skin: 1 · internal: 11 -->
|
|
904
970
|
|
|
905
971
|
- `--ran-color-bg-hover`
|
|
906
972
|
- `--ran-color-border`
|
|
907
973
|
- `--ran-color-primary`
|
|
908
974
|
- `--ran-color-text`
|
|
909
975
|
- `--ran-color-text-secondary`
|
|
910
|
-
- `--ran-motion-duration-fast`
|
|
911
976
|
- `--ran-radius-full`
|
|
912
977
|
- `--ran-skin-border-style`
|
|
913
978
|
- `--ran-theme-switch-`
|
|
@@ -924,4 +989,5 @@ Generated at: 2026-07-11T05:42:37.197Z
|
|
|
924
989
|
|
|
925
990
|
#### Parts
|
|
926
991
|
|
|
927
|
-
-
|
|
992
|
+
- `button ${choice}`
|
|
993
|
+
- `switch`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1-alpha.1",
|
|
4
4
|
"description": "A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|