lightning_ui_kit 0.3.1 → 0.3.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.
- checksums.yaml +4 -4
- data/README.md +30 -0
- data/app/assets/stylesheets/lightning_ui_kit/application.css +58 -0
- data/app/assets/stylesheets/lightning_ui_kit/themes.css +133 -0
- data/app/assets/vendor/lightning_ui_kit.css +415 -374
- data/app/assets/vendor/lightning_ui_kit.js +2 -2
- data/app/components/lightning_ui_kit/alert_component.rb +1 -1
- data/app/components/lightning_ui_kit/avatar_component.html.erb +1 -1
- data/app/components/lightning_ui_kit/badge_component.rb +14 -14
- data/app/components/lightning_ui_kit/banner_component.html.erb +1 -1
- data/app/components/lightning_ui_kit/banner_component.rb +3 -3
- data/app/components/lightning_ui_kit/button_component.rb +16 -16
- data/app/components/lightning_ui_kit/checkbox_component.html.erb +10 -10
- data/app/components/lightning_ui_kit/combobox_component.html.erb +14 -14
- data/app/components/lightning_ui_kit/combobox_component.rb +4 -4
- data/app/components/lightning_ui_kit/description_list/item_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/dropdown_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/dropdown_component.rb +1 -1
- data/app/components/lightning_ui_kit/dropzone_component.html.erb +13 -13
- data/app/components/lightning_ui_kit/dropzone_component.rb +1 -1
- data/app/components/lightning_ui_kit/file_input_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/file_input_component.rb +3 -3
- data/app/components/lightning_ui_kit/input_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/input_component.rb +9 -9
- data/app/components/lightning_ui_kit/layout_component.html.erb +10 -10
- data/app/components/lightning_ui_kit/modal_component.html.erb +4 -4
- data/app/components/lightning_ui_kit/pagination_component.html.erb +3 -3
- data/app/components/lightning_ui_kit/pagination_component.rb +14 -5
- data/app/components/lightning_ui_kit/select_component.html.erb +3 -3
- data/app/components/lightning_ui_kit/select_component.rb +3 -3
- data/app/components/lightning_ui_kit/sidebar_link_component.html.erb +1 -1
- data/app/components/lightning_ui_kit/sidebar_link_component.rb +11 -7
- data/app/components/lightning_ui_kit/sidebar_section_component.rb +1 -1
- data/app/components/lightning_ui_kit/skeleton_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/spinner_component.html.erb +5 -4
- data/app/components/lightning_ui_kit/switch_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/switch_component.rb +7 -7
- data/app/components/lightning_ui_kit/table_component.html.erb +7 -7
- data/app/components/lightning_ui_kit/text_component.rb +1 -1
- data/app/components/lightning_ui_kit/textarea_component.html.erb +2 -2
- data/app/components/lightning_ui_kit/textarea_component.rb +3 -3
- data/app/components/lightning_ui_kit/toast_component.html.erb +3 -3
- data/app/components/lightning_ui_kit/tooltip_component.html.erb +2 -2
- data/app/javascript/lightning_ui_kit/controllers/combobox_controller.js +2 -2
- data/app/javascript/lightning_ui_kit/controllers/dropzone_controller.js +1 -1
- data/lib/lightning_ui_kit/builder.rb +56 -56
- data/lib/lightning_ui_kit/version.rb +1 -1
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/bigdecimal-3.2.2/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/bigdecimal-3.2.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/bigdecimal-3.2.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.4.1/date_core.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/erb-5.0.2/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/erb-5.0.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/io-console-0.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/io-console-0.8.1/io/console.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-2.18.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-2.18.0/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-2.18.0/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/nio4r-2.7.4/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/nio4r-2.7.4/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.8.0/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/psych-5.2.6/psych.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/stringio-3.1.7/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/stringio-3.1.7/stringio.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/websocket-driver-0.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/websocket-driver-0.8.0/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.2.2/lib/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/date-3.4.1/lib/date_core.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/erb-5.0.2/lib/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/io-console-0.8.1/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.18.0/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.18.0/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/nio4r-2.7.4/lib/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/prism-1.8.0/lib/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/psych-5.2.6/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/stringio-3.1.7/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/websocket-driver-0.8.0/lib/websocket_mask.so +0 -0
- metadata +2 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
%o
|
|
4
4
|
|
|
5
|
-
%o`,t,e,i),(n=window.onerror)===null||n===void 0||n.call(window,t,"",0,0,e)}logFormattedMessage(e,t,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}};function Ei(){return new Promise(s=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>s()):s()})}function Oi(s){return Ee(s,"classes").reduce((t,i)=>Object.assign(t,Ai(i)),{})}function Ai(s){return{[`${s}Class`]:{get(){let{classes:e}=this;if(e.has(s))return e.get(s);{let t=e.getAttributeName(s);throw new Error(`Missing attribute "${t}"`)}}},[`${s}Classes`]:{get(){return this.classes.getAll(s)}},[`has${xe(s)}Class`]:{get(){return this.classes.has(s)}}}}function Ti(s){return Ee(s,"outlets").reduce((t,i)=>Object.assign(t,Ci(i)),{})}function es(s,e,t){return s.application.getControllerForElementAndIdentifier(e,t)}function ts(s,e,t){let i=es(s,e,t);if(i||(s.application.router.proposeToConnectScopeForElementAndIdentifier(e,t),i=es(s,e,t),i))return i}function Ci(s){let e=ft(s);return{[`${e}Outlet`]:{get(){let t=this.outlets.find(s),i=this.outlets.getSelectorForOutletName(s);if(t){let n=ts(this,t,s);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}Outlets`]:{get(){let t=this.outlets.findAll(s);return t.length>0?t.map(i=>{let n=ts(this,i,s);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`,i)}).filter(i=>i):[]}},[`${e}OutletElement`]:{get(){let t=this.outlets.find(s),i=this.outlets.getSelectorForOutletName(s);if(t)return t;throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(s)}},[`has${xe(e)}Outlet`]:{get(){return this.outlets.has(s)}}}}function Si(s){return Ee(s,"targets").reduce((t,i)=>Object.assign(t,Li(i)),{})}function Li(s){return{[`${s}Target`]:{get(){let e=this.targets.find(s);if(e)return e;throw new Error(`Missing target element "${s}" for "${this.identifier}" controller`)}},[`${s}Targets`]:{get(){return this.targets.findAll(s)}},[`has${xe(s)}Target`]:{get(){return this.targets.has(s)}}}}function Fi(s){let e=hi(s,"values"),t={valueDescriptorMap:{get(){return e.reduce((i,n)=>{let a=ls(n,this.identifier),h=this.data.getAttributeNameForKey(a.key);return Object.assign(i,{[h]:a})},{})}}};return e.reduce((i,n)=>Object.assign(i,Mi(n)),t)}function Mi(s,e){let t=ls(s,e),{key:i,name:n,reader:a,writer:h}=t;return{[n]:{get(){let f=this.data.get(i);return f!==null?a(f):t.defaultValue},set(f){f===void 0?this.data.delete(i):this.data.set(i,h(f))}},[`has${xe(n)}`]:{get(){return this.data.has(i)||t.hasCustomDefaultValue}}}}function ls([s,e],t){return Bi({controller:t,token:s,typeDefinition:e})}function qe(s){switch(s){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function we(s){switch(typeof s){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(s))return"array";if(Object.prototype.toString.call(s)==="[object Object]")return"object"}function Ni(s){let{controller:e,token:t,typeObject:i}=s,n=Yt(i.type),a=Yt(i.default),h=n&&a,f=n&&!a,p=!n&&a,g=qe(i.type),b=we(s.typeObject.default);if(f)return g;if(p)return b;if(g!==b){let m=e?`${e}.${t}`:t;throw new Error(`The specified default value for the Stimulus Value "${m}" must match the defined type "${g}". The provided default value of "${i.default}" is of type "${b}".`)}if(h)return g}function $i(s){let{controller:e,token:t,typeDefinition:i}=s,a=Ni({controller:e,token:t,typeObject:i}),h=we(i),f=qe(i),p=a||h||f;if(p)return p;let g=e?`${e}.${i}`:t;throw new Error(`Unknown value type "${g}" for "${t}" value`)}function ki(s){let e=qe(s);if(e)return ss[e];let t=pt(s,"default"),i=pt(s,"type"),n=s;if(t)return n.default;if(i){let{type:a}=n,h=qe(a);if(h)return ss[h]}return s}function Bi(s){let{token:e,typeDefinition:t}=s,i=`${rs(e)}-value`,n=$i(s);return{type:n,key:i,name:kt(i),get defaultValue(){return ki(t)},get hasCustomDefaultValue(){return we(t)!==void 0},reader:Di[n],writer:is[n]||is.default}}var ss={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Di={array(s){let e=JSON.parse(s);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${s}" of type "${we(e)}"`);return e},boolean(s){return!(s=="0"||String(s).toLowerCase()=="false")},number(s){return Number(s.replace(/_/g,""))},object(s){let e=JSON.parse(s);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${s}" of type "${we(e)}"`);return e},string(s){return s}},is={default:Vi,array:ns,object:ns};function ns(s){return JSON.stringify(s)}function Vi(s){return`${s}`}var A=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:i={},prefix:n=this.identifier,bubbles:a=!0,cancelable:h=!0}={}){let f=n?`${n}:${e}`:e,p=new CustomEvent(f,{detail:i,bubbles:a,cancelable:h});return t.dispatchEvent(p),p}};A.blessings=[Oi,Si,Fi,Ti];A.targets=[];A.outlets=[];A.values={};var us={exports:{}};(function(s,e){(function(t){s.exports=t()})(function(t){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(d,u){var o=d[0],r=d[1],l=d[2],c=d[3];o+=(r&l|~r&c)+u[0]-680876936|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[1]-389564586|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[2]+606105819|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[3]-1044525330|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[4]-176418897|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[5]+1200080426|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[6]-1473231341|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[7]-45705983|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[8]+1770035416|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[9]-1958414417|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[10]-42063|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[11]-1990404162|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[12]+1804603682|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[13]-40341101|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[14]-1502002290|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[15]+1236535329|0,r=(r<<22|r>>>10)+l|0,o+=(r&c|l&~c)+u[1]-165796510|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[6]-1069501632|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[11]+643717713|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[0]-373897302|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[5]-701558691|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[10]+38016083|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[15]-660478335|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[4]-405537848|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[9]+568446438|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[14]-1019803690|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[3]-187363961|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[8]+1163531501|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[13]-1444681467|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[2]-51403784|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[7]+1735328473|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[12]-1926607734|0,r=(r<<20|r>>>12)+l|0,o+=(r^l^c)+u[5]-378558|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[8]-2022574463|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[11]+1839030562|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[14]-35309556|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[1]-1530992060|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[4]+1272893353|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[7]-155497632|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[10]-1094730640|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[13]+681279174|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[0]-358537222|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[3]-722521979|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[6]+76029189|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[9]-640364487|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[12]-421815835|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[15]+530742520|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[2]-995338651|0,r=(r<<23|r>>>9)+l|0,o+=(l^(r|~c))+u[0]-198630844|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[7]+1126891415|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[14]-1416354905|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[5]-57434055|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[12]+1700485571|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[3]-1894986606|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[10]-1051523|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[1]-2054922799|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[8]+1873313359|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[15]-30611744|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[6]-1560198380|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[13]+1309151649|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[4]-145523070|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[11]-1120210379|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[2]+718787259|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[9]-343485551|0,r=(r<<21|r>>>11)+l|0,d[0]=o+d[0]|0,d[1]=r+d[1]|0,d[2]=l+d[2]|0,d[3]=c+d[3]|0}function a(d){var u=[],o;for(o=0;o<64;o+=4)u[o>>2]=d.charCodeAt(o)+(d.charCodeAt(o+1)<<8)+(d.charCodeAt(o+2)<<16)+(d.charCodeAt(o+3)<<24);return u}function h(d){var u=[],o;for(o=0;o<64;o+=4)u[o>>2]=d[o]+(d[o+1]<<8)+(d[o+2]<<16)+(d[o+3]<<24);return u}function f(d){var u=d.length,o=[1732584193,-271733879,-1732584194,271733878],r,l,c,C,S,O;for(r=64;r<=u;r+=64)n(o,a(d.substring(r-64,r)));for(d=d.substring(r-64),l=d.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<l;r+=1)c[r>>2]|=d.charCodeAt(r)<<(r%4<<3);if(c[r>>2]|=128<<(r%4<<3),r>55)for(n(o,c),r=0;r<16;r+=1)c[r]=0;return C=u*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),O=parseInt(C[1],16)||0,c[14]=S,c[15]=O,n(o,c),o}function p(d){var u=d.length,o=[1732584193,-271733879,-1732584194,271733878],r,l,c,C,S,O;for(r=64;r<=u;r+=64)n(o,h(d.subarray(r-64,r)));for(d=r-64<u?d.subarray(r-64):new Uint8Array(0),l=d.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<l;r+=1)c[r>>2]|=d[r]<<(r%4<<3);if(c[r>>2]|=128<<(r%4<<3),r>55)for(n(o,c),r=0;r<16;r+=1)c[r]=0;return C=u*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),O=parseInt(C[1],16)||0,c[14]=S,c[15]=O,n(o,c),o}function g(d){var u="",o;for(o=0;o<4;o+=1)u+=i[d>>o*8+4&15]+i[d>>o*8&15];return u}function b(d){var u;for(u=0;u<d.length;u+=1)d[u]=g(d[u]);return d.join("")}b(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function d(u,o){return u=u|0||0,u<0?Math.max(u+o,0):Math.min(u,o)}ArrayBuffer.prototype.slice=function(u,o){var r=this.byteLength,l=d(u,r),c=r,C,S,O,L;return o!==t&&(c=d(o,r)),l>c?new ArrayBuffer(0):(C=c-l,S=new ArrayBuffer(C),O=new Uint8Array(S),L=new Uint8Array(this,l,C),O.set(L),S)}}();function m(d){return/[\u0080-\uFFFF]/.test(d)&&(d=unescape(encodeURIComponent(d))),d}function w(d,u){var o=d.length,r=new ArrayBuffer(o),l=new Uint8Array(r),c;for(c=0;c<o;c+=1)l[c]=d.charCodeAt(c);return u?l:r}function v(d){return String.fromCharCode.apply(null,new Uint8Array(d))}function x(d,u,o){var r=new Uint8Array(d.byteLength+u.byteLength);return r.set(new Uint8Array(d)),r.set(new Uint8Array(u),d.byteLength),o?r:r.buffer}function E(d){var u=[],o=d.length,r;for(r=0;r<o-1;r+=2)u.push(parseInt(d.substr(r,2),16));return String.fromCharCode.apply(String,u)}function y(){this.reset()}return y.prototype.append=function(d){return this.appendBinary(m(d)),this},y.prototype.appendBinary=function(d){this._buff+=d,this._length+=d.length;var u=this._buff.length,o;for(o=64;o<=u;o+=64)n(this._hash,a(this._buff.substring(o-64,o)));return this._buff=this._buff.substring(o-64),this},y.prototype.end=function(d){var u=this._buff,o=u.length,r,l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c;for(r=0;r<o;r+=1)l[r>>2]|=u.charCodeAt(r)<<(r%4<<3);return this._finish(l,o),c=b(this._hash),d&&(c=E(c)),this.reset(),c},y.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},y.prototype.setState=function(d){return this._buff=d.buff,this._length=d.length,this._hash=d.hash,this},y.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},y.prototype._finish=function(d,u){var o=u,r,l,c;if(d[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,d),o=0;o<16;o+=1)d[o]=0;r=this._length*8,r=r.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(r[2],16),c=parseInt(r[1],16)||0,d[14]=l,d[15]=c,n(this._hash,d)},y.hash=function(d,u){return y.hashBinary(m(d),u)},y.hashBinary=function(d,u){var o=f(d),r=b(o);return u?E(r):r},y.ArrayBuffer=function(){this.reset()},y.ArrayBuffer.prototype.append=function(d){var u=x(this._buff.buffer,d,!0),o=u.length,r;for(this._length+=d.byteLength,r=64;r<=o;r+=64)n(this._hash,h(u.subarray(r-64,r)));return this._buff=r-64<o?new Uint8Array(u.buffer.slice(r-64)):new Uint8Array(0),this},y.ArrayBuffer.prototype.end=function(d){var u=this._buff,o=u.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l,c;for(l=0;l<o;l+=1)r[l>>2]|=u[l]<<(l%4<<3);return this._finish(r,o),c=b(this._hash),d&&(c=E(c)),this.reset(),c},y.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.ArrayBuffer.prototype.getState=function(){var d=y.prototype.getState.call(this);return d.buff=v(d.buff),d},y.ArrayBuffer.prototype.setState=function(d){return d.buff=w(d.buff,!0),y.prototype.setState.call(this,d)},y.ArrayBuffer.prototype.destroy=y.prototype.destroy,y.ArrayBuffer.prototype._finish=y.prototype._finish,y.ArrayBuffer.hash=function(d,u){var o=p(new Uint8Array(d)),r=b(o);return u?E(r):r},y})})(us);var Pi=us.exports,Ii=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,Oe=class{static create(e,t){new Oe(e).create(t)}constructor(e){this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}create(e){this.callback=e,this.md5Buffer=new Pi.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",t=>this.fileReaderDidLoad(t)),this.fileReader.addEventListener("error",t=>this.fileReaderDidError(t)),this.readNextChunk()}fileReaderDidLoad(e){if(this.md5Buffer.append(e.target.result),!this.readNextChunk()){let t=this.md5Buffer.end(!0),i=btoa(t);this.callback(null,i)}}fileReaderDidError(e){this.callback(`Error reading ${this.file.name}`)}readNextChunk(){if(this.chunkIndex<this.chunkCount||this.chunkIndex==0&&this.chunkCount==0){let e=this.chunkIndex*this.chunkSize,t=Math.min(e+this.chunkSize,this.file.size),i=Ii.call(this.file,e,t);return this.fileReader.readAsArrayBuffer(i),this.chunkIndex++,!0}else return!1}};function Ri(s){let e=ds(document.head,`meta[name="${s}"]`);if(e)return e.getAttribute("content")}function ji(s,e){typeof s=="string"&&(e=s,s=document);let t=s.querySelectorAll(e);return ps(t)}function ds(s,e){return typeof s=="string"&&(e=s,s=document),s.querySelector(e)}function fs(s,e,t={}){let{disabled:i}=s,{bubbles:n,cancelable:a,detail:h}=t,f=document.createEvent("Event");f.initEvent(e,n||!0,a||!0),f.detail=h||{};try{s.disabled=!1,s.dispatchEvent(f)}finally{s.disabled=i}return f}function ps(s){return Array.isArray(s)?s:Array.from?Array.from(s):[].slice.call(s)}var Dt=class{constructor(e,t,i,n={}){this.file=e,this.attributes={filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:t},this.xhr=new XMLHttpRequest,this.xhr.open("POST",i,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(n).forEach(h=>{this.xhr.setRequestHeader(h,n[h])});let a=Ri("csrf-token");a!=null&&this.xhr.setRequestHeader("X-CSRF-Token",a),this.xhr.addEventListener("load",h=>this.requestDidLoad(h)),this.xhr.addEventListener("error",h=>this.requestDidError(h))}get status(){return this.xhr.status}get response(){let{responseType:e,response:t}=this.xhr;return e=="json"?t:JSON.parse(t)}create(e){this.callback=e,this.xhr.send(JSON.stringify({blob:this.attributes}))}requestDidLoad(e){if(this.status>=200&&this.status<300){let{response:t}=this,{direct_upload:i}=t;delete t.direct_upload,this.attributes=t,this.directUploadData=i,this.callback(null,this.toJSON())}else this.requestDidError(e)}requestDidError(e){this.callback(`Error creating Blob for "${this.file.name}". Status: ${this.status}`)}toJSON(){let e={};for(let t in this.attributes)e[t]=this.attributes[t];return e}},Vt=class{constructor(e){this.blob=e,this.file=e.file;let{url:t,headers:i}=e.directUploadData;this.xhr=new XMLHttpRequest,this.xhr.open("PUT",t,!0),this.xhr.responseType="text";for(let n in i)this.xhr.setRequestHeader(n,i[n]);this.xhr.addEventListener("load",n=>this.requestDidLoad(n)),this.xhr.addEventListener("error",n=>this.requestDidError(n))}create(e){this.callback=e,this.xhr.send(this.file.slice())}requestDidLoad(e){let{status:t,response:i}=this.xhr;t>=200&&t<300?this.callback(null,i):this.requestDidError(e)}requestDidError(e){this.callback(`Error storing "${this.file.name}". Status: ${this.xhr.status}`)}},_i=0,Ae=class{constructor(e,t,i,n={}){this.id=++_i,this.file=e,this.url=t,this.delegate=i,this.customHeaders=n}create(e){Oe.create(this.file,(t,i)=>{if(t){e(t);return}let n=new Dt(this.file,i,this.url,this.customHeaders);cs(this.delegate,"directUploadWillCreateBlobWithXHR",n.xhr),n.create(a=>{if(a)e(a);else{let h=new Vt(n);cs(this.delegate,"directUploadWillStoreFileWithXHR",h.xhr),h.create(f=>{f?e(f):e(null,n.toJSON())})}})})}};function cs(s,e,...t){if(s&&typeof s[e]=="function")return s[e](...t)}var Pt=class{constructor(e,t){this.input=e,this.file=t,this.directUpload=new Ae(this.file,this.url,this),this.dispatch("initialize")}start(e){let t=document.createElement("input");t.type="hidden",t.name=this.input.name,this.input.insertAdjacentElement("beforebegin",t),this.dispatch("start"),this.directUpload.create((i,n)=>{i?(t.parentNode.removeChild(t),this.dispatchError(i)):t.value=n.signed_id,this.dispatch("end"),e(i)})}uploadRequestDidProgress(e){let t=e.loaded/e.total*100;t&&this.dispatch("progress",{progress:t})}get url(){return this.input.getAttribute("data-direct-upload-url")}dispatch(e,t={}){return t.file=this.file,t.id=this.directUpload.id,fs(this.input,`direct-upload:${e}`,{detail:t})}dispatchError(e){this.dispatch("error",{error:e}).defaultPrevented||alert(e)}directUploadWillCreateBlobWithXHR(e){this.dispatch("before-blob-request",{xhr:e})}directUploadWillStoreFileWithXHR(e){this.dispatch("before-storage-request",{xhr:e}),e.upload.addEventListener("progress",t=>this.uploadRequestDidProgress(t))}},Hi="input[type=file][data-direct-upload-url]:not([disabled])",It=class{constructor(e){this.form=e,this.inputs=ji(e,Hi).filter(t=>t.files.length)}start(e){let t=this.createDirectUploadControllers(),i=()=>{let n=t.shift();n?n.start(a=>{a?(e(a),this.dispatch("end")):i()}):(e(),this.dispatch("end"))};this.dispatch("start"),i()}createDirectUploadControllers(){let e=[];return this.inputs.forEach(t=>{ps(t.files).forEach(i=>{let n=new Pt(t,i);e.push(n)})}),e}dispatch(e,t={}){return fs(this.form,`direct-uploads:${e}`,{detail:t})}},Bt="data-direct-uploads-processing",Rt=new WeakMap,hs=!1;function jt(){hs||(hs=!0,document.addEventListener("click",Ui,!0),document.addEventListener("submit",qi,!0),document.addEventListener("ajax:before",Ki))}function Ui(s){let e=s.target.closest("button, input");e&&e.type==="submit"&&e.form&&Rt.set(e.form,e)}function qi(s){gs(s)}function Ki(s){s.target.tagName=="FORM"&&gs(s)}function gs(s){let e=s.target;if(e.hasAttribute(Bt)){s.preventDefault();return}let t=new It(e),{inputs:i}=t;i.length&&(s.preventDefault(),e.setAttribute(Bt,""),i.forEach(zi),t.start(n=>{e.removeAttribute(Bt),n?i.forEach(Xi):Wi(e)}))}function Wi(s){let e=Rt.get(s)||ds(s,"input[type=submit], button[type=submit]");if(e){let{disabled:t}=e;e.disabled=!1,e.focus(),e.click(),e.disabled=t}else e=document.createElement("input"),e.type="submit",e.style.display="none",s.appendChild(e),e.click(),s.removeChild(e);Rt.delete(s)}function zi(s){s.disabled=!0}function Xi(s){s.disabled=!1}function Ji(){window.ActiveStorage&&jt()}setTimeout(Ji,1);var Te=class extends A{connect(){this.hasInputTarget&&(this.inputTarget.disabled=!0)}copy(s){if(s.preventDefault(),!this.hasInputTarget)return;let e=this.inputTarget.innerHTML||this.inputTarget.value;navigator.clipboard.writeText(e)}};T(Te,"targets",["input"]);var Ce=class extends A{toggle(s){s.preventDefault();let e=this.controlTarget;e.dataset.checked?(this.fieldTarget.value=!1,delete e.dataset.checked):(this.fieldTarget.value=!0,e.dataset.checked=!0)}};T(Ce,"targets",["field","control"]);var Ke=class extends A{close(){this.element.classList.remove("lui:opacity-100"),this.element.classList.add("lui:opacity-0"),setTimeout(()=>{this.element.classList.add("lui:hidden")},300)}};var Se=class extends A{openSidebar(){this.overlayTarget.dataset.open="",document.body.style.overflow="hidden"}closeSidebar(){delete this.overlayTarget.dataset.open,document.body.style.overflow=""}disconnect(){document.body.style.overflow=""}};T(Se,"targets",["overlay"]);var We=class extends A{openModal(){this.findElement("lui-modal").open()}closeModal(){this.findElement("lui-modal").close()}findElement(s){let e=this.element.dataset.target.replace("#",""),t=document.getElementById(e);return this.application.getControllerForElementAndIdentifier(t,s)}};var ce=class extends A{connect(){this.openFirstValue&&this.openItem(this.itemTargets[0])}toggle(s){s.preventDefault(),this.itemTargets.forEach(e=>{e.contains(s.target)?this.isOpen(e)?this.closeItem(e):this.openItem(e):this.closeItem(e)})}openItem(s){let e=s.querySelector("[data-lui-accordion-target=content]");e.classList.remove("lui:grid-rows-[0fr]"),e.classList.add("lui:grid-rows-[1fr]"),e.classList.remove("lui:opacity-0"),e.classList.add("lui:opacity-100"),s.querySelector("[data-lui-accordion-target=arrow]").classList.add("lui:rotate-180")}closeItem(s){let e=s.querySelector("[data-lui-accordion-target=content]");e.classList.remove("lui:grid-rows-[1fr]"),e.classList.add("lui:grid-rows-[0fr]"),e.classList.remove("lui:opacity-100"),e.classList.add("lui:opacity-0"),s.querySelector("[data-lui-accordion-target=arrow]").classList.remove("lui:rotate-180")}isOpen(s){return s.querySelector("[data-lui-accordion-target=content]").classList.contains("lui:grid-rows-[1fr]")}};T(ce,"targets",["content","item"]),T(ce,"values",{openFirst:{type:Boolean,default:!0}});var he=class extends A{connect(){this.dialogTarget.addEventListener("click",this.onClick.bind(this)),this.openValue&&this.open()}disconnect(){this.dialogTarget.removeEventListener("click",this.onClick.bind(this))}open(){this.dialogTarget.showModal()}close(){this.dialogTarget.setAttribute("closing",""),Promise.all(this.dialogTarget.getAnimations().map(s=>s.finished)).then(()=>{this.dialogTarget.removeAttribute("closing"),this.dialogTarget.close()})}onClick(s){s.target===this.dialogTarget&&this.dialogTarget.close()}closeOnBackdrop(s){this.hasPanelTarget&&!this.panelTarget.contains(s.target)&&this.close()}submitForm(){this.dialogTarget.querySelector("form").requestSubmit()}};T(he,"targets",["dialog","panel"]),T(he,"values",{open:Boolean});var ue=class extends A{connect(){this.initialShowValue||this.itemTargets.forEach(s=>{s.classList.add("hidden")})}toggle(s){s.preventDefault(),this.itemTargets.forEach(e=>{e.classList.toggle("hidden")})}};T(ue,"targets",["item"]),T(ue,"values",{initialShow:Boolean});var Le=class extends A{toggle(s){s.preventDefault();let e=s.target;e.dataset.checked?(this.fieldTarget.value=!1,delete e.dataset.checked):(this.fieldTarget.value=!0,e.dataset.checked=!0)}};T(Le,"targets",["field"]);var _t=class extends A{};_t.debounces=[];var Ht=class extends A{};Ht.throttles=[];var Qi={enterFromClass:"enter",enterActiveClass:"enterStart",enterToClass:"enterEnd",leaveFromClass:"leave",leaveActiveClass:"leaveStart",leaveToClass:"leaveEnd"},Gi={transitioned:!1,hiddenClass:"hidden",preserveOriginalClass:!0,removeToClasses:!0},ze=(s,e={})=>{var t,i,n;let a=s,h=a.element.dataset.transitionTarget,f;h&&(f=a[`${h}Target`]);let p=(e==null?void 0:e.element)||f||a.element;if(!(p instanceof HTMLElement||p instanceof SVGElement))return;let g=p.dataset,b=parseInt(g.leaveAfter||"")||e.leaveAfter||0,{transitioned:m,hiddenClass:w,preserveOriginalClass:v,removeToClasses:x}=Object.assign({},Gi,e),E=(t=a.enter)===null||t===void 0?void 0:t.bind(a),y=(i=a.leave)===null||i===void 0?void 0:i.bind(a),d=(n=a.toggleTransition)===null||n===void 0?void 0:n.bind(a);function u(O){return F(this,null,function*(){if(a.transitioned)return;a.transitioned=!0,E&&E(O);let L=te("enterFrom",e,g),M=te("enterActive",e,g),B=te("enterTo",e,g),$=te("leaveTo",e,g);w&&p.classList.remove(w),x||S(p,$),yield l(p,L,M,B,w,v,x),b>0&&setTimeout(()=>{o(O)},b)})}function o(O){return F(this,null,function*(){if(!a.transitioned)return;a.transitioned=!1,y&&y(O);let L=te("leaveFrom",e,g),M=te("leaveActive",e,g),B=te("leaveTo",e,g),$=te("enterTo",e,g);x||S(p,$),yield l(p,L,M,B,w,v,x),w&&p.classList.add(w)})}function r(O){d&&d(O),a.transitioned?o():u()}function l(O,L,M,B,$,W,V){return F(this,null,function*(){let k=[];W&&(L.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N)),M.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N)),B.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N))),C(O,L),S(O,k),C(O,M),yield en(),S(O,L),C(O,B),yield Zi(O),S(O,M),V&&S(O,B),C(O,k)})}function c(){a.transitioned=m,m?(w&&p.classList.remove(w),u()):(w&&p.classList.add(w),o())}function C(O,L){L.length>0&&O.classList.add(...L)}function S(O,L){L.length>0&&O.classList.remove(...L)}return c(),Object.assign(a,{enter:u,leave:o,toggleTransition:r}),[u,o,r]};function te(s,e,t){let i=`transition${s[0].toUpperCase()}${s.substr(1)}`,n=Qi[s],a=e[s]||t[i]||t[n]||" ";return tn(a)?[]:a.split(" ")}function Zi(s){return F(this,null,function*(){return new Promise(e=>{let t=Number(getComputedStyle(s).transitionDuration.split(",")[0].replace("s",""))*1e3;setTimeout(()=>{e(t)},t)})})}function en(){return F(this,null,function*(){return new Promise(s=>{requestAnimationFrame(()=>{requestAnimationFrame(s)})})})}function tn(s){return s.length===0||!s.trim()}var de=class extends A{connect(){ze(this,{element:this.menuTarget,hiddenClass:"lui:hidden"})}toggle(){this.toggleTransition()}hide(e){!this.element.contains(e.target)&&!this.menuTarget.classList.contains("lui:hidden")&&this.leave()}};T(de,"targets",["menu"]);var Ut=class{constructor(e,t){this.controller=t,this.file=e,this.directUpload=new Ae(e,this.controller.inputTarget.dataset.directUploadUrl,this)}process(){this.insertUpload(),this.directUpload.create((e,t)=>{if(e){let n=this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`).querySelector("[data-lui-dropzone-target='status']");n.textContent="Failed. "+e,n.classList.add("text-red-500")}else{let i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("value",t.signed_id),i.name=this.controller.inputTarget.name,this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`).appendChild(i),this.controller.inputTarget.value=""}})}insertUpload(){let e=this.controller.templateTarget.content.cloneNode(!0);e.querySelector("#\\#NEW_FILE").id=`upload_${this.directUpload.id}`,e.querySelector("[data-lui-dropzone-target='filename']").textContent=this.file.name,e.querySelector("[data-lui-dropzone-target='status']").textContent="Uploading...",this.controller.filesTarget.appendChild(e)}directUploadWillStoreFileWithXHR(e){e.upload.addEventListener("progress",t=>this.updateProgress(t))}updateProgress(e){let t=(e.loaded/e.total*100).toFixed(0),i=t==100?"Uploaded":"Uploading...",n=this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`);n.querySelector("[data-lui-dropzone-target='status']").textContent=i,n.querySelector("[data-lui-dropzone-target='progressbar']").style.width=`${t}%`,n.querySelector("[data-lui-dropzone-target='percentage-progress']").textContent=`${t}%`}},Fe=class extends A{selectFiles(s){this.inputTarget.click()}uploadFiles(s){s.preventDefault(),[...s.dataTransfer?s.dataTransfer.files:s.target.files].forEach(t=>new Ut(t,this).process())}activate(s){s.preventDefault()}removeFile(s){s.preventDefault(),s.target.closest("[data-lui-dropzone-target='file']").remove()}};T(Fe,"targets",["input","template","files"]);var fe=class extends A{connect(){this.autodismissValue&&setTimeout(()=>{this.close()},this.dismissAfterValue),ze(this,{element:this.toastTarget,enterActive:"lui:transition lui:ease-in-out lui:duration-150",enterFrom:"lui:transform lui:opacity-0 lui:scale-95",enterTo:"lui:transform lui:opacity-100 lui:scale-100",leaveActive:"lui:transition lui:ease-in-out lui:duration-150",leaveFrom:"lui:transform lui:opacity-100 lui:scale-100",leaveTo:"lui:transform lui:opacity-0 lui:scale-95",hiddenClass:"lui:hidden",transitioned:!0})}close(){this.leave()}};T(fe,"targets",["toast"]),T(fe,"values",{autodismiss:Boolean,dismissAfter:Number});var X=Math.min,P=Math.max,Ne=Math.round,$e=Math.floor,U=s=>({x:s,y:s}),sn={left:"right",right:"left",bottom:"top",top:"bottom"},nn={start:"end",end:"start"};function Je(s,e,t){return P(s,X(e,t))}function ie(s,e){return typeof s=="function"?s(e):s}function G(s){return s.split("-")[0]}function ne(s){return s.split("-")[1]}function qt(s){return s==="x"?"y":"x"}function Ye(s){return s==="y"?"height":"width"}var rn=new Set(["top","bottom"]);function J(s){return rn.has(G(s))?"y":"x"}function Qe(s){return qt(J(s))}function vs(s,e,t){t===void 0&&(t=!1);let i=ne(s),n=Qe(s),a=Ye(n),h=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(h=Me(h)),[h,Me(h)]}function ys(s){let e=Me(s);return[Xe(s),e,Xe(e)]}function Xe(s){return s.replace(/start|end/g,e=>nn[e])}var ms=["left","right"],bs=["right","left"],on=["top","bottom"],an=["bottom","top"];function ln(s,e,t){switch(s){case"top":case"bottom":return t?e?bs:ms:e?ms:bs;case"left":case"right":return e?on:an;default:return[]}}function ws(s,e,t,i){let n=ne(s),a=ln(G(s),t==="start",i);return n&&(a=a.map(h=>h+"-"+n),e&&(a=a.concat(a.map(Xe)))),a}function Me(s){return s.replace(/left|right|bottom|top/g,e=>sn[e])}function cn(s){return D({top:0,right:0,bottom:0,left:0},s)}function Kt(s){return typeof s!="number"?cn(s):{top:s,right:s,bottom:s,left:s}}function re(s){let{x:e,y:t,width:i,height:n}=s;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function xs(s,e,t){let{reference:i,floating:n}=s,a=J(e),h=Qe(e),f=Ye(h),p=G(e),g=a==="y",b=i.x+i.width/2-n.width/2,m=i.y+i.height/2-n.height/2,w=i[f]/2-n[f]/2,v;switch(p){case"top":v={x:b,y:i.y-n.height};break;case"bottom":v={x:b,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-n.width,y:m};break;default:v={x:i.x,y:i.y}}switch(ne(e)){case"start":v[h]-=w*(t&&g?-1:1);break;case"end":v[h]+=w*(t&&g?-1:1);break}return v}var Es=(s,e,t)=>F(void 0,null,function*(){let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:h}=t,f=a.filter(Boolean),p=yield h.isRTL==null?void 0:h.isRTL(e),g=yield h.getElementRects({reference:s,floating:e,strategy:n}),{x:b,y:m}=xs(g,i,p),w=i,v={},x=0;for(let E=0;E<f.length;E++){let{name:y,fn:d}=f[E],{x:u,y:o,data:r,reset:l}=yield d({x:b,y:m,initialPlacement:i,placement:w,strategy:n,middlewareData:v,rects:g,platform:h,elements:{reference:s,floating:e}});b=u!=null?u:b,m=o!=null?o:m,v=z(D({},v),{[y]:D(D({},v[y]),r)}),l&&x<=50&&(x++,typeof l=="object"&&(l.placement&&(w=l.placement),l.rects&&(g=l.rects===!0?yield h.getElementRects({reference:s,floating:e,strategy:n}):l.rects),{x:b,y:m}=xs(g,w,p)),E=-1)}return{x:b,y:m,placement:w,strategy:n,middlewareData:v}});function Ge(s,e){return F(this,null,function*(){var t;e===void 0&&(e={});let{x:i,y:n,platform:a,rects:h,elements:f,strategy:p}=s,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:m="floating",altBoundary:w=!1,padding:v=0}=ie(e,s),x=Kt(v),y=f[w?m==="floating"?"reference":"floating":m],d=re(yield a.getClippingRect({element:(t=yield a.isElement==null?void 0:a.isElement(y))==null||t?y:y.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)),boundary:g,rootBoundary:b,strategy:p})),u=m==="floating"?{x:i,y:n,width:h.floating.width,height:h.floating.height}:h.reference,o=yield a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating),r=(yield a.isElement==null?void 0:a.isElement(o))?(yield a.getScale==null?void 0:a.getScale(o))||{x:1,y:1}:{x:1,y:1},l=re(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:u,offsetParent:o,strategy:p}):u);return{top:(d.top-l.top+x.top)/r.y,bottom:(l.bottom-d.bottom+x.bottom)/r.y,left:(d.left-l.left+x.left)/r.x,right:(l.right-d.right+x.right)/r.x}})}var Os=s=>({name:"arrow",options:s,fn(t){return F(this,null,function*(){let{x:i,y:n,placement:a,rects:h,platform:f,elements:p,middlewareData:g}=t,{element:b,padding:m=0}=ie(s,t)||{};if(b==null)return{};let w=Kt(m),v={x:i,y:n},x=Qe(a),E=Ye(x),y=yield f.getDimensions(b),d=x==="y",u=d?"top":"left",o=d?"bottom":"right",r=d?"clientHeight":"clientWidth",l=h.reference[E]+h.reference[x]-v[x]-h.floating[E],c=v[x]-h.reference[x],C=yield f.getOffsetParent==null?void 0:f.getOffsetParent(b),S=C?C[r]:0;(!S||!(yield f.isElement==null?void 0:f.isElement(C)))&&(S=p.floating[r]||h.floating[E]);let O=l/2-c/2,L=S/2-y[E]/2-1,M=X(w[u],L),B=X(w[o],L),$=M,W=S-y[E]-B,V=S/2-y[E]/2+O,k=Je($,V,W),N=!g.arrow&&ne(a)!=null&&V!==k&&h.reference[E]/2-(V<$?M:B)-y[E]/2<0,Y=N?V<$?V-$:V-W:0;return{[x]:v[x]+Y,data:D({[x]:k,centerOffset:V-k-Y},N&&{alignmentOffset:Y}),reset:N}})}});var As=function(s){return s===void 0&&(s={}),{name:"flip",options:s,fn(t){return F(this,null,function*(){var i,n;let{placement:a,middlewareData:h,rects:f,initialPlacement:p,platform:g,elements:b}=t,V=ie(s,t),{mainAxis:m=!0,crossAxis:w=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:y=!0}=V,d=Pe(V,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=h.arrow)!=null&&i.alignmentOffset)return{};let u=G(a),o=J(p),r=G(p)===p,l=yield g.isRTL==null?void 0:g.isRTL(b.floating),c=v||(r||!y?[Me(p)]:ys(p)),C=E!=="none";!v&&C&&c.push(...ws(p,y,E,l));let S=[p,...c],O=yield Ge(t,d),L=[],M=((n=h.flip)==null?void 0:n.overflows)||[];if(m&&L.push(O[u]),w){let k=vs(a,f,l);L.push(O[k[0]],O[k[1]])}if(M=[...M,{placement:a,overflows:L}],!L.every(k=>k<=0)){var B,$;let k=(((B=h.flip)==null?void 0:B.index)||0)+1,N=S[k];if(N&&(!(w==="alignment"?o!==J(N):!1)||M.every(H=>J(H.placement)===o?H.overflows[0]>0:!0)))return{data:{index:k,overflows:M},reset:{placement:N}};let Y=($=M.filter(se=>se.overflows[0]<=0).sort((se,H)=>se.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!Y)switch(x){case"bestFit":{var W;let se=(W=M.filter(H=>{if(C){let ee=J(H.placement);return ee===o||ee==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ee=>ee>0).reduce((ee,qs)=>ee+qs,0)]).sort((H,ee)=>H[1]-ee[1])[0])==null?void 0:W[0];se&&(Y=se);break}case"initialPlacement":Y=p;break}if(a!==Y)return{reset:{placement:Y}}}return{}})}}};var hn=new Set(["left","top"]);function un(s,e){return F(this,null,function*(){let{placement:t,platform:i,elements:n}=s,a=yield i.isRTL==null?void 0:i.isRTL(n.floating),h=G(t),f=ne(t),p=J(t)==="y",g=hn.has(h)?-1:1,b=a&&p?-1:1,m=ie(e,s),{mainAxis:w,crossAxis:v,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return f&&typeof x=="number"&&(v=f==="end"?x*-1:x),p?{x:v*b,y:w*g}:{x:w*g,y:v*b}})}var Ts=function(s){return s===void 0&&(s=0),{name:"offset",options:s,fn(t){return F(this,null,function*(){var i,n;let{x:a,y:h,placement:f,middlewareData:p}=t,g=yield un(t,s);return f===((i=p.offset)==null?void 0:i.placement)&&(n=p.arrow)!=null&&n.alignmentOffset?{}:{x:a+g.x,y:h+g.y,data:z(D({},g),{placement:f})}})}}},Cs=function(s){return s===void 0&&(s={}),{name:"shift",options:s,fn(t){return F(this,null,function*(){let{x:i,y:n,placement:a}=t,d=ie(s,t),{mainAxis:h=!0,crossAxis:f=!1,limiter:p={fn:u=>{let{x:o,y:r}=u;return{x:o,y:r}}}}=d,g=Pe(d,["mainAxis","crossAxis","limiter"]),b={x:i,y:n},m=yield Ge(t,g),w=J(G(a)),v=qt(w),x=b[v],E=b[w];if(h){let u=v==="y"?"top":"left",o=v==="y"?"bottom":"right",r=x+m[u],l=x-m[o];x=Je(r,x,l)}if(f){let u=w==="y"?"top":"left",o=w==="y"?"bottom":"right",r=E+m[u],l=E-m[o];E=Je(r,E,l)}let y=p.fn(z(D({},t),{[v]:x,[w]:E}));return z(D({},y),{data:{x:y.x-i,y:y.y-n,enabled:{[v]:h,[w]:f}}})})}}};var Ss=function(s){return s===void 0&&(s={}),{name:"size",options:s,fn(t){return F(this,null,function*(){var i,n;let{placement:a,rects:h,platform:f,elements:p}=t,M=ie(s,t),{apply:g=()=>{}}=M,b=Pe(M,["apply"]),m=yield Ge(t,b),w=G(a),v=ne(a),x=J(a)==="y",{width:E,height:y}=h.floating,d,u;w==="top"||w==="bottom"?(d=w,u=v===((yield f.isRTL==null?void 0:f.isRTL(p.floating))?"start":"end")?"left":"right"):(u=w,d=v==="end"?"top":"bottom");let o=y-m.top-m.bottom,r=E-m.left-m.right,l=X(y-m[d],o),c=X(E-m[u],r),C=!t.middlewareData.shift,S=l,O=c;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&(O=r),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=o),C&&!v){let B=P(m.left,0),$=P(m.right,0),W=P(m.top,0),V=P(m.bottom,0);x?O=E-2*(B!==0||$!==0?B+$:P(m.left,m.right)):S=y-2*(W!==0||V!==0?W+V:P(m.top,m.bottom))}yield g(z(D({},t),{availableWidth:O,availableHeight:S}));let L=yield f.getDimensions(p.floating);return E!==L.width||y!==L.height?{reset:{rects:!0}}:{}})}}};function Ze(){return typeof window!="undefined"}function oe(s){return Fs(s)?(s.nodeName||"").toLowerCase():"#document"}function R(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function q(s){var e;return(e=(Fs(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function Fs(s){return Ze()?s instanceof Node||s instanceof R(s).Node:!1}function j(s){return Ze()?s instanceof Element||s instanceof R(s).Element:!1}function K(s){return Ze()?s instanceof HTMLElement||s instanceof R(s).HTMLElement:!1}function Ls(s){return!Ze()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof R(s).ShadowRoot}var dn=new Set(["inline","contents"]);function ge(s){let{overflow:e,overflowX:t,overflowY:i,display:n}=_(s);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!dn.has(n)}var fn=new Set(["table","td","th"]);function Ms(s){return fn.has(oe(s))}var pn=[":popover-open",":modal"];function ke(s){return pn.some(e=>{try{return s.matches(e)}catch(t){return!1}})}var gn=["transform","translate","scale","rotate","perspective"],mn=["transform","translate","scale","rotate","perspective","filter"],bn=["paint","layout","strict","content"];function et(s){let e=tt(),t=j(s)?_(s):s;return gn.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||mn.some(i=>(t.willChange||"").includes(i))||bn.some(i=>(t.contain||"").includes(i))}function Ns(s){let e=Z(s);for(;K(e)&&!ae(e);){if(et(e))return e;if(ke(e))return null;e=Z(e)}return null}function tt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var vn=new Set(["html","body","#document"]);function ae(s){return vn.has(oe(s))}function _(s){return R(s).getComputedStyle(s)}function Be(s){return j(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function Z(s){if(oe(s)==="html")return s;let e=s.assignedSlot||s.parentNode||Ls(s)&&s.host||q(s);return Ls(e)?e.host:e}function $s(s){let e=Z(s);return ae(e)?s.ownerDocument?s.ownerDocument.body:s.body:K(e)&&ge(e)?e:$s(e)}function pe(s,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);let n=$s(s),a=n===((i=s.ownerDocument)==null?void 0:i.body),h=R(n);if(a){let f=st(h);return e.concat(h,h.visualViewport||[],ge(n)?n:[],f&&t?pe(f):[])}return e.concat(n,pe(n,[],t))}function st(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function Vs(s){let e=_(s),t=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=K(s),a=n?s.offsetWidth:t,h=n?s.offsetHeight:i,f=Ne(t)!==a||Ne(i)!==h;return f&&(t=a,i=h),{width:t,height:i,$:f}}function zt(s){return j(s)?s:s.contextElement}function me(s){let e=zt(s);if(!K(e))return U(1);let t=e.getBoundingClientRect(),{width:i,height:n,$:a}=Vs(e),h=(a?Ne(t.width):t.width)/i,f=(a?Ne(t.height):t.height)/n;return(!h||!Number.isFinite(h))&&(h=1),(!f||!Number.isFinite(f))&&(f=1),{x:h,y:f}}var yn=U(0);function Ps(s){let e=R(s);return!tt()||!e.visualViewport?yn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wn(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==R(s)?!1:e}function le(s,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);let n=s.getBoundingClientRect(),a=zt(s),h=U(1);e&&(i?j(i)&&(h=me(i)):h=me(s));let f=wn(a,t,i)?Ps(a):U(0),p=(n.left+f.x)/h.x,g=(n.top+f.y)/h.y,b=n.width/h.x,m=n.height/h.y;if(a){let w=R(a),v=i&&j(i)?R(i):i,x=w,E=st(x);for(;E&&i&&v!==x;){let y=me(E),d=E.getBoundingClientRect(),u=_(E),o=d.left+(E.clientLeft+parseFloat(u.paddingLeft))*y.x,r=d.top+(E.clientTop+parseFloat(u.paddingTop))*y.y;p*=y.x,g*=y.y,b*=y.x,m*=y.y,p+=o,g+=r,x=R(E),E=st(x)}}return re({width:b,height:m,x:p,y:g})}function it(s,e){let t=Be(s).scrollLeft;return e?e.left+t:le(q(s)).left+t}function Is(s,e){let t=s.getBoundingClientRect(),i=t.left+e.scrollLeft-it(s,t),n=t.top+e.scrollTop;return{x:i,y:n}}function xn(s){let{elements:e,rect:t,offsetParent:i,strategy:n}=s,a=n==="fixed",h=q(i),f=e?ke(e.floating):!1;if(i===h||f&&a)return t;let p={scrollLeft:0,scrollTop:0},g=U(1),b=U(0),m=K(i);if((m||!m&&!a)&&((oe(i)!=="body"||ge(h))&&(p=Be(i)),K(i))){let v=le(i);g=me(i),b.x=v.x+i.clientLeft,b.y=v.y+i.clientTop}let w=h&&!m&&!a?Is(h,p):U(0);return{width:t.width*g.x,height:t.height*g.y,x:t.x*g.x-p.scrollLeft*g.x+b.x+w.x,y:t.y*g.y-p.scrollTop*g.y+b.y+w.y}}function En(s){return Array.from(s.getClientRects())}function On(s){let e=q(s),t=Be(s),i=s.ownerDocument.body,n=P(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=P(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),h=-t.scrollLeft+it(s),f=-t.scrollTop;return _(i).direction==="rtl"&&(h+=P(e.clientWidth,i.clientWidth)-n),{width:n,height:a,x:h,y:f}}var ks=25;function An(s,e){let t=R(s),i=q(s),n=t.visualViewport,a=i.clientWidth,h=i.clientHeight,f=0,p=0;if(n){a=n.width,h=n.height;let b=tt();(!b||b&&e==="fixed")&&(f=n.offsetLeft,p=n.offsetTop)}let g=it(i);if(g<=0){let b=i.ownerDocument,m=b.body,w=getComputedStyle(m),v=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,x=Math.abs(i.clientWidth-m.clientWidth-v);x<=ks&&(a-=x)}else g<=ks&&(a+=g);return{width:a,height:h,x:f,y:p}}var Tn=new Set(["absolute","fixed"]);function Cn(s,e){let t=le(s,!0,e==="fixed"),i=t.top+s.clientTop,n=t.left+s.clientLeft,a=K(s)?me(s):U(1),h=s.clientWidth*a.x,f=s.clientHeight*a.y,p=n*a.x,g=i*a.y;return{width:h,height:f,x:p,y:g}}function Bs(s,e,t){let i;if(e==="viewport")i=An(s,t);else if(e==="document")i=On(q(s));else if(j(e))i=Cn(e,t);else{let n=Ps(s);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return re(i)}function Rs(s,e){let t=Z(s);return t===e||!j(t)||ae(t)?!1:_(t).position==="fixed"||Rs(t,e)}function Sn(s,e){let t=e.get(s);if(t)return t;let i=pe(s,[],!1).filter(f=>j(f)&&oe(f)!=="body"),n=null,a=_(s).position==="fixed",h=a?Z(s):s;for(;j(h)&&!ae(h);){let f=_(h),p=et(h);!p&&f.position==="fixed"&&(n=null),(a?!p&&!n:!p&&f.position==="static"&&!!n&&Tn.has(n.position)||ge(h)&&!p&&Rs(s,h))?i=i.filter(b=>b!==h):n=f,h=Z(h)}return e.set(s,i),i}function Ln(s){let{element:e,boundary:t,rootBoundary:i,strategy:n}=s,h=[...t==="clippingAncestors"?ke(e)?[]:Sn(e,this._c):[].concat(t),i],f=h[0],p=h.reduce((g,b)=>{let m=Bs(e,b,n);return g.top=P(m.top,g.top),g.right=X(m.right,g.right),g.bottom=X(m.bottom,g.bottom),g.left=P(m.left,g.left),g},Bs(e,f,n));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Fn(s){let{width:e,height:t}=Vs(s);return{width:e,height:t}}function Mn(s,e,t){let i=K(e),n=q(e),a=t==="fixed",h=le(s,!0,a,e),f={scrollLeft:0,scrollTop:0},p=U(0);function g(){p.x=it(n)}if(i||!i&&!a)if((oe(e)!=="body"||ge(n))&&(f=Be(e)),i){let v=le(e,!0,a,e);p.x=v.x+e.clientLeft,p.y=v.y+e.clientTop}else n&&g();a&&!i&&n&&g();let b=n&&!i&&!a?Is(n,f):U(0),m=h.left+f.scrollLeft-p.x-b.x,w=h.top+f.scrollTop-p.y-b.y;return{x:m,y:w,width:h.width,height:h.height}}function Wt(s){return _(s).position==="static"}function Ds(s,e){if(!K(s)||_(s).position==="fixed")return null;if(e)return e(s);let t=s.offsetParent;return q(s)===t&&(t=t.ownerDocument.body),t}function js(s,e){let t=R(s);if(ke(s))return t;if(!K(s)){let n=Z(s);for(;n&&!ae(n);){if(j(n)&&!Wt(n))return n;n=Z(n)}return t}let i=Ds(s,e);for(;i&&Ms(i)&&Wt(i);)i=Ds(i,e);return i&&ae(i)&&Wt(i)&&!et(i)?t:i||Ns(s)||t}var Nn=function(s){return F(this,null,function*(){let e=this.getOffsetParent||js,t=this.getDimensions,i=yield t(s.floating);return{reference:Mn(s.reference,yield e(s.floating),s.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};function $n(s){return _(s).direction==="rtl"}var kn={convertOffsetParentRelativeRectToViewportRelativeRect:xn,getDocumentElement:q,getClippingRect:Ln,getOffsetParent:js,getElementRects:Nn,getClientRects:En,getDimensions:Fn,getScale:me,isElement:j,isRTL:$n};function _s(s,e){return s.x===e.x&&s.y===e.y&&s.width===e.width&&s.height===e.height}function Bn(s,e){let t=null,i,n=q(s);function a(){var f;clearTimeout(i),(f=t)==null||f.disconnect(),t=null}function h(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),a();let g=s.getBoundingClientRect(),{left:b,top:m,width:w,height:v}=g;if(f||e(),!w||!v)return;let x=$e(m),E=$e(n.clientWidth-(b+w)),y=$e(n.clientHeight-(m+v)),d=$e(b),o={rootMargin:-x+"px "+-E+"px "+-y+"px "+-d+"px",threshold:P(0,X(1,p))||1},r=!0;function l(c){let C=c[0].intersectionRatio;if(C!==p){if(!r)return h();C?h(!1,C):i=setTimeout(()=>{h(!1,1e-7)},1e3)}C===1&&!_s(g,s.getBoundingClientRect())&&h(),r=!1}try{t=new IntersectionObserver(l,z(D({},o),{root:n.ownerDocument}))}catch(c){t=new IntersectionObserver(l,o)}t.observe(s)}return h(!0),a}function nt(s,e,t,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,g=zt(s),b=n||a?[...g?pe(g):[],...pe(e)]:[];b.forEach(d=>{n&&d.addEventListener("scroll",t,{passive:!0}),a&&d.addEventListener("resize",t)});let m=g&&f?Bn(g,t):null,w=-1,v=null;h&&(v=new ResizeObserver(d=>{let[u]=d;u&&u.target===g&&v&&(v.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var o;(o=v)==null||o.observe(e)})),t()}),g&&!p&&v.observe(g),v.observe(e));let x,E=p?le(s):null;p&&y();function y(){let d=le(s);E&&!_s(E,d)&&t(),E=d,x=requestAnimationFrame(y)}return t(),()=>{var d;b.forEach(u=>{n&&u.removeEventListener("scroll",t),a&&u.removeEventListener("resize",t)}),m==null||m(),(d=v)==null||d.disconnect(),v=null,p&&cancelAnimationFrame(x)}}var rt=Ts;var ot=Cs,at=As,lt=Ss;var Hs=Os;var ct=(s,e,t)=>{let i=new Map,n=D({platform:kn},t),a=z(D({},n.platform),{_c:i});return Es(s,e,z(D({},n),{platform:a}))};var be=class extends A{connect(){this.showTimeout=null,this.hideTimeout=null,this.cleanup=null,this.handleKeydown=this.handleKeydown.bind(this),"ontouchstart"in window&&this.element.addEventListener("click",this.toggle.bind(this))}disconnect(){this.hide(),this.clearTimeouts(),"ontouchstart"in window&&this.element.removeEventListener("click",this.toggle.bind(this))}show(s){!this.activeValue||(this.hideOtherTooltips(),this.clearTimeouts(),this.delayValue>0?this.showTimeout=setTimeout(()=>this.createTooltip(s),this.delayValue):this.createTooltip(s))}hide(){this.clearTimeouts(),this.delayValue>0?this.hideTimeout=setTimeout(()=>this.destroyTooltip(),this.delayValue):this.destroyTooltip()}toggle(s){this.tooltip?this.hide():this.show(s)}createTooltip(s){if(this.tooltip)return;let e=(s==null?void 0:s.currentTarget)||this.element;try{let t=document.createElement("div");t.innerHTML=this.templateTarget.innerHTML,t.style.position="absolute",t.style.zIndex="9999",t.setAttribute("role","tooltip"),t.setAttribute("data-lui-tooltip-instance","true"),document.body.appendChild(t),this.tooltip=t;let i=t.firstElementChild,n=i==null?void 0:i.querySelector("[data-tooltip-arrow]");i&&(this.cleanup=nt(e,i,()=>this.updatePosition(e,i,n)),requestAnimationFrame(()=>{i.style.opacity="1"}),document.addEventListener("keydown",this.handleKeydown))}catch(t){console.warn("Tooltip positioning failed:",t),this.destroyTooltip()}}destroyTooltip(){if(this.cleanup&&(this.cleanup(),this.cleanup=null),this.tooltip){let s=this.tooltip.firstElementChild;s?(s.style.opacity="0",setTimeout(()=>{this.tooltip&&(this.tooltip.remove(),this.tooltip=null)},200)):(this.tooltip.remove(),this.tooltip=null)}document.removeEventListener("keydown",this.handleKeydown)}updatePosition(s,e,t){!e||ct(s,e,{placement:this.positionValue||"bottom",middleware:[rt(this.offsetValue),lt(),at(),ot({padding:5}),...t?[Hs({element:t})]:[]]}).then(({x:i,y:n,placement:a,middlewareData:h})=>{Object.assign(e.style,{left:`${i}px`,top:`${n}px`}),t&&h.arrow&&this.positionArrow(t,a,h.arrow)}).catch(i=>{console.warn("Tooltip positioning update failed:",i)})}positionArrow(s,e,t){let{x:i,y:n}=t,a=e.split("-")[0];Object.assign(s.style,{left:"",top:"",right:"",bottom:""});let h="-4px";switch(a){case"top":Object.assign(s.style,{left:i!=null?`${i}px`:"",bottom:h});break;case"bottom":Object.assign(s.style,{left:i!=null?`${i}px`:"",top:h});break;case"left":Object.assign(s.style,{top:n!=null?`${n}px`:"",right:h});break;case"right":Object.assign(s.style,{top:n!=null?`${n}px`:"",left:h});break}}handleKeydown(s){s.key==="Escape"&&this.tooltip&&this.hide()}hideOtherTooltips(){document.querySelectorAll('[data-lui-tooltip-instance="true"]').forEach(s=>{s!==this.tooltip&&s.remove()})}clearTimeouts(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}};T(be,"targets",["template"]),T(be,"values",{active:Boolean,position:String,delay:{type:Number,default:0},offset:{type:Number,default:8}});var ve=class extends A{constructor(){super(...arguments);T(this,"handleMouseEnter",e=>{e.target.dataset.hover=""});T(this,"handleMouseLeave",e=>{delete e.target.dataset.hover});T(this,"handleWrapperMouseEnter",e=>{e.currentTarget.dataset.hover=""});T(this,"handleWrapperMouseLeave",e=>{delete e.currentTarget.dataset.hover})}connect(){this.isOpen=!1,this.highlightedIndex=-1,this.filteredOptions=[],this.cleanup=null,this.debounceTimer=null,this.originalSelected=this.deepClone(this.selectedValue),this.initializeSelected(),this.setupHoverHandlers(),this.hasUrlValue||(this.filteredOptions=this.optionsValue)}setupHoverHandlers(){this.hasInputTarget&&(this.inputTarget.addEventListener("mouseenter",this.handleMouseEnter),this.inputTarget.addEventListener("mouseleave",this.handleMouseLeave)),this.hasInputWrapperTarget&&(this.inputWrapperTarget.addEventListener("mouseenter",this.handleWrapperMouseEnter),this.inputWrapperTarget.addEventListener("mouseleave",this.handleWrapperMouseLeave))}get isAssociationMode(){return this.hasForeignKeyValue}disconnect(){this.destroyFloating(),this.clearDebounce(),this.cleanupHoverHandlers()}cleanupHoverHandlers(){this.hasInputTarget&&(this.inputTarget.removeEventListener("mouseenter",this.handleMouseEnter),this.inputTarget.removeEventListener("mouseleave",this.handleMouseLeave)),this.hasInputWrapperTarget&&(this.inputWrapperTarget.removeEventListener("mouseenter",this.handleWrapperMouseEnter),this.inputWrapperTarget.removeEventListener("mouseleave",this.handleWrapperMouseLeave))}onInput(e){let t=e.target.value.trim();this.hasUrlValue?(this.clearDebounce(),t.length>=this.minCharsValue?this.debounceTimer=setTimeout(()=>{this.fetchOptions(t)},this.debounceValue):(this.filteredOptions=[],this.renderOptions())):this.filterClientSide(t),this.open(),this.updateCreateOption(t)}onFocus(){(!this.hasUrlValue||this.inputTarget.value.length>=this.minCharsValue)&&(this.hasUrlValue||(this.filteredOptions=this.optionsValue,this.filterClientSide(this.inputTarget.value.trim())),this.open())}onKeydown(e){if(e.ctrlKey){if(e.key==="n"){e.preventDefault(),this.isOpen?this.highlightNext():this.open();return}if(e.key==="p"){e.preventDefault(),this.isOpen?this.highlightPrevious():this.open();return}}switch(e.key){case"ArrowDown":e.preventDefault(),this.isOpen?this.highlightNext():this.open();break;case"ArrowUp":e.preventDefault(),this.isOpen?this.highlightPrevious():this.open();break;case"Enter":e.preventDefault(),this.selectHighlighted();break;case"Escape":this.close(),this.inputTarget.value="";break;case"Backspace":this.multipleValue&&this.inputTarget.value===""&&this.removeLastSelected();break;case"Tab":this.close();break}}clickOutside(e){this.element.contains(e.target)||this.close()}selectOption(e){e.stopPropagation();let t=e.currentTarget;if(t.dataset.disabled==="true")return;let i=t.dataset.value,n=t.dataset.label;this.multipleValue?this.toggleSelection(i,n):(this.setSingleSelection(i,n),this.close())}toggleSelection(e,t,i=!1){let n=this.findSelectedIndex(e);if(n>-1)this.selectedValue=this.selectedValue.filter((a,h)=>h!==n);else if(this.isAssociationMode){let a={value:e};i&&(a.custom=!0),this.selectedValue=[...this.selectedValue,a]}else this.selectedValue=[...this.selectedValue,e];this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions(),this.inputTarget.value="",this.inputTarget.focus()}findSelectedIndex(e){return this.selectedValue.findIndex(t=>{let i=typeof t=="object"?t.value:t;return String(i)===String(e)})}setSingleSelection(e,t){this.selectedValue=[e],this.inputTarget.value=t,this.updateHiddenField(e)}removeLastSelected(){this.selectedValue.length>0&&(this.selectedValue=this.selectedValue.slice(0,-1),this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions())}removeTag(e){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.dataset.value,i=this.findSelectedIndex(t);i>-1&&(this.selectedValue=this.selectedValue.filter((n,a)=>a!==i)),this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions(),this.inputTarget.focus()}createCustomOption(){let e=this.inputTarget.value.trim();e&&this.allowCustomValue&&(this.multipleValue?this.toggleSelection(e,e,!0):this.setSingleSelection(e,e),this.close())}filterClientSide(e){if(!e)this.filteredOptions=this.optionsValue;else{let t=e.toLowerCase();this.filteredOptions=this.optionsValue.filter(i=>i.label.toLowerCase().includes(t))}this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.renderOptions()}fetchOptions(e){return F(this,null,function*(){this.showLoading();try{let t=new URL(this.urlValue,window.location.origin);t.searchParams.set("q",e);let i=yield fetch(t,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(!i.ok)throw new Error("Network error");let n=yield i.json();this.filteredOptions=n,this.highlightedIndex=n.length>0?0:-1,this.renderOptions()}catch(t){console.error("Combobox fetch error:",t),this.filteredOptions=[],this.renderOptions()}finally{this.hideLoading()}})}renderOptions(){let e=this.optionsContainerTarget;if(e.innerHTML="",this.filteredOptions.length===0){this.showNoResults();return}this.hideNoResults(),this.filteredOptions.forEach((t,i)=>{let n=this.optionTemplateTarget.content.cloneNode(!0),a=n.querySelector("[role='option']");a.dataset.value=t.value,a.dataset.label=t.label,a.dataset.index=i,a.querySelector("[data-label]").textContent=t.label,this.isValueSelected(t.value)&&(a.dataset.selected="true",a.setAttribute("aria-selected","true"),a.querySelector("[data-checkmark]").classList.remove("lui:hidden")),i===this.highlightedIndex&&(a.dataset.highlighted="true"),t.disabled&&(a.dataset.disabled="true",a.setAttribute("aria-disabled","true")),e.appendChild(n)})}updateSelectedTags(){if(!this.multipleValue||!this.hasSelectedTagsTarget)return;this.selectedTagsTarget.querySelectorAll("[data-combobox-tag]").forEach(t=>t.remove()),this.selectedValue.forEach(t=>{let i=this.getItemValue(t),n=this.findOptionByValue(i),a=n?n.label:i,h=document.createElement("span");h.setAttribute("data-combobox-tag","true"),h.className="lui:inline-flex lui:items-center lui:gap-1 lui:rounded-md lui:bg-zinc-100 lui:px-2 lui:py-0.5 lui:text-sm lui:text-zinc-700",h.innerHTML=`
|
|
5
|
+
%o`,t,e,i),(n=window.onerror)===null||n===void 0||n.call(window,t,"",0,0,e)}logFormattedMessage(e,t,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}};function Ei(){return new Promise(s=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>s()):s()})}function Oi(s){return Ee(s,"classes").reduce((t,i)=>Object.assign(t,Ai(i)),{})}function Ai(s){return{[`${s}Class`]:{get(){let{classes:e}=this;if(e.has(s))return e.get(s);{let t=e.getAttributeName(s);throw new Error(`Missing attribute "${t}"`)}}},[`${s}Classes`]:{get(){return this.classes.getAll(s)}},[`has${xe(s)}Class`]:{get(){return this.classes.has(s)}}}}function Ti(s){return Ee(s,"outlets").reduce((t,i)=>Object.assign(t,Ci(i)),{})}function es(s,e,t){return s.application.getControllerForElementAndIdentifier(e,t)}function ts(s,e,t){let i=es(s,e,t);if(i||(s.application.router.proposeToConnectScopeForElementAndIdentifier(e,t),i=es(s,e,t),i))return i}function Ci(s){let e=ft(s);return{[`${e}Outlet`]:{get(){let t=this.outlets.find(s),i=this.outlets.getSelectorForOutletName(s);if(t){let n=ts(this,t,s);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}Outlets`]:{get(){let t=this.outlets.findAll(s);return t.length>0?t.map(i=>{let n=ts(this,i,s);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${s}" instance for host controller "${this.identifier}"`,i)}).filter(i=>i):[]}},[`${e}OutletElement`]:{get(){let t=this.outlets.find(s),i=this.outlets.getSelectorForOutletName(s);if(t)return t;throw new Error(`Missing outlet element "${s}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(s)}},[`has${xe(e)}Outlet`]:{get(){return this.outlets.has(s)}}}}function Si(s){return Ee(s,"targets").reduce((t,i)=>Object.assign(t,Li(i)),{})}function Li(s){return{[`${s}Target`]:{get(){let e=this.targets.find(s);if(e)return e;throw new Error(`Missing target element "${s}" for "${this.identifier}" controller`)}},[`${s}Targets`]:{get(){return this.targets.findAll(s)}},[`has${xe(s)}Target`]:{get(){return this.targets.has(s)}}}}function Fi(s){let e=hi(s,"values"),t={valueDescriptorMap:{get(){return e.reduce((i,n)=>{let a=ls(n,this.identifier),h=this.data.getAttributeNameForKey(a.key);return Object.assign(i,{[h]:a})},{})}}};return e.reduce((i,n)=>Object.assign(i,Mi(n)),t)}function Mi(s,e){let t=ls(s,e),{key:i,name:n,reader:a,writer:h}=t;return{[n]:{get(){let f=this.data.get(i);return f!==null?a(f):t.defaultValue},set(f){f===void 0?this.data.delete(i):this.data.set(i,h(f))}},[`has${xe(n)}`]:{get(){return this.data.has(i)||t.hasCustomDefaultValue}}}}function ls([s,e],t){return Bi({controller:t,token:s,typeDefinition:e})}function qe(s){switch(s){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function we(s){switch(typeof s){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(s))return"array";if(Object.prototype.toString.call(s)==="[object Object]")return"object"}function Ni(s){let{controller:e,token:t,typeObject:i}=s,n=Yt(i.type),a=Yt(i.default),h=n&&a,f=n&&!a,p=!n&&a,g=qe(i.type),b=we(s.typeObject.default);if(f)return g;if(p)return b;if(g!==b){let m=e?`${e}.${t}`:t;throw new Error(`The specified default value for the Stimulus Value "${m}" must match the defined type "${g}". The provided default value of "${i.default}" is of type "${b}".`)}if(h)return g}function $i(s){let{controller:e,token:t,typeDefinition:i}=s,a=Ni({controller:e,token:t,typeObject:i}),h=we(i),f=qe(i),p=a||h||f;if(p)return p;let g=e?`${e}.${i}`:t;throw new Error(`Unknown value type "${g}" for "${t}" value`)}function ki(s){let e=qe(s);if(e)return ss[e];let t=pt(s,"default"),i=pt(s,"type"),n=s;if(t)return n.default;if(i){let{type:a}=n,h=qe(a);if(h)return ss[h]}return s}function Bi(s){let{token:e,typeDefinition:t}=s,i=`${rs(e)}-value`,n=$i(s);return{type:n,key:i,name:kt(i),get defaultValue(){return ki(t)},get hasCustomDefaultValue(){return we(t)!==void 0},reader:Di[n],writer:is[n]||is.default}}var ss={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Di={array(s){let e=JSON.parse(s);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${s}" of type "${we(e)}"`);return e},boolean(s){return!(s=="0"||String(s).toLowerCase()=="false")},number(s){return Number(s.replace(/_/g,""))},object(s){let e=JSON.parse(s);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${s}" of type "${we(e)}"`);return e},string(s){return s}},is={default:Vi,array:ns,object:ns};function ns(s){return JSON.stringify(s)}function Vi(s){return`${s}`}var A=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:i={},prefix:n=this.identifier,bubbles:a=!0,cancelable:h=!0}={}){let f=n?`${n}:${e}`:e,p=new CustomEvent(f,{detail:i,bubbles:a,cancelable:h});return t.dispatchEvent(p),p}};A.blessings=[Oi,Si,Fi,Ti];A.targets=[];A.outlets=[];A.values={};var us={exports:{}};(function(s,e){(function(t){s.exports=t()})(function(t){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(d,u){var o=d[0],r=d[1],l=d[2],c=d[3];o+=(r&l|~r&c)+u[0]-680876936|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[1]-389564586|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[2]+606105819|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[3]-1044525330|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[4]-176418897|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[5]+1200080426|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[6]-1473231341|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[7]-45705983|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[8]+1770035416|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[9]-1958414417|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[10]-42063|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[11]-1990404162|0,r=(r<<22|r>>>10)+l|0,o+=(r&l|~r&c)+u[12]+1804603682|0,o=(o<<7|o>>>25)+r|0,c+=(o&r|~o&l)+u[13]-40341101|0,c=(c<<12|c>>>20)+o|0,l+=(c&o|~c&r)+u[14]-1502002290|0,l=(l<<17|l>>>15)+c|0,r+=(l&c|~l&o)+u[15]+1236535329|0,r=(r<<22|r>>>10)+l|0,o+=(r&c|l&~c)+u[1]-165796510|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[6]-1069501632|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[11]+643717713|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[0]-373897302|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[5]-701558691|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[10]+38016083|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[15]-660478335|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[4]-405537848|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[9]+568446438|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[14]-1019803690|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[3]-187363961|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[8]+1163531501|0,r=(r<<20|r>>>12)+l|0,o+=(r&c|l&~c)+u[13]-1444681467|0,o=(o<<5|o>>>27)+r|0,c+=(o&l|r&~l)+u[2]-51403784|0,c=(c<<9|c>>>23)+o|0,l+=(c&r|o&~r)+u[7]+1735328473|0,l=(l<<14|l>>>18)+c|0,r+=(l&o|c&~o)+u[12]-1926607734|0,r=(r<<20|r>>>12)+l|0,o+=(r^l^c)+u[5]-378558|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[8]-2022574463|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[11]+1839030562|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[14]-35309556|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[1]-1530992060|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[4]+1272893353|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[7]-155497632|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[10]-1094730640|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[13]+681279174|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[0]-358537222|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[3]-722521979|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[6]+76029189|0,r=(r<<23|r>>>9)+l|0,o+=(r^l^c)+u[9]-640364487|0,o=(o<<4|o>>>28)+r|0,c+=(o^r^l)+u[12]-421815835|0,c=(c<<11|c>>>21)+o|0,l+=(c^o^r)+u[15]+530742520|0,l=(l<<16|l>>>16)+c|0,r+=(l^c^o)+u[2]-995338651|0,r=(r<<23|r>>>9)+l|0,o+=(l^(r|~c))+u[0]-198630844|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[7]+1126891415|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[14]-1416354905|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[5]-57434055|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[12]+1700485571|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[3]-1894986606|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[10]-1051523|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[1]-2054922799|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[8]+1873313359|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[15]-30611744|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[6]-1560198380|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[13]+1309151649|0,r=(r<<21|r>>>11)+l|0,o+=(l^(r|~c))+u[4]-145523070|0,o=(o<<6|o>>>26)+r|0,c+=(r^(o|~l))+u[11]-1120210379|0,c=(c<<10|c>>>22)+o|0,l+=(o^(c|~r))+u[2]+718787259|0,l=(l<<15|l>>>17)+c|0,r+=(c^(l|~o))+u[9]-343485551|0,r=(r<<21|r>>>11)+l|0,d[0]=o+d[0]|0,d[1]=r+d[1]|0,d[2]=l+d[2]|0,d[3]=c+d[3]|0}function a(d){var u=[],o;for(o=0;o<64;o+=4)u[o>>2]=d.charCodeAt(o)+(d.charCodeAt(o+1)<<8)+(d.charCodeAt(o+2)<<16)+(d.charCodeAt(o+3)<<24);return u}function h(d){var u=[],o;for(o=0;o<64;o+=4)u[o>>2]=d[o]+(d[o+1]<<8)+(d[o+2]<<16)+(d[o+3]<<24);return u}function f(d){var u=d.length,o=[1732584193,-271733879,-1732584194,271733878],r,l,c,C,S,O;for(r=64;r<=u;r+=64)n(o,a(d.substring(r-64,r)));for(d=d.substring(r-64),l=d.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<l;r+=1)c[r>>2]|=d.charCodeAt(r)<<(r%4<<3);if(c[r>>2]|=128<<(r%4<<3),r>55)for(n(o,c),r=0;r<16;r+=1)c[r]=0;return C=u*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),O=parseInt(C[1],16)||0,c[14]=S,c[15]=O,n(o,c),o}function p(d){var u=d.length,o=[1732584193,-271733879,-1732584194,271733878],r,l,c,C,S,O;for(r=64;r<=u;r+=64)n(o,h(d.subarray(r-64,r)));for(d=r-64<u?d.subarray(r-64):new Uint8Array(0),l=d.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<l;r+=1)c[r>>2]|=d[r]<<(r%4<<3);if(c[r>>2]|=128<<(r%4<<3),r>55)for(n(o,c),r=0;r<16;r+=1)c[r]=0;return C=u*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),O=parseInt(C[1],16)||0,c[14]=S,c[15]=O,n(o,c),o}function g(d){var u="",o;for(o=0;o<4;o+=1)u+=i[d>>o*8+4&15]+i[d>>o*8&15];return u}function b(d){var u;for(u=0;u<d.length;u+=1)d[u]=g(d[u]);return d.join("")}b(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function d(u,o){return u=u|0||0,u<0?Math.max(u+o,0):Math.min(u,o)}ArrayBuffer.prototype.slice=function(u,o){var r=this.byteLength,l=d(u,r),c=r,C,S,O,L;return o!==t&&(c=d(o,r)),l>c?new ArrayBuffer(0):(C=c-l,S=new ArrayBuffer(C),O=new Uint8Array(S),L=new Uint8Array(this,l,C),O.set(L),S)}}();function m(d){return/[\u0080-\uFFFF]/.test(d)&&(d=unescape(encodeURIComponent(d))),d}function w(d,u){var o=d.length,r=new ArrayBuffer(o),l=new Uint8Array(r),c;for(c=0;c<o;c+=1)l[c]=d.charCodeAt(c);return u?l:r}function v(d){return String.fromCharCode.apply(null,new Uint8Array(d))}function x(d,u,o){var r=new Uint8Array(d.byteLength+u.byteLength);return r.set(new Uint8Array(d)),r.set(new Uint8Array(u),d.byteLength),o?r:r.buffer}function E(d){var u=[],o=d.length,r;for(r=0;r<o-1;r+=2)u.push(parseInt(d.substr(r,2),16));return String.fromCharCode.apply(String,u)}function y(){this.reset()}return y.prototype.append=function(d){return this.appendBinary(m(d)),this},y.prototype.appendBinary=function(d){this._buff+=d,this._length+=d.length;var u=this._buff.length,o;for(o=64;o<=u;o+=64)n(this._hash,a(this._buff.substring(o-64,o)));return this._buff=this._buff.substring(o-64),this},y.prototype.end=function(d){var u=this._buff,o=u.length,r,l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c;for(r=0;r<o;r+=1)l[r>>2]|=u.charCodeAt(r)<<(r%4<<3);return this._finish(l,o),c=b(this._hash),d&&(c=E(c)),this.reset(),c},y.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},y.prototype.setState=function(d){return this._buff=d.buff,this._length=d.length,this._hash=d.hash,this},y.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},y.prototype._finish=function(d,u){var o=u,r,l,c;if(d[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,d),o=0;o<16;o+=1)d[o]=0;r=this._length*8,r=r.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(r[2],16),c=parseInt(r[1],16)||0,d[14]=l,d[15]=c,n(this._hash,d)},y.hash=function(d,u){return y.hashBinary(m(d),u)},y.hashBinary=function(d,u){var o=f(d),r=b(o);return u?E(r):r},y.ArrayBuffer=function(){this.reset()},y.ArrayBuffer.prototype.append=function(d){var u=x(this._buff.buffer,d,!0),o=u.length,r;for(this._length+=d.byteLength,r=64;r<=o;r+=64)n(this._hash,h(u.subarray(r-64,r)));return this._buff=r-64<o?new Uint8Array(u.buffer.slice(r-64)):new Uint8Array(0),this},y.ArrayBuffer.prototype.end=function(d){var u=this._buff,o=u.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l,c;for(l=0;l<o;l+=1)r[l>>2]|=u[l]<<(l%4<<3);return this._finish(r,o),c=b(this._hash),d&&(c=E(c)),this.reset(),c},y.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},y.ArrayBuffer.prototype.getState=function(){var d=y.prototype.getState.call(this);return d.buff=v(d.buff),d},y.ArrayBuffer.prototype.setState=function(d){return d.buff=w(d.buff,!0),y.prototype.setState.call(this,d)},y.ArrayBuffer.prototype.destroy=y.prototype.destroy,y.ArrayBuffer.prototype._finish=y.prototype._finish,y.ArrayBuffer.hash=function(d,u){var o=p(new Uint8Array(d)),r=b(o);return u?E(r):r},y})})(us);var Pi=us.exports,Ii=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,Oe=class{static create(e,t){new Oe(e).create(t)}constructor(e){this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}create(e){this.callback=e,this.md5Buffer=new Pi.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",t=>this.fileReaderDidLoad(t)),this.fileReader.addEventListener("error",t=>this.fileReaderDidError(t)),this.readNextChunk()}fileReaderDidLoad(e){if(this.md5Buffer.append(e.target.result),!this.readNextChunk()){let t=this.md5Buffer.end(!0),i=btoa(t);this.callback(null,i)}}fileReaderDidError(e){this.callback(`Error reading ${this.file.name}`)}readNextChunk(){if(this.chunkIndex<this.chunkCount||this.chunkIndex==0&&this.chunkCount==0){let e=this.chunkIndex*this.chunkSize,t=Math.min(e+this.chunkSize,this.file.size),i=Ii.call(this.file,e,t);return this.fileReader.readAsArrayBuffer(i),this.chunkIndex++,!0}else return!1}};function Ri(s){let e=ds(document.head,`meta[name="${s}"]`);if(e)return e.getAttribute("content")}function ji(s,e){typeof s=="string"&&(e=s,s=document);let t=s.querySelectorAll(e);return ps(t)}function ds(s,e){return typeof s=="string"&&(e=s,s=document),s.querySelector(e)}function fs(s,e,t={}){let{disabled:i}=s,{bubbles:n,cancelable:a,detail:h}=t,f=document.createEvent("Event");f.initEvent(e,n||!0,a||!0),f.detail=h||{};try{s.disabled=!1,s.dispatchEvent(f)}finally{s.disabled=i}return f}function ps(s){return Array.isArray(s)?s:Array.from?Array.from(s):[].slice.call(s)}var Dt=class{constructor(e,t,i,n={}){this.file=e,this.attributes={filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:t},this.xhr=new XMLHttpRequest,this.xhr.open("POST",i,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(n).forEach(h=>{this.xhr.setRequestHeader(h,n[h])});let a=Ri("csrf-token");a!=null&&this.xhr.setRequestHeader("X-CSRF-Token",a),this.xhr.addEventListener("load",h=>this.requestDidLoad(h)),this.xhr.addEventListener("error",h=>this.requestDidError(h))}get status(){return this.xhr.status}get response(){let{responseType:e,response:t}=this.xhr;return e=="json"?t:JSON.parse(t)}create(e){this.callback=e,this.xhr.send(JSON.stringify({blob:this.attributes}))}requestDidLoad(e){if(this.status>=200&&this.status<300){let{response:t}=this,{direct_upload:i}=t;delete t.direct_upload,this.attributes=t,this.directUploadData=i,this.callback(null,this.toJSON())}else this.requestDidError(e)}requestDidError(e){this.callback(`Error creating Blob for "${this.file.name}". Status: ${this.status}`)}toJSON(){let e={};for(let t in this.attributes)e[t]=this.attributes[t];return e}},Vt=class{constructor(e){this.blob=e,this.file=e.file;let{url:t,headers:i}=e.directUploadData;this.xhr=new XMLHttpRequest,this.xhr.open("PUT",t,!0),this.xhr.responseType="text";for(let n in i)this.xhr.setRequestHeader(n,i[n]);this.xhr.addEventListener("load",n=>this.requestDidLoad(n)),this.xhr.addEventListener("error",n=>this.requestDidError(n))}create(e){this.callback=e,this.xhr.send(this.file.slice())}requestDidLoad(e){let{status:t,response:i}=this.xhr;t>=200&&t<300?this.callback(null,i):this.requestDidError(e)}requestDidError(e){this.callback(`Error storing "${this.file.name}". Status: ${this.xhr.status}`)}},_i=0,Ae=class{constructor(e,t,i,n={}){this.id=++_i,this.file=e,this.url=t,this.delegate=i,this.customHeaders=n}create(e){Oe.create(this.file,(t,i)=>{if(t){e(t);return}let n=new Dt(this.file,i,this.url,this.customHeaders);cs(this.delegate,"directUploadWillCreateBlobWithXHR",n.xhr),n.create(a=>{if(a)e(a);else{let h=new Vt(n);cs(this.delegate,"directUploadWillStoreFileWithXHR",h.xhr),h.create(f=>{f?e(f):e(null,n.toJSON())})}})})}};function cs(s,e,...t){if(s&&typeof s[e]=="function")return s[e](...t)}var Pt=class{constructor(e,t){this.input=e,this.file=t,this.directUpload=new Ae(this.file,this.url,this),this.dispatch("initialize")}start(e){let t=document.createElement("input");t.type="hidden",t.name=this.input.name,this.input.insertAdjacentElement("beforebegin",t),this.dispatch("start"),this.directUpload.create((i,n)=>{i?(t.parentNode.removeChild(t),this.dispatchError(i)):t.value=n.signed_id,this.dispatch("end"),e(i)})}uploadRequestDidProgress(e){let t=e.loaded/e.total*100;t&&this.dispatch("progress",{progress:t})}get url(){return this.input.getAttribute("data-direct-upload-url")}dispatch(e,t={}){return t.file=this.file,t.id=this.directUpload.id,fs(this.input,`direct-upload:${e}`,{detail:t})}dispatchError(e){this.dispatch("error",{error:e}).defaultPrevented||alert(e)}directUploadWillCreateBlobWithXHR(e){this.dispatch("before-blob-request",{xhr:e})}directUploadWillStoreFileWithXHR(e){this.dispatch("before-storage-request",{xhr:e}),e.upload.addEventListener("progress",t=>this.uploadRequestDidProgress(t))}},Hi="input[type=file][data-direct-upload-url]:not([disabled])",It=class{constructor(e){this.form=e,this.inputs=ji(e,Hi).filter(t=>t.files.length)}start(e){let t=this.createDirectUploadControllers(),i=()=>{let n=t.shift();n?n.start(a=>{a?(e(a),this.dispatch("end")):i()}):(e(),this.dispatch("end"))};this.dispatch("start"),i()}createDirectUploadControllers(){let e=[];return this.inputs.forEach(t=>{ps(t.files).forEach(i=>{let n=new Pt(t,i);e.push(n)})}),e}dispatch(e,t={}){return fs(this.form,`direct-uploads:${e}`,{detail:t})}},Bt="data-direct-uploads-processing",Rt=new WeakMap,hs=!1;function jt(){hs||(hs=!0,document.addEventListener("click",Ui,!0),document.addEventListener("submit",qi,!0),document.addEventListener("ajax:before",Ki))}function Ui(s){let e=s.target.closest("button, input");e&&e.type==="submit"&&e.form&&Rt.set(e.form,e)}function qi(s){gs(s)}function Ki(s){s.target.tagName=="FORM"&&gs(s)}function gs(s){let e=s.target;if(e.hasAttribute(Bt)){s.preventDefault();return}let t=new It(e),{inputs:i}=t;i.length&&(s.preventDefault(),e.setAttribute(Bt,""),i.forEach(zi),t.start(n=>{e.removeAttribute(Bt),n?i.forEach(Xi):Wi(e)}))}function Wi(s){let e=Rt.get(s)||ds(s,"input[type=submit], button[type=submit]");if(e){let{disabled:t}=e;e.disabled=!1,e.focus(),e.click(),e.disabled=t}else e=document.createElement("input"),e.type="submit",e.style.display="none",s.appendChild(e),e.click(),s.removeChild(e);Rt.delete(s)}function zi(s){s.disabled=!0}function Xi(s){s.disabled=!1}function Ji(){window.ActiveStorage&&jt()}setTimeout(Ji,1);var Te=class extends A{connect(){this.hasInputTarget&&(this.inputTarget.disabled=!0)}copy(s){if(s.preventDefault(),!this.hasInputTarget)return;let e=this.inputTarget.innerHTML||this.inputTarget.value;navigator.clipboard.writeText(e)}};T(Te,"targets",["input"]);var Ce=class extends A{toggle(s){s.preventDefault();let e=this.controlTarget;e.dataset.checked?(this.fieldTarget.value=!1,delete e.dataset.checked):(this.fieldTarget.value=!0,e.dataset.checked=!0)}};T(Ce,"targets",["field","control"]);var Ke=class extends A{close(){this.element.classList.remove("lui:opacity-100"),this.element.classList.add("lui:opacity-0"),setTimeout(()=>{this.element.classList.add("lui:hidden")},300)}};var Se=class extends A{openSidebar(){this.overlayTarget.dataset.open="",document.body.style.overflow="hidden"}closeSidebar(){delete this.overlayTarget.dataset.open,document.body.style.overflow=""}disconnect(){document.body.style.overflow=""}};T(Se,"targets",["overlay"]);var We=class extends A{openModal(){this.findElement("lui-modal").open()}closeModal(){this.findElement("lui-modal").close()}findElement(s){let e=this.element.dataset.target.replace("#",""),t=document.getElementById(e);return this.application.getControllerForElementAndIdentifier(t,s)}};var ce=class extends A{connect(){this.openFirstValue&&this.openItem(this.itemTargets[0])}toggle(s){s.preventDefault(),this.itemTargets.forEach(e=>{e.contains(s.target)?this.isOpen(e)?this.closeItem(e):this.openItem(e):this.closeItem(e)})}openItem(s){let e=s.querySelector("[data-lui-accordion-target=content]");e.classList.remove("lui:grid-rows-[0fr]"),e.classList.add("lui:grid-rows-[1fr]"),e.classList.remove("lui:opacity-0"),e.classList.add("lui:opacity-100"),s.querySelector("[data-lui-accordion-target=arrow]").classList.add("lui:rotate-180")}closeItem(s){let e=s.querySelector("[data-lui-accordion-target=content]");e.classList.remove("lui:grid-rows-[1fr]"),e.classList.add("lui:grid-rows-[0fr]"),e.classList.remove("lui:opacity-100"),e.classList.add("lui:opacity-0"),s.querySelector("[data-lui-accordion-target=arrow]").classList.remove("lui:rotate-180")}isOpen(s){return s.querySelector("[data-lui-accordion-target=content]").classList.contains("lui:grid-rows-[1fr]")}};T(ce,"targets",["content","item"]),T(ce,"values",{openFirst:{type:Boolean,default:!0}});var he=class extends A{connect(){this.dialogTarget.addEventListener("click",this.onClick.bind(this)),this.openValue&&this.open()}disconnect(){this.dialogTarget.removeEventListener("click",this.onClick.bind(this))}open(){this.dialogTarget.showModal()}close(){this.dialogTarget.setAttribute("closing",""),Promise.all(this.dialogTarget.getAnimations().map(s=>s.finished)).then(()=>{this.dialogTarget.removeAttribute("closing"),this.dialogTarget.close()})}onClick(s){s.target===this.dialogTarget&&this.dialogTarget.close()}closeOnBackdrop(s){this.hasPanelTarget&&!this.panelTarget.contains(s.target)&&this.close()}submitForm(){this.dialogTarget.querySelector("form").requestSubmit()}};T(he,"targets",["dialog","panel"]),T(he,"values",{open:Boolean});var ue=class extends A{connect(){this.initialShowValue||this.itemTargets.forEach(s=>{s.classList.add("hidden")})}toggle(s){s.preventDefault(),this.itemTargets.forEach(e=>{e.classList.toggle("hidden")})}};T(ue,"targets",["item"]),T(ue,"values",{initialShow:Boolean});var Le=class extends A{toggle(s){s.preventDefault();let e=s.currentTarget;e.dataset.checked?(this.fieldTarget.value=!1,delete e.dataset.checked):(this.fieldTarget.value=!0,e.dataset.checked=!0)}};T(Le,"targets",["field"]);var _t=class extends A{};_t.debounces=[];var Ht=class extends A{};Ht.throttles=[];var Qi={enterFromClass:"enter",enterActiveClass:"enterStart",enterToClass:"enterEnd",leaveFromClass:"leave",leaveActiveClass:"leaveStart",leaveToClass:"leaveEnd"},Gi={transitioned:!1,hiddenClass:"hidden",preserveOriginalClass:!0,removeToClasses:!0},ze=(s,e={})=>{var t,i,n;let a=s,h=a.element.dataset.transitionTarget,f;h&&(f=a[`${h}Target`]);let p=(e==null?void 0:e.element)||f||a.element;if(!(p instanceof HTMLElement||p instanceof SVGElement))return;let g=p.dataset,b=parseInt(g.leaveAfter||"")||e.leaveAfter||0,{transitioned:m,hiddenClass:w,preserveOriginalClass:v,removeToClasses:x}=Object.assign({},Gi,e),E=(t=a.enter)===null||t===void 0?void 0:t.bind(a),y=(i=a.leave)===null||i===void 0?void 0:i.bind(a),d=(n=a.toggleTransition)===null||n===void 0?void 0:n.bind(a);function u(O){return F(this,null,function*(){if(a.transitioned)return;a.transitioned=!0,E&&E(O);let L=te("enterFrom",e,g),M=te("enterActive",e,g),B=te("enterTo",e,g),$=te("leaveTo",e,g);w&&p.classList.remove(w),x||S(p,$),yield l(p,L,M,B,w,v,x),b>0&&setTimeout(()=>{o(O)},b)})}function o(O){return F(this,null,function*(){if(!a.transitioned)return;a.transitioned=!1,y&&y(O);let L=te("leaveFrom",e,g),M=te("leaveActive",e,g),B=te("leaveTo",e,g),$=te("enterTo",e,g);x||S(p,$),yield l(p,L,M,B,w,v,x),w&&p.classList.add(w)})}function r(O){d&&d(O),a.transitioned?o():u()}function l(O,L,M,B,$,W,V){return F(this,null,function*(){let k=[];W&&(L.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N)),M.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N)),B.forEach(N=>O.classList.contains(N)&&N!==$&&k.push(N))),C(O,L),S(O,k),C(O,M),yield en(),S(O,L),C(O,B),yield Zi(O),S(O,M),V&&S(O,B),C(O,k)})}function c(){a.transitioned=m,m?(w&&p.classList.remove(w),u()):(w&&p.classList.add(w),o())}function C(O,L){L.length>0&&O.classList.add(...L)}function S(O,L){L.length>0&&O.classList.remove(...L)}return c(),Object.assign(a,{enter:u,leave:o,toggleTransition:r}),[u,o,r]};function te(s,e,t){let i=`transition${s[0].toUpperCase()}${s.substr(1)}`,n=Qi[s],a=e[s]||t[i]||t[n]||" ";return tn(a)?[]:a.split(" ")}function Zi(s){return F(this,null,function*(){return new Promise(e=>{let t=Number(getComputedStyle(s).transitionDuration.split(",")[0].replace("s",""))*1e3;setTimeout(()=>{e(t)},t)})})}function en(){return F(this,null,function*(){return new Promise(s=>{requestAnimationFrame(()=>{requestAnimationFrame(s)})})})}function tn(s){return s.length===0||!s.trim()}var de=class extends A{connect(){ze(this,{element:this.menuTarget,hiddenClass:"lui:hidden"})}toggle(){this.toggleTransition()}hide(e){!this.element.contains(e.target)&&!this.menuTarget.classList.contains("lui:hidden")&&this.leave()}};T(de,"targets",["menu"]);var Ut=class{constructor(e,t){this.controller=t,this.file=e,this.directUpload=new Ae(e,this.controller.inputTarget.dataset.directUploadUrl,this)}process(){this.insertUpload(),this.directUpload.create((e,t)=>{if(e){let n=this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`).querySelector("[data-lui-dropzone-target='status']");n.textContent="Failed. "+e,n.classList.add("text-destructive-text")}else{let i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("value",t.signed_id),i.name=this.controller.inputTarget.name,this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`).appendChild(i),this.controller.inputTarget.value=""}})}insertUpload(){let e=this.controller.templateTarget.content.cloneNode(!0);e.querySelector("#\\#NEW_FILE").id=`upload_${this.directUpload.id}`,e.querySelector("[data-lui-dropzone-target='filename']").textContent=this.file.name,e.querySelector("[data-lui-dropzone-target='status']").textContent="Uploading...",this.controller.filesTarget.appendChild(e)}directUploadWillStoreFileWithXHR(e){e.upload.addEventListener("progress",t=>this.updateProgress(t))}updateProgress(e){let t=(e.loaded/e.total*100).toFixed(0),i=t==100?"Uploaded":"Uploading...",n=this.controller.filesTarget.querySelector(`#upload_${this.directUpload.id}`);n.querySelector("[data-lui-dropzone-target='status']").textContent=i,n.querySelector("[data-lui-dropzone-target='progressbar']").style.width=`${t}%`,n.querySelector("[data-lui-dropzone-target='percentage-progress']").textContent=`${t}%`}},Fe=class extends A{selectFiles(s){this.inputTarget.click()}uploadFiles(s){s.preventDefault(),[...s.dataTransfer?s.dataTransfer.files:s.target.files].forEach(t=>new Ut(t,this).process())}activate(s){s.preventDefault()}removeFile(s){s.preventDefault(),s.target.closest("[data-lui-dropzone-target='file']").remove()}};T(Fe,"targets",["input","template","files"]);var fe=class extends A{connect(){this.autodismissValue&&setTimeout(()=>{this.close()},this.dismissAfterValue),ze(this,{element:this.toastTarget,enterActive:"lui:transition lui:ease-in-out lui:duration-150",enterFrom:"lui:transform lui:opacity-0 lui:scale-95",enterTo:"lui:transform lui:opacity-100 lui:scale-100",leaveActive:"lui:transition lui:ease-in-out lui:duration-150",leaveFrom:"lui:transform lui:opacity-100 lui:scale-100",leaveTo:"lui:transform lui:opacity-0 lui:scale-95",hiddenClass:"lui:hidden",transitioned:!0})}close(){this.leave()}};T(fe,"targets",["toast"]),T(fe,"values",{autodismiss:Boolean,dismissAfter:Number});var X=Math.min,P=Math.max,Ne=Math.round,$e=Math.floor,U=s=>({x:s,y:s}),sn={left:"right",right:"left",bottom:"top",top:"bottom"},nn={start:"end",end:"start"};function Je(s,e,t){return P(s,X(e,t))}function ie(s,e){return typeof s=="function"?s(e):s}function G(s){return s.split("-")[0]}function ne(s){return s.split("-")[1]}function qt(s){return s==="x"?"y":"x"}function Ye(s){return s==="y"?"height":"width"}var rn=new Set(["top","bottom"]);function J(s){return rn.has(G(s))?"y":"x"}function Qe(s){return qt(J(s))}function vs(s,e,t){t===void 0&&(t=!1);let i=ne(s),n=Qe(s),a=Ye(n),h=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(h=Me(h)),[h,Me(h)]}function ys(s){let e=Me(s);return[Xe(s),e,Xe(e)]}function Xe(s){return s.replace(/start|end/g,e=>nn[e])}var ms=["left","right"],bs=["right","left"],on=["top","bottom"],an=["bottom","top"];function ln(s,e,t){switch(s){case"top":case"bottom":return t?e?bs:ms:e?ms:bs;case"left":case"right":return e?on:an;default:return[]}}function ws(s,e,t,i){let n=ne(s),a=ln(G(s),t==="start",i);return n&&(a=a.map(h=>h+"-"+n),e&&(a=a.concat(a.map(Xe)))),a}function Me(s){return s.replace(/left|right|bottom|top/g,e=>sn[e])}function cn(s){return D({top:0,right:0,bottom:0,left:0},s)}function Kt(s){return typeof s!="number"?cn(s):{top:s,right:s,bottom:s,left:s}}function re(s){let{x:e,y:t,width:i,height:n}=s;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function xs(s,e,t){let{reference:i,floating:n}=s,a=J(e),h=Qe(e),f=Ye(h),p=G(e),g=a==="y",b=i.x+i.width/2-n.width/2,m=i.y+i.height/2-n.height/2,w=i[f]/2-n[f]/2,v;switch(p){case"top":v={x:b,y:i.y-n.height};break;case"bottom":v={x:b,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-n.width,y:m};break;default:v={x:i.x,y:i.y}}switch(ne(e)){case"start":v[h]-=w*(t&&g?-1:1);break;case"end":v[h]+=w*(t&&g?-1:1);break}return v}var Es=(s,e,t)=>F(void 0,null,function*(){let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:h}=t,f=a.filter(Boolean),p=yield h.isRTL==null?void 0:h.isRTL(e),g=yield h.getElementRects({reference:s,floating:e,strategy:n}),{x:b,y:m}=xs(g,i,p),w=i,v={},x=0;for(let E=0;E<f.length;E++){let{name:y,fn:d}=f[E],{x:u,y:o,data:r,reset:l}=yield d({x:b,y:m,initialPlacement:i,placement:w,strategy:n,middlewareData:v,rects:g,platform:h,elements:{reference:s,floating:e}});b=u!=null?u:b,m=o!=null?o:m,v=z(D({},v),{[y]:D(D({},v[y]),r)}),l&&x<=50&&(x++,typeof l=="object"&&(l.placement&&(w=l.placement),l.rects&&(g=l.rects===!0?yield h.getElementRects({reference:s,floating:e,strategy:n}):l.rects),{x:b,y:m}=xs(g,w,p)),E=-1)}return{x:b,y:m,placement:w,strategy:n,middlewareData:v}});function Ge(s,e){return F(this,null,function*(){var t;e===void 0&&(e={});let{x:i,y:n,platform:a,rects:h,elements:f,strategy:p}=s,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:m="floating",altBoundary:w=!1,padding:v=0}=ie(e,s),x=Kt(v),y=f[w?m==="floating"?"reference":"floating":m],d=re(yield a.getClippingRect({element:(t=yield a.isElement==null?void 0:a.isElement(y))==null||t?y:y.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)),boundary:g,rootBoundary:b,strategy:p})),u=m==="floating"?{x:i,y:n,width:h.floating.width,height:h.floating.height}:h.reference,o=yield a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating),r=(yield a.isElement==null?void 0:a.isElement(o))?(yield a.getScale==null?void 0:a.getScale(o))||{x:1,y:1}:{x:1,y:1},l=re(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:u,offsetParent:o,strategy:p}):u);return{top:(d.top-l.top+x.top)/r.y,bottom:(l.bottom-d.bottom+x.bottom)/r.y,left:(d.left-l.left+x.left)/r.x,right:(l.right-d.right+x.right)/r.x}})}var Os=s=>({name:"arrow",options:s,fn(t){return F(this,null,function*(){let{x:i,y:n,placement:a,rects:h,platform:f,elements:p,middlewareData:g}=t,{element:b,padding:m=0}=ie(s,t)||{};if(b==null)return{};let w=Kt(m),v={x:i,y:n},x=Qe(a),E=Ye(x),y=yield f.getDimensions(b),d=x==="y",u=d?"top":"left",o=d?"bottom":"right",r=d?"clientHeight":"clientWidth",l=h.reference[E]+h.reference[x]-v[x]-h.floating[E],c=v[x]-h.reference[x],C=yield f.getOffsetParent==null?void 0:f.getOffsetParent(b),S=C?C[r]:0;(!S||!(yield f.isElement==null?void 0:f.isElement(C)))&&(S=p.floating[r]||h.floating[E]);let O=l/2-c/2,L=S/2-y[E]/2-1,M=X(w[u],L),B=X(w[o],L),$=M,W=S-y[E]-B,V=S/2-y[E]/2+O,k=Je($,V,W),N=!g.arrow&&ne(a)!=null&&V!==k&&h.reference[E]/2-(V<$?M:B)-y[E]/2<0,Y=N?V<$?V-$:V-W:0;return{[x]:v[x]+Y,data:D({[x]:k,centerOffset:V-k-Y},N&&{alignmentOffset:Y}),reset:N}})}});var As=function(s){return s===void 0&&(s={}),{name:"flip",options:s,fn(t){return F(this,null,function*(){var i,n;let{placement:a,middlewareData:h,rects:f,initialPlacement:p,platform:g,elements:b}=t,V=ie(s,t),{mainAxis:m=!0,crossAxis:w=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:y=!0}=V,d=Pe(V,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((i=h.arrow)!=null&&i.alignmentOffset)return{};let u=G(a),o=J(p),r=G(p)===p,l=yield g.isRTL==null?void 0:g.isRTL(b.floating),c=v||(r||!y?[Me(p)]:ys(p)),C=E!=="none";!v&&C&&c.push(...ws(p,y,E,l));let S=[p,...c],O=yield Ge(t,d),L=[],M=((n=h.flip)==null?void 0:n.overflows)||[];if(m&&L.push(O[u]),w){let k=vs(a,f,l);L.push(O[k[0]],O[k[1]])}if(M=[...M,{placement:a,overflows:L}],!L.every(k=>k<=0)){var B,$;let k=(((B=h.flip)==null?void 0:B.index)||0)+1,N=S[k];if(N&&(!(w==="alignment"?o!==J(N):!1)||M.every(H=>J(H.placement)===o?H.overflows[0]>0:!0)))return{data:{index:k,overflows:M},reset:{placement:N}};let Y=($=M.filter(se=>se.overflows[0]<=0).sort((se,H)=>se.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!Y)switch(x){case"bestFit":{var W;let se=(W=M.filter(H=>{if(C){let ee=J(H.placement);return ee===o||ee==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ee=>ee>0).reduce((ee,qs)=>ee+qs,0)]).sort((H,ee)=>H[1]-ee[1])[0])==null?void 0:W[0];se&&(Y=se);break}case"initialPlacement":Y=p;break}if(a!==Y)return{reset:{placement:Y}}}return{}})}}};var hn=new Set(["left","top"]);function un(s,e){return F(this,null,function*(){let{placement:t,platform:i,elements:n}=s,a=yield i.isRTL==null?void 0:i.isRTL(n.floating),h=G(t),f=ne(t),p=J(t)==="y",g=hn.has(h)?-1:1,b=a&&p?-1:1,m=ie(e,s),{mainAxis:w,crossAxis:v,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return f&&typeof x=="number"&&(v=f==="end"?x*-1:x),p?{x:v*b,y:w*g}:{x:w*g,y:v*b}})}var Ts=function(s){return s===void 0&&(s=0),{name:"offset",options:s,fn(t){return F(this,null,function*(){var i,n;let{x:a,y:h,placement:f,middlewareData:p}=t,g=yield un(t,s);return f===((i=p.offset)==null?void 0:i.placement)&&(n=p.arrow)!=null&&n.alignmentOffset?{}:{x:a+g.x,y:h+g.y,data:z(D({},g),{placement:f})}})}}},Cs=function(s){return s===void 0&&(s={}),{name:"shift",options:s,fn(t){return F(this,null,function*(){let{x:i,y:n,placement:a}=t,d=ie(s,t),{mainAxis:h=!0,crossAxis:f=!1,limiter:p={fn:u=>{let{x:o,y:r}=u;return{x:o,y:r}}}}=d,g=Pe(d,["mainAxis","crossAxis","limiter"]),b={x:i,y:n},m=yield Ge(t,g),w=J(G(a)),v=qt(w),x=b[v],E=b[w];if(h){let u=v==="y"?"top":"left",o=v==="y"?"bottom":"right",r=x+m[u],l=x-m[o];x=Je(r,x,l)}if(f){let u=w==="y"?"top":"left",o=w==="y"?"bottom":"right",r=E+m[u],l=E-m[o];E=Je(r,E,l)}let y=p.fn(z(D({},t),{[v]:x,[w]:E}));return z(D({},y),{data:{x:y.x-i,y:y.y-n,enabled:{[v]:h,[w]:f}}})})}}};var Ss=function(s){return s===void 0&&(s={}),{name:"size",options:s,fn(t){return F(this,null,function*(){var i,n;let{placement:a,rects:h,platform:f,elements:p}=t,M=ie(s,t),{apply:g=()=>{}}=M,b=Pe(M,["apply"]),m=yield Ge(t,b),w=G(a),v=ne(a),x=J(a)==="y",{width:E,height:y}=h.floating,d,u;w==="top"||w==="bottom"?(d=w,u=v===((yield f.isRTL==null?void 0:f.isRTL(p.floating))?"start":"end")?"left":"right"):(u=w,d=v==="end"?"top":"bottom");let o=y-m.top-m.bottom,r=E-m.left-m.right,l=X(y-m[d],o),c=X(E-m[u],r),C=!t.middlewareData.shift,S=l,O=c;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&(O=r),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=o),C&&!v){let B=P(m.left,0),$=P(m.right,0),W=P(m.top,0),V=P(m.bottom,0);x?O=E-2*(B!==0||$!==0?B+$:P(m.left,m.right)):S=y-2*(W!==0||V!==0?W+V:P(m.top,m.bottom))}yield g(z(D({},t),{availableWidth:O,availableHeight:S}));let L=yield f.getDimensions(p.floating);return E!==L.width||y!==L.height?{reset:{rects:!0}}:{}})}}};function Ze(){return typeof window!="undefined"}function oe(s){return Fs(s)?(s.nodeName||"").toLowerCase():"#document"}function R(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function q(s){var e;return(e=(Fs(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function Fs(s){return Ze()?s instanceof Node||s instanceof R(s).Node:!1}function j(s){return Ze()?s instanceof Element||s instanceof R(s).Element:!1}function K(s){return Ze()?s instanceof HTMLElement||s instanceof R(s).HTMLElement:!1}function Ls(s){return!Ze()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof R(s).ShadowRoot}var dn=new Set(["inline","contents"]);function ge(s){let{overflow:e,overflowX:t,overflowY:i,display:n}=_(s);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!dn.has(n)}var fn=new Set(["table","td","th"]);function Ms(s){return fn.has(oe(s))}var pn=[":popover-open",":modal"];function ke(s){return pn.some(e=>{try{return s.matches(e)}catch(t){return!1}})}var gn=["transform","translate","scale","rotate","perspective"],mn=["transform","translate","scale","rotate","perspective","filter"],bn=["paint","layout","strict","content"];function et(s){let e=tt(),t=j(s)?_(s):s;return gn.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||mn.some(i=>(t.willChange||"").includes(i))||bn.some(i=>(t.contain||"").includes(i))}function Ns(s){let e=Z(s);for(;K(e)&&!ae(e);){if(et(e))return e;if(ke(e))return null;e=Z(e)}return null}function tt(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var vn=new Set(["html","body","#document"]);function ae(s){return vn.has(oe(s))}function _(s){return R(s).getComputedStyle(s)}function Be(s){return j(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function Z(s){if(oe(s)==="html")return s;let e=s.assignedSlot||s.parentNode||Ls(s)&&s.host||q(s);return Ls(e)?e.host:e}function $s(s){let e=Z(s);return ae(e)?s.ownerDocument?s.ownerDocument.body:s.body:K(e)&&ge(e)?e:$s(e)}function pe(s,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);let n=$s(s),a=n===((i=s.ownerDocument)==null?void 0:i.body),h=R(n);if(a){let f=st(h);return e.concat(h,h.visualViewport||[],ge(n)?n:[],f&&t?pe(f):[])}return e.concat(n,pe(n,[],t))}function st(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function Vs(s){let e=_(s),t=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=K(s),a=n?s.offsetWidth:t,h=n?s.offsetHeight:i,f=Ne(t)!==a||Ne(i)!==h;return f&&(t=a,i=h),{width:t,height:i,$:f}}function zt(s){return j(s)?s:s.contextElement}function me(s){let e=zt(s);if(!K(e))return U(1);let t=e.getBoundingClientRect(),{width:i,height:n,$:a}=Vs(e),h=(a?Ne(t.width):t.width)/i,f=(a?Ne(t.height):t.height)/n;return(!h||!Number.isFinite(h))&&(h=1),(!f||!Number.isFinite(f))&&(f=1),{x:h,y:f}}var yn=U(0);function Ps(s){let e=R(s);return!tt()||!e.visualViewport?yn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wn(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==R(s)?!1:e}function le(s,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);let n=s.getBoundingClientRect(),a=zt(s),h=U(1);e&&(i?j(i)&&(h=me(i)):h=me(s));let f=wn(a,t,i)?Ps(a):U(0),p=(n.left+f.x)/h.x,g=(n.top+f.y)/h.y,b=n.width/h.x,m=n.height/h.y;if(a){let w=R(a),v=i&&j(i)?R(i):i,x=w,E=st(x);for(;E&&i&&v!==x;){let y=me(E),d=E.getBoundingClientRect(),u=_(E),o=d.left+(E.clientLeft+parseFloat(u.paddingLeft))*y.x,r=d.top+(E.clientTop+parseFloat(u.paddingTop))*y.y;p*=y.x,g*=y.y,b*=y.x,m*=y.y,p+=o,g+=r,x=R(E),E=st(x)}}return re({width:b,height:m,x:p,y:g})}function it(s,e){let t=Be(s).scrollLeft;return e?e.left+t:le(q(s)).left+t}function Is(s,e){let t=s.getBoundingClientRect(),i=t.left+e.scrollLeft-it(s,t),n=t.top+e.scrollTop;return{x:i,y:n}}function xn(s){let{elements:e,rect:t,offsetParent:i,strategy:n}=s,a=n==="fixed",h=q(i),f=e?ke(e.floating):!1;if(i===h||f&&a)return t;let p={scrollLeft:0,scrollTop:0},g=U(1),b=U(0),m=K(i);if((m||!m&&!a)&&((oe(i)!=="body"||ge(h))&&(p=Be(i)),K(i))){let v=le(i);g=me(i),b.x=v.x+i.clientLeft,b.y=v.y+i.clientTop}let w=h&&!m&&!a?Is(h,p):U(0);return{width:t.width*g.x,height:t.height*g.y,x:t.x*g.x-p.scrollLeft*g.x+b.x+w.x,y:t.y*g.y-p.scrollTop*g.y+b.y+w.y}}function En(s){return Array.from(s.getClientRects())}function On(s){let e=q(s),t=Be(s),i=s.ownerDocument.body,n=P(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=P(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),h=-t.scrollLeft+it(s),f=-t.scrollTop;return _(i).direction==="rtl"&&(h+=P(e.clientWidth,i.clientWidth)-n),{width:n,height:a,x:h,y:f}}var ks=25;function An(s,e){let t=R(s),i=q(s),n=t.visualViewport,a=i.clientWidth,h=i.clientHeight,f=0,p=0;if(n){a=n.width,h=n.height;let b=tt();(!b||b&&e==="fixed")&&(f=n.offsetLeft,p=n.offsetTop)}let g=it(i);if(g<=0){let b=i.ownerDocument,m=b.body,w=getComputedStyle(m),v=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,x=Math.abs(i.clientWidth-m.clientWidth-v);x<=ks&&(a-=x)}else g<=ks&&(a+=g);return{width:a,height:h,x:f,y:p}}var Tn=new Set(["absolute","fixed"]);function Cn(s,e){let t=le(s,!0,e==="fixed"),i=t.top+s.clientTop,n=t.left+s.clientLeft,a=K(s)?me(s):U(1),h=s.clientWidth*a.x,f=s.clientHeight*a.y,p=n*a.x,g=i*a.y;return{width:h,height:f,x:p,y:g}}function Bs(s,e,t){let i;if(e==="viewport")i=An(s,t);else if(e==="document")i=On(q(s));else if(j(e))i=Cn(e,t);else{let n=Ps(s);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return re(i)}function Rs(s,e){let t=Z(s);return t===e||!j(t)||ae(t)?!1:_(t).position==="fixed"||Rs(t,e)}function Sn(s,e){let t=e.get(s);if(t)return t;let i=pe(s,[],!1).filter(f=>j(f)&&oe(f)!=="body"),n=null,a=_(s).position==="fixed",h=a?Z(s):s;for(;j(h)&&!ae(h);){let f=_(h),p=et(h);!p&&f.position==="fixed"&&(n=null),(a?!p&&!n:!p&&f.position==="static"&&!!n&&Tn.has(n.position)||ge(h)&&!p&&Rs(s,h))?i=i.filter(b=>b!==h):n=f,h=Z(h)}return e.set(s,i),i}function Ln(s){let{element:e,boundary:t,rootBoundary:i,strategy:n}=s,h=[...t==="clippingAncestors"?ke(e)?[]:Sn(e,this._c):[].concat(t),i],f=h[0],p=h.reduce((g,b)=>{let m=Bs(e,b,n);return g.top=P(m.top,g.top),g.right=X(m.right,g.right),g.bottom=X(m.bottom,g.bottom),g.left=P(m.left,g.left),g},Bs(e,f,n));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Fn(s){let{width:e,height:t}=Vs(s);return{width:e,height:t}}function Mn(s,e,t){let i=K(e),n=q(e),a=t==="fixed",h=le(s,!0,a,e),f={scrollLeft:0,scrollTop:0},p=U(0);function g(){p.x=it(n)}if(i||!i&&!a)if((oe(e)!=="body"||ge(n))&&(f=Be(e)),i){let v=le(e,!0,a,e);p.x=v.x+e.clientLeft,p.y=v.y+e.clientTop}else n&&g();a&&!i&&n&&g();let b=n&&!i&&!a?Is(n,f):U(0),m=h.left+f.scrollLeft-p.x-b.x,w=h.top+f.scrollTop-p.y-b.y;return{x:m,y:w,width:h.width,height:h.height}}function Wt(s){return _(s).position==="static"}function Ds(s,e){if(!K(s)||_(s).position==="fixed")return null;if(e)return e(s);let t=s.offsetParent;return q(s)===t&&(t=t.ownerDocument.body),t}function js(s,e){let t=R(s);if(ke(s))return t;if(!K(s)){let n=Z(s);for(;n&&!ae(n);){if(j(n)&&!Wt(n))return n;n=Z(n)}return t}let i=Ds(s,e);for(;i&&Ms(i)&&Wt(i);)i=Ds(i,e);return i&&ae(i)&&Wt(i)&&!et(i)?t:i||Ns(s)||t}var Nn=function(s){return F(this,null,function*(){let e=this.getOffsetParent||js,t=this.getDimensions,i=yield t(s.floating);return{reference:Mn(s.reference,yield e(s.floating),s.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};function $n(s){return _(s).direction==="rtl"}var kn={convertOffsetParentRelativeRectToViewportRelativeRect:xn,getDocumentElement:q,getClippingRect:Ln,getOffsetParent:js,getElementRects:Nn,getClientRects:En,getDimensions:Fn,getScale:me,isElement:j,isRTL:$n};function _s(s,e){return s.x===e.x&&s.y===e.y&&s.width===e.width&&s.height===e.height}function Bn(s,e){let t=null,i,n=q(s);function a(){var f;clearTimeout(i),(f=t)==null||f.disconnect(),t=null}function h(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),a();let g=s.getBoundingClientRect(),{left:b,top:m,width:w,height:v}=g;if(f||e(),!w||!v)return;let x=$e(m),E=$e(n.clientWidth-(b+w)),y=$e(n.clientHeight-(m+v)),d=$e(b),o={rootMargin:-x+"px "+-E+"px "+-y+"px "+-d+"px",threshold:P(0,X(1,p))||1},r=!0;function l(c){let C=c[0].intersectionRatio;if(C!==p){if(!r)return h();C?h(!1,C):i=setTimeout(()=>{h(!1,1e-7)},1e3)}C===1&&!_s(g,s.getBoundingClientRect())&&h(),r=!1}try{t=new IntersectionObserver(l,z(D({},o),{root:n.ownerDocument}))}catch(c){t=new IntersectionObserver(l,o)}t.observe(s)}return h(!0),a}function nt(s,e,t,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,g=zt(s),b=n||a?[...g?pe(g):[],...pe(e)]:[];b.forEach(d=>{n&&d.addEventListener("scroll",t,{passive:!0}),a&&d.addEventListener("resize",t)});let m=g&&f?Bn(g,t):null,w=-1,v=null;h&&(v=new ResizeObserver(d=>{let[u]=d;u&&u.target===g&&v&&(v.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var o;(o=v)==null||o.observe(e)})),t()}),g&&!p&&v.observe(g),v.observe(e));let x,E=p?le(s):null;p&&y();function y(){let d=le(s);E&&!_s(E,d)&&t(),E=d,x=requestAnimationFrame(y)}return t(),()=>{var d;b.forEach(u=>{n&&u.removeEventListener("scroll",t),a&&u.removeEventListener("resize",t)}),m==null||m(),(d=v)==null||d.disconnect(),v=null,p&&cancelAnimationFrame(x)}}var rt=Ts;var ot=Cs,at=As,lt=Ss;var Hs=Os;var ct=(s,e,t)=>{let i=new Map,n=D({platform:kn},t),a=z(D({},n.platform),{_c:i});return Es(s,e,z(D({},n),{platform:a}))};var be=class extends A{connect(){this.showTimeout=null,this.hideTimeout=null,this.cleanup=null,this.handleKeydown=this.handleKeydown.bind(this),"ontouchstart"in window&&this.element.addEventListener("click",this.toggle.bind(this))}disconnect(){this.hide(),this.clearTimeouts(),"ontouchstart"in window&&this.element.removeEventListener("click",this.toggle.bind(this))}show(s){!this.activeValue||(this.hideOtherTooltips(),this.clearTimeouts(),this.delayValue>0?this.showTimeout=setTimeout(()=>this.createTooltip(s),this.delayValue):this.createTooltip(s))}hide(){this.clearTimeouts(),this.delayValue>0?this.hideTimeout=setTimeout(()=>this.destroyTooltip(),this.delayValue):this.destroyTooltip()}toggle(s){this.tooltip?this.hide():this.show(s)}createTooltip(s){if(this.tooltip)return;let e=(s==null?void 0:s.currentTarget)||this.element;try{let t=document.createElement("div");t.innerHTML=this.templateTarget.innerHTML,t.style.position="absolute",t.style.zIndex="9999",t.setAttribute("role","tooltip"),t.setAttribute("data-lui-tooltip-instance","true"),document.body.appendChild(t),this.tooltip=t;let i=t.firstElementChild,n=i==null?void 0:i.querySelector("[data-tooltip-arrow]");i&&(this.cleanup=nt(e,i,()=>this.updatePosition(e,i,n)),requestAnimationFrame(()=>{i.style.opacity="1"}),document.addEventListener("keydown",this.handleKeydown))}catch(t){console.warn("Tooltip positioning failed:",t),this.destroyTooltip()}}destroyTooltip(){if(this.cleanup&&(this.cleanup(),this.cleanup=null),this.tooltip){let s=this.tooltip.firstElementChild;s?(s.style.opacity="0",setTimeout(()=>{this.tooltip&&(this.tooltip.remove(),this.tooltip=null)},200)):(this.tooltip.remove(),this.tooltip=null)}document.removeEventListener("keydown",this.handleKeydown)}updatePosition(s,e,t){!e||ct(s,e,{placement:this.positionValue||"bottom",middleware:[rt(this.offsetValue),lt(),at(),ot({padding:5}),...t?[Hs({element:t})]:[]]}).then(({x:i,y:n,placement:a,middlewareData:h})=>{Object.assign(e.style,{left:`${i}px`,top:`${n}px`}),t&&h.arrow&&this.positionArrow(t,a,h.arrow)}).catch(i=>{console.warn("Tooltip positioning update failed:",i)})}positionArrow(s,e,t){let{x:i,y:n}=t,a=e.split("-")[0];Object.assign(s.style,{left:"",top:"",right:"",bottom:""});let h="-4px";switch(a){case"top":Object.assign(s.style,{left:i!=null?`${i}px`:"",bottom:h});break;case"bottom":Object.assign(s.style,{left:i!=null?`${i}px`:"",top:h});break;case"left":Object.assign(s.style,{top:n!=null?`${n}px`:"",right:h});break;case"right":Object.assign(s.style,{top:n!=null?`${n}px`:"",left:h});break}}handleKeydown(s){s.key==="Escape"&&this.tooltip&&this.hide()}hideOtherTooltips(){document.querySelectorAll('[data-lui-tooltip-instance="true"]').forEach(s=>{s!==this.tooltip&&s.remove()})}clearTimeouts(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}};T(be,"targets",["template"]),T(be,"values",{active:Boolean,position:String,delay:{type:Number,default:0},offset:{type:Number,default:8}});var ve=class extends A{constructor(){super(...arguments);T(this,"handleMouseEnter",e=>{e.target.dataset.hover=""});T(this,"handleMouseLeave",e=>{delete e.target.dataset.hover});T(this,"handleWrapperMouseEnter",e=>{e.currentTarget.dataset.hover=""});T(this,"handleWrapperMouseLeave",e=>{delete e.currentTarget.dataset.hover})}connect(){this.isOpen=!1,this.highlightedIndex=-1,this.filteredOptions=[],this.cleanup=null,this.debounceTimer=null,this.originalSelected=this.deepClone(this.selectedValue),this.initializeSelected(),this.setupHoverHandlers(),this.hasUrlValue||(this.filteredOptions=this.optionsValue)}setupHoverHandlers(){this.hasInputTarget&&(this.inputTarget.addEventListener("mouseenter",this.handleMouseEnter),this.inputTarget.addEventListener("mouseleave",this.handleMouseLeave)),this.hasInputWrapperTarget&&(this.inputWrapperTarget.addEventListener("mouseenter",this.handleWrapperMouseEnter),this.inputWrapperTarget.addEventListener("mouseleave",this.handleWrapperMouseLeave))}get isAssociationMode(){return this.hasForeignKeyValue}disconnect(){this.destroyFloating(),this.clearDebounce(),this.cleanupHoverHandlers()}cleanupHoverHandlers(){this.hasInputTarget&&(this.inputTarget.removeEventListener("mouseenter",this.handleMouseEnter),this.inputTarget.removeEventListener("mouseleave",this.handleMouseLeave)),this.hasInputWrapperTarget&&(this.inputWrapperTarget.removeEventListener("mouseenter",this.handleWrapperMouseEnter),this.inputWrapperTarget.removeEventListener("mouseleave",this.handleWrapperMouseLeave))}onInput(e){let t=e.target.value.trim();this.hasUrlValue?(this.clearDebounce(),t.length>=this.minCharsValue?this.debounceTimer=setTimeout(()=>{this.fetchOptions(t)},this.debounceValue):(this.filteredOptions=[],this.renderOptions())):this.filterClientSide(t),this.open(),this.updateCreateOption(t)}onFocus(){(!this.hasUrlValue||this.inputTarget.value.length>=this.minCharsValue)&&(this.hasUrlValue||(this.filteredOptions=this.optionsValue,this.filterClientSide(this.inputTarget.value.trim())),this.open())}onKeydown(e){if(e.ctrlKey){if(e.key==="n"){e.preventDefault(),this.isOpen?this.highlightNext():this.open();return}if(e.key==="p"){e.preventDefault(),this.isOpen?this.highlightPrevious():this.open();return}}switch(e.key){case"ArrowDown":e.preventDefault(),this.isOpen?this.highlightNext():this.open();break;case"ArrowUp":e.preventDefault(),this.isOpen?this.highlightPrevious():this.open();break;case"Enter":e.preventDefault(),this.selectHighlighted();break;case"Escape":this.close(),this.inputTarget.value="";break;case"Backspace":this.multipleValue&&this.inputTarget.value===""&&this.removeLastSelected();break;case"Tab":this.close();break}}clickOutside(e){this.element.contains(e.target)||this.close()}selectOption(e){e.stopPropagation();let t=e.currentTarget;if(t.dataset.disabled==="true")return;let i=t.dataset.value,n=t.dataset.label;this.multipleValue?this.toggleSelection(i,n):(this.setSingleSelection(i,n),this.close())}toggleSelection(e,t,i=!1){let n=this.findSelectedIndex(e);if(n>-1)this.selectedValue=this.selectedValue.filter((a,h)=>h!==n);else if(this.isAssociationMode){let a={value:e};i&&(a.custom=!0),this.selectedValue=[...this.selectedValue,a]}else this.selectedValue=[...this.selectedValue,e];this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions(),this.inputTarget.value="",this.inputTarget.focus()}findSelectedIndex(e){return this.selectedValue.findIndex(t=>{let i=typeof t=="object"?t.value:t;return String(i)===String(e)})}setSingleSelection(e,t){this.selectedValue=[e],this.inputTarget.value=t,this.updateHiddenField(e)}removeLastSelected(){this.selectedValue.length>0&&(this.selectedValue=this.selectedValue.slice(0,-1),this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions())}removeTag(e){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.dataset.value,i=this.findSelectedIndex(t);i>-1&&(this.selectedValue=this.selectedValue.filter((n,a)=>a!==i)),this.updateSelectedTags(),this.updateHiddenFields(),this.renderOptions(),this.inputTarget.focus()}createCustomOption(){let e=this.inputTarget.value.trim();e&&this.allowCustomValue&&(this.multipleValue?this.toggleSelection(e,e,!0):this.setSingleSelection(e,e),this.close())}filterClientSide(e){if(!e)this.filteredOptions=this.optionsValue;else{let t=e.toLowerCase();this.filteredOptions=this.optionsValue.filter(i=>i.label.toLowerCase().includes(t))}this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.renderOptions()}fetchOptions(e){return F(this,null,function*(){this.showLoading();try{let t=new URL(this.urlValue,window.location.origin);t.searchParams.set("q",e);let i=yield fetch(t,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(!i.ok)throw new Error("Network error");let n=yield i.json();this.filteredOptions=n,this.highlightedIndex=n.length>0?0:-1,this.renderOptions()}catch(t){console.error("Combobox fetch error:",t),this.filteredOptions=[],this.renderOptions()}finally{this.hideLoading()}})}renderOptions(){let e=this.optionsContainerTarget;if(e.innerHTML="",this.filteredOptions.length===0){this.showNoResults();return}this.hideNoResults(),this.filteredOptions.forEach((t,i)=>{let n=this.optionTemplateTarget.content.cloneNode(!0),a=n.querySelector("[role='option']");a.dataset.value=t.value,a.dataset.label=t.label,a.dataset.index=i,a.querySelector("[data-label]").textContent=t.label,this.isValueSelected(t.value)&&(a.dataset.selected="true",a.setAttribute("aria-selected","true"),a.querySelector("[data-checkmark]").classList.remove("lui:hidden")),i===this.highlightedIndex&&(a.dataset.highlighted="true"),t.disabled&&(a.dataset.disabled="true",a.setAttribute("aria-disabled","true")),e.appendChild(n)})}updateSelectedTags(){if(!this.multipleValue||!this.hasSelectedTagsTarget)return;this.selectedTagsTarget.querySelectorAll("[data-combobox-tag]").forEach(t=>t.remove()),this.selectedValue.forEach(t=>{let i=this.getItemValue(t),n=this.findOptionByValue(i),a=n?n.label:i,h=document.createElement("span");h.setAttribute("data-combobox-tag","true"),h.className="lui:inline-flex lui:items-center lui:gap-1 lui:rounded-md lui:bg-surface-tertiary lui:px-2 lui:py-0.5 lui:text-sm lui:text-foreground-secondary",h.innerHTML=`
|
|
6
6
|
<span class="lui:truncate lui:max-w-[150px]">${this.escapeHtml(a)}</span>
|
|
7
|
-
<button type="button" data-value="${this.escapeHtml(String(i))}" data-action="click->lui-combobox#removeTag" class="lui:text-
|
|
7
|
+
<button type="button" data-value="${this.escapeHtml(String(i))}" data-action="click->lui-combobox#removeTag" class="lui:text-foreground-muted lui:hover:text-foreground-secondary lui:flex-shrink-0 lui:ml-0.5">
|
|
8
8
|
<svg class="lui:h-3.5 lui:w-3.5" viewBox="0 0 16 16" fill="currentColor">
|
|
9
9
|
<path d="M5.28 4.22a.75.75 0 00-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 101.06 1.06L8 9.06l2.72 2.72a.75.75 0 101.06-1.06L9.06 8l2.72-2.72a.75.75 0 00-1.06-1.06L8 6.94 5.28 4.22z"/>
|
|
10
10
|
</svg>
|
|
@@ -5,7 +5,7 @@ class LightningUiKit::AlertComponent < LightningUiKit::BaseComponent
|
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def default_classes
|
|
8
|
-
"lui:flex lui:items-center lui:p-4 lui:text-sm lui:text-
|
|
8
|
+
"lui:flex lui:items-center lui:p-4 lui:text-sm lui:text-neutral-text lui:rounded-lg lui:bg-neutral-bg"
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def classes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
class: class_names(
|
|
3
3
|
"lui:inline-grid lui:shrink-0 lui:align-middle lui:[--avatar-radius:20%] lui:[--ring-opacity:20%] *:lui:col-start-1 *:lui:row-start-1 lui:outline lui:-outline-offset-1 lui:outline-black/(--ring-opacity)",
|
|
4
4
|
SIZE_CLASSES.fetch(@size, SIZE_CLASSES[:md]),
|
|
5
|
-
@initials ? "lui:text-
|
|
5
|
+
@initials ? "lui:text-foreground-invert lui:bg-surface-invert" : "lui:text-foreground-muted lui:bg-surface-tertiary",
|
|
6
6
|
@square ? "lui:rounded-(--avatar-radius) lui:*:rounded-(--avatar-radius)" : "lui:rounded-full lui:*:rounded-full",
|
|
7
7
|
@options[:class]
|
|
8
8
|
),
|
|
@@ -7,13 +7,13 @@ class LightningUiKit::BadgeComponent < LightningUiKit::BaseComponent
|
|
|
7
7
|
def classes
|
|
8
8
|
status_classes = case @status
|
|
9
9
|
when :success
|
|
10
|
-
"lui:bg-
|
|
10
|
+
"lui:bg-success-bg lui:text-success-text"
|
|
11
11
|
when :warning
|
|
12
|
-
"lui:bg-
|
|
12
|
+
"lui:bg-warning-bg lui:text-warning-text"
|
|
13
13
|
when :error
|
|
14
|
-
"lui:bg-
|
|
14
|
+
"lui:bg-destructive/15 lui:text-destructive-text"
|
|
15
15
|
else
|
|
16
|
-
"lui:bg-
|
|
16
|
+
"lui:bg-foreground-faint/20 lui:text-foreground-muted"
|
|
17
17
|
end
|
|
18
18
|
[defalt_classes, status_classes].join(" ")
|
|
19
19
|
end
|
|
@@ -23,20 +23,20 @@ class LightningUiKit::BadgeComponent < LightningUiKit::BaseComponent
|
|
|
23
23
|
when :complete
|
|
24
24
|
case @status
|
|
25
25
|
when :success
|
|
26
|
-
"lui:bg-
|
|
26
|
+
"lui:bg-success-indicator lui:border-success-indicator"
|
|
27
27
|
when :warning
|
|
28
|
-
"lui:bg-
|
|
28
|
+
"lui:bg-warning-indicator lui:border-warning-indicator"
|
|
29
29
|
when :error
|
|
30
|
-
"lui:bg-
|
|
30
|
+
"lui:bg-destructive lui:border-destructive"
|
|
31
31
|
else
|
|
32
|
-
"lui:bg-
|
|
32
|
+
"lui:bg-foreground-faint lui:border-foreground-faint"
|
|
33
33
|
end
|
|
34
34
|
when :incomplete
|
|
35
35
|
case @status
|
|
36
36
|
when :error
|
|
37
|
-
"lui:bg-transparent lui:border-
|
|
37
|
+
"lui:bg-transparent lui:border-foreground-invert"
|
|
38
38
|
else
|
|
39
|
-
"lui:bg-transparent lui:border-
|
|
39
|
+
"lui:bg-transparent lui:border-foreground-faint"
|
|
40
40
|
end
|
|
41
41
|
when :partialy_complete
|
|
42
42
|
partialy_complete_classes = "lui:relative lui:after:w-[3.75px] lui:after:h-[8.2px]\
|
|
@@ -44,13 +44,13 @@ class LightningUiKit::BadgeComponent < LightningUiKit::BaseComponent
|
|
|
44
44
|
lui:after:left-[1px] lui:after:margin-0 lui:after-margin-y-[1px]"
|
|
45
45
|
case @status
|
|
46
46
|
when :success
|
|
47
|
-
"#{partialy_complete_classes} lui:border-
|
|
47
|
+
"#{partialy_complete_classes} lui:border-success-indicator lui:after:border-l-success-indicator lui:after:border-r-success-indicator"
|
|
48
48
|
when :warning
|
|
49
|
-
"#{partialy_complete_classes} lui:border-
|
|
49
|
+
"#{partialy_complete_classes} lui:border-warning-indicator lui:after:border-l-warning-indicator lui:after:border-r-warning-indicator"
|
|
50
50
|
when :error
|
|
51
|
-
"#{partialy_complete_classes} lui:border-
|
|
51
|
+
"#{partialy_complete_classes} lui:border-foreground-invert lui:after:border-l-foreground-invert lui:after:border-r-foreground-invert"
|
|
52
52
|
else
|
|
53
|
-
"#{partialy_complete_classes} lui:border-
|
|
53
|
+
"#{partialy_complete_classes} lui:border-foreground-faint lui:after:border-l-foreground-faint lui:after:border-r-foreground-faint"
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
[default_progress_classes, progress_classes].join(" ")
|
|
@@ -10,9 +10,9 @@ class LightningUiKit::BannerComponent < LightningUiKit::BaseComponent
|
|
|
10
10
|
def classes
|
|
11
11
|
type_classes = case @type
|
|
12
12
|
when :error
|
|
13
|
-
"lui:*:data-[slot=header]:bg-
|
|
13
|
+
"lui:bg-destructive/5 lui:border-destructive-border/40 lui:*:data-[slot=header]:bg-destructive/10 lui:*:data-[slot=header]:text-destructive-text"
|
|
14
14
|
else
|
|
15
|
-
"lui:*:data-[slot=header]:bg-
|
|
15
|
+
"lui:*:data-[slot=header]:bg-neutral-bg"
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
merge_classes([default_classes, type_classes, @options[:class]].compact.join(" "))
|
|
@@ -28,6 +28,6 @@ class LightningUiKit::BannerComponent < LightningUiKit::BaseComponent
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def default_classes
|
|
31
|
-
"lui:border lui:border-
|
|
31
|
+
"lui:border lui:border-border lui:rounded-lg lui:overflow-hidden lui:transition-opacity lui:duration-300 lui:ease-out lui:opacity-100"
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -58,12 +58,12 @@ class LightningUiKit::ButtonComponent < LightningUiKit::BaseComponent
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def destructive_classes
|
|
61
|
-
"lui:text-
|
|
62
|
-
lui:[--btn-bg:var(--lui-
|
|
63
|
-
lui:[--btn-border:var(--lui-
|
|
64
|
-
lui:[--btn-hover-overlay:var(--lui-
|
|
65
|
-
lui:[--btn-icon:var(--lui-
|
|
66
|
-
lui:active:[--btn-icon:var(--lui-
|
|
61
|
+
"lui:text-foreground-invert lui:border-destructive-border lui:hover:bg-destructive lui:active:bg-destructive\
|
|
62
|
+
lui:[--btn-bg:var(--lui-theme-destructive)]\
|
|
63
|
+
lui:[--btn-border:var(--lui-theme-destructive-border)]
|
|
64
|
+
lui:[--btn-hover-overlay:var(--lui-theme-foreground-invert)]/10\
|
|
65
|
+
lui:[--btn-icon:var(--lui-theme-foreground-invert)]\
|
|
66
|
+
lui:active:[--btn-icon:var(--lui-theme-foreground-invert)] lui:hover:[--btn-icon:var(--lui-theme-foreground-invert)] lui:cursor-pointer"
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def default_classes
|
|
@@ -75,21 +75,21 @@ class LightningUiKit::ButtonComponent < LightningUiKit::BaseComponent
|
|
|
75
75
|
lui:after:-z-10 lui:after:rounded-[calc(var(--lui-radius-lg)-1px)] lui:after:shadow-[shadow:inset_0_1px_--theme(--color-white/15%)]\
|
|
76
76
|
lui:active:after:bg-(--btn-hover-overlay) lui:hover:after:bg-(--btn-hover-overlay)\
|
|
77
77
|
lui:disabled:opacity-50 lui:disabled:before:shadow-none lui:disabled:after:shadow-none lui:disabled:hover:after:bg-transparent\
|
|
78
|
-
lui:text-
|
|
79
|
-
lui:[--btn-bg:var(--lui-
|
|
80
|
-
lui:[--btn-border:var(--lui-
|
|
81
|
-
lui:[--btn-hover-overlay:var(--lui-
|
|
82
|
-
lui:[--btn-icon:var(--lui-
|
|
83
|
-
lui:active:[--btn-icon:var(--lui-
|
|
84
|
-
lui:hover:[--btn-icon:var(--lui-
|
|
78
|
+
lui:text-foreground-invert lui:cursor-pointer\
|
|
79
|
+
lui:[--btn-bg:var(--lui-theme-surface-invert)]\
|
|
80
|
+
lui:[--btn-border:var(--lui-theme-border-invert)]
|
|
81
|
+
lui:[--btn-hover-overlay:var(--lui-theme-foreground-invert)]/10\
|
|
82
|
+
lui:[--btn-icon:var(--lui-theme-foreground-faint)]\
|
|
83
|
+
lui:active:[--btn-icon:var(--lui-theme-foreground-muted)]\
|
|
84
|
+
lui:hover:[--btn-icon:var(--lui-theme-foreground-muted)]"
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def outline_classes
|
|
88
88
|
"lui:relative lui:isolate lui:inline-flex lui:items-baseline lui:justify-center lui:gap-x-2 lui:rounded-lg lui:border lui:px-[calc(--spacing(3.5)-1px)] lui:py-[calc(--spacing(2.5)-1px)] sm:lui:px-[calc(--spacing(3)-1px)]\
|
|
89
89
|
lui:sm:py-[calc(--spacing(1.5)-1px)] lui:focus:outline-hidden lui:focus:outline lui:focus:outline-2 lui:focus:outline-offset-2\
|
|
90
|
-
lui:focus:outline-
|
|
90
|
+
lui:focus:outline-focus lui:disabled:opacity-50 lui:*:data-[slot=icon]:-mx-0.5 lui:*:data-[slot=icon]:my-0.5 lui:*:data-[slot=icon]:size-5\
|
|
91
91
|
lui:*:data-[slot=icon]:shrink-0 lui:*:data-[slot=icon]:self-center lui:*:data-[slot=icon]:text-(--btn-icon) lui:sm:*:data-[slot=icon]:my-1\
|
|
92
|
-
lui:sm:*:data-[slot=icon]:size-4 lui:border-
|
|
93
|
-
lui:[--btn-icon:var(--lui-
|
|
92
|
+
lui:sm:*:data-[slot=icon]:size-4 lui:border-border lui:text-foreground lui:active:bg-surface-hover lui:hover:bg-surface-hover\
|
|
93
|
+
lui:[--btn-icon:var(--lui-theme-foreground-muted)] lui:active:[--btn-icon:var(--lui-theme-foreground-secondary)] lui:hover:[--btn-icon:var(--lui-theme-foreground-secondary)] lui:cursor-pointer"
|
|
94
94
|
end
|
|
95
95
|
end
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
<%= tag.span(data: control_data, class: "lui:group lui:inline-flex lui:focus:outline-hidden", role: "checkbox", aria_checked: "false", tabindex: 0) do %>
|
|
7
7
|
<span class="lui:relative lui:isolate lui:flex lui:size-[1.125rem] lui:items-center lui:justify-center
|
|
8
8
|
lui:rounded-[0.3125rem] lui:sm:size-4 lui:before:absolute lui:before:inset-0 lui:before:-z-10
|
|
9
|
-
lui:before:rounded-[calc(0.3125rem-1px)] lui:before:bg-
|
|
10
|
-
lui:group-data-checked:before:bg-(--checkbox-checked-bg) lui:border lui:border-
|
|
9
|
+
lui:before:rounded-[calc(0.3125rem-1px)] lui:before:bg-surface-input lui:before:shadow-sm
|
|
10
|
+
lui:group-data-checked:before:bg-(--checkbox-checked-bg) lui:border lui:border-border-strong
|
|
11
11
|
lui:group-data-checked:border-transparent lui:group-hover:group-data-checked:border-transparent
|
|
12
|
-
lui:group-hover:border-
|
|
12
|
+
lui:group-hover:border-border-hover lui:group-data-checked:bg-(--checkbox-checked-border)
|
|
13
13
|
lui:after:absolute lui:after:inset-0 lui:after:rounded-[calc(0.3125rem-1px)] lui:after:shadow-[inset_0_1px_--theme(--color-white/15%)]
|
|
14
14
|
lui:group-data-focus:outline lui:group-data-focus:outline-2 lui:group-data-focus:outline-offset-2
|
|
15
|
-
lui:group-data-focus:outline-
|
|
16
|
-
lui:group-data-disabled:bg-
|
|
15
|
+
lui:group-data-focus:outline-focus lui:group-data-disabled:opacity-50 lui:group-data-disabled:border-border-strong
|
|
16
|
+
lui:group-data-disabled:bg-surface-hover lui:group-data-disabled:[--checkbox-check:var(--lui-theme-foreground)]/50
|
|
17
17
|
lui:group-data-disabled:before:bg-transparent lui:forced-colors:[--checkbox-check:HighlightText] lui:forced-colors:[--checkbox-checked-bg:Highlight]
|
|
18
18
|
lui:forced-colors:group-data-disabled:[--checkbox-check:Highlight]
|
|
19
|
-
lui:[--checkbox-check:var(--lui-
|
|
20
|
-
lui:[--checkbox-checked-bg:var(--lui-
|
|
21
|
-
lui:[--checkbox-checked-border:var(--
|
|
19
|
+
lui:[--checkbox-check:var(--lui-theme-foreground-invert)]
|
|
20
|
+
lui:[--checkbox-checked-bg:var(--lui-theme-surface-invert)]
|
|
21
|
+
lui:[--checkbox-checked-border:var(--lui-theme-border-invert)]"
|
|
22
22
|
>
|
|
23
23
|
<svg class="lui:size-4 lui:stroke-(--checkbox-check) lui:opacity-0 lui:group-data-checked:opacity-100 lui:sm:h-3.5 lui:sm:w-3.5" viewBox="0 0 14 14" fill="none">
|
|
24
24
|
<path class="lui:opacity-100 lui:group-data-indeterminate:opacity-0" d="M3 8L6 11L11 3.5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
<% if render_label? %>
|
|
30
30
|
<label
|
|
31
31
|
data-slot="label"
|
|
32
|
-
class="lui:text-base/6 lui:text-
|
|
32
|
+
class="lui:text-base/6 lui:text-foreground lui:select-none lui:data-disabled:opacity-50 lui:sm:text-sm/6"
|
|
33
33
|
data-action="click->lui-checkbox#toggle"
|
|
34
34
|
>
|
|
35
35
|
<%= effective_label %>
|
|
36
36
|
</label>
|
|
37
37
|
<% end %>
|
|
38
38
|
<% if @description %>
|
|
39
|
-
<p data-slot="description" class="lui:text-base/6 lui:text-
|
|
39
|
+
<p data-slot="description" class="lui:text-base/6 lui:text-foreground-muted lui:data-disabled:opacity-50 lui:sm:text-sm/6">
|
|
40
40
|
<%= @description %>
|
|
41
41
|
</p>
|
|
42
42
|
<% end %>
|