ranui 0.2.0-alpha.1 → 0.2.0-alpha.3
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/README.md +26 -0
- package/README.zh-CN.md +26 -0
- package/dist/bin/build-iife.d.ts +1 -0
- package/dist/builder.js +1 -1
- package/dist/{button-BstLjXNe.js → button-CJFSrjq_.js} +10 -10
- package/dist/button.js +1 -1
- package/dist/card-F-3fRynz.js +67 -0
- package/dist/card.js +1 -1
- package/dist/{checkbox-iHZQb-yQ.js → checkbox-BS5kNY6n.js} +9 -9
- package/dist/checkbox.js +1 -1
- package/dist/{colorpicker-CGh8pRqo.js → colorpicker-CdzUAVC5.js} +11 -11
- package/dist/colorpicker.js +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/theme-switch/index.d.ts +36 -0
- package/dist/{dropdown-RqHMRhFE.js → dropdown-BYS1Trdu.js} +9 -9
- package/dist/dropdown.js +1 -1
- package/dist/fonts/Geist-Variable.woff2 +0 -0
- package/dist/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/fonts/OFL-LICENSE.txt +92 -0
- package/dist/fonts/fonts.css +26 -0
- package/dist/{form-05Lxxl3D.js → form-BsB5JhS4.js} +9 -9
- package/dist/form.js +1 -1
- package/dist/{icon-Blm7AbyY.js → icon-pfolda2m.js} +3 -3
- package/dist/icon.js +1 -1
- package/dist/iife/button.iife.js +1 -0
- package/dist/iife/card.iife.js +1 -0
- package/dist/iife/checkbox.iife.js +1 -0
- package/dist/iife/colorpicker.iife.js +5 -0
- package/dist/iife/dropdown.iife.js +1 -0
- package/dist/iife/form.iife.js +1 -0
- package/dist/iife/icon.iife.js +1 -0
- package/dist/iife/image.iife.js +3 -0
- package/dist/iife/input.iife.js +1 -0
- package/dist/iife/link.iife.js +1 -0
- package/dist/iife/loading.iife.js +1 -0
- package/dist/iife/math.iife.js +261 -0
- package/dist/iife/message.iife.js +1 -0
- package/dist/iife/modal.iife.js +1 -0
- package/dist/iife/player.iife.js +31 -0
- package/dist/iife/popover.iife.js +1 -0
- package/dist/iife/progress.iife.js +1 -0
- package/dist/iife/radar.iife.js +1 -0
- package/dist/iife/route.iife.js +1 -0
- package/dist/iife/router.iife.js +1 -0
- package/dist/iife/scratch.iife.js +1 -0
- package/dist/iife/section.iife.js +1 -0
- package/dist/iife/select.iife.js +5 -0
- package/dist/iife/skeleton.iife.js +1 -0
- package/dist/iife/tab.iife.js +1 -0
- package/dist/iife/tabpane.iife.js +1 -0
- package/dist/iife/theme-switch.iife.js +1 -0
- package/dist/{image-DKm6z7YQ.js → image-BXpKQ9sU.js} +9 -9
- package/dist/image.js +1 -1
- package/dist/index.cjs +23 -23
- package/dist/index.d.ts +4 -0
- package/dist/index.iife.js +67 -78
- package/dist/index.js +73 -72
- package/dist/{input-Dskw1bAl.js → input-BM6e_LQr.js} +13 -13
- package/dist/input.js +1 -1
- package/dist/{link-BW-gvrpN.js → link-DURZzd7u.js} +7 -7
- package/dist/link.js +1 -1
- package/dist/{loading-C4QUpm70.js → loading-Bd-gF1AH.js} +24 -24
- package/dist/loading.js +1 -1
- package/dist/{math-Dv4nXSoI.js → math-IjzOAwnA.js} +7 -7
- package/dist/math.js +1 -1
- package/dist/{message-De5e1txT.js → message-CLpuP8HY.js} +8 -8
- package/dist/message.js +1 -1
- package/dist/{modal-DruDj3AB.js → modal-DOTpABRe.js} +7 -7
- package/dist/modal.js +1 -1
- package/dist/{player-CqTAmg_E.js → player-C2pB5L2N.js} +7 -7
- package/dist/player.js +1 -1
- package/dist/{popover-BY32HNMl.js → popover-DRUQjdPs.js} +10 -10
- package/dist/popover.js +1 -1
- package/dist/{progress-gZo0knzu.js → progress-BIEXYYd2.js} +6 -6
- package/dist/progress.js +1 -1
- package/dist/{radar-19P5Mtld.js → radar-DAF95_Mj.js} +9 -9
- package/dist/radar.js +1 -1
- package/dist/ranui.css +1 -1
- package/dist/{route-BY_E6-2C.js → route-MQZpn2BP.js} +14 -14
- package/dist/route.js +1 -1
- package/dist/{router-BDcv4F-2.js → router-B9rCrWXm.js} +5 -5
- package/dist/router.js +1 -1
- package/dist/{scratch-Dbd9G6Q6.js → scratch-QlPyy1f4.js} +1 -1
- package/dist/scratch.js +1 -1
- package/dist/{section-CNTvgdQ-.js → section-D0qMm9KM.js} +8 -8
- package/dist/section.js +1 -1
- package/dist/{select-BVdUtQX5.js → select-BSeCT9tF.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/{signal-XHfNsQNW.js → signal-CSSZxlK5.js} +1 -1
- package/dist/{skeleton-BAdJ6vyA.js → skeleton-CFqQmKyt.js} +8 -8
- package/dist/skeleton.js +1 -1
- package/dist/{tab-DH2owP2V.js → tab-CqFrgo2v.js} +5 -5
- package/dist/tab.js +1 -1
- package/dist/{tabpane-B_M-Jokw.js → tabpane-B-m3xwqu.js} +7 -7
- package/dist/tabpane.js +1 -1
- package/dist/test/unit/theme-switch.contract.test.d.ts +1 -0
- package/dist/theme-switch-B8K9y2RL.js +170 -0
- package/dist/theme-switch.js +5 -0
- package/dist/{utils-D4pPF77E.js → utils-DBfrRFoE.js} +116 -198
- package/dist/vite.config.d.ts +4 -0
- package/docs/COMPONENTS.md +21 -5
- package/docs/DESIGN.md +24 -19
- package/docs/style-tokens-public.md +55 -8
- package/package.json +17 -11
- package/dist/card-DQUJoDUQ.js +0 -60
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var ranui_colorpicker=(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,t=0,n=1)=>Math.min(n,Math.max(t,e)),i=e=>typeof e==`function`,a=typeof window<`u`,o=()=>{if(!a)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},s=12e4,c=`__ranuts_bridge__`,l=`default`,u=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)}},ee=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=l){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,u.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:c,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:r,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),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(i(l)){let t=e.source??this.targetWindow;Promise.resolve(l(r)).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 a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},s),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(a),n(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),o(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=()=>{u.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 ee(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 d=[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],f=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new f(d[0],3609767458),new f(d[1],602891725),new f(d[2],3964484399),new f(d[3],2173295548),new f(d[4],4081628472),new f(d[5],3053834265),new f(d[6],2937671579),new f(d[7],3664609560),new f(d[8],2734883394),new f(d[9],1164996542),new f(d[10],1323610764),new f(d[11],3590304994),new f(d[12],4068182383),new f(d[13],991336113),new f(d[14],633803317),new f(d[15],3479774868),new f(d[16],2666613458),new f(d[17],944711139),new f(d[18],2341262773),new f(d[19],2007800933),new f(d[20],1495990901),new f(d[21],1856431235),new f(d[22],3175218132),new f(d[23],2198950837),new f(d[24],3999719339),new f(d[25],766784016),new f(d[26],2566594879),new f(d[27],3203337956),new f(d[28],1034457026),new f(d[29],2466948901),new f(d[30],3758326383),new f(d[31],168717936),new f(d[32],1188179964),new f(d[33],1546045734),new f(d[34],1522805485),new f(d[35],2643833823),new f(d[36],2343527390),new f(d[37],1014477480),new f(d[38],1206759142),new f(d[39],344077627),new f(d[40],1290863460),new f(d[41],3158454273),new f(d[42],3505952657),new f(d[43],106217008),new f(d[44],3606008344),new f(d[45],1432725776),new f(d[46],1467031594),new f(d[47],851169720),new f(d[48],3100823752),new f(d[49],1363258195),new f(d[50],3750685593),new f(d[51],3785050280),new f(d[52],3318307427),new f(d[53],3812723403),new f(d[54],2003034995),new f(d[55],3602036899),new f(d[56],1575990012),new f(d[57],1125592928),new f(d[58],2716904306),new f(d[59],442776044),new f(d[60],593698344),new f(d[61],3733110249),new f(d[62],2999351573),new f(d[63],3815920427),new f(3391569614,3928383900),new f(3515267271,566280711),new f(3940187606,3454069534),new f(4118630271,4000239992),new f(116418474,1914138554),new f(174292421,2731055270),new f(289380356,3203993006),new f(460393269,320620315),new f(685471733,587496836),new f(852142971,1086792851),new f(1017036298,365543100),new f(1126000580,2618297676),new f(1288033470,3409855158),new f(1501505948,4234509866),new f(1607167915,987167468),new f(1816402316,1246189591),new f(0,1),new f(0,32898),new f(2147483648,32906),new f(2147483648,2147516416),new f(0,32907),new f(0,2147483649),new f(2147483648,2147516545),new f(2147483648,32777),new f(0,138),new f(0,136),new f(0,2147516425),new f(0,2147483658),new f(0,2147516555),new f(2147483648,139),new f(2147483648,32905),new f(2147483648,32771),new f(2147483648,32770),new f(2147483648,128),new f(0,32778),new f(2147483648,2147483658),new f(2147483648,2147516545),new f(2147483648,32896),new f(0,2147483649),new f(2147483648,2147516424);var p=(e,t=500)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},m=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},h=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},te=()=>{let e=0,t=null;return function(n,r=300){return function(...i){let a=Date.now();a-e>=r?(t!=null&&(clearTimeout(t),t=null),e=a,n.apply(this,i)):t??=window.setTimeout(()=>{e=Date.now(),n.apply(this,i),t=null},r-(a-e))}}},g=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})(g),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(g);var _=typeof document>`u`,v=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}},y=null,b=null;function ne(e,t){let n=t?.equals??Object.is,r=e,i=new Set;return[()=>(y&&b&&(i.add(y),b.add(i)),r),e=>{let t=typeof e==`function`?e(r):e;if(!n(r,t)){r=t;for(let e of[...i])e()}}]}function x(e){let t,n=!1,r=new Set,i=()=>{if(n)return;t?.();for(let e of r)e.delete(i);r.clear();let a=y,o=b;y=i,b=r;try{t=e()??void 0}finally{y=a,b=o}};return i(),()=>{n=!0,t?.();for(let e of r)e.delete(i);r.clear()}}function S(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function re(e){return S(e)}var ie=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ae=(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()},C=(e,t,n)=>{for(let r of e)ie(r)&&(ae(r,t)&&n.push(r),C(r.childrenList,t,n))},w=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}},oe=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 w)}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 se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(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}="${re(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${re(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`?S(e):(e instanceof w,e.serialize())).join(``):a+=S(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}>`}},se=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 C(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof w,e.serialize())).join(``)}</template>`}},T=class e{el;constructor(e){this.el=_?new oe(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return _?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?_?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(_){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 ce(this.el,t,e)}build(){return this.el}serialize(){if(_)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ce=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof T?this.root.appendChild(e.build()):typeof e==`string`?_?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(_)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 _?this.root.serialize():this.root.innerHTML}},E=e=>new T(e),D=()=>E(`div`),le=()=>E(`span`),O=()=>E(`slot`),k=()=>E(`input`),ue=()=>E(`style`),de=()=>E(`label`),A=[!1,`false`,null,void 0],j=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!A.includes(n))},fe=new Map;function M(e,t){_?(fe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:oe,P=new Map,F=new Map,pe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},me=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!F.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),F.set(t,e)}let n=F.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)}}},I=new WeakMap,L=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,R=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||I.get(e)||e.attachShadow(n);return I.set(e,r),pe(r,t?`${t}\n${L}`:L),r},z=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},B=(e,t,n=``)=>e.getAttribute(t)??n,V=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},H=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&me(t,a)},he=e=>{let{r:t,g:n,b:r}=ge(e);return U(t,n,r)},ge=e=>(e[0]===`#`&&(e=e.substr(1)),e.length===3?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16)}),U=(e,t,n)=>{let r,i=Math.max(e,t,n),a=i-Math.min(e,t,n);r=a===0?0:e===i?(t-n)/a%6:t===i?(n-e)/a+2:(e-t)/a+4,r=Math.round(r*60),r<0&&(r+=360);let o=Math.round((i===0?0:a/i)*100),s=Math.round(i/255*100);return{h:r,s:o,v:s}},W=(e,t,n)=>{t/=100,n/=100;let r=[],i=n*t,a=e/60,o=i*(1-Math.abs(a%2-1)),s=n-i;return r=a>=0&&a<1?[i,o,0]:a>=1&&a<2?[o,i,0]:a>=2&&a<3?[0,i,o]:e>=3&&a<4?[0,o,i]:e>=4&&a<5?[o,0,i]:e>=5&&a<=6?[i,0,o]:[0,0,0],{r:Math.round(255*(r[0]+s)),g:Math.round(255*(r[1]+s)),b:Math.round(255*(r[2]+s))}},G=e=>{let t=e.toString(16);return t.length===1?`0`+t:t},K=(e,t,n)=>`#`+[G(e),G(t),G(n)].join(``),_e=/^#([\da-f]{6}|[\da-f]{3})$/i,ve=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/,ye=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d{1,3}(\.\d+)?)\)$/,be=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`;M(`r-content`,class extends N{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=R(this,be);let e=z(this._shadowDom,`.slot`,()=>O().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var xe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-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"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,q=300;M(`r-dropdown`,class extends N{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=R(this,xe);let e=z(this._shadowDom,`.ranui-dropdown-container`,()=>D().class(`ranui-dropdown-container`).children(D().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(O().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return B(this,`transit`)}set transit(e){V(this,`transit`,e,{removeEmpty:!0})}get arrow(){return B(this,`arrow`)}set arrow(e){V(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(m(this.dropdown,this.transit),setTimeout(()=>{h(this.dropdown,this.transit)},q))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=D().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(m(this.dropdown,this.transit),setTimeout(()=>{h(this.dropdown,this.transit)},q)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var Se=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,J=8,Y=300,X=16,Ce={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`},left:{add:`ran-dropdown-left-in`,remove:`ran-dropdown-left-out`},right:{add:`ran-dropdown-right-in`,remove:`ran-dropdown-right-out`}};M(`r-popover`,class extends N{_events=new v;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;dropDownInTimeId;dropDownOutTimeId;removeTimeId;static get observedAttributes(){return[`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=R(this,Se);let e=z(this._shadowDom,`.ran-popover-block`,()=>D().class(`ran-popover-block`).role(`tooltip`).children(O().class(`slot`)).build());this.popoverBlock=e,this._slot=e.querySelector(`.slot`)}get placement(){return B(this,`placement`,`top`)}set placement(e){V(this,`placement`,e)}get trigger(){return B(this,`trigger`,`hover`)}set trigger(e){V(this,`trigger`,e)}get getPopupContainerId(){return B(this,`getPopupContainerId`)}set getPopupContainerId(e){V(this,`getPopupContainerId`,e)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){this.popoverContent=E(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let e=D().children(this.popoverContent).build();this.trigger.includes(`hover`)&&!o()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId)),document.body.appendChild(e)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=p(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},Y)},X);removeDropDownTimeId=p(()=>{this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},X);setDropdownDisplayBlock=p(()=>{this.dropDownInTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`block`&&(this.updateAriaExpanded(!0),this.popoverContent.setAttribute(`transit`,Ce[this.placement].add),this.popoverContent?.style.setProperty(`display`,`block`),this.placementPosition(),this.dropDownInTimeId=setTimeout(()=>{this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0},Y)))},X);setDropdownDisplayNone=p(()=>{this.dropDownOutTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`none`&&(this.updateAriaExpanded(!1),this.popoverContent.setAttribute(`transit`,Ce[this.placement].remove),this.dropDownOutTimeId=setTimeout(()=>{this.popoverContent?.style.setProperty(`display`,`none`),this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0},Y)))},X);placementPosition=()=>{if(!this.popoverContent)return;let{top:e,left:t,bottom:n,width:r,height:i}=this.getBoundingClientRect(),a=n+window.scrollY+J,o=t+window.scrollX,s=document.getElementById(this.getPopupContainerId),c=this.popoverContent.getBoundingClientRect();this.placement===`top`&&(a=e+window.scrollY-Math.max(c.height,i)-J,this.getPopupContainerId&&s&&(o=t-s.getBoundingClientRect().left,a=e-s.getBoundingClientRect().top-this.popoverContent.clientHeight-J,o=t-s.getBoundingClientRect().left)),this.placement===`left`&&(o=t-Math.max(c.width,r)-J,a=e+window.scrollY),this.placement===`right`&&(o=t+r+J,a=e+window.scrollY),this.popoverContent.style.setProperty(`inset`,`${a}px auto auto ${o}px`),this.popoverContent.style.setProperty(`--ran-x`,`${o}px`),this.popoverContent.style.setProperty(`--ran-y`,`${a}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${r}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${i}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-width`,`${c.width}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-height`,`${c.height}px`)};hoverPopover=e=>{this.clickPopover(e)};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};keydownPopover=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover).on(document,`click`,this.clickRemovePopover)};hoverRemovePopover=e=>{e.stopPropagation(),this.setDropdownDisplayNone()};changePlacement=p(()=>{this.placement===`top`&&this.popoverContent?.setAttribute(`arrow`,`bottom`),this.placement===`bottom`&&this.popoverContent?.setAttribute(`arrow`,`top`),this.placement===`left`&&this.popoverContent?.setAttribute(`arrow`,`right`),this.placement===`right`&&this.popoverContent?.setAttribute(`arrow`,`left`)},X);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss())}});var we=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}: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))}}`,Te=!1,Ee=new Map,De=!1,Z=e=>/<svg[\s>]/i.test(e),Oe=e=>{if(typeof e==`string`)return Z(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Z(n))return n;let r=t.default;if(typeof r==`string`&&Z(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Z(e.data))return e.data}},ke=(e,t)=>{De=!0;let n=Oe(t);n&&(Ee.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};M(`r-icon`,class extends N{isDev=Te;_events=new v;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=R(this,we);let e=z(this._shadowDom,`.ran-icon`,()=>D().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return B(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return B(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return B(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(){let 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 B(this,`aria-label`)}set ariaLabel(e){V(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(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(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=Ee.get(t);if(!n){this.isDev&&De&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,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=>Z(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=E(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,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){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let 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,n){t!==n&&(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())}});var Ae=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%);transition:var(--ran-input-label-transition,all .3s)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,border-color var(--ran-motion-duration-base,.2s), box-shadow var(--ran-motion-duration-base,.2s), color var(--ran-motion-duration-base,.2s));min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,border-color var(--ran-motion-duration-base,.2s), box-shadow var(--ran-motion-duration-base,.2s), color var(--ran-motion-duration-base,.2s));outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, color .3s, background-color .3s, backdrop-filter .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9);transition:var(--ran-input-label-transition,all .3s)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,je=0;M(`r-input`,class extends N{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new v;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=R(this,Ae);let e=z(this._shadowDom,`.ran-input`,()=>D().class(`ran-input`).part(`input`).children(k().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++je}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!j(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return j(this)}set disabled(e){A.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=de().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=D().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(A.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=E(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),j(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}});var Me=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-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"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,border-color .2s cubic-bezier(.645, .045, .355, 1), box-shadow .2s cubic-bezier(.645, .045, .355, 1), color .2s cubic-bezier(.645, .045, .355, 1));width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,Ne={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
|
|
2
|
+
fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path
|
|
4
|
+
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
|
|
5
|
+
</svg>`};M(`r-option`,class extends N{_option;_optionContent;_shadowDom;_slot;static get observedAttributes(){return[`disabled`,`sheet`,`value`]}constructor(){super(),this._shadowDom=R(this);let e=z(this._shadowDom,`.ran-select-dropdown-option`,()=>{let e=O().build(),t=D().class(`ran-select-dropdown-option-content`).children(e).build();return D().class(`ran-select-dropdown-option`).children(t).build()}),t=e.querySelector(`.ran-select-dropdown-option-content`),n=e.querySelector(`slot`);this._slot=n,this._optionContent=t,this._option=e}get value(){return this.getAttribute(`value`)}set value(e){V(this,`value`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){V(this,`sheet`,e)}get disabled(){return j(this)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss(){H(this,this._shadowDom,`sheet`,null,this.sheet)}connectedCallback(){this.classList.contains(`ran-option`)||this.classList.add(`ran-option`)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._option&&(!n||n===`false`?this._option.setAttribute(`disabled`,``):this._option.removeAttribute(`disabled`)),e===`sheet`&&this._shadowDom&&this.handlerExternalCss())}});var Pe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ranui-dropdown-option-item{position:var(--ran-dropdown-option-item-position,relative);display:var(--ran-dropdown-option-item-display,block);padding:var(--ran-dropdown-option-item-padding,5px 12px);color:var(--ran-dropdown-option-item-color,var(--ran-color-text,#000000e0));font-weight:var(--ran-dropdown-option-item-font-weight,normal);font-size:var(--ran-dropdown-option-item-font-size,14px);transition:var(--ran-dropdown-option-item-transition,background var(--ran-motion-duration-base,.2s) ease);border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-dropdown-option-item-cursor,pointer)}.ranui-dropdown-option-item:hover{background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-gray-alpha-100,#0000000a))}.ranui-dropdown-option-item-content{text-align:var(--ran-dropdown-option-item-content-text-align,left);overflow:var(--ran-dropdown-option-item-content-overflow,hidden);white-space:var(--ran-dropdown-option-item-content-white-space,nowrap);text-overflow:var(--ran-dropdown-option-item-content-text-overflow,ellipsis);color:var(--ran-dropdown-option-item-content-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-option-item-content-font-size,14px);line-height:var(--ran-dropdown-option-item-content-line-height,1.57143);box-sizing:var(--ran-dropdown-option-item-content-box-sizing,border-box);list-style:var(--ran-dropdown-option-item-content-list-style,none);font-family:var(--ran-dropdown-option-item-content-font-family,-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");font-variant:var(--ran-dropdown-option-item-content-font-variant,initial)}.ranui-dropdown-option-active{background-color:var(--ran-dropdown-option-active-background-color,var(--ran-blue-100,#e6f7ff));font-weight:var(--ran-dropdown-option-active-font-weight,bold)}.ranui-dropdown-option-active:hover{background-color:var(--ran-dropdown-option-active-hover-background-color,var(--ran-blue-100,#e6f7ff))}`;M(`r-dropdown-item`,class extends N{ionDropdownItem;_slot;_shadowDom;ionDropdownItemContent;static get observedAttributes(){return[`active`,`value`,`title`,`sheet`]}constructor(){super(),this._shadowDom=R(this,Pe);let e=z(this._shadowDom,`.ranui-dropdown-option-item`,()=>{let e=O().class(`slot`).build(),t=D().class(`ranui-dropdown-option-item-content`).part(`content`).children(e).build();return D().class(`ranui-dropdown-option-item`).part(`item`).children(t).build()}),t=e.querySelector(`.ranui-dropdown-option-item-content`),n=e.querySelector(`slot`);this._slot=n,this.ionDropdownItemContent=t,this.ionDropdownItem=e}get value(){return B(this,`value`)}set value(e){!j(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}get active(){return B(this,`active`)}set active(e){e?this.setAttribute(`active`,e):this.removeAttribute(`active`)}get title(){return B(this,`title`)}set title(e){e?this.setAttribute(`title`,e):this.removeAttribute(`title`)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this.active&&m(this.ionDropdownItem,`ranui-dropdown-option-active`)}attributeChangedCallback(e,t,n){if(e===`sheet`){this.handlerExternalCss();return}e===`active`&&n?m(this.ionDropdownItem,`ranui-dropdown-option-active`):h(this.ionDropdownItem,`ranui-dropdown-option-active`)}});var Fe={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`}};ke(`arrow-down`,Ne);var Ie=te(),Le=300;M(`r-select`,class extends N{static formAssociated=!0;_internals;_events=new v;_searchEvents=new v;removeTimeId;_listboxId;_activeIndex;_slot;_shadowDom;_select;_selection;_search;_icon;_selectDropdown;_selectionDropdown;_selectDropDownInTimeId;_selectDropDownOutTimeId;_optionList;_optionLabelMapValue;_optionValueMapLabel;_activeOption;_text;_selector;onSearch;static get observedAttributes(){return[`disabled`,`sheet`,`type`,`value`,`defaultvalue`,`showsearch`,`placement`,`getPopupContainerId`,`dropdownclass`,`trigger`]}constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._listboxId=`ran-select-listbox-${Math.random().toString(36).slice(2,9)}`,this._activeIndex=-1,this._optionList=[],this._optionLabelMapValue=new Map,this._optionValueMapLabel=new Map,this._shadowDom=R(this,Me);let e=z(this._shadowDom,`.ran-select`,()=>D().class(`ran-select`).part(`select`).children(D().class(`selection`).part(`selection`).children(E(`r-icon`).class(`icon`).part(`icon`).attr(`name`,`arrow-down`).attr(`color`,`var(--ran-color-text-secondary)`).attr(`size`,`16`),D().children(le().class(`selection-item`).part(`selection-item`),k().class(`selection-search`).part(`search`).attr(`type`,`search`).attr(`autocomplete`,`off`))),O().class(`slot`)).build());this._select=e,this._selection=e.querySelector(`.selection`),this._selector=this._selection.querySelector(`div`),this._icon=e.querySelector(`.icon`),this._text=e.querySelector(`.selection-item`),this._search=e.querySelector(`.selection-search`),this._slot=e.querySelector(`slot`)}get value(){return this.getAttribute(`value`)||``}set value(e){!j(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this.syncFormValue()}syncFormValue=()=>{this._internals?.setFormValue?.(this.value)};get defaultValue(){return this.getAttribute(`defaultValue`)||``}set defaultValue(e){this.setAttribute(`defaultValue`,e||``)}get showSearch(){return this.getAttribute(`showSearch`)||``}set showSearch(e){this.setAttribute(`showSearch`,e||``)}get type(){return this.getAttribute(`type`)||``}set type(e){this.setAttribute(`type`,e||``)}get placement(){return this.getAttribute(`placement`)||`bottom`}set placement(e){this.setAttribute(`placement`,e||``)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}get getPopupContainerId(){return this.getAttribute(`getPopupContainerId`)||``}set getPopupContainerId(e){this.setAttribute(`getPopupContainerId`,e||``)}get dropdownclass(){return this.getAttribute(`dropdownclass`)||``}set dropdownclass(e){this.setAttribute(`dropdownclass`,e||``)}get trigger(){return this.getAttribute(`trigger`)||`click`}set trigger(e){this.setAttribute(`trigger`,e||``)}get disabled(){return j(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.tabIndex=0):(this.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)}initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`role`,`combobox`),this.setAttribute(`aria-haspopup`,`listbox`),this.setAttribute(`aria-controls`,this._listboxId),this.setAttribute(`aria-expanded`,`false`),this.setAttribute(`aria-disabled`,this.disabled?`true`:`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};getDropdownOptions=()=>this._selectionDropdown?Array.from(this._selectionDropdown.querySelectorAll(`r-dropdown-item`)):[];syncActiveState=()=>{this.getDropdownOptions().forEach((e,t)=>{e.setAttribute(`role`,`option`),e.setAttribute(`aria-selected`,e===this._activeOption?`true`:`false`),e.id||=`${this._listboxId}-option-${t}`}),this._activeOption?.id?this.setAttribute(`aria-activedescendant`,this._activeOption.id):this.removeAttribute(`aria-activedescendant`)};setActiveOptionByIndex=e=>{let t=this.getDropdownOptions();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1)),r=t[n];if(!r)return;this._activeOption&&this._activeOption!==r&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeIndex=n,this._activeOption=r;let i=r.getAttribute(`value`)||``;r.setAttribute(`active`,i),r.setAttribute(`aria-selected`,`true`),r.scrollIntoView({block:`nearest`}),this.syncActiveState()};selectOptionElement=(e,t=!0)=>{if(!e)return;let n=e.getAttribute(`title`)||e.textContent?.trim()||``,r=e.getAttribute(`value`)||this._optionLabelMapValue.get(n)||``;if(!r)return;this.setAttribute(`value`,r),this.syncFormValue(),this._text.textContent=n,this._text.setAttribute(`title`,n),this._search.setAttribute(`placeholder`,n);let{height:i}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${i}px`),this._activeOption&&this._activeOption!==e&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeOption=e,this._activeIndex=this.getDropdownOptions().findIndex(t=>t===e),e.setAttribute(`active`,r),e.setAttribute(`aria-selected`,`true`),this.syncActiveState(),this.setSelectDropdownDisplayNone(),t&&this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r,label:n}}))};isDropdownOpen=()=>this._selectionDropdown?this._selectionDropdown.style.display===`block`:!1;_nextEnabledIndex=(e,t)=>{let n=this.getDropdownOptions(),r=n.length;if(r===0)return-1;let i=Math.max(0,Math.min(e,r-1));for(let e=0;e<r;e++){if(!j(n[i]))return i;let e=i+t;if(e<0||e>r-1)return-1;i=e}return-1};keydownSelect=e=>{if(!this.disabled){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e),this.getDropdownOptions().length===0)return;let t=e.key===`ArrowDown`?1:-1,n=this._activeIndex>=0?this._activeIndex:0,r=this._nextEnabledIndex(n+t,t);r>=0&&this.setActiveOptionByIndex(r);return}if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),!this.isDropdownOpen()){this.selectMouseDown(e);return}this._activeOption&&this.selectOptionElement(this._activeOption);return}e.key===`Escape`&&(e.preventDefault(),this.setSelectDropdownDisplayNone())}};handlerExternalCss(){H(this,this._shadowDom,`sheet`,null,this.sheet)}setSelectDropdownDisplayNone=()=>{this._selectDropDownOutTimeId||(this.updateAriaExpanded(!1),this._selectionDropdown&&this._selectionDropdown.style.display!==`none`&&(this._detachReposition(),this._selectionDropdown.setAttribute(`transit`,Fe[this.placement].remove),this._selectDropDownOutTimeId=setTimeout(()=>{this._selectionDropdown?.style.setProperty(`display`,`none`),this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownOutTimeId),this._selectDropDownOutTimeId=void 0},Le)))};setSelectDropdownDisplayBlock=()=>{this._selectDropDownInTimeId||(this.updateAriaExpanded(!0),this._selectionDropdown&&this._selectionDropdown.style.display!==`block`&&(this._selectionDropdown.setAttribute(`transit`,Fe[this.placement].add),this._selectionDropdown?.style.setProperty(`display`,`block`),this._attachReposition(),this._selectDropDownInTimeId=setTimeout(()=>{this._selectionDropdown&&this._selectionDropdown.removeAttribute(`transit`),clearTimeout(this._selectDropDownInTimeId),this._selectDropDownInTimeId=void 0},Le)))};placementPosition=()=>{!this._selectionDropdown||!this._selectDropdown||requestAnimationFrame(()=>{if(!this._selectionDropdown||!this._selectDropdown)return;let{top:e,left:t,bottom:n,width:r}=this.getBoundingClientRect(),i=this.getRootNode(),a=(i.getElementById?i.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId);this._selectionDropdown.style.setProperty(`position`,`absolute`),this._selectionDropdown.style.setProperty(`--ran-x`,`${e+window.scrollX}`),this._selectionDropdown.style.setProperty(`--ran-y`,`${t+window.scrollY}`);let o=n+window.scrollY+4,s=t+window.scrollX;if(this._selectionDropdown.style.setProperty(`width`,`${r}px`),this.placement===`top`&&(o=e+window.scrollY-this._selectionDropdown.clientHeight-4),this.getPopupContainerId&&a){let r=a.getBoundingClientRect();s=t-r.left,o=this.placement===`top`?e-r.top-this._selectionDropdown.clientHeight-4:n-r.top+4}this._selectionDropdown.style.setProperty(`inset`,`${o}px auto auto ${s}px`)})};_repositionBound=!1;_repositionDropdown=()=>{this._selectionDropdown?.style.display===`block`&&this.placementPosition()};_attachReposition=()=>{this._repositionBound||typeof window>`u`||(window.addEventListener(`scroll`,this._repositionDropdown,!0),window.addEventListener(`resize`,this._repositionDropdown),this._repositionBound=!0)};_detachReposition=()=>{!this._repositionBound||typeof window>`u`||(window.removeEventListener(`scroll`,this._repositionDropdown,!0),window.removeEventListener(`resize`,this._repositionDropdown),this._repositionBound=!1)};selectMouseDown=e=>{e.stopPropagation(),!j(this)&&(this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone(),this.setSelectDropdownDisplayBlock(),this.placementPosition())};removeDropDownTimeId=e=>{e.stopPropagation(),this._search.setAttribute(`value`,``),this.trigger.includes(`hover`)&&!o()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)};selectBlur=e=>{e.stopPropagation(),this.removeTimeId&&this.removeDropDownTimeId(e),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone()},300)};clickOption=e=>{e.stopPropagation();let t=e.target.closest(`r-dropdown-item`);if(t&&j(t)){this.removeDropDownTimeId(e);return}this.selectOptionElement(t),this.removeDropDownTimeId(e)};createOption=()=>{if(!this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;this._selectDropdown=D().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).on(`click`,this.clickOption).build(),this._selectionDropdown=E(`r-dropdown`).id(this._listboxId).attr(`role`,`listbox`).style(`position`,`absolute`).style(`display`,`none`).build(),this.dropdownclass&&this._selectionDropdown.setAttribute(`class`,this.dropdownclass),this.trigger.includes(`hover`)&&!o()&&(this._selectDropdown.addEventListener(`mouseleave`,this.selectBlur),this._selectDropdown.addEventListener(`mouseenter`,this.removeDropDownTimeId)),this._selectDropdown.appendChild(this._selectionDropdown),t.appendChild(this._selectDropdown)}};removeSelectDropdown=()=>{try{if(this._selectDropdown){let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;t&&this._selectDropdown.parentNode===t&&t.removeChild(this._selectDropdown)}}catch(e){console.error(`removeSelectDropdown error`,e)}};addOptionToSlot=()=>{this._optionList=[],this._optionLabelMapValue.clear(),this._optionValueMapLabel.clear(),this._slot.assignedElements().forEach(e=>{if(e.tagName!==`R-OPTION`)return;let t=e.innerHTML,n=e.getAttribute(`value`)||``,r=j(e);this._optionList?.push({label:t,value:n,disabled:r}),this._optionLabelMapValue.get(t)&&console.warn(`${t} is repeat option`),this._optionValueMapLabel.get(n)&&console.warn(`${n} is repeat option`),this._optionLabelMapValue.set(t,n),this._optionValueMapLabel.set(n,t)}),this.createSelectDropdownContent(this._optionList)};createSelectDropdownContent=(e=[])=>{e.length===0?this._selectDropdown?.style.setProperty(`display`,`none`):this._selectDropdown?.style.setProperty(`display`,`block`),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``,this._activeOption=void 0,this._activeIndex=-1),e.forEach(e=>{if(this._selectionDropdown){let{label:t,value:n,disabled:r}=e,i=E(`r-dropdown-item`).attr(`role`,`option`).attr(`value`,`${n}`).attr(`title`,`${t}`).text(`${t}`).build();r&&(i.setAttribute(`disabled`,``),i.setAttribute(`aria-disabled`,`true`)),(this.getAttribute(`defaultValue`)||this.getAttribute(`value`))===n?(i.setAttribute(`active`,n),this._activeOption=i):i.removeAttribute(`active`),this._selectionDropdown.appendChild(i)}}),this._activeIndex=this.getDropdownOptions().findIndex(e=>e===this._activeOption),this.syncActiveState(),this.setDefaultValue()};setDefaultValue=()=>{let e=this.getAttribute(`defaultValue`)||this.getAttribute(`value`);if(!e)return;let t=this._optionValueMapLabel.get(e);if(!t)return;this.setAttribute(`value`,e);let{height:n}=this.getBoundingClientRect();this._text.style.setProperty(`line-height`,`${n}px`),this._text.textContent=t,this._text.setAttribute(`title`,t);let r=this.getDropdownOptions().find(t=>t.getAttribute(`value`)===e)||null;r&&this.selectOptionElement(r,!1)};changeSearch=e=>{let t=e.detail.value||``;if(this.dispatchEvent(new CustomEvent(`search`,{detail:{value:t}})),this._selectionDropdown&&(this._selectionDropdown.innerHTML=``),t.length>0){let e=this._optionList.map(e=>{let{label:n}=e;if(`${n}`.toLowerCase().includes(t))return{label:n,value:e.value,disabled:e.disabled}}).filter(e=>e);this.createSelectDropdownContent(e)}else this.createSelectDropdownContent(this._optionList)};clickRemoveSelect=e=>{e.stopPropagation(),this.setSelectDropdownDisplayNone()};connectedCallback(){this.handlerExternalCss(),this.createOption(),this.initAria(),this.syncFormValue(),this._events.on(this._slot,`slotchange`,this.addOptionToSlot).on(this,`keydown`,this.keydownSelect).on(document,`click`,this.clickRemoveSelect),this.trigger.includes(`hover`)&&!o()&&this._events.on(this,`mouseenter`,this.selectMouseDown).on(this,`mouseleave`,this.selectBlur),this.trigger.includes(`click`)&&this._events.on(this,`click`,this.selectMouseDown).on(this,`blur`,this.selectBlur),this._applyShowSearch()}_applyShowSearch=()=>{this._searchEvents.abort(),this.showSearch&&(this.onSearch=Ie(this.changeSearch),this.onSearch&&this._searchEvents.on(this._search,`change`,this.onSearch).on(this._search,`click`,this.onSearch))};disconnectedCallback(){this._events.abort(),this._searchEvents.abort(),this._detachReposition(),this.removeSelectDropdown()}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._select&&(!n||n===`false`?(this._select.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this.hasAttribute(`tabindex`)||(this.tabIndex=0)):(this._select.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)),e===`value`&&this.syncSelectedFromValue(n),e===`sheet`&&this._shadowDom&&this.handlerExternalCss(),e===`defaultvalue`&&this.setDefaultValue(),e===`showsearch`&&this._search&&this._applyShowSearch())}syncSelectedFromValue=e=>{if(!e||this._activeOption?.getAttribute(`value`)===e)return;let t=Array.from(this.querySelectorAll(`r-option`)).find(t=>t.getAttribute(`value`)===e);t&&this.selectOptionElement(t,!1)}});var Re=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-colorpicker{box-sizing:border-box;border-radius:var(--ran-colorpicker-border-radius,var(--ran-radius-md,8px));border:var(--ran-colorpicker-border,1px solid var(--ran-color-border,#eaeaea));cursor:pointer;min-width:32px;height:32px;transition:var(--ran-colorpicker-transition,border-color .2s, box-shadow .2s);background:var(--ran-colorpicker-background,var(--ran-color-bg-elevated,#fff));justify-content:center;align-items:center;padding:3px;display:inline-flex}.ran-colorpicker:hover{border-color:var(--ran-colorpicker-border-hover,var(--ran-color-border-hover,var(--ran-gray-500)))}.ran-colorpicker-block{border-radius:var(--ran-colorpicker-block-border-radius,var(--ran-radius-sm,4px));width:24px;height:24px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:50% 50%;position:relative}.ran-colorpicker-inner{border-radius:inherit;width:100%;height:100%}.ran-colorpicker-block[disabled]{cursor:var(--ran-colorpicker-disabled-cursor,not-allowed);opacity:var(--ran-colorpicker-disabled-opacity,.5)}`,ze=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-color-picker-inner{box-sizing:border-box}.ran-color-picker-inner-content{box-sizing:border-box;width:224px;font-family:var(--ran-font-family,inherit);flex-direction:column;gap:12px;padding:12px;display:flex}.ran-color-picker-inner-content *,.ran-color-picker-inner-content :before,.ran-color-picker-inner-content :after{box-sizing:border-box}.ran-color-picker-palette{border-radius:var(--ran-radius-sm,6px);cursor:crosshair;width:100%;height:160px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;position:relative;overflow:hidden}.ran-color-picker-saturation{border-radius:inherit;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);position:absolute;inset:0}.ran-color-picker-palette-dot{z-index:2;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:0;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-controls{align-items:center;gap:12px;display:flex}.ran-color-picker-preview{width:28px;height:28px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:12px 12px;border-radius:50%;flex:none;position:relative;overflow:hidden}.ran-color-picker-preview-inner{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-sliders{flex-direction:column;flex:1;gap:12px;min-width:0;display:flex}.ran-color-picker-slider{cursor:pointer;height:10px;box-shadow:inset 0 0 0 1px var(--ran-gray-alpha-200,#00000017);touch-action:none;border-radius:999px;position:relative}.ran-color-picker-slider-hue{background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.ran-color-picker-slider-alpha{background-image:conic-gradient(var(--ran-gray-alpha-100,#0000000f) 0 25%, transparent 0 50%, var(--ran-gray-alpha-100,#0000000f) 0 75%, transparent 0);background-size:8px 8px}.ran-color-picker-slider-alpha-track{border-radius:inherit;position:absolute;inset:0}.ran-color-picker-slider-thumb{z-index:1;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;position:absolute;top:50%;left:0;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0003,0 1px 3px #00000059}.ran-color-picker-input-container{align-items:center;gap:8px;display:flex}.ran-color-picker-format{flex:none;width:68px}.ran-color-picker-value{flex:1;min-width:0}`,Q=360,$=class extends N{colorpicker;colorpickerInner;context;_shadowDom;_events=new v;_effectDisposers=[];popoverBlock;popoverContent;colorPickerInner;colorPickerPalette;colorPickerSaturation;colorPickerPaletteDot;colorPickerHueSlider;colorPickerHueThumb;colorPickerAlphaSlider;colorPickerAlphaTrack;colorPickerAlphaThumb;colorPickerPreviewInner;colorPickerValueInput;colorPickerFormatSelect;colorPickerPaletteSelect;_activeSlider=null;_format=`HEX`;_editingInput=!1;static get observedAttributes(){return[`disabled`,`value`,`sheet`]}constructor(){super(),this._shadowDom=R(this,Re);let e=z(this._shadowDom,`r-popover`,()=>{let e=D().class(`ran-colorpicker-inner`).part(`swatch`).build(),t=D().class(`ran-colorpicker-block`).part(`block`).children(e).build(),n=E(`r-content`).class(`ran-content`).build();return E(`r-popover`).class(`ran-popover`).attr(`trigger`,`click`).children(t,n).build()});this.popoverBlock=e,this.popoverContent=e.querySelector(`r-content`),this.colorpicker=e.querySelector(`.ran-colorpicker-block`),this.colorpickerInner=e.querySelector(`.ran-colorpicker-inner`),this.colorpicker.setAttribute(`role`,`button`),this.colorpicker.setAttribute(`tabindex`,`0`),this.colorpicker.setAttribute(`aria-haspopup`,`dialog`),this.colorpicker.setAttribute(`aria-label`,`Choose color`),this.colorPickerPaletteSelect=!1,this.createContext()}get value(){return this.context?.value.getter()||``}set value(e){this.setAttribute(`value`,e)}get sheet(){return B(this,`sheet`)}set sheet(e){V(this,`sheet`,e)}get disabled(){return j(this)}set disabled(e){e===!1||e==null?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss=()=>{H(this,this._shadowDom,`sheet`,null,this.sheet)};syncDisabledState=()=>{let e=j(this);this.context?.disabled.setter(e),e?(this.setAttribute(`aria-disabled`,`true`),this.colorpicker?.setAttribute(`disabled`,``)):(this.removeAttribute(`aria-disabled`),this.colorpicker?.removeAttribute(`disabled`)),this.colorpicker?.setAttribute(`aria-disabled`,e?`true`:`false`),this.colorpicker?.setAttribute(`tabindex`,e?`-1`:`0`)};blockWhenDisabled=e=>{j(this)&&(e.stopImmediatePropagation(),e.preventDefault())};createContext=()=>{let e=e=>{let[t,n]=ne(e);return{getter:t,setter:n}};this.context={value:e(``),disabled:e(!1),hue:e(0),saturation:e(0),lightness:e(100),transparency:e(100)}};currentRgba=()=>{let{hue:e,saturation:t,lightness:n,transparency:r}=this.context,{r:i,g:a,b:o}=W(e.getter(),t.getter(),n.getter());return{r:i,g:a,b:o,a:r.getter()/100}};currentValue=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:K(e,t,n)};currentDisplay=()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba();return this._format===`RGB`?r<1?`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(2))})`:`rgb(${e}, ${t}, ${n})`:K(e,t,n)};updateColorValue=e=>{if(e===this.context?.value.getter())return;let t=e.replace(/\s+/g,``),n=_e.exec(e),r=ye.exec(t),i=ve.exec(t);if(n){let{h:e,s:t,v:r}=he(n[0]);this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(r),this.context.transparency.setter(100)}else if(r){let{h:e,s:t,v:n}=U(Number(r[1]),Number(r[2]),Number(r[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(Number(r[4])*100)}else if(i){let{h:e,s:t,v:n}=U(Number(i[1]),Number(i[2]),Number(i[3]));this.context.hue.setter(e),this.context.saturation.setter(t),this.context.lightness.setter(n),this.context.transparency.setter(100)}else return;this.setAttribute(`value`,e),this.context?.value.setter(e)};emitChange=()=>{let e=this.currentValue(),{r:t,g:n,b:r,a:i}=this.currentRgba();this.context?.value.setter(e),this.setAttribute(`value`,e),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:e,hex:K(t,n,r),rgb:`rgb(${t}, ${n}, ${r})`,rgba:`rgba(${t}, ${n}, ${r}, ${Number(i.toFixed(2))})`,alpha:Number(i.toFixed(2))},bubbles:!0,composed:!0}))};palettePointerDown=e=>{e.preventDefault(),this.colorPickerPaletteSelect=!0,this.updatePaletteFromEvent(e)};updatePaletteFromEvent=e=>{if(!this.colorPickerPalette)return;let{left:t,top:n,width:i,height:a}=this.colorPickerPalette.getBoundingClientRect();if(!i||!a)return;let o=r(e.clientX-t,0,i),s=r(e.clientY-n,0,a);this.context.saturation.setter(o/i*100),this.context.lightness.setter((1-s/a)*100),this.emitChange()};sliderPointerDown=e=>t=>{t.preventDefault(),this._activeSlider=e,this.updateSliderFromEvent(e,t)};updateSliderFromEvent=(e,t)=>{let n=e===`hue`?this.colorPickerHueSlider:this.colorPickerAlphaSlider;if(!n)return;let{left:i,width:a}=n.getBoundingClientRect();if(!a)return;let o=r(t.clientX-i,0,a)/a;e===`hue`?this.context.hue.setter(o*Q):this.context.transparency.setter(o*100),this.emitChange()};onPointerMove=e=>{let t=e;this.colorPickerPaletteSelect?this.updatePaletteFromEvent(t):this._activeSlider&&this.updateSliderFromEvent(this._activeSlider,t)};initSliderA11y=(e,t,n)=>{e.setAttribute(`role`,`slider`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,t),e.setAttribute(`aria-orientation`,`horizontal`),e.setAttribute(`aria-valuemin`,`0`),e.setAttribute(`aria-valuemax`,String(n))};sliderKeydown=e=>t=>{let n=e===`hue`?Q:100,i=e===`hue`?this.context.hue:this.context.transparency,a=t.shiftKey?10:1,o=i.getter(),s=o;switch(t.key){case`ArrowRight`:case`ArrowUp`:s=o+a;break;case`ArrowLeft`:case`ArrowDown`:s=o-a;break;case`Home`:s=0;break;case`End`:s=n;break;default:return}t.preventDefault(),i.setter(r(s,0,n)),this.emitChange()};onPointerUp=()=>{this.colorPickerPaletteSelect=!1,this._activeSlider=null};onSwatchKeydown=e=>{j(this)||(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),this.colorpicker?.click())};onValueInput=e=>{let t=e.target,n=e.detail?.value??t?.value;typeof n==`string`&&(this._editingInput=!0,this.updateColorValue(n.trim()),this._editingInput=!1,this.emitChange())};onFormatChange=e=>{let t=e.detail?.value;this._format=t===`RGB`?`RGB`:`HEX`,this.syncValueInput()};syncValueInput=()=>{this._editingInput||!this.colorPickerValueInput||(this.colorPickerValueInput.value=this.currentDisplay())};setupEffects=()=>{this._effectDisposers.push(x(()=>{let{r:e,g:t,b:n}=W(this.context.hue.getter(),100,100);this.colorPickerSaturation?.style.setProperty(`background-color`,`rgb(${e}, ${t}, ${n})`)}),x(()=>{let e=r(this.context.saturation.getter(),0,100),t=r(this.context.lightness.getter(),0,100);this.colorPickerPaletteDot?.style.setProperty(`left`,`${e}%`),this.colorPickerPaletteDot?.style.setProperty(`top`,`${100-t}%`)}),x(()=>{let e=this.context.hue.getter(),{r:t,g:n,b:r}=W(e,100,100);this.colorPickerHueThumb?.style.setProperty(`left`,`${e/Q*100}%`),this.colorPickerHueThumb?.style.setProperty(`background`,`rgb(${t}, ${n}, ${r})`),this.colorPickerHueSlider?.setAttribute(`aria-valuenow`,String(Math.round(e)))}),x(()=>{let{r:e,g:t,b:n,a:r}=this.currentRgba(),i=`rgb(${e}, ${t}, ${n})`,a=`rgba(${e}, ${t}, ${n}, ${Number(r.toFixed(3))})`;this.colorPickerAlphaTrack?.style.setProperty(`background`,`linear-gradient(to right, rgba(${e}, ${t}, ${n}, 0), ${i})`),this.colorPickerAlphaThumb?.style.setProperty(`left`,`${r*100}%`),this.colorPickerAlphaThumb?.style.setProperty(`background`,a),this.colorPickerPreviewInner?.style.setProperty(`background`,a),this.colorpickerInner?.style.setProperty(`background`,a),this.colorPickerAlphaSlider?.setAttribute(`aria-valuenow`,String(Math.round(r*100))),this.colorPickerAlphaSlider?.setAttribute(`aria-valuetext`,`${Math.round(r*100)}%`),this.syncValueInput()}))};disposeEffects=()=>{for(let e of this._effectDisposers)e();this._effectDisposers=[]};openColorPicker=()=>{if(j(this)||this.colorPickerInner)return;this.colorPickerSaturation=D().class(`ran-color-picker-saturation`).build(),this.colorPickerPaletteDot=D().class(`ran-color-picker-palette-dot`).build(),this.colorPickerPalette=D().class(`ran-color-picker-palette`).on(`mousedown`,this.palettePointerDown).children(this.colorPickerSaturation,this.colorPickerPaletteDot).build(),this.colorPickerPreviewInner=D().class(`ran-color-picker-preview-inner`).build();let e=D().class(`ran-color-picker-preview`).children(this.colorPickerPreviewInner).build();this.colorPickerHueThumb=D().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerHueSlider=D().class(`ran-color-picker-slider ran-color-picker-slider-hue`).on(`mousedown`,this.sliderPointerDown(`hue`)).on(`keydown`,this.sliderKeydown(`hue`)).children(this.colorPickerHueThumb).build(),this.initSliderA11y(this.colorPickerHueSlider,`Hue`,Q),this.colorPickerAlphaTrack=D().class(`ran-color-picker-slider-alpha-track`).build(),this.colorPickerAlphaThumb=D().class(`ran-color-picker-slider-thumb`).build(),this.colorPickerAlphaSlider=D().class(`ran-color-picker-slider ran-color-picker-slider-alpha`).on(`mousedown`,this.sliderPointerDown(`alpha`)).on(`keydown`,this.sliderKeydown(`alpha`)).children(this.colorPickerAlphaTrack,this.colorPickerAlphaThumb).build(),this.initSliderA11y(this.colorPickerAlphaSlider,`Alpha opacity`,100);let t=D().class(`ran-color-picker-sliders`).children(this.colorPickerHueSlider,this.colorPickerAlphaSlider).build(),n=D().class(`ran-color-picker-controls`).children(e,t).build();this.colorPickerFormatSelect=E(`r-select`).class(`ran-color-picker-format`).attr(`value`,this._format).attr(`defaultValue`,this._format).attr(`trigger`,`click`).children(...[`HEX`,`RGB`].map(e=>E(`r-option`).attr(`value`,e).text(e).build())).on(`change`,this.onFormatChange).build(),this.colorPickerValueInput=E(`r-input`).class(`ran-color-picker-value`).on(`change`,this.onValueInput).build();let r=D().class(`ran-color-picker-input-container`).children(this.colorPickerFormatSelect,this.colorPickerValueInput).build(),i=D().class(`ran-color-picker-inner-content`).children(this.colorPickerPalette,n,r).build();this.colorPickerInner=D().class(`ran-color-picker-inner`).children(ue().text(ze).build(),i).build(),this.popoverContent.appendChild(this.colorPickerInner),this.setupEffects(),this.syncValueInput()};connectedCallback(){this.handlerExternalCss(),this.setAttribute(`class`,`ran-colorpicker`),this._events.on(this,`click`,this.blockWhenDisabled,{capture:!0}),this._events.on(this,`keydown`,this.blockWhenDisabled,{capture:!0}),this._events.on(this.popoverBlock,`click`,this.openColorPicker),this._events.on(this.colorpicker,`keydown`,this.onSwatchKeydown),this._events.on(document,`mousemove`,this.onPointerMove),this._events.on(document,`mouseup`,this.onPointerUp),this.syncDisabledState(),this.value&&this.updateColorValue(this.value)}disconnectedCallback(){this._events.abort(),this.disposeEffects()}attributeChangedCallback(e,t,n){t!==n&&(e===`value`&&this.updateColorValue(n),e===`disabled`&&this.syncDisabledState(),e===`sheet`&&this.handlerExternalCss())}};return M(`r-colorpicker`,$),e.ColorPicker=$,e.default=$,e})({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ranui_dropdown=(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=12e4,a=`__ranuts_bridge__`,o=`default`,s=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)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){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,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,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,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(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=()=>{s.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 c(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 l=[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],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},p=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})(p),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(p);var m=typeof document>`u`;function h(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function g(e){return h(e)}var _=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,v=(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()},y=(e,t,n)=>{for(let r of e)_(r)&&(v(r,t)&&n.push(r),y(r.childrenList,t,n))},b=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?h(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return y(this.childrenList,e,t),t}},x=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 b)}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 S(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return y(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}="${g(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${g(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`?h(e):(e instanceof b,e.serialize())).join(``):a+=h(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}>`}},S=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 y(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${h(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?h(e):(e instanceof b,e.serialize())).join(``)}</template>`}},C=class e{el;constructor(e){this.el=m?new x(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return m?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?m?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(m){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 w(this.el,t,e)}build(){return this.el}serialize(){if(m)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},w=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof C?this.root.appendChild(e.build()):typeof e==`string`?m?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(m)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 m?this.root.serialize():this.root.innerHTML}},T=e=>new C(e),E=()=>T(`div`),D=()=>T(`slot`),O=new Map;function k(e,t){m?(O.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var A=typeof document<`u`?HTMLElement:x,j=new Map,M=new Map,N=(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)}}},P=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!M.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),M.set(t,e)}let n=M.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)}}},F=new WeakMap,I=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,L=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||F.get(e)||e.attachShadow(n);return F.set(e,r),N(r,t?`${t}\n${I}`:I),r},R=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},z=(e,t,n=``)=>e.getAttribute(t)??n,B=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},V=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&P(t,a)},H=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-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"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,U=300,W=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),G=class extends A{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=L(this,H);let e=R(this._shadowDom,`.ranui-dropdown-container`,()=>E().class(`ranui-dropdown-container`).children(E().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(D().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return z(this,`transit`)}set transit(e){B(this,`transit`,e,{removeEmpty:!0})}get arrow(){return z(this,`arrow`)}set arrow(e){B(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return z(this,`sheet`)}set sheet(e){B(this,`sheet`,e)}handlerExternalCss=()=>{V(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},U))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=E().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},U)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}};return k(`r-dropdown`,G),e.ARROW_TYPE=W,e.Dropdown=G,e.default=G,e})({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ranui_form=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`;function n(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function r(e){return n(e)}var i=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,a=(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()},o=(e,t,n)=>{for(let r of e)i(r)&&(a(r,t)&&n.push(r),o(r.childrenList,t,n))},s=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?n(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return o(this.childrenList,e,t),t}},c=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 s)}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 l(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return o(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,i=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${r(t)}"`).join(``),a=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=a?` style="${r(a)}"`:``,c=``;return this.shadowRoot&&(c+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?c+=this._innerHTML:c+=this.childrenList.map(e=>typeof e==`string`?n(e):(e instanceof s,e.serialize())).join(``):c+=n(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!c?`<${t}${i}${o} />`:`<${t}${i}${o}>${c}</${t}>`}},l=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 o(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${n(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?n(e):(e instanceof s,e.serialize())).join(``)}</template>`}},u=class e{el;constructor(e){this.el=t?new c(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return t?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...n){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(n).forEach(n=>{n!=null&&(n instanceof e?this.el.appendChild(n.build()):typeof n==`string`?t?this.el.appendChild(n):this.el.appendChild(document.createTextNode(n)):this.el.appendChild(n))}),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 d(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},d=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(e).forEach(e=>{e!=null&&(e instanceof u?this.root.appendChild(e.build()):typeof e==`string`?t?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)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 n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},f=e=>new u(e),p=()=>f(`slot`),m=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,h=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}},g=(e=8)=>Math.random().toString(36).substring(2,e+2),_=e=>typeof e==`function`,v=12e4,y=`__ranuts_bridge__`,b=`default`,x=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)}},S=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=b){this.targetOrigin=t,this.channel=n,this.senderId=g(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,x.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:y,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:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(_(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,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 n=g(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},v),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(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=()=>{x.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:n,channel:r})=>{let i=new S(n,t,r);if(e||=g(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,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 h;var C=[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],w=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new w(C[0],3609767458),new w(C[1],602891725),new w(C[2],3964484399),new w(C[3],2173295548),new w(C[4],4081628472),new w(C[5],3053834265),new w(C[6],2937671579),new w(C[7],3664609560),new w(C[8],2734883394),new w(C[9],1164996542),new w(C[10],1323610764),new w(C[11],3590304994),new w(C[12],4068182383),new w(C[13],991336113),new w(C[14],633803317),new w(C[15],3479774868),new w(C[16],2666613458),new w(C[17],944711139),new w(C[18],2341262773),new w(C[19],2007800933),new w(C[20],1495990901),new w(C[21],1856431235),new w(C[22],3175218132),new w(C[23],2198950837),new w(C[24],3999719339),new w(C[25],766784016),new w(C[26],2566594879),new w(C[27],3203337956),new w(C[28],1034457026),new w(C[29],2466948901),new w(C[30],3758326383),new w(C[31],168717936),new w(C[32],1188179964),new w(C[33],1546045734),new w(C[34],1522805485),new w(C[35],2643833823),new w(C[36],2343527390),new w(C[37],1014477480),new w(C[38],1206759142),new w(C[39],344077627),new w(C[40],1290863460),new w(C[41],3158454273),new w(C[42],3505952657),new w(C[43],106217008),new w(C[44],3606008344),new w(C[45],1432725776),new w(C[46],1467031594),new w(C[47],851169720),new w(C[48],3100823752),new w(C[49],1363258195),new w(C[50],3750685593),new w(C[51],3785050280),new w(C[52],3318307427),new w(C[53],3812723403),new w(C[54],2003034995),new w(C[55],3602036899),new w(C[56],1575990012),new w(C[57],1125592928),new w(C[58],2716904306),new w(C[59],442776044),new w(C[60],593698344),new w(C[61],3733110249),new w(C[62],2999351573),new w(C[63],3815920427),new w(3391569614,3928383900),new w(3515267271,566280711),new w(3940187606,3454069534),new w(4118630271,4000239992),new w(116418474,1914138554),new w(174292421,2731055270),new w(289380356,3203993006),new w(460393269,320620315),new w(685471733,587496836),new w(852142971,1086792851),new w(1017036298,365543100),new w(1126000580,2618297676),new w(1288033470,3409855158),new w(1501505948,4234509866),new w(1607167915,987167468),new w(1816402316,1246189591),new w(0,1),new w(0,32898),new w(2147483648,32906),new w(2147483648,2147516416),new w(0,32907),new w(0,2147483649),new w(2147483648,2147516545),new w(2147483648,32777),new w(0,138),new w(0,136),new w(0,2147516425),new w(0,2147483658),new w(0,2147516555),new w(2147483648,139),new w(2147483648,32905),new w(2147483648,32771),new w(2147483648,32770),new w(2147483648,128),new w(0,32778),new w(2147483648,2147483658),new w(2147483648,2147516545),new w(2147483648,32896),new w(0,2147483649),new w(2147483648,2147516424);var T=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})(T),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(T);var E=new Map;function D(e,n){t?(E.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var O=typeof document<`u`?HTMLElement:c,k=new Map,A=new Map,j=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!k.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),k.set(t,e)}let n=k.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)}}},M=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!A.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),A.set(t,e)}let n=A.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)}}},N=new WeakMap,P=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,F=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||N.get(e)||e.attachShadow(n);return N.set(e,r),j(r,t?`${t}\n${P}`:P),r},I=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},L=(e,t,n=``)=>e.getAttribute(t)??n,R=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},z=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&M(t,a)},B=class extends O{_form;_shadowDom;static get observedAttributes(){return[`sheet`]}constructor(){super(),this._shadowDom=F(this,m),this._form=I(this._shadowDom,`.r-form`,()=>f(`form`).class(`r-form`).children(p().attr(`name`,`r-form_content`)).build())}get value(){return this.getAttribute(`value`)}set value(e){e!=null&&this.setAttribute(`value`,e)}get sheet(){return L(this,`sheet`)}set sheet(e){R(this,`sheet`,e)}handlerExternalCss=()=>{z(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss();let e={},t=new FormData(this._form);t.forEach((n,r)=>{e[r]||(e[r]=t.getAll(r).length>1?t.getAll(r):t.get(r))}),this._form.addEventListener(`submit`,()=>{this.value=JSON.stringify(e)})}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return D(`r-form`,B),e.Form=B,e.default=B,e})({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ranui_icon=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}: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))}}`,n=typeof document>`u`,r=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}};function i(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function a(e){return i(e)}var o=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,s=(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()},c=(e,t,n)=>{for(let r of e)o(r)&&(s(r,t)&&n.push(r),c(r.childrenList,t,n))},l=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}},u=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 l)}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 d(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(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}="${a(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=r?` style="${a(r)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``):s+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},d=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 c(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${i(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``)}</template>`}},f=class e{el;constructor(e){this.el=n?new u(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 p(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},p=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof f?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)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 n?this.root.serialize():this.root.innerHTML}},m=e=>new f(e),h=()=>m(`div`),g=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}},_=(e=8)=>Math.random().toString(36).substring(2,e+2),v=e=>typeof e==`function`,y=12e4,b=`__ranuts_bridge__`,x=`default`,S=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)}},C=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=x){this.targetOrigin=t,this.channel=n,this.senderId=_(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,S.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:b,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:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(v(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,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 n=_(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},y),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(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=()=>{S.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:n,channel:r})=>{let i=new C(n,t,r);if(e||=_(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,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 g;var w=[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],T=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new T(w[0],3609767458),new T(w[1],602891725),new T(w[2],3964484399),new T(w[3],2173295548),new T(w[4],4081628472),new T(w[5],3053834265),new T(w[6],2937671579),new T(w[7],3664609560),new T(w[8],2734883394),new T(w[9],1164996542),new T(w[10],1323610764),new T(w[11],3590304994),new T(w[12],4068182383),new T(w[13],991336113),new T(w[14],633803317),new T(w[15],3479774868),new T(w[16],2666613458),new T(w[17],944711139),new T(w[18],2341262773),new T(w[19],2007800933),new T(w[20],1495990901),new T(w[21],1856431235),new T(w[22],3175218132),new T(w[23],2198950837),new T(w[24],3999719339),new T(w[25],766784016),new T(w[26],2566594879),new T(w[27],3203337956),new T(w[28],1034457026),new T(w[29],2466948901),new T(w[30],3758326383),new T(w[31],168717936),new T(w[32],1188179964),new T(w[33],1546045734),new T(w[34],1522805485),new T(w[35],2643833823),new T(w[36],2343527390),new T(w[37],1014477480),new T(w[38],1206759142),new T(w[39],344077627),new T(w[40],1290863460),new T(w[41],3158454273),new T(w[42],3505952657),new T(w[43],106217008),new T(w[44],3606008344),new T(w[45],1432725776),new T(w[46],1467031594),new T(w[47],851169720),new T(w[48],3100823752),new T(w[49],1363258195),new T(w[50],3750685593),new T(w[51],3785050280),new T(w[52],3318307427),new T(w[53],3812723403),new T(w[54],2003034995),new T(w[55],3602036899),new T(w[56],1575990012),new T(w[57],1125592928),new T(w[58],2716904306),new T(w[59],442776044),new T(w[60],593698344),new T(w[61],3733110249),new T(w[62],2999351573),new T(w[63],3815920427),new T(3391569614,3928383900),new T(3515267271,566280711),new T(3940187606,3454069534),new T(4118630271,4000239992),new T(116418474,1914138554),new T(174292421,2731055270),new T(289380356,3203993006),new T(460393269,320620315),new T(685471733,587496836),new T(852142971,1086792851),new T(1017036298,365543100),new T(1126000580,2618297676),new T(1288033470,3409855158),new T(1501505948,4234509866),new T(1607167915,987167468),new T(1816402316,1246189591),new T(0,1),new T(0,32898),new T(2147483648,32906),new T(2147483648,2147516416),new T(0,32907),new T(0,2147483649),new T(2147483648,2147516545),new T(2147483648,32777),new T(0,138),new T(0,136),new T(0,2147516425),new T(0,2147483658),new T(0,2147516555),new T(2147483648,139),new T(2147483648,32905),new T(2147483648,32771),new T(2147483648,32770),new T(2147483648,128),new T(0,32778),new T(2147483648,2147483658),new T(2147483648,2147516545),new T(2147483648,32896),new T(0,2147483649),new T(2147483648,2147516424);var E=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})(E),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(E);var D=new Map;function O(e,t){n?(D.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var k=typeof document<`u`?HTMLElement:u,A=new Map,j=new Map,M=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!A.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),A.set(t,e)}let n=A.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)}}},N=(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(!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)}}},P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,I=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),M(r,t?`${t}\n${F}`:F),r},L=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},R=(e,t,n=``)=>e.getAttribute(t)??n,z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},B=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&N(t,a)},V=!1,H=new Map,U=!1,W=e=>/<svg[\s>]/i.test(e),G=e=>{if(typeof e==`string`)return W(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&W(n))return n;let r=t.default;if(typeof r==`string`&&W(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&W(e.data))return e.data}},K=(e,t)=>{U=!0;let n=G(t);n&&(H.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},q=e=>{U=!0,Object.entries(e).forEach(([e,t])=>{K(e,t)})},J=class extends k{isDev=V;_events=new r;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=I(this,t);let e=L(this._shadowDom,`.ran-icon`,()=>h().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return R(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return R(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return R(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(){let 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 R(this,`aria-label`)}set ariaLabel(e){z(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return R(this,`sheet`)}set sheet(e){z(this,`sheet`,e)}handlerExternalCss=()=>{B(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(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=H.get(t);if(!n){this.isDev&&U&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,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=>W(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=m(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,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){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let 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,n){t!==n&&(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())}};return O(`r-icon`,J),e.Icon=J,e.registerIcon=K,e.registerIcons=q,e})({});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var ranui_image=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`
|
|
2
|
+
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==
|
|
3
|
+
`,n=typeof document>`u`;function r(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function i(e){return r(e)}var a=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,o=(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()},s=(e,t,n)=>{for(let r of e)a(r)&&(o(r,t)&&n.push(r),s(r.childrenList,t,n))},c=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?r(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(this.childrenList,e,t),t}},l=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 c)}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 u(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(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}="${i(t)}"`).join(``),a=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=a?` style="${i(a)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``):s+=r(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},u=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 s(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${r(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``)}</template>`}},d=class e{el;constructor(e){this.el=n?new l(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 f(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},f=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof d?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)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 n?this.root.serialize():this.root.innerHTML}},p=e=>new d(e),m=()=>p(`div`),h=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}},g=(e=8)=>Math.random().toString(36).substring(2,e+2),_=e=>typeof e==`function`,v=12e4,y=`__ranuts_bridge__`,b=`default`,x=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)}},S=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=b){this.targetOrigin=t,this.channel=n,this.senderId=g(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,x.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:y,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:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(_(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,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 n=g(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},v),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(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=()=>{x.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:n,channel:r})=>{let i=new S(n,t,r);if(e||=g(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,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 h;var C=[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],w=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new w(C[0],3609767458),new w(C[1],602891725),new w(C[2],3964484399),new w(C[3],2173295548),new w(C[4],4081628472),new w(C[5],3053834265),new w(C[6],2937671579),new w(C[7],3664609560),new w(C[8],2734883394),new w(C[9],1164996542),new w(C[10],1323610764),new w(C[11],3590304994),new w(C[12],4068182383),new w(C[13],991336113),new w(C[14],633803317),new w(C[15],3479774868),new w(C[16],2666613458),new w(C[17],944711139),new w(C[18],2341262773),new w(C[19],2007800933),new w(C[20],1495990901),new w(C[21],1856431235),new w(C[22],3175218132),new w(C[23],2198950837),new w(C[24],3999719339),new w(C[25],766784016),new w(C[26],2566594879),new w(C[27],3203337956),new w(C[28],1034457026),new w(C[29],2466948901),new w(C[30],3758326383),new w(C[31],168717936),new w(C[32],1188179964),new w(C[33],1546045734),new w(C[34],1522805485),new w(C[35],2643833823),new w(C[36],2343527390),new w(C[37],1014477480),new w(C[38],1206759142),new w(C[39],344077627),new w(C[40],1290863460),new w(C[41],3158454273),new w(C[42],3505952657),new w(C[43],106217008),new w(C[44],3606008344),new w(C[45],1432725776),new w(C[46],1467031594),new w(C[47],851169720),new w(C[48],3100823752),new w(C[49],1363258195),new w(C[50],3750685593),new w(C[51],3785050280),new w(C[52],3318307427),new w(C[53],3812723403),new w(C[54],2003034995),new w(C[55],3602036899),new w(C[56],1575990012),new w(C[57],1125592928),new w(C[58],2716904306),new w(C[59],442776044),new w(C[60],593698344),new w(C[61],3733110249),new w(C[62],2999351573),new w(C[63],3815920427),new w(3391569614,3928383900),new w(3515267271,566280711),new w(3940187606,3454069534),new w(4118630271,4000239992),new w(116418474,1914138554),new w(174292421,2731055270),new w(289380356,3203993006),new w(460393269,320620315),new w(685471733,587496836),new w(852142971,1086792851),new w(1017036298,365543100),new w(1126000580,2618297676),new w(1288033470,3409855158),new w(1501505948,4234509866),new w(1607167915,987167468),new w(1816402316,1246189591),new w(0,1),new w(0,32898),new w(2147483648,32906),new w(2147483648,2147516416),new w(0,32907),new w(0,2147483649),new w(2147483648,2147516545),new w(2147483648,32777),new w(0,138),new w(0,136),new w(0,2147516425),new w(0,2147483658),new w(0,2147516555),new w(2147483648,139),new w(2147483648,32905),new w(2147483648,32771),new w(2147483648,32770),new w(2147483648,128),new w(0,32778),new w(2147483648,2147483658),new w(2147483648,2147516545),new w(2147483648,32896),new w(0,2147483649),new w(2147483648,2147516424);var T=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})(T),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(T);var E=new Map;function D(e,t){n?(E.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var O=typeof document<`u`?HTMLElement:l,k=new Map,A=new Map,j=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!k.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),k.set(t,e)}let n=k.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)}}},M=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!A.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),A.set(t,e)}let n=A.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)}}},N=new WeakMap,P=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,F=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||N.get(e)||e.attachShadow(n);return N.set(e,r),j(r,t?`${t}\n${P}`:P),r},I=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},L=(e,t,n=``)=>e.getAttribute(t)??n,R=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},z=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&M(t,a)},B=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,V=class extends O{static get observedAttributes(){return[`src`,`fallback`,`sheet`,`alt`]}_image;_container;_shadowDom;constructor(){super(),this._shadowDom=F(this,B);let e=I(this._shadowDom,`.ran-image`,()=>m().class(`ran-image`).build());this._container=e}get fallback(){return L(this,`fallback`,t)}set fallback(e){R(this,`fallback`,e,{removeEmpty:!0})}get sheet(){return L(this,`sheet`)}set sheet(e){R(this,`sheet`,e)}get alt(){return L(this,`alt`)}set alt(e){R(this,`alt`,e)}handlerExternalCss=()=>{z(this,this._shadowDom,`sheet`,null,this.sheet)};listenFallback(e,t){e===`fallback`&&this._image&&(t?this._image.setAttribute(`fallback`,t):this._image.removeAttribute(`fallback`))}updateSrc=()=>{this._image&&(this._image.src=this.getAttribute(`src`)||``)};connectedCallback(){this.handlerExternalCss(),this._image=new Image,this._image.alt=this.alt,this._image.addEventListener(`error`,()=>{this._image&&this.fallback&&(this._image.src=this.fallback)}),this._image.addEventListener(`load`,()=>{this._image&&this._container.appendChild(this._image)}),this.updateSrc()}attributeChangedCallback(e,t,n){t!==n&&(this.listenFallback(e,n),e===`src`&&this.updateSrc(),e===`alt`&&this._image&&(this._image.alt=n??``),e===`sheet`&&this.handlerExternalCss())}};return D(`r-img`,V),e.ImageElement=V,e.default=V,e})({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=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}};function r(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function i(e){return r(e)}var a=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,o=(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()},s=(e,t,n)=>{for(let r of e)a(r)&&(o(r,t)&&n.push(r),s(r.childrenList,t,n))},c=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?r(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(this.childrenList,e,t),t}},l=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 c)}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 u(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(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}="${i(t)}"`).join(``),a=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=a?` style="${i(a)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``):s+=r(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},u=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 s(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${r(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``)}</template>`}},d=class e{el;constructor(e){this.el=t?new l(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return t?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...n){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(n).forEach(n=>{n!=null&&(n instanceof e?this.el.appendChild(n.build()):typeof n==`string`?t?this.el.appendChild(n):this.el.appendChild(document.createTextNode(n)):this.el.appendChild(n))}),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 f(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},f=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(e).forEach(e=>{e!=null&&(e instanceof d?this.root.appendChild(e.build()):typeof e==`string`?t?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)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 n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},p=e=>new d(e),m=()=>p(`div`),h=()=>p(`input`),g=()=>p(`label`),_=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}},v=(e=8)=>Math.random().toString(36).substring(2,e+2),y=e=>typeof e==`function`,b=12e4,x=`__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)}},w=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=S){this.targetOrigin=t,this.channel=n,this.senderId=v(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:x,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:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(y(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,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 n=v(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},b),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(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:n,channel:r})=>{let i=new w(n,t,r);if(e||=v(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,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 _;var T=[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],E=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new E(T[0],3609767458),new E(T[1],602891725),new E(T[2],3964484399),new E(T[3],2173295548),new E(T[4],4081628472),new E(T[5],3053834265),new E(T[6],2937671579),new E(T[7],3664609560),new E(T[8],2734883394),new E(T[9],1164996542),new E(T[10],1323610764),new E(T[11],3590304994),new E(T[12],4068182383),new E(T[13],991336113),new E(T[14],633803317),new E(T[15],3479774868),new E(T[16],2666613458),new E(T[17],944711139),new E(T[18],2341262773),new E(T[19],2007800933),new E(T[20],1495990901),new E(T[21],1856431235),new E(T[22],3175218132),new E(T[23],2198950837),new E(T[24],3999719339),new E(T[25],766784016),new E(T[26],2566594879),new E(T[27],3203337956),new E(T[28],1034457026),new E(T[29],2466948901),new E(T[30],3758326383),new E(T[31],168717936),new E(T[32],1188179964),new E(T[33],1546045734),new E(T[34],1522805485),new E(T[35],2643833823),new E(T[36],2343527390),new E(T[37],1014477480),new E(T[38],1206759142),new E(T[39],344077627),new E(T[40],1290863460),new E(T[41],3158454273),new E(T[42],3505952657),new E(T[43],106217008),new E(T[44],3606008344),new E(T[45],1432725776),new E(T[46],1467031594),new E(T[47],851169720),new E(T[48],3100823752),new E(T[49],1363258195),new E(T[50],3750685593),new E(T[51],3785050280),new E(T[52],3318307427),new E(T[53],3812723403),new E(T[54],2003034995),new E(T[55],3602036899),new E(T[56],1575990012),new E(T[57],1125592928),new E(T[58],2716904306),new E(T[59],442776044),new E(T[60],593698344),new E(T[61],3733110249),new E(T[62],2999351573),new E(T[63],3815920427),new E(3391569614,3928383900),new E(3515267271,566280711),new E(3940187606,3454069534),new E(4118630271,4000239992),new E(116418474,1914138554),new E(174292421,2731055270),new E(289380356,3203993006),new E(460393269,320620315),new E(685471733,587496836),new E(852142971,1086792851),new E(1017036298,365543100),new E(1126000580,2618297676),new E(1288033470,3409855158),new E(1501505948,4234509866),new E(1607167915,987167468),new E(1816402316,1246189591),new E(0,1),new E(0,32898),new E(2147483648,32906),new E(2147483648,2147516416),new E(0,32907),new E(0,2147483649),new E(2147483648,2147516545),new E(2147483648,32777),new E(0,138),new E(0,136),new E(0,2147516425),new E(0,2147483658),new E(0,2147516555),new E(2147483648,139),new E(2147483648,32905),new E(2147483648,32771),new E(2147483648,32770),new E(2147483648,128),new E(0,32778),new E(2147483648,2147483658),new E(2147483648,2147516545),new E(2147483648,32896),new E(0,2147483649),new E(2147483648,2147516424);var D=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})(D),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(D);var O=[!1,`false`,null,void 0],k=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!O.includes(n))},A=new Map;function j(e,n){t?(A.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var M=typeof document<`u`?HTMLElement:l,N=new Map,P=new Map,F=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!N.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),N.set(t,e)}let n=N.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)}}},I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=new WeakMap,R=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,z=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||L.get(e)||e.attachShadow(n);return L.set(e,r),F(r,t?`${t}\n${R}`:R),r},B=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},V=(e,t,n=``)=>e.getAttribute(t)??n,H=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},U=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&I(t,a)},W=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}: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))}}`,G=!1,K=new Map,q=e=>/<svg[\s>]/i.test(e);j(`r-icon`,class extends M{isDev=G;_events=new n;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=z(this,W);let e=B(this._shadowDom,`.ran-icon`,()=>m().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return V(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return V(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return V(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(){let 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 V(this,`aria-label`)}set ariaLabel(e){H(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return V(this,`sheet`)}set sheet(e){H(this,`sheet`,e)}handlerExternalCss=()=>{U(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(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=K.get(t);if(!n){this.isDev;return}n&&this.isSvgText(n)?this.renderSvg(n,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=>q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=p(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,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){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let 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,n){t!==n&&(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())}});var J=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%);transition:var(--ran-input-label-transition,all .3s)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,border-color var(--ran-motion-duration-base,.2s), box-shadow var(--ran-motion-duration-base,.2s), color var(--ran-motion-duration-base,.2s));min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,border-color var(--ran-motion-duration-base,.2s), box-shadow var(--ran-motion-duration-base,.2s), color var(--ran-motion-duration-base,.2s));outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, color .3s, background-color .3s, backdrop-filter .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9);transition:var(--ran-input-label-transition,all .3s)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,Y=0,X=class extends M{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new n;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=z(this,J);let e=B(this._shadowDom,`.ran-input`,()=>m().class(`ran-input`).part(`input`).children(h().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++Y}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!k(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return k(this)}set disabled(e){O.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return V(this,`sheet`)}set sheet(e){H(this,`sheet`,e)}handlerExternalCss=()=>{U(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=g().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=m().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(O.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=p(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),k(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}};return j(`r-input`,X),e.Input=X,e.default=X,e})({});
|