lituix 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var H0=Object.create;var Ra=Object.defineProperty;var Au=Object.getOwnPropertyDescriptor;var R0=Object.getOwnPropertyNames;var I0=Object.getPrototypeOf,V0=Object.prototype.hasOwnProperty;var ju=i=>{throw TypeError(i)};var rc=(i,o)=>()=>(i&&(o=i(i=0)),o);var D0=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),Pu=(i,o)=>{for(var e in o)Ra(i,e,{get:o[e],enumerable:!0})},Ou=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of R0(o))!V0.call(i,r)&&r!==e&&Ra(i,r,{get:()=>o[r],enumerable:!(t=Au(o,r))||t.enumerable});return i};var kn=(i,o,e)=>(e=i!=null?H0(I0(i)):{},Ou(o||!i||!i.__esModule?Ra(e,"default",{value:i,enumerable:!0}):e,i)),F0=i=>Ou(Ra({},"__esModule",{value:!0}),i),a=(i,o,e,t)=>{for(var r=t>1?void 0:t?Au(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&Ra(o,e,r),r};var Hu=(i,o,e)=>o.has(i)||ju("Cannot "+e);var ke=(i,o,e)=>(Hu(i,o,"read from private field"),e?e.call(i):o.get(i)),Ru=(i,o,e)=>o.has(i)?ju("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),Iu=(i,o,e,t)=>(Hu(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var ts,Rh=rc(()=>{ts=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function zc(i){return i==="horizontal"?"width":"height"}var Js,Ih=rc(()=>{Js=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[zc(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var Dh={};Pu(Dh,{FlowLayout:()=>el,flow:()=>fm});function Vh(i){return i==="horizontal"?"marginLeft":"marginTop"}function vm(i){return i==="horizontal"?"marginRight":"marginBottom"}function bm(i){return i==="horizontal"?"xOffset":"yOffset"}function ym(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var fm,Ec,el,Fh=rc(()=>{Rh();Ih();fm=i=>Object.assign({type:el},i);Ec=class{constructor(){this._childSizeCache=new ts,this._marginSizeCache=new ts,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][zc(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[Vh(e)]||0,s=this._metricsCache.get(r-1)?.[vm(e)]||0;this._marginSizeCache.set(r,ym(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[Vh(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},el=class extends Js{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Ec,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[bm(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ra=D0((Hc,Tn)=>{(function(i,o){typeof Hc=="object"&&typeof Tn<"u"?Tn.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Hc,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},k.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var $=function(c){return!(!c||!c.Window)&&c instanceof c.Window},z=void 0,T=void 0;function j(c){z=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return $(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&j(window);var I=function(c){return!!c&&e(c)==="object"},B=function(c){return typeof c=="function"},S={window:function(c){return c===T||$(c)},docFrag:function(c){return I(c)&&c.nodeType===11},object:I,func:B,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return I(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return I(c)&&c.length!==void 0&&B(c.splice)}};function Q(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function ye(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var De={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=De.draggable,l.map.drag=De,l.methodDict.drag="draggable",m.actions.drag=De.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":ye,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return S.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):S.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Q,move:ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},yt=De,Ee={init:function(c){var l=c;Ee.document=l.document,Ee.DocumentFragment=l.DocumentFragment||ni,Ee.SVGElement=l.SVGElement||ni,Ee.SVGSVGElement=l.SVGSVGElement||ni,Ee.SVGElementInstance=l.SVGElementInstance||ni,Ee.Element=l.Element||ni,Ee.HTMLElement=l.HTMLElement||Ee.Element,Ee.Event=l.Event,Ee.Touch=l.Touch||ni,Ee.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ni(){}var et=Ee,qr={init:function(c){var l=et.Element,u=c.navigator||{};qr.supportsTouch="ontouchstart"in c||S.func(c.DocumentTouch)&&et.document instanceof c.DocumentTouch,qr.supportsPointerEvent=u.pointerEnabled!==!1&&!!et.PointerEvent,qr.isIOS=/iP(hone|od|ad)/.test(u.platform),qr.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),qr.isIe9=/MSIE 9/.test(u.userAgent),qr.isOperaMobile=u.appName==="Opera"&&qr.supportsTouch&&/Presto/.test(u.userAgent),qr.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",qr.pEventTypes=qr.supportsPointerEvent?et.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,qr.wheelEvent=et.document&&"onmousewheel"in et.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},io=qr;function ai(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function Bn(c,l){for(;S.element(c);){if(Ci(c,l))return c;c=Uo(c)}return null}function Uo(c){var l=c.parentNode;if(S.docFrag(l)){for(;(l=l.host)&&S.docFrag(l););return l}return l}function Ci(c,l){return T!==z&&(l=l.replace(/\/deep\//g," ")),c[io.prefixedMatchesSelector](l)}var q=function(c){return c.parentNode||c.host};function ee(c,l){for(var u,m=[],g=c;(u=q(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function fe(c,l,u){for(;S.element(c);){if(Ci(c,l))return!0;if((c=Uo(c))===u)return Ci(c,l)}return!1}function Ne(c){return c.correspondingUseElement||c}function Z(c){var l=c instanceof et.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function Ae(c){var l,u=Z(c);if(!io.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ce(c){for(var l=[];c;)l.push(c),c=Uo(c);return l}function wo(c){return!!S.string(c)&&(et.document.querySelector(c),!0)}function U(c,l){for(var u in l)c[u]=l[u];return c}function en(c,l,u){return c==="parent"?Uo(u):c==="self"?l.getRect(u):Bn(u,c)}function si(c,l,u,m){var g=c;return S.string(g)?g=en(g,l,u):S.func(g)&&(g=g.apply(void 0,m)),S.element(g)&&(g=Ae(g)),g}function Go(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function li(c){return!c||"x"in c&&"y"in c||((c=U({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function tn(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function Pi(c,l,u){var m=u&&c.options[u];return Go(si(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function ci(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},S.string(c)&&c.search(" ")!==-1&&(c=qn(c)),S.array(c))return c.forEach(function(w){return ci(w,l,u,m)}),m;if(S.object(c)&&(l=c,c=""),S.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if(S.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];ci(c,b,u,m)}else if(S.object(l))for(var y in l)ci(qn(y).map(function(w){return"".concat(c).concat(w)}),l[y],u,m);return m}function qn(c){return c.trim().split(/ +/)}var za=function(c,l){return Math.sqrt(c*c+l*l)},w1=["webkit","moz"];function ys(c,l){c.__set||(c.__set={});var u=function(g){if(w1.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function ks(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function Ld(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function Bd(c){return c instanceof et.Event||c instanceof et.Touch}function xs(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function qd(c,l){return l=l||{x:0,y:0},io.isOperaMobile&&Bd(c)?(xs("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):xs("page",c,l),l}function Ea(c){return S.number(c.pointerId)?c.pointerId:c.identifier}function _1(c,l,u){var m=l.length>1?Kd(l):l[0];qd(m,c.page),function(g,v){v=v||{},io.isOperaMobile&&Bd(g)?xs("screen",g,v):xs("client",g,v)}(m,c.client),c.timeStamp=u}function Ol(c){var l=[];return S.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function Kd(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Hl(c){if(!c.length)return null;var l=Ol(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Rl(c,l){var u=l+"X",m=l+"Y",g=Ol(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return za(v,b)}function Il(c,l){var u=l+"X",m=l+"Y",g=Ol(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function Wd(c){return S.string(c.pointerType)?c.pointerType:S.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof et.Touch?"touch":"mouse"}function Ud(c){var l=S.func(c.composedPath)?c.composedPath():c.path;return[Ne(l?l[0]:c.target),Ne(c.currentTarget)]}var ws=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(ws.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Gd=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},Yd=function(c){return Gd([],c)},$a=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},Sa=function(c,l){return c[$a(c,l)]},Kn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var y=v==="dragleave"?m.prev:m.cur,w=y.element,M=y.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=$a(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var y=new u(g,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(ws);function Xd(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Vl(c,l){for(var u=function(v,b){for(var y=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var E=_.options.drop.accept;if(!(S.element(E)&&E!==b||S.string(E)&&!Ci(b,E)||S.func(E)&&!E({dropzone:_,draggableElement:b})))for(var O=0,D=_.getAllElements();O<D.length;O++){var V=D[O];V!==b&&y.push({dropzone:_,element:V,rect:_.getRect(V)})}}}return y}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function Zd(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],y=0,w=m.activeDrops;y<w.length;y++){var M=w[y],_=M.dropzone,E=M.element,O=M.rect,D=_.dropCheck(l,u,g,v,E,O);b.push(D?E:null)}var V=function(N){for(var G,K,X,pe=[],Ce=0;Ce<N.length;Ce++){var re=N[Ce],ve=N[G];if(re&&Ce!==G)if(ve){var ao=q(re),kt=q(ve);if(ao!==re.ownerDocument)if(kt!==re.ownerDocument)if(ao!==kt){pe=pe.length?pe:ee(ve);var Vo=void 0;if(ve instanceof et.HTMLElement&&re instanceof et.SVGElement&&!(re instanceof et.SVGSVGElement)){if(re===kt)continue;Vo=re.ownerSVGElement}else Vo=re;for(var di=ee(Vo,ve.ownerDocument),Ri=0;di[Ri]&&di[Ri]===pe[Ri];)Ri++;var As=[di[Ri-1],di[Ri],pe[Ri]];if(As[0])for(var Ha=As[0].lastChild;Ha;){if(Ha===As[1]){G=Ce,pe=di;break}if(Ha===As[2])break;Ha=Ha.previousSibling}}else X=ve,(parseInt(H(K=re).getComputedStyle(K).zIndex,10)||0)>=(parseInt(H(X).getComputedStyle(X).zIndex,10)||0)&&(G=Ce);else G=Ce}else G=Ce}return G}(b);return m.activeDrops[V]||null}function Dl(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new Kn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new Kn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new Kn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new Kn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new Kn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new Kn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Fl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Xd(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function Qd(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Vl(l,u.element));var b=m,y=Zd(u,b,g);v.rejected=v.rejected&&!!y&&y.dropzone===v.cur.dropzone&&y.element===v.cur.element,v.cur.dropzone=y&&y.dropzone,v.cur.element=y&&y.element,v.events=Dl(u,0,b)}}var Jd={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(yt),m.prototype.dropzone=function(v){return function(b,y){if(S.object(y)){if(b.options.drop.enabled=y.enabled!==!1,y.listeners){var w=ci(y.listeners),M=Object.keys(w).reduce(function(E,O){return E[/^(enter|leave)/.test(O)?"drag".concat(O):/^(activate|deactivate|move)/.test(O)?"drop".concat(O):O]=w[O],E},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return S.func(y.ondrop)&&b.on("drop",y.ondrop),S.func(y.ondropactivate)&&b.on("dropactivate",y.ondropactivate),S.func(y.ondropdeactivate)&&b.on("dropdeactivate",y.ondropdeactivate),S.func(y.ondragenter)&&b.on("dragenter",y.ondragenter),S.func(y.ondragleave)&&b.on("dragleave",y.ondragleave),S.func(y.ondropmove)&&b.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?b.options.drop.overlap=y.overlap:S.number(y.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(b.options.drop.accept=y.accept),"checker"in y&&(b.options.drop.checker=y.checker),b}return S.bool(y)?(b.options.drop.enabled=y,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,y,w,M,_){return function(E,O,D,V,N,G,K){var X=!1;if(!(K=K||E.getRect(G)))return!!E.options.drop.checker&&E.options.drop.checker(O,D,X,E,G,V,N);var pe=E.options.drop.overlap;if(pe==="pointer"){var Ce=Pi(V,N,"drag"),re=qd(O);re.x+=Ce.x,re.y+=Ce.y;var ve=re.x>K.left&&re.x<K.right,ao=re.y>K.top&&re.y<K.bottom;X=ve&&ao}var kt=V.getRect(N);if(kt&&pe==="center"){var Vo=kt.left+kt.width/2,di=kt.top+kt.height/2;X=Vo>=K.left&&Vo<=K.right&&di>=K.top&&di<=K.bottom}return kt&&S.number(pe)&&(X=Math.max(0,Math.min(K.right,kt.right)-Math.max(K.left,kt.left))*Math.max(0,Math.min(K.bottom,kt.bottom)-Math.max(K.top,kt.top))/(kt.width*kt.height)>=pe),E.options.drop.checker&&(X=E.options.drop.checker(O,D,X,E,G,V,N)),X}(this,v,b,y,w,M,_)},u.dynamicDrop=function(v){return S.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},U(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=Jd.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Vl(l,u.element),g.events=Dl(u,0,m),g.events.activate&&(Xd(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":Qd,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Fl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;Qd(c,l),Fl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Vl,getDrop:Zd,getDropEvents:Dl,fireDropEvents:Fl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},M1=Jd;function Nl(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",y=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Rl(g,y),u.box=Hl(g),u.scale=1,u.ds=0,u.angle=Il(g,y),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Rl(g,y),u.box=Hl(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Il(g,y),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,S.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Ll={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return S.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):S.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Ll,l.methodDict.gesture="gesturable",m.actions.gesture=Ll.defaults},listeners:{"interactions:action-start":Nl,"interactions:action-move":Nl,"interactions:action-end":Nl,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},C1=Ll;function z1(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var y=S.number(v.width)?v.width:v.right-v.left,w=S.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?y:w)/2)),y<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=y>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(y>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!S.element(m)&&(S.element(l)?l===m:fe(m,l,g))}function eu(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Oi,bn,Hi={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;Hi.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),Hi.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,y,w){return S.object(y)?(b.options.resize.enabled=y.enabled!==!1,b.setPerAction("resize",y),b.setOnEvents("resize",y),S.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?b.options.resize.axis=y.axis:y.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),S.bool(y.preserveAspectRatio)?b.options.resize.preserveAspectRatio=y.preserveAspectRatio:S.bool(y.square)&&(b.options.resize.square=y.square),b):S.bool(y)?(b.options.resize.enabled=y,b):b.options.resize}(this,v,c)},l.map.resize=Hi,l.methodDict.resize="resizable",g.actions.resize=Hi.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:U({},v),corrected:U({},v),previous:U({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),eu(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",y=m.rect,w=m._rects,M=w.start,_=w.corrected,E=w.delta,O=w.previous;if(U(O,_),b){if(U(_,y),v==="reposition"){if(_.top>_.bottom){var D=_.top;_.top=_.bottom,_.bottom=D}if(_.left>_.right){var V=_.left;_.left=_.right,_.right=V}}}else _.top=Math.min(y.top,M.bottom),_.bottom=Math.max(y.bottom,M.top),_.left=Math.min(y.left,M.right),_.right=Math.max(y.right,M.left);for(var N in _.width=_.right-_.left,_.height=_.bottom-_.top,_)E[N]=_[N]-O[N];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=E}})(c),eu(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=U({},l.coords.cur.page),y=u.options.resize;if(y&&y.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&y.mouseButtons)){if(S.object(y.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=z1(M,y.edges[M],b,l._latestPointer.eventTarget,m,g,y.margin||Hi.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=y.axis!=="y"&&b.x>g.right-Hi.defaultMargin,E=y.axis!=="x"&&b.y>g.bottom-Hi.defaultMargin;(_||E)&&(c.action={name:"resize",axes:(_?"x":"")+(E?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=Hi.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",y=0,w=["top","bottom","left","right"];y<w.length;y++){var M=w[y];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},E1=Hi,$1={id:"actions",install:function(c){c.usePlugin(C1),c.usePlugin(E1),c.usePlugin(yt),c.usePlugin(M1)}},tu=0,rn={request:function(c){return Oi(c)},cancel:function(c){return bn(c)},init:function(c){if(Oi=c.requestAnimationFrame,bn=c.cancelAnimationFrame,!Oi)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Oi=c["".concat(m,"RequestAnimationFrame")],bn=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Oi=Oi&&Oi.bind(c),bn=bn&&bn.bind(c),Oi||(Oi=function(g){var v=Date.now(),b=Math.max(0,16-(v-tu)),y=c.setTimeout(function(){g(v+b)},b);return tu=v+b,y},bn=function(g){return clearTimeout(g)})}},oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){oe.isScrolling=!0,rn.cancel(oe.i),c.autoScroll=oe,oe.interaction=c,oe.prevTime=oe.now(),oe.i=rn.request(oe.scroll)},stop:function(){oe.isScrolling=!1,oe.interaction&&(oe.interaction.autoScroll=null),rn.cancel(oe.i)},scroll:function(){var c=oe.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=ru(g.container,l,u),b=oe.now(),y=(b-oe.prevTime)/1e3,w=g.speed*y;if(w>=1){var M={x:oe.x*w,y:oe.y*w};if(M.x||M.y){var _=ou(v);S.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var E=ou(v),O={x:E.x-_.x,y:E.y-_.y};(O.x||O.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:O,interaction:c,container:v})}oe.prevTime=b}oe.isScrolling&&(rn.cancel(oe.i),oe.i=rn.request(oe.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&oe.check(l.interactable,l.prepared.name))if(l.simulation)oe.x=oe.y=0;else{var m,g,v,b,y=l.interactable,w=l.element,M=l.prepared.name,_=y.options[M].autoScroll,E=ru(_.container,y,w);if(S.window(E))b=u.clientX<oe.margin,m=u.clientY<oe.margin,g=u.clientX>E.innerWidth-oe.margin,v=u.clientY>E.innerHeight-oe.margin;else{var O=Z(E);b=u.clientX<O.left+oe.margin,m=u.clientY<O.top+oe.margin,g=u.clientX>O.right-oe.margin,v=u.clientY>O.bottom-oe.margin}oe.x=g?1:b?-1:0,oe.y=v?1:m?-1:0,oe.isScrolling||(oe.margin=_.margin,oe.speed=_.speed,oe.start(l))}}};function ru(c,l,u){return(S.string(c)?en(c,l,u):c)||H(u)}function ou(c){return S.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var S1={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=oe,oe.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=oe.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,oe.stop(),oe.interaction&&(oe.interaction=null)},"interactions:stop":oe.stop,"interactions:action-move":function(c){return oe.onInteractionMove(c)}}},T1=S1;function Ta(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Bl(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function A1(c){return S.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function j1(c){return S.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var P1={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(y,w,M,_,E){var O=y.getRect(_),D=w.buttons||{0:1,1:4,3:8,4:16}[w.button],V={action:null,interactable:y,interaction:M,element:_,rect:O,buttons:D};return E.fire("auto-start:check",V),V.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=Ta(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=Ta(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=j1,l.prototype.styleCursor=A1}};function iu(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&_s(l,u,c,g)?c:null}function O1(c,l,u,m,g,v,b){for(var y=0,w=m.length;y<w;y++){var M=m[y],_=g[y],E=M.getAction(l,u,c,_);if(E){var O=iu(E,M,_,v,b);if(O)return{action:O,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function nu(c,l,u,m,g){var v=[],b=[],y=m;function w(_){v.push(_),b.push(y)}for(;S.element(y);){v=[],b=[],g.interactables.forEachMatch(y,w);var M=O1(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;y=Uo(y)}return{action:null,interactable:null,element:null}}function au(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Bl(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,lu(c,u),u.fire("autoStart:prepared",{interaction:c})}function _s(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,y=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&y))return!1;for(var E=0,O=m.interactions.list;E<O.length;E++){var D=O[E],V=D.prepared.name;if(D.interacting()&&(++w>=y||D.interactable===c&&((M+=V===u.name?1:0)>=v||D.element===l&&(_++,V===u.name&&_>=b))))return!1}return y>0}function su(c,l){return S.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function ql(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function lu(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=S.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}ql(c.element,v||"",l)}else l.autoStart.cursorElement&&ql(l.autoStart.cursorElement,"",l)}var H1={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(P1),u.base.actionChecker=null,u.base.styleCursor=!0,U(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return su(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:_s,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||au(u,nu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||au(g,nu(g,v,b,y,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!_s(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),lu(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&ql(u.element,"",l)}},maxInteractions:su,withinInteractionLimit:_s,validateAction:iu},Kl=H1,R1={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),y=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>y?"x":b<y?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var E=m,O=function(V){if(V!==u.interactable){var N=u.interactable.options.drag;if(!N.manualStart&&V.testIgnoreAllow(N,E,m)){var G=V.getAction(u.downPointer,u.downEvent,u,E);if(G&&G.name==="drag"&&function(K,X){if(!X)return!1;var pe=X.options.drag.startAxis;return K==="xy"||pe==="xy"||pe===K}(_,V)&&Kl.validateAction(G,V,E,m,l))return V}}};S.element(E);){var D=l.interactables.forEachMatch(E,O);if(D){u.prepared.name="drag",u.interactable=D,u.element=E;break}E=Uo(E)}}}}}};function Wl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var I1={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(Kl),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Wl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Wl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Wl},V1=I1,D1={id:"auto-start",install:function(c){c.usePlugin(Kl),c.usePlugin(V1),c.usePlugin(R1)}},F1=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):S.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function N1(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var cu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=F1,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var y=H(v.target).document,w=g.getDocOptions(y);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||S.element(v.target)&&Ci(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||ai(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=N1,c},{})};function Ms(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function Wn(c){var l={};for(var u in c){var m=c[u];S.plainObject(m)?l[u]=Wn(m):S.array(m)?l[u]=Yd(m):l[u]=m}return l}var Ul=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=Cs(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,y=function(M){var _=M.interactable.options[M.prepared.name],E=_.modifiers;return E&&E.length?E:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(O){var D=_[O];return D&&D.enabled&&{options:D,methods:D._methods}}).filter(function(O){return!!O})}(b);this.prepareStates(y),this.startEdges=U({},b.edges),this.edges=U({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=Cs(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=U({},l.pageCoords),l.rect=U({},v),l.edges=U({},b);for(var y=g?this.states.slice(g):this.states,w=Cs(l.coords,l.rect),M=0;M<y.length;M++){var _,E=y[M],O=E.options,D=U({},l.coords),V=null;(_=E.methods)!=null&&_.set&&this.shouldDo(O,m,u)&&(l.state=E,V=E.methods.set(l),tn(l.edges,l.rect,{x:l.coords.x-D.x,y:l.coords.y-D.y})),w.eventProps.push(V)}U(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var N=this.result.coords,G=this.result.rect;if(N&&G){var K=w.rect.left!==G.left||w.rect.right!==G.right||w.rect.top!==G.top||w.rect.bottom!==G.bottom;w.changed=K||N.x!==w.coords.x||N.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,y=this.startDelta,w=b.delta;m==="start"&&U(this.startDelta,b.delta);for(var M=0,_=[[v,y],[g,w]];M<_.length;M++){var E=_[M],O=E[0],D=E[1];O.page.x+=D.x,O.page.y+=D.y,O.client.x+=D.x,O.client.y+=D.y}var V=this.result.rectDelta,N=l.rect||u.rect;N.left+=V.left,N.right+=V.right,N.top+=V.top,N.bottom+=V.bottom,N.width=N.right-N.left,N.height=N.bottom-N.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var y=u.coords.cur.page,w={x:l.modifiedCoords.x-y.x,y:l.modifiedCoords.y-y.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var y=g[b];l.state=y;var w=y.options,M=y.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=U({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,y=v.result,w=y.delta,M=y.rectDelta,_=0,E=[[m.start,b],[m.cur,w]];_<E.length;_++){var O=E[_],D=O[0],V=O[1];D.page.x-=V.x,D.page.y-=V.y,D.client.x-=V.x,D.client.y-=V.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return Wn(u)}),this.result=Cs(U({},l.result.coords),U({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function Cs(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function on(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var y in b.enabled=b.enabled!==!1,u)y in b||(b[y]=u[y]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function Aa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var L1={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Ul(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":Aa,"interactions:action-move":Aa,"interactions:action-end":Aa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},du=L1,uu={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Gl=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,y=y||m.element;var E=m.interactable,O=(E&&E.options||uu).deltaSource,D=Pi(E,y,v),V=b==="start",N=b==="end",G=V?f(_):m.prevEvent,K=V?m.coords.start:N?{page:G.page,client:G.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=U({},K.page),_.client=U({},K.client),_.rect=U({},m.rect),_.timeStamp=K.timeStamp,N||(_.page.x-=D.x,_.page.y-=D.y,_.client.x-=D.x,_.client.y-=D.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=y,_.currentTarget=y,_.preEnd=w,_.type=M||v+(b||""),_.interactable=E,_.t0=V?m.pointers[m.pointers.length-1].downTime:G.t0,_.x0=m.coords.start.page.x-D.x,_.y0=m.coords.start.page.y-D.y,_.clientX0=m.coords.start.client.x-D.x,_.clientY0=m.coords.start.client.y-D.y,_.delta=V||N?{x:0,y:0}:{x:_[O].x-G[O].x,y:_[O].y-G[O].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=U({},m.coords.velocity[O]),_.speed=za(_.velocity.x,_.velocity.y),_.swipe=N||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(ws);Object.defineProperties(Gl.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var B1=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),q1=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),hu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),K1=0,W1=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Ta(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=K1++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var y in q1)b(y);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in hu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Bl(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?U({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=za(g,v)>this.pointerMoveTolerance);var y,w,M,_=this.getPointerIndex(l),E={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(y=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),y.page.x=w.page.x/M,y.page.y=w.page.y/M,y.client.x=w.client.x/M,y.client.y=w.client.y/M,y.timeStamp=M),this._scopeFire("interactions:move",E),b||this.simulation||(this.interacting()&&(E.type=null,this.move(E)),this.pointerWasMoved&&ks(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||Ld(this.coords.delta),(l=U({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Ea(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$a(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,y,w=Ea(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new B1(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),_1(this.coords.cur,this.pointers.map(function(E){return E.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,y=this.coords.cur,v.page.x=y.page.x-b.page.x,v.page.y=y.page.y-b.page.y,v.client.x=y.client.x-b.client.x,v.client.y=y.client.y-b.client.y,v.timeStamp=y.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ys(this.downPointer,l),this.interacting()||(ks(this.coords.start,this.coords.cur),ks(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Gl(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(tn(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var y=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function pu(c){mu(c.interaction)}function mu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Yl(c.coords.cur,l),Yl(c.coords.delta,l),tn(c.edges,c.rect,l),l.x=0,l.y=0,!0}function U1(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Yl(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}hu.offsetBy="";var G1={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=U1},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Yl(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":pu,"interactions:before-action-move":pu,"interactions:before-action-end":function(c){var l=c.interaction;if(mu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},gu=G1,Y1=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=zs(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=za(g.x,g.y),b=this.modification||(this.modification=new Ul(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=zs(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(y),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=rn.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,y,w=this,M=this.interaction,_=zs(M).resistance,E=(M._now()-this.t0)/1e3;if(E<this.te){var O,D=1-(Math.exp(-_*E)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,O={x:fu(y=D,l,m,v),y:fu(y,u,g,b)}):O={x:this.targetOffset.x*D,y:this.targetOffset.y*D};var V={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=V.x,this.currentOffset.y+=V.y,M.offsetBy(V),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=zs(u).smoothEndDuration;if(m<g){var v={x:vu(m,0,this.targetOffset.x,g),y:vu(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),ks(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rn.cancel(this.timeout)}}]),c}();function zs(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var X1={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(gu),c.usePlugin(du),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new Y1(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;S.element(g);){if(g===l.element){m.resume(c);break}g=Uo(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":Aa,"interactions:action-inertiastart":Aa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function fu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function vu(c,l,u,m){return-u*(c/=m)*(c-2)+l}var Z1=X1;function bu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var yu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=U({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&bu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&bu(l,u)}},{key:"on",value:function(l,u){var m=ci(l,u);for(l in m)this.types[l]=Gd(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=ci(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var y=b[v],w=g.indexOf(y);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),Q1=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ys(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function ja(c){return S.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Es(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var J1={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:y,addDelegate:function(_,E,O,D,V){var N=ja(V);if(!m[O]){m[O]=[];for(var G=0;G<g.length;G++){var K=g[G];b(K,O,w),b(K,O,M,!0)}}var X=m[O],pe=Sa(X,function(Ce){return Ce.selector===_&&Ce.context===E});pe||(pe={selector:_,context:E,listeners:[]},X.push(pe)),pe.listeners.push({func:D,options:N})},removeDelegate:function(_,E,O,D,V){var N,G=ja(V),K=m[O],X=!1;if(K)for(N=K.length-1;N>=0;N--){var pe=K[N];if(pe.selector===_&&pe.context===E){for(var Ce=pe.listeners,re=Ce.length-1;re>=0;re--){var ve=Ce[re];if(ve.func===D&&Es(ve.options,G)){Ce.splice(re,1),Ce.length||(K.splice(N,1),y(E,O,w),y(E,O,M,!0)),X=!0;break}}if(X)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,E,O,D){if(_.addEventListener){var V=ja(D),N=Sa(u,function(G){return G.eventTarget===_});N||(N={eventTarget:_,events:{}},u.push(N)),N.events[E]||(N.events[E]=[]),Sa(N.events[E],function(G){return G.func===O&&Es(G.options,V)})||(_.addEventListener(E,O,v.supportsOptions?V:V.capture),N.events[E].push({func:O,options:V}))}}function y(_,E,O,D){if(_.addEventListener&&_.removeEventListener){var V=$a(u,function(ao){return ao.eventTarget===_}),N=u[V];if(N&&N.events)if(E!=="all"){var G=!1,K=N.events[E];if(K){if(O==="all"){for(var X=K.length-1;X>=0;X--){var pe=K[X];y(_,E,pe.func,pe.options)}return}for(var Ce=ja(D),re=0;re<K.length;re++){var ve=K[re];if(ve.func===O&&Es(ve.options,Ce)){_.removeEventListener(E,O,v.supportsOptions?Ce:Ce.capture),K.splice(re,1),K.length===0&&(delete N.events[E],G=!0);break}}}G&&!Object.keys(N.events).length&&u.splice(V,1)}else for(E in N.events)N.events.hasOwnProperty(E)&&y(_,E,"all")}}function w(_,E){for(var O=ja(E),D=new Q1(_),V=m[_.type],N=Ud(_)[0],G=N;S.element(G);){for(var K=0;K<V.length;K++){var X=V[K],pe=X.selector,Ce=X.context;if(Ci(G,pe)&&ai(Ce,N)&&ai(Ce,G)){var re=X.listeners;D.currentTarget=G;for(var ve=0;ve<re.length;ve++){var ao=re[ve];Es(ao.options,O)&&ao.func(D)}}}G=Uo(G)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Xl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Xl.methodOrder;l<u.length;l++){var m=u[l],g=Xl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var y=b[v],w=m;if(y.simulation&&y.simulation.allowResume&&y.pointerType===l)for(;w;){if(w===y.element)return y;w=Uo(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,y=v.interactions.list;b<y.length;b++){var w=y[b];if(w.pointerType===m){if(w.simulation&&!ku(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var E=_[M];if(!(E.pointerType!==m||/down/i.test(g)&&E.simulation))return E}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(ku(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function ku(c,l){return c.pointers.some(function(u){return u.id===l})}var e0=Xl,Zl=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function xu(c,l){return function(u){var m=l.interactions.list,g=Wd(u),v=Ud(u),b=v[0],y=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var E=_[M],O={pointer:E,pointerId:Ea(E),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:y,scope:l},D=wu(O);w.push([O.pointer,O.eventTarget,O.curEventTarget,D])}}else{var V=!1;if(!io.supportsPointerEvent&&/mouse/.test(u.type)){for(var N=0;N<m.length&&!V;N++)V=m[N].pointerType!=="mouse"&&m[N].pointerIsDown;V=V||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!V){var G={pointer:u,pointerId:Ea(u),pointerType:g,eventType:u.type,curEventTarget:y,eventTarget:b,scope:l},K=wu(G);w.push([G.pointer,G.eventTarget,G.curEventTarget,K])}}for(var X=0;X<w.length;X++){var pe=w[X],Ce=pe[0],re=pe[1],ve=pe[2];pe[3][c](Ce,u,re,ve)}}}function wu(c){var l=c.pointerType,u=c.scope,m={interaction:e0.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function Ql(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,y=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)y(u,w,b.delegateListener),y(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var E=v[_];y(u,E.type,E.listener,M)}}var t0={id:"core/interactions",install:function(c){for(var l={},u=0;u<Zl.length;u++){var m=Zl[u];l[m]=xu(m,c)}var g,v=io.pEventTypes;function b(){for(var y=0,w=c.interactions.list;y<w.length;y++){var M=w[y];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var D=O[E];c.documents.some(function(V){return ai(V.doc,D.downTarget)})||M.removePointer(D.pointer,D.event)},E=0,O=M.pointers;E<O.length;E++)_()}}(g=et.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(y){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(y)}}),c.prevTouchTime=0,c.Interaction=function(y){d(M,y);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(W1),c.interactions={list:[],new:function(y){y.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(y);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(cu)},listeners:{"scope:add-document":function(c){return Ql(c,"add")},"scope:remove-document":function(c){return Ql(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:Ql,doOnInteractions:xu,methodNames:Zl},r0=t0,nn=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(nn||{}),o0=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new yu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H(wo(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return S.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),S.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),S.func(u.onend)&&this.on("".concat(l,"end"),u.onend),S.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,y=function(w){return(b==null||b(w))&&Ms(w,v._actions)};(S.array(u)||S.object(u))&&this._onOff(nn.Off,l,u,void 0,y),(S.array(m)||S.object(m))&&this._onOff(nn.On,l,m,void 0,y)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],y=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,y),S.array(y)?b[v]=Yd(y):S.plainObject(y)?(b[v]=U(b[v]||{},Wn(y)),S.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=y.enabled!==!1)):S.bool(y)&&S.object(m.perAction[v])?b[v].enabled=y:b[v]=y}}},{key:"getRect",value:function(l){return l=l||(S.element(this.target)?this.target:null),S.string(this.target)&&(l=l||this._context.querySelector(this.target)),Ae(l)}},{key:"rectChecker",value:function(l){var u=this;return S.func(l)?(this.getRect=function(m){var g=U({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if(wo(u)||S.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return S.string(l)?Array.from(this._context.querySelectorAll(l)):S.func(l)&&l.getAllElements?l.getAllElements():S.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||ai(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!S.element(m)&&(S.string(l)?fe(m,l,u):!!S.element(l)&&ai(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!S.element(m))&&(S.string(l)?fe(m,l,u):!!S.element(l)&&ai(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){S.object(u)&&!S.array(u)&&(g=m,m=null);var b=ci(u,m,v);for(var y in b){y==="wheel"&&(y=io.wheelEvent);for(var w=0,M=b[y];w<M.length;w++){var _=M[w];Ms(y,this._actions)?this.events[l===nn.On?"on":"off"](y,_):S.string(this.target)?this._scopeEvents[l===nn.On?"addDelegate":"removeDelegate"](this.target,this._context,y,_,g):this._scopeEvents[l===nn.On?"add":"remove"](this.target,y,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(nn.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(nn.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in S.object(l)||(l={}),this.options=Wn(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,U(U({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?S.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,y=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=y.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,y[w][0],y[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),i0=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=S.string(v)?u.selectorMap[v]:v[u.scope.id],y=$a(b,function(w){return w===g});b.splice(y,1)}})}return n(c,[{key:"new",value:function(l,u){u=U(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),S.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=S.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return Sa(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if((S.string(v.target)?S.element(l)&&Ci(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),n0=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=io,this.defaults=Wn(uu),this.Eventable=yu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,y){var w=m.interactables.getExisting(b,y);return w||((w=m.interactables.new(b,y)).events.global=v.globalEvents),w};return g.getPointerAverage=Kd,g.getTouchBBox=Hl,g.getTouchDistance=Rl,g.getTouchAngle=Il,g.getElementRect=Ae,g.getElementClientRect=Z,g.matchesSelector=Ci,g.closest=Bn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=Ta(function(v,b,y){if(S.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),S.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,y)}return this}if(S.object(v)){for(var E in v)this.on(E,v[E],b);return this}return Ms(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:y}),this},"The interact.on() method is being deprecated"),g.off=Ta(function(v,b,y){if(S.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),S.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,y)}return this}if(S.object(v)){for(var E in v)this.off(E,v[E],b);return this}var O;return Ms(v,this.scope.actions)?v in this.globalEvents&&(O=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(O,1):this.scope.events.remove(this.scope.document,v,b,y),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return io.supportsTouch},g.supportsPointerEvent=function(){return io.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return S.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Gl,this.Interactable=void 0,this.interactables=new i0(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return k(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){k(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(o0)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,S.window(m)&&j(m),et.init(m),io.init(m),rn.init(m),u.window=m,u.document=m.document,u.usePlugin(r0),u.usePlugin(J1),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(y,w){return y[w]=!0,y[_u(w)]=!0,y},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[_u(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?U({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function _u(c){return c&&c.replace(/\/.*$/,"")}var Mu=new n0,no=Mu.interactStatic,a0=typeof globalThis<"u"?globalThis:window;Mu.init(a0);var s0=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,y=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},E=0;E<l.length;E++){var O=l[E],D=O[0],V=O[1],N=Math.round((m-M.x)/c[D]),G=Math.round((g-M.y)/c[V]);_[D]=Math.max(y.left,Math.min(y.right,N*c[D]+M.x)),_[V]=Math.max(y.top,Math.min(y.bottom,G*c[V]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),l0={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=U(l.snappers||{},s0),l.createSnapGrid=l.snappers.grid}},c0=l0,d0={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,y=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=U({},g),l.startRect=U({},u),l.ratio=b,l.equalDelta=M;var E=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var O=(E.left?1:-1)*(E.top?1:-1);l.edgeSign={x:O,y:O}}else l.edgeSign={x:E.left?-1:1,y:E.top?-1:1};if(y!==!1&&U(m,E),_!=null&&_.length){var D=new Ul(c.interaction);D.copyFrom(c.interaction.modification),D.prepareStates(_),l.subModification=D,D.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=U({},m),b=l.equalDelta?u0:h0;if(U(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var y=U({},u);tn(g,y,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:y,edges:g,pageCoords:m,prevCoords:m,prevRect:y})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),U(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function u0(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function h0(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,y=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*y.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*y.x}}var p0=on(d0,"aspectRatio"),Cu=function(){};Cu._defaults={};var $s=Cu;function yn(c,l,u){return S.func(c)?si(c,l.interactable,l.element,[u.x,u.y,l]):si(c,l.interactable,l.element)}var Ss={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,y=b.elementRect,w=U({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&y){var M=yn(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,E=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),E<0&&(w.top+=E,w.bottom+=E)}w.left+=u.left-l.width*y.left,w.top+=u.top-l.height*y.top,w.right+=u.right-l.width*(1-y.right),w.bottom+=u.bottom-l.height*(1-y.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=yn(g.restriction,u,l);if(b){var y=function(w){return!w||"left"in w&&"top"in w||((w=U({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(y.right-v.right,l.x),y.left+v.left),l.y=Math.max(Math.min(y.bottom-v.bottom,l.y),y.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},m0=on(Ss,"restrict"),zu={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Eu={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function $u(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var Pa={noInner:zu,noOuter:Eu,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Go(yn(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var y=U({},l),w=yn(b.inner,m,y)||{},M=yn(b.outer,m,y)||{};$u(w,zu),$u(M,Eu),u.top?l.y=Math.min(Math.max(M.top+v.top,y.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,y.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,y.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,y.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},g0=on(Pa,"restrictEdges"),f0=U({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Ss.defaults),v0=on({start:Ss.start,set:Ss.set,defaults:f0},"restrictRect"),b0={width:-1/0,height:-1/0},y0={width:1/0,height:1/0},k0=on({start:function(c){return Pa.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=li(yn(v.min,l,c.coords))||b0,y=li(yn(v.max,l,c.coords))||y0;u.options={endOnly:v.endOnly,inner:U({},Pa.noInner),outer:U({},Pa.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-y.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+y.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-y.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+y.width),Pa.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Jl={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,y=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(O){var D=O.interaction.element,V=Go(si(O.state.options.origin,null,null,[D])),N=V||Pi(O.interactable,D,O.interaction.prepared.name);return N}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=si(w.offset,m,g,[u]);(l=Go(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var E=w.relativePoints;b.offsets=v&&E&&E.length?E.map(function(O,D){return{index:D,relativePoint:O,x:y.left-v.width*O.x+l.x,y:y.top-v.height*O.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=Pi(l.interactable,l.element,l.prepared.name),y=U({},u),w=[];g.offsetWithOrigin||(y.x-=b.x,y.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var E=_[M],O=y.x-E.x,D=y.y-E.y,V=0,N=g.targets.length;V<N;V++){var G=g.targets[V],K=void 0;(K=S.func(G)?G(O,D,l._proxy,E,V):G)&&w.push({x:(S.number(K.x)?K.x:O)+E.x,y:(S.number(K.y)?K.y:D)+E.y,range:S.number(K.range)?K.range:g.range,source:G,index:V,offset:E})}for(var X={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},pe=0;pe<w.length;pe++){var Ce=w[pe],re=Ce.range,ve=Ce.x-y.x,ao=Ce.y-y.y,kt=za(ve,ao),Vo=kt<=re;re===1/0&&X.inRange&&X.range!==1/0&&(Vo=!1),X.target&&!(Vo?X.inRange&&re!==1/0?kt/re<X.distance/X.range:re===1/0&&X.range!==1/0||kt<X.distance:!X.inRange&&kt<X.distance)||(X.target=Ce,X.distance=kt,X.range=re,X.inRange=Vo,X.delta.x=ve,X.delta.y=ao)}return X.inRange&&(u.x=X.target.x,u.y=X.target.y),m.closest=X,X},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},x0=on(Jl,"snap"),Ts={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],Jl.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=U({},g),u.options.targets=[];for(var y=0,w=g.targets||[];y<w.length;y++){var M=w[y],_=void 0;if(_=S.func(M)?M(b.x,b.y,l):M){for(var E=0,O=u.targetFields;E<O.length;E++){var D=O[E],V=D[0],N=D[1];if(V in _||N in _){_.x=_[V],_.y=_[N];break}}u.options.targets.push(_)}}var G=Jl.set(c);return u.options=g,G},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},w0=on(Ts,"snapSize"),ec={aspectRatio:p0,restrictEdges:g0,restrict:m0,restrictRect:v0,restrictSize:k0,snapEdges:on({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],Ts.start(c)):null},set:Ts.set,defaults:U(Wn(Ts.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:x0,snapSize:w0,spring:$s,avoid:$s,transform:$s,rubberband:$s},_0={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(du),c.usePlugin(c0),l.modifiers=ec,ec){var m=ec[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},M0=_0,Su=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w){var M;if(t(this,u),ys(f(M=l.call(this,y)),v),v!==g&&ys(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Ea(g),M.pointerType=Wd(g),M.target=b,M.currentTarget=null,m==="tap"){var _=y.getPointerIndex(g);M.dt=M.timeStamp-y.pointers[_].downTime;var E=M.timeStamp-y.tapTime;M.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===M.target&&E<500}else m==="doubletap"&&(M.dt=g.timeStamp-y.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(ws),Oa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=Oa,c.defaults.actions.pointerEvents=Oa.defaults,U(c.actions.phaselessTypes,Oa.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&tc(c),an({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ce(y),E={interaction:g,pointer:v,event:b,eventTarget:y,type:"hold",targets:[],path:_,node:null},O=0;O<_.length;O++){var D=_[O];E.node=D,m.fire("pointerEvents:collect-targets",E)}if(E.targets.length){for(var V=1/0,N=0,G=E.targets;N<G.length;N++){var K=G[N].eventable.options.holdDuration;K<V&&(V=K)}M.duration=V,M.timeout=setTimeout(function(){an({interaction:g,eventTarget:y,pointer:v,event:b,type:"hold"},m)},V)}})(c,l),an(c,l)},"interactions:up":function(c,l){tc(c),an(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerWasMoved||an({interaction:g,eventTarget:y,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){tc(c),an(c,l)}},PointerEvent:Su,fire:an,collectEventTargets:Tu,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function an(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=c.targets,w=y===void 0?Tu(c,l):y,M=new Su(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},E=0;E<w.length;E++){var O=w[E];for(var D in O.props||{})M[D]=O.props[D];var V=Pi(O.eventable,O.node);if(M._subtractOrigin(V),M.eventable=O.eventable,M.currentTarget=O.node,O.eventable.fire(M),M._addOrigin(V),M.immediatePropagationStopped||M.propagationStopped&&E+1<w.length&&w[E+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var N=M.double?an({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=N,u.tapTime=N.timeStamp}return M}function Tu(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=u.getPointerIndex(m),w=u.pointers[y];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ce(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},E=0;E<M.length;E++){var O=M[E];_.node=O,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(D){var V,N;return D.eventable.options.holdDuration===((V=u.pointers[y])==null||(N=V.hold)==null?void 0:N.duration)})),_.targets}function tc(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var C0=Object.freeze({__proto__:null,default:Oa});function z0(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var E0={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(Oa);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=z0,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},$0=E0,S0={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return U(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var y=b.events,w=y.options;y.types[g]&&y.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:y,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;U(u.events.options,l.pointerEvents.defaults),U(u.events.options,m.pointerEvents||{})}}},T0=S0,A0={id:"pointer-events",install:function(c){c.usePlugin(C0),c.usePlugin($0),c.usePlugin(T0)}},j0=A0,P0={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),y=v.window.Promise,w=y?[]:null,M=function(){var E=b[_],O=m.getRect(E);if(!O)return 1;var D,V=Sa(v.interactions.list,function(K){return K.interacting()&&K.interactable===m&&K.element===E&&K.prepared.name===g.name});if(V)V.move(),w&&(D=V._reflowPromise||new y(function(K){V._reflowResolve=K}));else{var N=li(O),G=function(K){return{coords:K,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:N.x,y:N.y},client:{x:N.x,y:N.y},timeStamp:v.now()});D=function(K,X,pe,Ce,re){var ve=K.interactions.new({pointerType:"reflow"}),ao={interaction:ve,event:re,pointer:re,eventTarget:pe,phase:"reflow"};ve.interactable=X,ve.element=pe,ve.prevEvent=re,ve.updatePointer(re,re,pe,!0),Ld(ve.coords.delta),Bl(ve.prepared,Ce),ve._doPhase(ao);var kt=K.window,Vo=kt.Promise,di=Vo?new Vo(function(Ri){ve._reflowResolve=Ri}):void 0;return ve._reflowPromise=di,ve.start(Ce,X,pe),ve._interacting?(ve.move(ao),ve.end(re)):(ve.stop(),ve._reflowResolve()),ve.removePointer(re,re),di}(v,m,E,g,G)}w&&w.push(D)},_=0;_<b.length&&!M();_++);return w&&y.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},O0=P0;if(no.use(cu),no.use(gu),no.use(j0),no.use(Z1),no.use(M0),no.use(D1),no.use($1),no.use(T1),no.use(O0),no.default=no,(typeof Tn>"u"?"undefined":e(Tn))==="object"&&Tn)try{Tn.exports=no}catch{}return no.default=no,no})});var Kf={};Pu(Kf,{BP:()=>md,LuiAlert:()=>Fr,LuiAutocomplete:()=>mt,LuiAvatar:()=>St,LuiAvatarGroup:()=>ir,LuiBackground:()=>ct,LuiBadge:()=>rr,LuiBreadcrumb:()=>Xt,LuiBreadcrumbItem:()=>_r,LuiButton:()=>Rt,LuiButtonGroup:()=>Ge,LuiButtonGroupItem:()=>It,LuiCalendar:()=>Dr,LuiCard:()=>Gt,LuiCascader:()=>ht,LuiCheckbox:()=>Ut,LuiCheckboxGroup:()=>Cr,LuiCol:()=>mo,LuiCollapse:()=>Eo,LuiCollapseItem:()=>Yr,LuiColorPicker:()=>ot,LuiCommandPalette:()=>lr,LuiConfigProvider:()=>pr,LuiContextMenu:()=>Re,LuiDateRangePicker:()=>Oo,LuiDatepicker:()=>_t,LuiDialog:()=>Me,LuiDivider:()=>Or,LuiDrawer:()=>it,LuiDropdown:()=>Fi,LuiDropmenu:()=>$e,LuiEmptyState:()=>Do,LuiFileInput:()=>Ao,LuiForm:()=>Bt,LuiFormItem:()=>sr,LuiIcon:()=>Oe,LuiIconPicker:()=>Se,LuiImage:()=>Ie,LuiImageCropper:()=>wt,LuiInput:()=>He,LuiInputNumber:()=>Lt,LuiInputOpt:()=>Rr,LuiMenu:()=>Xo,LuiMenuDivider:()=>En,LuiMenuItem:()=>er,LuiOption:()=>gi,LuiOptionGroup:()=>dn,LuiOverlayRoot:()=>Zn,LuiPagination:()=>Ye,LuiPopconfirm:()=>bt,LuiPopover:()=>te,LuiProgress:()=>Qt,LuiQrcode:()=>gr,LuiRadio:()=>zr,LuiRadioGroup:()=>Vr,LuiRow:()=>ti,LuiScrollArea:()=>Nt,LuiSelect:()=>me,LuiSkeleton:()=>jr,LuiSlider:()=>ut,LuiSpinner:()=>_o,LuiSplitter:()=>ro,LuiStatistic:()=>$t,LuiSwitch:()=>fo,LuiTab:()=>Vt,LuiTabPanel:()=>zo,LuiTable:()=>Y,LuiTableColumn:()=>br,LuiTabs:()=>aa,LuiTag:()=>lo,LuiText:()=>Xe,LuiTextarea:()=>dt,LuiToast:()=>cr,LuiTooltip:()=>Gr,LuiTree:()=>le,LuiTreeSelect:()=>pt,baseStyles:()=>P,bringOverlayStackToFront:()=>Et,builtinIconCollection:()=>Ns,builtinIconNames:()=>Ka,builtinIconPrefix:()=>xn,builtinTranslations:()=>Ac,commandPalette:()=>l1,contextMenu:()=>f1,createCommandPalette:()=>Cl,createContextMenu:()=>vs,createDialog:()=>Ca,createDialogForm:()=>Pd,createDrawer:()=>El,createForm:()=>p1,createPopover:()=>Al,createTable:()=>Nd,createToastHost:()=>Dd,dialog:()=>d1,drawer:()=>c1,encodeQr:()=>_l,ensureOverlayExternalLayer:()=>Sr,ensureOverlayLayer:()=>Xs,ensureOverlayRoot:()=>Ys,eventPathContainsOwnedOverlay:()=>Cn,form:()=>m1,formatDate:()=>Y2,formatSize:()=>G2,getLocale:()=>_m,hasRecentOverlayInteraction:()=>Xa,hideAllContextMenus:()=>Rd,isImageIconSource:()=>Ls,isOverlayTopmost:()=>Qa,markOverlayInteraction:()=>Ya,mergeTranslations:()=>ne,normalizeStatus:()=>Nn,onLocaleChange:()=>xe,popover:()=>v1,registerFormField:()=>Bp,registerOverlayStack:()=>Jt,registerTranslations:()=>Oc,resolveBuiltinIcon:()=>Gn,resolveBuiltinTranslations:()=>Gh,resolveOverlayLayerRegistration:()=>zn,setLocale:()=>Pc,setOverlayOwner:()=>wc,setupBuiltinIcons:()=>Wa,showContextMenu:()=>Hd,statusColorToken:()=>e1,statusColorVar:()=>Lg,statusIcon:()=>ji,statusOrder:()=>Bg,t:()=>Mm,table:()=>x1,toCssLength:()=>Ot,toast:()=>Ji,tokens:()=>A,translate:()=>ae,unregisterFormField:()=>qp,unregisterOverlayStack:()=>Yo});module.exports=F0(Kf);var so=require("lit"),dr=require("lit/decorators.js");var oc=require("lit"),A=oc.css`
1
+ "use strict";var H0=Object.create;var Ra=Object.defineProperty;var Au=Object.getOwnPropertyDescriptor;var R0=Object.getOwnPropertyNames;var I0=Object.getPrototypeOf,V0=Object.prototype.hasOwnProperty;var ju=i=>{throw TypeError(i)};var rc=(i,o)=>()=>(i&&(o=i(i=0)),o);var D0=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),Pu=(i,o)=>{for(var e in o)Ra(i,e,{get:o[e],enumerable:!0})},Ou=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of R0(o))!V0.call(i,r)&&r!==e&&Ra(i,r,{get:()=>o[r],enumerable:!(t=Au(o,r))||t.enumerable});return i};var kn=(i,o,e)=>(e=i!=null?H0(I0(i)):{},Ou(o||!i||!i.__esModule?Ra(e,"default",{value:i,enumerable:!0}):e,i)),F0=i=>Ou(Ra({},"__esModule",{value:!0}),i),a=(i,o,e,t)=>{for(var r=t>1?void 0:t?Au(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&Ra(o,e,r),r};var Hu=(i,o,e)=>o.has(i)||ju("Cannot "+e);var ke=(i,o,e)=>(Hu(i,o,"read from private field"),e?e.call(i):o.get(i)),Ru=(i,o,e)=>o.has(i)?ju("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),Iu=(i,o,e,t)=>(Hu(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var ts,Rh=rc(()=>{ts=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function zc(i){return i==="horizontal"?"width":"height"}var Js,Ih=rc(()=>{Js=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[zc(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var Dh={};Pu(Dh,{FlowLayout:()=>el,flow:()=>fm});function Vh(i){return i==="horizontal"?"marginLeft":"marginTop"}function vm(i){return i==="horizontal"?"marginRight":"marginBottom"}function bm(i){return i==="horizontal"?"xOffset":"yOffset"}function ym(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var fm,Ec,el,Fh=rc(()=>{Rh();Ih();fm=i=>Object.assign({type:el},i);Ec=class{constructor(){this._childSizeCache=new ts,this._marginSizeCache=new ts,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][zc(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[Vh(e)]||0,s=this._metricsCache.get(r-1)?.[vm(e)]||0;this._marginSizeCache.set(r,ym(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[Vh(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},el=class extends Js{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Ec,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[bm(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ra=D0((Hc,Tn)=>{(function(i,o){typeof Hc=="object"&&typeof Tn<"u"?Tn.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Hc,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},k.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var $=function(c){return!(!c||!c.Window)&&c instanceof c.Window},z=void 0,T=void 0;function j(c){z=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return $(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&j(window);var I=function(c){return!!c&&e(c)==="object"},B=function(c){return typeof c=="function"},S={window:function(c){return c===T||$(c)},docFrag:function(c){return I(c)&&c.nodeType===11},object:I,func:B,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return I(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return I(c)&&c.length!==void 0&&B(c.splice)}};function Q(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function ye(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var De={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=De.draggable,l.map.drag=De,l.methodDict.drag="draggable",m.actions.drag=De.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":ye,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return S.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):S.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Q,move:ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},yt=De,Ee={init:function(c){var l=c;Ee.document=l.document,Ee.DocumentFragment=l.DocumentFragment||ni,Ee.SVGElement=l.SVGElement||ni,Ee.SVGSVGElement=l.SVGSVGElement||ni,Ee.SVGElementInstance=l.SVGElementInstance||ni,Ee.Element=l.Element||ni,Ee.HTMLElement=l.HTMLElement||Ee.Element,Ee.Event=l.Event,Ee.Touch=l.Touch||ni,Ee.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ni(){}var et=Ee,qr={init:function(c){var l=et.Element,u=c.navigator||{};qr.supportsTouch="ontouchstart"in c||S.func(c.DocumentTouch)&&et.document instanceof c.DocumentTouch,qr.supportsPointerEvent=u.pointerEnabled!==!1&&!!et.PointerEvent,qr.isIOS=/iP(hone|od|ad)/.test(u.platform),qr.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),qr.isIe9=/MSIE 9/.test(u.userAgent),qr.isOperaMobile=u.appName==="Opera"&&qr.supportsTouch&&/Presto/.test(u.userAgent),qr.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",qr.pEventTypes=qr.supportsPointerEvent?et.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,qr.wheelEvent=et.document&&"onmousewheel"in et.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},io=qr;function ai(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function Bn(c,l){for(;S.element(c);){if(Ci(c,l))return c;c=Uo(c)}return null}function Uo(c){var l=c.parentNode;if(S.docFrag(l)){for(;(l=l.host)&&S.docFrag(l););return l}return l}function Ci(c,l){return T!==z&&(l=l.replace(/\/deep\//g," ")),c[io.prefixedMatchesSelector](l)}var q=function(c){return c.parentNode||c.host};function ee(c,l){for(var u,m=[],g=c;(u=q(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function fe(c,l,u){for(;S.element(c);){if(Ci(c,l))return!0;if((c=Uo(c))===u)return Ci(c,l)}return!1}function Ne(c){return c.correspondingUseElement||c}function Z(c){var l=c instanceof et.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function Ae(c){var l,u=Z(c);if(!io.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ce(c){for(var l=[];c;)l.push(c),c=Uo(c);return l}function _o(c){return!!S.string(c)&&(et.document.querySelector(c),!0)}function U(c,l){for(var u in l)c[u]=l[u];return c}function en(c,l,u){return c==="parent"?Uo(u):c==="self"?l.getRect(u):Bn(u,c)}function si(c,l,u,m){var g=c;return S.string(g)?g=en(g,l,u):S.func(g)&&(g=g.apply(void 0,m)),S.element(g)&&(g=Ae(g)),g}function Go(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function li(c){return!c||"x"in c&&"y"in c||((c=U({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function tn(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function Pi(c,l,u){var m=u&&c.options[u];return Go(si(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function ci(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},S.string(c)&&c.search(" ")!==-1&&(c=qn(c)),S.array(c))return c.forEach(function(w){return ci(w,l,u,m)}),m;if(S.object(c)&&(l=c,c=""),S.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if(S.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];ci(c,b,u,m)}else if(S.object(l))for(var y in l)ci(qn(y).map(function(w){return"".concat(c).concat(w)}),l[y],u,m);return m}function qn(c){return c.trim().split(/ +/)}var za=function(c,l){return Math.sqrt(c*c+l*l)},w1=["webkit","moz"];function ys(c,l){c.__set||(c.__set={});var u=function(g){if(w1.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function ks(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function Ld(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function Bd(c){return c instanceof et.Event||c instanceof et.Touch}function xs(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function qd(c,l){return l=l||{x:0,y:0},io.isOperaMobile&&Bd(c)?(xs("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):xs("page",c,l),l}function Ea(c){return S.number(c.pointerId)?c.pointerId:c.identifier}function _1(c,l,u){var m=l.length>1?Kd(l):l[0];qd(m,c.page),function(g,v){v=v||{},io.isOperaMobile&&Bd(g)?xs("screen",g,v):xs("client",g,v)}(m,c.client),c.timeStamp=u}function Ol(c){var l=[];return S.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function Kd(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Hl(c){if(!c.length)return null;var l=Ol(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Rl(c,l){var u=l+"X",m=l+"Y",g=Ol(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return za(v,b)}function Il(c,l){var u=l+"X",m=l+"Y",g=Ol(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function Wd(c){return S.string(c.pointerType)?c.pointerType:S.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof et.Touch?"touch":"mouse"}function Ud(c){var l=S.func(c.composedPath)?c.composedPath():c.path;return[Ne(l?l[0]:c.target),Ne(c.currentTarget)]}var ws=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(ws.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Gd=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},Yd=function(c){return Gd([],c)},$a=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},Sa=function(c,l){return c[$a(c,l)]},Kn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var y=v==="dragleave"?m.prev:m.cur,w=y.element,M=y.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=$a(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var y=new u(g,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(ws);function Xd(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Vl(c,l){for(var u=function(v,b){for(var y=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var E=_.options.drop.accept;if(!(S.element(E)&&E!==b||S.string(E)&&!Ci(b,E)||S.func(E)&&!E({dropzone:_,draggableElement:b})))for(var O=0,D=_.getAllElements();O<D.length;O++){var V=D[O];V!==b&&y.push({dropzone:_,element:V,rect:_.getRect(V)})}}}return y}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function Zd(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],y=0,w=m.activeDrops;y<w.length;y++){var M=w[y],_=M.dropzone,E=M.element,O=M.rect,D=_.dropCheck(l,u,g,v,E,O);b.push(D?E:null)}var V=function(N){for(var G,K,X,pe=[],Ce=0;Ce<N.length;Ce++){var re=N[Ce],ve=N[G];if(re&&Ce!==G)if(ve){var ao=q(re),kt=q(ve);if(ao!==re.ownerDocument)if(kt!==re.ownerDocument)if(ao!==kt){pe=pe.length?pe:ee(ve);var Do=void 0;if(ve instanceof et.HTMLElement&&re instanceof et.SVGElement&&!(re instanceof et.SVGSVGElement)){if(re===kt)continue;Do=re.ownerSVGElement}else Do=re;for(var di=ee(Do,ve.ownerDocument),Ri=0;di[Ri]&&di[Ri]===pe[Ri];)Ri++;var As=[di[Ri-1],di[Ri],pe[Ri]];if(As[0])for(var Ha=As[0].lastChild;Ha;){if(Ha===As[1]){G=Ce,pe=di;break}if(Ha===As[2])break;Ha=Ha.previousSibling}}else X=ve,(parseInt(H(K=re).getComputedStyle(K).zIndex,10)||0)>=(parseInt(H(X).getComputedStyle(X).zIndex,10)||0)&&(G=Ce);else G=Ce}else G=Ce}return G}(b);return m.activeDrops[V]||null}function Dl(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new Kn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new Kn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new Kn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new Kn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new Kn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new Kn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Fl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Xd(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function Qd(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Vl(l,u.element));var b=m,y=Zd(u,b,g);v.rejected=v.rejected&&!!y&&y.dropzone===v.cur.dropzone&&y.element===v.cur.element,v.cur.dropzone=y&&y.dropzone,v.cur.element=y&&y.element,v.events=Dl(u,0,b)}}var Jd={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(yt),m.prototype.dropzone=function(v){return function(b,y){if(S.object(y)){if(b.options.drop.enabled=y.enabled!==!1,y.listeners){var w=ci(y.listeners),M=Object.keys(w).reduce(function(E,O){return E[/^(enter|leave)/.test(O)?"drag".concat(O):/^(activate|deactivate|move)/.test(O)?"drop".concat(O):O]=w[O],E},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return S.func(y.ondrop)&&b.on("drop",y.ondrop),S.func(y.ondropactivate)&&b.on("dropactivate",y.ondropactivate),S.func(y.ondropdeactivate)&&b.on("dropdeactivate",y.ondropdeactivate),S.func(y.ondragenter)&&b.on("dragenter",y.ondragenter),S.func(y.ondragleave)&&b.on("dragleave",y.ondragleave),S.func(y.ondropmove)&&b.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?b.options.drop.overlap=y.overlap:S.number(y.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(b.options.drop.accept=y.accept),"checker"in y&&(b.options.drop.checker=y.checker),b}return S.bool(y)?(b.options.drop.enabled=y,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,y,w,M,_){return function(E,O,D,V,N,G,K){var X=!1;if(!(K=K||E.getRect(G)))return!!E.options.drop.checker&&E.options.drop.checker(O,D,X,E,G,V,N);var pe=E.options.drop.overlap;if(pe==="pointer"){var Ce=Pi(V,N,"drag"),re=qd(O);re.x+=Ce.x,re.y+=Ce.y;var ve=re.x>K.left&&re.x<K.right,ao=re.y>K.top&&re.y<K.bottom;X=ve&&ao}var kt=V.getRect(N);if(kt&&pe==="center"){var Do=kt.left+kt.width/2,di=kt.top+kt.height/2;X=Do>=K.left&&Do<=K.right&&di>=K.top&&di<=K.bottom}return kt&&S.number(pe)&&(X=Math.max(0,Math.min(K.right,kt.right)-Math.max(K.left,kt.left))*Math.max(0,Math.min(K.bottom,kt.bottom)-Math.max(K.top,kt.top))/(kt.width*kt.height)>=pe),E.options.drop.checker&&(X=E.options.drop.checker(O,D,X,E,G,V,N)),X}(this,v,b,y,w,M,_)},u.dynamicDrop=function(v){return S.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},U(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=Jd.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Vl(l,u.element),g.events=Dl(u,0,m),g.events.activate&&(Xd(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":Qd,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Fl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;Qd(c,l),Fl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Vl,getDrop:Zd,getDropEvents:Dl,fireDropEvents:Fl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},M1=Jd;function Nl(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",y=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Rl(g,y),u.box=Hl(g),u.scale=1,u.ds=0,u.angle=Il(g,y),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Rl(g,y),u.box=Hl(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Il(g,y),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,S.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Ll={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return S.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):S.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Ll,l.methodDict.gesture="gesturable",m.actions.gesture=Ll.defaults},listeners:{"interactions:action-start":Nl,"interactions:action-move":Nl,"interactions:action-end":Nl,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},C1=Ll;function z1(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var y=S.number(v.width)?v.width:v.right-v.left,w=S.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?y:w)/2)),y<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=y>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(y>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!S.element(m)&&(S.element(l)?l===m:fe(m,l,g))}function eu(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Oi,bn,Hi={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;Hi.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),Hi.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,y,w){return S.object(y)?(b.options.resize.enabled=y.enabled!==!1,b.setPerAction("resize",y),b.setOnEvents("resize",y),S.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?b.options.resize.axis=y.axis:y.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),S.bool(y.preserveAspectRatio)?b.options.resize.preserveAspectRatio=y.preserveAspectRatio:S.bool(y.square)&&(b.options.resize.square=y.square),b):S.bool(y)?(b.options.resize.enabled=y,b):b.options.resize}(this,v,c)},l.map.resize=Hi,l.methodDict.resize="resizable",g.actions.resize=Hi.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:U({},v),corrected:U({},v),previous:U({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),eu(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",y=m.rect,w=m._rects,M=w.start,_=w.corrected,E=w.delta,O=w.previous;if(U(O,_),b){if(U(_,y),v==="reposition"){if(_.top>_.bottom){var D=_.top;_.top=_.bottom,_.bottom=D}if(_.left>_.right){var V=_.left;_.left=_.right,_.right=V}}}else _.top=Math.min(y.top,M.bottom),_.bottom=Math.max(y.bottom,M.top),_.left=Math.min(y.left,M.right),_.right=Math.max(y.right,M.left);for(var N in _.width=_.right-_.left,_.height=_.bottom-_.top,_)E[N]=_[N]-O[N];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=E}})(c),eu(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=U({},l.coords.cur.page),y=u.options.resize;if(y&&y.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&y.mouseButtons)){if(S.object(y.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=z1(M,y.edges[M],b,l._latestPointer.eventTarget,m,g,y.margin||Hi.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=y.axis!=="y"&&b.x>g.right-Hi.defaultMargin,E=y.axis!=="x"&&b.y>g.bottom-Hi.defaultMargin;(_||E)&&(c.action={name:"resize",axes:(_?"x":"")+(E?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=Hi.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",y=0,w=["top","bottom","left","right"];y<w.length;y++){var M=w[y];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},E1=Hi,$1={id:"actions",install:function(c){c.usePlugin(C1),c.usePlugin(E1),c.usePlugin(yt),c.usePlugin(M1)}},tu=0,rn={request:function(c){return Oi(c)},cancel:function(c){return bn(c)},init:function(c){if(Oi=c.requestAnimationFrame,bn=c.cancelAnimationFrame,!Oi)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Oi=c["".concat(m,"RequestAnimationFrame")],bn=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Oi=Oi&&Oi.bind(c),bn=bn&&bn.bind(c),Oi||(Oi=function(g){var v=Date.now(),b=Math.max(0,16-(v-tu)),y=c.setTimeout(function(){g(v+b)},b);return tu=v+b,y},bn=function(g){return clearTimeout(g)})}},oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){oe.isScrolling=!0,rn.cancel(oe.i),c.autoScroll=oe,oe.interaction=c,oe.prevTime=oe.now(),oe.i=rn.request(oe.scroll)},stop:function(){oe.isScrolling=!1,oe.interaction&&(oe.interaction.autoScroll=null),rn.cancel(oe.i)},scroll:function(){var c=oe.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=ru(g.container,l,u),b=oe.now(),y=(b-oe.prevTime)/1e3,w=g.speed*y;if(w>=1){var M={x:oe.x*w,y:oe.y*w};if(M.x||M.y){var _=ou(v);S.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var E=ou(v),O={x:E.x-_.x,y:E.y-_.y};(O.x||O.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:O,interaction:c,container:v})}oe.prevTime=b}oe.isScrolling&&(rn.cancel(oe.i),oe.i=rn.request(oe.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&oe.check(l.interactable,l.prepared.name))if(l.simulation)oe.x=oe.y=0;else{var m,g,v,b,y=l.interactable,w=l.element,M=l.prepared.name,_=y.options[M].autoScroll,E=ru(_.container,y,w);if(S.window(E))b=u.clientX<oe.margin,m=u.clientY<oe.margin,g=u.clientX>E.innerWidth-oe.margin,v=u.clientY>E.innerHeight-oe.margin;else{var O=Z(E);b=u.clientX<O.left+oe.margin,m=u.clientY<O.top+oe.margin,g=u.clientX>O.right-oe.margin,v=u.clientY>O.bottom-oe.margin}oe.x=g?1:b?-1:0,oe.y=v?1:m?-1:0,oe.isScrolling||(oe.margin=_.margin,oe.speed=_.speed,oe.start(l))}}};function ru(c,l,u){return(S.string(c)?en(c,l,u):c)||H(u)}function ou(c){return S.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var S1={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=oe,oe.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=oe.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,oe.stop(),oe.interaction&&(oe.interaction=null)},"interactions:stop":oe.stop,"interactions:action-move":function(c){return oe.onInteractionMove(c)}}},T1=S1;function Ta(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Bl(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function A1(c){return S.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function j1(c){return S.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var P1={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(y,w,M,_,E){var O=y.getRect(_),D=w.buttons||{0:1,1:4,3:8,4:16}[w.button],V={action:null,interactable:y,interaction:M,element:_,rect:O,buttons:D};return E.fire("auto-start:check",V),V.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=Ta(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=Ta(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=j1,l.prototype.styleCursor=A1}};function iu(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&_s(l,u,c,g)?c:null}function O1(c,l,u,m,g,v,b){for(var y=0,w=m.length;y<w;y++){var M=m[y],_=g[y],E=M.getAction(l,u,c,_);if(E){var O=iu(E,M,_,v,b);if(O)return{action:O,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function nu(c,l,u,m,g){var v=[],b=[],y=m;function w(_){v.push(_),b.push(y)}for(;S.element(y);){v=[],b=[],g.interactables.forEachMatch(y,w);var M=O1(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;y=Uo(y)}return{action:null,interactable:null,element:null}}function au(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Bl(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,lu(c,u),u.fire("autoStart:prepared",{interaction:c})}function _s(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,y=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&y))return!1;for(var E=0,O=m.interactions.list;E<O.length;E++){var D=O[E],V=D.prepared.name;if(D.interacting()&&(++w>=y||D.interactable===c&&((M+=V===u.name?1:0)>=v||D.element===l&&(_++,V===u.name&&_>=b))))return!1}return y>0}function su(c,l){return S.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function ql(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function lu(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=S.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}ql(c.element,v||"",l)}else l.autoStart.cursorElement&&ql(l.autoStart.cursorElement,"",l)}var H1={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(P1),u.base.actionChecker=null,u.base.styleCursor=!0,U(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return su(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:_s,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||au(u,nu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||au(g,nu(g,v,b,y,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!_s(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),lu(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&ql(u.element,"",l)}},maxInteractions:su,withinInteractionLimit:_s,validateAction:iu},Kl=H1,R1={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),y=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>y?"x":b<y?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var E=m,O=function(V){if(V!==u.interactable){var N=u.interactable.options.drag;if(!N.manualStart&&V.testIgnoreAllow(N,E,m)){var G=V.getAction(u.downPointer,u.downEvent,u,E);if(G&&G.name==="drag"&&function(K,X){if(!X)return!1;var pe=X.options.drag.startAxis;return K==="xy"||pe==="xy"||pe===K}(_,V)&&Kl.validateAction(G,V,E,m,l))return V}}};S.element(E);){var D=l.interactables.forEachMatch(E,O);if(D){u.prepared.name="drag",u.interactable=D,u.element=E;break}E=Uo(E)}}}}}};function Wl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var I1={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(Kl),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Wl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Wl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Wl},V1=I1,D1={id:"auto-start",install:function(c){c.usePlugin(Kl),c.usePlugin(V1),c.usePlugin(R1)}},F1=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):S.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function N1(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var cu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=F1,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var y=H(v.target).document,w=g.getDocOptions(y);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||S.element(v.target)&&Ci(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||ai(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=N1,c},{})};function Ms(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function Wn(c){var l={};for(var u in c){var m=c[u];S.plainObject(m)?l[u]=Wn(m):S.array(m)?l[u]=Yd(m):l[u]=m}return l}var Ul=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=Cs(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,y=function(M){var _=M.interactable.options[M.prepared.name],E=_.modifiers;return E&&E.length?E:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(O){var D=_[O];return D&&D.enabled&&{options:D,methods:D._methods}}).filter(function(O){return!!O})}(b);this.prepareStates(y),this.startEdges=U({},b.edges),this.edges=U({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=Cs(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=U({},l.pageCoords),l.rect=U({},v),l.edges=U({},b);for(var y=g?this.states.slice(g):this.states,w=Cs(l.coords,l.rect),M=0;M<y.length;M++){var _,E=y[M],O=E.options,D=U({},l.coords),V=null;(_=E.methods)!=null&&_.set&&this.shouldDo(O,m,u)&&(l.state=E,V=E.methods.set(l),tn(l.edges,l.rect,{x:l.coords.x-D.x,y:l.coords.y-D.y})),w.eventProps.push(V)}U(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var N=this.result.coords,G=this.result.rect;if(N&&G){var K=w.rect.left!==G.left||w.rect.right!==G.right||w.rect.top!==G.top||w.rect.bottom!==G.bottom;w.changed=K||N.x!==w.coords.x||N.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,y=this.startDelta,w=b.delta;m==="start"&&U(this.startDelta,b.delta);for(var M=0,_=[[v,y],[g,w]];M<_.length;M++){var E=_[M],O=E[0],D=E[1];O.page.x+=D.x,O.page.y+=D.y,O.client.x+=D.x,O.client.y+=D.y}var V=this.result.rectDelta,N=l.rect||u.rect;N.left+=V.left,N.right+=V.right,N.top+=V.top,N.bottom+=V.bottom,N.width=N.right-N.left,N.height=N.bottom-N.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var y=u.coords.cur.page,w={x:l.modifiedCoords.x-y.x,y:l.modifiedCoords.y-y.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var y=g[b];l.state=y;var w=y.options,M=y.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=U({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,y=v.result,w=y.delta,M=y.rectDelta,_=0,E=[[m.start,b],[m.cur,w]];_<E.length;_++){var O=E[_],D=O[0],V=O[1];D.page.x-=V.x,D.page.y-=V.y,D.client.x-=V.x,D.client.y-=V.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return Wn(u)}),this.result=Cs(U({},l.result.coords),U({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function Cs(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function on(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var y in b.enabled=b.enabled!==!1,u)y in b||(b[y]=u[y]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function Aa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var L1={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Ul(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":Aa,"interactions:action-move":Aa,"interactions:action-end":Aa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},du=L1,uu={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Gl=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,y=y||m.element;var E=m.interactable,O=(E&&E.options||uu).deltaSource,D=Pi(E,y,v),V=b==="start",N=b==="end",G=V?f(_):m.prevEvent,K=V?m.coords.start:N?{page:G.page,client:G.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=U({},K.page),_.client=U({},K.client),_.rect=U({},m.rect),_.timeStamp=K.timeStamp,N||(_.page.x-=D.x,_.page.y-=D.y,_.client.x-=D.x,_.client.y-=D.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=y,_.currentTarget=y,_.preEnd=w,_.type=M||v+(b||""),_.interactable=E,_.t0=V?m.pointers[m.pointers.length-1].downTime:G.t0,_.x0=m.coords.start.page.x-D.x,_.y0=m.coords.start.page.y-D.y,_.clientX0=m.coords.start.client.x-D.x,_.clientY0=m.coords.start.client.y-D.y,_.delta=V||N?{x:0,y:0}:{x:_[O].x-G[O].x,y:_[O].y-G[O].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=U({},m.coords.velocity[O]),_.speed=za(_.velocity.x,_.velocity.y),_.swipe=N||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(ws);Object.defineProperties(Gl.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var B1=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),q1=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),hu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),K1=0,W1=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Ta(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=K1++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var y in q1)b(y);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in hu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Bl(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?U({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=za(g,v)>this.pointerMoveTolerance);var y,w,M,_=this.getPointerIndex(l),E={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(y=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),y.page.x=w.page.x/M,y.page.y=w.page.y/M,y.client.x=w.client.x/M,y.client.y=w.client.y/M,y.timeStamp=M),this._scopeFire("interactions:move",E),b||this.simulation||(this.interacting()&&(E.type=null,this.move(E)),this.pointerWasMoved&&ks(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||Ld(this.coords.delta),(l=U({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Ea(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$a(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,y,w=Ea(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new B1(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),_1(this.coords.cur,this.pointers.map(function(E){return E.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,y=this.coords.cur,v.page.x=y.page.x-b.page.x,v.page.y=y.page.y-b.page.y,v.client.x=y.client.x-b.client.x,v.client.y=y.client.y-b.client.y,v.timeStamp=y.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ys(this.downPointer,l),this.interacting()||(ks(this.coords.start,this.coords.cur),ks(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Gl(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(tn(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var y=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function pu(c){mu(c.interaction)}function mu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Yl(c.coords.cur,l),Yl(c.coords.delta,l),tn(c.edges,c.rect,l),l.x=0,l.y=0,!0}function U1(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Yl(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}hu.offsetBy="";var G1={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=U1},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Yl(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":pu,"interactions:before-action-move":pu,"interactions:before-action-end":function(c){var l=c.interaction;if(mu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},gu=G1,Y1=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=zs(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=za(g.x,g.y),b=this.modification||(this.modification=new Ul(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=zs(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(y),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=rn.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,y,w=this,M=this.interaction,_=zs(M).resistance,E=(M._now()-this.t0)/1e3;if(E<this.te){var O,D=1-(Math.exp(-_*E)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,O={x:fu(y=D,l,m,v),y:fu(y,u,g,b)}):O={x:this.targetOffset.x*D,y:this.targetOffset.y*D};var V={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=V.x,this.currentOffset.y+=V.y,M.offsetBy(V),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=zs(u).smoothEndDuration;if(m<g){var v={x:vu(m,0,this.targetOffset.x,g),y:vu(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),ks(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rn.cancel(this.timeout)}}]),c}();function zs(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var X1={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(gu),c.usePlugin(du),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new Y1(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;S.element(g);){if(g===l.element){m.resume(c);break}g=Uo(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":Aa,"interactions:action-inertiastart":Aa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function fu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function vu(c,l,u,m){return-u*(c/=m)*(c-2)+l}var Z1=X1;function bu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var yu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=U({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&bu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&bu(l,u)}},{key:"on",value:function(l,u){var m=ci(l,u);for(l in m)this.types[l]=Gd(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=ci(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var y=b[v],w=g.indexOf(y);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),Q1=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ys(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function ja(c){return S.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Es(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var J1={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:y,addDelegate:function(_,E,O,D,V){var N=ja(V);if(!m[O]){m[O]=[];for(var G=0;G<g.length;G++){var K=g[G];b(K,O,w),b(K,O,M,!0)}}var X=m[O],pe=Sa(X,function(Ce){return Ce.selector===_&&Ce.context===E});pe||(pe={selector:_,context:E,listeners:[]},X.push(pe)),pe.listeners.push({func:D,options:N})},removeDelegate:function(_,E,O,D,V){var N,G=ja(V),K=m[O],X=!1;if(K)for(N=K.length-1;N>=0;N--){var pe=K[N];if(pe.selector===_&&pe.context===E){for(var Ce=pe.listeners,re=Ce.length-1;re>=0;re--){var ve=Ce[re];if(ve.func===D&&Es(ve.options,G)){Ce.splice(re,1),Ce.length||(K.splice(N,1),y(E,O,w),y(E,O,M,!0)),X=!0;break}}if(X)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,E,O,D){if(_.addEventListener){var V=ja(D),N=Sa(u,function(G){return G.eventTarget===_});N||(N={eventTarget:_,events:{}},u.push(N)),N.events[E]||(N.events[E]=[]),Sa(N.events[E],function(G){return G.func===O&&Es(G.options,V)})||(_.addEventListener(E,O,v.supportsOptions?V:V.capture),N.events[E].push({func:O,options:V}))}}function y(_,E,O,D){if(_.addEventListener&&_.removeEventListener){var V=$a(u,function(ao){return ao.eventTarget===_}),N=u[V];if(N&&N.events)if(E!=="all"){var G=!1,K=N.events[E];if(K){if(O==="all"){for(var X=K.length-1;X>=0;X--){var pe=K[X];y(_,E,pe.func,pe.options)}return}for(var Ce=ja(D),re=0;re<K.length;re++){var ve=K[re];if(ve.func===O&&Es(ve.options,Ce)){_.removeEventListener(E,O,v.supportsOptions?Ce:Ce.capture),K.splice(re,1),K.length===0&&(delete N.events[E],G=!0);break}}}G&&!Object.keys(N.events).length&&u.splice(V,1)}else for(E in N.events)N.events.hasOwnProperty(E)&&y(_,E,"all")}}function w(_,E){for(var O=ja(E),D=new Q1(_),V=m[_.type],N=Ud(_)[0],G=N;S.element(G);){for(var K=0;K<V.length;K++){var X=V[K],pe=X.selector,Ce=X.context;if(Ci(G,pe)&&ai(Ce,N)&&ai(Ce,G)){var re=X.listeners;D.currentTarget=G;for(var ve=0;ve<re.length;ve++){var ao=re[ve];Es(ao.options,O)&&ao.func(D)}}}G=Uo(G)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Xl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Xl.methodOrder;l<u.length;l++){var m=u[l],g=Xl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var y=b[v],w=m;if(y.simulation&&y.simulation.allowResume&&y.pointerType===l)for(;w;){if(w===y.element)return y;w=Uo(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,y=v.interactions.list;b<y.length;b++){var w=y[b];if(w.pointerType===m){if(w.simulation&&!ku(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var E=_[M];if(!(E.pointerType!==m||/down/i.test(g)&&E.simulation))return E}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(ku(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function ku(c,l){return c.pointers.some(function(u){return u.id===l})}var e0=Xl,Zl=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function xu(c,l){return function(u){var m=l.interactions.list,g=Wd(u),v=Ud(u),b=v[0],y=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var E=_[M],O={pointer:E,pointerId:Ea(E),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:y,scope:l},D=wu(O);w.push([O.pointer,O.eventTarget,O.curEventTarget,D])}}else{var V=!1;if(!io.supportsPointerEvent&&/mouse/.test(u.type)){for(var N=0;N<m.length&&!V;N++)V=m[N].pointerType!=="mouse"&&m[N].pointerIsDown;V=V||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!V){var G={pointer:u,pointerId:Ea(u),pointerType:g,eventType:u.type,curEventTarget:y,eventTarget:b,scope:l},K=wu(G);w.push([G.pointer,G.eventTarget,G.curEventTarget,K])}}for(var X=0;X<w.length;X++){var pe=w[X],Ce=pe[0],re=pe[1],ve=pe[2];pe[3][c](Ce,u,re,ve)}}}function wu(c){var l=c.pointerType,u=c.scope,m={interaction:e0.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function Ql(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,y=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)y(u,w,b.delegateListener),y(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var E=v[_];y(u,E.type,E.listener,M)}}var t0={id:"core/interactions",install:function(c){for(var l={},u=0;u<Zl.length;u++){var m=Zl[u];l[m]=xu(m,c)}var g,v=io.pEventTypes;function b(){for(var y=0,w=c.interactions.list;y<w.length;y++){var M=w[y];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var D=O[E];c.documents.some(function(V){return ai(V.doc,D.downTarget)})||M.removePointer(D.pointer,D.event)},E=0,O=M.pointers;E<O.length;E++)_()}}(g=et.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(y){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(y)}}),c.prevTouchTime=0,c.Interaction=function(y){d(M,y);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(W1),c.interactions={list:[],new:function(y){y.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(y);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(cu)},listeners:{"scope:add-document":function(c){return Ql(c,"add")},"scope:remove-document":function(c){return Ql(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:Ql,doOnInteractions:xu,methodNames:Zl},r0=t0,nn=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(nn||{}),o0=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new yu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H(_o(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return S.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),S.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),S.func(u.onend)&&this.on("".concat(l,"end"),u.onend),S.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,y=function(w){return(b==null||b(w))&&Ms(w,v._actions)};(S.array(u)||S.object(u))&&this._onOff(nn.Off,l,u,void 0,y),(S.array(m)||S.object(m))&&this._onOff(nn.On,l,m,void 0,y)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],y=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,y),S.array(y)?b[v]=Yd(y):S.plainObject(y)?(b[v]=U(b[v]||{},Wn(y)),S.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=y.enabled!==!1)):S.bool(y)&&S.object(m.perAction[v])?b[v].enabled=y:b[v]=y}}},{key:"getRect",value:function(l){return l=l||(S.element(this.target)?this.target:null),S.string(this.target)&&(l=l||this._context.querySelector(this.target)),Ae(l)}},{key:"rectChecker",value:function(l){var u=this;return S.func(l)?(this.getRect=function(m){var g=U({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if(_o(u)||S.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return S.string(l)?Array.from(this._context.querySelectorAll(l)):S.func(l)&&l.getAllElements?l.getAllElements():S.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||ai(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!S.element(m)&&(S.string(l)?fe(m,l,u):!!S.element(l)&&ai(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!S.element(m))&&(S.string(l)?fe(m,l,u):!!S.element(l)&&ai(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){S.object(u)&&!S.array(u)&&(g=m,m=null);var b=ci(u,m,v);for(var y in b){y==="wheel"&&(y=io.wheelEvent);for(var w=0,M=b[y];w<M.length;w++){var _=M[w];Ms(y,this._actions)?this.events[l===nn.On?"on":"off"](y,_):S.string(this.target)?this._scopeEvents[l===nn.On?"addDelegate":"removeDelegate"](this.target,this._context,y,_,g):this._scopeEvents[l===nn.On?"add":"remove"](this.target,y,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(nn.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(nn.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in S.object(l)||(l={}),this.options=Wn(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,U(U({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?S.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,y=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=y.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,y[w][0],y[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),i0=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=S.string(v)?u.selectorMap[v]:v[u.scope.id],y=$a(b,function(w){return w===g});b.splice(y,1)}})}return n(c,[{key:"new",value:function(l,u){u=U(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),S.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=S.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return Sa(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if((S.string(v.target)?S.element(l)&&Ci(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),n0=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=io,this.defaults=Wn(uu),this.Eventable=yu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,y){var w=m.interactables.getExisting(b,y);return w||((w=m.interactables.new(b,y)).events.global=v.globalEvents),w};return g.getPointerAverage=Kd,g.getTouchBBox=Hl,g.getTouchDistance=Rl,g.getTouchAngle=Il,g.getElementRect=Ae,g.getElementClientRect=Z,g.matchesSelector=Ci,g.closest=Bn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=Ta(function(v,b,y){if(S.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),S.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,y)}return this}if(S.object(v)){for(var E in v)this.on(E,v[E],b);return this}return Ms(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:y}),this},"The interact.on() method is being deprecated"),g.off=Ta(function(v,b,y){if(S.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),S.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,y)}return this}if(S.object(v)){for(var E in v)this.off(E,v[E],b);return this}var O;return Ms(v,this.scope.actions)?v in this.globalEvents&&(O=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(O,1):this.scope.events.remove(this.scope.document,v,b,y),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return io.supportsTouch},g.supportsPointerEvent=function(){return io.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return S.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Gl,this.Interactable=void 0,this.interactables=new i0(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return k(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){k(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(o0)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,S.window(m)&&j(m),et.init(m),io.init(m),rn.init(m),u.window=m,u.document=m.document,u.usePlugin(r0),u.usePlugin(J1),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(y,w){return y[w]=!0,y[_u(w)]=!0,y},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[_u(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?U({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function _u(c){return c&&c.replace(/\/.*$/,"")}var Mu=new n0,no=Mu.interactStatic,a0=typeof globalThis<"u"?globalThis:window;Mu.init(a0);var s0=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,y=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},E=0;E<l.length;E++){var O=l[E],D=O[0],V=O[1],N=Math.round((m-M.x)/c[D]),G=Math.round((g-M.y)/c[V]);_[D]=Math.max(y.left,Math.min(y.right,N*c[D]+M.x)),_[V]=Math.max(y.top,Math.min(y.bottom,G*c[V]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),l0={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=U(l.snappers||{},s0),l.createSnapGrid=l.snappers.grid}},c0=l0,d0={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,y=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=U({},g),l.startRect=U({},u),l.ratio=b,l.equalDelta=M;var E=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var O=(E.left?1:-1)*(E.top?1:-1);l.edgeSign={x:O,y:O}}else l.edgeSign={x:E.left?-1:1,y:E.top?-1:1};if(y!==!1&&U(m,E),_!=null&&_.length){var D=new Ul(c.interaction);D.copyFrom(c.interaction.modification),D.prepareStates(_),l.subModification=D,D.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=U({},m),b=l.equalDelta?u0:h0;if(U(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var y=U({},u);tn(g,y,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:y,edges:g,pageCoords:m,prevCoords:m,prevRect:y})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),U(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function u0(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function h0(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,y=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*y.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*y.x}}var p0=on(d0,"aspectRatio"),Cu=function(){};Cu._defaults={};var $s=Cu;function yn(c,l,u){return S.func(c)?si(c,l.interactable,l.element,[u.x,u.y,l]):si(c,l.interactable,l.element)}var Ss={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,y=b.elementRect,w=U({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&y){var M=yn(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,E=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),E<0&&(w.top+=E,w.bottom+=E)}w.left+=u.left-l.width*y.left,w.top+=u.top-l.height*y.top,w.right+=u.right-l.width*(1-y.right),w.bottom+=u.bottom-l.height*(1-y.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=yn(g.restriction,u,l);if(b){var y=function(w){return!w||"left"in w&&"top"in w||((w=U({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(y.right-v.right,l.x),y.left+v.left),l.y=Math.max(Math.min(y.bottom-v.bottom,l.y),y.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},m0=on(Ss,"restrict"),zu={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Eu={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function $u(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var Pa={noInner:zu,noOuter:Eu,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Go(yn(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var y=U({},l),w=yn(b.inner,m,y)||{},M=yn(b.outer,m,y)||{};$u(w,zu),$u(M,Eu),u.top?l.y=Math.min(Math.max(M.top+v.top,y.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,y.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,y.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,y.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},g0=on(Pa,"restrictEdges"),f0=U({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Ss.defaults),v0=on({start:Ss.start,set:Ss.set,defaults:f0},"restrictRect"),b0={width:-1/0,height:-1/0},y0={width:1/0,height:1/0},k0=on({start:function(c){return Pa.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=li(yn(v.min,l,c.coords))||b0,y=li(yn(v.max,l,c.coords))||y0;u.options={endOnly:v.endOnly,inner:U({},Pa.noInner),outer:U({},Pa.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-y.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+y.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-y.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+y.width),Pa.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Jl={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,y=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(O){var D=O.interaction.element,V=Go(si(O.state.options.origin,null,null,[D])),N=V||Pi(O.interactable,D,O.interaction.prepared.name);return N}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=si(w.offset,m,g,[u]);(l=Go(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var E=w.relativePoints;b.offsets=v&&E&&E.length?E.map(function(O,D){return{index:D,relativePoint:O,x:y.left-v.width*O.x+l.x,y:y.top-v.height*O.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=Pi(l.interactable,l.element,l.prepared.name),y=U({},u),w=[];g.offsetWithOrigin||(y.x-=b.x,y.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var E=_[M],O=y.x-E.x,D=y.y-E.y,V=0,N=g.targets.length;V<N;V++){var G=g.targets[V],K=void 0;(K=S.func(G)?G(O,D,l._proxy,E,V):G)&&w.push({x:(S.number(K.x)?K.x:O)+E.x,y:(S.number(K.y)?K.y:D)+E.y,range:S.number(K.range)?K.range:g.range,source:G,index:V,offset:E})}for(var X={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},pe=0;pe<w.length;pe++){var Ce=w[pe],re=Ce.range,ve=Ce.x-y.x,ao=Ce.y-y.y,kt=za(ve,ao),Do=kt<=re;re===1/0&&X.inRange&&X.range!==1/0&&(Do=!1),X.target&&!(Do?X.inRange&&re!==1/0?kt/re<X.distance/X.range:re===1/0&&X.range!==1/0||kt<X.distance:!X.inRange&&kt<X.distance)||(X.target=Ce,X.distance=kt,X.range=re,X.inRange=Do,X.delta.x=ve,X.delta.y=ao)}return X.inRange&&(u.x=X.target.x,u.y=X.target.y),m.closest=X,X},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},x0=on(Jl,"snap"),Ts={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],Jl.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=U({},g),u.options.targets=[];for(var y=0,w=g.targets||[];y<w.length;y++){var M=w[y],_=void 0;if(_=S.func(M)?M(b.x,b.y,l):M){for(var E=0,O=u.targetFields;E<O.length;E++){var D=O[E],V=D[0],N=D[1];if(V in _||N in _){_.x=_[V],_.y=_[N];break}}u.options.targets.push(_)}}var G=Jl.set(c);return u.options=g,G},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},w0=on(Ts,"snapSize"),ec={aspectRatio:p0,restrictEdges:g0,restrict:m0,restrictRect:v0,restrictSize:k0,snapEdges:on({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],Ts.start(c)):null},set:Ts.set,defaults:U(Wn(Ts.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:x0,snapSize:w0,spring:$s,avoid:$s,transform:$s,rubberband:$s},_0={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(du),c.usePlugin(c0),l.modifiers=ec,ec){var m=ec[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},M0=_0,Su=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w){var M;if(t(this,u),ys(f(M=l.call(this,y)),v),v!==g&&ys(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Ea(g),M.pointerType=Wd(g),M.target=b,M.currentTarget=null,m==="tap"){var _=y.getPointerIndex(g);M.dt=M.timeStamp-y.pointers[_].downTime;var E=M.timeStamp-y.tapTime;M.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===M.target&&E<500}else m==="doubletap"&&(M.dt=g.timeStamp-y.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(ws),Oa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=Oa,c.defaults.actions.pointerEvents=Oa.defaults,U(c.actions.phaselessTypes,Oa.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&tc(c),an({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ce(y),E={interaction:g,pointer:v,event:b,eventTarget:y,type:"hold",targets:[],path:_,node:null},O=0;O<_.length;O++){var D=_[O];E.node=D,m.fire("pointerEvents:collect-targets",E)}if(E.targets.length){for(var V=1/0,N=0,G=E.targets;N<G.length;N++){var K=G[N].eventable.options.holdDuration;K<V&&(V=K)}M.duration=V,M.timeout=setTimeout(function(){an({interaction:g,eventTarget:y,pointer:v,event:b,type:"hold"},m)},V)}})(c,l),an(c,l)},"interactions:up":function(c,l){tc(c),an(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerWasMoved||an({interaction:g,eventTarget:y,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){tc(c),an(c,l)}},PointerEvent:Su,fire:an,collectEventTargets:Tu,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function an(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=c.targets,w=y===void 0?Tu(c,l):y,M=new Su(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},E=0;E<w.length;E++){var O=w[E];for(var D in O.props||{})M[D]=O.props[D];var V=Pi(O.eventable,O.node);if(M._subtractOrigin(V),M.eventable=O.eventable,M.currentTarget=O.node,O.eventable.fire(M),M._addOrigin(V),M.immediatePropagationStopped||M.propagationStopped&&E+1<w.length&&w[E+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var N=M.double?an({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=N,u.tapTime=N.timeStamp}return M}function Tu(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=u.getPointerIndex(m),w=u.pointers[y];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ce(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},E=0;E<M.length;E++){var O=M[E];_.node=O,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(D){var V,N;return D.eventable.options.holdDuration===((V=u.pointers[y])==null||(N=V.hold)==null?void 0:N.duration)})),_.targets}function tc(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var C0=Object.freeze({__proto__:null,default:Oa});function z0(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var E0={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(Oa);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=z0,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},$0=E0,S0={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return U(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var y=b.events,w=y.options;y.types[g]&&y.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:y,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;U(u.events.options,l.pointerEvents.defaults),U(u.events.options,m.pointerEvents||{})}}},T0=S0,A0={id:"pointer-events",install:function(c){c.usePlugin(C0),c.usePlugin($0),c.usePlugin(T0)}},j0=A0,P0={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),y=v.window.Promise,w=y?[]:null,M=function(){var E=b[_],O=m.getRect(E);if(!O)return 1;var D,V=Sa(v.interactions.list,function(K){return K.interacting()&&K.interactable===m&&K.element===E&&K.prepared.name===g.name});if(V)V.move(),w&&(D=V._reflowPromise||new y(function(K){V._reflowResolve=K}));else{var N=li(O),G=function(K){return{coords:K,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:N.x,y:N.y},client:{x:N.x,y:N.y},timeStamp:v.now()});D=function(K,X,pe,Ce,re){var ve=K.interactions.new({pointerType:"reflow"}),ao={interaction:ve,event:re,pointer:re,eventTarget:pe,phase:"reflow"};ve.interactable=X,ve.element=pe,ve.prevEvent=re,ve.updatePointer(re,re,pe,!0),Ld(ve.coords.delta),Bl(ve.prepared,Ce),ve._doPhase(ao);var kt=K.window,Do=kt.Promise,di=Do?new Do(function(Ri){ve._reflowResolve=Ri}):void 0;return ve._reflowPromise=di,ve.start(Ce,X,pe),ve._interacting?(ve.move(ao),ve.end(re)):(ve.stop(),ve._reflowResolve()),ve.removePointer(re,re),di}(v,m,E,g,G)}w&&w.push(D)},_=0;_<b.length&&!M();_++);return w&&y.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},O0=P0;if(no.use(cu),no.use(gu),no.use(j0),no.use(Z1),no.use(M0),no.use(D1),no.use($1),no.use(T1),no.use(O0),no.default=no,(typeof Tn>"u"?"undefined":e(Tn))==="object"&&Tn)try{Tn.exports=no}catch{}return no.default=no,no})});var Kf={};Pu(Kf,{BP:()=>md,LuiAlert:()=>Sr,LuiAutocomplete:()=>mt,LuiAvatar:()=>St,LuiAvatarGroup:()=>ir,LuiBackground:()=>ct,LuiBadge:()=>rr,LuiBreadcrumb:()=>Xt,LuiBreadcrumbItem:()=>_r,LuiButton:()=>Rt,LuiButtonGroup:()=>Ge,LuiButtonGroupItem:()=>It,LuiCalendar:()=>Fr,LuiCard:()=>Gt,LuiCascader:()=>ht,LuiCheckbox:()=>Ut,LuiCheckboxGroup:()=>Cr,LuiCol:()=>mo,LuiCollapse:()=>$o,LuiCollapseItem:()=>Yr,LuiColorPicker:()=>ot,LuiCommandPalette:()=>lr,LuiConfigProvider:()=>pr,LuiContextMenu:()=>Re,LuiDateRangePicker:()=>Ho,LuiDatepicker:()=>_t,LuiDialog:()=>Me,LuiDivider:()=>Hr,LuiDrawer:()=>it,LuiDropdown:()=>Fi,LuiDropmenu:()=>$e,LuiEmptyState:()=>Fo,LuiFileInput:()=>jo,LuiForm:()=>Bt,LuiFormItem:()=>sr,LuiIcon:()=>Oe,LuiIconPicker:()=>Se,LuiImage:()=>Ie,LuiImageCropper:()=>wt,LuiInput:()=>He,LuiInputNumber:()=>Lt,LuiInputOpt:()=>Ir,LuiMenu:()=>Xo,LuiMenuDivider:()=>En,LuiMenuItem:()=>er,LuiOption:()=>gi,LuiOptionGroup:()=>dn,LuiOverlayRoot:()=>Zn,LuiPagination:()=>Ye,LuiPopconfirm:()=>bt,LuiPopover:()=>te,LuiProgress:()=>Qt,LuiQrcode:()=>gr,LuiRadio:()=>zr,LuiRadioGroup:()=>Dr,LuiRow:()=>ti,LuiScrollArea:()=>Nt,LuiSelect:()=>me,LuiSkeleton:()=>Pr,LuiSlider:()=>ut,LuiSpinner:()=>Mo,LuiSplitter:()=>ro,LuiStatistic:()=>$t,LuiSwitch:()=>fo,LuiTab:()=>Vt,LuiTabPanel:()=>Eo,LuiTable:()=>Y,LuiTableColumn:()=>br,LuiTabs:()=>aa,LuiTag:()=>lo,LuiText:()=>Xe,LuiTextarea:()=>dt,LuiToast:()=>cr,LuiTooltip:()=>Gr,LuiTree:()=>le,LuiTreeSelect:()=>pt,baseStyles:()=>P,bringOverlayStackToFront:()=>Et,builtinIconCollection:()=>Ns,builtinIconNames:()=>Ka,builtinIconPrefix:()=>xn,builtinTranslations:()=>Ac,commandPalette:()=>l1,contextMenu:()=>f1,createCommandPalette:()=>Cl,createContextMenu:()=>vs,createDialog:()=>Ca,createDialogForm:()=>Pd,createDrawer:()=>El,createForm:()=>p1,createPopover:()=>Al,createTable:()=>Nd,createToastHost:()=>Dd,dialog:()=>d1,drawer:()=>c1,encodeQr:()=>_l,ensureOverlayExternalLayer:()=>Tr,ensureOverlayLayer:()=>Xs,ensureOverlayRoot:()=>Ys,eventPathContainsOwnedOverlay:()=>Cn,form:()=>m1,formatDate:()=>Y2,formatSize:()=>G2,getLocale:()=>_m,hasRecentOverlayInteraction:()=>Xa,hideAllContextMenus:()=>Rd,isImageIconSource:()=>Ls,isOverlayTopmost:()=>Qa,markOverlayInteraction:()=>Ya,mergeTranslations:()=>ne,normalizeStatus:()=>Nn,onLocaleChange:()=>xe,popover:()=>v1,registerFormField:()=>Bp,registerOverlayStack:()=>Jt,registerTranslations:()=>Oc,resolveBuiltinIcon:()=>Gn,resolveBuiltinTranslations:()=>Gh,resolveOverlayLayerRegistration:()=>zn,setLocale:()=>Pc,setOverlayOwner:()=>wc,setupBuiltinIcons:()=>Wa,showContextMenu:()=>Hd,statusColorToken:()=>e1,statusColorVar:()=>Lg,statusIcon:()=>ji,statusOrder:()=>Bg,t:()=>Mm,table:()=>x1,toCssLength:()=>Ot,toast:()=>Ji,tokens:()=>A,translate:()=>ae,unregisterFormField:()=>qp,unregisterOverlayStack:()=>Yo});module.exports=F0(Kf);var so=require("lit"),dr=require("lit/decorators.js");var oc=require("lit"),A=oc.css`
2
2
  :host {
3
3
  /* Surfaces (refined workbench light) */
4
4
  --lui-color-bg: #ffffff;
@@ -415,7 +415,7 @@
415
415
  transform: rotate(360deg);
416
416
  }
417
417
  }
418
- `],a([(0,Ue.property)()],Oe.prototype,"name",2),a([(0,Ue.property)({reflect:!0})],Oe.prototype,"type",2),a([(0,Ue.property)()],Oe.prototype,"src",2),a([(0,Ue.property)()],Oe.prototype,"svg",2),a([(0,Ue.property)({attribute:"svg-body"})],Oe.prototype,"svgBody",2),a([(0,Ue.property)({attribute:"icon-class"})],Oe.prototype,"iconClass",2),a([(0,Ue.property)()],Oe.prototype,"alt",2),a([(0,Ue.property)({attribute:"aria-label"})],Oe.prototype,"ariaLabel",2),a([(0,Ue.property)({type:Boolean,reflect:!0})],Oe.prototype,"decorative",2),a([(0,Ue.property)()],Oe.prototype,"color",2),a([(0,Ue.property)()],Oe.prototype,"size",2),a([(0,Ue.property)({type:Boolean,reflect:!0})],Oe.prototype,"spin",2),a([(0,Ue.property)({attribute:!1})],Oe.prototype,"builtinPrefix",2),a([(0,Ue.property)()],Oe.prototype,"glyph",2),a([(0,Ue.property)({attribute:"font-family"})],Oe.prototype,"fontFamily",2),a([(0,Ue.property)({attribute:"font-weight"})],Oe.prototype,"fontWeight",2),a([(0,Ue.property)({type:Number})],Oe.prototype,"rotate",2),a([(0,Ue.property)({type:Boolean,attribute:"flip-h"})],Oe.prototype,"flipH",2),a([(0,Ue.property)({type:Boolean,attribute:"flip-v"})],Oe.prototype,"flipV",2),a([(0,Ue.property)({attribute:"view-box"})],Oe.prototype,"viewBox",2),a([(0,Ue.property)({attribute:"preserve-aspect-ratio"})],Oe.prototype,"preserveAspectRatio",2),a([(0,Ue.property)({attribute:"stroke-width"})],Oe.prototype,"strokeWidth",2),a([(0,Ue.property)()],Oe.prototype,"stroke",2),a([(0,Ue.property)()],Oe.prototype,"fill",2),a([(0,Ue.property)({attribute:"stroke-linecap"})],Oe.prototype,"strokeLinecap",2),a([(0,Ue.property)({attribute:"stroke-linejoin"})],Oe.prototype,"strokeLinejoin",2),Oe=a([(0,Ue.customElement)("lui-icon")],Oe);var Yn=require("lit"),zi=require("lit/decorators.js");var _o=class extends Yn.LitElement{constructor(){super(...arguments);this.variant="current";this.decorative=!0}willUpdate(e){e.has("size")&&this._applyLength("--lui-spinner-size",this.size),e.has("thickness")&&this._applyLength("--lui-spinner-thickness",this.thickness),e.has("color")&&this._applyRaw("--lui-spinner-color",this.color),e.has("track")&&this._applyRaw("--lui-spinner-track",this.track),(e.has("decorative")||e.has("label"))&&this._syncA11y()}_applyLength(e,t){if(t==null||t===""){this.style.removeProperty(e);return}this.style.setProperty(e,Ot(t))}_applyRaw(e,t){if(!t){this.style.removeProperty(e);return}this.style.setProperty(e,t)}_syncA11y(){if(this.decorative&&!this.label){this.setAttribute("aria-hidden","true"),this.removeAttribute("role"),this.removeAttribute("aria-label");return}this.removeAttribute("aria-hidden"),this.setAttribute("role","status"),this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label")}connectedCallback(){super.connectedCallback(),this._syncA11y()}render(){return Yn.html`<span class="ring" part="ring"></span>`}};_o.styles=[A,P,Yn.css`
418
+ `],a([(0,Ue.property)()],Oe.prototype,"name",2),a([(0,Ue.property)({reflect:!0})],Oe.prototype,"type",2),a([(0,Ue.property)()],Oe.prototype,"src",2),a([(0,Ue.property)()],Oe.prototype,"svg",2),a([(0,Ue.property)({attribute:"svg-body"})],Oe.prototype,"svgBody",2),a([(0,Ue.property)({attribute:"icon-class"})],Oe.prototype,"iconClass",2),a([(0,Ue.property)()],Oe.prototype,"alt",2),a([(0,Ue.property)({attribute:"aria-label"})],Oe.prototype,"ariaLabel",2),a([(0,Ue.property)({type:Boolean,reflect:!0})],Oe.prototype,"decorative",2),a([(0,Ue.property)()],Oe.prototype,"color",2),a([(0,Ue.property)()],Oe.prototype,"size",2),a([(0,Ue.property)({type:Boolean,reflect:!0})],Oe.prototype,"spin",2),a([(0,Ue.property)({attribute:!1})],Oe.prototype,"builtinPrefix",2),a([(0,Ue.property)()],Oe.prototype,"glyph",2),a([(0,Ue.property)({attribute:"font-family"})],Oe.prototype,"fontFamily",2),a([(0,Ue.property)({attribute:"font-weight"})],Oe.prototype,"fontWeight",2),a([(0,Ue.property)({type:Number})],Oe.prototype,"rotate",2),a([(0,Ue.property)({type:Boolean,attribute:"flip-h"})],Oe.prototype,"flipH",2),a([(0,Ue.property)({type:Boolean,attribute:"flip-v"})],Oe.prototype,"flipV",2),a([(0,Ue.property)({attribute:"view-box"})],Oe.prototype,"viewBox",2),a([(0,Ue.property)({attribute:"preserve-aspect-ratio"})],Oe.prototype,"preserveAspectRatio",2),a([(0,Ue.property)({attribute:"stroke-width"})],Oe.prototype,"strokeWidth",2),a([(0,Ue.property)()],Oe.prototype,"stroke",2),a([(0,Ue.property)()],Oe.prototype,"fill",2),a([(0,Ue.property)({attribute:"stroke-linecap"})],Oe.prototype,"strokeLinecap",2),a([(0,Ue.property)({attribute:"stroke-linejoin"})],Oe.prototype,"strokeLinejoin",2),Oe=a([(0,Ue.customElement)("lui-icon")],Oe);var Yn=require("lit"),zi=require("lit/decorators.js");var Mo=class extends Yn.LitElement{constructor(){super(...arguments);this.variant="current";this.decorative=!0}willUpdate(e){e.has("size")&&this._applyLength("--lui-spinner-size",this.size),e.has("thickness")&&this._applyLength("--lui-spinner-thickness",this.thickness),e.has("color")&&this._applyRaw("--lui-spinner-color",this.color),e.has("track")&&this._applyRaw("--lui-spinner-track",this.track),(e.has("decorative")||e.has("label"))&&this._syncA11y()}_applyLength(e,t){if(t==null||t===""){this.style.removeProperty(e);return}this.style.setProperty(e,Ot(t))}_applyRaw(e,t){if(!t){this.style.removeProperty(e);return}this.style.setProperty(e,t)}_syncA11y(){if(this.decorative&&!this.label){this.setAttribute("aria-hidden","true"),this.removeAttribute("role"),this.removeAttribute("aria-label");return}this.removeAttribute("aria-hidden"),this.setAttribute("role","status"),this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label")}connectedCallback(){super.connectedCallback(),this._syncA11y()}render(){return Yn.html`<span class="ring" part="ring"></span>`}};Mo.styles=[A,P,Yn.css`
419
419
  :host {
420
420
  display: inline-flex;
421
421
  flex-shrink: 0;
@@ -453,7 +453,7 @@
453
453
  animation-duration: 2.4s;
454
454
  }
455
455
  }
456
- `],a([(0,zi.property)({reflect:!0})],_o.prototype,"variant",2),a([(0,zi.property)()],_o.prototype,"size",2),a([(0,zi.property)()],_o.prototype,"thickness",2),a([(0,zi.property)()],_o.prototype,"color",2),a([(0,zi.property)()],_o.prototype,"track",2),a([(0,zi.property)({type:Boolean,reflect:!0})],_o.prototype,"decorative",2),a([(0,zi.property)()],_o.prototype,"label",2),_o=a([(0,zi.customElement)("lui-spinner")],_o);var Rt=class extends so.LitElement{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.disabled=!1;this.loading=!1;this.iconOnly=!1;this.block=!1;this.ripple=!1;this.icon="";this.ariaLabel="";this.type="button";this._ripples=[];this._hasPrefixSlot=!1;this._hasDefaultSlot=!1;this._hasSuffixSlot=!1;this._rippleId=0;this._explicitAttrs=new Set;this._onPointerDown=e=>{if(!this.ripple||this.disabled||this.loading)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)};this._onPrefixSlotChange=e=>{this._hasPrefixSlot=this._slotHasContent(e.currentTarget)};this._onDefaultSlotChange=e=>{this._hasDefaultSlot=this._slotHasContent(e.currentTarget)};this._onSuffixSlotChange=e=>{this._hasSuffixSlot=this._slotHasContent(e.currentTarget)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"button");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("ripple")&&typeof t.ripple=="boolean"&&this.ripple!==t.ripple&&(this.ripple=t.ripple),!this._explicitAttrs.has("block")&&typeof t.block=="boolean"&&this.block!==t.block&&(this.block=t.block)}_slotHasContent(e){return e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent?.trim():t.nodeType===Node.ELEMENT_NODE)}render(){return so.html`
456
+ `],a([(0,zi.property)({reflect:!0})],Mo.prototype,"variant",2),a([(0,zi.property)()],Mo.prototype,"size",2),a([(0,zi.property)()],Mo.prototype,"thickness",2),a([(0,zi.property)()],Mo.prototype,"color",2),a([(0,zi.property)()],Mo.prototype,"track",2),a([(0,zi.property)({type:Boolean,reflect:!0})],Mo.prototype,"decorative",2),a([(0,zi.property)()],Mo.prototype,"label",2),Mo=a([(0,zi.customElement)("lui-spinner")],Mo);var Rt=class extends so.LitElement{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.disabled=!1;this.loading=!1;this.iconOnly=!1;this.block=!1;this.ripple=!1;this.icon="";this.ariaLabel="";this.type="button";this._ripples=[];this._hasPrefixSlot=!1;this._hasDefaultSlot=!1;this._hasSuffixSlot=!1;this._rippleId=0;this._explicitAttrs=new Set;this._onPointerDown=e=>{if(!this.ripple||this.disabled||this.loading)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)};this._onPrefixSlotChange=e=>{this._hasPrefixSlot=this._slotHasContent(e.currentTarget)};this._onDefaultSlotChange=e=>{this._hasDefaultSlot=this._slotHasContent(e.currentTarget)};this._onSuffixSlotChange=e=>{this._hasSuffixSlot=this._slotHasContent(e.currentTarget)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"button");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("ripple")&&typeof t.ripple=="boolean"&&this.ripple!==t.ripple&&(this.ripple=t.ripple),!this._explicitAttrs.has("block")&&typeof t.block=="boolean"&&this.block!==t.block&&(this.block=t.block)}_slotHasContent(e){return e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent?.trim():t.nodeType===Node.ELEMENT_NODE)}render(){return so.html`
457
457
  <button
458
458
  part="button"
459
459
  type=${this.type}
@@ -1123,7 +1123,7 @@
1123
1123
  <span part=${o.trailPart??J.nothing} class=${o.trailClass??J.nothing}>
1124
1124
  ${Ws(i,{showChevron:o.showChevron,chevronIcon:o.chevronIcon,chevronIconName:o.chevronIconName,chevronPart:o.chevronPart,chevronWrapperClass:o.chevronWrapperClass})}
1125
1125
  </span>
1126
- `}function Us(i){return i.checked?"menuitemcheckbox":"menuitem"}function vc(i){return!!(i&&i.type!=="divider"&&i.type!=="group"&&!i.disabled)}function Mn(i){return i.length?i.join("."):"root"}function bc(i){let o=[[]];for(let e=0;e<i.length;e+=1)o.push(i.slice(0,e+1));return o}function Gs(i){return i.length?i.slice(0,-1):[]}function Sh(i,o){return i.length>0&&i.every((e,t)=>o[t]===e)&&o.length>=i.length}function yc(i){return i.findIndex(o=>vc(o))}function Th(i,o,e){if(!i.length)return-1;let t=o;for(let r=0;r<i.length;r+=1)if(t=(t+e+i.length)%i.length,vc(i[t]))return t;return-1}function Ah(i,o,e){if(!i.length)return-1;let t=o,r=i.length;for(let n=0;n<r;n+=1){if(t<0&&(t=r-1),t>=r&&(t=0),vc(i[t]))return t;t+=e}return-1}function jh(i,o={}){return[o.baseClass??"",i.danger?o.dangerClass??"danger":"",i.disabled?o.disabledClass??"disabled":"",o.active?o.activeClass??"active":""].filter(Boolean).join(" ")}function hi(i){let o=i.renderRoot;return!o||!("adoptedStyleSheets"in o)?[]:o.adoptedStyleSheets??[]}var Ni=require("lit"),Ja=require("lit/decorators.js");var pi=require("lit"),ze=require("lit/decorators.js"),Mo=require("@floating-ui/dom");var rm=`
1126
+ `}function Us(i){return i.checked?"menuitemcheckbox":"menuitem"}function vc(i){return!!(i&&i.type!=="divider"&&i.type!=="group"&&!i.disabled)}function Mn(i){return i.length?i.join("."):"root"}function bc(i){let o=[[]];for(let e=0;e<i.length;e+=1)o.push(i.slice(0,e+1));return o}function Gs(i){return i.length?i.slice(0,-1):[]}function Sh(i,o){return i.length>0&&i.every((e,t)=>o[t]===e)&&o.length>=i.length}function yc(i){return i.findIndex(o=>vc(o))}function Th(i,o,e){if(!i.length)return-1;let t=o;for(let r=0;r<i.length;r+=1)if(t=(t+e+i.length)%i.length,vc(i[t]))return t;return-1}function Ah(i,o,e){if(!i.length)return-1;let t=o,r=i.length;for(let n=0;n<r;n+=1){if(t<0&&(t=r-1),t>=r&&(t=0),vc(i[t]))return t;t+=e}return-1}function jh(i,o={}){return[o.baseClass??"",i.danger?o.dangerClass??"danger":"",i.disabled?o.disabledClass??"disabled":"",o.active?o.activeClass??"active":""].filter(Boolean).join(" ")}function hi(i){let o=i.renderRoot;return!o||!("adoptedStyleSheets"in o)?[]:o.adoptedStyleSheets??[]}var Ni=require("lit"),Ja=require("lit/decorators.js");var pi=require("lit"),ze=require("lit/decorators.js"),Co=require("@floating-ui/dom");var rm=`
1127
1127
  :host {
1128
1128
  position: fixed;
1129
1129
  inset: 0;
@@ -1218,7 +1218,7 @@
1218
1218
  pointer-events: auto;
1219
1219
  z-index: calc(var(--lui-z-popup) + 20);
1220
1220
  }
1221
- `,Ph=new WeakSet,im=["popup","menu","modal","toast","tooltip"];function nm(i){if(Ph.has(i))return;let o=i.createElement("style");o.setAttribute("data-lui-overlay-external-styles",""),o.textContent=om,i.head.appendChild(o),Ph.add(i)}function am(i){return i instanceof HTMLElement||i instanceof ShadowRoot}function sm(i){for(let o of Array.from(i.childNodes))if(o instanceof Zn||o instanceof HTMLElement&&o.tagName.toLowerCase()==="lui-overlay-root")return o;return null}function lm(i){if(am(i))return i;if(typeof document>"u"||!document.body)throw new Error("lui-overlay-root requires a browser document body.");return document.body}var Zn=class extends HTMLElement{constructor(){super();this._layers=new Map;this._externalLayers=new Map;let e=this.attachShadow({mode:"open"});nm(this.ownerDocument);let t=document.createElement("style");t.textContent=rm,this._viewport=document.createElement("div"),this._viewport.setAttribute("part","viewport"),this._externalSlot=document.createElement("slot"),this._externalSlot.name="external",this._externalSlot.setAttribute("part","external-slot");for(let r of im){let n=document.createElement("div");n.setAttribute("part","layer"),n.dataset.layer=r,this._layers.set(r,n),this._viewport.appendChild(n)}e.append(t,this._viewport,this._externalSlot)}getLayer(e="popup"){return this._layers.get(e)??this._layers.get("popup")}getExternalLayer(e="popup"){let t=this._externalLayers.get(e);if(t)return t;let r=this.ownerDocument.createElement("div");return r.className="lui-overlay-external-layer",r.dataset.layer=e,r.slot="external",this.appendChild(r),this._externalLayers.set(e,r),r}};customElements.get("lui-overlay-root")||customElements.define("lui-overlay-root",Zn);function Ys(i){let o=lm(i),e=sm(o);return e||(e=(o instanceof ShadowRoot,o.ownerDocument).createElement("lui-overlay-root"),o.appendChild(e)),e}function Xs(i="popup",o){return Ys(o).getLayer(i)}function Sr(i="popup",o){return Ys(o).getExternalLayer(i)}var Qn=new WeakMap,Zs=new WeakMap,kc=new WeakMap,Oh=new WeakMap;function xc(i){if(!i)return null;let o=i.getRootNode?.();return o instanceof ShadowRoot&&o.host&&o!==i?o.host:i.parentNode}function cm(i,o){let e=o;for(;e;){if(e===i)return!0;e=xc(e)}return!1}function dm(i){let o=i instanceof Node?i:null;for(;o;){if(o instanceof HTMLElement){let e=kc.get(o);if(e)return e}o=xc(o)}return null}function wc(i,o){if(o){kc.set(i,o);return}kc.delete(i)}function Cn(i,o){return i.some(e=>{let t=dm(e);return t?cm(o,t):!1})}function Ya(i,o=320){if(!i)return;let e=Date.now()+o,t=i;for(;t;)t instanceof HTMLElement&&Oh.set(t,e),t=xc(t)}function Xa(i){return i?(Oh.get(i)??0)>Date.now():!1}function Za(i){let o=Zs.get(i);if(o)return o;let e=[];return Zs.set(i,e),e}function um(i){let o=Number.parseInt(getComputedStyle(i).zIndex,10);return Number.isFinite(o)?o:0}function hm(i){let o=getComputedStyle(i).getPropertyValue("--lui-z-step").trim(),e=Number.parseInt(o,10);return Number.isFinite(e)&&e>0?e:10}function _c(i){let o=Za(i).filter(r=>r.isConnected);if(o.length===0){Zs.delete(i);return}let e=um(i),t=hm(i);o.forEach((r,n)=>{let s=String(e+n*t);r.style.setProperty("--lui-overlay-z-index",s),r.style.zIndex=s}),Zs.set(i,o)}function Jt(i,o,e){let t=Qn.get(i);t&&t.layer!==o&&Yo(i);let r=Za(o),n=r.indexOf(i);n>=0&&r.splice(n,1),r.push(i),Qn.set(i,{element:i,layer:o,layerName:e}),_c(o)}function Et(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer),t=e.indexOf(i);return t===-1?e.push(i):t!==e.length-1&&(e.splice(t,1),e.push(i)),_c(o.layer),!0}function Yo(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer),t=e.indexOf(i);return t>=0&&e.splice(t,1),i.style.removeProperty("--lui-overlay-z-index"),i.style.removeProperty("z-index"),Qn.delete(i),_c(o.layer),!0}function Qa(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer).filter(t=>t.isConnected);return e.length>0&&e[e.length-1]===i}function zn(i){let o=i?.parentElement,e=o?.dataset.layer;return!o||!e?null:{layer:o,layerName:e}}var pm=`
1221
+ `,Ph=new WeakSet,im=["popup","menu","modal","toast","tooltip"];function nm(i){if(Ph.has(i))return;let o=i.createElement("style");o.setAttribute("data-lui-overlay-external-styles",""),o.textContent=om,i.head.appendChild(o),Ph.add(i)}function am(i){return i instanceof HTMLElement||i instanceof ShadowRoot}function sm(i){for(let o of Array.from(i.childNodes))if(o instanceof Zn||o instanceof HTMLElement&&o.tagName.toLowerCase()==="lui-overlay-root")return o;return null}function lm(i){if(am(i))return i;if(typeof document>"u"||!document.body)throw new Error("lui-overlay-root requires a browser document body.");return document.body}var Zn=class extends HTMLElement{constructor(){super();this._layers=new Map;this._externalLayers=new Map;let e=this.attachShadow({mode:"open"});nm(this.ownerDocument);let t=document.createElement("style");t.textContent=rm,this._viewport=document.createElement("div"),this._viewport.setAttribute("part","viewport"),this._externalSlot=document.createElement("slot"),this._externalSlot.name="external",this._externalSlot.setAttribute("part","external-slot");for(let r of im){let n=document.createElement("div");n.setAttribute("part","layer"),n.dataset.layer=r,this._layers.set(r,n),this._viewport.appendChild(n)}e.append(t,this._viewport,this._externalSlot)}getLayer(e="popup"){return this._layers.get(e)??this._layers.get("popup")}getExternalLayer(e="popup"){let t=this._externalLayers.get(e);if(t)return t;let r=this.ownerDocument.createElement("div");return r.className="lui-overlay-external-layer",r.dataset.layer=e,r.slot="external",this.appendChild(r),this._externalLayers.set(e,r),r}};customElements.get("lui-overlay-root")||customElements.define("lui-overlay-root",Zn);function Ys(i){let o=lm(i),e=sm(o);return e||(e=(o instanceof ShadowRoot,o.ownerDocument).createElement("lui-overlay-root"),o.appendChild(e)),e}function Xs(i="popup",o){return Ys(o).getLayer(i)}function Tr(i="popup",o){return Ys(o).getExternalLayer(i)}var Qn=new WeakMap,Zs=new WeakMap,kc=new WeakMap,Oh=new WeakMap;function xc(i){if(!i)return null;let o=i.getRootNode?.();return o instanceof ShadowRoot&&o.host&&o!==i?o.host:i.parentNode}function cm(i,o){let e=o;for(;e;){if(e===i)return!0;e=xc(e)}return!1}function dm(i){let o=i instanceof Node?i:null;for(;o;){if(o instanceof HTMLElement){let e=kc.get(o);if(e)return e}o=xc(o)}return null}function wc(i,o){if(o){kc.set(i,o);return}kc.delete(i)}function Cn(i,o){return i.some(e=>{let t=dm(e);return t?cm(o,t):!1})}function Ya(i,o=320){if(!i)return;let e=Date.now()+o,t=i;for(;t;)t instanceof HTMLElement&&Oh.set(t,e),t=xc(t)}function Xa(i){return i?(Oh.get(i)??0)>Date.now():!1}function Za(i){let o=Zs.get(i);if(o)return o;let e=[];return Zs.set(i,e),e}function um(i){let o=Number.parseInt(getComputedStyle(i).zIndex,10);return Number.isFinite(o)?o:0}function hm(i){let o=getComputedStyle(i).getPropertyValue("--lui-z-step").trim(),e=Number.parseInt(o,10);return Number.isFinite(e)&&e>0?e:10}function _c(i){let o=Za(i).filter(r=>r.isConnected);if(o.length===0){Zs.delete(i);return}let e=um(i),t=hm(i);o.forEach((r,n)=>{let s=String(e+n*t);r.style.setProperty("--lui-overlay-z-index",s),r.style.zIndex=s}),Zs.set(i,o)}function Jt(i,o,e){let t=Qn.get(i);t&&t.layer!==o&&Yo(i);let r=Za(o),n=r.indexOf(i);n>=0&&r.splice(n,1),r.push(i),Qn.set(i,{element:i,layer:o,layerName:e}),_c(o)}function Et(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer),t=e.indexOf(i);return t===-1?e.push(i):t!==e.length-1&&(e.splice(t,1),e.push(i)),_c(o.layer),!0}function Yo(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer),t=e.indexOf(i);return t>=0&&e.splice(t,1),i.style.removeProperty("--lui-overlay-z-index"),i.style.removeProperty("z-index"),Qn.delete(i),_c(o.layer),!0}function Qa(i){let o=Qn.get(i);if(!o)return!1;let e=Za(o.layer).filter(t=>t.isConnected);return e.length>0&&e[e.length-1]===i}function zn(i){let o=i?.parentElement,e=o?.dataset.layer;return!o||!e?null:{layer:o,layerName:e}}var pm=`
1222
1222
  :host {
1223
1223
  position: fixed;
1224
1224
  inset: 0;
@@ -1437,7 +1437,7 @@
1437
1437
  transition: none;
1438
1438
  }
1439
1439
  }
1440
- `,te=class extends pi.LitElement{constructor(){super(...arguments);this.open=!1;this.placement="bottom";this.trigger="click";this.disabled=!1;this.interactive=!0;this.showArrow=!0;this.closeOnOutsidePress=!0;this.closeOnEsc=!0;this.openDelay=80;this.closeDelay=100;this.offsetDistance=8;this.autoFlip=!0;this.autoShift=!0;this.sameWidth=!1;this.backdrop="none";this.backdropStyle="";this.portal=!1;this.overlayLayer="popup";this._hasHeader=!1;this._hasFooter=!1;this._cleanupAutoUpdate=null;this._openTimer=null;this._closeTimer=null;this._triggerHovered=!1;this._contentHovered=!1;this._triggerFocused=!1;this._contentFocused=!1;this._portalHost=null;this._portalBackdropEl=null;this._portalContentEl=null;this._portalArrowEl=null;this._portalHeaderEl=null;this._portalBodyEl=null;this._portalFooterEl=null;this._portalLayerEl=null;this._portalDestroyTimer=null;this._portaledNodes=new Map;this._hoverBridgeCleanup=null;this._lastPointer=null;this._lastTriggerPointerDownAt=0;this._suppressTriggerFocusUntilBlur=!1;this._suppressOutsidePressUntil=0;this._onTriggerPointerDown=()=>{this._lastTriggerPointerDownAt=Date.now(),this._hasTrigger("focus")&&(this._suppressTriggerFocusUntilBlur=!0,this._triggerFocused=!1)};this._onTriggerClick=e=>{if(this._hasTrigger("click")){e.stopPropagation(),this.toggle();return}this.open&&this._suppressTriggerFocusUntilBlur&&(this._hasTrigger("hover")||this._hasTrigger("focus"))&&(this._triggerHovered=!1,this._triggerFocused=!1,this._contentHovered=!1,this._contentFocused=!1,this._cleanupHoverBridge(),this.hide())};this._onTriggerMouseEnter=e=>{this._hasTrigger("hover")&&(this._lastPointer={x:e.clientX,y:e.clientY},this._triggerHovered=!0,this._scheduleShow())};this._onTriggerMouseLeave=e=>{if(!this._hasTrigger("hover"))return;let t=e.relatedTarget;this._triggerHovered=!1,this._suppressTriggerFocusUntilBlur&&(this._triggerFocused=!1),!(this.interactive&&this._isInsideFloating(t))&&(this._startHoverBridge(e)||this._scheduleHide())};this._onContentMouseEnter=e=>{this.interactive&&this._hasTrigger("hover")&&(this._lastPointer={x:e.clientX,y:e.clientY},this._contentHovered=!0,this._clearCloseTimer())};this._onContentMouseLeave=e=>{if(!this.interactive||!this._hasTrigger("hover"))return;let t=e.relatedTarget;this._contentHovered=!1,!this._isInsideTrigger(t)&&(this._startHoverBridge(e)||this._scheduleHide())};this._onTriggerFocusIn=()=>{if(this._hasTrigger("focus")){if(this._suppressTriggerFocusUntilBlur){this._triggerFocused=!1;return}if(Date.now()-this._lastTriggerPointerDownAt<500){this._triggerFocused=!1;return}this._triggerFocused=!0,this._scheduleShow()}};this._onTriggerFocusOut=e=>{if(!this._hasTrigger("focus"))return;let t=e.relatedTarget;this._isInsideTrigger(t)||this._isInsideFloating(t)||(this._suppressTriggerFocusUntilBlur=!1,this._triggerFocused=!1,this._scheduleHide())};this._onContentFocusIn=()=>{this.interactive&&(this._contentFocused=!0,this._clearCloseTimer())};this._onContentFocusOut=e=>{if(!this.interactive)return;let t=e.relatedTarget;this._isInsideTrigger(t)||this._isInsideFloating(t)||(this._contentFocused=!1,this._scheduleHide())};this._onDocumentMouseMove=e=>{this._lastPointer={x:e.clientX,y:e.clientY}};this._onBackdropClick=e=>{e.stopPropagation(),!(Date.now()<this._suppressOutsidePressUntil||Xa(this)||!this._emitOutsidePress(e)||!this.closeOnOutsidePress)&&this.hide()};this._onContentClick=e=>{Ya(this),e.stopPropagation()};this._onDocumentPointerDown=e=>{if(!this.open)return;let t=e.composedPath(),r=this._portalHost?t.includes(this._portalHost):!1;if(Cn(t,this)){this._suppressOutsidePressUntil=Date.now()+320;return}if(!t.includes(this)&&!r){if(!this._emitOutsidePress(e)||!this.closeOnOutsidePress)return;this._cleanupHoverBridge(),this.hide()}};this._onDocumentKeydown=e=>{!this.open||!this.closeOnEsc||e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),this.hide())}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeydown),document.addEventListener("mousemove",this._onDocumentMouseMove,!0)}disconnectedCallback(){super.disconnectedCallback(),this._clearTimers(),this._clearPortalDestroyTimer(),this._cleanupPositioning(),this._destroyPortal(),this._cleanupHoverBridge(),document.removeEventListener("mousedown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeydown),document.removeEventListener("mousemove",this._onDocumentMouseMove,!0)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");e.has("interactive")&&this._portalHost&&this._portalContentEl&&(this._portalContentEl.classList.toggle("interactive",this.interactive),this._portalHost.toggleAttribute("interactive",this.interactive)),(e.has("backdrop")||e.has("backdropStyle"))&&this._portalHost&&this._syncPortalBackdrop(),t&&this._portalHost&&this._destroyPortal(),(t||e.has("open")||e.has("placement")||e.has("offsetDistance")||e.has("showArrow")||e.has("autoFlip")||e.has("autoShift"))&&(this.open?this.updateComplete.then(()=>{this.portal&&(this._ensurePortal(),this._syncPortalNodes()),this._setupPositioning()}):(this._cleanupPositioning(),this._cleanupHoverBridge(),this._contentHovered=!1,this._contentFocused=!1,this.portal&&(this._portalHost?.toggleAttribute("open",!1),this._portalHost?.toggleAttribute("interactive",this.interactive),this._schedulePortalDestroy()))),this.portal&&this.open&&this.updateComplete.then(()=>this._syncPortalNodes())}show(){this.disabled||this.open||(this._clearCloseTimer(),this._clearPortalDestroyTimer(),this.portal&&(this._ensurePortal(),this._syncPortalNodes(),this._portalHost&&Et(this._portalHost),this._portalContentEl?.classList.toggle("interactive",this.interactive),this._portalHost?.toggleAttribute("interactive",this.interactive)),this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})))}hide(){this.open&&(this._clearOpenTimer(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}toggle(){this.open?this.hide():this.show()}_clearOpenTimer(){this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null)}_clearCloseTimer(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null)}_clearTimers(){this._clearOpenTimer(),this._clearCloseTimer()}_clearPortalDestroyTimer(){this._portalDestroyTimer&&(clearTimeout(this._portalDestroyTimer),this._portalDestroyTimer=null)}_schedulePortalDestroy(){this._clearPortalDestroyTimer(),this._portalDestroyTimer=setTimeout(()=>{this._portalDestroyTimer=null,this.open||this._destroyPortal()},160)}_cleanupHoverBridge(){this._hoverBridgeCleanup&&(this._hoverBridgeCleanup(),this._hoverBridgeCleanup=null)}_hasTrigger(e){return this.trigger.split(/\s+/).map(t=>t.trim()).filter(Boolean).includes(e)}_scheduleShow(){if(this.disabled)return;this._clearCloseTimer(),this._clearOpenTimer();let e=Math.max(0,this.openDelay||0);this._openTimer=setTimeout(()=>{this._openTimer=null,this.show()},e)}_scheduleHide(){this._clearOpenTimer(),this._clearCloseTimer();let e=Math.max(0,this.closeDelay||0);this._closeTimer=setTimeout(()=>{this._closeTimer=null,this._refreshHoverStateFromPointer(),!(this._triggerHovered||this._triggerFocused)&&(this.interactive&&(this._contentHovered||this._contentFocused)||this.hide())},e)}_containsDeep(e,t){if(!e||!t)return!1;let r=t;for(let n=0;r&&n<64;n+=1){if(r===e||r.nodeType===Node.ELEMENT_NODE&&e.contains(r))return!0;let s=r.assignedSlot??null;if(s){r=s;continue}let d=r.parentNode;if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){r=d.host??null;continue}r=d}return!1}_isInsideTrigger(e){return this._containsDeep(this._triggerEl,e)}_isInsideFloating(e){return this._containsDeep(this._getFloatingEl(),e)}_pointInRect(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}_createBridgeRect(e,t,r=16){return{left:Math.min(e.left,t.left)-r,top:Math.min(e.top,t.top)-r,right:Math.max(e.right,t.right)+r,bottom:Math.max(e.bottom,t.bottom)+r}}_deepElementFromPoint(e,t){if(typeof document.elementFromPoint!="function")return null;let r=null;try{r=document.elementFromPoint(e,t);for(let n=0;n<32;n+=1){let s=r?.shadowRoot?.elementFromPoint(e,t);if(!s||s===r)break;r=s}}catch{return null}return r}_refreshHoverStateFromPointer(){if(!this._lastPointer)return!1;let{x:e,y:t}=this._lastPointer,n=this._portalHost?.shadowRoot?.elementFromPoint(e,t)??this._deepElementFromPoint(e,t),s=this._isInsideTrigger(n),d=this._isInsideFloating(n);return this._triggerHovered=s,this._contentHovered=this.interactive&&d,s||d}_pointInTriangle(e,t,r,n){let s=(x,k,C)=>(x.x*(k.y-C.y)+k.x*(C.y-x.y)+C.x*(x.y-k.y))/2,d=Math.abs(s(t,r,n)),h=Math.abs(s(e,t,r)),p=Math.abs(s(e,r,n)),f=Math.abs(s(e,n,t));return Math.abs(d-(h+p+f))<.5}_startHoverBridge(e){if(!this.open||!this.interactive||!this._hasTrigger("hover"))return!1;this.portal&&(this._ensurePortal(),this._syncPortalNodes());let t=e.currentTarget,r=this._getFloatingEl(),n=this._triggerEl??null;if(!t||!r||!n)return!1;let s=t===n?r:n,d=r.dataset.side||this.getAttribute("data-placement")?.split("-")[0]||this.placement.split("-")[0],h=t.getBoundingClientRect(),p=s.getBoundingClientRect(),f={x:e.clientX,y:e.clientY},x=this._createBridgeRect(h,p),k=14,C=null;if(d==="right"?C=[f,{x:p.left,y:p.top-k},{x:p.left,y:p.bottom+k}]:d==="left"?C=[f,{x:p.right,y:p.top-k},{x:p.right,y:p.bottom+k}]:d==="bottom"?C=[f,{x:p.left-k,y:p.top},{x:p.right+k,y:p.top}]:d==="top"&&(C=[f,{x:p.left-k,y:p.bottom},{x:p.right+k,y:p.bottom}]),!C)return!1;this._cleanupHoverBridge(),this._clearCloseTimer();let $=0,z=()=>{$&&clearTimeout($),$=window.setTimeout(j,900)},T=H=>{this._lastPointer={x:H.clientX,y:H.clientY};let I=H.composedPath?.()[0]??H.target;if(this._isInsideTrigger(I)||this._isInsideFloating(I)){this._refreshHoverStateFromPointer(),this._cleanupHoverBridge();return}let B=this._lastPointer;if(B&&(this._pointInRect(B,x)||this._pointInTriangle(B,C[0],C[1],C[2]))){z();return}this._cleanupHoverBridge(),this._scheduleHide()},j=()=>{if(this._cleanupHoverBridge(),this._refreshHoverStateFromPointer()){this._clearCloseTimer();return}this._scheduleHide()};return z(),document.addEventListener("mousemove",T,!0),this._hoverBridgeCleanup=()=>{clearTimeout($),document.removeEventListener("mousemove",T,!0),this._hoverBridgeCleanup=null},!0}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_syncNamedSlot(e,t){let n=e.target.assignedNodes({flatten:!0}).some(s=>s.nodeType!==Node.TEXT_NODE||s.textContent?.trim());t==="header"?this._hasHeader=n:this._hasFooter=n}_cleanupPositioning(){this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=null)}get portalHostElement(){return this._portalHost}get portalFloatingElement(){return this._portalContentEl}refreshFloatingPosition(){this._setupPositioning()}_getFloatingEl(){return this.portal?this._portalContentEl:this._contentEl??null}_getArrowEl(){return this.portal?this._portalArrowEl:this._arrowEl??null}_resolvePortalMountTarget(){return Xs(this.overlayLayer,this.container??sn(this)??ln(this))}_adoptPortalStyles(e){if(!("adoptedStyleSheets"in e))return;let t=[...this.renderRoot.adoptedStyleSheets??[],...this.portalStyleSources??[]];if(t.length===0)return;let r=[...e.adoptedStyleSheets??[]];for(let n of t)r.includes(n)||r.push(n);e.adoptedStyleSheets=r}_ensurePortal(){if(this._clearPortalDestroyTimer(),this._portalHost)return;let e=this._resolvePortalMountTarget(),t=document.createElement("div"),r=t.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=pm,this._adoptPortalStyles(r);let s=document.createElement("div");s.setAttribute("part","content"),this.interactive&&s.classList.add("interactive");let d=document.createElement("div");d.setAttribute("part","surface");let h=document.createElement("div");h.setAttribute("part","header"),h.hidden=!this._hasHeader;let p=document.createElement("div");p.setAttribute("part","backdrop"),p.addEventListener("click",this._onBackdropClick);let f=document.createElement("div");f.setAttribute("part","body"),this._syncBodyDensity(f,this._hasHeader,this._hasFooter);let x=document.createElement("div");x.setAttribute("part","footer"),x.hidden=!this._hasFooter,d.append(h,f,x),s.appendChild(d);let k=null;if(this.showArrow){k=document.createElement("div"),k.setAttribute("part","arrow");let C=document.createElement("div");C.setAttribute("part","arrow-fill"),k.appendChild(C),s.appendChild(k)}s.addEventListener("mouseenter",this._onContentMouseEnter),s.addEventListener("mouseleave",this._onContentMouseLeave),s.addEventListener("focusin",this._onContentFocusIn),s.addEventListener("focusout",this._onContentFocusOut),s.addEventListener("click",this._onContentClick),r.append(n,p,s),e.appendChild(t),wc(t,this),Jt(t,e,this.overlayLayer),this._portalHost=t,this._portalBackdropEl=p,this._portalContentEl=s,this._portalArrowEl=k,this._portalHeaderEl=h,this._portalBodyEl=f,this._portalFooterEl=x,this._portalLayerEl=e,this._syncPortalBackdrop(),this._syncPortalCssVars()}_moveSlotElements(e,t){if(!e||!t)return;let r=e.assignedElements({flatten:!0});for(let n of r){if(!this._portaledNodes.has(n)){let s=document.createComment("lui-popover-portal");n.parentNode?.insertBefore(s,n),this._portaledNodes.set(n,{node:n,placeholder:s})}n.parentNode!==t&&t.appendChild(n)}}_syncPortalCssVars(){if(!this._portalHost)return;let e=getComputedStyle(this),t=this._portalHost.style;for(let r of[...Vu,...te.PORTAL_OWN_VARS]){let n=e.getPropertyValue(r).trim();n?t.setProperty(r,n):t.removeProperty(r)}}_syncPortalBackdrop(){!this._portalHost||!this._portalBackdropEl||(this._portalHost.setAttribute("backdrop",this.backdrop),this._portalBackdropEl.hidden=this.backdrop==="none",this._portalBackdropEl.style.cssText=this.backdropStyle||"")}_syncPortalNodes(){if(!this.portal||!this._portalHost)return;this._syncPortalBackdrop(),this._syncPortalCssVars(),this._moveSlotElements(this._backdropSlot,this._portalBackdropEl);let e=!!this._headerSlot?.assignedElements({flatten:!0}).length,t=!!this._footerSlot?.assignedElements({flatten:!0}).length;this._portalHeaderEl.hidden=!e,this._portalFooterEl.hidden=!t,this._syncBodyDensity(this._portalBodyEl,e,t),this._moveSlotElements(this._headerSlot,this._portalHeaderEl),this._moveSlotElements(this._bodySlot,this._portalBodyEl),this._moveSlotElements(this._footerSlot,this._portalFooterEl)}_syncBodyDensity(e,t,r){if(!e)return;let n=!t&&!r;e.toggleAttribute("data-compact",n)}_restorePortaledNodes(){for(let{node:e,placeholder:t}of this._portaledNodes.values())t.parentNode?.insertBefore(e,t),t.remove();this._portaledNodes.clear()}_destroyPortal(){this._clearPortalDestroyTimer(),this._portalHost&&(this._cleanupPositioning(),this._restorePortaledNodes(),this._portalBackdropEl?.removeEventListener("click",this._onBackdropClick),this._portalContentEl?.removeEventListener("click",this._onContentClick),this._portalContentEl?.removeEventListener("mouseenter",this._onContentMouseEnter),this._portalContentEl?.removeEventListener("mouseleave",this._onContentMouseLeave),this._portalContentEl?.removeEventListener("focusin",this._onContentFocusIn),this._portalContentEl?.removeEventListener("focusout",this._onContentFocusOut),Yo(this._portalHost),this._portalHost.remove(),this._portalHost=null,this._portalBackdropEl=null,this._portalContentEl=null,this._portalArrowEl=null,this._portalHeaderEl=null,this._portalBodyEl=null,this._portalFooterEl=null,this._portalLayerEl=null)}_setupPositioning(){let e=this._getFloatingEl();if(!this._triggerEl||!e)return;this._cleanupPositioning();let t={top:"bottom",right:"left",bottom:"top",left:"right"},r=async()=>{let n=this._getFloatingEl(),s=this._getArrowEl();if(!this._triggerEl||!n)return;let{x:d,y:h,placement:p,middlewareData:f}=await(0,Mo.computePosition)(this._triggerEl,n,{strategy:"fixed",placement:this.placement,middleware:[(0,Mo.offset)(this.offsetDistance),...this.autoFlip?[(0,Mo.flip)({padding:8})]:[],...this.autoShift?[(0,Mo.shift)({padding:8})]:[],(0,Mo.size)({padding:8,apply:({rects:C,availableWidth:$,availableHeight:z,elements:T})=>{let j=Math.max(160,Math.min($,Number.isFinite(this.maxWidth)?Number(this.maxWidth):$)),H=Math.max(120,Math.min(z,Number.isFinite(this.maxHeight)?Number(this.maxHeight):z));Object.assign(T.floating.style,{maxWidth:`${j}px`,maxHeight:`${H}px`,minWidth:this.sameWidth?`${C.reference.width}px`:""})}}),...this.showArrow&&s?[(0,Mo.arrow)({element:s,padding:10})]:[]]}),x=this._getFloatingEl();if(!x)return;Object.assign(x.style,{left:`${d}px`,top:`${h}px`});let k=p.split("-")[0];if(x.dataset.side=k,this.setAttribute("data-placement",p),this.portal&&this._portalHost&&(this._portalHost.toggleAttribute("open",this.open),this._portalHost.toggleAttribute("interactive",this.interactive),this._portalHost.setAttribute("data-side",k)),this.showArrow&&s){let{x:C,y:$}=f.arrow??{};s.style.left="",s.style.top="",s.style.right="",s.style.bottom="",C!=null&&(s.style.left=`${C}px`),$!=null&&(s.style.top=`${$}px`),s.style.setProperty(t[k]??"top","-6px")}};this._cleanupAutoUpdate=(0,Mo.autoUpdate)(this._triggerEl,e,r),r()}render(){return this.portal?pi.html`
1440
+ `,te=class extends pi.LitElement{constructor(){super(...arguments);this.open=!1;this.placement="bottom";this.trigger="click";this.disabled=!1;this.interactive=!0;this.showArrow=!0;this.closeOnOutsidePress=!0;this.closeOnEsc=!0;this.openDelay=80;this.closeDelay=100;this.offsetDistance=8;this.autoFlip=!0;this.autoShift=!0;this.sameWidth=!1;this.backdrop="none";this.backdropStyle="";this.portal=!1;this.overlayLayer="popup";this._hasHeader=!1;this._hasFooter=!1;this._cleanupAutoUpdate=null;this._openTimer=null;this._closeTimer=null;this._triggerHovered=!1;this._contentHovered=!1;this._triggerFocused=!1;this._contentFocused=!1;this._portalHost=null;this._portalBackdropEl=null;this._portalContentEl=null;this._portalArrowEl=null;this._portalHeaderEl=null;this._portalBodyEl=null;this._portalFooterEl=null;this._portalLayerEl=null;this._portalDestroyTimer=null;this._portaledNodes=new Map;this._hoverBridgeCleanup=null;this._lastPointer=null;this._lastTriggerPointerDownAt=0;this._suppressTriggerFocusUntilBlur=!1;this._suppressOutsidePressUntil=0;this._onTriggerPointerDown=()=>{this._lastTriggerPointerDownAt=Date.now(),this._hasTrigger("focus")&&(this._suppressTriggerFocusUntilBlur=!0,this._triggerFocused=!1)};this._onTriggerClick=e=>{if(this._hasTrigger("click")){e.stopPropagation(),this.toggle();return}this.open&&this._suppressTriggerFocusUntilBlur&&(this._hasTrigger("hover")||this._hasTrigger("focus"))&&(this._triggerHovered=!1,this._triggerFocused=!1,this._contentHovered=!1,this._contentFocused=!1,this._cleanupHoverBridge(),this.hide())};this._onTriggerMouseEnter=e=>{this._hasTrigger("hover")&&(this._lastPointer={x:e.clientX,y:e.clientY},this._triggerHovered=!0,this._scheduleShow())};this._onTriggerMouseLeave=e=>{if(!this._hasTrigger("hover"))return;let t=e.relatedTarget;this._triggerHovered=!1,this._suppressTriggerFocusUntilBlur&&(this._triggerFocused=!1),!(this.interactive&&this._isInsideFloating(t))&&(this._startHoverBridge(e)||this._scheduleHide())};this._onContentMouseEnter=e=>{this.interactive&&this._hasTrigger("hover")&&(this._lastPointer={x:e.clientX,y:e.clientY},this._contentHovered=!0,this._clearCloseTimer())};this._onContentMouseLeave=e=>{if(!this.interactive||!this._hasTrigger("hover"))return;let t=e.relatedTarget;this._contentHovered=!1,!this._isInsideTrigger(t)&&(this._startHoverBridge(e)||this._scheduleHide())};this._onTriggerFocusIn=()=>{if(this._hasTrigger("focus")){if(this._suppressTriggerFocusUntilBlur){this._triggerFocused=!1;return}if(Date.now()-this._lastTriggerPointerDownAt<500){this._triggerFocused=!1;return}this._triggerFocused=!0,this._scheduleShow()}};this._onTriggerFocusOut=e=>{if(!this._hasTrigger("focus"))return;let t=e.relatedTarget;this._isInsideTrigger(t)||this._isInsideFloating(t)||(this._suppressTriggerFocusUntilBlur=!1,this._triggerFocused=!1,this._scheduleHide())};this._onContentFocusIn=()=>{this.interactive&&(this._contentFocused=!0,this._clearCloseTimer())};this._onContentFocusOut=e=>{if(!this.interactive)return;let t=e.relatedTarget;this._isInsideTrigger(t)||this._isInsideFloating(t)||(this._contentFocused=!1,this._scheduleHide())};this._onDocumentMouseMove=e=>{this._lastPointer={x:e.clientX,y:e.clientY}};this._onBackdropClick=e=>{e.stopPropagation(),!(Date.now()<this._suppressOutsidePressUntil||Xa(this)||!this._emitOutsidePress(e)||!this.closeOnOutsidePress)&&this.hide()};this._onContentClick=e=>{Ya(this),e.stopPropagation()};this._onDocumentPointerDown=e=>{if(!this.open)return;let t=e.composedPath(),r=this._portalHost?t.includes(this._portalHost):!1;if(Cn(t,this)){this._suppressOutsidePressUntil=Date.now()+320;return}if(!t.includes(this)&&!r){if(!this._emitOutsidePress(e)||!this.closeOnOutsidePress)return;this._cleanupHoverBridge(),this.hide()}};this._onDocumentKeydown=e=>{!this.open||!this.closeOnEsc||e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),this.hide())}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeydown),document.addEventListener("mousemove",this._onDocumentMouseMove,!0)}disconnectedCallback(){super.disconnectedCallback(),this._clearTimers(),this._clearPortalDestroyTimer(),this._cleanupPositioning(),this._destroyPortal(),this._cleanupHoverBridge(),document.removeEventListener("mousedown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeydown),document.removeEventListener("mousemove",this._onDocumentMouseMove,!0)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");e.has("interactive")&&this._portalHost&&this._portalContentEl&&(this._portalContentEl.classList.toggle("interactive",this.interactive),this._portalHost.toggleAttribute("interactive",this.interactive)),(e.has("backdrop")||e.has("backdropStyle"))&&this._portalHost&&this._syncPortalBackdrop(),t&&this._portalHost&&this._destroyPortal(),(t||e.has("open")||e.has("placement")||e.has("offsetDistance")||e.has("showArrow")||e.has("autoFlip")||e.has("autoShift"))&&(this.open?this.updateComplete.then(()=>{this.portal&&(this._ensurePortal(),this._syncPortalNodes()),this._setupPositioning()}):(this._cleanupPositioning(),this._cleanupHoverBridge(),this._contentHovered=!1,this._contentFocused=!1,this.portal&&(this._portalHost?.toggleAttribute("open",!1),this._portalHost?.toggleAttribute("interactive",this.interactive),this._schedulePortalDestroy()))),this.portal&&this.open&&this.updateComplete.then(()=>this._syncPortalNodes())}show(){this.disabled||this.open||(this._clearCloseTimer(),this._clearPortalDestroyTimer(),this.portal&&(this._ensurePortal(),this._syncPortalNodes(),this._portalHost&&Et(this._portalHost),this._portalContentEl?.classList.toggle("interactive",this.interactive),this._portalHost?.toggleAttribute("interactive",this.interactive)),this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})))}hide(){this.open&&(this._clearOpenTimer(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}toggle(){this.open?this.hide():this.show()}_clearOpenTimer(){this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null)}_clearCloseTimer(){this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null)}_clearTimers(){this._clearOpenTimer(),this._clearCloseTimer()}_clearPortalDestroyTimer(){this._portalDestroyTimer&&(clearTimeout(this._portalDestroyTimer),this._portalDestroyTimer=null)}_schedulePortalDestroy(){this._clearPortalDestroyTimer(),this._portalDestroyTimer=setTimeout(()=>{this._portalDestroyTimer=null,this.open||this._destroyPortal()},160)}_cleanupHoverBridge(){this._hoverBridgeCleanup&&(this._hoverBridgeCleanup(),this._hoverBridgeCleanup=null)}_hasTrigger(e){return this.trigger.split(/\s+/).map(t=>t.trim()).filter(Boolean).includes(e)}_scheduleShow(){if(this.disabled)return;this._clearCloseTimer(),this._clearOpenTimer();let e=Math.max(0,this.openDelay||0);this._openTimer=setTimeout(()=>{this._openTimer=null,this.show()},e)}_scheduleHide(){this._clearOpenTimer(),this._clearCloseTimer();let e=Math.max(0,this.closeDelay||0);this._closeTimer=setTimeout(()=>{this._closeTimer=null,this._refreshHoverStateFromPointer(),!(this._triggerHovered||this._triggerFocused)&&(this.interactive&&(this._contentHovered||this._contentFocused)||this.hide())},e)}_containsDeep(e,t){if(!e||!t)return!1;let r=t;for(let n=0;r&&n<64;n+=1){if(r===e||r.nodeType===Node.ELEMENT_NODE&&e.contains(r))return!0;let s=r.assignedSlot??null;if(s){r=s;continue}let d=r.parentNode;if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){r=d.host??null;continue}r=d}return!1}_isInsideTrigger(e){return this._containsDeep(this._triggerEl,e)}_isInsideFloating(e){return this._containsDeep(this._getFloatingEl(),e)}_pointInRect(e,t){return e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom}_createBridgeRect(e,t,r=16){return{left:Math.min(e.left,t.left)-r,top:Math.min(e.top,t.top)-r,right:Math.max(e.right,t.right)+r,bottom:Math.max(e.bottom,t.bottom)+r}}_deepElementFromPoint(e,t){if(typeof document.elementFromPoint!="function")return null;let r=null;try{r=document.elementFromPoint(e,t);for(let n=0;n<32;n+=1){let s=r?.shadowRoot?.elementFromPoint(e,t);if(!s||s===r)break;r=s}}catch{return null}return r}_refreshHoverStateFromPointer(){if(!this._lastPointer)return!1;let{x:e,y:t}=this._lastPointer,n=this._portalHost?.shadowRoot?.elementFromPoint(e,t)??this._deepElementFromPoint(e,t),s=this._isInsideTrigger(n),d=this._isInsideFloating(n);return this._triggerHovered=s,this._contentHovered=this.interactive&&d,s||d}_pointInTriangle(e,t,r,n){let s=(x,k,C)=>(x.x*(k.y-C.y)+k.x*(C.y-x.y)+C.x*(x.y-k.y))/2,d=Math.abs(s(t,r,n)),h=Math.abs(s(e,t,r)),p=Math.abs(s(e,r,n)),f=Math.abs(s(e,n,t));return Math.abs(d-(h+p+f))<.5}_startHoverBridge(e){if(!this.open||!this.interactive||!this._hasTrigger("hover"))return!1;this.portal&&(this._ensurePortal(),this._syncPortalNodes());let t=e.currentTarget,r=this._getFloatingEl(),n=this._triggerEl??null;if(!t||!r||!n)return!1;let s=t===n?r:n,d=r.dataset.side||this.getAttribute("data-placement")?.split("-")[0]||this.placement.split("-")[0],h=t.getBoundingClientRect(),p=s.getBoundingClientRect(),f={x:e.clientX,y:e.clientY},x=this._createBridgeRect(h,p),k=14,C=null;if(d==="right"?C=[f,{x:p.left,y:p.top-k},{x:p.left,y:p.bottom+k}]:d==="left"?C=[f,{x:p.right,y:p.top-k},{x:p.right,y:p.bottom+k}]:d==="bottom"?C=[f,{x:p.left-k,y:p.top},{x:p.right+k,y:p.top}]:d==="top"&&(C=[f,{x:p.left-k,y:p.bottom},{x:p.right+k,y:p.bottom}]),!C)return!1;this._cleanupHoverBridge(),this._clearCloseTimer();let $=0,z=()=>{$&&clearTimeout($),$=window.setTimeout(j,900)},T=H=>{this._lastPointer={x:H.clientX,y:H.clientY};let I=H.composedPath?.()[0]??H.target;if(this._isInsideTrigger(I)||this._isInsideFloating(I)){this._refreshHoverStateFromPointer(),this._cleanupHoverBridge();return}let B=this._lastPointer;if(B&&(this._pointInRect(B,x)||this._pointInTriangle(B,C[0],C[1],C[2]))){z();return}this._cleanupHoverBridge(),this._scheduleHide()},j=()=>{if(this._cleanupHoverBridge(),this._refreshHoverStateFromPointer()){this._clearCloseTimer();return}this._scheduleHide()};return z(),document.addEventListener("mousemove",T,!0),this._hoverBridgeCleanup=()=>{clearTimeout($),document.removeEventListener("mousemove",T,!0),this._hoverBridgeCleanup=null},!0}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_syncNamedSlot(e,t){let n=e.target.assignedNodes({flatten:!0}).some(s=>s.nodeType!==Node.TEXT_NODE||s.textContent?.trim());t==="header"?this._hasHeader=n:this._hasFooter=n}_cleanupPositioning(){this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=null)}get portalHostElement(){return this._portalHost}get portalFloatingElement(){return this._portalContentEl}refreshFloatingPosition(){this._setupPositioning()}_getFloatingEl(){return this.portal?this._portalContentEl:this._contentEl??null}_getArrowEl(){return this.portal?this._portalArrowEl:this._arrowEl??null}_resolvePortalMountTarget(){return Xs(this.overlayLayer,this.container??sn(this)??ln(this))}_adoptPortalStyles(e){if(!("adoptedStyleSheets"in e))return;let t=[...this.renderRoot.adoptedStyleSheets??[],...this.portalStyleSources??[]];if(t.length===0)return;let r=[...e.adoptedStyleSheets??[]];for(let n of t)r.includes(n)||r.push(n);e.adoptedStyleSheets=r}_ensurePortal(){if(this._clearPortalDestroyTimer(),this._portalHost)return;let e=this._resolvePortalMountTarget(),t=document.createElement("div"),r=t.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=pm,this._adoptPortalStyles(r);let s=document.createElement("div");s.setAttribute("part","content"),this.interactive&&s.classList.add("interactive");let d=document.createElement("div");d.setAttribute("part","surface");let h=document.createElement("div");h.setAttribute("part","header"),h.hidden=!this._hasHeader;let p=document.createElement("div");p.setAttribute("part","backdrop"),p.addEventListener("click",this._onBackdropClick);let f=document.createElement("div");f.setAttribute("part","body"),this._syncBodyDensity(f,this._hasHeader,this._hasFooter);let x=document.createElement("div");x.setAttribute("part","footer"),x.hidden=!this._hasFooter,d.append(h,f,x),s.appendChild(d);let k=null;if(this.showArrow){k=document.createElement("div"),k.setAttribute("part","arrow");let C=document.createElement("div");C.setAttribute("part","arrow-fill"),k.appendChild(C),s.appendChild(k)}s.addEventListener("mouseenter",this._onContentMouseEnter),s.addEventListener("mouseleave",this._onContentMouseLeave),s.addEventListener("focusin",this._onContentFocusIn),s.addEventListener("focusout",this._onContentFocusOut),s.addEventListener("click",this._onContentClick),r.append(n,p,s),e.appendChild(t),wc(t,this),Jt(t,e,this.overlayLayer),this._portalHost=t,this._portalBackdropEl=p,this._portalContentEl=s,this._portalArrowEl=k,this._portalHeaderEl=h,this._portalBodyEl=f,this._portalFooterEl=x,this._portalLayerEl=e,this._syncPortalBackdrop(),this._syncPortalCssVars()}_moveSlotElements(e,t){if(!e||!t)return;let r=e.assignedElements({flatten:!0});for(let n of r){if(!this._portaledNodes.has(n)){let s=document.createComment("lui-popover-portal");n.parentNode?.insertBefore(s,n),this._portaledNodes.set(n,{node:n,placeholder:s})}n.parentNode!==t&&t.appendChild(n)}}_syncPortalCssVars(){if(!this._portalHost)return;let e=getComputedStyle(this),t=this._portalHost.style;for(let r of[...Vu,...te.PORTAL_OWN_VARS]){let n=e.getPropertyValue(r).trim();n?t.setProperty(r,n):t.removeProperty(r)}}_syncPortalBackdrop(){!this._portalHost||!this._portalBackdropEl||(this._portalHost.setAttribute("backdrop",this.backdrop),this._portalBackdropEl.hidden=this.backdrop==="none",this._portalBackdropEl.style.cssText=this.backdropStyle||"")}_syncPortalNodes(){if(!this.portal||!this._portalHost)return;this._syncPortalBackdrop(),this._syncPortalCssVars(),this._moveSlotElements(this._backdropSlot,this._portalBackdropEl);let e=!!this._headerSlot?.assignedElements({flatten:!0}).length,t=!!this._footerSlot?.assignedElements({flatten:!0}).length;this._portalHeaderEl.hidden=!e,this._portalFooterEl.hidden=!t,this._syncBodyDensity(this._portalBodyEl,e,t),this._moveSlotElements(this._headerSlot,this._portalHeaderEl),this._moveSlotElements(this._bodySlot,this._portalBodyEl),this._moveSlotElements(this._footerSlot,this._portalFooterEl)}_syncBodyDensity(e,t,r){if(!e)return;let n=!t&&!r;e.toggleAttribute("data-compact",n)}_restorePortaledNodes(){for(let{node:e,placeholder:t}of this._portaledNodes.values())t.parentNode?.insertBefore(e,t),t.remove();this._portaledNodes.clear()}_destroyPortal(){this._clearPortalDestroyTimer(),this._portalHost&&(this._cleanupPositioning(),this._restorePortaledNodes(),this._portalBackdropEl?.removeEventListener("click",this._onBackdropClick),this._portalContentEl?.removeEventListener("click",this._onContentClick),this._portalContentEl?.removeEventListener("mouseenter",this._onContentMouseEnter),this._portalContentEl?.removeEventListener("mouseleave",this._onContentMouseLeave),this._portalContentEl?.removeEventListener("focusin",this._onContentFocusIn),this._portalContentEl?.removeEventListener("focusout",this._onContentFocusOut),Yo(this._portalHost),this._portalHost.remove(),this._portalHost=null,this._portalBackdropEl=null,this._portalContentEl=null,this._portalArrowEl=null,this._portalHeaderEl=null,this._portalBodyEl=null,this._portalFooterEl=null,this._portalLayerEl=null)}_setupPositioning(){let e=this._getFloatingEl();if(!this._triggerEl||!e)return;this._cleanupPositioning();let t={top:"bottom",right:"left",bottom:"top",left:"right"},r=async()=>{let n=this._getFloatingEl(),s=this._getArrowEl();if(!this._triggerEl||!n)return;let{x:d,y:h,placement:p,middlewareData:f}=await(0,Co.computePosition)(this._triggerEl,n,{strategy:"fixed",placement:this.placement,middleware:[(0,Co.offset)(this.offsetDistance),...this.autoFlip?[(0,Co.flip)({padding:8})]:[],...this.autoShift?[(0,Co.shift)({padding:8})]:[],(0,Co.size)({padding:8,apply:({rects:C,availableWidth:$,availableHeight:z,elements:T})=>{let j=Math.max(160,Math.min($,Number.isFinite(this.maxWidth)?Number(this.maxWidth):$)),H=Math.max(120,Math.min(z,Number.isFinite(this.maxHeight)?Number(this.maxHeight):z));Object.assign(T.floating.style,{maxWidth:`${j}px`,maxHeight:`${H}px`,minWidth:this.sameWidth?`${C.reference.width}px`:""})}}),...this.showArrow&&s?[(0,Co.arrow)({element:s,padding:10})]:[]]}),x=this._getFloatingEl();if(!x)return;Object.assign(x.style,{left:`${d}px`,top:`${h}px`});let k=p.split("-")[0];if(x.dataset.side=k,this.setAttribute("data-placement",p),this.portal&&this._portalHost&&(this._portalHost.toggleAttribute("open",this.open),this._portalHost.toggleAttribute("interactive",this.interactive),this._portalHost.setAttribute("data-side",k)),this.showArrow&&s){let{x:C,y:$}=f.arrow??{};s.style.left="",s.style.top="",s.style.right="",s.style.bottom="",C!=null&&(s.style.left=`${C}px`),$!=null&&(s.style.top=`${$}px`),s.style.setProperty(t[k]??"top","-6px")}};this._cleanupAutoUpdate=(0,Co.autoUpdate)(this._triggerEl,e,r),r()}render(){return this.portal?pi.html`
1441
1441
  <span
1442
1442
  part="trigger"
1443
1443
  @pointerdown=${this._onTriggerPointerDown}
@@ -2506,7 +2506,7 @@
2506
2506
  transition: none;
2507
2507
  }
2508
2508
  }
2509
- `],a([(0,Qe.property)({reflect:!0})],Ge.prototype,"selection",2),a([(0,Qe.property)()],Ge.prototype,"value",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"values",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"variant",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"size",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"radius",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"vertical",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"ripple",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"block",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"collapse",2),a([(0,Qe.property)({attribute:"overflow-label"})],Ge.prototype,"overflowLabel",2),a([(0,Qe.property)({attribute:"overflow-icon"})],Ge.prototype,"overflowIcon",2),a([(0,Qe.property)({attribute:"overflow-placement"})],Ge.prototype,"overflowPlacement",2),a([(0,Qe.property)({type:Number,attribute:"overflow-trigger-width"})],Ge.prototype,"overflowTriggerWidth",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"overflowTriggerProps",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"items",2),a([(0,Qe.queryAssignedElements)({flatten:!0})],Ge.prototype,"_assignedElements",2),a([(0,Qe.query)('[part="group"]')],Ge.prototype,"_groupEl",2),a([(0,Qe.query)(".overflow-trigger")],Ge.prototype,"_overflowTriggerButton",2),a([(0,Qe.state)()],Ge.prototype,"_overflowIndexes",2),a([(0,Qe.state)()],Ge.prototype,"_activeInteractionIndex",2),Ge=a([(0,Qe.customElement)("lui-button-group")],Ge);var at=require("lit"),Pe=require("lit/decorators.js");var il=require("lit"),nl=require("lit/directive.js"),qh=require("lit/async-directive.js"),Kh=require("lit/directives/repeat.js");var ea=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ea.eventName="rangeChanged";var ta=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ta.eventName="visibilityChanged";var es=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};es.eventName="unpinned";var Cc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},Qs=class extends Cc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var Nh=typeof window<"u"?window.ResizeObserver:void 0;var $n=Symbol("virtualizerRef"),tl="virtualizer-sizer",Lh,ol=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new Nh(()=>this._hostElementSizeChanged()),this._childrenRO=new Nh(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[$n]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=wm(this._hostElement,o),this._scrollerController=new Qs(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${tl}]`);e||(e=document.createElement("div"),e.setAttribute(tl,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent="&nbsp;",e.setAttribute(tl,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Lh;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Lh=t=(await Promise.resolve().then(()=>(Fh(),Dh))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},km(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new es)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(tl)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(j=>j.getBoundingClientRect());p.unshift(h);for(let j of p)r=Math.max(r,j.top),n=Math.max(n,j.left),s=Math.min(s,j.bottom),d=Math.min(d,j.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},k={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,$=n-h.left+o.scrollLeft,z=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:z},t.viewportScroll={top:C,left:$},t.totalScrollSize=k,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new ea({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new ta({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function km(i){let o=window.getComputedStyle(i);return{marginTop:rl(o.marginTop),marginRight:rl(o.marginRight),marginBottom:rl(o.marginBottom),marginLeft:rl(o.marginLeft)}}function rl(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Bh(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function xm(i,o=!1){let e=[],t=o?i:Bh(i);for(;t!==null;)e.push(t),t=Bh(t);return e}function wm(i,o=!1){let e=!1;return xm(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var Sc=i=>i,Tc=(i,o)=>il.html`${o}: ${JSON.stringify(i,null,2)}`,$c=class extends qh.AsyncDirective{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>Tc(e,t+this._first),this._keyFunction=(e,t)=>Sc(e,t+this._first),this._items=[],o.type!==nl.PartType.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return(0,Kh.repeat)(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?il.noChange:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new ol({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},cn=(0,nl.directive)($c);var Wh=require("lit"),Co=Wh.css`
2509
+ `],a([(0,Qe.property)({reflect:!0})],Ge.prototype,"selection",2),a([(0,Qe.property)()],Ge.prototype,"value",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"values",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"variant",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"size",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"radius",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"vertical",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"ripple",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"block",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"collapse",2),a([(0,Qe.property)({attribute:"overflow-label"})],Ge.prototype,"overflowLabel",2),a([(0,Qe.property)({attribute:"overflow-icon"})],Ge.prototype,"overflowIcon",2),a([(0,Qe.property)({attribute:"overflow-placement"})],Ge.prototype,"overflowPlacement",2),a([(0,Qe.property)({type:Number,attribute:"overflow-trigger-width"})],Ge.prototype,"overflowTriggerWidth",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"overflowTriggerProps",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"items",2),a([(0,Qe.queryAssignedElements)({flatten:!0})],Ge.prototype,"_assignedElements",2),a([(0,Qe.query)('[part="group"]')],Ge.prototype,"_groupEl",2),a([(0,Qe.query)(".overflow-trigger")],Ge.prototype,"_overflowTriggerButton",2),a([(0,Qe.state)()],Ge.prototype,"_overflowIndexes",2),a([(0,Qe.state)()],Ge.prototype,"_activeInteractionIndex",2),Ge=a([(0,Qe.customElement)("lui-button-group")],Ge);var at=require("lit"),Pe=require("lit/decorators.js");var il=require("lit"),nl=require("lit/directive.js"),qh=require("lit/async-directive.js"),Kh=require("lit/directives/repeat.js");var ea=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ea.eventName="rangeChanged";var ta=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ta.eventName="visibilityChanged";var es=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};es.eventName="unpinned";var Cc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},Qs=class extends Cc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var Nh=typeof window<"u"?window.ResizeObserver:void 0;var $n=Symbol("virtualizerRef"),tl="virtualizer-sizer",Lh,ol=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new Nh(()=>this._hostElementSizeChanged()),this._childrenRO=new Nh(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[$n]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=wm(this._hostElement,o),this._scrollerController=new Qs(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${tl}]`);e||(e=document.createElement("div"),e.setAttribute(tl,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent="&nbsp;",e.setAttribute(tl,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Lh;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Lh=t=(await Promise.resolve().then(()=>(Fh(),Dh))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},km(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new es)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(tl)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(j=>j.getBoundingClientRect());p.unshift(h);for(let j of p)r=Math.max(r,j.top),n=Math.max(n,j.left),s=Math.min(s,j.bottom),d=Math.min(d,j.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},k={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,$=n-h.left+o.scrollLeft,z=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:z},t.viewportScroll={top:C,left:$},t.totalScrollSize=k,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new ea({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new ta({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function km(i){let o=window.getComputedStyle(i);return{marginTop:rl(o.marginTop),marginRight:rl(o.marginRight),marginBottom:rl(o.marginBottom),marginLeft:rl(o.marginLeft)}}function rl(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Bh(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function xm(i,o=!1){let e=[],t=o?i:Bh(i);for(;t!==null;)e.push(t),t=Bh(t);return e}function wm(i,o=!1){let e=!1;return xm(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var Sc=i=>i,Tc=(i,o)=>il.html`${o}: ${JSON.stringify(i,null,2)}`,$c=class extends qh.AsyncDirective{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>Tc(e,t+this._first),this._keyFunction=(e,t)=>Sc(e,t+this._first),this._items=[],o.type!==nl.PartType.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return(0,Kh.repeat)(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?il.noChange:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new ol({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},cn=(0,nl.directive)($c);var Wh=require("lit"),zo=Wh.css`
2510
2510
  .control-shell {
2511
2511
  display: inline-flex;
2512
2512
  align-items: center;
@@ -2958,7 +2958,7 @@
2958
2958
  >
2959
2959
  ${T}
2960
2960
  </div>
2961
- `}};me.styles=[...Array.isArray(te.styles)?te.styles:[te.styles],A,P,Co,Sn,Le.css`
2961
+ `}};me.styles=[...Array.isArray(te.styles)?te.styles:[te.styles],A,P,zo,Sn,Le.css`
2962
2962
  :host {
2963
2963
  position: relative;
2964
2964
  display: inline-flex;
@@ -3751,7 +3751,7 @@
3751
3751
  </div>
3752
3752
  </div>
3753
3753
  </lui-dropdown>
3754
- `}};Se.styles=[A,P,Co,at.css`
3754
+ `}};Se.styles=[A,P,zo,at.css`
3755
3755
  :host {
3756
3756
  display: inline-block;
3757
3757
  width: 100%;
@@ -4294,7 +4294,7 @@
4294
4294
  animation: none;
4295
4295
  }
4296
4296
  }
4297
- `],a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"checked",2),a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"disabled",2),a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"indeterminate",2),a([(0,vr.property)({reflect:!0})],Ut.prototype,"radius",2),a([(0,vr.property)({reflect:!0})],Ut.prototype,"size",2),a([(0,vr.property)()],Ut.prototype,"name",2),a([(0,vr.property)()],Ut.prototype,"value",2),a([(0,vr.property)()],Ut.prototype,"label",2),a([(0,vr.property)()],Ut.prototype,"description",2),a([(0,vr.property)({attribute:"checked-icon"})],Ut.prototype,"checkedIcon",2),a([(0,vr.property)({attribute:"indeterminate-icon"})],Ut.prototype,"indeterminateIcon",2),a([(0,vr.property)()],Ut.prototype,"locale",2),a([(0,vr.property)({attribute:!1})],Ut.prototype,"translations",2),a([(0,vr.query)("input")],Ut.prototype,"_input",2),Ut=a([(0,vr.customElement)("lui-checkbox")],Ut);var fi=require("lit"),Ei=require("lit/decorators.js");var Do=class extends fi.LitElement{constructor(){super(...arguments);this.icon="folder";this.title="";this.heading="";this.description="";this.iconProps={}}updated(){let e=L(this,"emptyState");se(this._iconEl,{...e.iconProps??{},...this.iconProps??{}})}render(){let e=this.title||this.heading;return fi.html`
4297
+ `],a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"checked",2),a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"disabled",2),a([(0,vr.property)({type:Boolean,reflect:!0})],Ut.prototype,"indeterminate",2),a([(0,vr.property)({reflect:!0})],Ut.prototype,"radius",2),a([(0,vr.property)({reflect:!0})],Ut.prototype,"size",2),a([(0,vr.property)()],Ut.prototype,"name",2),a([(0,vr.property)()],Ut.prototype,"value",2),a([(0,vr.property)()],Ut.prototype,"label",2),a([(0,vr.property)()],Ut.prototype,"description",2),a([(0,vr.property)({attribute:"checked-icon"})],Ut.prototype,"checkedIcon",2),a([(0,vr.property)({attribute:"indeterminate-icon"})],Ut.prototype,"indeterminateIcon",2),a([(0,vr.property)()],Ut.prototype,"locale",2),a([(0,vr.property)({attribute:!1})],Ut.prototype,"translations",2),a([(0,vr.query)("input")],Ut.prototype,"_input",2),Ut=a([(0,vr.customElement)("lui-checkbox")],Ut);var fi=require("lit"),Ei=require("lit/decorators.js");var Fo=class extends fi.LitElement{constructor(){super(...arguments);this.icon="folder";this.title="";this.heading="";this.description="";this.iconProps={}}updated(){let e=L(this,"emptyState");se(this._iconEl,{...e.iconProps??{},...this.iconProps??{}})}render(){let e=this.title||this.heading;return fi.html`
4298
4298
  <div class="state" part="state">
4299
4299
  <div class="icon-shell" part="icon-shell">
4300
4300
  <slot name="icon">
@@ -4310,7 +4310,7 @@
4310
4310
  <slot name="actions"></slot>
4311
4311
  </div>
4312
4312
  </div>
4313
- `}};Do.styles=[A,P,fi.css`
4313
+ `}};Fo.styles=[A,P,fi.css`
4314
4314
  :host {
4315
4315
  display: block;
4316
4316
  --lui-empty-state-radius: var(--lui-radius-lg);
@@ -4409,7 +4409,7 @@
4409
4409
  --lui-button-hover-border: var(--lui-color-border-strong);
4410
4410
  --lui-button-hover-fg: var(--lui-color-fg);
4411
4411
  }
4412
- `],a([(0,Ei.property)()],Do.prototype,"icon",2),a([(0,Ei.property)()],Do.prototype,"title",2),a([(0,Ei.property)()],Do.prototype,"heading",2),a([(0,Ei.property)()],Do.prototype,"description",2),a([(0,Ei.property)({attribute:!1})],Do.prototype,"iconProps",2),a([(0,Ei.query)(".icon-shell lui-icon")],Do.prototype,"_iconEl",2),Do=a([(0,Ei.customElement)("lui-empty-state")],Do);var na={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600};function $i(i){return i==null||i===""?"":Ot(i)}function Rc(i){if(i==null||i==="")return;if(typeof i=="number")return Number.isFinite(i)?i:void 0;let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function os(i,o){if(o)return o.split(".").reduce((e,t)=>{if(!(e==null||typeof e!="object"))return e[t]},i)}function Em(i,o){return i==null&&o==null?0:i==null?-1:o==null?1:typeof i=="number"&&typeof o=="number"?i-o:String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})}function $m(i){if(i==null)return"";if(i instanceof Date)return i.toLocaleString();if(typeof i=="object")try{return JSON.stringify(i)}catch{return String(i)}return i}function Zh(i){let e=(Array.isArray(i)?i:typeof i=="string"?i.split(/[\s,|]+/).filter(Boolean):[]).map(t=>String(t).trim().toLowerCase()).filter(t=>t in na);return e.length?Array.from(new Set(e)):void 0}function Sm(i){return i>=na.xxl?"xxl":i>=na.xl?"xl":i>=na.lg?"lg":i>=na.md?"md":i>=na.sm?"sm":"xs"}var br=class extends R.LitElement{constructor(){super(...arguments);this.key="";this.dataIndex="";this.title="";this.width="";this.minWidth="";this.responsive="";this.align="left";this.fixed="";this.sortable=!1;this.resizable=!1;this.reorderable=!1}toColumn(){return{key:this.key||this.dataIndex||this.title,dataIndex:this.dataIndex||this.key,title:this.title,width:this.width,minWidth:this.minWidth,responsive:Zh(this.responsive),align:this.align,fixed:this.hasAttribute("fixed")?this.fixed==="right"?"right":"left":void 0,sortable:this.sortable,resizable:this.hasAttribute("resizable")?this.resizable:void 0,reorderable:this.hasAttribute("reorderable")?this.reorderable:void 0}}render(){return R.nothing}};br.styles=R.css`:host{display:none;}`,a([(0,W.property)()],br.prototype,"key",2),a([(0,W.property)({attribute:"data-index"})],br.prototype,"dataIndex",2),a([(0,W.property)()],br.prototype,"title",2),a([(0,W.property)()],br.prototype,"width",2),a([(0,W.property)({attribute:"min-width"})],br.prototype,"minWidth",2),a([(0,W.property)()],br.prototype,"responsive",2),a([(0,W.property)({reflect:!0})],br.prototype,"align",2),a([(0,W.property)()],br.prototype,"fixed",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"sortable",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"resizable",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"reorderable",2),br=a([(0,W.customElement)("lui-table-column")],br);var Y=class extends R.LitElement{constructor(){super(...arguments);this.rowKey="key";this.size="md";this.selection="none";this.selectedRowKeys=[];this.bordered=!1;this.border=!1;this.noBorder=!1;this.striped=!1;this.hoverable=!0;this.stickyHeader=!1;this.showHeader=!0;this.columnResizable=!1;this.resizeMode="adaptive";this.columnReorderable=!1;this.loading=!1;this.virtual=!1;this.virtualHeight=360;this.overscan=6;this.pagination=!1;this.remotePagination=!1;this.current=1;this.pageSize=10;this.showSizeChanger=!1;this.showSeq=!1;this.seqLabel="\u5E8F\u53F7";this.showOverflow=!1;this.showHeaderOverflow=!1;this.emptyText="\u6682\u65E0\u6570\u636E";this.sortKey="";this.sortOrder="none";this.rowClickable=!1;this.selectOnClick=!1;this.rowAnimation="auto";this._responsiveWidth=0;this._internalSelectedRowKeys=[];this._columnWidthOverrides={};this._columnOrderKeys=[];this._virtualStart=0;this._scrollTop=0;this._scrollRaf=0;this._gutterRaf=0;this._resizeRaf=0;this._columnInteractRaf=0;this._columnInteractDisposers=[];this._columnDragGhost=null;this._leavingRows=[];this._enteringRowKeys=new Set;this._rowAnimationTimers=[];this._lastRangeKey="";this._activeRows=[];this._activeColumns=[];this._activeFixedMeta=[];this._columnResizeState=null;this._lastResizedColumnKey="";this._columnDraggedAt=0;this._activeEffectiveWidths=null;this._columnDragState=null;this._explicitAttrs=new Set;this._onScroll=e=>{let t=e.currentTarget;if(this._syncHorizontalScrollVars(t),!this.virtual)return;let r=t.scrollTop;this._scrollTop=r,!this._scrollRaf&&(this._scrollRaf=requestAnimationFrame(()=>{this._scrollRaf=0;let n=this._calculateVirtualStart(this._scrollTop);n!==this._virtualStart&&(this._virtualStart=n)}))};this._onCellMouseOver=e=>{if(!this.showOverflow&&!this.showHeaderOverflow)return;let t=e.target;if(!(t instanceof HTMLElement))return;let r=t.closest(".cell");if(!r)return;if(!(!!t.closest("th, .vhead-cell")?this.showHeaderOverflow:this.showOverflow)){r.title="";return}let d=(r.textContent??"").trim();r.title=d&&r.scrollWidth>r.clientWidth+1?d:""};this._onPageChange=e=>{let t=Number(e.detail?.current),r=Number(e.detail?.pageSize);!Number.isFinite(t)||!Number.isFinite(r)||(this.current=Math.max(1,Math.floor(t)),this.pageSize=Math.max(1,Math.floor(r)),this.dispatchEvent(new CustomEvent("page-change",{detail:{current:this.current,pageSize:this.pageSize,total:this._totalRows()},bubbles:!0,composed:!0})))};this._renderLitVirtualRow=e=>{let{row:t,index:r}=e,n=this._activeColumns.length?this._activeColumns:this._responsiveColumns(this._orderedColumns(this._columns())),s=this._activeFixedMeta.length?this._activeFixedMeta:this._fixedMeta(n),d=this._getRowKey(t,r),h=this._selectedKeys().some(p=>String(p)===String(d));return R.html`
4412
+ `],a([(0,Ei.property)()],Fo.prototype,"icon",2),a([(0,Ei.property)()],Fo.prototype,"title",2),a([(0,Ei.property)()],Fo.prototype,"heading",2),a([(0,Ei.property)()],Fo.prototype,"description",2),a([(0,Ei.property)({attribute:!1})],Fo.prototype,"iconProps",2),a([(0,Ei.query)(".icon-shell lui-icon")],Fo.prototype,"_iconEl",2),Fo=a([(0,Ei.customElement)("lui-empty-state")],Fo);var na={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600};function $i(i){return i==null||i===""?"":Ot(i)}function Rc(i){if(i==null||i==="")return;if(typeof i=="number")return Number.isFinite(i)?i:void 0;let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function os(i,o){if(o)return o.split(".").reduce((e,t)=>{if(!(e==null||typeof e!="object"))return e[t]},i)}function Em(i,o){return i==null&&o==null?0:i==null?-1:o==null?1:typeof i=="number"&&typeof o=="number"?i-o:String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})}function $m(i){if(i==null)return"";if(i instanceof Date)return i.toLocaleString();if(typeof i=="object")try{return JSON.stringify(i)}catch{return String(i)}return i}function Zh(i){let e=(Array.isArray(i)?i:typeof i=="string"?i.split(/[\s,|]+/).filter(Boolean):[]).map(t=>String(t).trim().toLowerCase()).filter(t=>t in na);return e.length?Array.from(new Set(e)):void 0}function Sm(i){return i>=na.xxl?"xxl":i>=na.xl?"xl":i>=na.lg?"lg":i>=na.md?"md":i>=na.sm?"sm":"xs"}var br=class extends R.LitElement{constructor(){super(...arguments);this.key="";this.dataIndex="";this.title="";this.width="";this.minWidth="";this.responsive="";this.align="left";this.fixed="";this.sortable=!1;this.resizable=!1;this.reorderable=!1}toColumn(){return{key:this.key||this.dataIndex||this.title,dataIndex:this.dataIndex||this.key,title:this.title,width:this.width,minWidth:this.minWidth,responsive:Zh(this.responsive),align:this.align,fixed:this.hasAttribute("fixed")?this.fixed==="right"?"right":"left":void 0,sortable:this.sortable,resizable:this.hasAttribute("resizable")?this.resizable:void 0,reorderable:this.hasAttribute("reorderable")?this.reorderable:void 0}}render(){return R.nothing}};br.styles=R.css`:host{display:none;}`,a([(0,W.property)()],br.prototype,"key",2),a([(0,W.property)({attribute:"data-index"})],br.prototype,"dataIndex",2),a([(0,W.property)()],br.prototype,"title",2),a([(0,W.property)()],br.prototype,"width",2),a([(0,W.property)({attribute:"min-width"})],br.prototype,"minWidth",2),a([(0,W.property)()],br.prototype,"responsive",2),a([(0,W.property)({reflect:!0})],br.prototype,"align",2),a([(0,W.property)()],br.prototype,"fixed",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"sortable",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"resizable",2),a([(0,W.property)({type:Boolean,reflect:!0})],br.prototype,"reorderable",2),br=a([(0,W.customElement)("lui-table-column")],br);var Y=class extends R.LitElement{constructor(){super(...arguments);this.rowKey="key";this.size="md";this.selection="none";this.selectedRowKeys=[];this.bordered=!1;this.border=!1;this.noBorder=!1;this.striped=!1;this.hoverable=!0;this.stickyHeader=!1;this.showHeader=!0;this.columnResizable=!1;this.resizeMode="adaptive";this.columnReorderable=!1;this.loading=!1;this.virtual=!1;this.virtualHeight=360;this.overscan=6;this.pagination=!1;this.remotePagination=!1;this.current=1;this.pageSize=10;this.showSizeChanger=!1;this.showSeq=!1;this.seqLabel="\u5E8F\u53F7";this.showOverflow=!1;this.showHeaderOverflow=!1;this.emptyText="\u6682\u65E0\u6570\u636E";this.sortKey="";this.sortOrder="none";this.rowClickable=!1;this.selectOnClick=!1;this.rowAnimation="auto";this._responsiveWidth=0;this._internalSelectedRowKeys=[];this._columnWidthOverrides={};this._columnOrderKeys=[];this._virtualStart=0;this._scrollTop=0;this._scrollRaf=0;this._gutterRaf=0;this._resizeRaf=0;this._columnInteractRaf=0;this._columnInteractDisposers=[];this._columnDragGhost=null;this._leavingRows=[];this._enteringRowKeys=new Set;this._rowAnimationTimers=[];this._lastRangeKey="";this._activeRows=[];this._activeColumns=[];this._activeFixedMeta=[];this._columnResizeState=null;this._lastResizedColumnKey="";this._columnDraggedAt=0;this._activeEffectiveWidths=null;this._columnDragState=null;this._explicitAttrs=new Set;this._onScroll=e=>{let t=e.currentTarget;if(this._syncHorizontalScrollVars(t),!this.virtual)return;let r=t.scrollTop;this._scrollTop=r,!this._scrollRaf&&(this._scrollRaf=requestAnimationFrame(()=>{this._scrollRaf=0;let n=this._calculateVirtualStart(this._scrollTop);n!==this._virtualStart&&(this._virtualStart=n)}))};this._onCellMouseOver=e=>{if(!this.showOverflow&&!this.showHeaderOverflow)return;let t=e.target;if(!(t instanceof HTMLElement))return;let r=t.closest(".cell");if(!r)return;if(!(!!t.closest("th, .vhead-cell")?this.showHeaderOverflow:this.showOverflow)){r.title="";return}let d=(r.textContent??"").trim();r.title=d&&r.scrollWidth>r.clientWidth+1?d:""};this._onPageChange=e=>{let t=Number(e.detail?.current),r=Number(e.detail?.pageSize);!Number.isFinite(t)||!Number.isFinite(r)||(this.current=Math.max(1,Math.floor(t)),this.pageSize=Math.max(1,Math.floor(r)),this.dispatchEvent(new CustomEvent("page-change",{detail:{current:this.current,pageSize:this.pageSize,total:this._totalRows()},bubbles:!0,composed:!0})))};this._renderLitVirtualRow=e=>{let{row:t,index:r}=e,n=this._activeColumns.length?this._activeColumns:this._responsiveColumns(this._orderedColumns(this._columns())),s=this._activeFixedMeta.length?this._activeFixedMeta:this._fixedMeta(n),d=this._getRowKey(t,r),h=this._selectedKeys().some(p=>String(p)===String(d));return R.html`
4413
4413
  <div
4414
4414
  class=${`lvrow ${r%2===1?"even":""} ${h?"selected":""} ${this.rowClickable||this.selectOnClick?"clickable":""}`}
4415
4415
  role="row"
@@ -4448,7 +4448,7 @@
4448
4448
  </div>
4449
4449
  `})}
4450
4450
  </div>
4451
- `};this._virtualKey=e=>this._getRowKey(e.row,e.index);this._skeletonWidths=["62%","78%","45%","70%","55%","82%"]}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._applyVirtualStyles();let e=typeof window<"u"?window.innerWidth:0;this._responsiveWidth=Math.round(this.getBoundingClientRect().width||e||0),this._responsiveResizeObserver=new ResizeObserver(t=>{let r=t[0],n=typeof window<"u"?window.innerWidth:0,s=Math.round(r?.contentRect.width||this.getBoundingClientRect().width||n||0);s>0&&s!==this._responsiveWidth&&(this._responsiveWidth=s)}),this._responsiveResizeObserver.observe(this)}disconnectedCallback(){this._endColumnResize(),this._endColumnReorder(),this._removeColumnDragGhost(),this._teardownColumnInteractions(),this._clearRowAnimationTimers(),this._scrollRaf&&cancelAnimationFrame(this._scrollRaf),this._gutterRaf&&cancelAnimationFrame(this._gutterRaf),this._resizeRaf&&cancelAnimationFrame(this._resizeRaf),this._columnInteractRaf&&cancelAnimationFrame(this._columnInteractRaf),this._responsiveResizeObserver?.disconnect(),this._responsiveResizeObserver=void 0,this._scrollRaf=0,this._gutterRaf=0,this._resizeRaf=0,this._columnInteractRaf=0,super.disconnectedCallback()}willUpdate(e){e.has("selectedRowKeys")&&(this._internalSelectedRowKeys=[...this.selectedRowKeys??[]]),e.has("columnWidths")&&this.columnWidths&&this._applyColumnWidthOverrides({...this.columnWidths}),(e.has("data")||e.has("dataSource")||e.has("source"))&&this._prepareRowAnimations();let t=L(this,"table");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("bordered")&&typeof t.bordered=="boolean"&&this.bordered!==t.bordered&&(this.bordered=t.bordered),!this._explicitAttrs.has("border")&&typeof t.border=="boolean"&&this.border!==t.border&&(this.border=t.border),!this._explicitAttrs.has("noborder")&&typeof t.noBorder=="boolean"&&this.noBorder!==t.noBorder&&(this.noBorder=t.noBorder),!this._explicitAttrs.has("striped")&&typeof t.striped=="boolean"&&this.striped!==t.striped&&(this.striped=t.striped),!this._explicitAttrs.has("hoverable")&&typeof t.hoverable=="boolean"&&this.hoverable!==t.hoverable&&(this.hoverable=t.hoverable),!this._explicitAttrs.has("column-resizable")&&typeof t.columnResizable=="boolean"&&this.columnResizable!==t.columnResizable&&(this.columnResizable=t.columnResizable),!this._explicitAttrs.has("column-reorderable")&&typeof t.columnReorderable=="boolean"&&this.columnReorderable!==t.columnReorderable&&(this.columnReorderable=t.columnReorderable),!this._explicitAttrs.has("selection")&&typeof t.selection=="string"&&this.selection!==t.selection&&(this.selection=t.selection),!this._explicitAttrs.has("select-on-click")&&typeof t.selectOnClick=="boolean"&&this.selectOnClick!==t.selectOnClick&&(this.selectOnClick=t.selectOnClick),!this._explicitAttrs.has("pagination")&&typeof t.pagination=="boolean"&&this.pagination!==t.pagination&&(this.pagination=t.pagination),!this._explicitAttrs.has("virtual")&&typeof t.virtual=="boolean"&&this.virtual!==t.virtual&&(this.virtual=t.virtual),!this._explicitAttrs.has("row-animation")&&typeof t.rowAnimation=="string"&&this.rowAnimation!==t.rowAnimation&&(this.rowAnimation=t.rowAnimation),!this._explicitAttrs.has("virtual-height")&&(typeof t.virtualHeight=="number"||typeof t.virtualHeight=="string")&&this.virtualHeight!==t.virtualHeight&&(this.virtualHeight=t.virtualHeight),!this._explicitAttrs.has("row-height")&&typeof t.rowHeight=="number"&&this.rowHeight!==t.rowHeight&&(this.rowHeight=t.rowHeight)}updated(e){(e.has("virtual")||e.has("virtualHeight")||e.has("rowHeight"))&&this._applyVirtualStyles(),this.virtual?(this._scheduleVirtualScrollbarGutter(),this._syncHorizontalScrollVars()):(this.style.setProperty("--lui-table-scrollbar-width","0px"),this.style.setProperty("--lui-table-scroll-left","0px"),this.style.setProperty("--lui-table-scroll-overflow","0px")),(e.has("data")||e.has("dataSource")||e.has("source")||e.has("pagination")||e.has("current")||e.has("pageSize"))&&(this._scrollTop=0,this._virtualStart=0,this._lastRangeKey="",this._scrollEl&&(this._scrollEl.scrollTop=0)),this._scheduleColumnInteractions()}_applyVirtualStyles(){let e=this._resolvedVirtualHeight(),t=this.showHeader?this._resolvedRowHeight():0;this.style.setProperty("--lui-table-virtual-height",$i(this.virtualHeight)||"360px"),this.style.setProperty("--lui-table-virtual-body-height",`${Math.max(80,e-t)}px`),typeof this.rowHeight=="number"&&Number.isFinite(this.rowHeight)&&this.style.setProperty("--lui-table-row-height",`${Math.max(24,this.rowHeight)}px`)}_scheduleVirtualScrollbarGutter(){this._gutterRaf||(this._gutterRaf=requestAnimationFrame(()=>{this._gutterRaf=0;let e=this._virtualizerEl,t=e?Math.max(0,e.offsetWidth-e.clientWidth):0;this.style.setProperty("--lui-table-scrollbar-width",`${t}px`)}))}_syncHorizontalScrollVars(e=this._scrollEl){if(!e)return;let t=Math.max(0,e.scrollLeft||0),r=Math.max(0,e.scrollWidth-e.clientWidth);this.style.setProperty("--lui-table-scroll-left",`${t}px`),this.style.setProperty("--lui-table-scroll-overflow",`${r}px`)}_rows(){return this.dataSource??this.source??this.data??[]}_columns(){return this.columns?.length?this.columns:(this._slottedColumns??[]).map(e=>e.toColumn())}_orderedColumns(e){if(!this._columnOrderKeys.length)return e;let t=e.map((d,h)=>({column:d,key:this._columnKey(d,h)})),r=new Map(t.map(d=>[d.key,d.column])),n=new Set,s=[];for(let d of this._columnOrderKeys){let h=r.get(d);!h||n.has(d)||(s.push(h),n.add(d))}for(let d of t)n.has(d.key)||s.push(d.column);return s}_currentBreakpoint(){let e=typeof window<"u"?window.innerWidth:0;return Sm(this._responsiveWidth||Math.round(this.getBoundingClientRect().width||e||0))}_responsiveColumns(e){let t=this._currentBreakpoint();return e.filter(r=>{let n=Zh(r.responsive);return!n?.length||n.includes(t)})}_getRowKey(e,t){return typeof this.rowKey=="function"?this.rowKey(e,t):os(e,this.rowKey)??t}_columnKey(e,t){return String(e.key??e.dataIndex??t)}_columnFixed(e){if(e.fixed===!0||e.fixed==="left")return"left";if(e.fixed==="right")return"right"}_columnKeyForWidth(e,t){return this._columnKey(e,t)}_columnOverrideWidth(e,t){return this._columnWidthOverrides[this._columnKeyForWidth(e,t)]}_columnPixelWidth(e,t){return Math.max(this._columnMinWidth(e),this._columnOverrideWidth(e,t)??Rc(e.width)??Rc(e.minWidth)??120)}_leadingColumnWidth(){return(this.showSeq?60:0)+(this.selection!=="none"?44:0)}_seqBase(){return this.pagination?(Math.max(1,this.current)-1)*Math.max(1,this.pageSize||10):0}_resizedTableWidth(e){return this._leadingColumnWidth()+e.reduce((t,r,n)=>t+this._columnPixelWidth(r,n),0)}_effectiveColumnWidths(e){if(this.resizeMode!=="adaptive"||Object.keys(this._columnWidthOverrides).length===0)return null;let t=[];for(let k=0;k<e.length;k+=1){let C=e[k];if(!this._columnOverrideWidth(C,k)&&!$i(C.width))return null;t.push(this._columnPixelWidth(C,k))}let r=this._columnResizeState?.key??this._lastResizedColumnKey,n=r?e.findIndex((k,C)=>this._columnKeyForWidth(k,C)===r):-1,s=-1;for(let k=e.length-1;k>=0;k-=1)if(k!==n){s=k;break}if(s<0)return null;let d=Math.floor(this._scrollEl?.clientWidth||this.getBoundingClientRect().width),h=this._leadingColumnWidth(),p=h+t.reduce((k,C)=>k+C,0),f=d-p;if(!Number.isFinite(d)||d<=h||f<=0)return null;let x=[...t];return x[s]=Math.max(this._columnMinWidth(e[s]),Math.floor(t[s]+f)),x}_findHeaderCellByColumnKey(e){return this.renderRoot.querySelector(`[data-column-key="${CSS.escape(e)}"]`)}_applyColumnWidthOverrides(e){this._columnWidthOverrides=e,this.toggleAttribute("column-resized",Object.keys(e).length>0)}_fixedColumnSize(e,t){let r=this._activeEffectiveWidths?.[t];if(r)return`${r}px`;let n=this._columnOverrideWidth(e,t);return n?`${n}px`:$i(e.width??e.minWidth)||"120px"}_sumCss(e){return e.length?e.length===1?e[0]:`calc(${e.join(" + ")})`:"0px"}_fixedMeta(e){let t=e.map(h=>({fixed:this._columnFixed(h),offset:"0px",edge:!1})),r=t.map((h,p)=>h.fixed==="left"?p:-1).filter(h=>h>=0),n=t.map((h,p)=>h.fixed==="right"?p:-1).filter(h=>h>=0),s=this.selection!=="none"&&r.length>0?["44px"]:[];for(let h of r)t[h].offset=this._sumCss(s),s.push(this._fixedColumnSize(e[h],h));let d=[];for(let h=n.length-1;h>=0;h-=1){let p=n[h];t[p].offset=this._sumCss(d),d.push(this._fixedColumnSize(e[p],p))}return r.length&&(t[r[r.length-1]].edge=!0),n.length&&(t[n[0]].edge=!0),t}_hasLeftFixed(e){return e.some(t=>this._columnFixed(t)==="left")}_fixedClass(e,t=""){return e?.fixed?`${t} fixed-${e.fixed} ${e.edge?`fixed-${e.fixed}-edge`:""}`.trim():t}_fixedStyle(e,t=""){let r=t?[t]:[];return e?.fixed&&r.push(`--lui-table-sticky-${e.fixed}:${e.offset}`),r.filter(Boolean).join(";")}_selectionFixedClass(e,t=""){return this.selection==="none"||!this._hasLeftFixed(e)?t:`${t} fixed-left fixed-selection`.trim()}_selectionFixedStyle(e){return this.selection!=="none"&&this._hasLeftFixed(e)?"--lui-table-sticky-left:0px":""}_selectedKeys(){return this._internalSelectedRowKeys}_sortedRows(e,t){if(!this.sortKey||this.sortOrder==="none")return e;let r=t.find((s,d)=>this._columnKey(s,d)===this.sortKey);if(!r)return e;if(this.sorter)return this.sorter(e,{key:this.sortKey,order:this.sortOrder,column:r});let n=this.sortOrder==="asc"?1:-1;return[...e].sort((s,d)=>(r.sorter?r.sorter(s,d,r):Em(os(s,r.dataIndex??r.key),os(d,r.dataIndex??r.key)))*n)}_pagedRows(e){if(!this.pagination||this.remotePagination)return e;let t=Math.max(1,this.pageSize||10),r=Math.max(1,this.current||1);return e.slice((r-1)*t,r*t)}_rowKeyString(e,t){return String(this._getRowKey(e,t))}_rowAnimationsEnabled(e=this._activeRows.length){return this.rowAnimation!=="none"&&!this.virtual&&e<=500}_clearRowAnimationTimers(){for(let e of this._rowAnimationTimers)clearTimeout(e);this._rowAnimationTimers=[]}_prepareRowAnimations(){let e=this._activeRows??[],t=this._orderedColumns(this._columns()),r=this._pagedRows(this._sortedRows(this._rows(),t));if(!this._rowAnimationsEnabled(Math.max(e.length,r.length))||e.length===0){this._leavingRows=[],this._enteringRowKeys.clear();return}let n=e.map((k,C)=>this._rowKeyString(k,C)),s=r.map((k,C)=>this._rowKeyString(k,C)),d=new Set(n),h=new Set(s),p=[];e.forEach((k,C)=>{let $=n[C];h.has($)||p.push({row:k,index:C,key:this._getRowKey(k,C)})});let f=new Set;if(s.forEach(k=>{d.has(k)||f.add(k)}),!p.length&&!f.size)return;this._clearRowAnimationTimers(),this._leavingRows=p,this._enteringRowKeys=f,this._rowAnimationTimers.push(setTimeout(()=>{this._leavingRows=[],this._enteringRowKeys.clear(),this.requestUpdate()},220))}_bodyDisplayRows(e,t,r,n){let s=e.map((h,p)=>{let f=t+p,x=this._getRowKey(h,f);return{row:h,rowIndex:f,key:x,leaving:!1,entering:this._enteringRowKeys.has(String(x))}});if(!this._rowAnimationsEnabled(s.length)||r>0||n>0||!this._leavingRows.length)return s;let d=new Set(s.map(h=>String(h.key)));for(let h of this._leavingRows)d.has(String(h.key))||s.splice(Math.min(h.index,s.length),0,{row:h.row,rowIndex:h.index,key:h.key,leaving:!0,entering:!1});return s}_resolvedRowHeight(){return typeof this.rowHeight=="number"&&Number.isFinite(this.rowHeight)?Math.max(24,this.rowHeight):this.size==="sm"?36:this.size==="lg"?52:44}_resolvedVirtualHeight(){if(typeof this.virtualHeight=="number"&&Number.isFinite(this.virtualHeight))return Math.max(80,this.virtualHeight);let e=Number.parseFloat(String(this.virtualHeight));return Number.isFinite(e)?Math.max(80,e):360}_calculateVirtualStart(e,t=this._resolvedRowHeight()){let r=Math.max(0,Math.floor(this.overscan||0));return Math.max(0,Math.floor(e/t)-r)}_virtualRange(e){if(!this.virtual||e.length===0)return{start:0,end:e.length,before:0,after:0,visibleRows:e};let t=this._resolvedRowHeight(),r=this._resolvedVirtualHeight(),n=Math.max(0,Math.floor(this.overscan||0)),s=Math.max(0,e.length-1),d=Math.min(s,this._virtualStart),h=Math.ceil(r/t)+n*2,p=Math.min(e.length,d+h),f=`${d}:${p}:${e.length}`;return f!==this._lastRangeKey&&(this._lastRangeKey=f,queueMicrotask(()=>{this.dispatchEvent(new CustomEvent("visible-range-change",{detail:{start:d,end:p,total:e.length},bubbles:!0,composed:!0}))})),{start:d,end:p,before:d*t,after:Math.max(0,(e.length-p)*t),visibleRows:e.slice(d,p)}}scrollToIndex(e,t="start"){if(this.virtual&&this._virtualizerEl){this._virtualizerEl.scrollToIndex(e,t);return}let r=this._scrollEl;if(!r)return;let n=this._resolvedRowHeight(),s=this._resolvedVirtualHeight(),d=Math.max(0,e)*n;t==="center"&&(d-=(s-n)/2),t==="end"&&(d-=s-n),r.scrollTop=Math.max(0,d),this._scrollTop=r.scrollTop,this._virtualStart=this._calculateVirtualStart(this._scrollTop)}getColumnWidths(){return{...this._columnWidthOverrides}}_selectedRowsForKeys(e,t){if(!e.length)return[];let r=new Set(e.map(String)),n=[];for(let s=0;s<t.length;s+=1){let d=t[s];if(r.has(String(this._getRowKey(d,s)))&&n.push(d),n.length>=e.length)break}return n}_emitSelection(e,t){this._internalSelectedRowKeys=e,this.dispatchEvent(new CustomEvent("selection-change",{detail:{selectedRowKeys:e,selectedRows:this._selectedRowsForKeys(e,t)},bubbles:!0,composed:!0}))}_setCheckboxState(e,t,r=!1){e&&Object.assign(e,{checked:t,indeterminate:r})}_syncRenderedSelection(){let e=new Set(this._selectedKeys().map(String));this.renderRoot.querySelectorAll("[data-row-key]").forEach(r=>{let n=e.has(r.dataset.rowKey??"");r.classList.toggle("selected",n),this._setCheckboxState(r.querySelector("lui-checkbox"),n)}),this._syncHeaderCheckbox()}_syncHeaderCheckbox(){let e=this.renderRoot.querySelector('[data-table-select-all="true"]');if(!e)return;let t=Array.from(this.renderRoot.querySelectorAll("[data-row-key]")),r=new Set(this._selectedKeys().map(String)),n=t.filter(s=>r.has(s.dataset.rowKey??"")).length;this._setCheckboxState(e,t.length>0&&n===t.length,n>0&&n<t.length)}_toggleRow(e,t,r,n,s){let d=this._getRowKey(e,t);if(this.selection==="single"){this._emitSelection(r?[d]:[],n),this._syncRenderedSelection();return}let h=this._selectedKeys().filter(p=>String(p)!==String(d));r&&h.push(d),this._emitSelection(h,n),this._syncRenderedSelection()}_toggleAll(e,t,r){let n=this._selectedKeys(),s=t.map((f,x)=>this._getRowKey(f,x)),d=new Set(s.map(String)),h=n.filter(f=>!d.has(String(f))),p=e?[...h,...s]:h;this._emitSelection(p,r),this._syncRenderedSelection()}_toggleSort(e,t){if(!e.sortable&&!e.sorter)return;let r=this._columnKey(e,t),n="asc";this.sortKey===r&&(n=this.sortOrder==="asc"?"desc":this.sortOrder==="desc"?"none":"asc"),this.sortKey=n==="none"?"":r,this.sortOrder=n,this.dispatchEvent(new CustomEvent("sort",{detail:{key:r,order:n,column:e},bubbles:!0,composed:!0}))}_totalRows(){return typeof this.total=="number"?this.total:this._rows().length}_isInteractiveTarget(e){return e instanceof HTMLElement&&!!e.closest?.("lui-checkbox,lui-button,button,a,input,select,textarea,[data-table-ignore-row-click]")}_onRowClick(e,t,r,n){if(!this._isInteractiveTarget(e.target)){if(this.selectOnClick&&this.selection!=="none"){let s=this._selectedKeys().some(d=>String(d)===String(r));this._toggleRow(t,n,this.selection==="single"?!0:!s,this._activeRows,e)}this.onRow?.(t,n)?.onClick?.(e),this.dispatchEvent(new CustomEvent("row-click",{detail:{row:t,rowKey:r,index:n,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0}))}}_onRowDblClick(e,t,r,n){this._isInteractiveTarget(e.target)||(this.onRow?.(t,n)?.onDoubleClick?.(e),this.dispatchEvent(new CustomEvent("row-dblclick",{detail:{row:t,rowKey:r,index:n,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0})))}_onRowContextMenu(e,t,r){this._isInteractiveTarget(e.target)||this.onRow?.(t,r)?.onContextMenu?.(e)}_onRowMouseEnter(e,t,r){this.onRow?.(t,r)?.onMouseEnter?.(e)}_onRowMouseLeave(e,t,r){this.onRow?.(t,r)?.onMouseLeave?.(e)}_cellContext(e,t,r,n){let s=this._getRowKey(e,t),d=this._columnKey(r,n),h=os(e,r.dataIndex??r.key);return{row:e,rowKey:s,rowIndex:t,column:r,columnKey:d,columnIndex:n,value:h}}_onCellClick(e,t,r,n,s){if(this._isInteractiveTarget(e.target))return;let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onClick?.(e),this.onCell?.(d)?.onClick?.(e),n.onClick?.(e,d),this.dispatchEvent(new CustomEvent("cell-click",{detail:{...d,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellDblClick(e,t,r,n,s){if(this._isInteractiveTarget(e.target))return;let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onDoubleClick?.(e),this.onCell?.(d)?.onDoubleClick?.(e),n.onDblClick?.(e,d),this.dispatchEvent(new CustomEvent("cell-dblclick",{detail:{...d,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellContextMenu(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onContextMenu?.(e),this.onCell?.(d)?.onContextMenu?.(e),n.onContextMenu?.(e,d),this.dispatchEvent(new CustomEvent("cell-contextmenu",{detail:{...d,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellMouseEnter(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onMouseEnter?.(e),this.onCell?.(d)?.onMouseEnter?.(e)}_onCellMouseLeave(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onMouseLeave?.(e),this.onCell?.(d)?.onMouseLeave?.(e)}_headerCellContext(e,t){return{column:e,columnKey:this._columnKey(e,t),columnIndex:t}}_callHeaderRowHandler(e,t,r){this.onHeaderRow?.(r,0)?.[t]?.(e)}_callHeaderCellHandler(e,t,r,n){this.onHeaderCell?.(this._headerCellContext(r,n))?.[t]?.(e)}_onHeaderCellClick(e,t,r,n){performance.now()-this._columnDraggedAt<200||(this._callHeaderCellHandler(e,"onClick",t,r),n&&this._toggleSort(t,r))}_isColumnResizable(e){return e.resizable??this.columnResizable}_isColumnReorderable(e){return e.reorderable??this.columnReorderable}_columnMinWidth(e){return Math.max(48,Rc(e.minWidth)??48)}_columnInfoByKey(e){if(!e)return null;let t=this._responsiveColumns(this._orderedColumns(this._columns())),r=t.findIndex((n,s)=>this._columnKeyForWidth(n,s)===e);return r>=0?{column:t[r],index:r}:null}_teardownColumnInteractions(){for(let e of this._columnInteractDisposers)e();this._columnInteractDisposers=[]}_scheduleColumnInteractions(){this._columnInteractRaf||(this._columnInteractRaf=requestAnimationFrame(()=>{this._columnInteractRaf=0,this._syncColumnInteractions()}))}_syncColumnInteractions(){if(!this.isConnected||this._columnResizeState||this._columnDragState||(this._teardownColumnInteractions(),!this.showHeader))return;let e=Array.from(this.renderRoot.querySelectorAll(".column-resizer"));for(let n of e){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{let h=this._columnInfoByKey(n.dataset.columnKey);!h||!this._isColumnResizable(h.column)||this._startColumnResizeDrag(n,h.column,h.index,d.clientX??0)},move:d=>{this._moveColumnResize(d.clientX??0)},end:()=>{this._endColumnResize(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}let t=Array.from(this.renderRoot.querySelectorAll(".column-drag-handle"));for(let n of t){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{let h=this._columnInfoByKey(n.dataset.columnKey);!h||!this._isColumnReorderable(h.column)||this._startColumnReorderDrag(n,h.column,h.index,d.clientX??0,d.clientY??0)},move:d=>{this._moveColumnReorder(d.clientX??0,d.clientY??0)},end:()=>{this._endColumnReorder(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}let r=Array.from(this.renderRoot.querySelectorAll("th[data-reorderable='true'], .vhead-cell[data-reorderable='true']"));for(let n of r){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{if(this._columnResizeState||this._columnDragState)return;let h=this.renderRoot,p=d.clientX0??d.clientX??0,f=d.clientY0??d.clientY??0;if(h.elementFromPoint?.(p,f)?.closest?.(".column-resizer, .column-drag-handle"))return;let k=this._columnInfoByKey(n.dataset.columnKey);!k||!this._isColumnReorderable(k.column)||this._startColumnReorderDrag(n,k.column,k.index,d.clientX??0,d.clientY??0)},move:d=>{this._moveColumnReorder(d.clientX??0,d.clientY??0)},end:()=>{this._endColumnReorder(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}}_startColumnResizeDrag(e,t,r,n){if(!this._isColumnResizable(t))return;let s=this._columnKeyForWidth(t,r),d=this._findHeaderCellByColumnKey(s),h=Math.max(this._columnMinWidth(t),Math.floor(d?.getBoundingClientRect().width||this._columnPixelWidth(t,r)));this._applyColumnWidthOverrides({...this._columnWidthOverrides,[s]:h}),this._columnResizeState={key:s,column:t,columnIndex:r,startX:n,startWidth:h,minWidth:this._columnMinWidth(t),nextWidth:h},e.classList.add("active"),this.toggleAttribute("resizing-column",!0)}_moveColumnResize(e){if(!this._columnResizeState)return;let t=Math.max(this._columnResizeState.minWidth,Math.round(this._columnResizeState.startWidth+e-this._columnResizeState.startX));this._columnResizeState.nextWidth=t;let r=this._columnResizeState;this._applyColumnWidthOverrides({...this._columnWidthOverrides,[r.key]:r.nextWidth}),this.dispatchEvent(new CustomEvent("column-resize",{detail:{key:r.key,width:r.nextWidth,column:r.column,columnIndex:r.columnIndex},bubbles:!0,composed:!0}))}_endColumnResize(){this._columnResizeState&&(this._lastResizedColumnKey=this._columnResizeState.key,this._columnResizeState=null,this._resizeRaf&&(cancelAnimationFrame(this._resizeRaf),this._resizeRaf=0),this.toggleAttribute("resizing-column",!1),this.renderRoot.querySelectorAll(".column-resizer.active").forEach(e=>e.classList.remove("active")),this.dispatchEvent(new CustomEvent("column-widths-change",{detail:{widths:{...this._columnWidthOverrides}},bubbles:!0,composed:!0})))}_headerCellsByKey(e){return Array.from(this.renderRoot.querySelectorAll(`[data-column-key="${CSS.escape(e)}"]`))}_clearColumnDropMarkers(){this.renderRoot.querySelectorAll(".column-drop-before,.column-drop-after").forEach(e=>e.classList.remove("column-drop-before","column-drop-after"))}_clearColumnDragClasses(){this._clearColumnDropMarkers(),this.renderRoot.querySelectorAll(".column-drag-source,.column-drag-handle.active").forEach(e=>e.classList.remove("column-drag-source","active"))}_setColumnDropTarget(e,t="after"){let r=this._columnDragState;if(r&&!(r.overKey===e&&r.dropPosition===t)&&(this._clearColumnDropMarkers(),r.overKey=e,r.dropPosition=t,!!e))for(let n of this._headerCellsByKey(e))n.classList.add(t==="before"?"column-drop-before":"column-drop-after")}_applyColumnReorder(){let e=this._columnDragState;if(!e?.overKey)return;let r=this._responsiveColumns(this._orderedColumns(this._columns())).map((f,x)=>this._columnKey(f,x)),n=r.indexOf(e.key);if(n<0)return;let s=[...r],[d]=s.splice(n,1),h=s.indexOf(e.overKey);if(h<0||(s.splice(h+(e.dropPosition==="after"?1:0),0,d),s.join("\0")===r.join("\0")))return;this._columnOrderKeys=s;let p=this._responsiveColumns(this._orderedColumns(this._columns()));this._activeColumns=p,this._activeFixedMeta=this._fixedMeta(p),this.dispatchEvent(new CustomEvent("column-reorder",{detail:{fromKey:e.key,toKey:e.overKey,fromIndex:n,toIndex:s.indexOf(e.key),columns:p},bubbles:!0,composed:!0}))}_createColumnDragGhost(e,t,r){this._removeColumnDragGhost();let n=getComputedStyle(this),s=document.createElement("div");s.textContent=String(e.title??e.key??e.dataIndex??"Column"),s.style.cssText=["position:fixed","left:0","top:0","z-index:2147483000","pointer-events:none","display:inline-flex","align-items:center","max-width:220px","height:30px","padding:0 10px","border-radius:10px",`border:1px solid ${n.getPropertyValue("--lui-table-border").trim()||"rgb(0 0 0 / 0.12)"}`,`background:${n.getPropertyValue("--lui-color-bg-elevated").trim()||n.getPropertyValue("--lui-color-bg").trim()||"Canvas"}`,`color:${n.getPropertyValue("--lui-color-fg").trim()||"currentColor"}`,"box-shadow:0 12px 32px rgb(0 0 0 / 0.18)","font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif","white-space:nowrap","overflow:hidden","text-overflow:ellipsis","opacity:.96","will-change:transform"].join(";"),document.body.appendChild(s),this._columnDragGhost=s,this._moveColumnDragGhost(t,r)}_moveColumnDragGhost(e,t){this._columnDragGhost&&(this._columnDragGhost.style.transform=`translate3d(${Math.round(e+12)}px, ${Math.round(t+12)}px, 0)`)}_removeColumnDragGhost(){this._columnDragGhost?.remove(),this._columnDragGhost=null}_startColumnReorderDrag(e,t,r,n,s){if(!this._isColumnReorderable(t))return;let d=this._columnKeyForWidth(t,r);this._columnDragState={key:d,column:t,columnIndex:r,overKey:null,dropPosition:"after"},this._clearColumnDragClasses(),e.classList.add("active");for(let h of this._headerCellsByKey(d))h.classList.add("column-drag-source");this._createColumnDragGhost(t,n,s),this.toggleAttribute("dragging-column",!0)}_moveColumnReorder(e,t){let r=this._columnDragState;if(!r)return;this._moveColumnDragGhost(e,t);let d=[...this.renderRoot.elementsFromPoint?.(e,t)??[],...document.elementsFromPoint(e,t)].map(x=>x.closest?.("[data-column-key]")).find(x=>!!x),h=d?.dataset.columnKey;if(!d||!h||h===r.key){this._setColumnDropTarget(null);return}let p=d.getBoundingClientRect(),f=e<p.left+p.width/2?"before":"after";this._setColumnDropTarget(h,f)}_endColumnReorder(){this._columnDragState&&(this._columnDraggedAt=performance.now(),this._applyColumnReorder(),this._columnDragState=null,this.toggleAttribute("dragging-column",!1),this._clearColumnDragClasses(),this._removeColumnDragGhost())}_renderColumnDragHandle(e,t){return this._isColumnReorderable(e)?R.html`
4451
+ `};this._virtualKey=e=>this._getRowKey(e.row,e.index);this._skeletonWidths=["62%","78%","45%","70%","55%","82%"]}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._applyVirtualStyles();let e=typeof window<"u"?window.innerWidth:0;this._responsiveWidth=Math.round(this.getBoundingClientRect().width||e||0),this._responsiveResizeObserver=new ResizeObserver(t=>{let r=t[0],n=typeof window<"u"?window.innerWidth:0,s=Math.round(r?.contentRect.width||this.getBoundingClientRect().width||n||0);s>0&&s!==this._responsiveWidth&&(this._responsiveWidth=s)}),this._responsiveResizeObserver.observe(this)}disconnectedCallback(){this._endColumnResize(),this._endColumnReorder(),this._removeColumnDragGhost(),this._teardownColumnInteractions(),this._clearRowAnimationTimers(),this._scrollRaf&&cancelAnimationFrame(this._scrollRaf),this._gutterRaf&&cancelAnimationFrame(this._gutterRaf),this._resizeRaf&&cancelAnimationFrame(this._resizeRaf),this._columnInteractRaf&&cancelAnimationFrame(this._columnInteractRaf),this._responsiveResizeObserver?.disconnect(),this._responsiveResizeObserver=void 0,this._scrollRaf=0,this._gutterRaf=0,this._resizeRaf=0,this._columnInteractRaf=0,super.disconnectedCallback()}willUpdate(e){e.has("selectedRowKeys")&&(this._internalSelectedRowKeys=[...this.selectedRowKeys??[]]),e.has("columnWidths")&&this.columnWidths&&this._applyColumnWidthOverrides({...this.columnWidths}),(e.has("data")||e.has("dataSource")||e.has("source"))&&this._prepareRowAnimations();let t=L(this,"table");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("bordered")&&typeof t.bordered=="boolean"&&this.bordered!==t.bordered&&(this.bordered=t.bordered),!this._explicitAttrs.has("border")&&typeof t.border=="boolean"&&this.border!==t.border&&(this.border=t.border),!this._explicitAttrs.has("noborder")&&typeof t.noBorder=="boolean"&&this.noBorder!==t.noBorder&&(this.noBorder=t.noBorder),!this._explicitAttrs.has("striped")&&typeof t.striped=="boolean"&&this.striped!==t.striped&&(this.striped=t.striped),!this._explicitAttrs.has("hoverable")&&typeof t.hoverable=="boolean"&&this.hoverable!==t.hoverable&&(this.hoverable=t.hoverable),!this._explicitAttrs.has("column-resizable")&&typeof t.columnResizable=="boolean"&&this.columnResizable!==t.columnResizable&&(this.columnResizable=t.columnResizable),!this._explicitAttrs.has("column-reorderable")&&typeof t.columnReorderable=="boolean"&&this.columnReorderable!==t.columnReorderable&&(this.columnReorderable=t.columnReorderable),!this._explicitAttrs.has("selection")&&typeof t.selection=="string"&&this.selection!==t.selection&&(this.selection=t.selection),!this._explicitAttrs.has("select-on-click")&&typeof t.selectOnClick=="boolean"&&this.selectOnClick!==t.selectOnClick&&(this.selectOnClick=t.selectOnClick),!this._explicitAttrs.has("pagination")&&typeof t.pagination=="boolean"&&this.pagination!==t.pagination&&(this.pagination=t.pagination),!this._explicitAttrs.has("virtual")&&typeof t.virtual=="boolean"&&this.virtual!==t.virtual&&(this.virtual=t.virtual),!this._explicitAttrs.has("row-animation")&&typeof t.rowAnimation=="string"&&this.rowAnimation!==t.rowAnimation&&(this.rowAnimation=t.rowAnimation),!this._explicitAttrs.has("virtual-height")&&(typeof t.virtualHeight=="number"||typeof t.virtualHeight=="string")&&this.virtualHeight!==t.virtualHeight&&(this.virtualHeight=t.virtualHeight),!this._explicitAttrs.has("row-height")&&typeof t.rowHeight=="number"&&this.rowHeight!==t.rowHeight&&(this.rowHeight=t.rowHeight)}updated(e){(e.has("virtual")||e.has("virtualHeight")||e.has("rowHeight"))&&this._applyVirtualStyles(),this.virtual?(this._scheduleVirtualScrollbarGutter(),this._syncHorizontalScrollVars()):(this.style.setProperty("--lui-table-scrollbar-width","0px"),this.style.setProperty("--lui-table-scroll-left","0px"),this.style.setProperty("--lui-table-scroll-overflow","0px")),(e.has("data")||e.has("dataSource")||e.has("source")||e.has("pagination")||e.has("current")||e.has("pageSize"))&&(this._scrollTop=0,this._virtualStart=0,this._lastRangeKey="",this._scrollEl&&(this._scrollEl.scrollTop=0)),this._scheduleColumnInteractions()}_applyVirtualStyles(){let e=this._resolvedVirtualHeight(),t=this.showHeader?this._resolvedRowHeight():0;this.style.setProperty("--lui-table-virtual-height",$i(this.virtualHeight)||"360px"),this.style.setProperty("--lui-table-virtual-body-height",`${Math.max(80,e-t)}px`),typeof this.rowHeight=="number"&&Number.isFinite(this.rowHeight)&&this.style.setProperty("--lui-table-row-height",`${Math.max(24,this.rowHeight)}px`)}_scheduleVirtualScrollbarGutter(){this._gutterRaf||(this._gutterRaf=requestAnimationFrame(()=>{this._gutterRaf=0;let e=this._virtualizerEl,t=e?Math.max(0,e.offsetWidth-e.clientWidth):0;this.style.setProperty("--lui-table-scrollbar-width",`${t}px`)}))}_syncHorizontalScrollVars(e=this._scrollEl){if(!e)return;let t=Math.max(0,e.scrollLeft||0),r=Math.max(0,e.scrollWidth-e.clientWidth);this.style.setProperty("--lui-table-scroll-left",`${t}px`),this.style.setProperty("--lui-table-scroll-overflow",`${r}px`)}_rows(){return this.dataSource??this.source??this.data??[]}_columns(){return this.columns?.length?this.columns:(this._slottedColumns??[]).map(e=>e.toColumn())}_orderedColumns(e){if(!this._columnOrderKeys.length)return e;let t=e.map((d,h)=>({column:d,key:this._columnKey(d,h)})),r=new Map(t.map(d=>[d.key,d.column])),n=new Set,s=[];for(let d of this._columnOrderKeys){let h=r.get(d);!h||n.has(d)||(s.push(h),n.add(d))}for(let d of t)n.has(d.key)||s.push(d.column);return s}_currentBreakpoint(){let e=typeof window<"u"?window.innerWidth:0;return Sm(this._responsiveWidth||Math.round(this.getBoundingClientRect().width||e||0))}_responsiveColumns(e){let t=this._currentBreakpoint();return e.filter(r=>{let n=Zh(r.responsive);return!n?.length||n.includes(t)})}_getRowKey(e,t){return typeof this.rowKey=="function"?this.rowKey(e,t):os(e,this.rowKey)??t}_columnKey(e,t){return String(e.key??e.dataIndex??t)}_columnFixed(e){if(e.fixed===!0||e.fixed==="left")return"left";if(e.fixed==="right")return"right"}_columnKeyForWidth(e,t){return this._columnKey(e,t)}_columnOverrideWidth(e,t){return this._columnWidthOverrides[this._columnKeyForWidth(e,t)]}_columnPixelWidth(e,t){return Math.max(this._columnMinWidth(e),this._columnOverrideWidth(e,t)??Rc(e.width)??Rc(e.minWidth)??120)}_leadingColumnWidth(){return(this.showSeq?60:0)+(this.selection!=="none"?44:0)}_seqBase(){return this.pagination?(Math.max(1,this.current)-1)*Math.max(1,this.pageSize||10):0}_resizedTableWidth(e){return this._leadingColumnWidth()+e.reduce((t,r,n)=>t+this._columnPixelWidth(r,n),0)}_effectiveColumnWidths(e){if(this.resizeMode!=="adaptive"||Object.keys(this._columnWidthOverrides).length===0)return null;let t=[];for(let k=0;k<e.length;k+=1){let C=e[k];if(!this._columnOverrideWidth(C,k)&&!$i(C.width))return null;t.push(this._columnPixelWidth(C,k))}let r=this._columnResizeState?.key??this._lastResizedColumnKey,n=r?e.findIndex((k,C)=>this._columnKeyForWidth(k,C)===r):-1,s=-1;for(let k=e.length-1;k>=0;k-=1)if(k!==n){s=k;break}if(s<0)return null;let d=Math.floor(this._scrollEl?.clientWidth||this.getBoundingClientRect().width),h=this._leadingColumnWidth(),p=h+t.reduce((k,C)=>k+C,0),f=d-p;if(!Number.isFinite(d)||d<=h||f<=0)return null;let x=[...t];return x[s]=Math.max(this._columnMinWidth(e[s]),Math.floor(t[s]+f)),x}_findHeaderCellByColumnKey(e){return this.renderRoot.querySelector(`[data-column-key="${CSS.escape(e)}"]`)}_applyColumnWidthOverrides(e){this._columnWidthOverrides=e,this.toggleAttribute("column-resized",Object.keys(e).length>0)}_fixedColumnSize(e,t){let r=this._activeEffectiveWidths?.[t];if(r)return`${r}px`;let n=this._columnOverrideWidth(e,t);return n?`${n}px`:$i(e.width??e.minWidth)||"120px"}_sumCss(e){return e.length?e.length===1?e[0]:`calc(${e.join(" + ")})`:"0px"}_fixedMeta(e){let t=e.map(h=>({fixed:this._columnFixed(h),offset:"0px",edge:!1})),r=t.map((h,p)=>h.fixed==="left"?p:-1).filter(h=>h>=0),n=t.map((h,p)=>h.fixed==="right"?p:-1).filter(h=>h>=0),s=this.selection!=="none"&&r.length>0?["44px"]:[];for(let h of r)t[h].offset=this._sumCss(s),s.push(this._fixedColumnSize(e[h],h));let d=[];for(let h=n.length-1;h>=0;h-=1){let p=n[h];t[p].offset=this._sumCss(d),d.push(this._fixedColumnSize(e[p],p))}return r.length&&(t[r[r.length-1]].edge=!0),n.length&&(t[n[0]].edge=!0),t}_hasLeftFixed(e){return e.some(t=>this._columnFixed(t)==="left")}_fixedClass(e,t=""){return e?.fixed?`${t} fixed-${e.fixed} ${e.edge?`fixed-${e.fixed}-edge`:""}`.trim():t}_fixedStyle(e,t=""){let r=t?[t]:[];return e?.fixed&&r.push(`--lui-table-sticky-${e.fixed}:${e.offset}`),r.filter(Boolean).join(";")}_selectionFixedClass(e,t=""){return this.selection==="none"||!this._hasLeftFixed(e)?t:`${t} fixed-left fixed-selection`.trim()}_selectionFixedStyle(e){return this.selection!=="none"&&this._hasLeftFixed(e)?"--lui-table-sticky-left:0px":""}_selectedKeys(){return this._internalSelectedRowKeys}_sortedRows(e,t){if(!this.sortKey||this.sortOrder==="none")return e;let r=t.find((s,d)=>this._columnKey(s,d)===this.sortKey);if(!r)return e;if(this.sorter)return this.sorter(e,{key:this.sortKey,order:this.sortOrder,column:r});let n=this.sortOrder==="asc"?1:-1;return[...e].sort((s,d)=>(r.sorter?r.sorter(s,d,r):Em(os(s,r.dataIndex??r.key),os(d,r.dataIndex??r.key)))*n)}_pagedRows(e){if(!this.pagination||this.remotePagination)return e;let t=Math.max(1,this.pageSize||10),r=Math.max(1,this.current||1);return e.slice((r-1)*t,r*t)}_rowKeyString(e,t){return String(this._getRowKey(e,t))}_rowAnimationsEnabled(e=this._activeRows.length){return this.rowAnimation!=="none"&&!this.virtual&&e<=500}_clearRowAnimationTimers(){for(let e of this._rowAnimationTimers)clearTimeout(e);this._rowAnimationTimers=[]}_prepareRowAnimations(){let e=this._activeRows??[],t=this._orderedColumns(this._columns()),r=this._pagedRows(this._sortedRows(this._rows(),t));if(!this._rowAnimationsEnabled(Math.max(e.length,r.length))||e.length===0){this._leavingRows=[],this._enteringRowKeys.clear();return}let n=e.map((k,C)=>this._rowKeyString(k,C)),s=r.map((k,C)=>this._rowKeyString(k,C)),d=new Set(n),h=new Set(s),p=[];e.forEach((k,C)=>{let $=n[C];h.has($)||p.push({row:k,index:C,key:this._getRowKey(k,C)})});let f=new Set;if(s.forEach(k=>{d.has(k)||f.add(k)}),!p.length&&!f.size)return;this._clearRowAnimationTimers(),this._leavingRows=p,this._enteringRowKeys=f,this._rowAnimationTimers.push(setTimeout(()=>{this._leavingRows=[],this._enteringRowKeys.clear(),this.requestUpdate()},220))}_bodyDisplayRows(e,t,r,n){let s=e.map((h,p)=>{let f=t+p,x=this._getRowKey(h,f);return{row:h,rowIndex:f,key:x,leaving:!1,entering:this._enteringRowKeys.has(String(x))}});if(!this._rowAnimationsEnabled(s.length)||r>0||n>0||!this._leavingRows.length)return s;let d=new Set(s.map(h=>String(h.key)));for(let h of this._leavingRows)d.has(String(h.key))||s.splice(Math.min(h.index,s.length),0,{row:h.row,rowIndex:h.index,key:h.key,leaving:!0,entering:!1});return s}_resolvedRowHeight(){return typeof this.rowHeight=="number"&&Number.isFinite(this.rowHeight)?Math.max(24,this.rowHeight):this.size==="sm"?36:this.size==="lg"?52:44}_resolvedVirtualHeight(){if(typeof this.virtualHeight=="number"&&Number.isFinite(this.virtualHeight))return Math.max(80,this.virtualHeight);let e=Number.parseFloat(String(this.virtualHeight));return Number.isFinite(e)?Math.max(80,e):360}_calculateVirtualStart(e,t=this._resolvedRowHeight()){let r=Math.max(0,Math.floor(this.overscan||0));return Math.max(0,Math.floor(e/t)-r)}_virtualRange(e){if(!this.virtual||e.length===0)return{start:0,end:e.length,before:0,after:0,visibleRows:e};let t=this._resolvedRowHeight(),r=this._resolvedVirtualHeight(),n=Math.max(0,Math.floor(this.overscan||0)),s=Math.max(0,e.length-1),d=Math.min(s,this._virtualStart),h=Math.ceil(r/t)+n*2,p=Math.min(e.length,d+h),f=`${d}:${p}:${e.length}`;return f!==this._lastRangeKey&&(this._lastRangeKey=f,queueMicrotask(()=>{this.dispatchEvent(new CustomEvent("visible-range-change",{detail:{start:d,end:p,total:e.length},bubbles:!0,composed:!0}))})),{start:d,end:p,before:d*t,after:Math.max(0,(e.length-p)*t),visibleRows:e.slice(d,p)}}scrollToIndex(e,t="start"){if(this.virtual&&this._virtualizerEl){this._virtualizerEl.scrollToIndex(e,t);return}let r=this._scrollEl;if(!r)return;let n=this._resolvedRowHeight(),s=this._resolvedVirtualHeight(),d=Math.max(0,e)*n;t==="center"&&(d-=(s-n)/2),t==="end"&&(d-=s-n),r.scrollTop=Math.max(0,d),this._scrollTop=r.scrollTop,this._virtualStart=this._calculateVirtualStart(this._scrollTop)}getColumnWidths(){return{...this._columnWidthOverrides}}_selectedRowsForKeys(e,t){if(!e.length)return[];let r=new Set(e.map(String)),n=[];for(let s=0;s<t.length;s+=1){let d=t[s];if(r.has(String(this._getRowKey(d,s)))&&n.push(d),n.length>=e.length)break}return n}_emitSelection(e,t){this._internalSelectedRowKeys=e,this.dispatchEvent(new CustomEvent("selection-change",{detail:{selectedRowKeys:e,selectedRows:this._selectedRowsForKeys(e,t)},bubbles:!0,composed:!0}))}_setCheckboxState(e,t,r=!1){e&&Object.assign(e,{checked:t,indeterminate:r})}_syncRenderedSelection(){let e=new Set(this._selectedKeys().map(String));this.renderRoot.querySelectorAll("[data-row-key]").forEach(r=>{let n=e.has(r.dataset.rowKey??"");r.classList.toggle("selected",n),this._setCheckboxState(r.querySelector("lui-checkbox"),n)}),this._syncHeaderCheckbox()}_syncHeaderCheckbox(){let e=this.renderRoot.querySelector('[data-table-select-all="true"]');if(!e)return;let t=Array.from(this.renderRoot.querySelectorAll("[data-row-key]")),r=new Set(this._selectedKeys().map(String)),n=t.filter(s=>r.has(s.dataset.rowKey??"")).length;this._setCheckboxState(e,t.length>0&&n===t.length,n>0&&n<t.length)}_toggleRow(e,t,r,n,s){let d=this._getRowKey(e,t);if(this.selection==="single"){this._emitSelection(r?[d]:[],n),this._syncRenderedSelection();return}let h=this._selectedKeys().filter(p=>String(p)!==String(d));r&&h.push(d),this._emitSelection(h,n),this._syncRenderedSelection()}_toggleAll(e,t,r){let n=this._selectedKeys(),s=t.map((f,x)=>this._getRowKey(f,x)),d=new Set(s.map(String)),h=n.filter(f=>!d.has(String(f))),p=e?[...h,...s]:h;this._emitSelection(p,r),this._syncRenderedSelection()}_toggleSort(e,t){if(!e.sortable&&!e.sorter)return;let r=this._columnKey(e,t),n="asc";this.sortKey===r&&(n=this.sortOrder==="asc"?"desc":this.sortOrder==="desc"?"none":"asc"),this.sortKey=n==="none"?"":r,this.sortOrder=n,this.dispatchEvent(new CustomEvent("sort",{detail:{key:r,order:n,column:e},bubbles:!0,composed:!0}))}_totalRows(){return typeof this.total=="number"?this.total:this._rows().length}_isInteractiveTarget(e){return e instanceof HTMLElement&&!!e.closest?.("lui-checkbox,lui-button,button,a,input,select,textarea,[data-table-ignore-row-click]")}_onRowClick(e,t,r,n){if(!this._isInteractiveTarget(e.target)){if(this.selectOnClick&&this.selection!=="none"){let s=this._selectedKeys().some(d=>String(d)===String(r));this._toggleRow(t,n,this.selection==="single"?!0:!s,this._activeRows,e)}this.onRow?.(t,n)?.onClick?.(e),this.dispatchEvent(new CustomEvent("row-click",{detail:{row:t,rowKey:r,index:n,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0}))}}_onRowDblClick(e,t,r,n){this._isInteractiveTarget(e.target)||(this.onRow?.(t,n)?.onDoubleClick?.(e),this.dispatchEvent(new CustomEvent("row-dblclick",{detail:{row:t,rowKey:r,index:n,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0})))}_onRowContextMenu(e,t,r){this._isInteractiveTarget(e.target)||this.onRow?.(t,r)?.onContextMenu?.(e)}_onRowMouseEnter(e,t,r){this.onRow?.(t,r)?.onMouseEnter?.(e)}_onRowMouseLeave(e,t,r){this.onRow?.(t,r)?.onMouseLeave?.(e)}_cellContext(e,t,r,n){let s=this._getRowKey(e,t),d=this._columnKey(r,n),h=os(e,r.dataIndex??r.key);return{row:e,rowKey:s,rowIndex:t,column:r,columnKey:d,columnIndex:n,value:h}}_onCellClick(e,t,r,n,s){if(this._isInteractiveTarget(e.target))return;let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onClick?.(e),this.onCell?.(d)?.onClick?.(e),n.onClick?.(e,d),this.dispatchEvent(new CustomEvent("cell-click",{detail:{...d,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellDblClick(e,t,r,n,s){if(this._isInteractiveTarget(e.target))return;let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onDoubleClick?.(e),this.onCell?.(d)?.onDoubleClick?.(e),n.onDblClick?.(e,d),this.dispatchEvent(new CustomEvent("cell-dblclick",{detail:{...d,clickCount:e.detail,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellContextMenu(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onContextMenu?.(e),this.onCell?.(d)?.onContextMenu?.(e),n.onContextMenu?.(e,d),this.dispatchEvent(new CustomEvent("cell-contextmenu",{detail:{...d,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_onCellMouseEnter(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onMouseEnter?.(e),this.onCell?.(d)?.onMouseEnter?.(e)}_onCellMouseLeave(e,t,r,n,s){let d=this._cellContext(t,r,n,s);n.onCell?.(d)?.onMouseLeave?.(e),this.onCell?.(d)?.onMouseLeave?.(e)}_headerCellContext(e,t){return{column:e,columnKey:this._columnKey(e,t),columnIndex:t}}_callHeaderRowHandler(e,t,r){this.onHeaderRow?.(r,0)?.[t]?.(e)}_callHeaderCellHandler(e,t,r,n){this.onHeaderCell?.(this._headerCellContext(r,n))?.[t]?.(e)}_onHeaderCellClick(e,t,r,n){performance.now()-this._columnDraggedAt<200||(this._callHeaderCellHandler(e,"onClick",t,r),n&&this._toggleSort(t,r))}_isColumnResizable(e){return e.resizable??this.columnResizable}_isColumnReorderable(e){return e.reorderable??this.columnReorderable}_columnMinWidth(e){return Math.max(48,Rc(e.minWidth)??48)}_columnInfoByKey(e){if(!e)return null;let t=this._responsiveColumns(this._orderedColumns(this._columns())),r=t.findIndex((n,s)=>this._columnKeyForWidth(n,s)===e);return r>=0?{column:t[r],index:r}:null}_teardownColumnInteractions(){for(let e of this._columnInteractDisposers)e();this._columnInteractDisposers=[]}_scheduleColumnInteractions(){this._columnInteractRaf||(this._columnInteractRaf=requestAnimationFrame(()=>{this._columnInteractRaf=0,this._syncColumnInteractions()}))}_syncColumnInteractions(){if(!this.isConnected||this._columnResizeState||this._columnDragState||(this._teardownColumnInteractions(),!this.showHeader))return;let e=Array.from(this.renderRoot.querySelectorAll(".column-resizer"));for(let n of e){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{let h=this._columnInfoByKey(n.dataset.columnKey);!h||!this._isColumnResizable(h.column)||this._startColumnResizeDrag(n,h.column,h.index,d.clientX??0)},move:d=>{this._moveColumnResize(d.clientX??0)},end:()=>{this._endColumnResize(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}let t=Array.from(this.renderRoot.querySelectorAll(".column-drag-handle"));for(let n of t){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{let h=this._columnInfoByKey(n.dataset.columnKey);!h||!this._isColumnReorderable(h.column)||this._startColumnReorderDrag(n,h.column,h.index,d.clientX??0,d.clientY??0)},move:d=>{this._moveColumnReorder(d.clientX??0,d.clientY??0)},end:()=>{this._endColumnReorder(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}let r=Array.from(this.renderRoot.querySelectorAll("th[data-reorderable='true'], .vhead-cell[data-reorderable='true']"));for(let n of r){let s=(0,cl.default)(n).draggable({listeners:{start:d=>{if(this._columnResizeState||this._columnDragState)return;let h=this.renderRoot,p=d.clientX0??d.clientX??0,f=d.clientY0??d.clientY??0;if(h.elementFromPoint?.(p,f)?.closest?.(".column-resizer, .column-drag-handle"))return;let k=this._columnInfoByKey(n.dataset.columnKey);!k||!this._isColumnReorderable(k.column)||this._startColumnReorderDrag(n,k.column,k.index,d.clientX??0,d.clientY??0)},move:d=>{this._moveColumnReorder(d.clientX??0,d.clientY??0)},end:()=>{this._endColumnReorder(),this._scheduleColumnInteractions()}}});this._columnInteractDisposers.push(()=>s.unset())}}_startColumnResizeDrag(e,t,r,n){if(!this._isColumnResizable(t))return;let s=this._columnKeyForWidth(t,r),d=this._findHeaderCellByColumnKey(s),h=Math.max(this._columnMinWidth(t),Math.floor(d?.getBoundingClientRect().width||this._columnPixelWidth(t,r))),p={};this._responsiveColumns(this._orderedColumns(this._columns())).forEach((x,k)=>{let C=this._columnKeyForWidth(x,k),$=this._columnWidthOverrides[C];if($!=null){p[C]=$;return}let z=C===s?d:this._findHeaderCellByColumnKey(C),T=C===s?h:Math.max(this._columnMinWidth(x),Math.floor(z?.getBoundingClientRect().width||this._columnPixelWidth(x,k)));p[C]=T}),this._applyColumnWidthOverrides(p),this._columnResizeState={key:s,column:t,columnIndex:r,startX:n,startWidth:h,minWidth:this._columnMinWidth(t),nextWidth:h},e.classList.add("active"),this.toggleAttribute("resizing-column",!0)}_moveColumnResize(e){if(!this._columnResizeState)return;let t=Math.max(this._columnResizeState.minWidth,Math.round(this._columnResizeState.startWidth+e-this._columnResizeState.startX));this._columnResizeState.nextWidth=t;let r=this._columnResizeState;this._applyColumnWidthOverrides({...this._columnWidthOverrides,[r.key]:r.nextWidth}),this.dispatchEvent(new CustomEvent("column-resize",{detail:{key:r.key,width:r.nextWidth,column:r.column,columnIndex:r.columnIndex},bubbles:!0,composed:!0}))}_endColumnResize(){this._columnResizeState&&(this._lastResizedColumnKey=this._columnResizeState.key,this._columnResizeState=null,this._resizeRaf&&(cancelAnimationFrame(this._resizeRaf),this._resizeRaf=0),this.toggleAttribute("resizing-column",!1),this.renderRoot.querySelectorAll(".column-resizer.active").forEach(e=>e.classList.remove("active")),this.dispatchEvent(new CustomEvent("column-widths-change",{detail:{widths:{...this._columnWidthOverrides}},bubbles:!0,composed:!0})))}_headerCellsByKey(e){return Array.from(this.renderRoot.querySelectorAll(`[data-column-key="${CSS.escape(e)}"]`))}_clearColumnDropMarkers(){this.renderRoot.querySelectorAll(".column-drop-before,.column-drop-after").forEach(e=>e.classList.remove("column-drop-before","column-drop-after"))}_clearColumnDragClasses(){this._clearColumnDropMarkers(),this.renderRoot.querySelectorAll(".column-drag-source,.column-drag-handle.active").forEach(e=>e.classList.remove("column-drag-source","active"))}_setColumnDropTarget(e,t="after"){let r=this._columnDragState;if(r&&!(r.overKey===e&&r.dropPosition===t)&&(this._clearColumnDropMarkers(),r.overKey=e,r.dropPosition=t,!!e))for(let n of this._headerCellsByKey(e))n.classList.add(t==="before"?"column-drop-before":"column-drop-after")}_applyColumnReorder(){let e=this._columnDragState;if(!e?.overKey)return;let r=this._responsiveColumns(this._orderedColumns(this._columns())).map((f,x)=>this._columnKey(f,x)),n=r.indexOf(e.key);if(n<0)return;let s=[...r],[d]=s.splice(n,1),h=s.indexOf(e.overKey);if(h<0||(s.splice(h+(e.dropPosition==="after"?1:0),0,d),s.join("\0")===r.join("\0")))return;this._columnOrderKeys=s;let p=this._responsiveColumns(this._orderedColumns(this._columns()));this._activeColumns=p,this._activeFixedMeta=this._fixedMeta(p),this.dispatchEvent(new CustomEvent("column-reorder",{detail:{fromKey:e.key,toKey:e.overKey,fromIndex:n,toIndex:s.indexOf(e.key),columns:p},bubbles:!0,composed:!0}))}_createColumnDragGhost(e,t,r){this._removeColumnDragGhost();let n=getComputedStyle(this),s=document.createElement("div");s.textContent=String(e.title??e.key??e.dataIndex??"Column"),s.style.cssText=["position:fixed","left:0","top:0","z-index:2147483000","pointer-events:none","display:inline-flex","align-items:center","max-width:220px","height:30px","padding:0 10px","border-radius:10px",`border:1px solid ${n.getPropertyValue("--lui-table-border").trim()||"rgb(0 0 0 / 0.12)"}`,`background:${n.getPropertyValue("--lui-color-bg-elevated").trim()||n.getPropertyValue("--lui-color-bg").trim()||"Canvas"}`,`color:${n.getPropertyValue("--lui-color-fg").trim()||"currentColor"}`,"box-shadow:0 12px 32px rgb(0 0 0 / 0.18)","font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif","white-space:nowrap","overflow:hidden","text-overflow:ellipsis","opacity:.96","will-change:transform"].join(";"),document.body.appendChild(s),this._columnDragGhost=s,this._moveColumnDragGhost(t,r)}_moveColumnDragGhost(e,t){this._columnDragGhost&&(this._columnDragGhost.style.transform=`translate3d(${Math.round(e+12)}px, ${Math.round(t+12)}px, 0)`)}_removeColumnDragGhost(){this._columnDragGhost?.remove(),this._columnDragGhost=null}_startColumnReorderDrag(e,t,r,n,s){if(!this._isColumnReorderable(t))return;let d=this._columnKeyForWidth(t,r);this._columnDragState={key:d,column:t,columnIndex:r,overKey:null,dropPosition:"after"},this._clearColumnDragClasses(),e.classList.add("active");for(let h of this._headerCellsByKey(d))h.classList.add("column-drag-source");this._createColumnDragGhost(t,n,s),this.toggleAttribute("dragging-column",!0)}_moveColumnReorder(e,t){let r=this._columnDragState;if(!r)return;this._moveColumnDragGhost(e,t);let d=[...this.renderRoot.elementsFromPoint?.(e,t)??[],...document.elementsFromPoint(e,t)].map(x=>x.closest?.("[data-column-key]")).find(x=>!!x),h=d?.dataset.columnKey;if(!d||!h||h===r.key){this._setColumnDropTarget(null);return}let p=d.getBoundingClientRect(),f=e<p.left+p.width/2?"before":"after";this._setColumnDropTarget(h,f)}_endColumnReorder(){this._columnDragState&&(this._columnDraggedAt=performance.now(),this._applyColumnReorder(),this._columnDragState=null,this.toggleAttribute("dragging-column",!1),this._clearColumnDragClasses(),this._removeColumnDragGhost())}_renderColumnDragHandle(e,t){return this._isColumnReorderable(e)?R.html`
4452
4452
  <span
4453
4453
  class="column-drag-handle"
4454
4454
  part="column-drag-handle"
@@ -5318,6 +5318,10 @@
5318
5318
  .vhead-cell[data-resizable="true"],
5319
5319
  .vhead-cell[data-reorderable="true"] {
5320
5320
  position: relative;
5321
+ /* Safari/老 Firefox 对 display:table-cell 的 position:relative 会忽略,
5322
+ 把手回落到 .table-wrap 全部堆在表右缘;translateZ(0) 把 th 提升为
5323
+ transform containing block,等效定位且全平台一致 */
5324
+ transform: translateZ(0);
5321
5325
  }
5322
5326
  .column-drag-handle {
5323
5327
  display: inline-flex;
@@ -5440,7 +5444,7 @@
5440
5444
  justify-content: flex-end;
5441
5445
  margin-top: 12px;
5442
5446
  }
5443
- `],a([(0,W.property)({attribute:!1})],Y.prototype,"columns",2),a([(0,W.property)({attribute:!1})],Y.prototype,"data",2),a([(0,W.property)({attribute:!1})],Y.prototype,"dataSource",2),a([(0,W.property)({attribute:!1})],Y.prototype,"source",2),a([(0,W.property)({attribute:"row-key"})],Y.prototype,"rowKey",2),a([(0,W.property)({reflect:!0})],Y.prototype,"size",2),a([(0,W.property)({reflect:!0})],Y.prototype,"selection",2),a([(0,W.property)({attribute:!1,hasChanged:(e,t)=>{if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let r=new Set(t.map(String));return e.some(n=>!r.has(String(n)))}})],Y.prototype,"selectedRowKeys",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"bordered",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"border",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"noborder"})],Y.prototype,"noBorder",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"striped",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"hoverable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"sticky-header"})],Y.prototype,"stickyHeader",2),a([(0,W.property)({type:Boolean,attribute:"show-header"})],Y.prototype,"showHeader",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-resizable"})],Y.prototype,"columnResizable",2),a([(0,W.property)({reflect:!0,attribute:"resize-mode"})],Y.prototype,"resizeMode",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Y.prototype,"columnReorderable",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"loading",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"virtual",2),a([(0,W.property)({attribute:"virtual-height"})],Y.prototype,"virtualHeight",2),a([(0,W.property)({type:Number,attribute:"row-height"})],Y.prototype,"rowHeight",2),a([(0,W.property)({type:Number})],Y.prototype,"overscan",2),a([(0,W.property)({type:Boolean})],Y.prototype,"pagination",2),a([(0,W.property)({type:Boolean,attribute:"remote-pagination"})],Y.prototype,"remotePagination",2),a([(0,W.property)({type:Number})],Y.prototype,"current",2),a([(0,W.property)({type:Number,attribute:"page-size"})],Y.prototype,"pageSize",2),a([(0,W.property)({type:Number})],Y.prototype,"total",2),a([(0,W.property)({type:Boolean,attribute:"show-size-changer"})],Y.prototype,"showSizeChanger",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"show-seq"})],Y.prototype,"showSeq",2),a([(0,W.property)({attribute:"seq-label"})],Y.prototype,"seqLabel",2),a([(0,W.property)({attribute:!1})],Y.prototype,"footerData",2),a([(0,W.property)({type:Boolean,attribute:"show-overflow"})],Y.prototype,"showOverflow",2),a([(0,W.property)({type:Boolean,attribute:"show-header-overflow"})],Y.prototype,"showHeaderOverflow",2),a([(0,W.property)({attribute:"column-widths",converter:{fromAttribute(e){if(!(e==null||e===""))try{let t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).filter(([,r])=>Number.isFinite(Number(r))).map(([r,n])=>[r,Math.round(Number(n))]))}catch{}},toAttribute(e){return e==null?null:JSON.stringify(e)}}})],Y.prototype,"columnWidths",2),a([(0,W.property)()],Y.prototype,"emptyText",2),a([(0,W.property)({attribute:"sort-key"})],Y.prototype,"sortKey",2),a([(0,W.property)({attribute:"sort-order"})],Y.prototype,"sortOrder",2),a([(0,W.property)({attribute:!1})],Y.prototype,"sorter",2),a([(0,W.property)({type:Boolean,attribute:"row-clickable"})],Y.prototype,"rowClickable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"select-on-click"})],Y.prototype,"selectOnClick",2),a([(0,W.property)({reflect:!0,attribute:"row-animation"})],Y.prototype,"rowAnimation",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onCell",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderCell",2),a([(0,W.query)(".scroll")],Y.prototype,"_scrollEl",2),a([(0,W.query)("lit-virtualizer.table-virtualizer")],Y.prototype,"_virtualizerEl",2),a([(0,W.queryAssignedElements)({flatten:!0,selector:"lui-table-column"})],Y.prototype,"_slottedColumns",2),a([(0,W.state)()],Y.prototype,"_responsiveWidth",2),a([(0,W.state)()],Y.prototype,"_columnWidthOverrides",2),a([(0,W.state)()],Y.prototype,"_columnOrderKeys",2),a([(0,W.state)()],Y.prototype,"_virtualStart",2),Y=a([(0,W.customElement)("lui-table")],Y);var No=require("lit"),rt=require("lit/decorators.js");var un=require("lit"),Fo=require("lit/decorators.js");var Gr=class extends un.LitElement{constructor(){super(...arguments);this.content="";this.placement="top";this.disabled=!1;this.showArrow=!0;this.openDelay=120;this.closeDelay=80;this.offsetDistance=8;this.popoverProps={}}updated(){if(this._popover){let e=L(this,"tooltip");se(this._popover,{...e.popoverProps??{},...this.popoverProps??{}})}}render(){let e=this.content.trim().length>0;return un.html`
5447
+ `],a([(0,W.property)({attribute:!1})],Y.prototype,"columns",2),a([(0,W.property)({attribute:!1})],Y.prototype,"data",2),a([(0,W.property)({attribute:!1})],Y.prototype,"dataSource",2),a([(0,W.property)({attribute:!1})],Y.prototype,"source",2),a([(0,W.property)({attribute:"row-key"})],Y.prototype,"rowKey",2),a([(0,W.property)({reflect:!0})],Y.prototype,"size",2),a([(0,W.property)({reflect:!0})],Y.prototype,"selection",2),a([(0,W.property)({attribute:!1,hasChanged:(e,t)=>{if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let r=new Set(t.map(String));return e.some(n=>!r.has(String(n)))}})],Y.prototype,"selectedRowKeys",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"bordered",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"border",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"noborder"})],Y.prototype,"noBorder",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"striped",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"hoverable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"sticky-header"})],Y.prototype,"stickyHeader",2),a([(0,W.property)({type:Boolean,attribute:"show-header"})],Y.prototype,"showHeader",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-resizable"})],Y.prototype,"columnResizable",2),a([(0,W.property)({reflect:!0,attribute:"resize-mode"})],Y.prototype,"resizeMode",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Y.prototype,"columnReorderable",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"loading",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"virtual",2),a([(0,W.property)({attribute:"virtual-height"})],Y.prototype,"virtualHeight",2),a([(0,W.property)({type:Number,attribute:"row-height"})],Y.prototype,"rowHeight",2),a([(0,W.property)({type:Number})],Y.prototype,"overscan",2),a([(0,W.property)({type:Boolean})],Y.prototype,"pagination",2),a([(0,W.property)({type:Boolean,attribute:"remote-pagination"})],Y.prototype,"remotePagination",2),a([(0,W.property)({type:Number})],Y.prototype,"current",2),a([(0,W.property)({type:Number,attribute:"page-size"})],Y.prototype,"pageSize",2),a([(0,W.property)({type:Number})],Y.prototype,"total",2),a([(0,W.property)({type:Boolean,attribute:"show-size-changer"})],Y.prototype,"showSizeChanger",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"show-seq"})],Y.prototype,"showSeq",2),a([(0,W.property)({attribute:"seq-label"})],Y.prototype,"seqLabel",2),a([(0,W.property)({attribute:!1})],Y.prototype,"footerData",2),a([(0,W.property)({type:Boolean,attribute:"show-overflow"})],Y.prototype,"showOverflow",2),a([(0,W.property)({type:Boolean,attribute:"show-header-overflow"})],Y.prototype,"showHeaderOverflow",2),a([(0,W.property)({attribute:"column-widths",converter:{fromAttribute(e){if(!(e==null||e===""))try{let t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).filter(([,r])=>Number.isFinite(Number(r))).map(([r,n])=>[r,Math.round(Number(n))]))}catch{}},toAttribute(e){return e==null?null:JSON.stringify(e)}}})],Y.prototype,"columnWidths",2),a([(0,W.property)()],Y.prototype,"emptyText",2),a([(0,W.property)({attribute:"sort-key"})],Y.prototype,"sortKey",2),a([(0,W.property)({attribute:"sort-order"})],Y.prototype,"sortOrder",2),a([(0,W.property)({attribute:!1})],Y.prototype,"sorter",2),a([(0,W.property)({type:Boolean,attribute:"row-clickable"})],Y.prototype,"rowClickable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"select-on-click"})],Y.prototype,"selectOnClick",2),a([(0,W.property)({reflect:!0,attribute:"row-animation"})],Y.prototype,"rowAnimation",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onCell",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderCell",2),a([(0,W.query)(".scroll")],Y.prototype,"_scrollEl",2),a([(0,W.query)("lit-virtualizer.table-virtualizer")],Y.prototype,"_virtualizerEl",2),a([(0,W.queryAssignedElements)({flatten:!0,selector:"lui-table-column"})],Y.prototype,"_slottedColumns",2),a([(0,W.state)()],Y.prototype,"_responsiveWidth",2),a([(0,W.state)()],Y.prototype,"_columnWidthOverrides",2),a([(0,W.state)()],Y.prototype,"_columnOrderKeys",2),a([(0,W.state)()],Y.prototype,"_virtualStart",2),Y=a([(0,W.customElement)("lui-table")],Y);var Lo=require("lit"),rt=require("lit/decorators.js");var un=require("lit"),No=require("lit/decorators.js");var Gr=class extends un.LitElement{constructor(){super(...arguments);this.content="";this.placement="top";this.disabled=!1;this.showArrow=!0;this.openDelay=120;this.closeDelay=80;this.offsetDistance=8;this.popoverProps={}}updated(){if(this._popover){let e=L(this,"tooltip");se(this._popover,{...e.popoverProps??{},...this.popoverProps??{}})}}render(){let e=this.content.trim().length>0;return un.html`
5444
5448
  <lui-popover
5445
5449
  trigger="hover focus"
5446
5450
  .portal=${!0}
@@ -5504,25 +5508,25 @@
5504
5508
  .tooltip-body {
5505
5509
  color: inherit;
5506
5510
  }
5507
- `],a([(0,Fo.property)()],Gr.prototype,"content",2),a([(0,Fo.property)({reflect:!0})],Gr.prototype,"placement",2),a([(0,Fo.property)({type:Boolean,reflect:!0})],Gr.prototype,"disabled",2),a([(0,Fo.property)({type:Boolean,attribute:"show-arrow"})],Gr.prototype,"showArrow",2),a([(0,Fo.property)({type:Number,attribute:"open-delay"})],Gr.prototype,"openDelay",2),a([(0,Fo.property)({type:Number,attribute:"close-delay"})],Gr.prototype,"closeDelay",2),a([(0,Fo.property)({type:Number,attribute:"offset"})],Gr.prototype,"offsetDistance",2),a([(0,Fo.property)({attribute:!1})],Gr.prototype,"popoverProps",2),a([(0,Fo.query)("lui-popover")],Gr.prototype,"_popover",2),Gr=a([(0,Fo.customElement)("lui-tooltip")],Gr);var Xe=class extends No.LitElement{constructor(){super(...arguments);this.text="";this.type="default";this.size="md";this.weight="normal";this.block=!1;this.copyable=!1;this.truncate=!1;this.nowrap=!1;this.selectable=!1;this.strikethrough=!1;this.underline=!1;this.italic=!1;this.monospace=!1;this.surface=!1;this.popoverOnHover=!1;this.tooltipProps={};this.tag="span";this._copied=!1;this._overflowing=!1;this._resizeObserver=null;this._observedTextEl=null;this._copy=()=>{navigator.clipboard.writeText(this.text).then(()=>{this._copied=!0,setTimeout(()=>{this._copied=!1},1500)})}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this._teardownOverflowObserver(),this._resizeObserver=null,super.disconnectedCallback()}firstUpdated(){this._syncOverflowObserver(),this._syncOverflow()}updated(){let e=L(this,"text");se(this._tooltipEl,{...e.tooltipProps??{},...this.tooltipProps??{}}),this._syncOverflowObserver(),this._syncOverflow()}_needsOverflowObserver(){return this.popoverOnHover&&(this.truncate||this.nowrap)}_ensureOverflowObserver(){this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._syncOverflow()))}_teardownOverflowObserver(){this._resizeObserver?.disconnect(),this._observedTextEl=null}_syncOverflowObserver(){if(!this._needsOverflowObserver()||!this._textEl){this._teardownOverflowObserver();return}this._ensureOverflowObserver(),this._observedTextEl!==this._textEl&&(this._teardownOverflowObserver(),this._ensureOverflowObserver(),this._resizeObserver?.observe(this._textEl),this._observedTextEl=this._textEl)}_syncOverflow(){let e=this._textEl;if(!e)return;if(!(this.truncate||this.nowrap)){this._overflowing&&(this._overflowing=!1);return}let r=e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1;r!==this._overflowing&&(this._overflowing=r)}render(){if(!this.text)return No.nothing;let e=["text",`type-${this.type}`,`size-${this.size}`,`weight-${this.weight}`];this.truncate&&e.push("truncated"),this.maxLines&&e.push("clamped"),this.nowrap&&e.push("nowrap"),this.selectable?e.push("selectable"):e.push("unselectable"),this.strikethrough&&e.push("strikethrough"),this.underline&&e.push("underline"),this.italic&&e.push("italic"),this.monospace&&e.push("monospace");let t=this.maxLines?`-webkit-line-clamp:${this.maxLines}`:"",r=No.html`<span
5511
+ `],a([(0,No.property)()],Gr.prototype,"content",2),a([(0,No.property)({reflect:!0})],Gr.prototype,"placement",2),a([(0,No.property)({type:Boolean,reflect:!0})],Gr.prototype,"disabled",2),a([(0,No.property)({type:Boolean,attribute:"show-arrow"})],Gr.prototype,"showArrow",2),a([(0,No.property)({type:Number,attribute:"open-delay"})],Gr.prototype,"openDelay",2),a([(0,No.property)({type:Number,attribute:"close-delay"})],Gr.prototype,"closeDelay",2),a([(0,No.property)({type:Number,attribute:"offset"})],Gr.prototype,"offsetDistance",2),a([(0,No.property)({attribute:!1})],Gr.prototype,"popoverProps",2),a([(0,No.query)("lui-popover")],Gr.prototype,"_popover",2),Gr=a([(0,No.customElement)("lui-tooltip")],Gr);var Xe=class extends Lo.LitElement{constructor(){super(...arguments);this.text="";this.type="default";this.size="md";this.weight="normal";this.block=!1;this.copyable=!1;this.truncate=!1;this.nowrap=!1;this.selectable=!1;this.strikethrough=!1;this.underline=!1;this.italic=!1;this.monospace=!1;this.surface=!1;this.popoverOnHover=!1;this.tooltipProps={};this.tag="span";this._copied=!1;this._overflowing=!1;this._resizeObserver=null;this._observedTextEl=null;this._copy=()=>{navigator.clipboard.writeText(this.text).then(()=>{this._copied=!0,setTimeout(()=>{this._copied=!1},1500)})}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this._teardownOverflowObserver(),this._resizeObserver=null,super.disconnectedCallback()}firstUpdated(){this._syncOverflowObserver(),this._syncOverflow()}updated(){let e=L(this,"text");se(this._tooltipEl,{...e.tooltipProps??{},...this.tooltipProps??{}}),this._syncOverflowObserver(),this._syncOverflow()}_needsOverflowObserver(){return this.popoverOnHover&&(this.truncate||this.nowrap)}_ensureOverflowObserver(){this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._syncOverflow()))}_teardownOverflowObserver(){this._resizeObserver?.disconnect(),this._observedTextEl=null}_syncOverflowObserver(){if(!this._needsOverflowObserver()||!this._textEl){this._teardownOverflowObserver();return}this._ensureOverflowObserver(),this._observedTextEl!==this._textEl&&(this._teardownOverflowObserver(),this._ensureOverflowObserver(),this._resizeObserver?.observe(this._textEl),this._observedTextEl=this._textEl)}_syncOverflow(){let e=this._textEl;if(!e)return;if(!(this.truncate||this.nowrap)){this._overflowing&&(this._overflowing=!1);return}let r=e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1;r!==this._overflowing&&(this._overflowing=r)}render(){if(!this.text)return Lo.nothing;let e=["text",`type-${this.type}`,`size-${this.size}`,`weight-${this.weight}`];this.truncate&&e.push("truncated"),this.maxLines&&e.push("clamped"),this.nowrap&&e.push("nowrap"),this.selectable?e.push("selectable"):e.push("unselectable"),this.strikethrough&&e.push("strikethrough"),this.underline&&e.push("underline"),this.italic&&e.push("italic"),this.monospace&&e.push("monospace");let t=this.maxLines?`-webkit-line-clamp:${this.maxLines}`:"",r=Lo.html`<span
5508
5512
  class=${e.join(" ")}
5509
5513
  style=${t}
5510
- >${this.text}</span>`,n=r;if(this.copyable||this.surface){let d=this._copied?"check":"copy";n=No.html`
5514
+ >${this.text}</span>`,n=r;if(this.copyable||this.surface){let d=this._copied?"check":"copy";n=Lo.html`
5511
5515
  <span class=${["text-wrap",this.block?"block":"",this.surface?"surface":""].filter(Boolean).join(" ")}>
5512
5516
  ${r}
5513
- ${this.copyable?No.html`<button
5517
+ ${this.copyable?Lo.html`<button
5514
5518
  class=${`copy-btn${this._copied?" copied":""}`}
5515
5519
  @click=${this._copy}
5516
5520
  title=${this._copied?"\u5DF2\u590D\u5236":"\u590D\u5236"}
5517
5521
  >
5518
5522
  <lui-icon name=${d}></lui-icon>
5519
- </button>`:No.nothing}
5523
+ </button>`:Lo.nothing}
5520
5524
  </span>
5521
- `}return this.popoverOnHover&&(!!this.maxLines||!this.truncate&&!this.nowrap&&!this.maxLines||this._overflowing)?No.html`
5525
+ `}return this.popoverOnHover&&(!!this.maxLines||!this.truncate&&!this.nowrap&&!this.maxLines||this._overflowing)?Lo.html`
5522
5526
  <lui-tooltip .content=${this.text}>
5523
5527
  ${n}
5524
5528
  </lui-tooltip>
5525
- `:n}};Xe.styles=[A,P,No.css`
5529
+ `:n}};Xe.styles=[A,P,Lo.css`
5526
5530
  :host {
5527
5531
  display: inline;
5528
5532
  line-height: 1.6;
@@ -6282,7 +6286,7 @@
6282
6286
  margin: 0 auto 8px;
6283
6287
  color: var(--lui-color-fg-subtle);
6284
6288
  }
6285
- `],a([(0,he.property)({attribute:!1})],le.prototype,"nodes",2),a([(0,he.property)({attribute:!1})],le.prototype,"expandedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"defaultExpandedKeys",2),a([(0,he.property)({attribute:"selected-key"})],le.prototype,"selectedKey",2),a([(0,he.property)({attribute:!1})],le.prototype,"selectedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"checkedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"defaultCheckedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"loadingKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"childrenLoader",2),a([(0,he.property)({reflect:!0})],le.prototype,"size",2),a([(0,he.property)()],le.prototype,"label",2),a([(0,he.property)({attribute:"empty-text"})],le.prototype,"emptyText",2),a([(0,he.property)({attribute:"expand-trigger"})],le.prototype,"expandTrigger",2),a([(0,he.property)({type:Boolean,attribute:"show-guides"})],le.prototype,"showGuides",2),a([(0,he.property)({attribute:"selection-mode"})],le.prototype,"selectionMode",2),a([(0,he.property)({type:Boolean,attribute:"check-strictly"})],le.prototype,"checkStrictly",2),a([(0,he.property)({type:Boolean,attribute:"load-on-expand"})],le.prototype,"loadOnExpand",2),a([(0,he.property)({type:Boolean})],le.prototype,"filterable",2),a([(0,he.property)({attribute:"filter-value"})],le.prototype,"filterValue",2),a([(0,he.property)({attribute:"filter-placeholder"})],le.prototype,"filterPlaceholder",2),a([(0,he.property)({type:Boolean,attribute:"draggable-nodes"})],le.prototype,"draggableNodes",2),a([(0,he.property)({type:Boolean,attribute:"drag-leaf-only"})],le.prototype,"dragLeafOnly",2),a([(0,he.property)({type:Boolean,attribute:"drop-same-level-only"})],le.prototype,"dropSameLevelOnly",2),a([(0,he.property)({type:Boolean,attribute:"drag-handle"})],le.prototype,"dragHandle",2),a([(0,he.property)({type:Boolean})],le.prototype,"virtual",2),a([(0,he.property)({type:Number,attribute:"virtual-threshold"})],le.prototype,"virtualThreshold",2),a([(0,he.property)({attribute:!1})],le.prototype,"contextMenuItems",2),a([(0,he.property)({attribute:!1})],le.prototype,"dragFilter",2),a([(0,he.property)({attribute:!1})],le.prototype,"dropFilter",2),a([(0,he.state)()],le.prototype,"_innerExpanded",2),a([(0,he.state)()],le.prototype,"_innerSelected",2),a([(0,he.state)()],le.prototype,"_innerChecked",2),a([(0,he.state)()],le.prototype,"_innerLoading",2),a([(0,he.state)()],le.prototype,"_activeKey",2),a([(0,he.state)()],le.prototype,"_dragKey",2),a([(0,he.state)()],le.prototype,"_dropKey",2),a([(0,he.state)()],le.prototype,"_dropPosition",2),a([(0,he.query)("lui-context-menu.internal-context-menu")],le.prototype,"_contextMenuEl",2),le=a([(0,he.customElement)("lui-tree")],le);var _e=require("lit"),Tr=require("lit/decorators.js");var Gt=class extends _e.LitElement{constructor(){super(...arguments);this.title="";this.subtitle="";this.hoverable=!1;this.compact=!1;this.size="md";this.borderless=!1;this.shadow="none";this.clickable=!1;this.selected=!1;this.loading=!1;this.dividerless=!1;this.coverRatio="";this._onKeyDown=e=>{!this.clickable||this.loading||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this.click())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._disposeLocaleChange?.(),this._disposeLocaleChange=void 0,this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,super.disconnectedCallback()}_hasSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}render(){let e=this._hasSlot("header"),t=this._hasSlot("footer"),r=this._hasSlot("cover"),n=this._hasSlot("extra"),s=this._hasSlot("actions"),d=this._hasSlot("media"),h=this._hasSlot("title"),p=e||d||h||!!this.title||!!this.subtitle,f=n||s,x=p||f,k=["cover",r&&this.coverRatio?"ratio":""].filter(Boolean).join(" ");return _e.html`
6289
+ `],a([(0,he.property)({attribute:!1})],le.prototype,"nodes",2),a([(0,he.property)({attribute:!1})],le.prototype,"expandedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"defaultExpandedKeys",2),a([(0,he.property)({attribute:"selected-key"})],le.prototype,"selectedKey",2),a([(0,he.property)({attribute:!1})],le.prototype,"selectedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"checkedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"defaultCheckedKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"loadingKeys",2),a([(0,he.property)({attribute:!1})],le.prototype,"childrenLoader",2),a([(0,he.property)({reflect:!0})],le.prototype,"size",2),a([(0,he.property)()],le.prototype,"label",2),a([(0,he.property)({attribute:"empty-text"})],le.prototype,"emptyText",2),a([(0,he.property)({attribute:"expand-trigger"})],le.prototype,"expandTrigger",2),a([(0,he.property)({type:Boolean,attribute:"show-guides"})],le.prototype,"showGuides",2),a([(0,he.property)({attribute:"selection-mode"})],le.prototype,"selectionMode",2),a([(0,he.property)({type:Boolean,attribute:"check-strictly"})],le.prototype,"checkStrictly",2),a([(0,he.property)({type:Boolean,attribute:"load-on-expand"})],le.prototype,"loadOnExpand",2),a([(0,he.property)({type:Boolean})],le.prototype,"filterable",2),a([(0,he.property)({attribute:"filter-value"})],le.prototype,"filterValue",2),a([(0,he.property)({attribute:"filter-placeholder"})],le.prototype,"filterPlaceholder",2),a([(0,he.property)({type:Boolean,attribute:"draggable-nodes"})],le.prototype,"draggableNodes",2),a([(0,he.property)({type:Boolean,attribute:"drag-leaf-only"})],le.prototype,"dragLeafOnly",2),a([(0,he.property)({type:Boolean,attribute:"drop-same-level-only"})],le.prototype,"dropSameLevelOnly",2),a([(0,he.property)({type:Boolean,attribute:"drag-handle"})],le.prototype,"dragHandle",2),a([(0,he.property)({type:Boolean})],le.prototype,"virtual",2),a([(0,he.property)({type:Number,attribute:"virtual-threshold"})],le.prototype,"virtualThreshold",2),a([(0,he.property)({attribute:!1})],le.prototype,"contextMenuItems",2),a([(0,he.property)({attribute:!1})],le.prototype,"dragFilter",2),a([(0,he.property)({attribute:!1})],le.prototype,"dropFilter",2),a([(0,he.state)()],le.prototype,"_innerExpanded",2),a([(0,he.state)()],le.prototype,"_innerSelected",2),a([(0,he.state)()],le.prototype,"_innerChecked",2),a([(0,he.state)()],le.prototype,"_innerLoading",2),a([(0,he.state)()],le.prototype,"_activeKey",2),a([(0,he.state)()],le.prototype,"_dragKey",2),a([(0,he.state)()],le.prototype,"_dropKey",2),a([(0,he.state)()],le.prototype,"_dropPosition",2),a([(0,he.query)("lui-context-menu.internal-context-menu")],le.prototype,"_contextMenuEl",2),le=a([(0,he.customElement)("lui-tree")],le);var _e=require("lit"),Ar=require("lit/decorators.js");var Gt=class extends _e.LitElement{constructor(){super(...arguments);this.title="";this.subtitle="";this.hoverable=!1;this.compact=!1;this.size="md";this.borderless=!1;this.shadow="none";this.clickable=!1;this.selected=!1;this.loading=!1;this.dividerless=!1;this.coverRatio="";this._onKeyDown=e=>{!this.clickable||this.loading||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this.click())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._disposeLocaleChange?.(),this._disposeLocaleChange=void 0,this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,super.disconnectedCallback()}_hasSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}render(){let e=this._hasSlot("header"),t=this._hasSlot("footer"),r=this._hasSlot("cover"),n=this._hasSlot("extra"),s=this._hasSlot("actions"),d=this._hasSlot("media"),h=this._hasSlot("title"),p=e||d||h||!!this.title||!!this.subtitle,f=n||s,x=p||f,k=["cover",r&&this.coverRatio?"ratio":""].filter(Boolean).join(" ");return _e.html`
6286
6290
  <article
6287
6291
  class="card"
6288
6292
  part="card"
@@ -6594,24 +6598,24 @@
6594
6598
  --lui-spinner-color: var(--lui-color-primary);
6595
6599
  --lui-spinner-track: color-mix(in srgb, var(--lui-color-primary) 22%, transparent);
6596
6600
  }
6597
- `],a([(0,Tr.property)()],Gt.prototype,"title",2),a([(0,Tr.property)()],Gt.prototype,"subtitle",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"hoverable",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"compact",2),a([(0,Tr.property)({reflect:!0})],Gt.prototype,"size",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"borderless",2),a([(0,Tr.property)({reflect:!0})],Gt.prototype,"shadow",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"clickable",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"selected",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"loading",2),a([(0,Tr.property)({type:Boolean,reflect:!0})],Gt.prototype,"dividerless",2),a([(0,Tr.property)({reflect:!0,attribute:"cover-ratio"})],Gt.prototype,"coverRatio",2),a([(0,Tr.property)()],Gt.prototype,"locale",2),a([(0,Tr.property)({attribute:!1})],Gt.prototype,"translations",2),Gt=a([(0,Tr.customElement)("lui-card")],Gt);var Lo=require("lit"),hr=require("lit/decorators.js");var $t=class extends Lo.LitElement{constructor(){super(...arguments);this.title="";this.value=0;this.prefix="";this.suffix="";this.description="";this.groupSeparator=",";this.decimalSeparator=".";this.size="md";this.align="start";this.trend="none";this.trendValue="";this.status="default";this.valueColor="";this.loading=!1;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"statistic");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("align")&&typeof t.align=="string"&&this.align!==t.align&&(this.align=t.align),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("loading")&&typeof t.loading=="boolean"&&this.loading!==t.loading&&(this.loading=t.loading),!this._explicitAttrs.has("group-separator")&&typeof t.groupSeparator=="string"&&this.groupSeparator!==t.groupSeparator&&(this.groupSeparator=t.groupSeparator),!this._explicitAttrs.has("decimal-separator")&&typeof t.decimalSeparator=="string"&&this.decimalSeparator!==t.decimalSeparator&&(this.decimalSeparator=t.decimalSeparator)}_formatNumber(e){let t=typeof this.precision=="number"&&Number.isFinite(this.precision)?e.toFixed(Math.max(0,this.precision)):String(e),[r,n]=t.split("."),s=r.replace(/\B(?=(\d{3})+(?!\d))/g,this.groupSeparator);return n!=null?`${s}${this.decimalSeparator}${n}`:s}_formattedValue(){if(typeof this.value=="number")return this._formatNumber(this.value);let e=String(this.value??""),t=Number(e);return e.trim()!==""&&Number.isFinite(t)?this._formatNumber(t):e}_trendIcon(){return this.trend==="up"?"trending-up":this.trend==="down"?"trending-down":this.trend==="neutral"?"minus":""}_renderValue(){let e=this._formattedValue();return this.formatter?this.formatter(this.value,{formatted:e,statistic:this}):e}render(){let e=this._trendIcon(),t=this.valueColor?`--lui-statistic-value-color:${this.valueColor}`:Lo.nothing;return this.loading?Lo.html`
6601
+ `],a([(0,Ar.property)()],Gt.prototype,"title",2),a([(0,Ar.property)()],Gt.prototype,"subtitle",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"hoverable",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"compact",2),a([(0,Ar.property)({reflect:!0})],Gt.prototype,"size",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"borderless",2),a([(0,Ar.property)({reflect:!0})],Gt.prototype,"shadow",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"clickable",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"selected",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"loading",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],Gt.prototype,"dividerless",2),a([(0,Ar.property)({reflect:!0,attribute:"cover-ratio"})],Gt.prototype,"coverRatio",2),a([(0,Ar.property)()],Gt.prototype,"locale",2),a([(0,Ar.property)({attribute:!1})],Gt.prototype,"translations",2),Gt=a([(0,Ar.customElement)("lui-card")],Gt);var Bo=require("lit"),hr=require("lit/decorators.js");var $t=class extends Bo.LitElement{constructor(){super(...arguments);this.title="";this.value=0;this.prefix="";this.suffix="";this.description="";this.groupSeparator=",";this.decimalSeparator=".";this.size="md";this.align="start";this.trend="none";this.trendValue="";this.status="default";this.valueColor="";this.loading=!1;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"statistic");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("align")&&typeof t.align=="string"&&this.align!==t.align&&(this.align=t.align),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("loading")&&typeof t.loading=="boolean"&&this.loading!==t.loading&&(this.loading=t.loading),!this._explicitAttrs.has("group-separator")&&typeof t.groupSeparator=="string"&&this.groupSeparator!==t.groupSeparator&&(this.groupSeparator=t.groupSeparator),!this._explicitAttrs.has("decimal-separator")&&typeof t.decimalSeparator=="string"&&this.decimalSeparator!==t.decimalSeparator&&(this.decimalSeparator=t.decimalSeparator)}_formatNumber(e){let t=typeof this.precision=="number"&&Number.isFinite(this.precision)?e.toFixed(Math.max(0,this.precision)):String(e),[r,n]=t.split("."),s=r.replace(/\B(?=(\d{3})+(?!\d))/g,this.groupSeparator);return n!=null?`${s}${this.decimalSeparator}${n}`:s}_formattedValue(){if(typeof this.value=="number")return this._formatNumber(this.value);let e=String(this.value??""),t=Number(e);return e.trim()!==""&&Number.isFinite(t)?this._formatNumber(t):e}_trendIcon(){return this.trend==="up"?"trending-up":this.trend==="down"?"trending-down":this.trend==="neutral"?"minus":""}_renderValue(){let e=this._formattedValue();return this.formatter?this.formatter(this.value,{formatted:e,statistic:this}):e}render(){let e=this._trendIcon(),t=this.valueColor?`--lui-statistic-value-color:${this.valueColor}`:Bo.nothing;return this.loading?Bo.html`
6598
6602
  <div class="statistic" part="statistic" style=${t} aria-busy="true">
6599
6603
  <div class="skeleton title-skeleton" part="title-skeleton"></div>
6600
6604
  <div class="skeleton value-skeleton" part="value-skeleton"></div>
6601
6605
  <div class="skeleton desc-skeleton" part="description-skeleton"></div>
6602
6606
  </div>
6603
- `:Lo.html`
6607
+ `:Bo.html`
6604
6608
  <div class="statistic" part="statistic" style=${t}>
6605
6609
  <div class="title" part="title"><slot name="title">${this.title}</slot></div>
6606
6610
  <div class="value-row" part="value-row">
6607
6611
  <span class="prefix" part="prefix"><slot name="prefix">${this.prefix}</slot></span>
6608
6612
  <span class="value" part="value">${this._renderValue()}</span>
6609
6613
  <span class="suffix" part="suffix"><slot name="suffix">${this.suffix}</slot></span>
6610
- ${e||this.trendValue?Lo.html`<span class="trend" part="trend">${e?Lo.html`<lui-icon name=${e}></lui-icon>`:Lo.nothing}<span>${this.trendValue}</span></span>`:Lo.nothing}
6614
+ ${e||this.trendValue?Bo.html`<span class="trend" part="trend">${e?Bo.html`<lui-icon name=${e}></lui-icon>`:Bo.nothing}<span>${this.trendValue}</span></span>`:Bo.nothing}
6611
6615
  </div>
6612
6616
  <div class="description" part="description"><slot name="description">${this.description}</slot></div>
6613
6617
  </div>
6614
- `}};$t.styles=[A,P,Lo.css`
6618
+ `}};$t.styles=[A,P,Bo.css`
6615
6619
  :host {
6616
6620
  display: block;
6617
6621
  min-width: 0;
@@ -6722,7 +6726,7 @@
6722
6726
  .value-skeleton { width: 150px; height: calc(var(--lui-statistic-value-size) * 1.05); }
6723
6727
  .desc-skeleton { width: 120px; height: 13px; }
6724
6728
  @keyframes lui-statistic-shimmer { to { transform: translateX(100%); } }
6725
- `],a([(0,hr.property)()],$t.prototype,"title",2),a([(0,hr.property)()],$t.prototype,"value",2),a([(0,hr.property)()],$t.prototype,"prefix",2),a([(0,hr.property)()],$t.prototype,"suffix",2),a([(0,hr.property)()],$t.prototype,"description",2),a([(0,hr.property)({type:Number})],$t.prototype,"precision",2),a([(0,hr.property)({attribute:"group-separator"})],$t.prototype,"groupSeparator",2),a([(0,hr.property)({attribute:"decimal-separator"})],$t.prototype,"decimalSeparator",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"size",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"align",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"trend",2),a([(0,hr.property)({attribute:"trend-value"})],$t.prototype,"trendValue",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"status",2),a([(0,hr.property)({attribute:"value-color"})],$t.prototype,"valueColor",2),a([(0,hr.property)({type:Boolean,reflect:!0})],$t.prototype,"loading",2),a([(0,hr.property)({attribute:!1})],$t.prototype,"formatter",2),$t=a([(0,hr.customElement)("lui-statistic")],$t);var st=require("lit"),Ze=require("lit/decorators.js");var Qo=require("lit"),Ar=require("lit/decorators.js");var rr=class extends Qo.LitElement{constructor(){super(...arguments);this.variant="danger";this.size="md";this.radius="full";this.placement="top-right";this.count="";this.max=99;this.showZero=!1;this.dot=!1;this.processing=!1;this.text="";this.color="";this.offset="";this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"badge");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("max")&&typeof t.max=="number"&&this.max!==t.max&&(this.max=t.max),!this._explicitAttrs.has("show-zero")&&typeof t.showZero=="boolean"&&this.showZero!==t.showZero&&(this.showZero=t.showZero)}_hasContent(){return(this._assignedElements?.length??0)>0||Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE&&!e.hasAttribute("slot"))}_displayCount(){let e=this.count;if(typeof e=="number")return e>this.max?`${this.max}+`:String(e);let t=String(e??"").trim();if(!t)return"";let r=Number(t);return Number.isFinite(r)&&t!==""&&r>this.max?`${this.max}+`:t}_isZero(){return Number(this.count)===0&&String(this.count).trim()!==""}_visible(){return this.dot||this.processing?!0:!(!this._displayCount()||this._isZero()&&!this.showZero)}_style(){let[e="",t=""]=this.offset.split(/[\s,]+/).filter(Boolean),r=[this.color?`--lui-badge-bg:${this.color}`:"",e?`--lui-badge-offset-x:${e}`:"",t?`--lui-badge-offset-y:${t}`:""].filter(Boolean);return r.length?r.join(";"):Qo.nothing}_renderBadge(e){if(!this._visible())return Qo.nothing;let t=this._displayCount(),r=["badge",this.dot?"dot":"",e?"standalone":"floating"].filter(Boolean).join(" ");return Qo.html`<span class=${r} part="badge" style=${this._style()} aria-label=${this.dot?this.text||this.variant:t}>${this.dot?Qo.nothing:t}</span>`}render(){let e=this._hasContent(),t=!e;return t&&this.text?Qo.html`
6729
+ `],a([(0,hr.property)()],$t.prototype,"title",2),a([(0,hr.property)()],$t.prototype,"value",2),a([(0,hr.property)()],$t.prototype,"prefix",2),a([(0,hr.property)()],$t.prototype,"suffix",2),a([(0,hr.property)()],$t.prototype,"description",2),a([(0,hr.property)({type:Number})],$t.prototype,"precision",2),a([(0,hr.property)({attribute:"group-separator"})],$t.prototype,"groupSeparator",2),a([(0,hr.property)({attribute:"decimal-separator"})],$t.prototype,"decimalSeparator",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"size",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"align",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"trend",2),a([(0,hr.property)({attribute:"trend-value"})],$t.prototype,"trendValue",2),a([(0,hr.property)({reflect:!0})],$t.prototype,"status",2),a([(0,hr.property)({attribute:"value-color"})],$t.prototype,"valueColor",2),a([(0,hr.property)({type:Boolean,reflect:!0})],$t.prototype,"loading",2),a([(0,hr.property)({attribute:!1})],$t.prototype,"formatter",2),$t=a([(0,hr.customElement)("lui-statistic")],$t);var st=require("lit"),Ze=require("lit/decorators.js");var Qo=require("lit"),jr=require("lit/decorators.js");var rr=class extends Qo.LitElement{constructor(){super(...arguments);this.variant="danger";this.size="md";this.radius="full";this.placement="top-right";this.count="";this.max=99;this.showZero=!1;this.dot=!1;this.processing=!1;this.text="";this.color="";this.offset="";this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"badge");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("max")&&typeof t.max=="number"&&this.max!==t.max&&(this.max=t.max),!this._explicitAttrs.has("show-zero")&&typeof t.showZero=="boolean"&&this.showZero!==t.showZero&&(this.showZero=t.showZero)}_hasContent(){return(this._assignedElements?.length??0)>0||Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE&&!e.hasAttribute("slot"))}_displayCount(){let e=this.count;if(typeof e=="number")return e>this.max?`${this.max}+`:String(e);let t=String(e??"").trim();if(!t)return"";let r=Number(t);return Number.isFinite(r)&&t!==""&&r>this.max?`${this.max}+`:t}_isZero(){return Number(this.count)===0&&String(this.count).trim()!==""}_visible(){return this.dot||this.processing?!0:!(!this._displayCount()||this._isZero()&&!this.showZero)}_style(){let[e="",t=""]=this.offset.split(/[\s,]+/).filter(Boolean),r=[this.color?`--lui-badge-bg:${this.color}`:"",e?`--lui-badge-offset-x:${e}`:"",t?`--lui-badge-offset-y:${t}`:""].filter(Boolean);return r.length?r.join(";"):Qo.nothing}_renderBadge(e){if(!this._visible())return Qo.nothing;let t=this._displayCount(),r=["badge",this.dot?"dot":"",e?"standalone":"floating"].filter(Boolean).join(" ");return Qo.html`<span class=${r} part="badge" style=${this._style()} aria-label=${this.dot?this.text||this.variant:t}>${this.dot?Qo.nothing:t}</span>`}render(){let e=this._hasContent(),t=!e;return t&&this.text?Qo.html`
6726
6730
  <span class="status-row" part="status" style=${this._style()}>
6727
6731
  ${this._renderBadge(!0)}
6728
6732
  <span part="text">${this.text}</span>
@@ -6892,7 +6896,7 @@
6892
6896
  transform: scale(2.4);
6893
6897
  }
6894
6898
  }
6895
- `],a([(0,Ar.property)({reflect:!0})],rr.prototype,"variant",2),a([(0,Ar.property)({reflect:!0})],rr.prototype,"size",2),a([(0,Ar.property)({reflect:!0})],rr.prototype,"radius",2),a([(0,Ar.property)({reflect:!0})],rr.prototype,"placement",2),a([(0,Ar.property)()],rr.prototype,"count",2),a([(0,Ar.property)({type:Number})],rr.prototype,"max",2),a([(0,Ar.property)({type:Boolean,attribute:"show-zero"})],rr.prototype,"showZero",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],rr.prototype,"dot",2),a([(0,Ar.property)({type:Boolean,reflect:!0})],rr.prototype,"processing",2),a([(0,Ar.property)()],rr.prototype,"text",2),a([(0,Ar.property)()],rr.prototype,"color",2),a([(0,Ar.property)()],rr.prototype,"offset",2),a([(0,Ar.queryAssignedElements)({flatten:!0})],rr.prototype,"_assignedElements",2),rr=a([(0,Ar.customElement)("lui-badge")],rr);function Ki(i,o){return String(i.key??i.value??o)}function jm(i,o){return i.length===o.length&&i.every((e,t)=>e===o[t])}var zo=class extends st.LitElement{constructor(){super(...arguments);this.key="";this.value="";this.label="";this.icon="";this.badge="";this.disabled=!1;this.closable=!1}get tabKey(){return this.key||this.value}render(){return st.html`<slot></slot>`}};zo.styles=[A,P,st.css`
6899
+ `],a([(0,jr.property)({reflect:!0})],rr.prototype,"variant",2),a([(0,jr.property)({reflect:!0})],rr.prototype,"size",2),a([(0,jr.property)({reflect:!0})],rr.prototype,"radius",2),a([(0,jr.property)({reflect:!0})],rr.prototype,"placement",2),a([(0,jr.property)()],rr.prototype,"count",2),a([(0,jr.property)({type:Number})],rr.prototype,"max",2),a([(0,jr.property)({type:Boolean,attribute:"show-zero"})],rr.prototype,"showZero",2),a([(0,jr.property)({type:Boolean,reflect:!0})],rr.prototype,"dot",2),a([(0,jr.property)({type:Boolean,reflect:!0})],rr.prototype,"processing",2),a([(0,jr.property)()],rr.prototype,"text",2),a([(0,jr.property)()],rr.prototype,"color",2),a([(0,jr.property)()],rr.prototype,"offset",2),a([(0,jr.queryAssignedElements)({flatten:!0})],rr.prototype,"_assignedElements",2),rr=a([(0,jr.customElement)("lui-badge")],rr);function Ki(i,o){return String(i.key??i.value??o)}function jm(i,o){return i.length===o.length&&i.every((e,t)=>e===o[t])}var Eo=class extends st.LitElement{constructor(){super(...arguments);this.key="";this.value="";this.label="";this.icon="";this.badge="";this.disabled=!1;this.closable=!1}get tabKey(){return this.key||this.value}render(){return st.html`<slot></slot>`}};Eo.styles=[A,P,st.css`
6896
6900
  :host {
6897
6901
  display: block;
6898
6902
  min-width: 0;
@@ -6900,7 +6904,7 @@
6900
6904
  :host([hidden]) {
6901
6905
  display: none !important;
6902
6906
  }
6903
- `],a([(0,Ze.property)()],zo.prototype,"key",2),a([(0,Ze.property)()],zo.prototype,"value",2),a([(0,Ze.property)()],zo.prototype,"label",2),a([(0,Ze.property)()],zo.prototype,"icon",2),a([(0,Ze.property)()],zo.prototype,"badge",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],zo.prototype,"disabled",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],zo.prototype,"closable",2),zo=a([(0,Ze.customElement)("lui-tab-panel")],zo);var Vt=class extends st.LitElement{constructor(){super(...arguments);this.activeKey="";this.size="md";this.variant="line";this.placement="top";this.closable=!1;this.disabled=!1;this.collapse="none";this.overflowLabel="\u66F4\u591A";this.overflowIcon="more-horizontal";this._overflowIndexes=[];this._explicitAttrs=new Set;this._observedTabButtons=new Set;this._layoutFrame=0;this._indicatorFrame=0;this._onExtraSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE?!0:!!n.textContent?.trim());this.toggleAttribute("has-extra",r)};this._onKeyDown=e=>{let t=this._tabs(),r=t.map((k,C)=>({item:k,index:C})).filter(({item:k})=>!k.disabled);if(!r.length)return;let n=this._resolvedActiveKey(t),s=Math.max(0,r.findIndex(({item:k,index:C})=>Ki(k,C)===n)),d=this.placement==="top"||this.placement==="bottom",h=d?"ArrowLeft":"ArrowUp",p=d?"ArrowRight":"ArrowDown",f=s;if(e.key===p)f=(s+1)%r.length;else if(e.key===h)f=(s-1+r.length)%r.length;else if(e.key==="Home")f=0;else if(e.key==="End")f=r.length-1;else return;e.preventDefault();let x=r[f];this._select(x.item,x.index),this.updateComplete.then(()=>{this.renderRoot.querySelector(`button[data-key="${CSS.escape(Ki(x.item,x.index))}"]`)?.focus()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._resizeObserver=new ResizeObserver(()=>this._scheduleLayout())}firstUpdated(){this._resizeObserver?.observe(this),this._navEl&&this._resizeObserver?.observe(this._navEl),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._syncObservedTabButtons(),this._scheduleLayout()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame)}willUpdate(e){let t=L(this,"tab");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("closable")&&typeof t.closable=="boolean"&&this.closable!==t.closable&&(this.closable=t.closable)}updated(e){this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement));let t=this._resolvedActiveKey();t&&this.getAttribute("active-key")!==t&&this.setAttribute("active-key",t),this._syncPanels(),this._syncObservedTabButtons(),(e.has("items")||e.has("size")||e.has("variant")||e.has("placement")||e.has("closable")||e.has("disabled")||e.has("collapse")||e.has("activeKey"))&&this._scheduleLayout(),this._scheduleActiveIndicatorLayout()}_syncObservedTabButtons(){if(!this._resizeObserver)return;let e=new Set(Array.from(this.renderRoot.querySelectorAll(".tab-button, .overflow-trigger")));for(let t of this._observedTabButtons)e.has(t)||this._resizeObserver.unobserve(t);for(let t of e)this._observedTabButtons.has(t)||this._resizeObserver.observe(t);this._observedTabButtons=e}_panelElements(){return(this._defaultSlot?.assignedElements({flatten:!0})??this._assignedElements??[]).filter(t=>t.tagName.toLowerCase()==="lui-tab-panel")}_itemsFromPanels(){return this._panelElements().map((e,t)=>({key:e.tabKey||String(t),label:e.label||e.getAttribute("label")||e.tabKey||`Tab ${t+1}`,icon:e.icon,badge:e.badge,disabled:e.disabled,closable:e.closable}))}_tabs(){return this.items?.length?this.items:this._itemsFromPanels()}_resolvedActiveKey(e=this._tabs()){let t=e.filter(r=>!r.disabled);return t.length?this.activeKey&&t.some((r,n)=>Ki(r,e.indexOf(r)>=0?e.indexOf(r):n)===this.activeKey)?this.activeKey:Ki(t[0],e.indexOf(t[0])):""}_syncPanels(){if(this.items?.length)return;let e=this._panelElements(),t=this._itemsFromPanels(),r=this._resolvedActiveKey(t);r&&this.activeKey!==r&&(this.activeKey=r),r&&this.getAttribute("active-key")!==r&&this.setAttribute("active-key",r),e.forEach((n,s)=>{let d=n.tabKey||String(s);n.hidden=d!==r})}_select(e,t){if(this.disabled||e.disabled)return;let r=Ki(e,t),n=this._resolvedActiveKey();r===n&&this.activeKey||(this.activeKey=r,this.dispatchEvent(new CustomEvent("change",{detail:{key:r,previousKey:n,item:e,index:t},bubbles:!0,composed:!0})))}_close(e,t,r){e.preventDefault(),e.stopPropagation();let n=Ki(t,r);this.dispatchEvent(new CustomEvent("close",{detail:{key:n,item:t,index:r,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._recomputeOverflow(),this._scheduleActiveIndicatorLayout()})}_scheduleActiveIndicatorLayout(){this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame),this._indicatorFrame=requestAnimationFrame(()=>{this._indicatorFrame=0,this._updateActiveIndicator()})}_updateActiveIndicator(){let e=this._navEl;if(!e)return;let t=this._resolvedActiveKey(),r=t?e.querySelector(`button.tab-button[data-key="${CSS.escape(t)}"]`):null;if(!r){e.style.setProperty("--lui-tab-indicator-opacity","0");return}let n=e.getBoundingClientRect(),s=r.getBoundingClientRect(),d=r.offsetWidth||s.width,h=r.offsetHeight||s.height;e.style.setProperty("--lui-tab-indicator-x",`${s.left-n.left+e.scrollLeft}px`),e.style.setProperty("--lui-tab-indicator-y",`${s.top-n.top+e.scrollTop}px`),e.style.setProperty("--lui-tab-indicator-width",`${d}px`),e.style.setProperty("--lui-tab-indicator-height",`${h}px`),e.style.setProperty("--lui-tab-indicator-opacity","1")}_isHorizontal(){return this.placement==="top"||this.placement==="bottom"}_tabWidthBudget(){return Math.floor(this._navEl?.clientWidth??0)}_visibleIndexesForAuto(e){if(this.collapse!=="auto"||!this._isHorizontal()||e.length<=1)return e.map((k,C)=>C);let t=this._tabWidthBudget(),r=Array.from(this.renderRoot.querySelectorAll("[data-measure-tab-index]")),n=this.renderRoot.querySelector("[data-measure-overflow-trigger]");if(!t||r.length!==e.length||!n)return e.map((k,C)=>C);let s=Number.parseFloat(getComputedStyle(this._navEl).columnGap||"0")||0,d=r.map(k=>Math.ceil(k.getBoundingClientRect().width)),h=Math.ceil(n.getBoundingClientRect().width);if(d.reduce((k,C)=>k+C,0)+Math.max(0,e.length-1)*s<=t)return e.map((k,C)=>C);let f=[],x=h;for(let k=0;k<e.length;k+=1){let C=d[k]??0,$=x+(f.length>0?s:0)+C;$<=t&&(f.push(k),x=$)}return f}_recomputeOverflow(){let e=this._tabs(),t=new Set(this._visibleIndexesForAuto(e)),r=e.map((n,s)=>s).filter(n=>!t.has(n));jm(r,this._overflowIndexes)||(this._overflowIndexes=r)}_overflowMenuItems(e,t){return this._overflowIndexes.flatMap(r=>{let n=e[r];if(!n)return[];let s=Ki(n,r);return[{key:s,value:String(r),label:n.label??s,icon:n.icon,disabled:this.disabled||n.disabled,active:s===t}]})}_onOverflowSelect(e,t){let r=Number(e.detail?.value),n=t[r];n&&this._select(n,r)}_renderTab(e,t,r){let n=Ki(e,t),s=n===r,d=e.closable??this.closable;return st.html`
6907
+ `],a([(0,Ze.property)()],Eo.prototype,"key",2),a([(0,Ze.property)()],Eo.prototype,"value",2),a([(0,Ze.property)()],Eo.prototype,"label",2),a([(0,Ze.property)()],Eo.prototype,"icon",2),a([(0,Ze.property)()],Eo.prototype,"badge",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],Eo.prototype,"disabled",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],Eo.prototype,"closable",2),Eo=a([(0,Ze.customElement)("lui-tab-panel")],Eo);var Vt=class extends st.LitElement{constructor(){super(...arguments);this.activeKey="";this.size="md";this.variant="line";this.placement="top";this.closable=!1;this.disabled=!1;this.collapse="none";this.overflowLabel="\u66F4\u591A";this.overflowIcon="more-horizontal";this._overflowIndexes=[];this._explicitAttrs=new Set;this._observedTabButtons=new Set;this._layoutFrame=0;this._indicatorFrame=0;this._onExtraSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE?!0:!!n.textContent?.trim());this.toggleAttribute("has-extra",r)};this._onKeyDown=e=>{let t=this._tabs(),r=t.map((k,C)=>({item:k,index:C})).filter(({item:k})=>!k.disabled);if(!r.length)return;let n=this._resolvedActiveKey(t),s=Math.max(0,r.findIndex(({item:k,index:C})=>Ki(k,C)===n)),d=this.placement==="top"||this.placement==="bottom",h=d?"ArrowLeft":"ArrowUp",p=d?"ArrowRight":"ArrowDown",f=s;if(e.key===p)f=(s+1)%r.length;else if(e.key===h)f=(s-1+r.length)%r.length;else if(e.key==="Home")f=0;else if(e.key==="End")f=r.length-1;else return;e.preventDefault();let x=r[f];this._select(x.item,x.index),this.updateComplete.then(()=>{this.renderRoot.querySelector(`button[data-key="${CSS.escape(Ki(x.item,x.index))}"]`)?.focus()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._resizeObserver=new ResizeObserver(()=>this._scheduleLayout())}firstUpdated(){this._resizeObserver?.observe(this),this._navEl&&this._resizeObserver?.observe(this._navEl),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._syncObservedTabButtons(),this._scheduleLayout()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame)}willUpdate(e){let t=L(this,"tab");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("closable")&&typeof t.closable=="boolean"&&this.closable!==t.closable&&(this.closable=t.closable)}updated(e){this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement));let t=this._resolvedActiveKey();t&&this.getAttribute("active-key")!==t&&this.setAttribute("active-key",t),this._syncPanels(),this._syncObservedTabButtons(),(e.has("items")||e.has("size")||e.has("variant")||e.has("placement")||e.has("closable")||e.has("disabled")||e.has("collapse")||e.has("activeKey"))&&this._scheduleLayout(),this._scheduleActiveIndicatorLayout()}_syncObservedTabButtons(){if(!this._resizeObserver)return;let e=new Set(Array.from(this.renderRoot.querySelectorAll(".tab-button, .overflow-trigger")));for(let t of this._observedTabButtons)e.has(t)||this._resizeObserver.unobserve(t);for(let t of e)this._observedTabButtons.has(t)||this._resizeObserver.observe(t);this._observedTabButtons=e}_panelElements(){return(this._defaultSlot?.assignedElements({flatten:!0})??this._assignedElements??[]).filter(t=>t.tagName.toLowerCase()==="lui-tab-panel")}_itemsFromPanels(){return this._panelElements().map((e,t)=>({key:e.tabKey||String(t),label:e.label||e.getAttribute("label")||e.tabKey||`Tab ${t+1}`,icon:e.icon,badge:e.badge,disabled:e.disabled,closable:e.closable}))}_tabs(){return this.items?.length?this.items:this._itemsFromPanels()}_resolvedActiveKey(e=this._tabs()){let t=e.filter(r=>!r.disabled);return t.length?this.activeKey&&t.some((r,n)=>Ki(r,e.indexOf(r)>=0?e.indexOf(r):n)===this.activeKey)?this.activeKey:Ki(t[0],e.indexOf(t[0])):""}_syncPanels(){if(this.items?.length)return;let e=this._panelElements(),t=this._itemsFromPanels(),r=this._resolvedActiveKey(t);r&&this.activeKey!==r&&(this.activeKey=r),r&&this.getAttribute("active-key")!==r&&this.setAttribute("active-key",r),e.forEach((n,s)=>{let d=n.tabKey||String(s);n.hidden=d!==r})}_select(e,t){if(this.disabled||e.disabled)return;let r=Ki(e,t),n=this._resolvedActiveKey();r===n&&this.activeKey||(this.activeKey=r,this.dispatchEvent(new CustomEvent("change",{detail:{key:r,previousKey:n,item:e,index:t},bubbles:!0,composed:!0})))}_close(e,t,r){e.preventDefault(),e.stopPropagation();let n=Ki(t,r);this.dispatchEvent(new CustomEvent("close",{detail:{key:n,item:t,index:r,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._recomputeOverflow(),this._scheduleActiveIndicatorLayout()})}_scheduleActiveIndicatorLayout(){this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame),this._indicatorFrame=requestAnimationFrame(()=>{this._indicatorFrame=0,this._updateActiveIndicator()})}_updateActiveIndicator(){let e=this._navEl;if(!e)return;let t=this._resolvedActiveKey(),r=t?e.querySelector(`button.tab-button[data-key="${CSS.escape(t)}"]`):null;if(!r){e.style.setProperty("--lui-tab-indicator-opacity","0");return}let n=e.getBoundingClientRect(),s=r.getBoundingClientRect(),d=r.offsetWidth||s.width,h=r.offsetHeight||s.height;e.style.setProperty("--lui-tab-indicator-x",`${s.left-n.left+e.scrollLeft}px`),e.style.setProperty("--lui-tab-indicator-y",`${s.top-n.top+e.scrollTop}px`),e.style.setProperty("--lui-tab-indicator-width",`${d}px`),e.style.setProperty("--lui-tab-indicator-height",`${h}px`),e.style.setProperty("--lui-tab-indicator-opacity","1")}_isHorizontal(){return this.placement==="top"||this.placement==="bottom"}_tabWidthBudget(){return Math.floor(this._navEl?.clientWidth??0)}_visibleIndexesForAuto(e){if(this.collapse!=="auto"||!this._isHorizontal()||e.length<=1)return e.map((k,C)=>C);let t=this._tabWidthBudget(),r=Array.from(this.renderRoot.querySelectorAll("[data-measure-tab-index]")),n=this.renderRoot.querySelector("[data-measure-overflow-trigger]");if(!t||r.length!==e.length||!n)return e.map((k,C)=>C);let s=Number.parseFloat(getComputedStyle(this._navEl).columnGap||"0")||0,d=r.map(k=>Math.ceil(k.getBoundingClientRect().width)),h=Math.ceil(n.getBoundingClientRect().width);if(d.reduce((k,C)=>k+C,0)+Math.max(0,e.length-1)*s<=t)return e.map((k,C)=>C);let f=[],x=h;for(let k=0;k<e.length;k+=1){let C=d[k]??0,$=x+(f.length>0?s:0)+C;$<=t&&(f.push(k),x=$)}return f}_recomputeOverflow(){let e=this._tabs(),t=new Set(this._visibleIndexesForAuto(e)),r=e.map((n,s)=>s).filter(n=>!t.has(n));jm(r,this._overflowIndexes)||(this._overflowIndexes=r)}_overflowMenuItems(e,t){return this._overflowIndexes.flatMap(r=>{let n=e[r];if(!n)return[];let s=Ki(n,r);return[{key:s,value:String(r),label:n.label??s,icon:n.icon,disabled:this.disabled||n.disabled,active:s===t}]})}_onOverflowSelect(e,t){let r=Number(e.detail?.value),n=t[r];n&&this._select(n,r)}_renderTab(e,t,r){let n=Ki(e,t),s=n===r,d=e.closable??this.closable;return st.html`
6904
6908
  <button
6905
6909
  class=${`tab-button ${s?"active":""}`}
6906
6910
  part="tab"
@@ -7477,11 +7481,11 @@
7477
7481
  transition-duration: 0.01ms;
7478
7482
  }
7479
7483
  }
7480
- `],a([(0,Yt.property)()],Yr.prototype,"key",2),a([(0,Yt.property)()],Yr.prototype,"value",2),a([(0,Yt.property)()],Yr.prototype,"label",2),a([(0,Yt.property)()],Yr.prototype,"description",2),a([(0,Yt.property)()],Yr.prototype,"icon",2),a([(0,Yt.property)()],Yr.prototype,"extra",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],Yr.prototype,"disabled",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],Yr.prototype,"open",2),a([(0,Yt.property)({reflect:!0,attribute:"icon-placement"})],Yr.prototype,"iconPlacement",2),Yr=a([(0,Yt.customElement)("lui-collapse-item")],Yr);var Eo=class extends Xr.LitElement{constructor(){super(...arguments);this.variant="bordered";this.size="md";this.iconPlacement="end";this.accordion=!1;this.defaultOpenKeys="";this._internalOpen=null;this._items=[];this._onItemRequest=e=>{let t=e.target?.closest?.("lui-collapse-item");if(!t||t.disabled)return;e.stopPropagation();let r=this._items.indexOf(t);r<0||this._toggle(this._keyFor(t,r))};this._onSlotChange=()=>{this._items=Array.from(this.querySelectorAll("lui-collapse-item")),this._syncItems()}}connectedCallback(){super.connectedCallback(),this.addEventListener("item-toggle-request",this._onItemRequest)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("item-toggle-request",this._onItemRequest)}get _openList(){return this.openKeys!==void 0?this.openKeys:this._internalOpen!==null?this._internalOpen:this.defaultOpenKeys.split(",").map(e=>e.trim()).filter(Boolean)}_keyFor(e,t){return e.itemKey||String(t)}_toggle(e){let t=new Set(this._openList),r=!t.has(e),n;this.accordion?n=r?[e]:[]:(r?t.add(e):t.delete(e),n=[...t]);let s={key:e,open:r,openKeys:n},d=new CustomEvent("toggle",{detail:s,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(d)&&(this.openKeys===void 0&&(this._internalOpen=n,this._syncItems(n)),this.dispatchEvent(new CustomEvent("change",{detail:s,bubbles:!0,composed:!0})))}_syncItems(e=this._openList){let t=new Set(e);this._items.forEach((r,n)=>{r.open=t.has(this._keyFor(r,n)),r.iconPlacement=this.iconPlacement})}openAll(){if(this.accordion)return;let e=this._items.map((t,r)=>({item:t,key:this._keyFor(t,r)})).filter(({item:t})=>!t.disabled).map(({key:t})=>t);this._applyExternal(e,!0)}closeAll(){this._applyExternal([],!1)}_applyExternal(e,t){this.openKeys===void 0&&(this._internalOpen=e,this._syncItems(e)),this.dispatchEvent(new CustomEvent("change",{detail:{key:"",open:t,openKeys:e},bubbles:!0,composed:!0}))}updated(){this._syncItems()}render(){let t=L(this,"collapse").variant??this.variant;return Xr.html`
7484
+ `],a([(0,Yt.property)()],Yr.prototype,"key",2),a([(0,Yt.property)()],Yr.prototype,"value",2),a([(0,Yt.property)()],Yr.prototype,"label",2),a([(0,Yt.property)()],Yr.prototype,"description",2),a([(0,Yt.property)()],Yr.prototype,"icon",2),a([(0,Yt.property)()],Yr.prototype,"extra",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],Yr.prototype,"disabled",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],Yr.prototype,"open",2),a([(0,Yt.property)({reflect:!0,attribute:"icon-placement"})],Yr.prototype,"iconPlacement",2),Yr=a([(0,Yt.customElement)("lui-collapse-item")],Yr);var $o=class extends Xr.LitElement{constructor(){super(...arguments);this.variant="bordered";this.size="md";this.iconPlacement="end";this.accordion=!1;this.defaultOpenKeys="";this._internalOpen=null;this._items=[];this._onItemRequest=e=>{let t=e.target?.closest?.("lui-collapse-item");if(!t||t.disabled)return;e.stopPropagation();let r=this._items.indexOf(t);r<0||this._toggle(this._keyFor(t,r))};this._onSlotChange=()=>{this._items=Array.from(this.querySelectorAll("lui-collapse-item")),this._syncItems()}}connectedCallback(){super.connectedCallback(),this.addEventListener("item-toggle-request",this._onItemRequest)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("item-toggle-request",this._onItemRequest)}get _openList(){return this.openKeys!==void 0?this.openKeys:this._internalOpen!==null?this._internalOpen:this.defaultOpenKeys.split(",").map(e=>e.trim()).filter(Boolean)}_keyFor(e,t){return e.itemKey||String(t)}_toggle(e){let t=new Set(this._openList),r=!t.has(e),n;this.accordion?n=r?[e]:[]:(r?t.add(e):t.delete(e),n=[...t]);let s={key:e,open:r,openKeys:n},d=new CustomEvent("toggle",{detail:s,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(d)&&(this.openKeys===void 0&&(this._internalOpen=n,this._syncItems(n)),this.dispatchEvent(new CustomEvent("change",{detail:s,bubbles:!0,composed:!0})))}_syncItems(e=this._openList){let t=new Set(e);this._items.forEach((r,n)=>{r.open=t.has(this._keyFor(r,n)),r.iconPlacement=this.iconPlacement})}openAll(){if(this.accordion)return;let e=this._items.map((t,r)=>({item:t,key:this._keyFor(t,r)})).filter(({item:t})=>!t.disabled).map(({key:t})=>t);this._applyExternal(e,!0)}closeAll(){this._applyExternal([],!1)}_applyExternal(e,t){this.openKeys===void 0&&(this._internalOpen=e,this._syncItems(e)),this.dispatchEvent(new CustomEvent("change",{detail:{key:"",open:t,openKeys:e},bubbles:!0,composed:!0}))}updated(){this._syncItems()}render(){let t=L(this,"collapse").variant??this.variant;return Xr.html`
7481
7485
  <div class="root" part="base" data-variant=${t}>
7482
7486
  <slot @slotchange=${this._onSlotChange}></slot>
7483
7487
  </div>
7484
- `}};Eo.styles=[A,P,Xr.css`
7488
+ `}};$o.styles=[A,P,Xr.css`
7485
7489
  :host {
7486
7490
  display: block;
7487
7491
  --lui-collapse-radius: var(--lui-radius);
@@ -7523,7 +7527,7 @@
7523
7527
  :host([variant="plain"]) ::slotted(lui-collapse-item + lui-collapse-item) {
7524
7528
  border-top: 1px solid color-mix(in srgb, var(--lui-color-border) 72%, transparent);
7525
7529
  }
7526
- `],a([(0,Yt.property)({reflect:!0})],Eo.prototype,"variant",2),a([(0,Yt.property)({reflect:!0})],Eo.prototype,"size",2),a([(0,Yt.property)({reflect:!0,attribute:"icon-placement"})],Eo.prototype,"iconPlacement",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],Eo.prototype,"accordion",2),a([(0,Yt.property)({attribute:!1})],Eo.prototype,"openKeys",2),a([(0,Yt.property)({attribute:"default-open-keys"})],Eo.prototype,"defaultOpenKeys",2),a([(0,Yt.state)()],Eo.prototype,"_internalOpen",2),Eo=a([(0,Yt.customElement)("lui-collapse")],Eo);var Zr=require("lit"),or=require("lit/decorators.js");var op=[{color:"var(--lui-color-info)",bgMix:18,fgMix:92},{color:"oklch(64% 0.22 295)",bgMix:18,fgMix:88},{color:"var(--lui-color-success)",bgMix:16,fgMix:90},{color:"var(--lui-color-warning)",bgMix:18,fgMix:94},{color:"var(--lui-color-danger)",bgMix:16,fgMix:92},{color:"oklch(70% 0.16 185)",bgMix:16,fgMix:88},{color:"oklch(66% 0.24 310)",bgMix:18,fgMix:90},{color:"var(--lui-color-fg-muted)",bgMix:16,fgMix:88}],St=class extends Zr.LitElement{constructor(){super(...arguments);this.src="";this.alt="";this.name="";this.text="";this.icon="user";this.size="md";this.radius="full";this.color="auto";this.status="none";this.statusColor="";this.statusPosition="top-right";this.clickable=!1;this.disabled=!1;this.tooltip="";this.tooltipPlacement="top";this._imageError=!1;this._explicitAttrs=new Set;this._onImageError=()=>{this._imageError=!0};this._onClick=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())};this._onKeyDown=e=>{!this.clickable||this.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this._emitKeyboardClick())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){e.has("src")&&(this._imageError=!1);let t=L(this,"avatar");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("status-position")&&typeof t.statusPosition=="string"&&this.statusPosition!==t.statusPosition&&(this.statusPosition=t.statusPosition),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("clickable")&&typeof t.clickable=="boolean"&&this.clickable!==t.clickable&&(this.clickable=t.clickable)}_getSeed(){return this.text||this.name||this.alt||this.icon||"avatar"}_getInitials(){let e=(this.text||this.name||this.alt||"").trim();if(!e)return"";let t=e.split(/[\s\-_]+/).map(r=>r.trim()).filter(Boolean);return t.length>=2?`${t[0][0]??""}${t[t.length-1][0]??""}`.toUpperCase():e.length<=2?e.toUpperCase():e.slice(0,2).toUpperCase()}_getAutoPaletteStyle(){if(this.color!=="auto"||this.src&&!this._imageError)return"";let e=this._getSeed(),t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;let r=op[t%op.length];return`--lui-avatar-bg:color-mix(in srgb, ${r.color} ${r.bgMix}%, var(--lui-color-bg));--lui-avatar-fg:color-mix(in srgb, ${r.color} ${r.fgMix}%, var(--lui-color-fg));--lui-avatar-border:color-mix(in srgb, ${r.color} 24%, transparent);`}_getAvatarStyle(){return[this._getAutoPaletteStyle(),this.statusColor?`--lui-avatar-status-bg:${this.statusColor};`:""].filter(Boolean).join("")||Zr.nothing}_emitKeyboardClick(){this.disabled||!this.clickable||this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0}))}_renderAvatar(){let e=!!this.src&&!this._imageError,t=this._getInitials(),r=this.alt||this.name||this.text||"avatar",n=this.status!=="none"||!!this.statusColor;return Zr.html`
7530
+ `],a([(0,Yt.property)({reflect:!0})],$o.prototype,"variant",2),a([(0,Yt.property)({reflect:!0})],$o.prototype,"size",2),a([(0,Yt.property)({reflect:!0,attribute:"icon-placement"})],$o.prototype,"iconPlacement",2),a([(0,Yt.property)({type:Boolean,reflect:!0})],$o.prototype,"accordion",2),a([(0,Yt.property)({attribute:!1})],$o.prototype,"openKeys",2),a([(0,Yt.property)({attribute:"default-open-keys"})],$o.prototype,"defaultOpenKeys",2),a([(0,Yt.state)()],$o.prototype,"_internalOpen",2),$o=a([(0,Yt.customElement)("lui-collapse")],$o);var Zr=require("lit"),or=require("lit/decorators.js");var op=[{color:"var(--lui-color-info)",bgMix:18,fgMix:92},{color:"oklch(64% 0.22 295)",bgMix:18,fgMix:88},{color:"var(--lui-color-success)",bgMix:16,fgMix:90},{color:"var(--lui-color-warning)",bgMix:18,fgMix:94},{color:"var(--lui-color-danger)",bgMix:16,fgMix:92},{color:"oklch(70% 0.16 185)",bgMix:16,fgMix:88},{color:"oklch(66% 0.24 310)",bgMix:18,fgMix:90},{color:"var(--lui-color-fg-muted)",bgMix:16,fgMix:88}],St=class extends Zr.LitElement{constructor(){super(...arguments);this.src="";this.alt="";this.name="";this.text="";this.icon="user";this.size="md";this.radius="full";this.color="auto";this.status="none";this.statusColor="";this.statusPosition="top-right";this.clickable=!1;this.disabled=!1;this.tooltip="";this.tooltipPlacement="top";this._imageError=!1;this._explicitAttrs=new Set;this._onImageError=()=>{this._imageError=!0};this._onClick=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())};this._onKeyDown=e=>{!this.clickable||this.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this._emitKeyboardClick())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){e.has("src")&&(this._imageError=!1);let t=L(this,"avatar");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("status-position")&&typeof t.statusPosition=="string"&&this.statusPosition!==t.statusPosition&&(this.statusPosition=t.statusPosition),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("clickable")&&typeof t.clickable=="boolean"&&this.clickable!==t.clickable&&(this.clickable=t.clickable)}_getSeed(){return this.text||this.name||this.alt||this.icon||"avatar"}_getInitials(){let e=(this.text||this.name||this.alt||"").trim();if(!e)return"";let t=e.split(/[\s\-_]+/).map(r=>r.trim()).filter(Boolean);return t.length>=2?`${t[0][0]??""}${t[t.length-1][0]??""}`.toUpperCase():e.length<=2?e.toUpperCase():e.slice(0,2).toUpperCase()}_getAutoPaletteStyle(){if(this.color!=="auto"||this.src&&!this._imageError)return"";let e=this._getSeed(),t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;let r=op[t%op.length];return`--lui-avatar-bg:color-mix(in srgb, ${r.color} ${r.bgMix}%, var(--lui-color-bg));--lui-avatar-fg:color-mix(in srgb, ${r.color} ${r.fgMix}%, var(--lui-color-fg));--lui-avatar-border:color-mix(in srgb, ${r.color} 24%, transparent);`}_getAvatarStyle(){return[this._getAutoPaletteStyle(),this.statusColor?`--lui-avatar-status-bg:${this.statusColor};`:""].filter(Boolean).join("")||Zr.nothing}_emitKeyboardClick(){this.disabled||!this.clickable||this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0}))}_renderAvatar(){let e=!!this.src&&!this._imageError,t=this._getInitials(),r=this.alt||this.name||this.text||"avatar",n=this.status!=="none"||!!this.statusColor;return Zr.html`
7527
7531
  <span
7528
7532
  class="avatar"
7529
7533
  part="base"
@@ -7850,7 +7854,7 @@
7850
7854
  font-size: var(--lui-font-size-xs);
7851
7855
  color: var(--lui-color-muted);
7852
7856
  }
7853
- `],a([(0,kr.property)({reflect:!0})],ir.prototype,"size",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"radius",2),a([(0,kr.property)({type:Number})],ir.prototype,"max",2),a([(0,kr.property)({type:Number})],ir.prototype,"overlap",2),a([(0,kr.property)({type:Number})],ir.prototype,"total",2),a([(0,kr.property)({attribute:!1})],ir.prototype,"items",2),a([(0,kr.property)({type:Boolean})],ir.prototype,"bordered",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"summaryColor",2),a([(0,kr.property)({reflect:!0,attribute:"expand-trigger"})],ir.prototype,"expandTrigger",2),a([(0,kr.property)({attribute:"summary-text"})],ir.prototype,"summaryText",2),a([(0,kr.property)({reflect:!0,attribute:"status-position"})],ir.prototype,"statusPosition",2),a([(0,kr.queryAssignedElements)({flatten:!0})],ir.prototype,"_assignedElements",2),a([(0,kr.state)()],ir.prototype,"_slotHiddenCount",2),ir=a([(0,kr.customElement)("lui-avatar-group")],ir);var wr=require("lit");typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Pm=typeof document<"u"&&!!document.documentMode,Vc;function Om(){return Vc||(Vc=document.createElement("div").style)}var ip=["webkit","moz","ms"],dl={};function qc(i){if(dl[i])return dl[i];let o=Om();if(i in o)return dl[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=ip.length;for(;t--;){let r=`${ip[t]}${e}`;if(r in o)return dl[i]=r}}function ul(i,o){return parseFloat(o[qc(i)])||0}function hl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:ul(`${o}Left${t}`,e),right:ul(`${o}Right${t}`,e),top:ul(`${o}Top${t}`,e),bottom:ul(`${o}Bottom${t}`,e)}}function sa(i,o,e){i.style[qc(o)]=e}function Hm(i,o){let e=qc("transform");sa(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function Rm(i,{x:o,y:e,scale:t,isSVG:r},n){if(sa(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Pm){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Dc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:hl(i,"margin",e),border:hl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:hl(o,"padding",t),border:hl(o,"border",t)}}}var ns={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?ns={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(ns={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Fc(i,o,e,t){ns[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function Nc(i,o,e){ns[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function ap(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function Bc(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,Bc(i,t);return}e=ap(i,o),e>-1&&i.splice(e,1),i.push(o)}function Im(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=ap(i,o);e>-1&&i.splice(e,1)}function np(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function Lc(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function Vm(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function Dm(i){return(i.getAttribute("class")||"").trim()}function Fm(i,o){return i.nodeType===1&&` ${Dm(i)} `.indexOf(` ${o} `)>-1}function Nm(i,o){for(let e=i;e!=null;e=e.parentNode)if(Fm(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var Lm=/^http:[\w\.\/]+svg$/;function Bm(i){return Lm.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function qm(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var sp={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Rm,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Kc(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Vm(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...sp,...o};let e=Bm(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,sa(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",sa(i,"transformOrigin","")}function n(q={}){for(let ee in q)q.hasOwnProperty(ee)&&(o[ee]=q[ee]);(q.hasOwnProperty("cursor")||q.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),q.hasOwnProperty("overflow")&&(t.style.overflow=q.overflow),q.hasOwnProperty("touchAction")&&(t.style.touchAction=q.touchAction,i.style.touchAction=q.touchAction)}let s=0,d=0,h=1,p=!1;z(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{$(o.startX,o.startY,{animate:!1,force:!0})});function f(q,ee,fe){if(fe.silent)return;let Ne=new CustomEvent(q,{detail:ee});i.dispatchEvent(Ne)}function x(q,ee,fe){let Ne={x:s,y:d,scale:h,isSVG:e,originalEvent:fe};return requestAnimationFrame(()=>{typeof ee.animate=="boolean"&&(ee.animate?Hm(i,ee):sa(i,"transition","none")),ee.setTransform(i,Ne,ee),f(q,Ne,ee),f("panzoomchange",Ne,ee)}),Ne}function k(q,ee,fe,Ne){let Z={...o,...Ne},Ae={x:s,y:d,opts:Z};if(!Ne?.force&&(Z.disablePan||Z.panOnlyWhenZoomed&&h===Z.startScale))return Ae;if(q=parseFloat(q),ee=parseFloat(ee),Z.disableXAxis||(Ae.x=(Z.relative?s:0)+q),Z.disableYAxis||(Ae.y=(Z.relative?d:0)+ee),Z.contain){let ce=Dc(i),wo=ce.elem.width/h,U=ce.elem.height/h,en=wo*fe,si=U*fe,Go=(en-wo)/2,li=(si-U)/2;if(Z.contain==="inside"){let tn=(-ce.elem.margin.left-ce.parent.padding.left+Go)/fe,Pi=(ce.parent.width-en-ce.parent.padding.left-ce.elem.margin.left-ce.parent.border.left-ce.parent.border.right+Go)/fe;Ae.x=Math.max(Math.min(Ae.x,Pi),tn);let ci=(-ce.elem.margin.top-ce.parent.padding.top+li)/fe,qn=(ce.parent.height-si-ce.parent.padding.top-ce.elem.margin.top-ce.parent.border.top-ce.parent.border.bottom+li)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),ci)}else if(Z.contain==="outside"){let tn=(-(en-ce.parent.width)-ce.parent.padding.left-ce.parent.border.left-ce.parent.border.right+Go)/fe,Pi=(Go-ce.parent.padding.left)/fe;Ae.x=Math.max(Math.min(Ae.x,Pi),tn);let ci=(-(si-ce.parent.height)-ce.parent.padding.top-ce.parent.border.top-ce.parent.border.bottom+li)/fe,qn=(li-ce.parent.padding.top)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),ci)}}return Z.roundPixels&&(Ae.x=Math.round(Ae.x),Ae.y=Math.round(Ae.y)),Ae}function C(q,ee){let fe={...o,...ee},Ne={scale:h,opts:fe};if(!ee?.force&&fe.disableZoom)return Ne;let Z=o.minScale,Ae=o.maxScale;if(fe.contain){let ce=Dc(i),wo=ce.elem.width/h,U=ce.elem.height/h;if(wo>1&&U>1){let en=ce.parent.width-ce.parent.border.left-ce.parent.border.right,si=ce.parent.height-ce.parent.border.top-ce.parent.border.bottom,Go=en/wo,li=si/U;o.contain==="inside"?Ae=Math.min(Ae,Go,li):o.contain==="outside"&&(Z=Math.max(Z,Go,li))}}return Ne.scale=Math.min(Math.max(q,Z),Ae),Ne}function $(q,ee,fe,Ne){let Z=k(q,ee,h,fe);return s!==Z.x||d!==Z.y?(s=Z.x,d=Z.y,x("panzoompan",Z.opts,Ne)):{x:s,y:d,scale:h,isSVG:e,originalEvent:Ne}}function z(q,ee,fe){let Ne=C(q,ee),Z=Ne.opts;if(!ee?.force&&Z.disableZoom)return;q=Ne.scale;let Ae=s,ce=d;if(Z.focal){let U=Z.focal;Ae=(U.x/q-U.x/h+s*q)/q,ce=(U.y/q-U.y/h+d*q)/q}let wo=k(Ae,ce,q,{relative:!1,force:!0});return s=wo.x,d=wo.y,h=q,x("panzoomzoom",Z,fe)}function T(q,ee){let fe={...o,animate:!0,...ee};return z(h*Math.exp((q?1:-1)*fe.step),fe)}function j(q){return T(!0,q)}function H(q){return T(!1,q)}function I(q,ee,fe,Ne){let Z=Dc(i),Ae={width:Z.parent.width-Z.parent.padding.left-Z.parent.padding.right-Z.parent.border.left-Z.parent.border.right,height:Z.parent.height-Z.parent.padding.top-Z.parent.padding.bottom-Z.parent.border.top-Z.parent.border.bottom},ce=ee.clientX-Z.parent.left-Z.parent.padding.left-Z.parent.border.left-Z.elem.margin.left,wo=ee.clientY-Z.parent.top-Z.parent.padding.top-Z.parent.border.top-Z.elem.margin.top;e||(ce-=Z.elem.width/h/2,wo-=Z.elem.height/h/2);let U={x:ce/Ae.width*(Ae.width*q),y:wo/Ae.height*(Ae.height*q)};return z(q,{...fe,animate:!1,focal:U},Ne)}function B(q,ee){q.preventDefault();let fe={...o,...ee,animate:!1},Z=(q.deltaY===0&&q.deltaX?q.deltaX:q.deltaY)<0?1:-1,Ae=C(h*Math.exp(Z*fe.step/3),fe).scale;return I(Ae,q,fe,q)}function S(q){let ee={...o,animate:!0,force:!0,...q};h=C(ee.startScale,ee).scale;let fe=k(ee.startX,ee.startY,h,ee);return s=fe.x,d=fe.y,x("panzoomreset",ee)}let Q,ye,De,yt,Ee,ni,et=[];function qr(q){if(Nm(q.target,o))return;Bc(et,q),p=!0,o.handleStartEvent(q),Q=s,ye=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o);let ee=np(et);De=ee.clientX,yt=ee.clientY,Ee=h,ni=Lc(et)}function io(q){if(!p||Q===void 0||ye===void 0||De===void 0||yt===void 0)return;Bc(et,q);let ee=np(et),fe=et.length>1,Ne=h;if(fe){ni===0&&(ni=Lc(et));let Z=Lc(et)-ni;Ne=C(Z*o.step/80+Ee).scale,I(Ne,ee,{animate:!1},q)}(!fe||o.pinchAndPan)&&$(Q+(ee.clientX-De)/Ne,ye+(ee.clientY-yt)/Ne,{animate:!1},q)}function ai(q){et.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o),Im(et,q),p&&(p=!1,Q=ye=De=yt=void 0)}let Bn=!1;function Uo(){Bn||(Bn=!0,Fc("down",o.canvas?t:i,qr),Fc("move",document,io,{passive:!0}),Fc("up",document,ai,{passive:!0}))}function Ci(){Bn=!1,Nc("down",o.canvas?t:i,qr),Nc("move",document,io),Nc("up",document,ai)}return o.noBind||Uo(),{bind:Uo,destroy:Ci,eventNames:ns,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>qm(o),handleDown:qr,handleMove:io,handleUp:ai,pan:$,reset:S,resetStyle:r,setOptions:n,setStyle:(q,ee)=>sa(i,q,ee),zoom:z,zoomIn:j,zoomOut:H,zoomToPoint:I,zoomWithWheel:B}}Kc.defaultOptions=sp;var Be=require("lit/decorators.js");var uo=require("lit"),Bo=require("lit/decorators.js");var lp={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function pl(i){return i==null||i===""?"":Ot(i)}var jr=class extends uo.LitElement{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=L(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${pl(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${pl(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):uo.nothing}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?pl(r):this.width!=null&&t===1?pl(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return uo.html`
7857
+ `],a([(0,kr.property)({reflect:!0})],ir.prototype,"size",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"radius",2),a([(0,kr.property)({type:Number})],ir.prototype,"max",2),a([(0,kr.property)({type:Number})],ir.prototype,"overlap",2),a([(0,kr.property)({type:Number})],ir.prototype,"total",2),a([(0,kr.property)({attribute:!1})],ir.prototype,"items",2),a([(0,kr.property)({type:Boolean})],ir.prototype,"bordered",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"summaryColor",2),a([(0,kr.property)({reflect:!0,attribute:"expand-trigger"})],ir.prototype,"expandTrigger",2),a([(0,kr.property)({attribute:"summary-text"})],ir.prototype,"summaryText",2),a([(0,kr.property)({reflect:!0,attribute:"status-position"})],ir.prototype,"statusPosition",2),a([(0,kr.queryAssignedElements)({flatten:!0})],ir.prototype,"_assignedElements",2),a([(0,kr.state)()],ir.prototype,"_slotHiddenCount",2),ir=a([(0,kr.customElement)("lui-avatar-group")],ir);var wr=require("lit");typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Pm=typeof document<"u"&&!!document.documentMode,Vc;function Om(){return Vc||(Vc=document.createElement("div").style)}var ip=["webkit","moz","ms"],dl={};function qc(i){if(dl[i])return dl[i];let o=Om();if(i in o)return dl[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=ip.length;for(;t--;){let r=`${ip[t]}${e}`;if(r in o)return dl[i]=r}}function ul(i,o){return parseFloat(o[qc(i)])||0}function hl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:ul(`${o}Left${t}`,e),right:ul(`${o}Right${t}`,e),top:ul(`${o}Top${t}`,e),bottom:ul(`${o}Bottom${t}`,e)}}function sa(i,o,e){i.style[qc(o)]=e}function Hm(i,o){let e=qc("transform");sa(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function Rm(i,{x:o,y:e,scale:t,isSVG:r},n){if(sa(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Pm){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Dc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:hl(i,"margin",e),border:hl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:hl(o,"padding",t),border:hl(o,"border",t)}}}var ns={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?ns={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(ns={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Fc(i,o,e,t){ns[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function Nc(i,o,e){ns[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function ap(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function Bc(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,Bc(i,t);return}e=ap(i,o),e>-1&&i.splice(e,1),i.push(o)}function Im(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=ap(i,o);e>-1&&i.splice(e,1)}function np(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function Lc(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function Vm(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function Dm(i){return(i.getAttribute("class")||"").trim()}function Fm(i,o){return i.nodeType===1&&` ${Dm(i)} `.indexOf(` ${o} `)>-1}function Nm(i,o){for(let e=i;e!=null;e=e.parentNode)if(Fm(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var Lm=/^http:[\w\.\/]+svg$/;function Bm(i){return Lm.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function qm(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var sp={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Rm,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Kc(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Vm(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...sp,...o};let e=Bm(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,sa(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",sa(i,"transformOrigin","")}function n(q={}){for(let ee in q)q.hasOwnProperty(ee)&&(o[ee]=q[ee]);(q.hasOwnProperty("cursor")||q.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),q.hasOwnProperty("overflow")&&(t.style.overflow=q.overflow),q.hasOwnProperty("touchAction")&&(t.style.touchAction=q.touchAction,i.style.touchAction=q.touchAction)}let s=0,d=0,h=1,p=!1;z(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{$(o.startX,o.startY,{animate:!1,force:!0})});function f(q,ee,fe){if(fe.silent)return;let Ne=new CustomEvent(q,{detail:ee});i.dispatchEvent(Ne)}function x(q,ee,fe){let Ne={x:s,y:d,scale:h,isSVG:e,originalEvent:fe};return requestAnimationFrame(()=>{typeof ee.animate=="boolean"&&(ee.animate?Hm(i,ee):sa(i,"transition","none")),ee.setTransform(i,Ne,ee),f(q,Ne,ee),f("panzoomchange",Ne,ee)}),Ne}function k(q,ee,fe,Ne){let Z={...o,...Ne},Ae={x:s,y:d,opts:Z};if(!Ne?.force&&(Z.disablePan||Z.panOnlyWhenZoomed&&h===Z.startScale))return Ae;if(q=parseFloat(q),ee=parseFloat(ee),Z.disableXAxis||(Ae.x=(Z.relative?s:0)+q),Z.disableYAxis||(Ae.y=(Z.relative?d:0)+ee),Z.contain){let ce=Dc(i),_o=ce.elem.width/h,U=ce.elem.height/h,en=_o*fe,si=U*fe,Go=(en-_o)/2,li=(si-U)/2;if(Z.contain==="inside"){let tn=(-ce.elem.margin.left-ce.parent.padding.left+Go)/fe,Pi=(ce.parent.width-en-ce.parent.padding.left-ce.elem.margin.left-ce.parent.border.left-ce.parent.border.right+Go)/fe;Ae.x=Math.max(Math.min(Ae.x,Pi),tn);let ci=(-ce.elem.margin.top-ce.parent.padding.top+li)/fe,qn=(ce.parent.height-si-ce.parent.padding.top-ce.elem.margin.top-ce.parent.border.top-ce.parent.border.bottom+li)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),ci)}else if(Z.contain==="outside"){let tn=(-(en-ce.parent.width)-ce.parent.padding.left-ce.parent.border.left-ce.parent.border.right+Go)/fe,Pi=(Go-ce.parent.padding.left)/fe;Ae.x=Math.max(Math.min(Ae.x,Pi),tn);let ci=(-(si-ce.parent.height)-ce.parent.padding.top-ce.parent.border.top-ce.parent.border.bottom+li)/fe,qn=(li-ce.parent.padding.top)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),ci)}}return Z.roundPixels&&(Ae.x=Math.round(Ae.x),Ae.y=Math.round(Ae.y)),Ae}function C(q,ee){let fe={...o,...ee},Ne={scale:h,opts:fe};if(!ee?.force&&fe.disableZoom)return Ne;let Z=o.minScale,Ae=o.maxScale;if(fe.contain){let ce=Dc(i),_o=ce.elem.width/h,U=ce.elem.height/h;if(_o>1&&U>1){let en=ce.parent.width-ce.parent.border.left-ce.parent.border.right,si=ce.parent.height-ce.parent.border.top-ce.parent.border.bottom,Go=en/_o,li=si/U;o.contain==="inside"?Ae=Math.min(Ae,Go,li):o.contain==="outside"&&(Z=Math.max(Z,Go,li))}}return Ne.scale=Math.min(Math.max(q,Z),Ae),Ne}function $(q,ee,fe,Ne){let Z=k(q,ee,h,fe);return s!==Z.x||d!==Z.y?(s=Z.x,d=Z.y,x("panzoompan",Z.opts,Ne)):{x:s,y:d,scale:h,isSVG:e,originalEvent:Ne}}function z(q,ee,fe){let Ne=C(q,ee),Z=Ne.opts;if(!ee?.force&&Z.disableZoom)return;q=Ne.scale;let Ae=s,ce=d;if(Z.focal){let U=Z.focal;Ae=(U.x/q-U.x/h+s*q)/q,ce=(U.y/q-U.y/h+d*q)/q}let _o=k(Ae,ce,q,{relative:!1,force:!0});return s=_o.x,d=_o.y,h=q,x("panzoomzoom",Z,fe)}function T(q,ee){let fe={...o,animate:!0,...ee};return z(h*Math.exp((q?1:-1)*fe.step),fe)}function j(q){return T(!0,q)}function H(q){return T(!1,q)}function I(q,ee,fe,Ne){let Z=Dc(i),Ae={width:Z.parent.width-Z.parent.padding.left-Z.parent.padding.right-Z.parent.border.left-Z.parent.border.right,height:Z.parent.height-Z.parent.padding.top-Z.parent.padding.bottom-Z.parent.border.top-Z.parent.border.bottom},ce=ee.clientX-Z.parent.left-Z.parent.padding.left-Z.parent.border.left-Z.elem.margin.left,_o=ee.clientY-Z.parent.top-Z.parent.padding.top-Z.parent.border.top-Z.elem.margin.top;e||(ce-=Z.elem.width/h/2,_o-=Z.elem.height/h/2);let U={x:ce/Ae.width*(Ae.width*q),y:_o/Ae.height*(Ae.height*q)};return z(q,{...fe,animate:!1,focal:U},Ne)}function B(q,ee){q.preventDefault();let fe={...o,...ee,animate:!1},Z=(q.deltaY===0&&q.deltaX?q.deltaX:q.deltaY)<0?1:-1,Ae=C(h*Math.exp(Z*fe.step/3),fe).scale;return I(Ae,q,fe,q)}function S(q){let ee={...o,animate:!0,force:!0,...q};h=C(ee.startScale,ee).scale;let fe=k(ee.startX,ee.startY,h,ee);return s=fe.x,d=fe.y,x("panzoomreset",ee)}let Q,ye,De,yt,Ee,ni,et=[];function qr(q){if(Nm(q.target,o))return;Bc(et,q),p=!0,o.handleStartEvent(q),Q=s,ye=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o);let ee=np(et);De=ee.clientX,yt=ee.clientY,Ee=h,ni=Lc(et)}function io(q){if(!p||Q===void 0||ye===void 0||De===void 0||yt===void 0)return;Bc(et,q);let ee=np(et),fe=et.length>1,Ne=h;if(fe){ni===0&&(ni=Lc(et));let Z=Lc(et)-ni;Ne=C(Z*o.step/80+Ee).scale,I(Ne,ee,{animate:!1},q)}(!fe||o.pinchAndPan)&&$(Q+(ee.clientX-De)/Ne,ye+(ee.clientY-yt)/Ne,{animate:!1},q)}function ai(q){et.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o),Im(et,q),p&&(p=!1,Q=ye=De=yt=void 0)}let Bn=!1;function Uo(){Bn||(Bn=!0,Fc("down",o.canvas?t:i,qr),Fc("move",document,io,{passive:!0}),Fc("up",document,ai,{passive:!0}))}function Ci(){Bn=!1,Nc("down",o.canvas?t:i,qr),Nc("move",document,io),Nc("up",document,ai)}return o.noBind||Uo(),{bind:Uo,destroy:Ci,eventNames:ns,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>qm(o),handleDown:qr,handleMove:io,handleUp:ai,pan:$,reset:S,resetStyle:r,setOptions:n,setStyle:(q,ee)=>sa(i,q,ee),zoom:z,zoomIn:j,zoomOut:H,zoomToPoint:I,zoomWithWheel:B}}Kc.defaultOptions=sp;var Be=require("lit/decorators.js");var uo=require("lit"),qo=require("lit/decorators.js");var lp={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function pl(i){return i==null||i===""?"":Ot(i)}var Pr=class extends uo.LitElement{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=L(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${pl(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${pl(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):uo.nothing}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?pl(r):this.width!=null&&t===1?pl(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return uo.html`
7854
7858
  <div class="text" part="text">
7855
7859
  ${Array.from({length:t},(r,n)=>uo.html`
7856
7860
  <div class="piece line" part="line" style=${`width:${this._lineWidth(n,t)}`}></div>
@@ -7864,7 +7868,7 @@
7864
7868
  `;case"text":default:return this._renderText()}}render(){return uo.html`
7865
7869
  <div class="content" part="content" ?hidden=${this.loading}><slot></slot></div>
7866
7870
  ${this.loading?uo.html`<div class="skeleton" part="skeleton" aria-hidden="true" style=${this._hostStyle()}>${this._renderSkeleton()}</div>`:uo.nothing}
7867
- `}};jr.styles=[A,P,uo.css`
7871
+ `}};Pr.styles=[A,P,uo.css`
7868
7872
  :host {
7869
7873
  display: block;
7870
7874
  width: 100%;
@@ -8002,7 +8006,7 @@
8002
8006
  transform: translateX(100%);
8003
8007
  }
8004
8008
  }
8005
- `],a([(0,Bo.property)({attribute:"loading",converter:lp})],jr.prototype,"loading",2),a([(0,Bo.property)({reflect:!0,converter:lp})],jr.prototype,"active",2),a([(0,Bo.property)({reflect:!0})],jr.prototype,"variant",2),a([(0,Bo.property)({reflect:!0})],jr.prototype,"size",2),a([(0,Bo.property)({reflect:!0})],jr.prototype,"radius",2),a([(0,Bo.property)({type:Number})],jr.prototype,"rows",2),a([(0,Bo.property)()],jr.prototype,"width",2),a([(0,Bo.property)()],jr.prototype,"height",2),a([(0,Bo.property)({attribute:!1})],jr.prototype,"widths",2),a([(0,Bo.property)({type:Boolean,attribute:"pause-when-hidden"})],jr.prototype,"pauseWhenHidden",2),jr=a([(0,Bo.customElement)("lui-skeleton")],jr);var Ie=class extends wr.LitElement{constructor(){super(...arguments);this.src="";this.previewSrc="";this.alt="";this.fallbackSrc="";this.fallback="\u56FE\u7247\u52A0\u8F7D\u5931\u8D25";this.fit="cover";this.radius="md";this.aspectRatio="";this.position="center";this.loading="lazy";this.skeleton=!0;this.preview=!0;this.showPreviewIcon=!0;this.draggablePreview=!0;this._loaded=!1;this._errored=!1;this._previewOpen=!1;this._zoom=1;this._rotate=0;this._panning=!1;this._explicitAttrs=new Set;this._stageMoved=!1;this._onLoad=()=>{this._loaded=!0,this._errored=!1,this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{if(this.fallbackSrc&&this.src!==this.fallbackSrc){this.src=this.fallbackSrc;return}this._errored=!0,this._loaded=!1,this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))};this._onFrameClick=()=>this.showPreview();this._onPanzoomStart=()=>{this._panning=!0};this._onPanzoomChange=e=>{let t=e.detail;this._syncZoom(t?.scale,!0)};this._onPanzoomEnd=()=>{this._panning=!1,this._syncZoom(this._panzoom?.getScale(),!0)};this._onKeyDown=e=>{this._previewOpen&&(e.key==="Escape"&&this.closePreview(),(e.key==="+"||e.key==="=")&&!e.metaKey&&!e.ctrlKey&&this.zoomIn(),e.key==="-"&&!e.metaKey&&!e.ctrlKey&&this.zoomOut(),e.key==="0"&&!e.metaKey&&!e.ctrlKey&&this.resetPreview())};this._onStagePointerDown=e=>{e.target===e.currentTarget&&(this._stageMoved=!1,this._stagePointerStart={x:e.clientX,y:e.clientY})};this._onStagePointerMove=e=>{if(!this._stagePointerStart)return;let t=e.clientX-this._stagePointerStart.x,r=e.clientY-this._stagePointerStart.y;(Math.abs(t)>3||Math.abs(r)>3)&&(this._stageMoved=!0)};this._onStagePointerUp=()=>{this._stagePointerStart=void 0};this._onStageClick=e=>{if(e.stopPropagation(),this._stageMoved){this._stageMoved=!1;return}e.target===e.currentTarget&&this.closePreview()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}disconnectedCallback(){this._destroyPanzoom(),this._removeGlobalListeners(),super.disconnectedCallback()}willUpdate(){let e=L(this,"image");!this._explicitAttrs.has("fit")&&typeof e.fit=="string"&&this.fit!==e.fit&&(this.fit=e.fit),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("skeleton")&&typeof e.skeleton=="boolean"&&this.skeleton!==e.skeleton&&(this.skeleton=e.skeleton),!this._explicitAttrs.has("preview")&&typeof e.preview=="boolean"&&this.preview!==e.preview&&(this.preview=e.preview)}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._resetPreviewTransform())}showPreview(){if(!this.preview||this._errored||!this._resolvedPreviewSrc||this._previewOpen)return;this._previewOpen=!0,this._resetPreviewTransform(),this._addGlobalListeners(),this._setupPanzoom();let e=this._detail();this.dispatchEvent(new CustomEvent("open",{detail:e,bubbles:!0,composed:!0}))}closePreview(){if(!this._previewOpen)return;let e=this._detail();this._previewOpen=!1,this._panning=!1,this._stagePointerStart=void 0,this._stageMoved=!1,this._destroyPanzoom(),this._removeGlobalListeners(),this.dispatchEvent(new CustomEvent("close",{detail:e,bubbles:!0,composed:!0}))}zoomIn(){let e=this._panzoom?.zoomIn({animate:!0});this._syncZoom(e?.scale)}zoomOut(){let e=this._panzoom?.zoomOut({animate:!0});this._syncZoom(e?.scale)}resetPreview(){this._panzoom?.reset({animate:!0}),this._rotate=0,this._syncZoom(this._panzoom?.getScale()??1,!0)}rotatePreview(){this._rotate=(this._rotate+90)%360,this._emitPreviewChange()}get _resolvedPreviewSrc(){return this.previewSrc||this.src}_detail(){return{src:this._resolvedPreviewSrc,zoom:this._zoom,rotate:this._rotate,source:"preview"}}_style(){let e=Ot(this.width),t=Ot(this.height),r=[e?`--lui-image-width:${e}`:"",t?`--lui-image-height:${t}`:"",this.aspectRatio?`--lui-image-aspect-ratio:${this.aspectRatio}`:"",this.fit?`--lui-image-fit:${this.fit}`:"",this.position?`--lui-image-position:${this.position}`:""].filter(Boolean);return r.length?r.join(";"):wr.nothing}_frameClass(){let e=["frame"];return this.aspectRatio&&e.push("has-aspect"),this.preview&&this._loaded&&!this._errored&&e.push("clickable"),e.join(" ")}_imageClass(){return["image",!!(this.height||this.aspectRatio)?"fixed":"natural",this._loaded&&!this._errored?"loaded":""].filter(Boolean).join(" ")}_resetPreviewTransform(){this._zoom=1,this._rotate=0}async _setupPanzoom(){await this.updateComplete;let e=this._previewImageEl,t=this._previewPanzoomEl,r=this._previewStageEl;if(!this._previewOpen||!e||!t||!r||!e.complete||e.naturalWidth===0)return;this._destroyPanzoom();let n=Kc(t,{maxScale:6,minScale:.2,step:.25,startScale:1,cursor:"grab",animate:!0,duration:160,easing:"cubic-bezier(.2,.8,.2,1)",disablePan:!this.draggablePreview,handleStartEvent:s=>{s.preventDefault(),this._panning=!0}});this._panzoom=n,this._wheelHandler=s=>{s.preventDefault(),n.zoomWithWheel(s)},r.addEventListener("wheel",this._wheelHandler,{passive:!1}),t.addEventListener("panzoomstart",this._onPanzoomStart),t.addEventListener("panzoomchange",this._onPanzoomChange),t.addEventListener("panzoomend",this._onPanzoomEnd),n.reset({animate:!1,force:!0}),this._syncZoom(1)}_destroyPanzoom(){let e=this._previewStageEl,t=this._previewPanzoomEl;this._wheelHandler&&e&&e.removeEventListener("wheel",this._wheelHandler),t&&(t.removeEventListener("panzoomstart",this._onPanzoomStart),t.removeEventListener("panzoomchange",this._onPanzoomChange),t.removeEventListener("panzoomend",this._onPanzoomEnd)),this._wheelHandler=void 0,this._panzoom?.destroy(),this._panzoom=void 0}_syncZoom(e,t=!1){let r=Math.max(.2,Math.min(6,Math.round((e??this._panzoom?.getScale()??1)*100)/100));r!==this._zoom&&(this._zoom=r,t=!0),t&&this._emitPreviewChange()}_emitPreviewChange(){let e=this._detail();this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}_addGlobalListeners(){window.addEventListener("keydown",this._onKeyDown)}_removeGlobalListeners(){window.removeEventListener("keydown",this._onKeyDown)}_download(){let e=this._resolvedPreviewSrc;if(!e)return;let t=document.createElement("a");t.href=e,t.download=this.alt||e.split("/").pop()||"image",t.rel="noopener",t.click()}_renderPreview(){if(!this._previewOpen)return wr.nothing;let e=`--lui-preview-rotate:${this._rotate}deg;`;return wr.html`
8009
+ `],a([(0,qo.property)({attribute:"loading",converter:lp})],Pr.prototype,"loading",2),a([(0,qo.property)({reflect:!0,converter:lp})],Pr.prototype,"active",2),a([(0,qo.property)({reflect:!0})],Pr.prototype,"variant",2),a([(0,qo.property)({reflect:!0})],Pr.prototype,"size",2),a([(0,qo.property)({reflect:!0})],Pr.prototype,"radius",2),a([(0,qo.property)({type:Number})],Pr.prototype,"rows",2),a([(0,qo.property)()],Pr.prototype,"width",2),a([(0,qo.property)()],Pr.prototype,"height",2),a([(0,qo.property)({attribute:!1})],Pr.prototype,"widths",2),a([(0,qo.property)({type:Boolean,attribute:"pause-when-hidden"})],Pr.prototype,"pauseWhenHidden",2),Pr=a([(0,qo.customElement)("lui-skeleton")],Pr);var Ie=class extends wr.LitElement{constructor(){super(...arguments);this.src="";this.previewSrc="";this.alt="";this.fallbackSrc="";this.fallback="\u56FE\u7247\u52A0\u8F7D\u5931\u8D25";this.fit="cover";this.radius="md";this.aspectRatio="";this.position="center";this.loading="lazy";this.skeleton=!0;this.preview=!0;this.showPreviewIcon=!0;this.draggablePreview=!0;this._loaded=!1;this._errored=!1;this._previewOpen=!1;this._zoom=1;this._rotate=0;this._panning=!1;this._explicitAttrs=new Set;this._stageMoved=!1;this._onLoad=()=>{this._loaded=!0,this._errored=!1,this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{if(this.fallbackSrc&&this.src!==this.fallbackSrc){this.src=this.fallbackSrc;return}this._errored=!0,this._loaded=!1,this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))};this._onFrameClick=()=>this.showPreview();this._onPanzoomStart=()=>{this._panning=!0};this._onPanzoomChange=e=>{let t=e.detail;this._syncZoom(t?.scale,!0)};this._onPanzoomEnd=()=>{this._panning=!1,this._syncZoom(this._panzoom?.getScale(),!0)};this._onKeyDown=e=>{this._previewOpen&&(e.key==="Escape"&&this.closePreview(),(e.key==="+"||e.key==="=")&&!e.metaKey&&!e.ctrlKey&&this.zoomIn(),e.key==="-"&&!e.metaKey&&!e.ctrlKey&&this.zoomOut(),e.key==="0"&&!e.metaKey&&!e.ctrlKey&&this.resetPreview())};this._onStagePointerDown=e=>{e.target===e.currentTarget&&(this._stageMoved=!1,this._stagePointerStart={x:e.clientX,y:e.clientY})};this._onStagePointerMove=e=>{if(!this._stagePointerStart)return;let t=e.clientX-this._stagePointerStart.x,r=e.clientY-this._stagePointerStart.y;(Math.abs(t)>3||Math.abs(r)>3)&&(this._stageMoved=!0)};this._onStagePointerUp=()=>{this._stagePointerStart=void 0};this._onStageClick=e=>{if(e.stopPropagation(),this._stageMoved){this._stageMoved=!1;return}e.target===e.currentTarget&&this.closePreview()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}disconnectedCallback(){this._destroyPanzoom(),this._removeGlobalListeners(),super.disconnectedCallback()}willUpdate(){let e=L(this,"image");!this._explicitAttrs.has("fit")&&typeof e.fit=="string"&&this.fit!==e.fit&&(this.fit=e.fit),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("skeleton")&&typeof e.skeleton=="boolean"&&this.skeleton!==e.skeleton&&(this.skeleton=e.skeleton),!this._explicitAttrs.has("preview")&&typeof e.preview=="boolean"&&this.preview!==e.preview&&(this.preview=e.preview)}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._resetPreviewTransform())}showPreview(){if(!this.preview||this._errored||!this._resolvedPreviewSrc||this._previewOpen)return;this._previewOpen=!0,this._resetPreviewTransform(),this._addGlobalListeners(),this._setupPanzoom();let e=this._detail();this.dispatchEvent(new CustomEvent("open",{detail:e,bubbles:!0,composed:!0}))}closePreview(){if(!this._previewOpen)return;let e=this._detail();this._previewOpen=!1,this._panning=!1,this._stagePointerStart=void 0,this._stageMoved=!1,this._destroyPanzoom(),this._removeGlobalListeners(),this.dispatchEvent(new CustomEvent("close",{detail:e,bubbles:!0,composed:!0}))}zoomIn(){let e=this._panzoom?.zoomIn({animate:!0});this._syncZoom(e?.scale)}zoomOut(){let e=this._panzoom?.zoomOut({animate:!0});this._syncZoom(e?.scale)}resetPreview(){this._panzoom?.reset({animate:!0}),this._rotate=0,this._syncZoom(this._panzoom?.getScale()??1,!0)}rotatePreview(){this._rotate=(this._rotate+90)%360,this._emitPreviewChange()}get _resolvedPreviewSrc(){return this.previewSrc||this.src}_detail(){return{src:this._resolvedPreviewSrc,zoom:this._zoom,rotate:this._rotate,source:"preview"}}_style(){let e=Ot(this.width),t=Ot(this.height),r=[e?`--lui-image-width:${e}`:"",t?`--lui-image-height:${t}`:"",this.aspectRatio?`--lui-image-aspect-ratio:${this.aspectRatio}`:"",this.fit?`--lui-image-fit:${this.fit}`:"",this.position?`--lui-image-position:${this.position}`:""].filter(Boolean);return r.length?r.join(";"):wr.nothing}_frameClass(){let e=["frame"];return this.aspectRatio&&e.push("has-aspect"),this.preview&&this._loaded&&!this._errored&&e.push("clickable"),e.join(" ")}_imageClass(){return["image",!!(this.height||this.aspectRatio)?"fixed":"natural",this._loaded&&!this._errored?"loaded":""].filter(Boolean).join(" ")}_resetPreviewTransform(){this._zoom=1,this._rotate=0}async _setupPanzoom(){await this.updateComplete;let e=this._previewImageEl,t=this._previewPanzoomEl,r=this._previewStageEl;if(!this._previewOpen||!e||!t||!r||!e.complete||e.naturalWidth===0)return;this._destroyPanzoom();let n=Kc(t,{maxScale:6,minScale:.2,step:.25,startScale:1,cursor:"grab",animate:!0,duration:160,easing:"cubic-bezier(.2,.8,.2,1)",disablePan:!this.draggablePreview,handleStartEvent:s=>{s.preventDefault(),this._panning=!0}});this._panzoom=n,this._wheelHandler=s=>{s.preventDefault(),n.zoomWithWheel(s)},r.addEventListener("wheel",this._wheelHandler,{passive:!1}),t.addEventListener("panzoomstart",this._onPanzoomStart),t.addEventListener("panzoomchange",this._onPanzoomChange),t.addEventListener("panzoomend",this._onPanzoomEnd),n.reset({animate:!1,force:!0}),this._syncZoom(1)}_destroyPanzoom(){let e=this._previewStageEl,t=this._previewPanzoomEl;this._wheelHandler&&e&&e.removeEventListener("wheel",this._wheelHandler),t&&(t.removeEventListener("panzoomstart",this._onPanzoomStart),t.removeEventListener("panzoomchange",this._onPanzoomChange),t.removeEventListener("panzoomend",this._onPanzoomEnd)),this._wheelHandler=void 0,this._panzoom?.destroy(),this._panzoom=void 0}_syncZoom(e,t=!1){let r=Math.max(.2,Math.min(6,Math.round((e??this._panzoom?.getScale()??1)*100)/100));r!==this._zoom&&(this._zoom=r,t=!0),t&&this._emitPreviewChange()}_emitPreviewChange(){let e=this._detail();this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}_addGlobalListeners(){window.addEventListener("keydown",this._onKeyDown)}_removeGlobalListeners(){window.removeEventListener("keydown",this._onKeyDown)}_download(){let e=this._resolvedPreviewSrc;if(!e)return;let t=document.createElement("a");t.href=e,t.download=this.alt||e.split("/").pop()||"image",t.rel="noopener",t.click()}_renderPreview(){if(!this._previewOpen)return wr.nothing;let e=`--lui-preview-rotate:${this._rotate}deg;`;return wr.html`
8006
8010
  <div class="preview-layer" part="preview">
8007
8011
  <div class="preview-toolbar" part="preview-toolbar" @click=${t=>t.stopPropagation()}>
8008
8012
  <div class="preview-title" title=${this.alt||this._resolvedPreviewSrc}>${this.alt||this._resolvedPreviewSrc}</div>
@@ -8304,7 +8308,7 @@
8304
8308
  border-radius: var(--lui-radius-lg);
8305
8309
  }
8306
8310
  }
8307
- `],a([(0,Be.property)()],Ie.prototype,"src",2),a([(0,Be.property)({attribute:"preview-src"})],Ie.prototype,"previewSrc",2),a([(0,Be.property)()],Ie.prototype,"alt",2),a([(0,Be.property)({attribute:"fallback-src"})],Ie.prototype,"fallbackSrc",2),a([(0,Be.property)()],Ie.prototype,"fallback",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"fit",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"radius",2),a([(0,Be.property)()],Ie.prototype,"width",2),a([(0,Be.property)()],Ie.prototype,"height",2),a([(0,Be.property)({attribute:"aspect-ratio"})],Ie.prototype,"aspectRatio",2),a([(0,Be.property)()],Ie.prototype,"position",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"loading",2),a([(0,Be.property)({type:Boolean,reflect:!0})],Ie.prototype,"skeleton",2),a([(0,Be.property)({type:Boolean,reflect:!0})],Ie.prototype,"preview",2),a([(0,Be.property)({type:Boolean,attribute:"show-preview-icon"})],Ie.prototype,"showPreviewIcon",2),a([(0,Be.property)({type:Boolean})],Ie.prototype,"draggablePreview",2),a([(0,Be.state)()],Ie.prototype,"_loaded",2),a([(0,Be.state)()],Ie.prototype,"_errored",2),a([(0,Be.state)()],Ie.prototype,"_previewOpen",2),a([(0,Be.state)()],Ie.prototype,"_zoom",2),a([(0,Be.state)()],Ie.prototype,"_rotate",2),a([(0,Be.state)()],Ie.prototype,"_panning",2),a([(0,Be.query)(".preview-image")],Ie.prototype,"_previewImageEl",2),a([(0,Be.query)(".preview-panzoom")],Ie.prototype,"_previewPanzoomEl",2),a([(0,Be.query)(".preview-stage")],Ie.prototype,"_previewStageEl",2),Ie=a([(0,Be.customElement)("lui-image")],Ie);var Pr=require("lit"),Dt=require("lit/decorators.js");var as=typeof window<"u"&&typeof window.document<"u",$o=as?window:{},Wc=as?"ontouchstart"in $o.document.documentElement:!1,Uc=as?"PointerEvent"in $o:!1,hn="cropper",Jo=`${hn}-canvas`,up=`${hn}-crosshair`,hp=`${hn}-grid`,pp=`${hn}-handle`,vi=`${hn}-image`,ho=`${hn}-selection`,mp=`${hn}-shade`,gp=`${hn}-viewer`,la="select",ml="move",Wi="scale",ss="rotate",ca="transform",bi="none",Gc="n-resize",Yc="e-resize",Xc="s-resize",Zc="w-resize",da="ne-resize",ua="nw-resize",ha="se-resize",pa="sw-resize",fp="action",Km=Wc?"touchend touchcancel":"mouseup",Wm=Wc?"touchmove":"mousemove",Um=Wc?"touchstart":"mousedown",Qc=Uc?"pointerdown":Um,Jc=Uc?"pointermove":Wm,ed=Uc?"pointerup pointercancel":Km,td="error",rd="keydown",pn="load",od="resize",id="wheel",Ui="action",yi="actionend",vp="actionmove",ki="actionstart",xi="change",ls="transform";function ma(i){return typeof i=="string"}var nd=Number.isNaN||$o.isNaN;function be(i){return typeof i=="number"&&!nd(i)}function Qr(i){return be(i)&&i>0&&i<1/0}function bp(i){return typeof i>"u"}function ad(i){return typeof i=="object"&&i!==null}var{hasOwnProperty:Gm}=Object.prototype;function ga(i){if(!ad(i))return!1;try{let{constructor:o}=i,{prototype:e}=o;return o&&e&&Gm.call(e,"isPrototypeOf")}catch{return!1}}function fa(i){return typeof i=="function"}function Gi(i){return typeof i=="object"&&i!==null&&i.nodeType===1}var Ym=/([a-z\d])([A-Z])/g;function sd(i){return String(i).replace(Ym,"$1-$2").toLowerCase()}var Xm=/-[A-z\d]/g;function ld(i){return i.replace(Xm,o=>o.slice(1).toUpperCase())}var yp=/\s\s*/;function lt(i,o,e,t){o.trim().split(yp).forEach(r=>{i.removeEventListener(r,e,t)})}function gt(i,o,e,t){o.trim().split(yp).forEach(r=>{i.addEventListener(r,e,t)})}function cd(i,o,e,t){gt(i,o,e,Object.assign(Object.assign({},t),{once:!0}))}var Zm={bubbles:!0,cancelable:!0,composed:!0};function kp(i,o,e,t){return i.dispatchEvent(new CustomEvent(o,Object.assign(Object.assign(Object.assign({},Zm),{detail:e}),t)))}function xp(i){return typeof i.composedPath=="function"&&i.composedPath().find(Gi)||i.target}var cp=Promise.resolve();function wp(i,o){return o?cp.then(i?o.bind(i):o):cp}function gl(i){let o=i.getRootNode();switch(o.nodeType){case 1:return o.ownerDocument;case 9:return o;case 11:return o}return null}function dd(i){let{documentElement:o}=i.ownerDocument,e=i.getBoundingClientRect();return{left:e.left+($o.pageXOffset-o.clientLeft),top:e.top+($o.pageYOffset-o.clientTop)}}var Qm=/deg|g?rad|turn$/i;function fl(i){let o=parseFloat(i)||0;if(o!==0){let[e="rad"]=String(i).match(Qm)||[];switch(e.toLowerCase()){case"deg":return o/360*(Math.PI*2);case"grad":return o/400*(Math.PI*2);case"turn":return o*(Math.PI*2)}}return o}var dp="contain",Jm="cover";function va(i,o=dp){let{aspectRatio:e}=i,{width:t,height:r}=i,n=Qr(t),s=Qr(r);if(n&&s){let d=r*e;o===dp&&d>t||o===Jm&&d<t?r=t/e:t=r*e}else n?r=t/e:s&&(t=r*e);return{width:t,height:r}}function ud(i,...o){if(o.length===0)return i;let[e,t,r,n,s,d]=i,[h,p,f,x,k,C]=o[0];return i=[e*h+r*p,t*h+n*p,e*f+r*x,t*f+n*x,e*k+r*C+s,t*k+n*C+d],ud(i,...o.slice(1))}var eg=":host([hidden]){display:none!important}",tg=/left|top|width|height/i,_p="open",vl=new WeakMap,bl=new WeakMap,Mp=new Map,Cp=$o.document&&Array.isArray($o.document.adoptedStyleSheets)&&"replaceSync"in $o.CSSStyleSheet.prototype,nr=class extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${eg}`}constructor(){var o,e;super(),this.shadowRootMode=_p,this.slottable=!0;let t=(e=(o=Object.getPrototypeOf(this))===null||o===void 0?void 0:o.constructor)===null||e===void 0?void 0:e.$name;t&&Mp.set(t,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(o,e,t){if(Object.is(t,e))return;let r=ld(o),n=this[r],s=t;switch(typeof n){case"boolean":s=t!==null&&t!=="false";break;case"number":s=Number(t);break}switch(this[r]=s,o){case"theme-color":{let d=bl.get(this),h=this.$sharedStyle;d&&h&&(Cp?d.replaceSync(h):d.textContent=h);break}}}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(o=sd(o),typeof t){case"boolean":t===!0?this.hasAttribute(o)||this.setAttribute(o,""):this.removeAttribute(o);break;case"number":nd(t)?t="":t=String(t);default:t?this.getAttribute(o)!==t&&this.setAttribute(o,t):this.removeAttribute(o)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach(e=>{let t=ld(e),r=this[t];bp(r)||this.$propertyChangedCallback(t,void 0,r),Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get(){return r},set(n){let s=r;r=n,this.$propertyChangedCallback(t,s,n)}})});let o=this.shadowRoot||this.attachShadow({mode:this.shadowRootMode||_p});if(vl.set(this,o),bl.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){let e=document.createElement("template");e.innerHTML=this.$template,o.appendChild(e.content)}if(this.slottable){let e=document.createElement("slot");o.appendChild(e)}}disconnectedCallback(){bl.has(this)&&bl.delete(this),vl.has(this)&&vl.delete(this)}$getTagNameOf(o){var e;return(e=Mp.get(o))!==null&&e!==void 0?e:o}$setStyles(o){return Object.keys(o).forEach(e=>{let t=o[e];be(t)&&(t!==0&&tg.test(e)?t=`${t}px`:t=String(t)),this.style[e]=t}),this}$getShadowRoot(){return this.shadowRoot||vl.get(this)}$addStyles(o){let e,t=this.$getShadowRoot();return Cp?(e=new CSSStyleSheet,e.replaceSync(o),t.adoptedStyleSheets=t.adoptedStyleSheets.concat(e)):(e=document.createElement("style"),e.textContent=o,t.appendChild(e)),e}$emit(o,e,t){return kp(this,o,e,t)}$nextTick(o){return wp(this,o)}static $define(o,e){ad(o)&&(e=o,o=""),o||(o=this.$name||this.name),o=sd(o),as&&$o.customElements&&!$o.customElements.get(o)&&customElements.define(o,this,e)}};nr.$version="2.1.1";var rg=':host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}',An=class extends nr{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=rg,this.$action=bi,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.disabled||this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"disabled":t?this.$unbind():this.$bind();break}}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),gt(this,Qc,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),gt(this.ownerDocument,Jc,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),gt(this.ownerDocument,ed,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),gt(this,id,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(lt(this,Qc,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(lt(this.ownerDocument,Jc,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(lt(this.ownerDocument,ed,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(lt(this,id,this.$onWheel,{capture:!0}),this.$onWheel=null)}$handlePointerDown(o){let{buttons:e,button:t,type:r}=o;if(this.disabled||(r==="pointerdown"&&o.pointerType==="mouse"||r==="mousedown")&&(be(e)&&e!==1||be(t)&&t!==0||o.ctrlKey))return;let{$pointers:n}=this,s="";if(o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:d,pageX:h,pageY:p})=>{n.set(d,{startX:h,startY:p,endX:h,endY:p})});else{let{pointerId:d=0,pageX:h,pageY:p}=o;n.set(d,{startX:h,startY:p,endX:h,endY:p})}n.size>1?s=ca:Gi(o.target)&&(s=o.target.action||o.target.getAttribute(fp)||""),this.$emit(ki,{action:s,relatedEvent:o})!==!1&&(o.preventDefault(),this.$action=s,this.style.willChange="transform")}$handlePointerMove(o){let{$action:e,$pointers:t}=this;if(this.disabled||e===bi||t.size===0||this.$emit(vp,{action:e,relatedEvent:o})===!1)return;if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:n,pageX:s,pageY:d})=>{let h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})});else{let{pointerId:n=0,pageX:s,pageY:d}=o,h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})}let r={action:e,relatedEvent:o};if(e===ca){let n=new Map(t),s=0,d=0,h=0,p=0,f=o.pageX,x=o.pageY;t.forEach(($,z)=>{n.delete(z),n.forEach(T=>{let j=T.startX-$.startX,H=T.startY-$.startY,I=T.endX-$.endX,B=T.endY-$.endY,S=0,Q=0,ye=0,De=0;if(j===0?H<0?ye=Math.PI*2:H>0&&(ye=Math.PI):j>0?ye=Math.PI/2+Math.atan(H/j):j<0&&(ye=Math.PI*1.5+Math.atan(H/j)),I===0?B<0?De=Math.PI*2:B>0&&(De=Math.PI):I>0?De=Math.PI/2+Math.atan(B/I):I<0&&(De=Math.PI*1.5+Math.atan(B/I)),De>0||ye>0){let yt=De-ye,Ee=Math.abs(yt);Ee>s&&(s=Ee,h=yt,f=($.startX+T.startX)/2,x=($.startY+T.startY)/2)}if(j=Math.abs(j),H=Math.abs(H),I=Math.abs(I),B=Math.abs(B),j>0&&H>0?S=Math.sqrt(j*j+H*H):j>0?S=j:H>0&&(S=H),I>0&&B>0?Q=Math.sqrt(I*I+B*B):I>0?Q=I:B>0&&(Q=B),S>0&&Q>0){let yt=(Q-S)/S,Ee=Math.abs(yt);Ee>d&&(d=Ee,p=yt,f=($.startX+T.startX)/2,x=($.startY+T.startY)/2)}})});let k=s>0,C=d>0;k&&C?(r.rotate=h,r.scale=p,r.centerX=f,r.centerY=x):k?(r.action=ss,r.rotate=h,r.centerX=f,r.centerY=x):C?(r.action=Wi,r.scale=p,r.centerX=f,r.centerY=x):r.action=bi}else{let[n]=Array.from(t.values());Object.assign(r,n)}t.forEach(n=>{n.startX=n.endX,n.startY=n.endY}),r.action!==bi&&this.$emit(Ui,r,{cancelable:!1})}$handlePointerUp(o){let{$action:e,$pointers:t}=this;if(!(this.disabled||e===bi)&&this.$emit(yi,{action:e,relatedEvent:o})!==!1){if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:r})=>{t.delete(r)});else{let{pointerId:r=0}=o;t.delete(r)}t.size===0&&(this.style.willChange="",this.$action=bi)}}$handleWheel(o){if(this.disabled||(o.preventDefault(),this.$wheeling))return;this.$wheeling=!0,setTimeout(()=>{this.$wheeling=!1},50);let t=(o.deltaY>0?-1:1)*this.scaleStep;this.$emit(Ui,{action:Wi,scale:t,relatedEvent:o},{cancelable:!1})}$setAction(o){return ma(o)&&(this.$action=o),this}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),n=this.offsetWidth,s=this.offsetHeight,d=1;ga(o)&&(Qr(o.width)||Qr(o.height))&&({width:n,height:s}=va({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.offsetWidth),r.width=n,r.height=s;let h=this.querySelector(this.$getTagNameOf(vi));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,k,C,$,z,T]=h.$getTransform(),j=z,H=T,I=p.naturalWidth,B=p.naturalHeight;d!==1&&(j*=d,H*=d,I*=d,B*=d);let S=I/2,Q=B/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),ga(o)&&fa(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(S,Q),f.transform(x,k,C,$,j,H),f.translate(-S,-Q),f.drawImage(p,0,0,I,B),f.restore()}e(r)}).catch(t)})}};An.$name=Jo;An.$version="2.1.1";var og=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}",zp=new WeakMap,Ep=["alt","crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","src","srcset"],jn=class extends nr{constructor(){super(...arguments),this.$isReady=!1,this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=og,this.$image=new Image,this.initialCenterSize="contain",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1,this.alt="",this.crossorigin="",this.decoding="",this.elementtiming="",this.fetchpriority="",this.loading="",this.referrerpolicy="",this.sizes="",this.src="",this.srcset=""}set $canvas(o){zp.set(this,o)}get $canvas(){return zp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Ep,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(o,e,t){Object.is(t,e)||(super.attributeChangedCallback(o,e,t),Ep.includes(o)&&this.$image.setAttribute(o,t))}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"initialCenterSize":this.$nextTick(()=>{this.$center(t)});break;case"src":this.$isReady=!1;break}}connectedCallback(){super.connectedCallback();let{$image:o}=this,e=this.closest(this.$getTagNameOf(Jo));e&&(this.$canvas=e,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=t=>{var r,n;this.$actionStartTarget=(n=(r=t.detail)===null||r===void 0?void 0:r.relatedEvent)===null||n===void 0?void 0:n.target},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),gt(e,ki,this.$onCanvasActionStart),gt(e,yi,this.$onCanvasActionEnd),gt(e,Ui,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),gt(o,pn,this.$onLoad),this.$getShadowRoot().appendChild(o)}disconnectedCallback(){let{$image:o,$canvas:e}=this;e&&(this.$onCanvasActionStart&&(lt(e,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(e,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(lt(e,Ui,this.$onCanvasAction),this.$onCanvasAction=null)),o&&this.$onLoad&&(lt(o,pn,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(o),super.disconnectedCallback()}$handleLoad(){let{$image:o}=this;this.$setStyles({width:o.naturalWidth,height:o.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize),this.$isReady=!0}$handleAction(o){if(this.hidden||!(this.rotatable||this.scalable||this.translatable))return;let{$canvas:e}=this,{detail:t}=o;if(t){let{relatedEvent:r}=t,{action:n}=t;switch(n===ca&&(!this.rotatable||!this.scalable)&&(this.rotatable?n=ss:this.scalable?n=Wi:n=bi),n){case ml:if(this.translatable){let s=null;r&&(s=r.target.closest(this.$getTagNameOf(ho))),s||(s=e.querySelector(this.$getTagNameOf(ho))),s&&s.multiple&&!s.active&&(s=e.querySelector(`${this.$getTagNameOf(ho)}[active]`)),(!s||s.hidden||!s.movable||s.dynamic||!(this.$actionStartTarget&&s.contains(this.$actionStartTarget)))&&this.$move(t.endX-t.startX,t.endY-t.startY)}break;case ss:if(this.rotatable)if(r){let{x:s,y:d}=this.getBoundingClientRect();this.$rotate(t.rotate,r.clientX-s,r.clientY-d)}else this.$rotate(t.rotate);break;case Wi:if(this.scalable)if(r){let s=r.target.closest(this.$getTagNameOf(ho));if(!s||!s.zoomable||s.zoomable&&s.dynamic){let{x:d,y:h}=this.getBoundingClientRect();this.$zoom(t.scale,r.clientX-d,r.clientY-h)}}else this.$zoom(t.scale);break;case ca:if(this.rotatable&&this.scalable){let{rotate:s}=t,{scale:d}=t;d<0?d=1/(1-d):d+=1;let h=Math.cos(s),p=Math.sin(s),[f,x,k,C]=[h*d,p*d,-p*d,h*d];if(r){let $=this.getBoundingClientRect(),z=r.clientX-$.x,T=r.clientY-$.y,[j,H,I,B]=this.$matrix,S=$.width/2,Q=$.height/2,ye=z-S,De=T-Q,yt=(ye*B-I*De)/(j*B-I*H),Ee=(De*j-H*ye)/(j*B-I*H);this.$transform(f,x,k,C,yt*(1-f)+Ee*k,Ee*(1-C)+yt*x)}else this.$transform(f,x,k,C,0,0)}break}}}$ready(o){let{$image:e}=this,t=new Promise((r,n)=>{let s=new Error("Failed to load the image source");if(e.complete)e.naturalWidth>0&&e.naturalHeight>0?r(e):n(s);else{let d=()=>{lt(e,td,h),setTimeout(()=>{r(e)})},h=()=>{lt(e,pn,d),n(s)};cd(e,pn,d),cd(e,td,h)}});return fa(o)&&t.then(r=>(o(r),r)),t}$center(o){let{parentElement:e}=this;if(!e)return this;let t=e.getBoundingClientRect(),r=t.width,n=t.height,{x:s,y:d,width:h,height:p}=this.getBoundingClientRect(),f=s+h/2,x=d+p/2,k=t.x+r/2,C=t.y+n/2,{translatable:$}=this;if(!$&&!this.$isReady&&(this.translatable=!0,this.$nextTick(()=>{this.translatable=$})),this.$move(k-f,C-x),o&&(h!==r||p!==n)){let z=r/h,T=n/p,{scalable:j}=this;switch(o&&!j&&!this.$isReady&&(this.scalable=!0,this.$nextTick(()=>{this.scalable=j})),o){case"cover":this.$scale(Math.max(z,T));break;case"contain":this.$scale(Math.min(z,T));break}}return this}$move(o,e=o){if(this.translatable&&be(o)&&be(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$translate(d,h)}return this}$moveTo(o,e=o){if(this.translatable&&be(o)&&be(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$setTransform(t,r,n,s,d,h)}return this}$rotate(o,e,t){if(this.rotatable){let r=fl(o),n=Math.cos(r),s=Math.sin(r),[d,h,p,f]=[n,s,-s,n];if(be(e)&&be(t)){let[x,k,C,$]=this.$matrix,{width:z,height:T}=this.getBoundingClientRect(),j=z/2,H=T/2,I=e-j,B=t-H,S=(I*$-C*B)/(x*$-C*k),Q=(B*x-k*I)/(x*$-C*k);this.$transform(d,h,p,f,S*(1-d)-Q*p,Q*(1-f)-S*h)}else this.$transform(d,h,p,f,0,0)}return this}$zoom(o,e,t){if(!this.scalable||o===0)return this;if(o<0?o=1/(1-o):o+=1,be(e)&&be(t)){let[r,n,s,d]=this.$matrix,{width:h,height:p}=this.getBoundingClientRect(),f=h/2,x=p/2,k=e-f,C=t-x,$=(k*d-s*C)/(r*d-s*n),z=(C*r-n*k)/(r*d-s*n);this.$transform(o,0,0,o,$*(1-o),z*(1-o))}else this.$scale(o);return this}$scale(o,e=o){return this.scalable&&this.$transform(o,0,0,e,0,0),this}$skew(o,e=0){if(this.skewable){let t=fl(o),r=fl(e);this.$transform(1,Math.tan(r),Math.tan(t),1,0,0)}return this}$translate(o,e=o){return this.translatable&&be(o)&&be(e)&&this.$transform(1,0,0,1,o,e),this}$transform(o,e,t,r,n,s){return be(o)&&be(e)&&be(t)&&be(r)&&be(n)&&be(s)?this.$setTransform(ud(this.$matrix,[o,e,t,r,n,s])):this}$setTransform(o,e,t,r,n,s){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(o)&&([o,e,t,r,n,s]=o),be(o)&&be(e)&&be(t)&&be(r)&&be(n)&&be(s))){let d=[...this.$matrix],h=[o,e,t,r,n,s];if(this.$emit(ls,{matrix:h,oldMatrix:d})===!1)return this;this.$matrix=h,this.style.transform=`matrix(${h.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}};jn.$name=vi;jn.$version="2.1.1";var ig=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}",$p=new WeakMap,Pn=class extends nr{constructor(){super(...arguments),this.$onWindowResize=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$onSelectionChange=null,this.$style=ig,this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(o){$p.set(this,o)}get $canvas(){return $p.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(Jo));if(o){this.$canvas=o,this.style.position="absolute";let e=o.querySelector(this.$getTagNameOf(ho));e&&(this.$onWindowResize=this.$render.bind(this),this.$onCanvasActionStart=t=>{e.hidden&&t.detail.action===la&&(this.hidden=!1)},this.$onCanvasActionEnd=t=>{e.hidden&&t.detail.action===la&&(this.hidden=!0)},this.$onSelectionChange=t=>{let{x:r,y:n,width:s,height:d}=t.defaultPrevented?e:t.detail;this.$change(r,n,s,d),(e.hidden||r===0&&n===0&&s===0&&d===0)&&(this.hidden=!0)},gt(window,od,this.$onWindowResize),gt(o,ki,this.$onCanvasActionStart),gt(o,yi,this.$onCanvasActionEnd),gt(o,xi,this.$onSelectionChange))}this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onWindowResize&&(lt(window,od,this.$onWindowResize),this.$onWindowResize=null),this.$onCanvasActionStart&&(lt(o,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(o,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onSelectionChange&&(lt(o,xi,this.$onSelectionChange),this.$onSelectionChange=null)),super.disconnectedCallback()}$change(o,e,t=this.width,r=this.height){return!be(o)||!be(e)||!be(t)||!be(r)||o===this.x&&e===this.y&&t===this.width&&r===this.height?this:(this.hidden&&(this.hidden=!1),this.x=o,this.y=e,this.width=t,this.height=r,this.$render())}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:$o.innerWidth*$o.devicePixelRatio})}};Pn.$name=mp;Pn.$version="2.1.1";var ng=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}',On=class extends nr{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=ng,this.action=bi,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}};On.$name=pp;On.$version="2.1.1";var ag=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}',Sp=new WeakMap,Hn=class extends nr{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=ag,this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(o){Sp.set(this,o)}get $canvas(){return Sp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick(()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)});break;case"aspectRatio":case"initialAspectRatio":this.$nextTick(()=>{this.$initSelection()});break;case"initialCoverage":this.$nextTick(()=>{Qr(t)&&t<=1&&this.$initSelection(!0,!0)});break;case"keyboard":this.$nextTick(()=>{this.$canvas&&(t?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),gt(this.ownerDocument,rd,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(lt(this.ownerDocument,rd,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))});break;case"multiple":this.$nextTick(()=>{if(this.$canvas){let r=this.$getSelections();t?(r.forEach(n=>{n.active=!1}),this.active=!0,this.$emit(xi,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,r.slice(1).forEach(n=>{this.$removeSelection(n)}))}});break;case"precise":this.$nextTick(()=>{this.$change(this.x,this.y)});break;case"linked":t&&(this.dynamic=!0);break}}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(Jo));o?(this.$canvas=o,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),gt(o,ki,this.$onCanvasActionStart),gt(o,yi,this.$onCanvasActionEnd),gt(o,Ui,this.$onCanvasAction)):this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onCanvasActionStart&&(lt(o,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(o,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(lt(o,Ui,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let o=[];return this.parentElement&&(o=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(ho)))),o}$initSelection(o=!1,e=!1){let{initialCoverage:t,parentElement:r}=this;if(Qr(t)&&r){let n=this.aspectRatio||this.initialAspectRatio,s=(e?0:this.width)||r.offsetWidth*t,d=(e?0:this.height)||r.offsetHeight*t;Qr(n)&&({width:s,height:d}=va({aspectRatio:n,width:s,height:d})),this.$change(this.x,this.y,s,d),o&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){let o=this.cloneNode(!0);return this.hasAttribute("id")&&o.removeAttribute("id"),o.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(o,this.nextSibling),o}$removeSelection(o=this){if(this.parentElement){let e=this.$getSelections();if(e.length>1){let t=e.indexOf(o),r=e[t+1]||e[t-1];r&&(o.active=!1,this.parentElement.removeChild(o),r.active=!0,r.$emit(xi,{x:r.x,y:r.y,width:r.width,height:r.height}))}else this.$clear()}}$handleActionStart(o){var e,t;let r=(t=(e=o.detail)===null||e===void 0?void 0:e.relatedEvent)===null||t===void 0?void 0:t.target;this.$action="",this.$actionStartTarget=r,!this.hidden&&this.multiple&&!this.active&&r===this&&this.parentElement&&(this.$getSelections().forEach(n=>{n.active=!1}),this.active=!0,this.$emit(xi,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(o){let{currentTarget:e,detail:t}=o;if(!e||!t)return;let{relatedEvent:r}=t,{action:n}=t,s=r?xp(r):null;if(!n&&this.multiple&&(n=this.$action||s?.action,this.$action=n),!n||this.hidden&&n!==la||this.multiple&&!this.active&&n!==Wi)return;let{width:d,height:h}=this,p=t.endX-t.startX,f=t.endY-t.startY,{aspectRatio:x}=this;switch(!Qr(x)&&r.shiftKey&&(x=Qr(d)&&Qr(h)?d/h:1),n){case la:if(p!==0||f!==0){p===0?p=f:f===0&&(f=p);let{$canvas:k}=this,C=dd(e);(this.multiple&&!this.hidden?this.$createSelection():this).$change(t.startX-C.left,t.startY-C.top,Math.abs(p),Math.abs(f),x),p<0?f<0?n=ua:f>0&&(n=pa):p>0&&(f<0?n=da:f>0&&(n=ha)),k&&(k.$action=n)}break;case ml:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(p,f);break;case Wi:if(r&&this.zoomable&&(this.dynamic||this.contains(r.target))){let k=dd(e);this.$zoom(t.scale,r.pageX-k.left,r.pageY-k.top)}break;default:this.$resize(n,p,f,x)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(o){if(this.hidden||!this.keyboard||this.multiple&&!this.active||o.defaultPrevented)return;let{activeElement:e}=document;if(!(e&&(["INPUT","TEXTAREA"].includes(e.tagName)||["true","plaintext-only"].includes(e.contentEditable))))switch(o.key){case"Backspace":o.metaKey&&(o.preventDefault(),this.$removeSelection());break;case"Delete":o.preventDefault(),this.$removeSelection();break;case"ArrowLeft":o.preventDefault(),this.$move(-1,0);break;case"ArrowRight":o.preventDefault(),this.$move(1,0);break;case"ArrowUp":o.preventDefault(),this.$move(0,-1);break;case"ArrowDown":o.preventDefault(),this.$move(0,1);break;case"+":o.preventDefault(),this.$zoom(.1);break;case"-":o.preventDefault(),this.$zoom(-.1);break}}$center(){let{parentElement:o}=this;if(!o)return this;let e=(o.offsetWidth-this.width)/2,t=(o.offsetHeight-this.height)/2;return this.$change(e,t)}$move(o,e=o){return this.$moveTo(this.x+o,this.y+e)}$moveTo(o,e=o){return this.movable?this.$change(o,e):this}$resize(o,e=0,t=0,r=this.aspectRatio){if(!this.resizable)return this;let n=Qr(r),{$canvas:s}=this,{x:d,y:h,width:p,height:f}=this;switch(o){case Gc:h+=t,f-=t,f<0&&(o=Xc,f=-f,h-=f),n&&(e=t*r,d+=e/2,p-=e,p<0&&(p=-p,d-=p));break;case Yc:p+=e,p<0&&(o=Zc,p=-p,d-=p),n&&(t=e/r,h-=t/2,f+=t,f<0&&(f=-f,h-=f));break;case Xc:f+=t,f<0&&(o=Gc,f=-f,h-=f),n&&(e=t*r,d-=e/2,p+=e,p<0&&(p=-p,d-=p));break;case Zc:d+=e,p-=e,p<0&&(o=Yc,p=-p,d-=p),n&&(t=e/r,h+=t/2,f-=t,f<0&&(f=-f,h-=f));break;case da:n&&(t=-e/r),h+=t,f-=t,p+=e,p<0&&f<0?(o=pa,p=-p,f=-f,d-=p,h-=f):p<0?(o=ua,p=-p,d-=p):f<0&&(o=ha,f=-f,h-=f);break;case ua:n&&(t=e/r),d+=e,h+=t,p-=e,f-=t,p<0&&f<0?(o=ha,p=-p,f=-f,d-=p,h-=f):p<0?(o=da,p=-p,d-=p):f<0&&(o=pa,f=-f,h-=f);break;case ha:n&&(t=e/r),p+=e,f+=t,p<0&&f<0?(o=ua,p=-p,f=-f,d-=p,h-=f):p<0?(o=pa,p=-p,d-=p):f<0&&(o=da,f=-f,h-=f);break;case pa:n&&(t=-e/r),d+=e,p-=e,f+=t,p<0&&f<0?(o=da,p=-p,f=-f,d-=p,h-=f):p<0?(o=ha,p=-p,d-=p):f<0&&(o=ua,f=-f,h-=f);break}return s&&s.$setAction(o),this.$change(d,h,p,f)}$zoom(o,e,t){if(!this.zoomable||o===0)return this;o<0?o=1/(1-o):o+=1;let{width:r,height:n}=this,s=r*o,d=n*o,h=this.x,p=this.y;return be(e)&&be(t)?(h-=(s-r)*((e-this.x)/r),p-=(d-n)*((t-this.y)/n)):(h-=(s-r)/2,p-=(d-n)/2),this.$change(h,p,s,d)}$change(o,e,t=this.width,r=this.height,n=this.aspectRatio,s=!1){return this.$changing||!be(o)||!be(e)||!be(t)||!be(r)||t<0||r<0?this:(Qr(n)&&({width:t,height:r}=va({aspectRatio:n,width:t,height:r},"cover")),this.precise||(o=Math.round(o),e=Math.round(e),t=Math.round(t),r=Math.round(r)),o===this.x&&e===this.y&&t===this.width&&r===this.height&&Object.is(n,this.aspectRatio)&&!s?this:(this.hidden&&(this.hidden=!1),this.$emit(xi,{x:o,y:e,width:t,height:r})===!1?this:(this.$changing=!0,this.x=o,this.y=e,this.width=t,this.height=r,this.$changing=!1,this.$render())))}$reset(){let{x:o,y:e,width:t,height:r}=this.$initialSelection;return this.$change(o,e,t,r)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),{width:n,height:s}=this,d=1;if(ga(o)&&(Qr(o.width)||Qr(o.height))&&({width:n,height:s}=va({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.width),r.width=n,r.height=s,!this.$canvas){e(r);return}let h=this.$canvas.querySelector(this.$getTagNameOf(vi));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,k,C,$,z,T]=h.$getTransform(),j=-this.x,H=-this.y,I=(j*$-C*H)/(x*$-C*k),B=(H*x-k*j)/(x*$-C*k),S=x*I+C*B+z,Q=k*I+$*B+T,ye=p.naturalWidth,De=p.naturalHeight;d!==1&&(S*=d,Q*=d,ye*=d,De*=d);let yt=ye/2,Ee=De/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),ga(o)&&fa(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(yt,Ee),f.transform(x,k,C,$,S,Q),f.translate(-yt,-Ee),f.drawImage(p,0,0,ye,De),f.restore()}e(r)}).catch(t)})}};Hn.$name=ho;Hn.$version="2.1.1";var sg=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}",Rn=class extends nr{constructor(){super(...arguments),this.$style=sg,this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(o,e,t){Object.is(t,e)||(super.$propertyChangedCallback(o,e,t),(o==="rows"||o==="columns")&&this.$nextTick(()=>{this.$render()}))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){let o=this.$getShadowRoot(),e=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){let r=document.createElement("span");r.setAttribute("role","row");for(let n=0;n<this.columns;n+=1){let s=document.createElement("span");s.setAttribute("role","gridcell"),r.appendChild(s)}e.appendChild(r)}o&&(o.innerHTML="",o.appendChild(e))}};Rn.$name=hp;Rn.$version="2.1.1";var lg=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}',In=class extends nr{constructor(){super(...arguments),this.$style=lg,this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}};In.$name=up;In.$version="2.1.1";var cg=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}",Tp=new WeakMap,Ap=new WeakMap,jp=new WeakMap,Pp=new WeakMap,dg="both",ug="horizontal",Op="vertical",hg="none",Vn=class extends nr{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=cg,this.resize=Op,this.selection="",this.slottable=!1}set $image(o){Ap.set(this,o)}get $image(){return Ap.get(this)}set $sourceImage(o){Pp.set(this,o)}get $sourceImage(){return Pp.get(this)}set $canvas(o){Tp.set(this,o)}get $canvas(){return Tp.get(this)}set $selection(o){jp.set(this,o)}get $selection(){return jp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){var o,e;super.connectedCallback();let t=null;if(this.selection?t=(e=(o=gl(this))===null||o===void 0?void 0:o.querySelector(this.selection))!==null&&e!==void 0?e:null:t=this.closest(this.$getTagNameOf(ho)),Gi(t)){this.$selection=t,this.$onSelectionChange=this.$handleSelectionChange.bind(this),gt(t,xi,this.$onSelectionChange);let r=t.closest(this.$getTagNameOf(Jo));if(r){this.$canvas=r;let n=r.querySelector(this.$getTagNameOf(vi));n&&(this.$sourceImage=n,this.$image=n.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),gt(n.$image,pn,this.$onSourceImageLoad),gt(n,ls,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){let{$selection:o,$sourceImage:e}=this;o&&this.$onSelectionChange&&(lt(o,xi,this.$onSelectionChange),this.$onSelectionChange=null),e&&this.$onSourceImageLoad&&(lt(e.$image,pn,this.$onSourceImageLoad),this.$onSourceImageLoad=null),e&&this.$onSourceImageTransform&&(lt(e,ls,this.$onSourceImageTransform),this.$onSourceImageTransform=null),super.disconnectedCallback()}$handleSelectionChange(o){this.$render(o.defaultPrevented?this.$selection:o.detail)}$handleSourceImageLoad(){let{$image:o,$sourceImage:e}=this,t=o.getAttribute("src"),r=e.getAttribute("src");r&&r!==t&&(o.setAttribute("src",r),o.$ready(()=>{this.$render()}))}$handleSourceImageTransform(o){this.$render(void 0,o.detail.matrix)}$render(o,e){let{$canvas:t,$selection:r}=this;!o&&!r.hidden&&(o=r),(!o||o.x===0&&o.y===0&&o.width===0&&o.height===0)&&(o={x:0,y:0,width:t.offsetWidth,height:t.offsetHeight});let{x:n,y:s,width:d,height:h}=o,p={},{clientWidth:f,clientHeight:x}=this,k=f,C=x,$=NaN;switch(this.resize){case dg:$=1,k=d,C=h,p.width=d,p.height=h;break;case ug:$=h>0?x/h:0,k=d*$,p.width=k;break;case Op:$=d>0?f/d:0,C=h*$,p.height=C;break;case hg:default:f>0?$=d>0?f/d:0:x>0&&($=h>0?x/h:0)}this.$scale=$,this.$setStyles(p),this.$sourceImage&&setTimeout(()=>{this.$transformImageByOffset(e??this.$sourceImage.$getTransform(),-n,-s)})}$transformImageByOffset(o,e,t){let{$image:r,$scale:n,$sourceImage:s}=this;if(s&&r&&n>=0){let[d,h,p,f,x,k]=o,C=(e*f-p*t)/(d*f-p*h),$=(t*d-h*e)/(d*f-p*h),z=d*C+p*$+x,T=h*C+f*$+k;s.$ready(j=>{this.$setStyles.call(r,{width:j.naturalWidth*n,height:j.naturalHeight*n})}),r.$setTransform(d,h,p,f,z*n,T*n)}}};Vn.$name=gp;Vn.$version="2.1.1";var pg='<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action="select" plain></cropper-handle><cropper-selection initial-coverage="0.5" movable resizable><cropper-grid role="grid" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle><cropper-handle action="n-resize"></cropper-handle><cropper-handle action="e-resize"></cropper-handle><cropper-handle action="s-resize"></cropper-handle><cropper-handle action="w-resize"></cropper-handle><cropper-handle action="ne-resize"></cropper-handle><cropper-handle action="nw-resize"></cropper-handle><cropper-handle action="se-resize"></cropper-handle><cropper-handle action="sw-resize"></cropper-handle></cropper-selection></cropper-canvas>',mg=/^img|canvas$/,gg=/<(\/?(?:script|style)[^>]*)>/gi,Hp={template:pg};An.$define();In.$define();Rn.$define();On.$define();jn.$define();Hn.$define();Pn.$define();Vn.$define();var cs=class{constructor(o,e){var t;if(this.options=Hp,ma(o)&&(o=document.querySelector(o)),!Gi(o)||!mg.test(o.localName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=o,e=Object.assign(Object.assign({},Hp),e),this.options=e;let{container:r}=e;if(r&&(ma(r)&&(r=(t=gl(o))===null||t===void 0?void 0:t.querySelector(r)),!Gi(r)))throw new Error("The `container` option must be an element or a valid selector.");Gi(r)||(o.parentElement?r=o.parentElement:r=o.ownerDocument.body),this.container=r;let n=o.localName,s="";n==="img"?{src:s}=o:n==="canvas"&&window.HTMLCanvasElement&&(s=o.toDataURL());let{template:d}=e;if(d&&ma(d)){let h=document.createElement("template"),p=document.createDocumentFragment();h.innerHTML=d.replace(gg,"&lt;$1&gt;"),p.appendChild(h.content),Array.from(p.querySelectorAll(vi)).forEach(f=>{f.setAttribute("src",s),f.setAttribute("alt",o.alt||"The image to crop"),n==="img"&&["crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","srcset"].forEach(x=>{o.hasAttribute(x)&&f.setAttribute(x,o.getAttribute(x)||"")})}),o.parentElement?(o.style.display="none",r.insertBefore(p,o.nextSibling)):r.appendChild(p)}}getCropperCanvas(){return this.container.querySelector(Jo)}getCropperImage(){return this.container.querySelector(vi)}getCropperSelection(){return this.container.querySelector(ho)}getCropperSelections(){return this.container.querySelectorAll(ho)}destroy(){var o;let e=this.getCropperCanvas();e&&((o=e.parentElement)===null||o===void 0||o.removeChild(e)),this.element&&(this.element.style.display="")}};cs.version="2.1.1";function fg(i){if(typeof i=="number")return Number.isFinite(i)&&i>0?i:null;let o=String(i??"").trim();if(!o||o==="free")return null;if(o.includes("/")){let[t,r]=o.split("/").map(n=>Number(n.trim()));return Number.isFinite(t)&&Number.isFinite(r)&&t>0&&r>0?t/r:null}let e=Number(o);return Number.isFinite(e)&&e>0?e:null}function vg(i,o,e){return new Promise(t=>i.toBlob(t,o,e))}var wt=class extends Pr.LitElement{constructor(){super(...arguments);this.src="";this.alt="";this.aspectRatio="1";this.mimeType="image/png";this.quality=.92;this.height=420;this.crossOrigin="anonymous";this.disabled=!1;this.showResult=!0;this._loaded=!1;this._errored=!1;this._result="";this._onSelectionChange=e=>{let t=e.detail;this._selection={x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),aspectRatio:this._ratio},this.dispatchEvent(new CustomEvent("change",{detail:this._selection,bubbles:!0,composed:!0}))};this._onLoad=()=>{this._loaded=!0,this._errored=!1,this._setupCropper(),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{this._loaded=!1,this._errored=!0,this._destroyCropper(),this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))}}disconnectedCallback(){this._destroyCropper(),super.disconnectedCallback()}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._result="",this._selection=void 0,this._destroyCropper()),e.has("height")&&this.style.setProperty("--lui-image-cropper-height",`${this.height}px`),(e.has("aspectRatio")||e.has("src"))&&this._loaded&&this._setupCropper()}reset(){this._selectionEl?.$reset(),this._cropper?.getCropperImage()?.$resetTransform(),this._emitSelectionChange()}clear(){this._selectionEl?.$clear(),this._result="",this._selection=void 0}zoomIn(){this._cropper?.getCropperImage()?.$zoom(.1)}zoomOut(){this._cropper?.getCropperImage()?.$zoom(-.1)}rotateLeft(){this._cropper?.getCropperImage()?.$rotate("-90deg")}rotateRight(){this._cropper?.getCropperImage()?.$rotate("90deg")}async crop(){let e=this._cropper?.getCropperSelection();if(!e||e.hidden||!e.width||!e.height)return null;let t=await e.$toCanvas({width:this.outputWidth,height:this.outputHeight}),r=this.mimeType||"image/png",n=Math.max(0,Math.min(1,this.quality)),s=t.toDataURL(r,n),d=await vg(t,r,n),h={...this._readSelection(e),dataUrl:s,blob:d,canvas:t};return this._result=s,this._selection=h,this.dispatchEvent(new CustomEvent("crop",{detail:h,bubbles:!0,composed:!0})),h}get _ratio(){return fg(this.aspectRatio)}_template(){let e=this._ratio;return`
8311
+ `],a([(0,Be.property)()],Ie.prototype,"src",2),a([(0,Be.property)({attribute:"preview-src"})],Ie.prototype,"previewSrc",2),a([(0,Be.property)()],Ie.prototype,"alt",2),a([(0,Be.property)({attribute:"fallback-src"})],Ie.prototype,"fallbackSrc",2),a([(0,Be.property)()],Ie.prototype,"fallback",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"fit",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"radius",2),a([(0,Be.property)()],Ie.prototype,"width",2),a([(0,Be.property)()],Ie.prototype,"height",2),a([(0,Be.property)({attribute:"aspect-ratio"})],Ie.prototype,"aspectRatio",2),a([(0,Be.property)()],Ie.prototype,"position",2),a([(0,Be.property)({reflect:!0})],Ie.prototype,"loading",2),a([(0,Be.property)({type:Boolean,reflect:!0})],Ie.prototype,"skeleton",2),a([(0,Be.property)({type:Boolean,reflect:!0})],Ie.prototype,"preview",2),a([(0,Be.property)({type:Boolean,attribute:"show-preview-icon"})],Ie.prototype,"showPreviewIcon",2),a([(0,Be.property)({type:Boolean})],Ie.prototype,"draggablePreview",2),a([(0,Be.state)()],Ie.prototype,"_loaded",2),a([(0,Be.state)()],Ie.prototype,"_errored",2),a([(0,Be.state)()],Ie.prototype,"_previewOpen",2),a([(0,Be.state)()],Ie.prototype,"_zoom",2),a([(0,Be.state)()],Ie.prototype,"_rotate",2),a([(0,Be.state)()],Ie.prototype,"_panning",2),a([(0,Be.query)(".preview-image")],Ie.prototype,"_previewImageEl",2),a([(0,Be.query)(".preview-panzoom")],Ie.prototype,"_previewPanzoomEl",2),a([(0,Be.query)(".preview-stage")],Ie.prototype,"_previewStageEl",2),Ie=a([(0,Be.customElement)("lui-image")],Ie);var Or=require("lit"),Dt=require("lit/decorators.js");var as=typeof window<"u"&&typeof window.document<"u",So=as?window:{},Wc=as?"ontouchstart"in So.document.documentElement:!1,Uc=as?"PointerEvent"in So:!1,hn="cropper",Jo=`${hn}-canvas`,up=`${hn}-crosshair`,hp=`${hn}-grid`,pp=`${hn}-handle`,vi=`${hn}-image`,ho=`${hn}-selection`,mp=`${hn}-shade`,gp=`${hn}-viewer`,la="select",ml="move",Wi="scale",ss="rotate",ca="transform",bi="none",Gc="n-resize",Yc="e-resize",Xc="s-resize",Zc="w-resize",da="ne-resize",ua="nw-resize",ha="se-resize",pa="sw-resize",fp="action",Km=Wc?"touchend touchcancel":"mouseup",Wm=Wc?"touchmove":"mousemove",Um=Wc?"touchstart":"mousedown",Qc=Uc?"pointerdown":Um,Jc=Uc?"pointermove":Wm,ed=Uc?"pointerup pointercancel":Km,td="error",rd="keydown",pn="load",od="resize",id="wheel",Ui="action",yi="actionend",vp="actionmove",ki="actionstart",xi="change",ls="transform";function ma(i){return typeof i=="string"}var nd=Number.isNaN||So.isNaN;function be(i){return typeof i=="number"&&!nd(i)}function Qr(i){return be(i)&&i>0&&i<1/0}function bp(i){return typeof i>"u"}function ad(i){return typeof i=="object"&&i!==null}var{hasOwnProperty:Gm}=Object.prototype;function ga(i){if(!ad(i))return!1;try{let{constructor:o}=i,{prototype:e}=o;return o&&e&&Gm.call(e,"isPrototypeOf")}catch{return!1}}function fa(i){return typeof i=="function"}function Gi(i){return typeof i=="object"&&i!==null&&i.nodeType===1}var Ym=/([a-z\d])([A-Z])/g;function sd(i){return String(i).replace(Ym,"$1-$2").toLowerCase()}var Xm=/-[A-z\d]/g;function ld(i){return i.replace(Xm,o=>o.slice(1).toUpperCase())}var yp=/\s\s*/;function lt(i,o,e,t){o.trim().split(yp).forEach(r=>{i.removeEventListener(r,e,t)})}function gt(i,o,e,t){o.trim().split(yp).forEach(r=>{i.addEventListener(r,e,t)})}function cd(i,o,e,t){gt(i,o,e,Object.assign(Object.assign({},t),{once:!0}))}var Zm={bubbles:!0,cancelable:!0,composed:!0};function kp(i,o,e,t){return i.dispatchEvent(new CustomEvent(o,Object.assign(Object.assign(Object.assign({},Zm),{detail:e}),t)))}function xp(i){return typeof i.composedPath=="function"&&i.composedPath().find(Gi)||i.target}var cp=Promise.resolve();function wp(i,o){return o?cp.then(i?o.bind(i):o):cp}function gl(i){let o=i.getRootNode();switch(o.nodeType){case 1:return o.ownerDocument;case 9:return o;case 11:return o}return null}function dd(i){let{documentElement:o}=i.ownerDocument,e=i.getBoundingClientRect();return{left:e.left+(So.pageXOffset-o.clientLeft),top:e.top+(So.pageYOffset-o.clientTop)}}var Qm=/deg|g?rad|turn$/i;function fl(i){let o=parseFloat(i)||0;if(o!==0){let[e="rad"]=String(i).match(Qm)||[];switch(e.toLowerCase()){case"deg":return o/360*(Math.PI*2);case"grad":return o/400*(Math.PI*2);case"turn":return o*(Math.PI*2)}}return o}var dp="contain",Jm="cover";function va(i,o=dp){let{aspectRatio:e}=i,{width:t,height:r}=i,n=Qr(t),s=Qr(r);if(n&&s){let d=r*e;o===dp&&d>t||o===Jm&&d<t?r=t/e:t=r*e}else n?r=t/e:s&&(t=r*e);return{width:t,height:r}}function ud(i,...o){if(o.length===0)return i;let[e,t,r,n,s,d]=i,[h,p,f,x,k,C]=o[0];return i=[e*h+r*p,t*h+n*p,e*f+r*x,t*f+n*x,e*k+r*C+s,t*k+n*C+d],ud(i,...o.slice(1))}var eg=":host([hidden]){display:none!important}",tg=/left|top|width|height/i,_p="open",vl=new WeakMap,bl=new WeakMap,Mp=new Map,Cp=So.document&&Array.isArray(So.document.adoptedStyleSheets)&&"replaceSync"in So.CSSStyleSheet.prototype,nr=class extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${eg}`}constructor(){var o,e;super(),this.shadowRootMode=_p,this.slottable=!0;let t=(e=(o=Object.getPrototypeOf(this))===null||o===void 0?void 0:o.constructor)===null||e===void 0?void 0:e.$name;t&&Mp.set(t,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(o,e,t){if(Object.is(t,e))return;let r=ld(o),n=this[r],s=t;switch(typeof n){case"boolean":s=t!==null&&t!=="false";break;case"number":s=Number(t);break}switch(this[r]=s,o){case"theme-color":{let d=bl.get(this),h=this.$sharedStyle;d&&h&&(Cp?d.replaceSync(h):d.textContent=h);break}}}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(o=sd(o),typeof t){case"boolean":t===!0?this.hasAttribute(o)||this.setAttribute(o,""):this.removeAttribute(o);break;case"number":nd(t)?t="":t=String(t);default:t?this.getAttribute(o)!==t&&this.setAttribute(o,t):this.removeAttribute(o)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach(e=>{let t=ld(e),r=this[t];bp(r)||this.$propertyChangedCallback(t,void 0,r),Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get(){return r},set(n){let s=r;r=n,this.$propertyChangedCallback(t,s,n)}})});let o=this.shadowRoot||this.attachShadow({mode:this.shadowRootMode||_p});if(vl.set(this,o),bl.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){let e=document.createElement("template");e.innerHTML=this.$template,o.appendChild(e.content)}if(this.slottable){let e=document.createElement("slot");o.appendChild(e)}}disconnectedCallback(){bl.has(this)&&bl.delete(this),vl.has(this)&&vl.delete(this)}$getTagNameOf(o){var e;return(e=Mp.get(o))!==null&&e!==void 0?e:o}$setStyles(o){return Object.keys(o).forEach(e=>{let t=o[e];be(t)&&(t!==0&&tg.test(e)?t=`${t}px`:t=String(t)),this.style[e]=t}),this}$getShadowRoot(){return this.shadowRoot||vl.get(this)}$addStyles(o){let e,t=this.$getShadowRoot();return Cp?(e=new CSSStyleSheet,e.replaceSync(o),t.adoptedStyleSheets=t.adoptedStyleSheets.concat(e)):(e=document.createElement("style"),e.textContent=o,t.appendChild(e)),e}$emit(o,e,t){return kp(this,o,e,t)}$nextTick(o){return wp(this,o)}static $define(o,e){ad(o)&&(e=o,o=""),o||(o=this.$name||this.name),o=sd(o),as&&So.customElements&&!So.customElements.get(o)&&customElements.define(o,this,e)}};nr.$version="2.1.1";var rg=':host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}',An=class extends nr{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=rg,this.$action=bi,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.disabled||this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"disabled":t?this.$unbind():this.$bind();break}}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),gt(this,Qc,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),gt(this.ownerDocument,Jc,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),gt(this.ownerDocument,ed,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),gt(this,id,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(lt(this,Qc,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(lt(this.ownerDocument,Jc,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(lt(this.ownerDocument,ed,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(lt(this,id,this.$onWheel,{capture:!0}),this.$onWheel=null)}$handlePointerDown(o){let{buttons:e,button:t,type:r}=o;if(this.disabled||(r==="pointerdown"&&o.pointerType==="mouse"||r==="mousedown")&&(be(e)&&e!==1||be(t)&&t!==0||o.ctrlKey))return;let{$pointers:n}=this,s="";if(o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:d,pageX:h,pageY:p})=>{n.set(d,{startX:h,startY:p,endX:h,endY:p})});else{let{pointerId:d=0,pageX:h,pageY:p}=o;n.set(d,{startX:h,startY:p,endX:h,endY:p})}n.size>1?s=ca:Gi(o.target)&&(s=o.target.action||o.target.getAttribute(fp)||""),this.$emit(ki,{action:s,relatedEvent:o})!==!1&&(o.preventDefault(),this.$action=s,this.style.willChange="transform")}$handlePointerMove(o){let{$action:e,$pointers:t}=this;if(this.disabled||e===bi||t.size===0||this.$emit(vp,{action:e,relatedEvent:o})===!1)return;if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:n,pageX:s,pageY:d})=>{let h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})});else{let{pointerId:n=0,pageX:s,pageY:d}=o,h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})}let r={action:e,relatedEvent:o};if(e===ca){let n=new Map(t),s=0,d=0,h=0,p=0,f=o.pageX,x=o.pageY;t.forEach(($,z)=>{n.delete(z),n.forEach(T=>{let j=T.startX-$.startX,H=T.startY-$.startY,I=T.endX-$.endX,B=T.endY-$.endY,S=0,Q=0,ye=0,De=0;if(j===0?H<0?ye=Math.PI*2:H>0&&(ye=Math.PI):j>0?ye=Math.PI/2+Math.atan(H/j):j<0&&(ye=Math.PI*1.5+Math.atan(H/j)),I===0?B<0?De=Math.PI*2:B>0&&(De=Math.PI):I>0?De=Math.PI/2+Math.atan(B/I):I<0&&(De=Math.PI*1.5+Math.atan(B/I)),De>0||ye>0){let yt=De-ye,Ee=Math.abs(yt);Ee>s&&(s=Ee,h=yt,f=($.startX+T.startX)/2,x=($.startY+T.startY)/2)}if(j=Math.abs(j),H=Math.abs(H),I=Math.abs(I),B=Math.abs(B),j>0&&H>0?S=Math.sqrt(j*j+H*H):j>0?S=j:H>0&&(S=H),I>0&&B>0?Q=Math.sqrt(I*I+B*B):I>0?Q=I:B>0&&(Q=B),S>0&&Q>0){let yt=(Q-S)/S,Ee=Math.abs(yt);Ee>d&&(d=Ee,p=yt,f=($.startX+T.startX)/2,x=($.startY+T.startY)/2)}})});let k=s>0,C=d>0;k&&C?(r.rotate=h,r.scale=p,r.centerX=f,r.centerY=x):k?(r.action=ss,r.rotate=h,r.centerX=f,r.centerY=x):C?(r.action=Wi,r.scale=p,r.centerX=f,r.centerY=x):r.action=bi}else{let[n]=Array.from(t.values());Object.assign(r,n)}t.forEach(n=>{n.startX=n.endX,n.startY=n.endY}),r.action!==bi&&this.$emit(Ui,r,{cancelable:!1})}$handlePointerUp(o){let{$action:e,$pointers:t}=this;if(!(this.disabled||e===bi)&&this.$emit(yi,{action:e,relatedEvent:o})!==!1){if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:r})=>{t.delete(r)});else{let{pointerId:r=0}=o;t.delete(r)}t.size===0&&(this.style.willChange="",this.$action=bi)}}$handleWheel(o){if(this.disabled||(o.preventDefault(),this.$wheeling))return;this.$wheeling=!0,setTimeout(()=>{this.$wheeling=!1},50);let t=(o.deltaY>0?-1:1)*this.scaleStep;this.$emit(Ui,{action:Wi,scale:t,relatedEvent:o},{cancelable:!1})}$setAction(o){return ma(o)&&(this.$action=o),this}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),n=this.offsetWidth,s=this.offsetHeight,d=1;ga(o)&&(Qr(o.width)||Qr(o.height))&&({width:n,height:s}=va({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.offsetWidth),r.width=n,r.height=s;let h=this.querySelector(this.$getTagNameOf(vi));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,k,C,$,z,T]=h.$getTransform(),j=z,H=T,I=p.naturalWidth,B=p.naturalHeight;d!==1&&(j*=d,H*=d,I*=d,B*=d);let S=I/2,Q=B/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),ga(o)&&fa(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(S,Q),f.transform(x,k,C,$,j,H),f.translate(-S,-Q),f.drawImage(p,0,0,I,B),f.restore()}e(r)}).catch(t)})}};An.$name=Jo;An.$version="2.1.1";var og=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}",zp=new WeakMap,Ep=["alt","crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","src","srcset"],jn=class extends nr{constructor(){super(...arguments),this.$isReady=!1,this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=og,this.$image=new Image,this.initialCenterSize="contain",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1,this.alt="",this.crossorigin="",this.decoding="",this.elementtiming="",this.fetchpriority="",this.loading="",this.referrerpolicy="",this.sizes="",this.src="",this.srcset=""}set $canvas(o){zp.set(this,o)}get $canvas(){return zp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Ep,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(o,e,t){Object.is(t,e)||(super.attributeChangedCallback(o,e,t),Ep.includes(o)&&this.$image.setAttribute(o,t))}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"initialCenterSize":this.$nextTick(()=>{this.$center(t)});break;case"src":this.$isReady=!1;break}}connectedCallback(){super.connectedCallback();let{$image:o}=this,e=this.closest(this.$getTagNameOf(Jo));e&&(this.$canvas=e,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=t=>{var r,n;this.$actionStartTarget=(n=(r=t.detail)===null||r===void 0?void 0:r.relatedEvent)===null||n===void 0?void 0:n.target},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),gt(e,ki,this.$onCanvasActionStart),gt(e,yi,this.$onCanvasActionEnd),gt(e,Ui,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),gt(o,pn,this.$onLoad),this.$getShadowRoot().appendChild(o)}disconnectedCallback(){let{$image:o,$canvas:e}=this;e&&(this.$onCanvasActionStart&&(lt(e,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(e,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(lt(e,Ui,this.$onCanvasAction),this.$onCanvasAction=null)),o&&this.$onLoad&&(lt(o,pn,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(o),super.disconnectedCallback()}$handleLoad(){let{$image:o}=this;this.$setStyles({width:o.naturalWidth,height:o.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize),this.$isReady=!0}$handleAction(o){if(this.hidden||!(this.rotatable||this.scalable||this.translatable))return;let{$canvas:e}=this,{detail:t}=o;if(t){let{relatedEvent:r}=t,{action:n}=t;switch(n===ca&&(!this.rotatable||!this.scalable)&&(this.rotatable?n=ss:this.scalable?n=Wi:n=bi),n){case ml:if(this.translatable){let s=null;r&&(s=r.target.closest(this.$getTagNameOf(ho))),s||(s=e.querySelector(this.$getTagNameOf(ho))),s&&s.multiple&&!s.active&&(s=e.querySelector(`${this.$getTagNameOf(ho)}[active]`)),(!s||s.hidden||!s.movable||s.dynamic||!(this.$actionStartTarget&&s.contains(this.$actionStartTarget)))&&this.$move(t.endX-t.startX,t.endY-t.startY)}break;case ss:if(this.rotatable)if(r){let{x:s,y:d}=this.getBoundingClientRect();this.$rotate(t.rotate,r.clientX-s,r.clientY-d)}else this.$rotate(t.rotate);break;case Wi:if(this.scalable)if(r){let s=r.target.closest(this.$getTagNameOf(ho));if(!s||!s.zoomable||s.zoomable&&s.dynamic){let{x:d,y:h}=this.getBoundingClientRect();this.$zoom(t.scale,r.clientX-d,r.clientY-h)}}else this.$zoom(t.scale);break;case ca:if(this.rotatable&&this.scalable){let{rotate:s}=t,{scale:d}=t;d<0?d=1/(1-d):d+=1;let h=Math.cos(s),p=Math.sin(s),[f,x,k,C]=[h*d,p*d,-p*d,h*d];if(r){let $=this.getBoundingClientRect(),z=r.clientX-$.x,T=r.clientY-$.y,[j,H,I,B]=this.$matrix,S=$.width/2,Q=$.height/2,ye=z-S,De=T-Q,yt=(ye*B-I*De)/(j*B-I*H),Ee=(De*j-H*ye)/(j*B-I*H);this.$transform(f,x,k,C,yt*(1-f)+Ee*k,Ee*(1-C)+yt*x)}else this.$transform(f,x,k,C,0,0)}break}}}$ready(o){let{$image:e}=this,t=new Promise((r,n)=>{let s=new Error("Failed to load the image source");if(e.complete)e.naturalWidth>0&&e.naturalHeight>0?r(e):n(s);else{let d=()=>{lt(e,td,h),setTimeout(()=>{r(e)})},h=()=>{lt(e,pn,d),n(s)};cd(e,pn,d),cd(e,td,h)}});return fa(o)&&t.then(r=>(o(r),r)),t}$center(o){let{parentElement:e}=this;if(!e)return this;let t=e.getBoundingClientRect(),r=t.width,n=t.height,{x:s,y:d,width:h,height:p}=this.getBoundingClientRect(),f=s+h/2,x=d+p/2,k=t.x+r/2,C=t.y+n/2,{translatable:$}=this;if(!$&&!this.$isReady&&(this.translatable=!0,this.$nextTick(()=>{this.translatable=$})),this.$move(k-f,C-x),o&&(h!==r||p!==n)){let z=r/h,T=n/p,{scalable:j}=this;switch(o&&!j&&!this.$isReady&&(this.scalable=!0,this.$nextTick(()=>{this.scalable=j})),o){case"cover":this.$scale(Math.max(z,T));break;case"contain":this.$scale(Math.min(z,T));break}}return this}$move(o,e=o){if(this.translatable&&be(o)&&be(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$translate(d,h)}return this}$moveTo(o,e=o){if(this.translatable&&be(o)&&be(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$setTransform(t,r,n,s,d,h)}return this}$rotate(o,e,t){if(this.rotatable){let r=fl(o),n=Math.cos(r),s=Math.sin(r),[d,h,p,f]=[n,s,-s,n];if(be(e)&&be(t)){let[x,k,C,$]=this.$matrix,{width:z,height:T}=this.getBoundingClientRect(),j=z/2,H=T/2,I=e-j,B=t-H,S=(I*$-C*B)/(x*$-C*k),Q=(B*x-k*I)/(x*$-C*k);this.$transform(d,h,p,f,S*(1-d)-Q*p,Q*(1-f)-S*h)}else this.$transform(d,h,p,f,0,0)}return this}$zoom(o,e,t){if(!this.scalable||o===0)return this;if(o<0?o=1/(1-o):o+=1,be(e)&&be(t)){let[r,n,s,d]=this.$matrix,{width:h,height:p}=this.getBoundingClientRect(),f=h/2,x=p/2,k=e-f,C=t-x,$=(k*d-s*C)/(r*d-s*n),z=(C*r-n*k)/(r*d-s*n);this.$transform(o,0,0,o,$*(1-o),z*(1-o))}else this.$scale(o);return this}$scale(o,e=o){return this.scalable&&this.$transform(o,0,0,e,0,0),this}$skew(o,e=0){if(this.skewable){let t=fl(o),r=fl(e);this.$transform(1,Math.tan(r),Math.tan(t),1,0,0)}return this}$translate(o,e=o){return this.translatable&&be(o)&&be(e)&&this.$transform(1,0,0,1,o,e),this}$transform(o,e,t,r,n,s){return be(o)&&be(e)&&be(t)&&be(r)&&be(n)&&be(s)?this.$setTransform(ud(this.$matrix,[o,e,t,r,n,s])):this}$setTransform(o,e,t,r,n,s){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(o)&&([o,e,t,r,n,s]=o),be(o)&&be(e)&&be(t)&&be(r)&&be(n)&&be(s))){let d=[...this.$matrix],h=[o,e,t,r,n,s];if(this.$emit(ls,{matrix:h,oldMatrix:d})===!1)return this;this.$matrix=h,this.style.transform=`matrix(${h.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}};jn.$name=vi;jn.$version="2.1.1";var ig=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}",$p=new WeakMap,Pn=class extends nr{constructor(){super(...arguments),this.$onWindowResize=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$onSelectionChange=null,this.$style=ig,this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(o){$p.set(this,o)}get $canvas(){return $p.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(Jo));if(o){this.$canvas=o,this.style.position="absolute";let e=o.querySelector(this.$getTagNameOf(ho));e&&(this.$onWindowResize=this.$render.bind(this),this.$onCanvasActionStart=t=>{e.hidden&&t.detail.action===la&&(this.hidden=!1)},this.$onCanvasActionEnd=t=>{e.hidden&&t.detail.action===la&&(this.hidden=!0)},this.$onSelectionChange=t=>{let{x:r,y:n,width:s,height:d}=t.defaultPrevented?e:t.detail;this.$change(r,n,s,d),(e.hidden||r===0&&n===0&&s===0&&d===0)&&(this.hidden=!0)},gt(window,od,this.$onWindowResize),gt(o,ki,this.$onCanvasActionStart),gt(o,yi,this.$onCanvasActionEnd),gt(o,xi,this.$onSelectionChange))}this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onWindowResize&&(lt(window,od,this.$onWindowResize),this.$onWindowResize=null),this.$onCanvasActionStart&&(lt(o,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(o,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onSelectionChange&&(lt(o,xi,this.$onSelectionChange),this.$onSelectionChange=null)),super.disconnectedCallback()}$change(o,e,t=this.width,r=this.height){return!be(o)||!be(e)||!be(t)||!be(r)||o===this.x&&e===this.y&&t===this.width&&r===this.height?this:(this.hidden&&(this.hidden=!1),this.x=o,this.y=e,this.width=t,this.height=r,this.$render())}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:So.innerWidth*So.devicePixelRatio})}};Pn.$name=mp;Pn.$version="2.1.1";var ng=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}',On=class extends nr{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=ng,this.action=bi,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}};On.$name=pp;On.$version="2.1.1";var ag=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}',Sp=new WeakMap,Hn=class extends nr{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=ag,this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(o){Sp.set(this,o)}get $canvas(){return Sp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick(()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)});break;case"aspectRatio":case"initialAspectRatio":this.$nextTick(()=>{this.$initSelection()});break;case"initialCoverage":this.$nextTick(()=>{Qr(t)&&t<=1&&this.$initSelection(!0,!0)});break;case"keyboard":this.$nextTick(()=>{this.$canvas&&(t?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),gt(this.ownerDocument,rd,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(lt(this.ownerDocument,rd,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))});break;case"multiple":this.$nextTick(()=>{if(this.$canvas){let r=this.$getSelections();t?(r.forEach(n=>{n.active=!1}),this.active=!0,this.$emit(xi,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,r.slice(1).forEach(n=>{this.$removeSelection(n)}))}});break;case"precise":this.$nextTick(()=>{this.$change(this.x,this.y)});break;case"linked":t&&(this.dynamic=!0);break}}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(Jo));o?(this.$canvas=o,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),gt(o,ki,this.$onCanvasActionStart),gt(o,yi,this.$onCanvasActionEnd),gt(o,Ui,this.$onCanvasAction)):this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onCanvasActionStart&&(lt(o,ki,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(lt(o,yi,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(lt(o,Ui,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let o=[];return this.parentElement&&(o=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(ho)))),o}$initSelection(o=!1,e=!1){let{initialCoverage:t,parentElement:r}=this;if(Qr(t)&&r){let n=this.aspectRatio||this.initialAspectRatio,s=(e?0:this.width)||r.offsetWidth*t,d=(e?0:this.height)||r.offsetHeight*t;Qr(n)&&({width:s,height:d}=va({aspectRatio:n,width:s,height:d})),this.$change(this.x,this.y,s,d),o&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){let o=this.cloneNode(!0);return this.hasAttribute("id")&&o.removeAttribute("id"),o.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(o,this.nextSibling),o}$removeSelection(o=this){if(this.parentElement){let e=this.$getSelections();if(e.length>1){let t=e.indexOf(o),r=e[t+1]||e[t-1];r&&(o.active=!1,this.parentElement.removeChild(o),r.active=!0,r.$emit(xi,{x:r.x,y:r.y,width:r.width,height:r.height}))}else this.$clear()}}$handleActionStart(o){var e,t;let r=(t=(e=o.detail)===null||e===void 0?void 0:e.relatedEvent)===null||t===void 0?void 0:t.target;this.$action="",this.$actionStartTarget=r,!this.hidden&&this.multiple&&!this.active&&r===this&&this.parentElement&&(this.$getSelections().forEach(n=>{n.active=!1}),this.active=!0,this.$emit(xi,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(o){let{currentTarget:e,detail:t}=o;if(!e||!t)return;let{relatedEvent:r}=t,{action:n}=t,s=r?xp(r):null;if(!n&&this.multiple&&(n=this.$action||s?.action,this.$action=n),!n||this.hidden&&n!==la||this.multiple&&!this.active&&n!==Wi)return;let{width:d,height:h}=this,p=t.endX-t.startX,f=t.endY-t.startY,{aspectRatio:x}=this;switch(!Qr(x)&&r.shiftKey&&(x=Qr(d)&&Qr(h)?d/h:1),n){case la:if(p!==0||f!==0){p===0?p=f:f===0&&(f=p);let{$canvas:k}=this,C=dd(e);(this.multiple&&!this.hidden?this.$createSelection():this).$change(t.startX-C.left,t.startY-C.top,Math.abs(p),Math.abs(f),x),p<0?f<0?n=ua:f>0&&(n=pa):p>0&&(f<0?n=da:f>0&&(n=ha)),k&&(k.$action=n)}break;case ml:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(p,f);break;case Wi:if(r&&this.zoomable&&(this.dynamic||this.contains(r.target))){let k=dd(e);this.$zoom(t.scale,r.pageX-k.left,r.pageY-k.top)}break;default:this.$resize(n,p,f,x)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(o){if(this.hidden||!this.keyboard||this.multiple&&!this.active||o.defaultPrevented)return;let{activeElement:e}=document;if(!(e&&(["INPUT","TEXTAREA"].includes(e.tagName)||["true","plaintext-only"].includes(e.contentEditable))))switch(o.key){case"Backspace":o.metaKey&&(o.preventDefault(),this.$removeSelection());break;case"Delete":o.preventDefault(),this.$removeSelection();break;case"ArrowLeft":o.preventDefault(),this.$move(-1,0);break;case"ArrowRight":o.preventDefault(),this.$move(1,0);break;case"ArrowUp":o.preventDefault(),this.$move(0,-1);break;case"ArrowDown":o.preventDefault(),this.$move(0,1);break;case"+":o.preventDefault(),this.$zoom(.1);break;case"-":o.preventDefault(),this.$zoom(-.1);break}}$center(){let{parentElement:o}=this;if(!o)return this;let e=(o.offsetWidth-this.width)/2,t=(o.offsetHeight-this.height)/2;return this.$change(e,t)}$move(o,e=o){return this.$moveTo(this.x+o,this.y+e)}$moveTo(o,e=o){return this.movable?this.$change(o,e):this}$resize(o,e=0,t=0,r=this.aspectRatio){if(!this.resizable)return this;let n=Qr(r),{$canvas:s}=this,{x:d,y:h,width:p,height:f}=this;switch(o){case Gc:h+=t,f-=t,f<0&&(o=Xc,f=-f,h-=f),n&&(e=t*r,d+=e/2,p-=e,p<0&&(p=-p,d-=p));break;case Yc:p+=e,p<0&&(o=Zc,p=-p,d-=p),n&&(t=e/r,h-=t/2,f+=t,f<0&&(f=-f,h-=f));break;case Xc:f+=t,f<0&&(o=Gc,f=-f,h-=f),n&&(e=t*r,d-=e/2,p+=e,p<0&&(p=-p,d-=p));break;case Zc:d+=e,p-=e,p<0&&(o=Yc,p=-p,d-=p),n&&(t=e/r,h+=t/2,f-=t,f<0&&(f=-f,h-=f));break;case da:n&&(t=-e/r),h+=t,f-=t,p+=e,p<0&&f<0?(o=pa,p=-p,f=-f,d-=p,h-=f):p<0?(o=ua,p=-p,d-=p):f<0&&(o=ha,f=-f,h-=f);break;case ua:n&&(t=e/r),d+=e,h+=t,p-=e,f-=t,p<0&&f<0?(o=ha,p=-p,f=-f,d-=p,h-=f):p<0?(o=da,p=-p,d-=p):f<0&&(o=pa,f=-f,h-=f);break;case ha:n&&(t=e/r),p+=e,f+=t,p<0&&f<0?(o=ua,p=-p,f=-f,d-=p,h-=f):p<0?(o=pa,p=-p,d-=p):f<0&&(o=da,f=-f,h-=f);break;case pa:n&&(t=-e/r),d+=e,p-=e,f+=t,p<0&&f<0?(o=da,p=-p,f=-f,d-=p,h-=f):p<0?(o=ha,p=-p,d-=p):f<0&&(o=ua,f=-f,h-=f);break}return s&&s.$setAction(o),this.$change(d,h,p,f)}$zoom(o,e,t){if(!this.zoomable||o===0)return this;o<0?o=1/(1-o):o+=1;let{width:r,height:n}=this,s=r*o,d=n*o,h=this.x,p=this.y;return be(e)&&be(t)?(h-=(s-r)*((e-this.x)/r),p-=(d-n)*((t-this.y)/n)):(h-=(s-r)/2,p-=(d-n)/2),this.$change(h,p,s,d)}$change(o,e,t=this.width,r=this.height,n=this.aspectRatio,s=!1){return this.$changing||!be(o)||!be(e)||!be(t)||!be(r)||t<0||r<0?this:(Qr(n)&&({width:t,height:r}=va({aspectRatio:n,width:t,height:r},"cover")),this.precise||(o=Math.round(o),e=Math.round(e),t=Math.round(t),r=Math.round(r)),o===this.x&&e===this.y&&t===this.width&&r===this.height&&Object.is(n,this.aspectRatio)&&!s?this:(this.hidden&&(this.hidden=!1),this.$emit(xi,{x:o,y:e,width:t,height:r})===!1?this:(this.$changing=!0,this.x=o,this.y=e,this.width=t,this.height=r,this.$changing=!1,this.$render())))}$reset(){let{x:o,y:e,width:t,height:r}=this.$initialSelection;return this.$change(o,e,t,r)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),{width:n,height:s}=this,d=1;if(ga(o)&&(Qr(o.width)||Qr(o.height))&&({width:n,height:s}=va({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.width),r.width=n,r.height=s,!this.$canvas){e(r);return}let h=this.$canvas.querySelector(this.$getTagNameOf(vi));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,k,C,$,z,T]=h.$getTransform(),j=-this.x,H=-this.y,I=(j*$-C*H)/(x*$-C*k),B=(H*x-k*j)/(x*$-C*k),S=x*I+C*B+z,Q=k*I+$*B+T,ye=p.naturalWidth,De=p.naturalHeight;d!==1&&(S*=d,Q*=d,ye*=d,De*=d);let yt=ye/2,Ee=De/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),ga(o)&&fa(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(yt,Ee),f.transform(x,k,C,$,S,Q),f.translate(-yt,-Ee),f.drawImage(p,0,0,ye,De),f.restore()}e(r)}).catch(t)})}};Hn.$name=ho;Hn.$version="2.1.1";var sg=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}",Rn=class extends nr{constructor(){super(...arguments),this.$style=sg,this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(o,e,t){Object.is(t,e)||(super.$propertyChangedCallback(o,e,t),(o==="rows"||o==="columns")&&this.$nextTick(()=>{this.$render()}))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){let o=this.$getShadowRoot(),e=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){let r=document.createElement("span");r.setAttribute("role","row");for(let n=0;n<this.columns;n+=1){let s=document.createElement("span");s.setAttribute("role","gridcell"),r.appendChild(s)}e.appendChild(r)}o&&(o.innerHTML="",o.appendChild(e))}};Rn.$name=hp;Rn.$version="2.1.1";var lg=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}',In=class extends nr{constructor(){super(...arguments),this.$style=lg,this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}};In.$name=up;In.$version="2.1.1";var cg=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}",Tp=new WeakMap,Ap=new WeakMap,jp=new WeakMap,Pp=new WeakMap,dg="both",ug="horizontal",Op="vertical",hg="none",Vn=class extends nr{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=cg,this.resize=Op,this.selection="",this.slottable=!1}set $image(o){Ap.set(this,o)}get $image(){return Ap.get(this)}set $sourceImage(o){Pp.set(this,o)}get $sourceImage(){return Pp.get(this)}set $canvas(o){Tp.set(this,o)}get $canvas(){return Tp.get(this)}set $selection(o){jp.set(this,o)}get $selection(){return jp.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){var o,e;super.connectedCallback();let t=null;if(this.selection?t=(e=(o=gl(this))===null||o===void 0?void 0:o.querySelector(this.selection))!==null&&e!==void 0?e:null:t=this.closest(this.$getTagNameOf(ho)),Gi(t)){this.$selection=t,this.$onSelectionChange=this.$handleSelectionChange.bind(this),gt(t,xi,this.$onSelectionChange);let r=t.closest(this.$getTagNameOf(Jo));if(r){this.$canvas=r;let n=r.querySelector(this.$getTagNameOf(vi));n&&(this.$sourceImage=n,this.$image=n.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),gt(n.$image,pn,this.$onSourceImageLoad),gt(n,ls,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){let{$selection:o,$sourceImage:e}=this;o&&this.$onSelectionChange&&(lt(o,xi,this.$onSelectionChange),this.$onSelectionChange=null),e&&this.$onSourceImageLoad&&(lt(e.$image,pn,this.$onSourceImageLoad),this.$onSourceImageLoad=null),e&&this.$onSourceImageTransform&&(lt(e,ls,this.$onSourceImageTransform),this.$onSourceImageTransform=null),super.disconnectedCallback()}$handleSelectionChange(o){this.$render(o.defaultPrevented?this.$selection:o.detail)}$handleSourceImageLoad(){let{$image:o,$sourceImage:e}=this,t=o.getAttribute("src"),r=e.getAttribute("src");r&&r!==t&&(o.setAttribute("src",r),o.$ready(()=>{this.$render()}))}$handleSourceImageTransform(o){this.$render(void 0,o.detail.matrix)}$render(o,e){let{$canvas:t,$selection:r}=this;!o&&!r.hidden&&(o=r),(!o||o.x===0&&o.y===0&&o.width===0&&o.height===0)&&(o={x:0,y:0,width:t.offsetWidth,height:t.offsetHeight});let{x:n,y:s,width:d,height:h}=o,p={},{clientWidth:f,clientHeight:x}=this,k=f,C=x,$=NaN;switch(this.resize){case dg:$=1,k=d,C=h,p.width=d,p.height=h;break;case ug:$=h>0?x/h:0,k=d*$,p.width=k;break;case Op:$=d>0?f/d:0,C=h*$,p.height=C;break;case hg:default:f>0?$=d>0?f/d:0:x>0&&($=h>0?x/h:0)}this.$scale=$,this.$setStyles(p),this.$sourceImage&&setTimeout(()=>{this.$transformImageByOffset(e??this.$sourceImage.$getTransform(),-n,-s)})}$transformImageByOffset(o,e,t){let{$image:r,$scale:n,$sourceImage:s}=this;if(s&&r&&n>=0){let[d,h,p,f,x,k]=o,C=(e*f-p*t)/(d*f-p*h),$=(t*d-h*e)/(d*f-p*h),z=d*C+p*$+x,T=h*C+f*$+k;s.$ready(j=>{this.$setStyles.call(r,{width:j.naturalWidth*n,height:j.naturalHeight*n})}),r.$setTransform(d,h,p,f,z*n,T*n)}}};Vn.$name=gp;Vn.$version="2.1.1";var pg='<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action="select" plain></cropper-handle><cropper-selection initial-coverage="0.5" movable resizable><cropper-grid role="grid" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle><cropper-handle action="n-resize"></cropper-handle><cropper-handle action="e-resize"></cropper-handle><cropper-handle action="s-resize"></cropper-handle><cropper-handle action="w-resize"></cropper-handle><cropper-handle action="ne-resize"></cropper-handle><cropper-handle action="nw-resize"></cropper-handle><cropper-handle action="se-resize"></cropper-handle><cropper-handle action="sw-resize"></cropper-handle></cropper-selection></cropper-canvas>',mg=/^img|canvas$/,gg=/<(\/?(?:script|style)[^>]*)>/gi,Hp={template:pg};An.$define();In.$define();Rn.$define();On.$define();jn.$define();Hn.$define();Pn.$define();Vn.$define();var cs=class{constructor(o,e){var t;if(this.options=Hp,ma(o)&&(o=document.querySelector(o)),!Gi(o)||!mg.test(o.localName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=o,e=Object.assign(Object.assign({},Hp),e),this.options=e;let{container:r}=e;if(r&&(ma(r)&&(r=(t=gl(o))===null||t===void 0?void 0:t.querySelector(r)),!Gi(r)))throw new Error("The `container` option must be an element or a valid selector.");Gi(r)||(o.parentElement?r=o.parentElement:r=o.ownerDocument.body),this.container=r;let n=o.localName,s="";n==="img"?{src:s}=o:n==="canvas"&&window.HTMLCanvasElement&&(s=o.toDataURL());let{template:d}=e;if(d&&ma(d)){let h=document.createElement("template"),p=document.createDocumentFragment();h.innerHTML=d.replace(gg,"&lt;$1&gt;"),p.appendChild(h.content),Array.from(p.querySelectorAll(vi)).forEach(f=>{f.setAttribute("src",s),f.setAttribute("alt",o.alt||"The image to crop"),n==="img"&&["crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","srcset"].forEach(x=>{o.hasAttribute(x)&&f.setAttribute(x,o.getAttribute(x)||"")})}),o.parentElement?(o.style.display="none",r.insertBefore(p,o.nextSibling)):r.appendChild(p)}}getCropperCanvas(){return this.container.querySelector(Jo)}getCropperImage(){return this.container.querySelector(vi)}getCropperSelection(){return this.container.querySelector(ho)}getCropperSelections(){return this.container.querySelectorAll(ho)}destroy(){var o;let e=this.getCropperCanvas();e&&((o=e.parentElement)===null||o===void 0||o.removeChild(e)),this.element&&(this.element.style.display="")}};cs.version="2.1.1";function fg(i){if(typeof i=="number")return Number.isFinite(i)&&i>0?i:null;let o=String(i??"").trim();if(!o||o==="free")return null;if(o.includes("/")){let[t,r]=o.split("/").map(n=>Number(n.trim()));return Number.isFinite(t)&&Number.isFinite(r)&&t>0&&r>0?t/r:null}let e=Number(o);return Number.isFinite(e)&&e>0?e:null}function vg(i,o,e){return new Promise(t=>i.toBlob(t,o,e))}var wt=class extends Or.LitElement{constructor(){super(...arguments);this.src="";this.alt="";this.aspectRatio="1";this.mimeType="image/png";this.quality=.92;this.height=420;this.crossOrigin="anonymous";this.disabled=!1;this.showResult=!0;this._loaded=!1;this._errored=!1;this._result="";this._onSelectionChange=e=>{let t=e.detail;this._selection={x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),aspectRatio:this._ratio},this.dispatchEvent(new CustomEvent("change",{detail:this._selection,bubbles:!0,composed:!0}))};this._onLoad=()=>{this._loaded=!0,this._errored=!1,this._setupCropper(),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{this._loaded=!1,this._errored=!0,this._destroyCropper(),this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))}}disconnectedCallback(){this._destroyCropper(),super.disconnectedCallback()}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._result="",this._selection=void 0,this._destroyCropper()),e.has("height")&&this.style.setProperty("--lui-image-cropper-height",`${this.height}px`),(e.has("aspectRatio")||e.has("src"))&&this._loaded&&this._setupCropper()}reset(){this._selectionEl?.$reset(),this._cropper?.getCropperImage()?.$resetTransform(),this._emitSelectionChange()}clear(){this._selectionEl?.$clear(),this._result="",this._selection=void 0}zoomIn(){this._cropper?.getCropperImage()?.$zoom(.1)}zoomOut(){this._cropper?.getCropperImage()?.$zoom(-.1)}rotateLeft(){this._cropper?.getCropperImage()?.$rotate("-90deg")}rotateRight(){this._cropper?.getCropperImage()?.$rotate("90deg")}async crop(){let e=this._cropper?.getCropperSelection();if(!e||e.hidden||!e.width||!e.height)return null;let t=await e.$toCanvas({width:this.outputWidth,height:this.outputHeight}),r=this.mimeType||"image/png",n=Math.max(0,Math.min(1,this.quality)),s=t.toDataURL(r,n),d=await vg(t,r,n),h={...this._readSelection(e),dataUrl:s,blob:d,canvas:t};return this._result=s,this._selection=h,this.dispatchEvent(new CustomEvent("crop",{detail:h,bubbles:!0,composed:!0})),h}get _ratio(){return fg(this.aspectRatio)}_template(){let e=this._ratio;return`
8308
8312
  <cropper-canvas background>
8309
8313
  <cropper-image rotatable scalable translatable></cropper-image>
8310
8314
  <cropper-shade hidden></cropper-shade>
@@ -8323,12 +8327,12 @@
8323
8327
  <cropper-handle action="sw-resize"></cropper-handle>
8324
8328
  </cropper-selection>
8325
8329
  </cropper-canvas>
8326
- `}_destroyCropper(){this._selectionEl?.removeEventListener("change",this._onSelectionChange),this._selectionEl=void 0,this._cropper?.destroy(),this._cropper=void 0}async _setupCropper(){await this.updateComplete;let e=this._imageEl,t=this._stageEl;!e||!t||!this.src||!e.complete||e.naturalWidth===0||(this._destroyCropper(),this._cropper=new cs(e,{container:t,template:this._template()}),await new Promise(r=>requestAnimationFrame(r)),this._selectionEl=this._cropper.getCropperSelection()??void 0,this._selectionEl?.addEventListener("change",this._onSelectionChange),this._emitSelectionChange())}_readSelection(e=this._selectionEl){return{x:Math.round(e?.x??0),y:Math.round(e?.y??0),width:Math.round(e?.width??0),height:Math.round(e?.height??0),aspectRatio:this._ratio}}_emitSelectionChange(){let e=this._readSelection();this._selection=e,this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}render(){let e=!!this.src,t=this.disabled||!this._loaded||this._errored,r=this._selection;return Pr.html`
8327
- <div class="shell" style=${this.height?`--lui-image-cropper-height:${this.height}px`:Pr.nothing}>
8330
+ `}_destroyCropper(){this._selectionEl?.removeEventListener("change",this._onSelectionChange),this._selectionEl=void 0,this._cropper?.destroy(),this._cropper=void 0}async _setupCropper(){await this.updateComplete;let e=this._imageEl,t=this._stageEl;!e||!t||!this.src||!e.complete||e.naturalWidth===0||(this._destroyCropper(),this._cropper=new cs(e,{container:t,template:this._template()}),await new Promise(r=>requestAnimationFrame(r)),this._selectionEl=this._cropper.getCropperSelection()??void 0,this._selectionEl?.addEventListener("change",this._onSelectionChange),this._emitSelectionChange())}_readSelection(e=this._selectionEl){return{x:Math.round(e?.x??0),y:Math.round(e?.y??0),width:Math.round(e?.width??0),height:Math.round(e?.height??0),aspectRatio:this._ratio}}_emitSelectionChange(){let e=this._readSelection();this._selection=e,this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}render(){let e=!!this.src,t=this.disabled||!this._loaded||this._errored,r=this._selection;return Or.html`
8331
+ <div class="shell" style=${this.height?`--lui-image-cropper-height:${this.height}px`:Or.nothing}>
8328
8332
  <div class="stage" part="stage">
8329
- ${e?Pr.html`<img class="source" src=${this.src} alt=${this.alt} crossorigin=${this.crossOrigin||Pr.nothing} @load=${this._onLoad} @error=${this._onError} />`:Pr.html`<div class="empty"><div><lui-icon name="image-plus"></lui-icon><div>请设置图片地址</div></div></div>`}
8330
- ${e&&!this._loaded&&!this._errored?Pr.html`<lui-skeleton class="loading" variant="image" active radius="lg"></lui-skeleton>`:Pr.nothing}
8331
- ${this._errored?Pr.html`<div class="empty"><div><lui-icon name="image-off"></lui-icon><div>图片加载失败</div></div></div>`:Pr.nothing}
8333
+ ${e?Or.html`<img class="source" src=${this.src} alt=${this.alt} crossorigin=${this.crossOrigin||Or.nothing} @load=${this._onLoad} @error=${this._onError} />`:Or.html`<div class="empty"><div><lui-icon name="image-plus"></lui-icon><div>请设置图片地址</div></div></div>`}
8334
+ ${e&&!this._loaded&&!this._errored?Or.html`<lui-skeleton class="loading" variant="image" active radius="lg"></lui-skeleton>`:Or.nothing}
8335
+ ${this._errored?Or.html`<div class="empty"><div><lui-icon name="image-off"></lui-icon><div>图片加载失败</div></div></div>`:Or.nothing}
8332
8336
  </div>
8333
8337
 
8334
8338
  <div class="toolbar" part="toolbar">
@@ -8344,7 +8348,7 @@
8344
8348
  </div>
8345
8349
 
8346
8350
  <div class="result" ?hidden=${!this.showResult||!this._result} part="result">
8347
- <div class="preview">${this._result?Pr.html`<img src=${this._result} alt="裁剪结果" />`:Pr.nothing}</div>
8351
+ <div class="preview">${this._result?Or.html`<img src=${this._result} alt="裁剪结果" />`:Or.nothing}</div>
8348
8352
  <div class="meta">
8349
8353
  <strong>裁剪结果</strong>
8350
8354
  <span>${r?`${r.width} \xD7 ${r.height}px \xB7 x ${r.x}, y ${r.y}`:"\u8C03\u6574\u9009\u533A\u540E\u751F\u6210"}</span>
@@ -8352,7 +8356,7 @@
8352
8356
  </div>
8353
8357
  </div>
8354
8358
  </div>
8355
- `}};wt.styles=[A,P,Pr.css`
8359
+ `}};wt.styles=[A,P,Or.css`
8356
8360
  :host {
8357
8361
  display: block;
8358
8362
  width: 100%;
@@ -8814,7 +8818,7 @@
8814
8818
  :host(:not([fade]):not([shadow])) .edge {
8815
8819
  display: none;
8816
8820
  }
8817
- `],a([(0,ar.property)({reflect:!0})],Nt.prototype,"orientation",2),a([(0,ar.property)({reflect:!0})],Nt.prototype,"scrollbar",2),a([(0,ar.property)({attribute:"max-height"})],Nt.prototype,"maxHeight",2),a([(0,ar.property)({attribute:"max-width"})],Nt.prototype,"maxWidth",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"fade",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"shadow",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"thin",2),a([(0,ar.property)({type:Boolean,reflect:!0,attribute:"hide-scrollbar"})],Nt.prototype,"hideScrollbar",2),a([(0,ar.property)({type:Boolean,reflect:!0,attribute:"auto-hide"})],Nt.prototype,"autoHide",2),a([(0,ar.property)({type:Number,attribute:"reach-threshold"})],Nt.prototype,"reachThreshold",2),a([(0,ar.query)(".viewport")],Nt.prototype,"_viewport",2),a([(0,ar.state)()],Nt.prototype,"_atTop",2),a([(0,ar.state)()],Nt.prototype,"_atBottom",2),a([(0,ar.state)()],Nt.prototype,"_atLeft",2),a([(0,ar.state)()],Nt.prototype,"_atRight",2),Nt=a([(0,ar.customElement)("lui-scroll-area")],Nt);var gn=require("lit"),So=require("lit/decorators.js");var Or=class extends gn.LitElement{constructor(){super(...arguments);this.orientation="horizontal";this.variant="solid";this.size="md";this.spacing="md";this.labelPlacement="center";this.inset=!1;this.subtle=!1;this.color="";this.thickness="";this._hasLabel=!1;this._explicitAttrs=new Set;this._onSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasLabel!==r&&(this._hasLabel=r)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"divider");!this._explicitAttrs.has("orientation")&&typeof t.orientation=="string"&&this.orientation!==t.orientation&&(this.orientation=t.orientation),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("spacing")&&typeof t.spacing=="string"&&this.spacing!==t.spacing&&(this.spacing=t.spacing),!this._explicitAttrs.has("label-placement")&&typeof t.labelPlacement=="string"&&this.labelPlacement!==t.labelPlacement&&(this.labelPlacement=t.labelPlacement),!this._explicitAttrs.has("inset")&&typeof t.inset=="boolean"&&this.inset!==t.inset&&(this.inset=t.inset),!this._explicitAttrs.has("subtle")&&typeof t.subtle=="boolean"&&this.subtle!==t.subtle&&(this.subtle=t.subtle),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("thickness")&&typeof t.thickness=="string"&&this.thickness!==t.thickness&&(this.thickness=t.thickness)}_style(){let e=[this.color?`--lui-divider-color:${this.color}`:"",this.thickness?`--lui-divider-thickness:${this.thickness}`:""].filter(Boolean);return e.length?e.join(";"):gn.nothing}render(){let e=this.orientation==="vertical";return gn.html`
8821
+ `],a([(0,ar.property)({reflect:!0})],Nt.prototype,"orientation",2),a([(0,ar.property)({reflect:!0})],Nt.prototype,"scrollbar",2),a([(0,ar.property)({attribute:"max-height"})],Nt.prototype,"maxHeight",2),a([(0,ar.property)({attribute:"max-width"})],Nt.prototype,"maxWidth",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"fade",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"shadow",2),a([(0,ar.property)({type:Boolean,reflect:!0})],Nt.prototype,"thin",2),a([(0,ar.property)({type:Boolean,reflect:!0,attribute:"hide-scrollbar"})],Nt.prototype,"hideScrollbar",2),a([(0,ar.property)({type:Boolean,reflect:!0,attribute:"auto-hide"})],Nt.prototype,"autoHide",2),a([(0,ar.property)({type:Number,attribute:"reach-threshold"})],Nt.prototype,"reachThreshold",2),a([(0,ar.query)(".viewport")],Nt.prototype,"_viewport",2),a([(0,ar.state)()],Nt.prototype,"_atTop",2),a([(0,ar.state)()],Nt.prototype,"_atBottom",2),a([(0,ar.state)()],Nt.prototype,"_atLeft",2),a([(0,ar.state)()],Nt.prototype,"_atRight",2),Nt=a([(0,ar.customElement)("lui-scroll-area")],Nt);var gn=require("lit"),To=require("lit/decorators.js");var Hr=class extends gn.LitElement{constructor(){super(...arguments);this.orientation="horizontal";this.variant="solid";this.size="md";this.spacing="md";this.labelPlacement="center";this.inset=!1;this.subtle=!1;this.color="";this.thickness="";this._hasLabel=!1;this._explicitAttrs=new Set;this._onSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasLabel!==r&&(this._hasLabel=r)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"divider");!this._explicitAttrs.has("orientation")&&typeof t.orientation=="string"&&this.orientation!==t.orientation&&(this.orientation=t.orientation),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("spacing")&&typeof t.spacing=="string"&&this.spacing!==t.spacing&&(this.spacing=t.spacing),!this._explicitAttrs.has("label-placement")&&typeof t.labelPlacement=="string"&&this.labelPlacement!==t.labelPlacement&&(this.labelPlacement=t.labelPlacement),!this._explicitAttrs.has("inset")&&typeof t.inset=="boolean"&&this.inset!==t.inset&&(this.inset=t.inset),!this._explicitAttrs.has("subtle")&&typeof t.subtle=="boolean"&&this.subtle!==t.subtle&&(this.subtle=t.subtle),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("thickness")&&typeof t.thickness=="string"&&this.thickness!==t.thickness&&(this.thickness=t.thickness)}_style(){let e=[this.color?`--lui-divider-color:${this.color}`:"",this.thickness?`--lui-divider-thickness:${this.thickness}`:""].filter(Boolean);return e.length?e.join(";"):gn.nothing}render(){let e=this.orientation==="vertical";return gn.html`
8818
8822
  <div
8819
8823
  class=${`divider ${this._hasLabel&&!e?"has-label":"no-label"}`}
8820
8824
  part="divider"
@@ -8826,7 +8830,7 @@
8826
8830
  <span class="label" part="label"><slot @slotchange=${this._onSlotChange}></slot></span>
8827
8831
  <span class="line after" part="line after"></span>
8828
8832
  </div>
8829
- `}};Or.styles=[A,P,gn.css`
8833
+ `}};Hr.styles=[A,P,gn.css`
8830
8834
  :host {
8831
8835
  display: block;
8832
8836
  box-sizing: border-box;
@@ -8985,7 +8989,7 @@
8985
8989
  :host([orientation="vertical"]) .label {
8986
8990
  display: none;
8987
8991
  }
8988
- `],a([(0,So.property)({reflect:!0})],Or.prototype,"orientation",2),a([(0,So.property)({reflect:!0})],Or.prototype,"variant",2),a([(0,So.property)({reflect:!0})],Or.prototype,"size",2),a([(0,So.property)({reflect:!0})],Or.prototype,"spacing",2),a([(0,So.property)({attribute:"label-placement",reflect:!0})],Or.prototype,"labelPlacement",2),a([(0,So.property)({type:Boolean,reflect:!0})],Or.prototype,"inset",2),a([(0,So.property)({type:Boolean,reflect:!0})],Or.prototype,"subtle",2),a([(0,So.property)()],Or.prototype,"color",2),a([(0,So.property)()],Or.prototype,"thickness",2),a([(0,So.state)()],Or.prototype,"_hasLabel",2),Or=a([(0,So.customElement)("lui-divider")],Or);var ba=require("lit"),po=require("lit/decorators.js");var pr=class extends ba.LitElement{connectedCallback(){super.connectedCallback(),this._applyRootConfig(),this._notifyDescendants()}updated(){this._applyRootConfig(),this._notifyDescendants()}getConfig(){return{locale:this.locale,translations:this.translations,theme:this.theme,size:this.size,disabled:this.disabled,variant:this.variant,direction:this.direction,popupContainer:this.popupContainer,overlayContainer:this.overlayContainer,zIndexBase:this.zIndexBase,renderEmpty:this.renderEmpty,componentConfig:this.componentConfig}}_notifyDescendants(){queueMicrotask(()=>{let o=this.querySelectorAll("*");for(let e of o){let t=e;typeof t.requestUpdate=="function"&&t.requestUpdate()}})}_applyRootConfig(){this.locale?(Pc(this.locale),this.translations&&Oc(this.locale,this.translations),this.setAttribute("lang",this.locale)):this.removeAttribute("lang"),this.theme?this.setAttribute("theme",this.theme):this.removeAttribute("theme"),this.direction?this.setAttribute("dir",this.direction):this.removeAttribute("dir"),typeof this.zIndexBase=="number"?this.style.setProperty("--lui-z-base",String(this.zIndexBase)):this.style.removeProperty("--lui-z-base")}render(){return ba.html`<slot></slot>`}};pr.styles=ba.css`
8992
+ `],a([(0,To.property)({reflect:!0})],Hr.prototype,"orientation",2),a([(0,To.property)({reflect:!0})],Hr.prototype,"variant",2),a([(0,To.property)({reflect:!0})],Hr.prototype,"size",2),a([(0,To.property)({reflect:!0})],Hr.prototype,"spacing",2),a([(0,To.property)({attribute:"label-placement",reflect:!0})],Hr.prototype,"labelPlacement",2),a([(0,To.property)({type:Boolean,reflect:!0})],Hr.prototype,"inset",2),a([(0,To.property)({type:Boolean,reflect:!0})],Hr.prototype,"subtle",2),a([(0,To.property)()],Hr.prototype,"color",2),a([(0,To.property)()],Hr.prototype,"thickness",2),a([(0,To.state)()],Hr.prototype,"_hasLabel",2),Hr=a([(0,To.customElement)("lui-divider")],Hr);var ba=require("lit"),po=require("lit/decorators.js");var pr=class extends ba.LitElement{connectedCallback(){super.connectedCallback(),this._applyRootConfig(),this._notifyDescendants()}updated(){this._applyRootConfig(),this._notifyDescendants()}getConfig(){return{locale:this.locale,translations:this.translations,theme:this.theme,size:this.size,disabled:this.disabled,variant:this.variant,direction:this.direction,popupContainer:this.popupContainer,overlayContainer:this.overlayContainer,zIndexBase:this.zIndexBase,renderEmpty:this.renderEmpty,componentConfig:this.componentConfig}}_notifyDescendants(){queueMicrotask(()=>{let o=this.querySelectorAll("*");for(let e of o){let t=e;typeof t.requestUpdate=="function"&&t.requestUpdate()}})}_applyRootConfig(){this.locale?(Pc(this.locale),this.translations&&Oc(this.locale,this.translations),this.setAttribute("lang",this.locale)):this.removeAttribute("lang"),this.theme?this.setAttribute("theme",this.theme):this.removeAttribute("theme"),this.direction?this.setAttribute("dir",this.direction):this.removeAttribute("dir"),typeof this.zIndexBase=="number"?this.style.setProperty("--lui-z-base",String(this.zIndexBase)):this.style.removeProperty("--lui-z-base")}render(){return ba.html`<slot></slot>`}};pr.styles=ba.css`
8989
8993
  :host {
8990
8994
  display: contents;
8991
8995
  }
@@ -9309,7 +9313,7 @@
9309
9313
  slot {
9310
9314
  display: contents;
9311
9315
  }
9312
- `],a([(0,Mr.property)({type:Number})],mo.prototype,"span",2),a([(0,Mr.property)({type:Number})],mo.prototype,"xs",2),a([(0,Mr.property)({type:Number})],mo.prototype,"sm",2),a([(0,Mr.property)({type:Number})],mo.prototype,"md",2),a([(0,Mr.property)({type:Number})],mo.prototype,"lg",2),a([(0,Mr.property)({type:Number})],mo.prototype,"xl",2),a([(0,Mr.property)({type:Number})],mo.prototype,"offset",2),a([(0,Mr.property)({type:Number,attribute:"order"})],mo.prototype,"colOrder",2),mo=a([(0,Mr.customElement)("lui-col")],mo);var F=require("lit"),qo=require("lit/decorators.js"),Np=require("lit/directives/keyed.js"),ps=require("lit/directives/ref.js"),Lp=require("lit/directives/repeat.js"),wa=require("@tanstack/lit-form");var fn=require("lit"),Ke=require("lit/decorators.js");var He=class extends fn.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.type="text";this.size="md";this.disabled=!1;this.readonly=!1;this.autofocus=!1;this.clearable=!1;this.revealable=!1;this.invalid=!1;this.noborder=!1;this.spellcheck=!1;this.autocapitalize="";this._focused=!1;this._revealed=!1;this._explicitAttrs=new Set;this._keepFocus=e=>{e.preventDefault()};this._clearValue=()=>{this.disabled||this.readonly||(this.value="",this._revealed=!1,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this.focus()))};this._toggleReveal=()=>{this.disabled||this.type!=="password"||(this._revealed=!this._revealed,this.requestUpdate(),this.updateComplete.then(()=>this.focus()))};this._onInput=e=>{e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onChange=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{if(e.key==="Enter"){let t=e.composedPath().find(r=>r.localName==="form");if(t){if(!t.reportValidity())return;t.requestSubmit()}}}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(){let e=L(this,"input");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("revealable")&&typeof e.revealable=="boolean"&&this.revealable!==e.revealable&&(this.revealable=e.revealable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this._input?.focus()}blur(){this._input?.blur()}insertText(e){let t=this._input;if(!t){this.value=`${this.value}${e}`;return}let r=t.selectionStart??t.value.length,n=t.selectionEnd??r;t.setRangeText(e,r,n,"end"),this.value=t.value,t.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),t.focus()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&!this.disabled&&!this.readonly&&this.value.length>0,r=this.revealable&&this.type==="password"&&!this.disabled;return fn.html`
9316
+ `],a([(0,Mr.property)({type:Number})],mo.prototype,"span",2),a([(0,Mr.property)({type:Number})],mo.prototype,"xs",2),a([(0,Mr.property)({type:Number})],mo.prototype,"sm",2),a([(0,Mr.property)({type:Number})],mo.prototype,"md",2),a([(0,Mr.property)({type:Number})],mo.prototype,"lg",2),a([(0,Mr.property)({type:Number})],mo.prototype,"xl",2),a([(0,Mr.property)({type:Number})],mo.prototype,"offset",2),a([(0,Mr.property)({type:Number,attribute:"order"})],mo.prototype,"colOrder",2),mo=a([(0,Mr.customElement)("lui-col")],mo);var F=require("lit"),Ko=require("lit/decorators.js"),Np=require("lit/directives/keyed.js"),ps=require("lit/directives/ref.js"),Lp=require("lit/directives/repeat.js"),wa=require("@tanstack/lit-form");var fn=require("lit"),Ke=require("lit/decorators.js");var He=class extends fn.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.type="text";this.size="md";this.disabled=!1;this.readonly=!1;this.autofocus=!1;this.clearable=!1;this.revealable=!1;this.invalid=!1;this.noborder=!1;this.spellcheck=!1;this.autocapitalize="";this._focused=!1;this._revealed=!1;this._explicitAttrs=new Set;this._keepFocus=e=>{e.preventDefault()};this._clearValue=()=>{this.disabled||this.readonly||(this.value="",this._revealed=!1,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this.focus()))};this._toggleReveal=()=>{this.disabled||this.type!=="password"||(this._revealed=!this._revealed,this.requestUpdate(),this.updateComplete.then(()=>this.focus()))};this._onInput=e=>{e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onChange=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{if(e.key==="Enter"){let t=e.composedPath().find(r=>r.localName==="form");if(t){if(!t.reportValidity())return;t.requestSubmit()}}}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(){let e=L(this,"input");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("revealable")&&typeof e.revealable=="boolean"&&this.revealable!==e.revealable&&(this.revealable=e.revealable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this._input?.focus()}blur(){this._input?.blur()}insertText(e){let t=this._input;if(!t){this.value=`${this.value}${e}`;return}let r=t.selectionStart??t.value.length,n=t.selectionEnd??r;t.setRangeText(e,r,n,"end"),this.value=t.value,t.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),t.focus()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&!this.disabled&&!this.readonly&&this.value.length>0,r=this.revealable&&this.type==="password"&&!this.disabled;return fn.html`
9313
9317
  <div class=${e.join(" ")} part="wrapper">
9314
9318
  <slot name="prefix"></slot>
9315
9319
  <input
@@ -9748,7 +9752,7 @@
9748
9752
  transition: none;
9749
9753
  }
9750
9754
  }
9751
- `],a([(0,ri.property)({type:Boolean,reflect:!0})],fo.prototype,"checked",2),a([(0,ri.property)({type:Boolean,reflect:!0})],fo.prototype,"disabled",2),a([(0,ri.property)({reflect:!0})],fo.prototype,"size",2),a([(0,ri.property)()],fo.prototype,"name",2),a([(0,ri.property)()],fo.prototype,"label",2),a([(0,ri.property)()],fo.prototype,"locale",2),a([(0,ri.property)({attribute:!1})],fo.prototype,"translations",2),a([(0,ri.query)("input")],fo.prototype,"_input",2),fo=a([(0,ri.customElement)("lui-switch")],fo);var To=require("lit"),Jr=require("lit/decorators.js");var Cr=class extends To.LitElement{constructor(){super(...arguments);this.source=[];this.value=[];this.direction="horizontal";this.radius="md";this.size="md";this.disabled=!1;this.checkboxProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-checkbox"||this._toggle(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","indeterminate","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}_isChecked(e){return this.value?.includes(e)??!1}_toggle(e){let t=this.value??[],r=t.includes(e)?t.filter(n=>n!==e):[...t,e];this.value=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))}firstUpdated(){this._scheduleSync()}willUpdate(){let e=L(this,"checkboxGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("radius")||e.has("size")||e.has("name")||e.has("source")||e.has("checkboxProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedCheckboxes(),this._syncRenderedCheckboxes()})}_getSlottedCheckboxes(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-checkbox"):[]}_mergedCheckboxProps(){return{...L(this,"checkboxGroup").checkboxProps??{},...this.checkboxProps??{}}}_syncRenderedCheckboxes(){if(!this.source.length)return;let e=this._mergedCheckboxProps();for(let t of this._renderedCheckboxes??[])se(t,e)}_syncSlottedCheckboxes(){if(this.source.length>0)return;let e=this._getSlottedCheckboxes();for(let t of e){let r=t.value??"";t.checked=this._isChecked(r),this.disabled?(t.disabled||t.setAttribute("data-lui-checkbox-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-checkbox-group-disabled")&&(t.removeAttribute("data-lui-checkbox-group-disabled"),t.disabled=!1),t.radius=this._effectiveRadius(),t.size=this.size,this.name&&(t.name=this.name)}}_effectiveRadius(e){return e||this.radius}_renderOption(e){let t={...this._mergedCheckboxProps(),checked:this._isChecked(e.value),indeterminate:!!(e.indeterminate&&!this._isChecked(e.value)),value:e.value,label:e.label,description:e.description??"",name:this.name??"",radius:this._effectiveRadius(e.radius),size:e.size??this.size,checkedIcon:e.checkedIcon??this.checkboxProps.checkedIcon??"check",indeterminateIcon:e.indeterminateIcon??this.checkboxProps.indeterminateIcon??"minus",disabled:this.disabled||(e.disabled??!1)};return To.html`
9755
+ `],a([(0,ri.property)({type:Boolean,reflect:!0})],fo.prototype,"checked",2),a([(0,ri.property)({type:Boolean,reflect:!0})],fo.prototype,"disabled",2),a([(0,ri.property)({reflect:!0})],fo.prototype,"size",2),a([(0,ri.property)()],fo.prototype,"name",2),a([(0,ri.property)()],fo.prototype,"label",2),a([(0,ri.property)()],fo.prototype,"locale",2),a([(0,ri.property)({attribute:!1})],fo.prototype,"translations",2),a([(0,ri.query)("input")],fo.prototype,"_input",2),fo=a([(0,ri.customElement)("lui-switch")],fo);var Ao=require("lit"),Jr=require("lit/decorators.js");var Cr=class extends Ao.LitElement{constructor(){super(...arguments);this.source=[];this.value=[];this.direction="horizontal";this.radius="md";this.size="md";this.disabled=!1;this.checkboxProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-checkbox"||this._toggle(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","indeterminate","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}_isChecked(e){return this.value?.includes(e)??!1}_toggle(e){let t=this.value??[],r=t.includes(e)?t.filter(n=>n!==e):[...t,e];this.value=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))}firstUpdated(){this._scheduleSync()}willUpdate(){let e=L(this,"checkboxGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("radius")||e.has("size")||e.has("name")||e.has("source")||e.has("checkboxProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedCheckboxes(),this._syncRenderedCheckboxes()})}_getSlottedCheckboxes(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-checkbox"):[]}_mergedCheckboxProps(){return{...L(this,"checkboxGroup").checkboxProps??{},...this.checkboxProps??{}}}_syncRenderedCheckboxes(){if(!this.source.length)return;let e=this._mergedCheckboxProps();for(let t of this._renderedCheckboxes??[])se(t,e)}_syncSlottedCheckboxes(){if(this.source.length>0)return;let e=this._getSlottedCheckboxes();for(let t of e){let r=t.value??"";t.checked=this._isChecked(r),this.disabled?(t.disabled||t.setAttribute("data-lui-checkbox-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-checkbox-group-disabled")&&(t.removeAttribute("data-lui-checkbox-group-disabled"),t.disabled=!1),t.radius=this._effectiveRadius(),t.size=this.size,this.name&&(t.name=this.name)}}_effectiveRadius(e){return e||this.radius}_renderOption(e){let t={...this._mergedCheckboxProps(),checked:this._isChecked(e.value),indeterminate:!!(e.indeterminate&&!this._isChecked(e.value)),value:e.value,label:e.label,description:e.description??"",name:this.name??"",radius:this._effectiveRadius(e.radius),size:e.size??this.size,checkedIcon:e.checkedIcon??this.checkboxProps.checkedIcon??"check",indeterminateIcon:e.indeterminateIcon??this.checkboxProps.indeterminateIcon??"minus",disabled:this.disabled||(e.disabled??!1)};return Ao.html`
9752
9756
  <lui-checkbox
9753
9757
  .checked=${t.checked}
9754
9758
  .indeterminate=${t.indeterminate}
@@ -9763,18 +9767,18 @@
9763
9767
  .disabled=${t.disabled}
9764
9768
  @change=${()=>this._toggle(e.value)}
9765
9769
  >
9766
- ${e.icon?To.html`<lui-icon slot="icon" name=${e.icon}></lui-icon>`:To.nothing}
9770
+ ${e.icon?Ao.html`<lui-icon slot="icon" name=${e.icon}></lui-icon>`:Ao.nothing}
9767
9771
  </lui-checkbox>
9768
- `}render(){let e=this.source.length>0;return To.html`
9769
- ${this.label?To.html`<div class="group-label">${this.label}</div>`:To.nothing}
9772
+ `}render(){let e=this.source.length>0;return Ao.html`
9773
+ ${this.label?Ao.html`<div class="group-label">${this.label}</div>`:Ao.nothing}
9770
9774
  <div
9771
9775
  class="group ${this.direction==="vertical"?"vertical":""}"
9772
9776
  part="group"
9773
- @change=${e?To.nothing:this._onSlottedChange}
9777
+ @change=${e?Ao.nothing:this._onSlottedChange}
9774
9778
  >
9775
- ${e?this.source.map(t=>this._renderOption(t)):To.html`<slot @slotchange=${this._scheduleSync}></slot>`}
9779
+ ${e?this.source.map(t=>this._renderOption(t)):Ao.html`<slot @slotchange=${this._scheduleSync}></slot>`}
9776
9780
  </div>
9777
- `}};Cr.styles=[A,P,To.css`
9781
+ `}};Cr.styles=[A,P,Ao.css`
9778
9782
  :host {
9779
9783
  display: block;
9780
9784
  }
@@ -9793,17 +9797,17 @@
9793
9797
  color: var(--lui-color-fg);
9794
9798
  margin-bottom: var(--lui-space-1, 4px);
9795
9799
  }
9796
- `],a([(0,Jr.property)({attribute:!1})],Cr.prototype,"source",2),a([(0,Jr.property)({attribute:!1})],Cr.prototype,"value",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"direction",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"radius",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"size",2),a([(0,Jr.property)()],Cr.prototype,"name",2),a([(0,Jr.property)()],Cr.prototype,"label",2),a([(0,Jr.property)({type:Boolean})],Cr.prototype,"disabled",2),a([(0,Jr.property)({attribute:!1})],Cr.prototype,"checkboxProps",2),a([(0,Jr.query)("slot")],Cr.prototype,"_slotEl",2),a([(0,Jr.queryAll)("lui-checkbox")],Cr.prototype,"_renderedCheckboxes",2),Cr=a([(0,Jr.customElement)("lui-checkbox-group")],Cr);var Hr=require("lit"),vo=require("lit/decorators.js");var zr=class extends Hr.LitElement{constructor(){super(...arguments);this.checked=!1;this.disabled=!1;this.size="md";this.checkedIcon="";this._onKeyDown=e=>{this.disabled||(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._select())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,characterData:!0,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect()}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}_hasNamedSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_hasDefaultContent(){return Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").trim().length>0:e instanceof HTMLElement?!e.hasAttribute("slot"):!1)}focus(){this._input?.focus()}blur(){this._input?.blur()}_syncNamedGroup(){if(!this.name||!this.checked)return;let e=this.getRootNode();if(!(e instanceof Document||e instanceof ShadowRoot))return;let t=Array.from(e.querySelectorAll("lui-radio"));for(let r of t)r!==this&&r.name===this.name&&r.checked&&(r.checked=!1)}_select(){this.disabled||this.checked||(this.checked=!0,this._syncNamedGroup(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,checked:!0},bubbles:!0,composed:!0})))}_renderIndicator(){let e=this._hasNamedSlot("icon");return Hr.html`
9800
+ `],a([(0,Jr.property)({attribute:!1})],Cr.prototype,"source",2),a([(0,Jr.property)({attribute:!1})],Cr.prototype,"value",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"direction",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"radius",2),a([(0,Jr.property)({reflect:!0})],Cr.prototype,"size",2),a([(0,Jr.property)()],Cr.prototype,"name",2),a([(0,Jr.property)()],Cr.prototype,"label",2),a([(0,Jr.property)({type:Boolean})],Cr.prototype,"disabled",2),a([(0,Jr.property)({attribute:!1})],Cr.prototype,"checkboxProps",2),a([(0,Jr.query)("slot")],Cr.prototype,"_slotEl",2),a([(0,Jr.queryAll)("lui-checkbox")],Cr.prototype,"_renderedCheckboxes",2),Cr=a([(0,Jr.customElement)("lui-checkbox-group")],Cr);var Rr=require("lit"),vo=require("lit/decorators.js");var zr=class extends Rr.LitElement{constructor(){super(...arguments);this.checked=!1;this.disabled=!1;this.size="md";this.checkedIcon="";this._onKeyDown=e=>{this.disabled||(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._select())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,characterData:!0,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect()}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}_hasNamedSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_hasDefaultContent(){return Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").trim().length>0:e instanceof HTMLElement?!e.hasAttribute("slot"):!1)}focus(){this._input?.focus()}blur(){this._input?.blur()}_syncNamedGroup(){if(!this.name||!this.checked)return;let e=this.getRootNode();if(!(e instanceof Document||e instanceof ShadowRoot))return;let t=Array.from(e.querySelectorAll("lui-radio"));for(let r of t)r!==this&&r.name===this.name&&r.checked&&(r.checked=!1)}_select(){this.disabled||this.checked||(this.checked=!0,this._syncNamedGroup(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,checked:!0},bubbles:!0,composed:!0})))}_renderIndicator(){let e=this._hasNamedSlot("icon");return Rr.html`
9797
9801
  <span class="indicator" part="indicator">
9798
9802
  <slot name="icon"></slot>
9799
- ${e?Hr.nothing:this.checkedIcon?Hr.html`<lui-icon name=${this.checkedIcon}></lui-icon>`:Hr.html`<span class="inner" part="inner"></span>`}
9803
+ ${e?Rr.nothing:this.checkedIcon?Rr.html`<lui-icon name=${this.checkedIcon}></lui-icon>`:Rr.html`<span class="inner" part="inner"></span>`}
9800
9804
  </span>
9801
- `}_renderContent(){let e=this._hasDefaultContent();return!this.label&&!this.description&&!e?Hr.nothing:Hr.html`
9805
+ `}_renderContent(){let e=this._hasDefaultContent();return!this.label&&!this.description&&!e?Rr.nothing:Rr.html`
9802
9806
  <label class="content" @click=${this._select}>
9803
- ${this.label?Hr.html`<span class="label">${this.label}</span>`:Hr.html`<span class="label"><slot></slot></span>`}
9804
- ${this.description?Hr.html`<span class="description">${this.description}</span>`:Hr.nothing}
9807
+ ${this.label?Rr.html`<span class="label">${this.label}</span>`:Rr.html`<span class="label"><slot></slot></span>`}
9808
+ ${this.description?Rr.html`<span class="description">${this.description}</span>`:Rr.nothing}
9805
9809
  </label>
9806
- `}render(){return Hr.html`
9810
+ `}render(){return Rr.html`
9807
9811
  <input
9808
9812
  type="radio"
9809
9813
  role="radio"
@@ -9821,7 +9825,7 @@
9821
9825
  ${this._renderIndicator()}
9822
9826
  </div>
9823
9827
  ${this._renderContent()}
9824
- `}};zr.styles=[A,P,Hr.css`
9828
+ `}};zr.styles=[A,P,Rr.css`
9825
9829
  :host {
9826
9830
  display: inline-flex;
9827
9831
  align-items: flex-start;
@@ -10268,7 +10272,7 @@
10268
10272
  }
10269
10273
  :host([size="sm"]) .value { font-size: var(--lui-font-size-xs); }
10270
10274
  :host([size="lg"]) .value { font-size: var(--lui-font-size); }
10271
- `],a([(0,At.property)({attribute:!1})],ut.prototype,"value",2),a([(0,At.property)({type:Number})],ut.prototype,"min",2),a([(0,At.property)({type:Number})],ut.prototype,"max",2),a([(0,At.property)({type:Number})],ut.prototype,"step",2),a([(0,At.property)({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),a([(0,At.property)({reflect:!0})],ut.prototype,"size",2),a([(0,At.property)()],ut.prototype,"name",2),a([(0,At.property)({type:Boolean})],ut.prototype,"showValue",2),a([(0,At.property)()],ut.prototype,"track",2),a([(0,At.property)({attribute:!1})],ut.prototype,"marks",2),a([(0,At.property)({type:Boolean,attribute:"snap-to-marks"})],ut.prototype,"snapToMarks",2),a([(0,At.property)({type:Boolean,reflect:!0})],ut.prototype,"range",2),a([(0,At.property)({attribute:!1})],ut.prototype,"rangeValue",2),a([(0,At.property)({attribute:"value-label-display"})],ut.prototype,"valueLabelDisplay",2),a([(0,At.property)()],ut.prototype,"valuePrefix",2),a([(0,At.property)()],ut.prototype,"valueSuffix",2),a([(0,At.state)()],ut.prototype,"_hovered",2),a([(0,At.state)()],ut.prototype,"_focusedThumb",2),a([(0,At.state)()],ut.prototype,"_draggingThumb",2),ut=a([(0,At.customElement)("lui-slider")],ut);var wi=require("lit"),Ti=require("lit/decorators.js");var Ao=class extends wi.LitElement{constructor(){super(...arguments);this.disabled=!1;this.size="md";this.multiple=!1;this.files=[];this.placeholder="\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20"}render(){let e=this.files.length>0,t=["dropzone"];return this.disabled&&t.push("disabled"),e&&t.push("has-files"),wi.html`
10275
+ `],a([(0,At.property)({attribute:!1})],ut.prototype,"value",2),a([(0,At.property)({type:Number})],ut.prototype,"min",2),a([(0,At.property)({type:Number})],ut.prototype,"max",2),a([(0,At.property)({type:Number})],ut.prototype,"step",2),a([(0,At.property)({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),a([(0,At.property)({reflect:!0})],ut.prototype,"size",2),a([(0,At.property)()],ut.prototype,"name",2),a([(0,At.property)({type:Boolean})],ut.prototype,"showValue",2),a([(0,At.property)()],ut.prototype,"track",2),a([(0,At.property)({attribute:!1})],ut.prototype,"marks",2),a([(0,At.property)({type:Boolean,attribute:"snap-to-marks"})],ut.prototype,"snapToMarks",2),a([(0,At.property)({type:Boolean,reflect:!0})],ut.prototype,"range",2),a([(0,At.property)({attribute:!1})],ut.prototype,"rangeValue",2),a([(0,At.property)({attribute:"value-label-display"})],ut.prototype,"valueLabelDisplay",2),a([(0,At.property)()],ut.prototype,"valuePrefix",2),a([(0,At.property)()],ut.prototype,"valueSuffix",2),a([(0,At.state)()],ut.prototype,"_hovered",2),a([(0,At.state)()],ut.prototype,"_focusedThumb",2),a([(0,At.state)()],ut.prototype,"_draggingThumb",2),ut=a([(0,At.customElement)("lui-slider")],ut);var wi=require("lit"),Ti=require("lit/decorators.js");var jo=class extends wi.LitElement{constructor(){super(...arguments);this.disabled=!1;this.size="md";this.multiple=!1;this.files=[];this.placeholder="\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20"}render(){let e=this.files.length>0,t=["dropzone"];return this.disabled&&t.push("disabled"),e&&t.push("has-files"),wi.html`
10272
10276
  <div
10273
10277
  class=${t.join(" ")}
10274
10278
  @click=${()=>!this.disabled&&this._inputEl?.click()}
@@ -10297,7 +10301,7 @@
10297
10301
  ?disabled=${this.disabled}
10298
10302
  @change=${this._onFileChange}
10299
10303
  />
10300
- `}get _inputEl(){return this.renderRoot?.querySelector('input[type="file"]')}_onFileChange(e){e.stopPropagation();let t=e.target;this.files=Array.from(t.files??[]),this.dispatchEvent(new CustomEvent("change",{detail:{files:this.files},bubbles:!0,composed:!0}))}_onDrop(e){e.preventDefault(),!this.disabled&&(this.files=Array.from(e.dataTransfer?.files??[]),this.dispatchEvent(new CustomEvent("change",{detail:{files:this.files},bubbles:!0,composed:!0})))}_formatSize(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}};Ao.styles=[A,P,wi.css`
10304
+ `}get _inputEl(){return this.renderRoot?.querySelector('input[type="file"]')}_onFileChange(e){e.stopPropagation();let t=e.target;this.files=Array.from(t.files??[]),this.dispatchEvent(new CustomEvent("change",{detail:{files:this.files},bubbles:!0,composed:!0}))}_onDrop(e){e.preventDefault(),!this.disabled&&(this.files=Array.from(e.dataTransfer?.files??[]),this.dispatchEvent(new CustomEvent("change",{detail:{files:this.files},bubbles:!0,composed:!0})))}_formatSize(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}};jo.styles=[A,P,wi.css`
10301
10305
  :host {
10302
10306
  display: block;
10303
10307
  width: 100%;
@@ -10385,7 +10389,7 @@
10385
10389
  input[type="file"] {
10386
10390
  display: none;
10387
10391
  }
10388
- `],a([(0,Ti.property)({type:Boolean,reflect:!0})],Ao.prototype,"disabled",2),a([(0,Ti.property)({reflect:!0})],Ao.prototype,"size",2),a([(0,Ti.property)()],Ao.prototype,"accept",2),a([(0,Ti.property)({type:Boolean})],Ao.prototype,"multiple",2),a([(0,Ti.property)()],Ao.prototype,"name",2),a([(0,Ti.property)({attribute:!1})],Ao.prototype,"files",2),a([(0,Ti.property)()],Ao.prototype,"placeholder",2),Ao=a([(0,Ti.customElement)("lui-file-input")],Ao);var Ai=require("lit"),jo=require("lit/decorators.js");var Rr=class extends Ai.LitElement{constructor(){super(...arguments);this.value="";this.length=6;this.size="md";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.type="number";this.format=""}focus(){this._cells?.[0]?.focus()}blur(){this._cells?.forEach(e=>e.blur())}_charCount(){return this.format?(this.format.match(/#/g)||[]).length:this.length}_chars(){let e=this._charCount(),t=this.value||"",r=[];for(let n=0;n<e;n++)r.push(n<t.length?t[n]:"");return r}_emit(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}));let e=this._charCount();this.value.length===e&&this.dispatchEvent(new CustomEvent("complete",{detail:{value:this.value},bubbles:!0,composed:!0}))}_onInput(e,t){e.stopPropagation();let r=e.target,n=r.value;if(this.type==="number"&&n&&!/^\d$/.test(n)){r.value="";return}let s=this._chars();if(n.length>1){let d=n[n.length-1];s[t]=d,r.value=d}else s[t]=n;this.value=s.join(""),n&&t<this._charCount()-1&&this._cells[t+1]?.focus(),this._emit()}_onKeyDown(e,t){if(this.readonly)return;let r=e.target,n=this._charCount();if(e.key==="Backspace"&&!r.value&&t>0){let s=this._cells[t-1];s.focus(),s.value="";let d=this._chars();d[t-1]="",this.value=d.join(""),this._emit()}else if(e.key==="ArrowLeft"&&t>0)this._cells[t-1]?.focus();else if(e.key==="ArrowRight"&&t<n-1)this._cells[t+1]?.focus();else if(e.key==="Delete"){let s=this._chars();s[t]="",this.value=s.join(""),this._emit()}}_onFocus(e){if(this.readonly)return;e.target.select()}_onPaste(e,t){if(e.preventDefault(),this.disabled||this.readonly)return;let r=e.clipboardData?.getData("text")?.trim()??"";if(!r)return;let n=this.type==="number"?r.replace(/\D/g,""):r;if(!n)return;let s=this._chars(),d=this._charCount();for(let p=0;p<n.length&&t+p<d;p++)s[t+p]=n[p];this.value=s.join("");let h=Math.min(t+n.length,d-1);this._cells[h]?.focus(),this._emit()}render(){let e=this._chars();if(this.format){let t=0,r=[];for(let n=0;n<this.format.length;n++)if(this.format[n]==="#"){let s=t,d=e[s];r.push(Ai.html`
10392
+ `],a([(0,Ti.property)({type:Boolean,reflect:!0})],jo.prototype,"disabled",2),a([(0,Ti.property)({reflect:!0})],jo.prototype,"size",2),a([(0,Ti.property)()],jo.prototype,"accept",2),a([(0,Ti.property)({type:Boolean})],jo.prototype,"multiple",2),a([(0,Ti.property)()],jo.prototype,"name",2),a([(0,Ti.property)({attribute:!1})],jo.prototype,"files",2),a([(0,Ti.property)()],jo.prototype,"placeholder",2),jo=a([(0,Ti.customElement)("lui-file-input")],jo);var Ai=require("lit"),Po=require("lit/decorators.js");var Ir=class extends Ai.LitElement{constructor(){super(...arguments);this.value="";this.length=6;this.size="md";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.type="number";this.format=""}focus(){this._cells?.[0]?.focus()}blur(){this._cells?.forEach(e=>e.blur())}_charCount(){return this.format?(this.format.match(/#/g)||[]).length:this.length}_chars(){let e=this._charCount(),t=this.value||"",r=[];for(let n=0;n<e;n++)r.push(n<t.length?t[n]:"");return r}_emit(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}));let e=this._charCount();this.value.length===e&&this.dispatchEvent(new CustomEvent("complete",{detail:{value:this.value},bubbles:!0,composed:!0}))}_onInput(e,t){e.stopPropagation();let r=e.target,n=r.value;if(this.type==="number"&&n&&!/^\d$/.test(n)){r.value="";return}let s=this._chars();if(n.length>1){let d=n[n.length-1];s[t]=d,r.value=d}else s[t]=n;this.value=s.join(""),n&&t<this._charCount()-1&&this._cells[t+1]?.focus(),this._emit()}_onKeyDown(e,t){if(this.readonly)return;let r=e.target,n=this._charCount();if(e.key==="Backspace"&&!r.value&&t>0){let s=this._cells[t-1];s.focus(),s.value="";let d=this._chars();d[t-1]="",this.value=d.join(""),this._emit()}else if(e.key==="ArrowLeft"&&t>0)this._cells[t-1]?.focus();else if(e.key==="ArrowRight"&&t<n-1)this._cells[t+1]?.focus();else if(e.key==="Delete"){let s=this._chars();s[t]="",this.value=s.join(""),this._emit()}}_onFocus(e){if(this.readonly)return;e.target.select()}_onPaste(e,t){if(e.preventDefault(),this.disabled||this.readonly)return;let r=e.clipboardData?.getData("text")?.trim()??"";if(!r)return;let n=this.type==="number"?r.replace(/\D/g,""):r;if(!n)return;let s=this._chars(),d=this._charCount();for(let p=0;p<n.length&&t+p<d;p++)s[t+p]=n[p];this.value=s.join("");let h=Math.min(t+n.length,d-1);this._cells[h]?.focus(),this._emit()}render(){let e=this._chars();if(this.format){let t=0,r=[];for(let n=0;n<this.format.length;n++)if(this.format[n]==="#"){let s=t,d=e[s];r.push(Ai.html`
10389
10393
  <input
10390
10394
  class=${`otp-cell${d?" filled":""}${this.invalid?" invalid":""}`}
10391
10395
  .value=${d}
@@ -10415,7 +10419,7 @@
10415
10419
  />
10416
10420
  `)}
10417
10421
  </div>
10418
- `}};Rr.styles=[A,P,Ai.css`
10422
+ `}};Ir.styles=[A,P,Ai.css`
10419
10423
  :host {
10420
10424
  display: inline-flex;
10421
10425
  }
@@ -10497,7 +10501,7 @@
10497
10501
  :host([size="lg"]) .separator {
10498
10502
  font-size: var(--lui-font-size-xl);
10499
10503
  }
10500
- `],a([(0,jo.property)()],Rr.prototype,"value",2),a([(0,jo.property)({type:Number})],Rr.prototype,"length",2),a([(0,jo.property)({reflect:!0})],Rr.prototype,"size",2),a([(0,jo.property)({type:Boolean})],Rr.prototype,"disabled",2),a([(0,jo.property)({type:Boolean})],Rr.prototype,"readonly",2),a([(0,jo.property)({type:Boolean,reflect:!0})],Rr.prototype,"invalid",2),a([(0,jo.property)()],Rr.prototype,"type",2),a([(0,jo.property)()],Rr.prototype,"name",2),a([(0,jo.property)()],Rr.prototype,"format",2),a([(0,jo.queryAll)(".otp-cell")],Rr.prototype,"_cells",2),Rr=a([(0,jo.customElement)("lui-input-opt")],Rr);var bo=require("lit"),Er=require("lit/decorators.js");var Lt=class extends bo.LitElement{constructor(){super(...arguments);this.placeholder="";this.size="md";this.controls="split";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.noborder=!1;this.step=1;this.prefix="";this.suffix="";this._focused=!1;this._explicitAttrs=new Set;this._draftValue=null;this._onWheel=e=>{!this._focused||this.disabled||this.readonly||e.deltaY!==0&&(e.preventDefault(),this._stepBy(e.deltaY<0?this.step:-this.step))}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(){let e=L(this,"inputNumber");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("controls")&&typeof e.controls=="string"&&this.controls!==e.controls&&(this.controls=e.controls),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this.shadowRoot?.querySelector("input")?.focus()}_clamp(e){if(this.precision!=null){let t=Math.pow(10,this.precision);e=Math.round(e*t)/t}return this.min!=null&&e<this.min&&(e=this.min),this.max!=null&&e>this.max&&(e=this.max),e}_canDec(){return this.disabled||this.readonly?!1:this.min==null?!0:(this.value??0)-this.step>=this.min}_canInc(){return this.disabled||this.readonly?!1:this.max==null?!0:(this.value??0)+this.step<=this.max}_emit(e){this.value=e,this._focused&&(this._draftValue=e!=null?String(e):""),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}_stepBy(e){let t=this.value??0;this._emit(this._clamp(t+e))}_onInput(e){e.stopPropagation();let r=e.target.value.trim();if(this._draftValue=r,r===""||r==="-"||r==="."||r==="-."){this._emit(void 0);return}let n=Number(r);isNaN(n)||(this.value=this._clamp(n),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))),this.requestUpdate()}_onBlur(e){this._focused=!1;let t=e.target,r=t.value.trim();if(r===""||r==="-"||r==="."||r==="-.")this.value=void 0;else{let n=Number(r);isNaN(n)||(this.value=this._clamp(n))}this._draftValue=null,this.value!=null?t.value=String(this.value):t.value="",this.requestUpdate()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this._focused&&this._draftValue!=null?this._draftValue:this.value!=null?String(this.value):"",r=bo.html`
10504
+ `],a([(0,Po.property)()],Ir.prototype,"value",2),a([(0,Po.property)({type:Number})],Ir.prototype,"length",2),a([(0,Po.property)({reflect:!0})],Ir.prototype,"size",2),a([(0,Po.property)({type:Boolean})],Ir.prototype,"disabled",2),a([(0,Po.property)({type:Boolean})],Ir.prototype,"readonly",2),a([(0,Po.property)({type:Boolean,reflect:!0})],Ir.prototype,"invalid",2),a([(0,Po.property)()],Ir.prototype,"type",2),a([(0,Po.property)()],Ir.prototype,"name",2),a([(0,Po.property)()],Ir.prototype,"format",2),a([(0,Po.queryAll)(".otp-cell")],Ir.prototype,"_cells",2),Ir=a([(0,Po.customElement)("lui-input-opt")],Ir);var bo=require("lit"),Er=require("lit/decorators.js");var Lt=class extends bo.LitElement{constructor(){super(...arguments);this.placeholder="";this.size="md";this.controls="split";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.noborder=!1;this.step=1;this.prefix="";this.suffix="";this._focused=!1;this._explicitAttrs=new Set;this._draftValue=null;this._onWheel=e=>{!this._focused||this.disabled||this.readonly||e.deltaY!==0&&(e.preventDefault(),this._stepBy(e.deltaY<0?this.step:-this.step))}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(){let e=L(this,"inputNumber");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("controls")&&typeof e.controls=="string"&&this.controls!==e.controls&&(this.controls=e.controls),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this.shadowRoot?.querySelector("input")?.focus()}_clamp(e){if(this.precision!=null){let t=Math.pow(10,this.precision);e=Math.round(e*t)/t}return this.min!=null&&e<this.min&&(e=this.min),this.max!=null&&e>this.max&&(e=this.max),e}_canDec(){return this.disabled||this.readonly?!1:this.min==null?!0:(this.value??0)-this.step>=this.min}_canInc(){return this.disabled||this.readonly?!1:this.max==null?!0:(this.value??0)+this.step<=this.max}_emit(e){this.value=e,this._focused&&(this._draftValue=e!=null?String(e):""),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}_stepBy(e){let t=this.value??0;this._emit(this._clamp(t+e))}_onInput(e){e.stopPropagation();let r=e.target.value.trim();if(this._draftValue=r,r===""||r==="-"||r==="."||r==="-."){this._emit(void 0);return}let n=Number(r);isNaN(n)||(this.value=this._clamp(n),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))),this.requestUpdate()}_onBlur(e){this._focused=!1;let t=e.target,r=t.value.trim();if(r===""||r==="-"||r==="."||r==="-.")this.value=void 0;else{let n=Number(r);isNaN(n)||(this.value=this._clamp(n))}this._draftValue=null,this.value!=null?t.value=String(this.value):t.value="",this.requestUpdate()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this._focused&&this._draftValue!=null?this._draftValue:this.value!=null?String(this.value):"",r=bo.html`
10501
10505
  <input
10502
10506
  part="input"
10503
10507
  .value=${t}
@@ -10836,7 +10840,7 @@
10836
10840
  :is(${de}) ${ue} .numInputWrapper span.arrowDown::after {
10837
10841
  border-top-color: var(--lui-color-fg-muted, #9da2a6);
10838
10842
  }
10839
- `,Rp=new WeakSet;function Ip(i){if(Rp.has(i))return;let o=i.createElement("style");o.setAttribute("data-lui-datepicker-dark-styles",""),o.textContent=_g,i.head.appendChild(o),Rp.add(i)}var _t=class extends vn.LitElement{constructor(){super(...arguments);this.value="";this.selectionMode="single";this.placeholder="";this.size="md";this.mode="date";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this._fp=null;this._focused=!1;this._closing=!1;this._overlayLayerEl=null}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){this._destroy(),this._disposeLocaleChange?.(),super.disconnectedCallback()}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}updated(e){if(e.has("value")&&this._fp){let t=this.value||"",r=this._fp.input.value;t!==r&&this._fp.setDate(t,!1)}}focus(){this._inputEl?.focus()}_destroy(){let e=this._fp?.calendarContainer;e&&Yo(e),this._fp?.destroy(),this._fp=null,this._overlayLayerEl=null,this._closing=!1}get _resolvedMode(){return this.type||this.mode||"date"}get _isRange(){return this.selectionMode==="range"}_openPicker(){if(this.disabled||this.readonly||this._fp)return;let e=Sr("popup",sn(this)??ln(this));this._overlayLayerEl=e;let t={locale:Dp.Mandarin,dateFormat:this._getFormat(),allowInput:!0,clickOpens:!1,time_24hr:!0,mode:this._isRange?"range":"single",conjunction:" ~ ",appendTo:e,positionElement:this._wrapperEl,minDate:this.min||void 0,maxDate:this.max||void 0,defaultDate:this.value||void 0,onChange:(r,n)=>{this.value=n,this._emitChange()},onOpen:()=>{let r=this._fp?.calendarContainer;r?.classList.add("lui-datepicker-calendar"),r&&this._overlayLayerEl&&(Jt(r,this._overlayLayerEl,"popup"),Et(r)),this._focused=!0,this.requestUpdate()},onClose:()=>{this._focused=!1,this._closing=!0,this.requestUpdate(),requestAnimationFrame(()=>this._destroy())}};this._resolvedMode==="time"?(t.enableTime=!0,t.noCalendar=!0):this._resolvedMode==="datetime"&&(t.enableTime=!0),Ip(this.ownerDocument),this._fp=(0,Vp.default)(this._inputEl,t),this._fp.open()}_getFormat(){return this._resolvedMode==="time"?"H:i":this._resolvedMode==="datetime"?"Y-m-d H:i":"Y-m-d"}_getIcon(){return this._resolvedMode==="time"?"clock":"calendar"}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,values:this._isRange?this.value.split(" ~ ").map(e=>e.trim()).filter(Boolean):this.value?[this.value]:[]},bubbles:!0,composed:!0}))}_clear(e){e.stopPropagation(),this.value="",this._emitChange()}render(){let e=["control-shell","wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&this.value&&!this.disabled&&!this.readonly;return vn.html`
10843
+ `,Rp=new WeakSet;function Ip(i){if(Rp.has(i))return;let o=i.createElement("style");o.setAttribute("data-lui-datepicker-dark-styles",""),o.textContent=_g,i.head.appendChild(o),Rp.add(i)}var _t=class extends vn.LitElement{constructor(){super(...arguments);this.value="";this.selectionMode="single";this.placeholder="";this.size="md";this.mode="date";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this._fp=null;this._focused=!1;this._closing=!1;this._overlayLayerEl=null}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){this._destroy(),this._disposeLocaleChange?.(),super.disconnectedCallback()}_t(e,t){return ae(ne(this.locale,this.translations),e,t)}updated(e){if(e.has("value")&&this._fp){let t=this.value||"",r=this._fp.input.value;t!==r&&this._fp.setDate(t,!1)}}focus(){this._inputEl?.focus()}_destroy(){let e=this._fp?.calendarContainer;e&&Yo(e),this._fp?.destroy(),this._fp=null,this._overlayLayerEl=null,this._closing=!1}get _resolvedMode(){return this.type||this.mode||"date"}get _isRange(){return this.selectionMode==="range"}_openPicker(){if(this.disabled||this.readonly||this._fp)return;let e=Tr("popup",sn(this)??ln(this));this._overlayLayerEl=e;let t={locale:Dp.Mandarin,dateFormat:this._getFormat(),allowInput:!0,clickOpens:!1,time_24hr:!0,mode:this._isRange?"range":"single",conjunction:" ~ ",appendTo:e,positionElement:this._wrapperEl,minDate:this.min||void 0,maxDate:this.max||void 0,defaultDate:this.value||void 0,onChange:(r,n)=>{this.value=n,this._emitChange()},onOpen:()=>{let r=this._fp?.calendarContainer;r?.classList.add("lui-datepicker-calendar"),r&&this._overlayLayerEl&&(Jt(r,this._overlayLayerEl,"popup"),Et(r)),this._focused=!0,this.requestUpdate()},onClose:()=>{this._focused=!1,this._closing=!0,this.requestUpdate(),requestAnimationFrame(()=>this._destroy())}};this._resolvedMode==="time"?(t.enableTime=!0,t.noCalendar=!0):this._resolvedMode==="datetime"&&(t.enableTime=!0),Ip(this.ownerDocument),this._fp=(0,Vp.default)(this._inputEl,t),this._fp.open()}_getFormat(){return this._resolvedMode==="time"?"H:i":this._resolvedMode==="datetime"?"Y-m-d H:i":"Y-m-d"}_getIcon(){return this._resolvedMode==="time"?"clock":"calendar"}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,values:this._isRange?this.value.split(" ~ ").map(e=>e.trim()).filter(Boolean):this.value?[this.value]:[]},bubbles:!0,composed:!0}))}_clear(e){e.stopPropagation(),this.value="",this._emitChange()}render(){let e=["control-shell","wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&this.value&&!this.disabled&&!this.readonly;return vn.html`
10840
10844
  <div class=${e.join(" ")}>
10841
10845
  <lui-icon name=${this._getIcon()} style="--lui-icon-size:16px;color:var(--lui-color-fg-muted);flex-shrink:0"></lui-icon>
10842
10846
  <input
@@ -10868,7 +10872,7 @@
10868
10872
  <lui-icon name="chevron-down"></lui-icon>
10869
10873
  </button>
10870
10874
  </div>
10871
- `}};_t.styles=[A,P,Co,vn.css`
10875
+ `}};_t.styles=[A,P,zo,vn.css`
10872
10876
  :host {
10873
10877
  display: inline-flex;
10874
10878
  width: 100%;
@@ -10950,7 +10954,7 @@
10950
10954
  --lui-input-height: var(--lui-control-height-lg, 44px);
10951
10955
  --lui-input-font-size: var(--lui-font-size);
10952
10956
  }
10953
- `],a([(0,Zt.property)()],_t.prototype,"value",2),a([(0,Zt.property)({attribute:"selection-mode"})],_t.prototype,"selectionMode",2),a([(0,Zt.property)()],_t.prototype,"placeholder",2),a([(0,Zt.property)({reflect:!0})],_t.prototype,"size",2),a([(0,Zt.property)()],_t.prototype,"mode",2),a([(0,Zt.property)({attribute:"type"})],_t.prototype,"type",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"disabled",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"readonly",2),a([(0,Zt.property)({type:Boolean,reflect:!0})],_t.prototype,"invalid",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"clearable",2),a([(0,Zt.property)()],_t.prototype,"min",2),a([(0,Zt.property)()],_t.prototype,"max",2),a([(0,Zt.property)()],_t.prototype,"name",2),a([(0,Zt.property)()],_t.prototype,"locale",2),a([(0,Zt.property)({attribute:!1})],_t.prototype,"translations",2),a([(0,Zt.query)(".input")],_t.prototype,"_inputEl",2),a([(0,Zt.query)(".wrapper")],_t.prototype,"_wrapperEl",2),_t=a([(0,Zt.customElement)("lui-datepicker")],_t);var Ir=require("lit"),ft=require("lit/decorators.js");var Mg=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],Je=(i,o,e)=>Math.min(e,Math.max(o,i)),_i=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},yl=i=>Je(Math.round(i),0,255).toString(16).padStart(2,"0"),hs=i=>(i%360+360)%360;function Cg(i){let o=hs(i.h),e=Je(i.s,0,100)/100,t=Je(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function ds(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:hs(d),s:r===0?0:s/r*100,v:r*100,a:Je(i.a,0,1)}}function zg(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:hs(h),s:p*100,l:d*100,a:Je(i.a,0,1)}}function Fp(i){let o=hs(i.h),e=Je(i.s,0,100)/100,t=Je(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function ka(i,o=i.a<1){let e=`#${yl(i.r)}${yl(i.g)}${yl(i.b)}`;return o?`${e}${yl(i.a*255)}`:e}function Eg(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function us(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return Eg(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:Je(n,0,255),g:Je(s,0,255),b:Je(d,0,255),a:Je(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return Fp({h:n,s,l:d,a:h})}}return null}var ot=class extends Ir.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=Mg.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=us(t.value);if(!r){t.value=this._hex;return}this._commit(ds(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:Je(Number(t.target.value)||0,0,255)};this._commit(ds(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:Je(Number(t.target.value)||0,0,n)};this._commit(ds(Fp(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=Je(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=us(e);t&&(this._commit(ds(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=L(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return Cg(this._effectiveHsv())}get _hsl(){return zg(this._rgb)}get _hex(){return ka(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?Je(this._hsv.a,0,1):1}}_syncFromValue(e){let t=us(e);t&&(this._hsv=ds({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${_i(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${_i(n,2)})`;case"hex":default:return ka({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:ka(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:_i(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:_i(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:_i(r.a,3)},alpha:_i(e.a,3)}}_commit(e,t="input"){this._hsv={h:hs(e.h),s:Je(e.s,0,100),v:Je(e.v,0,100),a:this.showAlpha?Je(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=Je((e.clientX-t.left)/t.width*100,0,100),n=Je(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>us(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${_i(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${_i(r.h,2)};--sat:${_i(r.s,2)}%;--val-y:${_i(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=ka(e,!1).toLowerCase();return Ir.html`
10957
+ `],a([(0,Zt.property)()],_t.prototype,"value",2),a([(0,Zt.property)({attribute:"selection-mode"})],_t.prototype,"selectionMode",2),a([(0,Zt.property)()],_t.prototype,"placeholder",2),a([(0,Zt.property)({reflect:!0})],_t.prototype,"size",2),a([(0,Zt.property)()],_t.prototype,"mode",2),a([(0,Zt.property)({attribute:"type"})],_t.prototype,"type",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"disabled",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"readonly",2),a([(0,Zt.property)({type:Boolean,reflect:!0})],_t.prototype,"invalid",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"clearable",2),a([(0,Zt.property)()],_t.prototype,"min",2),a([(0,Zt.property)()],_t.prototype,"max",2),a([(0,Zt.property)()],_t.prototype,"name",2),a([(0,Zt.property)()],_t.prototype,"locale",2),a([(0,Zt.property)({attribute:!1})],_t.prototype,"translations",2),a([(0,Zt.query)(".input")],_t.prototype,"_inputEl",2),a([(0,Zt.query)(".wrapper")],_t.prototype,"_wrapperEl",2),_t=a([(0,Zt.customElement)("lui-datepicker")],_t);var Vr=require("lit"),ft=require("lit/decorators.js");var Mg=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],Je=(i,o,e)=>Math.min(e,Math.max(o,i)),_i=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},yl=i=>Je(Math.round(i),0,255).toString(16).padStart(2,"0"),hs=i=>(i%360+360)%360;function Cg(i){let o=hs(i.h),e=Je(i.s,0,100)/100,t=Je(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function ds(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:hs(d),s:r===0?0:s/r*100,v:r*100,a:Je(i.a,0,1)}}function zg(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:hs(h),s:p*100,l:d*100,a:Je(i.a,0,1)}}function Fp(i){let o=hs(i.h),e=Je(i.s,0,100)/100,t=Je(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function ka(i,o=i.a<1){let e=`#${yl(i.r)}${yl(i.g)}${yl(i.b)}`;return o?`${e}${yl(i.a*255)}`:e}function Eg(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function us(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return Eg(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:Je(n,0,255),g:Je(s,0,255),b:Je(d,0,255),a:Je(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return Fp({h:n,s,l:d,a:h})}}return null}var ot=class extends Vr.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=Mg.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=us(t.value);if(!r){t.value=this._hex;return}this._commit(ds(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:Je(Number(t.target.value)||0,0,255)};this._commit(ds(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:Je(Number(t.target.value)||0,0,n)};this._commit(ds(Fp(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=Je(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=us(e);t&&(this._commit(ds(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=L(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return Cg(this._effectiveHsv())}get _hsl(){return zg(this._rgb)}get _hex(){return ka(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?Je(this._hsv.a,0,1):1}}_syncFromValue(e){let t=us(e);t&&(this._hsv=ds({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${_i(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${_i(n,2)})`;case"hex":default:return ka({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:ka(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:_i(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:_i(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:_i(r.a,3)},alpha:_i(e.a,3)}}_commit(e,t="input"){this._hsv={h:hs(e.h),s:Je(e.s,0,100),v:Je(e.v,0,100),a:this.showAlpha?Je(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=Je((e.clientX-t.left)/t.width*100,0,100),n=Je(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>us(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${_i(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${_i(r.h,2)};--sat:${_i(r.s,2)}%;--val-y:${_i(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=ka(e,!1).toLowerCase();return Vr.html`
10954
10958
  <div class="panel" part="panel" style=${d} @click=${f=>f.stopPropagation()}>
10955
10959
  <div class="hero">
10956
10960
  <div class="preview" part="preview"><div class="preview-inner"></div></div>
@@ -10980,7 +10984,7 @@
10980
10984
  <input class="hue-range" type="range" min="0" max="360" step="1" .value=${String(Math.round(r.h))} @input=${this._onHueInput} @change=${this._onRangeChange} />
10981
10985
  <span>${Math.round(r.h)}°</span>
10982
10986
  </div>
10983
- ${this.showAlpha?Ir.html`
10987
+ ${this.showAlpha?Vr.html`
10984
10988
  <div class="slider-row">
10985
10989
  <span>Alpha</span>
10986
10990
  <span class="alpha-wrap">
@@ -10988,7 +10992,7 @@
10988
10992
  </span>
10989
10993
  <span>${Math.round(r.a*100)}%</span>
10990
10994
  </div>
10991
- `:Ir.nothing}
10995
+ `:Vr.nothing}
10992
10996
  </div>
10993
10997
 
10994
10998
  <div class="grid">
@@ -11026,9 +11030,9 @@
11026
11030
  </div>
11027
11031
  </div>
11028
11032
 
11029
- ${h.length?Ir.html`
11033
+ ${h.length?Vr.html`
11030
11034
  <div class="swatches" part="presets">
11031
- ${h.map(f=>{let x=us(f),k=ka(x,!1);return Ir.html`
11035
+ ${h.map(f=>{let x=us(f),k=ka(x,!1);return Vr.html`
11032
11036
  <button
11033
11037
  type="button"
11034
11038
  class="preset"
@@ -11039,14 +11043,14 @@
11039
11043
  ></button>
11040
11044
  `})}
11041
11045
  </div>
11042
- `:Ir.nothing}
11046
+ `:Vr.nothing}
11043
11047
 
11044
11048
  <div class="footer">
11045
11049
  <span class="format-pill">${this.format.toUpperCase()} · RGB / HSL 可编辑</span>
11046
11050
  <button type="button" class="copy-btn" @click=${()=>this._copyValue()}>复制值</button>
11047
11051
  </div>
11048
11052
  </div>
11049
- `}render(){let e=this._rgb,t=`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${_i(e.a,3)})`,r=["control-shell","trigger",this.open?"open":"",this.disabled?"disabled":""].filter(Boolean).join(" "),n=this.clearable&&this.value&&!this.disabled&&!this.readonly;return Ir.html`
11053
+ `}render(){let e=this._rgb,t=`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${_i(e.a,3)})`,r=["control-shell","trigger",this.open?"open":"",this.disabled?"disabled":""].filter(Boolean).join(" "),n=this.clearable&&this.value&&!this.disabled&&!this.readonly;return Vr.html`
11050
11054
  <lui-dropdown
11051
11055
  .open=${this.open}
11052
11056
  .placement=${this.placement}
@@ -11071,17 +11075,17 @@
11071
11075
  >
11072
11076
  <span class="swatch" part="swatch" style=${`--current-color:${t}`}><span class="swatch-inner"></span></span>
11073
11077
  <span class=${this.value?"value-text":"value-text placeholder"}>${this.value?this._displayValue:this.placeholder}</span>
11074
- ${n?Ir.html`
11078
+ ${n?Vr.html`
11075
11079
  <span class="clear-btn" role="button" aria-label="清除颜色" @click=${this._clear} @pointerdown=${s=>s.stopPropagation()}>
11076
11080
  <lui-icon name="x"></lui-icon>
11077
11081
  </span>
11078
- `:Ir.nothing}
11082
+ `:Vr.nothing}
11079
11083
  <span class="chevron" aria-hidden="true"><lui-icon name="chevron-down"></lui-icon></span>
11080
11084
  </button>
11081
11085
  ${this._panel()}
11082
11086
  </lui-dropdown>
11083
- ${this.name?Ir.html`<input type="hidden" name=${this.name} .value=${this.value} />`:Ir.nothing}
11084
- `}};ot.styles=[A,P,Co,Ir.css`
11087
+ ${this.name?Vr.html`<input type="hidden" name=${this.name} .value=${this.value} />`:Vr.nothing}
11088
+ `}};ot.styles=[A,P,zo,Vr.css`
11085
11089
  :host {
11086
11090
  display: inline-block;
11087
11091
  width: 100%;
@@ -12139,7 +12143,7 @@
12139
12143
  color: var(--lui-color-fg-muted);
12140
12144
  margin-top: 2px;
12141
12145
  }
12142
- `],Bt.FORM_KEYS=new Set(["name","type","label","required","disabled","readonly","hidden","condition","span","xs","sm","md","lg","xl","offset","order","validators","fields","size","labelPlacement","labelWidth","defaultValue","description","min","max","step","length","source","renderControl","renderField","props","addLabel","removeLabel","itemLabel","minItems","maxItems","collapsible","defaultCollapsed","draggable","hiddenLabel","help","tooltip","extra","validateTrigger","onClick"]),Bt._elEvents=new WeakMap,a([(0,qo.property)({attribute:!1})],Bt.prototype,"schema",2),a([(0,qo.property)({type:Boolean,attribute:"show-actions"})],Bt.prototype,"showActions",2),a([(0,qo.property)({reflect:!0})],Bt.prototype,"size",2),a([(0,qo.property)({reflect:!0,attribute:"label-placement"})],Bt.prototype,"labelPlacement",2),a([(0,qo.property)({attribute:"label-width"})],Bt.prototype,"labelWidth",2),a([(0,qo.state)()],Bt.prototype,"_currentStep",2),a([(0,qo.state)()],Bt.prototype,"_isStepPending",2),a([(0,qo.state)()],Bt.prototype,"_submitErrorMessages",2),a([(0,qo.state)()],Bt.prototype,"_submitSuccessMessage",2),Bt=a([(0,qo.customElement)("lui-form")],Bt);var Po=require("lit"),yo=require("lit/decorators.js");var Vr=class extends Po.LitElement{constructor(){super(...arguments);this.source=[];this.direction="horizontal";this.size="md";this.disabled=!1;this.radioProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-radio"||this._select(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}firstUpdated(){this._scheduleSync()}willUpdate(){let e=L(this,"radioGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("size")||e.has("name")||e.has("source")||e.has("radioProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedRadios(),this._syncRenderedRadios()})}_getSlottedRadios(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-radio"):[]}_mergedRadioProps(){return{...L(this,"radioGroup").radioProps??{},...this.radioProps??{}}}_syncRenderedRadios(){if(!this.source.length)return;let e=this._mergedRadioProps();for(let t of this._renderedRadios??[])se(t,e)}_syncSlottedRadios(){if(this.source.length>0)return;let e=this._getSlottedRadios();for(let t of e){let r=t.value??"";t.checked=r===(this.value??""),this.disabled?(t.disabled||t.setAttribute("data-lui-radio-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-radio-group-disabled")&&(t.removeAttribute("data-lui-radio-group-disabled"),t.disabled=!1),t.size=this.size,this.name&&(t.name=this.name)}}_select(e){this.value!==e&&(this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})))}_renderOption(e){let t={...this._mergedRadioProps(),checked:e.value===(this.value??""),value:e.value,label:e.label,description:e.description??"",name:this.name??"",size:e.size??this.size,checkedIcon:e.checkedIcon??this.radioProps.checkedIcon??"",disabled:this.disabled||(e.disabled??!1)};return Po.html`
12146
+ `],Bt.FORM_KEYS=new Set(["name","type","label","required","disabled","readonly","hidden","condition","span","xs","sm","md","lg","xl","offset","order","validators","fields","size","labelPlacement","labelWidth","defaultValue","description","min","max","step","length","source","renderControl","renderField","props","addLabel","removeLabel","itemLabel","minItems","maxItems","collapsible","defaultCollapsed","draggable","hiddenLabel","help","tooltip","extra","validateTrigger","onClick"]),Bt._elEvents=new WeakMap,a([(0,Ko.property)({attribute:!1})],Bt.prototype,"schema",2),a([(0,Ko.property)({type:Boolean,attribute:"show-actions"})],Bt.prototype,"showActions",2),a([(0,Ko.property)({reflect:!0})],Bt.prototype,"size",2),a([(0,Ko.property)({reflect:!0,attribute:"label-placement"})],Bt.prototype,"labelPlacement",2),a([(0,Ko.property)({attribute:"label-width"})],Bt.prototype,"labelWidth",2),a([(0,Ko.state)()],Bt.prototype,"_currentStep",2),a([(0,Ko.state)()],Bt.prototype,"_isStepPending",2),a([(0,Ko.state)()],Bt.prototype,"_submitErrorMessages",2),a([(0,Ko.state)()],Bt.prototype,"_submitSuccessMessage",2),Bt=a([(0,Ko.customElement)("lui-form")],Bt);var Oo=require("lit"),yo=require("lit/decorators.js");var Dr=class extends Oo.LitElement{constructor(){super(...arguments);this.source=[];this.direction="horizontal";this.size="md";this.disabled=!1;this.radioProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-radio"||this._select(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}firstUpdated(){this._scheduleSync()}willUpdate(){let e=L(this,"radioGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("size")||e.has("name")||e.has("source")||e.has("radioProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedRadios(),this._syncRenderedRadios()})}_getSlottedRadios(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-radio"):[]}_mergedRadioProps(){return{...L(this,"radioGroup").radioProps??{},...this.radioProps??{}}}_syncRenderedRadios(){if(!this.source.length)return;let e=this._mergedRadioProps();for(let t of this._renderedRadios??[])se(t,e)}_syncSlottedRadios(){if(this.source.length>0)return;let e=this._getSlottedRadios();for(let t of e){let r=t.value??"";t.checked=r===(this.value??""),this.disabled?(t.disabled||t.setAttribute("data-lui-radio-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-radio-group-disabled")&&(t.removeAttribute("data-lui-radio-group-disabled"),t.disabled=!1),t.size=this.size,this.name&&(t.name=this.name)}}_select(e){this.value!==e&&(this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})))}_renderOption(e){let t={...this._mergedRadioProps(),checked:e.value===(this.value??""),value:e.value,label:e.label,description:e.description??"",name:this.name??"",size:e.size??this.size,checkedIcon:e.checkedIcon??this.radioProps.checkedIcon??"",disabled:this.disabled||(e.disabled??!1)};return Oo.html`
12143
12147
  <lui-radio
12144
12148
  .checked=${t.checked}
12145
12149
  .value=${t.value}
@@ -12151,18 +12155,18 @@
12151
12155
  .disabled=${t.disabled}
12152
12156
  @change=${()=>this._select(e.value)}
12153
12157
  >
12154
- ${e.icon?Po.html`<lui-icon slot="icon" name=${e.icon}></lui-icon>`:Po.nothing}
12158
+ ${e.icon?Oo.html`<lui-icon slot="icon" name=${e.icon}></lui-icon>`:Oo.nothing}
12155
12159
  </lui-radio>
12156
- `}render(){let e=this.source.length>0;return Po.html`
12157
- ${this.label?Po.html`<div class="group-label">${this.label}</div>`:Po.nothing}
12160
+ `}render(){let e=this.source.length>0;return Oo.html`
12161
+ ${this.label?Oo.html`<div class="group-label">${this.label}</div>`:Oo.nothing}
12158
12162
  <div
12159
12163
  class="group ${this.direction==="vertical"?"vertical":""}"
12160
12164
  part="group"
12161
- @change=${e?Po.nothing:this._onSlottedChange}
12165
+ @change=${e?Oo.nothing:this._onSlottedChange}
12162
12166
  >
12163
- ${e?this.source.map(t=>this._renderOption(t)):Po.html`<slot @slotchange=${this._scheduleSync}></slot>`}
12167
+ ${e?this.source.map(t=>this._renderOption(t)):Oo.html`<slot @slotchange=${this._scheduleSync}></slot>`}
12164
12168
  </div>
12165
- `}};Vr.styles=[A,P,Po.css`
12169
+ `}};Dr.styles=[A,P,Oo.css`
12166
12170
  :host {
12167
12171
  display: block;
12168
12172
  }
@@ -12181,12 +12185,12 @@
12181
12185
  color: var(--lui-color-fg);
12182
12186
  margin-bottom: var(--lui-space-1, 4px);
12183
12187
  }
12184
- `],a([(0,yo.property)({attribute:!1})],Vr.prototype,"source",2),a([(0,yo.property)()],Vr.prototype,"value",2),a([(0,yo.property)({reflect:!0})],Vr.prototype,"direction",2),a([(0,yo.property)({reflect:!0})],Vr.prototype,"size",2),a([(0,yo.property)()],Vr.prototype,"name",2),a([(0,yo.property)()],Vr.prototype,"label",2),a([(0,yo.property)({type:Boolean})],Vr.prototype,"disabled",2),a([(0,yo.property)({attribute:!1})],Vr.prototype,"radioProps",2),a([(0,yo.query)("slot")],Vr.prototype,"_slotEl",2),a([(0,yo.queryAll)("lui-radio")],Vr.prototype,"_renderedRadios",2),Vr=a([(0,yo.customElement)("lui-radio-group")],Vr);var Xi=require("lit"),qt=require("lit/decorators.js"),Kp=kn(require("flatpickr"),1),Wp=require("flatpickr/dist/l10n/zh.js"),Xw=require("flatpickr/dist/flatpickr.min.css");var Dr=class extends Xi.LitElement{constructor(){super(...arguments);this.value="";this.selectionMode="single";this.size="md";this.disabled=!1;this.showMonths=1;this.defaultDate="";this._fp=null}firstUpdated(){this._init()}disconnectedCallback(){this._destroy(),super.disconnectedCallback()}updated(e){if(this._fp){if(e.has("value")){let t=this._dateInputValue();t?this._fp.setDate(t,!1):this._fp.clear()}(e.has("selectionMode")||e.has("min")||e.has("max")||e.has("disabled")||e.has("showMonths")||e.has("defaultDate"))&&this._init()}}clear(){this.value="",this._fp?.clear(),this._emitChange([],"")}_destroy(){this._fp?.destroy(),this._fp=null,this._hostEl&&(this._hostEl.innerHTML="")}_dateInputValue(){return this.value?this.selectionMode==="range"?this.value.split(" ~ ").map(e=>e.trim()).filter(Boolean):this.value:this.defaultDate||void 0}_init(){if(!this._inputEl||!this._hostEl)return;this._destroy();let e=Math.max(1,Math.min(3,Math.round(this.showMonths||1)));this._fp=(0,Kp.default)(this._inputEl,{locale:Wp.Mandarin,inline:!0,appendTo:this._hostEl,clickOpens:!1,dateFormat:"Y-m-d",mode:this.selectionMode==="range"?"range":"single",conjunction:" ~ ",...this._dateInputValue()?{defaultDate:this._dateInputValue()}:{},minDate:this.min||void 0,maxDate:this.max||void 0,showMonths:e,disableMobile:!0,onReady:()=>{this._fp?.calendarContainer.classList.add("lui-calendar-panel"),this._forceCalendarVisible()},onChange:(t,r)=>{this.disabled||(this.value=r,this._emitChange(t,r))}}),this._forceCalendarVisible(),this.disabled&&(this._fp.input.disabled=!0,this._fp.calendarContainer.style.pointerEvents="none",this._fp.calendarContainer.style.opacity="0.55")}_forceCalendarVisible(){let e=this._fp?.calendarContainer;e&&(e.style.position="static",e.style.display="block",e.style.opacity="1",e.style.visibility="visible",e.style.pointerEvents=this.disabled?"none":"auto")}_emitChange(e,t){let r=t?t.split(" ~ ").map(n=>n.trim()).filter(Boolean):[];this.dispatchEvent(new CustomEvent("change",{detail:{value:t,values:r,dates:e},bubbles:!0,composed:!0}))}render(){return Xi.html`
12188
+ `],a([(0,yo.property)({attribute:!1})],Dr.prototype,"source",2),a([(0,yo.property)()],Dr.prototype,"value",2),a([(0,yo.property)({reflect:!0})],Dr.prototype,"direction",2),a([(0,yo.property)({reflect:!0})],Dr.prototype,"size",2),a([(0,yo.property)()],Dr.prototype,"name",2),a([(0,yo.property)()],Dr.prototype,"label",2),a([(0,yo.property)({type:Boolean})],Dr.prototype,"disabled",2),a([(0,yo.property)({attribute:!1})],Dr.prototype,"radioProps",2),a([(0,yo.query)("slot")],Dr.prototype,"_slotEl",2),a([(0,yo.queryAll)("lui-radio")],Dr.prototype,"_renderedRadios",2),Dr=a([(0,yo.customElement)("lui-radio-group")],Dr);var Xi=require("lit"),qt=require("lit/decorators.js"),Kp=kn(require("flatpickr"),1),Wp=require("flatpickr/dist/l10n/zh.js"),Xw=require("flatpickr/dist/flatpickr.min.css");var Fr=class extends Xi.LitElement{constructor(){super(...arguments);this.value="";this.selectionMode="single";this.size="md";this.disabled=!1;this.showMonths=1;this.defaultDate="";this._fp=null}firstUpdated(){this._init()}disconnectedCallback(){this._destroy(),super.disconnectedCallback()}updated(e){if(this._fp){if(e.has("value")){let t=this._dateInputValue();t?this._fp.setDate(t,!1):this._fp.clear()}(e.has("selectionMode")||e.has("min")||e.has("max")||e.has("disabled")||e.has("showMonths")||e.has("defaultDate"))&&this._init()}}clear(){this.value="",this._fp?.clear(),this._emitChange([],"")}_destroy(){this._fp?.destroy(),this._fp=null,this._hostEl&&(this._hostEl.innerHTML="")}_dateInputValue(){return this.value?this.selectionMode==="range"?this.value.split(" ~ ").map(e=>e.trim()).filter(Boolean):this.value:this.defaultDate||void 0}_init(){if(!this._inputEl||!this._hostEl)return;this._destroy();let e=Math.max(1,Math.min(3,Math.round(this.showMonths||1)));this._fp=(0,Kp.default)(this._inputEl,{locale:Wp.Mandarin,inline:!0,appendTo:this._hostEl,clickOpens:!1,dateFormat:"Y-m-d",mode:this.selectionMode==="range"?"range":"single",conjunction:" ~ ",...this._dateInputValue()?{defaultDate:this._dateInputValue()}:{},minDate:this.min||void 0,maxDate:this.max||void 0,showMonths:e,disableMobile:!0,onReady:()=>{this._fp?.calendarContainer.classList.add("lui-calendar-panel"),this._forceCalendarVisible()},onChange:(t,r)=>{this.disabled||(this.value=r,this._emitChange(t,r))}}),this._forceCalendarVisible(),this.disabled&&(this._fp.input.disabled=!0,this._fp.calendarContainer.style.pointerEvents="none",this._fp.calendarContainer.style.opacity="0.55")}_forceCalendarVisible(){let e=this._fp?.calendarContainer;e&&(e.style.position="static",e.style.display="block",e.style.opacity="1",e.style.visibility="visible",e.style.pointerEvents=this.disabled?"none":"auto")}_emitChange(e,t){let r=t?t.split(" ~ ").map(n=>n.trim()).filter(Boolean):[];this.dispatchEvent(new CustomEvent("change",{detail:{value:t,values:r,dates:e},bubbles:!0,composed:!0}))}render(){return Xi.html`
12185
12189
  <div class="wrap" part="wrap">
12186
12190
  <input class="input" aria-hidden="true" tabindex="-1" ?disabled=${this.disabled} />
12187
12191
  <div class="host" part="calendar"></div>
12188
12192
  </div>
12189
- `}};Dr.styles=[A,P,Xi.css`
12193
+ `}};Fr.styles=[A,P,Xi.css`
12190
12194
  :host {
12191
12195
  display: inline-block;
12192
12196
  max-width: 100%;
@@ -12487,7 +12491,7 @@
12487
12491
  .host .numInputWrapper span.arrowDown:after {
12488
12492
  border-top-color: var(--lui-color-fg-muted);
12489
12493
  }
12490
- `],a([(0,qt.property)()],Dr.prototype,"value",2),a([(0,qt.property)({attribute:"selection-mode",reflect:!0})],Dr.prototype,"selectionMode",2),a([(0,qt.property)({reflect:!0})],Dr.prototype,"size",2),a([(0,qt.property)()],Dr.prototype,"min",2),a([(0,qt.property)()],Dr.prototype,"max",2),a([(0,qt.property)({type:Boolean})],Dr.prototype,"disabled",2),a([(0,qt.property)({type:Number,attribute:"show-months"})],Dr.prototype,"showMonths",2),a([(0,qt.property)({attribute:"default-date"})],Dr.prototype,"defaultDate",2),a([(0,qt.query)(".input")],Dr.prototype,"_inputEl",2),a([(0,qt.query)(".host")],Dr.prototype,"_hostEl",2),Dr=a([(0,qt.customElement)("lui-calendar")],Dr);var Oo=class extends Xi.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u65E5\u671F\u8303\u56F4";this.size="md";this.disabled=!1;this.clearable=!0;this._onChange=e=>{let t=e.detail;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}}render(){return Xi.html`
12494
+ `],a([(0,qt.property)()],Fr.prototype,"value",2),a([(0,qt.property)({attribute:"selection-mode",reflect:!0})],Fr.prototype,"selectionMode",2),a([(0,qt.property)({reflect:!0})],Fr.prototype,"size",2),a([(0,qt.property)()],Fr.prototype,"min",2),a([(0,qt.property)()],Fr.prototype,"max",2),a([(0,qt.property)({type:Boolean})],Fr.prototype,"disabled",2),a([(0,qt.property)({type:Number,attribute:"show-months"})],Fr.prototype,"showMonths",2),a([(0,qt.property)({attribute:"default-date"})],Fr.prototype,"defaultDate",2),a([(0,qt.query)(".input")],Fr.prototype,"_inputEl",2),a([(0,qt.query)(".host")],Fr.prototype,"_hostEl",2),Fr=a([(0,qt.customElement)("lui-calendar")],Fr);var Ho=class extends Xi.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u65E5\u671F\u8303\u56F4";this.size="md";this.disabled=!1;this.clearable=!0;this._onChange=e=>{let t=e.detail;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}}render(){return Xi.html`
12491
12495
  <lui-datepicker
12492
12496
  type="date"
12493
12497
  selection-mode="range"
@@ -12500,7 +12504,7 @@
12500
12504
  .clearable=${this.clearable}
12501
12505
  @change=${this._onChange}
12502
12506
  ></lui-datepicker>
12503
- `}};Oo.styles=[A,P,Xi.css`:host{display:block;width:100%;}`],a([(0,qt.property)()],Oo.prototype,"value",2),a([(0,qt.property)()],Oo.prototype,"placeholder",2),a([(0,qt.property)({reflect:!0})],Oo.prototype,"size",2),a([(0,qt.property)()],Oo.prototype,"min",2),a([(0,qt.property)()],Oo.prototype,"max",2),a([(0,qt.property)({type:Boolean})],Oo.prototype,"disabled",2),a([(0,qt.property)({type:Boolean})],Oo.prototype,"clearable",2),Oo=a([(0,qt.customElement)("lui-date-range-picker")],Oo);var mr=require("lit"),Te=require("lit/decorators.js");var Up=kn(ra(),1);function vd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function Gp(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,Up.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let k=o.getBoundingClientRect(),C=t-k.width,$=window.innerWidth-t,z=r-k.height,T=window.innerHeight-r,j=Math.min($,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(z,p.top+x.dy));p={left:j,top:H},vd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},vd(o,p),h?.(p)},getState(){return{...p}},setState(x,k){p={left:x.left??p.left,top:x.top??p.top},k?.apply!==!1&&vd(o,p),k?.notify!==!1&&h?.(p)}}}var bd=kn(ra(),1);function xl(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function _a(i,o,e){return Math.min(e,Math.max(o,i))}function Ag(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function jg(i,o,e){let r=window.getComputedStyle(i),n=xl(r.minWidth)??o,s=xl(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(xl(r.maxWidth)??d,d),f=Math.min(xl(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function Yp(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function Xp(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),k={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,bd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[bd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start($){h?.(Ag($.edges))},move($){let z=jg(o,s,d),T=k.left,j=k.top,H=k.width,I=k.height;if($.edges?.left){let B=k.left+k.width,S=B-z.minWidth;T=_a(k.left+$.deltaRect.left,z.viewportMargin,S),H=_a(B-T,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-T)),T=B-H}else $.edges?.right&&(H=_a($.rect.width,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-k.left)));if($.edges?.top){let B=k.top+k.height,S=B-z.minHeight;j=_a(k.top+$.deltaRect.top,z.viewportMargin,S),I=_a(B-j,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-j)),j=B-I}else $.edges?.bottom&&(I=_a($.rect.height,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-k.top)));k={left:T,top:j,width:H,height:I},Yp(o,k),f?.({...k})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...k}},setState($,z){k={left:$.left??k.left,top:$.top??k.top,width:$.width??k.width,height:$.height??k.height},z?.apply!==!1&&Yp(o,k),z?.notify!==!1&&f?.({...k})}}}var Pg=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Og=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),gs=0,Zp={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function wl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Hg(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Rg(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(Pg)?!0:Og.has(i.tagName.toLowerCase())}function Ig(i,o){if(!(i instanceof HTMLElement)||i===o||!wl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var Me=class extends mr.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(Cn(h,this)||h.some(p=>Ig(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Hg(this.ownerDocument),n=t.findIndex(h=>h===r||wl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&wl(this,s))||Cn(t,this)||Date.now()<this._suppressBackdropClickUntil||Xa(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&wl(this,d)),s=Cn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=L(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Rg(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(gs===0&&(this.ownerDocument.body.style.overflow="hidden"),gs+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(gs=Math.max(0,gs-1),gs===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||Qa(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Yo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Sr(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=Gp({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=Xp({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:Ot(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):mr.nothing}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return mr.html`
12507
+ `}};Ho.styles=[A,P,Xi.css`:host{display:block;width:100%;}`],a([(0,qt.property)()],Ho.prototype,"value",2),a([(0,qt.property)()],Ho.prototype,"placeholder",2),a([(0,qt.property)({reflect:!0})],Ho.prototype,"size",2),a([(0,qt.property)()],Ho.prototype,"min",2),a([(0,qt.property)()],Ho.prototype,"max",2),a([(0,qt.property)({type:Boolean})],Ho.prototype,"disabled",2),a([(0,qt.property)({type:Boolean})],Ho.prototype,"clearable",2),Ho=a([(0,qt.customElement)("lui-date-range-picker")],Ho);var mr=require("lit"),Te=require("lit/decorators.js");var Up=kn(ra(),1);function vd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function Gp(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,Up.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let k=o.getBoundingClientRect(),C=t-k.width,$=window.innerWidth-t,z=r-k.height,T=window.innerHeight-r,j=Math.min($,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(z,p.top+x.dy));p={left:j,top:H},vd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},vd(o,p),h?.(p)},getState(){return{...p}},setState(x,k){p={left:x.left??p.left,top:x.top??p.top},k?.apply!==!1&&vd(o,p),k?.notify!==!1&&h?.(p)}}}var bd=kn(ra(),1);function xl(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function _a(i,o,e){return Math.min(e,Math.max(o,i))}function Ag(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function jg(i,o,e){let r=window.getComputedStyle(i),n=xl(r.minWidth)??o,s=xl(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(xl(r.maxWidth)??d,d),f=Math.min(xl(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function Yp(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function Xp(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),k={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,bd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[bd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start($){h?.(Ag($.edges))},move($){let z=jg(o,s,d),T=k.left,j=k.top,H=k.width,I=k.height;if($.edges?.left){let B=k.left+k.width,S=B-z.minWidth;T=_a(k.left+$.deltaRect.left,z.viewportMargin,S),H=_a(B-T,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-T)),T=B-H}else $.edges?.right&&(H=_a($.rect.width,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-k.left)));if($.edges?.top){let B=k.top+k.height,S=B-z.minHeight;j=_a(k.top+$.deltaRect.top,z.viewportMargin,S),I=_a(B-j,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-j)),j=B-I}else $.edges?.bottom&&(I=_a($.rect.height,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-k.top)));k={left:T,top:j,width:H,height:I},Yp(o,k),f?.({...k})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...k}},setState($,z){k={left:$.left??k.left,top:$.top??k.top,width:$.width??k.width,height:$.height??k.height},z?.apply!==!1&&Yp(o,k),z?.notify!==!1&&f?.({...k})}}}var Pg=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Og=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),gs=0,Zp={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function wl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Hg(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Rg(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(Pg)?!0:Og.has(i.tagName.toLowerCase())}function Ig(i,o){if(!(i instanceof HTMLElement)||i===o||!wl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var Me=class extends mr.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(Cn(h,this)||h.some(p=>Ig(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Hg(this.ownerDocument),n=t.findIndex(h=>h===r||wl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&wl(this,s))||Cn(t,this)||Date.now()<this._suppressBackdropClickUntil||Xa(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&wl(this,d)),s=Cn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=L(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Rg(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(gs===0&&(this.ownerDocument.body.style.overflow="hidden"),gs+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(gs=Math.max(0,gs-1),gs===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||Qa(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Yo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Tr(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=Gp({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=Xp({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:Ot(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):mr.nothing}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return mr.html`
12504
12508
  <div
12505
12509
  part="custom-backdrop"
12506
12510
  style=${this.backdropStyle||mr.nothing}
@@ -12889,7 +12893,7 @@
12889
12893
  touch-action: none;
12890
12894
  user-select: none;
12891
12895
  -webkit-user-select: none;
12892
- color: var(--lui-color-primary);
12896
+ color: var(--lui-color-border-strong);
12893
12897
  }
12894
12898
  .resize-handle::after {
12895
12899
  content: "";
@@ -13010,6 +13014,10 @@
13010
13014
  right: -1px;
13011
13015
  border-right: 1px solid currentColor;
13012
13016
  }
13017
+ dialog.resizing {
13018
+ /* 拖拽高亮:整框描边变亮,提示正在缩放;hover 仍只靠光标,不画线 */
13019
+ border-color: var(--lui-color-border-strong);
13020
+ }
13013
13021
  dialog.resizing,
13014
13022
  dialog.resizing [part="body"] {
13015
13023
  pointer-events: none;
@@ -13035,20 +13043,20 @@
13035
13043
  0 0 0 2px color-mix(in srgb, var(--lui-color-primary) 24%, transparent);
13036
13044
  }
13037
13045
  }
13038
- `],a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([(0,Te.property)()],Me.prototype,"title",2),a([(0,Te.property)({type:Boolean,attribute:"no-close"})],Me.prototype,"noClose",2),a([(0,Te.property)({attribute:"close-on-outside-press",reflect:!0,converter:Zp})],Me.prototype,"closeOnOutsidePress",2),a([(0,Te.property)({attribute:"shake-on-outside-click",reflect:!0,converter:Zp})],Me.prototype,"shakeOnOutsideClick",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-header"})],Me.prototype,"noHeader",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-footer"})],Me.prototype,"noFooter",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"draggable",2),a([(0,Te.property)({attribute:"drag-handle"})],Me.prototype,"dragHandle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"resizable",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],Me.prototype,"destroyOnClose",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"fullscreen",2),a([(0,Te.property)()],Me.prototype,"width",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-x"})],Me.prototype,"dragVisibleMarginX",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-y"})],Me.prototype,"dragVisibleMarginY",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"placement",2),a([(0,Te.property)()],Me.prototype,"offset",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"backdrop",2),a([(0,Te.property)({attribute:"backdrop-style"})],Me.prototype,"backdropStyle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"portal",2),a([(0,Te.property)({attribute:"overlay-layer"})],Me.prototype,"overlayLayer",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"container",2),a([(0,Te.property)()],Me.prototype,"locale",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"translations",2),a([(0,Te.query)("dialog")],Me.prototype,"_dialog",2),a([(0,Te.query)('[part="header"]')],Me.prototype,"_headerEl",2),a([(0,Te.state)()],Me.prototype,"_shaking",2),a([(0,Te.state)()],Me.prototype,"_opening",2),a([(0,Te.state)()],Me.prototype,"_resizing",2),a([(0,Te.state)()],Me.prototype,"_activeResizeHandle",2),Me=a([(0,Te.customElement)("lui-dialog")],Me);var Ho=require("lit"),vt=require("lit/decorators.js");var Qp={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}},it=class extends Ho.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.placement="right";this.radius="lg";this.backdrop="opaque";this.backdropStyle="";this.noClose=!1;this.noHeader=!1;this.noFooter=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.portal=!1;this.overlayLayer="modal";this._present=!1;this._opening=!1;this._shaking=!1;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._shakeTimer=0;this._shakeAnimation=null;this._openingTimer=0;this._closeTimer=0;this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this._isTopmost())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),window.clearTimeout(this._shakeTimer),this._shakeAnimation?.cancel(),this._shakeAnimation=null,window.clearTimeout(this._openingTimer),window.clearTimeout(this._closeTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}willUpdate(e){e.has("open")&&(window.clearTimeout(this._closeTimer),this.open&&(this._present=!0,this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},280)));let t=L(this,"drawer");!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&(this.placement=t.placement),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&(this.radius=t.radius),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&(this.noClose=t.noClose),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this),e.has("open")&&this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1,window.clearTimeout(this._closeTimer),this._closeTimer=window.setTimeout(()=>{this.open||(this._present=!1,this._releaseOverlayStack(),this._restorePortalPlacement())},280))}show(){this.open||(this.portal&&this._moveToPortalLayer(),this._present=!0,this.open=!0)}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}_isTopmost(){return!this._overlayStackRegistered||Qa(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Yo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Sr(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-drawer-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder.parentNode;this._isPortalMoving=!0;try{e&&e.insertBefore(this,this._portalPlaceholder),this._portalPlaceholder.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}async _shake(){if(!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._opening=!1,this._shaking=!1,await this.updateComplete,!this.open))return;let e=this._panelEl;if(!e)return;this._shakeAnimation?.cancel();let r=this.placement==="left"||this.placement==="right"?[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(-10px, 0, 0)",offset:.18},{transform:"translate3d(10px, 0, 0)",offset:.36},{transform:"translate3d(-6px, 0, 0)",offset:.54},{transform:"translate3d(6px, 0, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}]:[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(0, -10px, 0)",offset:.18},{transform:"translate3d(0, 10px, 0)",offset:.36},{transform:"translate3d(0, -6px, 0)",offset:.54},{transform:"translate3d(0, 6px, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}];if(typeof e.animate=="function"){this._shakeAnimation=e.animate(r,{duration:380,easing:"cubic-bezier(0.36, 0.07, 0.19, 0.97)"}),this._shakeAnimation.onfinish=()=>{this._shakeAnimation=null},this._shakeAnimation.oncancel=()=>{this._shakeAnimation=null};return}e.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}render(){if(!this.open&&!this._present)return Ho.nothing;let e=Array.from(this.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot==="footer");return Ho.html`
13046
+ `],a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([(0,Te.property)()],Me.prototype,"title",2),a([(0,Te.property)({type:Boolean,attribute:"no-close"})],Me.prototype,"noClose",2),a([(0,Te.property)({attribute:"close-on-outside-press",reflect:!0,converter:Zp})],Me.prototype,"closeOnOutsidePress",2),a([(0,Te.property)({attribute:"shake-on-outside-click",reflect:!0,converter:Zp})],Me.prototype,"shakeOnOutsideClick",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-header"})],Me.prototype,"noHeader",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-footer"})],Me.prototype,"noFooter",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"draggable",2),a([(0,Te.property)({attribute:"drag-handle"})],Me.prototype,"dragHandle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"resizable",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],Me.prototype,"destroyOnClose",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"fullscreen",2),a([(0,Te.property)()],Me.prototype,"width",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-x"})],Me.prototype,"dragVisibleMarginX",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-y"})],Me.prototype,"dragVisibleMarginY",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"placement",2),a([(0,Te.property)()],Me.prototype,"offset",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"backdrop",2),a([(0,Te.property)({attribute:"backdrop-style"})],Me.prototype,"backdropStyle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"portal",2),a([(0,Te.property)({attribute:"overlay-layer"})],Me.prototype,"overlayLayer",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"container",2),a([(0,Te.property)()],Me.prototype,"locale",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"translations",2),a([(0,Te.query)("dialog")],Me.prototype,"_dialog",2),a([(0,Te.query)('[part="header"]')],Me.prototype,"_headerEl",2),a([(0,Te.state)()],Me.prototype,"_shaking",2),a([(0,Te.state)()],Me.prototype,"_opening",2),a([(0,Te.state)()],Me.prototype,"_resizing",2),a([(0,Te.state)()],Me.prototype,"_activeResizeHandle",2),Me=a([(0,Te.customElement)("lui-dialog")],Me);var Ro=require("lit"),vt=require("lit/decorators.js");var Qp={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}},it=class extends Ro.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.placement="right";this.radius="lg";this.backdrop="opaque";this.backdropStyle="";this.noClose=!1;this.noHeader=!1;this.noFooter=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.portal=!1;this.overlayLayer="modal";this._present=!1;this._opening=!1;this._shaking=!1;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._shakeTimer=0;this._shakeAnimation=null;this._openingTimer=0;this._closeTimer=0;this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this._isTopmost())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),window.clearTimeout(this._shakeTimer),this._shakeAnimation?.cancel(),this._shakeAnimation=null,window.clearTimeout(this._openingTimer),window.clearTimeout(this._closeTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}willUpdate(e){e.has("open")&&(window.clearTimeout(this._closeTimer),this.open&&(this._present=!0,this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},280)));let t=L(this,"drawer");!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&(this.placement=t.placement),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&(this.radius=t.radius),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&(this.noClose=t.noClose),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this),e.has("open")&&this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1,window.clearTimeout(this._closeTimer),this._closeTimer=window.setTimeout(()=>{this.open||(this._present=!1,this._releaseOverlayStack(),this._restorePortalPlacement())},280))}show(){this.open||(this.portal&&this._moveToPortalLayer(),this._present=!0,this.open=!0)}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}_isTopmost(){return!this._overlayStackRegistered||Qa(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Yo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Tr(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-drawer-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder.parentNode;this._isPortalMoving=!0;try{e&&e.insertBefore(this,this._portalPlaceholder),this._portalPlaceholder.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}async _shake(){if(!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._opening=!1,this._shaking=!1,await this.updateComplete,!this.open))return;let e=this._panelEl;if(!e)return;this._shakeAnimation?.cancel();let r=this.placement==="left"||this.placement==="right"?[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(-10px, 0, 0)",offset:.18},{transform:"translate3d(10px, 0, 0)",offset:.36},{transform:"translate3d(-6px, 0, 0)",offset:.54},{transform:"translate3d(6px, 0, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}]:[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(0, -10px, 0)",offset:.18},{transform:"translate3d(0, 10px, 0)",offset:.36},{transform:"translate3d(0, -6px, 0)",offset:.54},{transform:"translate3d(0, 6px, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}];if(typeof e.animate=="function"){this._shakeAnimation=e.animate(r,{duration:380,easing:"cubic-bezier(0.36, 0.07, 0.19, 0.97)"}),this._shakeAnimation.onfinish=()=>{this._shakeAnimation=null},this._shakeAnimation.oncancel=()=>{this._shakeAnimation=null};return}e.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}render(){if(!this.open&&!this._present)return Ro.nothing;let e=Array.from(this.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot==="footer");return Ro.html`
13039
13047
  <div class="backdrop" part="backdrop" @pointerdown=${this._onBackdropPointerDown}></div>
13040
- <div class="custom-backdrop" part="custom-backdrop" style=${this.backdropStyle||Ho.nothing} ?hidden=${this.backdrop!=="custom"} @pointerdown=${this._onBackdropPointerDown}>
13048
+ <div class="custom-backdrop" part="custom-backdrop" style=${this.backdropStyle||Ro.nothing} ?hidden=${this.backdrop!=="custom"} @pointerdown=${this._onBackdropPointerDown}>
13041
13049
  <slot name="backdrop"></slot>
13042
13050
  </div>
13043
- <section class=${`panel ${this._opening?"opening":""} ${this._shaking?"shaking":""}`.trim()} part="panel" role="dialog" aria-modal="true" aria-label=${this.title||Ho.nothing}>
13051
+ <section class=${`panel ${this._opening?"opening":""} ${this._shaking?"shaking":""}`.trim()} part="panel" role="dialog" aria-modal="true" aria-label=${this.title||Ro.nothing}>
13044
13052
  <header part="header">
13045
13053
  <slot name="title"><h3 part="title">${this.title}</h3></slot>
13046
- ${this.noClose?Ho.nothing:Ho.html`<lui-button class="close" part="close" variant="ghost" icon="x" icon-only aria-label=${this._t("dialog.close_aria","\u5173\u95ED")} @click=${()=>this.close()}></lui-button>`}
13054
+ ${this.noClose?Ro.nothing:Ro.html`<lui-button class="close" part="close" variant="ghost" icon="x" icon-only aria-label=${this._t("dialog.close_aria","\u5173\u95ED")} @click=${()=>this.close()}></lui-button>`}
13047
13055
  </header>
13048
13056
  <main part="body"><slot></slot></main>
13049
- ${e&&!this.noFooter?Ho.html`<footer part="footer"><slot name="footer"></slot></footer>`:Ho.nothing}
13057
+ ${e&&!this.noFooter?Ro.html`<footer part="footer"><slot name="footer"></slot></footer>`:Ro.nothing}
13050
13058
  </section>
13051
- `}};it.styles=[A,P,Ho.css`
13059
+ `}};it.styles=[A,P,Ro.css`
13052
13060
  :host {
13053
13061
  position: fixed;
13054
13062
  inset: 0;
@@ -13560,7 +13568,7 @@
13560
13568
  .panel { max-height: calc(100vh - 28px); }
13561
13569
  .footer { display: none; }
13562
13570
  }
13563
- `],a([(0,$r.property)({type:Boolean,reflect:!0})],lr.prototype,"open",2),a([(0,$r.property)({attribute:!1})],lr.prototype,"items",2),a([(0,$r.property)({reflect:!0})],lr.prototype,"size",2),a([(0,$r.property)({reflect:!0})],lr.prototype,"backdrop",2),a([(0,$r.property)()],lr.prototype,"placeholder",2),a([(0,$r.property)({attribute:"empty-text"})],lr.prototype,"emptyText",2),a([(0,$r.property)()],lr.prototype,"hotkey",2),a([(0,$r.property)({type:Boolean,attribute:"close-on-select"})],lr.prototype,"closeOnSelect",2),a([(0,$r.property)({type:Boolean,attribute:"close-on-outside-press"})],lr.prototype,"closeOnOutsidePress",2),a([(0,$r.property)({type:Boolean,attribute:"show-footer"})],lr.prototype,"showFooter",2),a([(0,$r.state)()],lr.prototype,"_query",2),a([(0,$r.state)()],lr.prototype,"_activeIndex",2),a([(0,$r.query)("input")],lr.prototype,"_inputEl",2),lr=a([(0,$r.customElement)("lui-command-palette")],lr);var ko=require("lit"),Ko=require("lit/decorators.js");var Fg={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},Ng={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Nn(i){return i?Fg[i]??null:null}function ji(i){let o=Nn(i);return o?Ng[o]:""}function e1(i,o=!1){let e=Nn(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function Lg(i,o=!1){let e=e1(i,o);return e?`var(${e})`:""}var Bg=Object.freeze(["info","success","warning","danger"]);var Fr=class extends ko.LitElement{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}close(){let e=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e)&&(this.hidden=!0)}render(){let e=L(this,"alert"),t=Nn(this.status)??"info",r=e.variant??this.variant,n=this.icon||ji(t),s=!this.noIcon&&n!=="";return ko.html`
13571
+ `],a([(0,$r.property)({type:Boolean,reflect:!0})],lr.prototype,"open",2),a([(0,$r.property)({attribute:!1})],lr.prototype,"items",2),a([(0,$r.property)({reflect:!0})],lr.prototype,"size",2),a([(0,$r.property)({reflect:!0})],lr.prototype,"backdrop",2),a([(0,$r.property)()],lr.prototype,"placeholder",2),a([(0,$r.property)({attribute:"empty-text"})],lr.prototype,"emptyText",2),a([(0,$r.property)()],lr.prototype,"hotkey",2),a([(0,$r.property)({type:Boolean,attribute:"close-on-select"})],lr.prototype,"closeOnSelect",2),a([(0,$r.property)({type:Boolean,attribute:"close-on-outside-press"})],lr.prototype,"closeOnOutsidePress",2),a([(0,$r.property)({type:Boolean,attribute:"show-footer"})],lr.prototype,"showFooter",2),a([(0,$r.state)()],lr.prototype,"_query",2),a([(0,$r.state)()],lr.prototype,"_activeIndex",2),a([(0,$r.query)("input")],lr.prototype,"_inputEl",2),lr=a([(0,$r.customElement)("lui-command-palette")],lr);var xo=require("lit"),ko=require("lit/decorators.js");var Fg={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},Ng={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Nn(i){return i?Fg[i]??null:null}function ji(i){let o=Nn(i);return o?Ng[o]:""}function e1(i,o=!1){let e=Nn(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function Lg(i,o=!1){let e=e1(i,o);return e?`var(${e})`:""}var Bg=Object.freeze(["info","success","warning","danger"]);var Sr=class extends xo.LitElement{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1;this._hasActions=!1;this._onActionsSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasActions!==r&&(this._hasActions=r)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}close(){let e=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e)&&(this.hidden=!0)}render(){let e=L(this,"alert"),t=Nn(this.status)??"info",r=e.variant??this.variant,n=this.icon||ji(t),s=!this.noIcon&&n!=="";return xo.html`
13564
13572
  <div
13565
13573
  class="alert"
13566
13574
  part="base"
@@ -13568,14 +13576,16 @@
13568
13576
  style=${`--lui-alert-accent:var(--lui-color-${t});--lui-alert-accent-soft:var(--lui-color-${t}-soft);`}
13569
13577
  data-variant=${r}
13570
13578
  >
13571
- ${s?ko.html`<span part="icon"><lui-icon name=${n}></lui-icon></span>`:ko.nothing}
13579
+ ${s?xo.html`<span part="icon"><lui-icon name=${n}></lui-icon></span>`:xo.nothing}
13572
13580
  <div part="body">
13573
- ${this.title?ko.html`<div part="title">${this.title}</div>`:ko.nothing}
13574
- ${this.description?ko.html`<div part="description">${this.description}</div>`:ko.nothing}
13581
+ ${this.title?xo.html`<div part="title">${this.title}</div>`:xo.nothing}
13582
+ ${this.description?xo.html`<div part="description">${this.description}</div>`:xo.nothing}
13575
13583
  <slot></slot>
13576
- <div part="actions"><slot name="actions"></slot></div>
13584
+ <div part="actions" data-empty=${this._hasActions?"false":"true"}>
13585
+ <slot name="actions" @slotchange=${this._onActionsSlotChange}></slot>
13586
+ </div>
13577
13587
  </div>
13578
- ${this.closable?ko.html`
13588
+ ${this.closable?xo.html`
13579
13589
  <lui-button
13580
13590
  part="close"
13581
13591
  variant="ghost"
@@ -13584,9 +13594,9 @@
13584
13594
  aria-label=${this._t("common.close","Close")}
13585
13595
  @click=${this.close}
13586
13596
  ></lui-button>
13587
- `:ko.nothing}
13597
+ `:xo.nothing}
13588
13598
  </div>
13589
- `}};Fr.styles=[A,P,ko.css`
13599
+ `}};Sr.styles=[A,P,xo.css`
13590
13600
  :host {
13591
13601
  display: block;
13592
13602
  --lui-alert-radius: var(--lui-radius);
@@ -13661,14 +13671,17 @@
13661
13671
  :host([variant="solid"]) [part="description"] {
13662
13672
  color: color-mix(in srgb, #fff 82%, transparent);
13663
13673
  }
13664
- /* Only present when there is a title above it, so it never adds a gap to a
13665
- * single-line alert. */
13666
- [part="actions"]:not(:empty) {
13674
+ /* 留出间距只在真的放了动作按钮时——:not(:empty) 在这里永远为真(容器里
13675
+ * 始终有一个 <slot> 元素节点),所以用 slotchange 把空状态标出来。 */
13676
+ [part="actions"] {
13667
13677
  margin-top: 8px;
13668
13678
  display: flex;
13669
13679
  flex-wrap: wrap;
13670
13680
  gap: 8px;
13671
13681
  }
13682
+ [part="actions"][data-empty="true"] {
13683
+ display: none;
13684
+ }
13672
13685
  [part="close"] {
13673
13686
  flex-shrink: 0;
13674
13687
  --lui-button-height: 22px;
@@ -13683,7 +13696,7 @@
13683
13696
  --lui-color-fg: #fff;
13684
13697
  --lui-color-bg-hover: color-mix(in srgb, #fff 18%, transparent);
13685
13698
  }
13686
- `],a([(0,Ko.property)({reflect:!0})],Fr.prototype,"status",2),a([(0,Ko.property)({reflect:!0})],Fr.prototype,"variant",2),a([(0,Ko.property)({reflect:!0})],Fr.prototype,"radius",2),a([(0,Ko.property)()],Fr.prototype,"title",2),a([(0,Ko.property)()],Fr.prototype,"description",2),a([(0,Ko.property)()],Fr.prototype,"icon",2),a([(0,Ko.property)({type:Boolean,attribute:"no-icon",reflect:!0})],Fr.prototype,"noIcon",2),a([(0,Ko.property)({type:Boolean,reflect:!0})],Fr.prototype,"closable",2),a([(0,Ko.property)({reflect:!0})],Fr.prototype,"locale",2),a([(0,Ko.property)({attribute:!1})],Fr.prototype,"translations",2),Fr=a([(0,Ko.customElement)("lui-alert")],Fr);var Wo=require("lit"),Pt=require("lit/decorators.js");var bt=class extends Wo.LitElement{constructor(){super(...arguments);this.title="";this.description="";this.status="warning";this.icon="";this.noIcon=!1;this.placement="top";this.confirmText="";this.cancelText="";this.disabled=!1;this.portal=!0;this.offsetDistance=8;this._loading=!1;this._onCancel=()=>{this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.hide()};this._onConfirmClick=async()=>{if(this._loading)return;let e=new CustomEvent("confirm",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(e)){if(!this.onConfirm){this.hide();return}this._loading=!0;try{await this.onConfirm(),this.hide()}catch(t){this.dispatchEvent(new CustomEvent("confirm-error",{bubbles:!0,composed:!0,detail:{error:t}}))}finally{this._loading=!1}}}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}show(){this._popover?.show()}hide(){this._popover?.hide()}render(){let e=L(this,"popconfirm"),t=Nn(this.status)??"warning",r=this.icon||ji(t),n=!this.noIcon&&r!=="",s=this.confirmVariant??e.confirmVariant??(t==="danger"?"danger":"primary"),d=this.cancelVariant??e.cancelVariant??"ghost";return Wo.html`
13699
+ `],a([(0,ko.property)({reflect:!0})],Sr.prototype,"status",2),a([(0,ko.property)({reflect:!0})],Sr.prototype,"variant",2),a([(0,ko.property)({reflect:!0})],Sr.prototype,"radius",2),a([(0,ko.property)()],Sr.prototype,"title",2),a([(0,ko.property)()],Sr.prototype,"description",2),a([(0,ko.property)()],Sr.prototype,"icon",2),a([(0,ko.property)({type:Boolean,attribute:"no-icon",reflect:!0})],Sr.prototype,"noIcon",2),a([(0,ko.property)({type:Boolean,reflect:!0})],Sr.prototype,"closable",2),a([(0,ko.property)({reflect:!0})],Sr.prototype,"locale",2),a([(0,ko.property)({attribute:!1})],Sr.prototype,"translations",2),a([(0,ko.state)()],Sr.prototype,"_hasActions",2),Sr=a([(0,ko.customElement)("lui-alert")],Sr);var Wo=require("lit"),Pt=require("lit/decorators.js");var bt=class extends Wo.LitElement{constructor(){super(...arguments);this.title="";this.description="";this.status="warning";this.icon="";this.noIcon=!1;this.placement="top";this.confirmText="";this.cancelText="";this.disabled=!1;this.portal=!0;this.offsetDistance=8;this._loading=!1;this._onCancel=()=>{this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.hide()};this._onConfirmClick=async()=>{if(this._loading)return;let e=new CustomEvent("confirm",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(e)){if(!this.onConfirm){this.hide();return}this._loading=!0;try{await this.onConfirm(),this.hide()}catch(t){this.dispatchEvent(new CustomEvent("confirm-error",{bubbles:!0,composed:!0,detail:{error:t}}))}finally{this._loading=!1}}}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}show(){this._popover?.show()}hide(){this._popover?.hide()}render(){let e=L(this,"popconfirm"),t=Nn(this.status)??"warning",r=this.icon||ji(t),n=!this.noIcon&&r!=="",s=this.confirmVariant??e.confirmVariant??(t==="danger"?"danger":"primary"),d=this.cancelVariant??e.cancelVariant??"ghost";return Wo.html`
13687
13700
  <lui-popover
13688
13701
  trigger="click"
13689
13702
  .placement=${this.placement}
@@ -14082,7 +14095,7 @@
14082
14095
  `):Lr.html`<div part="empty">${this._t("select.empty","\u6CA1\u6709\u53EF\u9009\u9879")}</div>`}
14083
14096
  </div>
14084
14097
  </lui-popover>
14085
- `}};ht.styles=[A,P,Co,Sn,Lr.css`
14098
+ `}};ht.styles=[A,P,zo,Sn,Lr.css`
14086
14099
  :host {
14087
14100
  display: inline-block;
14088
14101
  width: 100%;
@@ -14254,7 +14267,7 @@
14254
14267
  ></lui-tree>
14255
14268
  </div>
14256
14269
  </lui-popover>
14257
- `}};pt.styles=[A,P,Co,oi.css`
14270
+ `}};pt.styles=[A,P,zo,oi.css`
14258
14271
  :host {
14259
14272
  display: inline-block;
14260
14273
  width: 100%;
@@ -14329,9 +14342,9 @@
14329
14342
  overscroll-behavior: contain;
14330
14343
  scrollbar-width: thin;
14331
14344
  }
14332
- `],a([(0,Ct.property)({attribute:!1})],pt.prototype,"nodes",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"value",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"mode",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"size",2),a([(0,Ct.property)()],pt.prototype,"placeholder",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"clearable",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"invalid",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"filterable",2),a([(0,Ct.property)({type:Boolean,attribute:"check-strictly"})],pt.prototype,"checkStrictly",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"childrenLoader",2),a([(0,Ct.property)({type:Boolean,attribute:"close-on-select"})],pt.prototype,"closeOnSelect",2),a([(0,Ct.property)({type:Boolean})],pt.prototype,"portal",2),a([(0,Ct.property)({type:Boolean,reflect:!0,attribute:"open"})],pt.prototype,"open",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"locale",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"translations",2),a([(0,Ct.state)()],pt.prototype,"_keys",2),a([(0,Ct.query)("lui-popover")],pt.prototype,"_popover",2),a([(0,Ct.query)("lui-tree")],pt.prototype,"_tree",2),pt=a([(0,Ct.customElement)("lui-tree-select")],pt);var Ro=require("lit"),zt=require("lit/decorators.js");function Kg(i){return typeof i=="string"?{label:i,value:i}:i}var mt=class extends Ro.LitElement{constructor(){super(...arguments);this.options=[];this.value="";this.placeholder="";this.size="md";this.disabled=!1;this.readonly=!1;this.clearable=!1;this.invalid=!1;this.minChars=1;this.maxItems=0;this.portal=!0;this._matches=[];this._activeIndex=-1;this._open=!1;this._queryToken=0;this._onInput=async e=>{e.stopPropagation();let t=e.target.value??"";this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),await this._recompute(t),this._setOpen(this._shouldOpen(t)&&this._matches.length>0)};this._onFocus=async()=>{this.minChars>0&&!this.value||(await this._recompute(this.value),this._setOpen(this._shouldOpen(this.value)&&this._matches.length>0))};this._onKeyDown=e=>{if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(!this._open){this._onFocus();return}e.preventDefault();let t=this._matches.length;if(!t)return;let r=e.key==="ArrowDown"?1:-1,n=this._activeIndex;for(let s=0;s<t&&(n=(n+r+t)%t,!!this._matches[n]?.disabled);s+=1);this._activeIndex=n;return}if(e.key==="Enter"){let t=this._matches[this._activeIndex];this._open&&t&&(e.preventDefault(),this._commit(t));return}if(e.key==="Escape"){this._open&&(e.stopPropagation(),this._setOpen(!1));return}e.key==="Tab"&&this._setOpen(!1)};this._onClear=()=>{this.value="",this._matches=[],this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _pool(){return this.options.map(Kg)}_defaultFilter(e,t){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.label.toLowerCase().includes(r))}async _recompute(e){let t=++this._queryToken,r=this._pool,n=this.filter?await this.filter(e,r):this._defaultFilter(e,r);if(t!==this._queryToken)return;let s=this.maxItems>0?n.slice(0,this.maxItems):n;this._matches=s,this._activeIndex=s.length?0:-1}_shouldOpen(e){return this.disabled||this.readonly?!1:e.length>=this.minChars}_setOpen(e){this._open!==e&&(this._open=e,e?this._popover?.show():this._popover?.hide())}_commit(e){e.disabled||(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent("select",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}_renderLabel(e){let t=this.value.trim();if(!t)return e;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?e:Ro.html`${e.slice(0,r)}<span class="match"
14345
+ `],a([(0,Ct.property)({attribute:!1})],pt.prototype,"nodes",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"value",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"mode",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"size",2),a([(0,Ct.property)()],pt.prototype,"placeholder",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"clearable",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"invalid",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"filterable",2),a([(0,Ct.property)({type:Boolean,attribute:"check-strictly"})],pt.prototype,"checkStrictly",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"childrenLoader",2),a([(0,Ct.property)({type:Boolean,attribute:"close-on-select"})],pt.prototype,"closeOnSelect",2),a([(0,Ct.property)({type:Boolean})],pt.prototype,"portal",2),a([(0,Ct.property)({type:Boolean,reflect:!0,attribute:"open"})],pt.prototype,"open",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"locale",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"translations",2),a([(0,Ct.state)()],pt.prototype,"_keys",2),a([(0,Ct.query)("lui-popover")],pt.prototype,"_popover",2),a([(0,Ct.query)("lui-tree")],pt.prototype,"_tree",2),pt=a([(0,Ct.customElement)("lui-tree-select")],pt);var Io=require("lit"),zt=require("lit/decorators.js");function Kg(i){return typeof i=="string"?{label:i,value:i}:i}var mt=class extends Io.LitElement{constructor(){super(...arguments);this.options=[];this.value="";this.placeholder="";this.size="md";this.disabled=!1;this.readonly=!1;this.clearable=!1;this.invalid=!1;this.minChars=1;this.maxItems=0;this.portal=!0;this._matches=[];this._activeIndex=-1;this._open=!1;this._queryToken=0;this._onInput=async e=>{e.stopPropagation();let t=e.target.value??"";this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),await this._recompute(t),this._setOpen(this._shouldOpen(t)&&this._matches.length>0)};this._onFocus=async()=>{this.minChars>0&&!this.value||(await this._recompute(this.value),this._setOpen(this._shouldOpen(this.value)&&this._matches.length>0))};this._onKeyDown=e=>{if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(!this._open){this._onFocus();return}e.preventDefault();let t=this._matches.length;if(!t)return;let r=e.key==="ArrowDown"?1:-1,n=this._activeIndex;for(let s=0;s<t&&(n=(n+r+t)%t,!!this._matches[n]?.disabled);s+=1);this._activeIndex=n;return}if(e.key==="Enter"){let t=this._matches[this._activeIndex];this._open&&t&&(e.preventDefault(),this._commit(t));return}if(e.key==="Escape"){this._open&&(e.stopPropagation(),this._setOpen(!1));return}e.key==="Tab"&&this._setOpen(!1)};this._onClear=()=>{this.value="",this._matches=[],this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _pool(){return this.options.map(Kg)}_defaultFilter(e,t){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.label.toLowerCase().includes(r))}async _recompute(e){let t=++this._queryToken,r=this._pool,n=this.filter?await this.filter(e,r):this._defaultFilter(e,r);if(t!==this._queryToken)return;let s=this.maxItems>0?n.slice(0,this.maxItems):n;this._matches=s,this._activeIndex=s.length?0:-1}_shouldOpen(e){return this.disabled||this.readonly?!1:e.length>=this.minChars}_setOpen(e){this._open!==e&&(this._open=e,e?this._popover?.show():this._popover?.hide())}_commit(e){e.disabled||(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent("select",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}_renderLabel(e){let t=this.value.trim();if(!t)return e;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?e:Io.html`${e.slice(0,r)}<span class="match"
14333
14346
  >${e.slice(r,r+t.length)}</span
14334
- >${e.slice(r+t.length)}`}render(){let t=L(this,"autocomplete").size??this.size;return Ro.html`
14347
+ >${e.slice(r+t.length)}`}render(){let t=L(this,"autocomplete").size??this.size;return Io.html`
14335
14348
  <lui-popover
14336
14349
  trigger="manual"
14337
14350
  placement="bottom-start"
@@ -14362,7 +14375,7 @@
14362
14375
  @clear=${this._onClear}
14363
14376
  ></lui-input>
14364
14377
  <div slot="content" class="panel" role="listbox">
14365
- ${this._matches.length?this._matches.map((r,n)=>Ro.html`
14378
+ ${this._matches.length?this._matches.map((r,n)=>Io.html`
14366
14379
  <div
14367
14380
  class="option option-row"
14368
14381
  role="option"
@@ -14372,16 +14385,16 @@
14372
14385
  @mouseenter=${()=>{r.disabled||(this._activeIndex=n)}}
14373
14386
  @click=${()=>this._commit(r)}
14374
14387
  >
14375
- ${r.icon?Ro.html`<lui-icon name=${r.icon}></lui-icon>`:Ro.nothing}
14388
+ ${r.icon?Io.html`<lui-icon name=${r.icon}></lui-icon>`:Io.nothing}
14376
14389
  <span class="option-text">
14377
14390
  <span class="option-label">${this._renderLabel(r.label)}</span>
14378
- ${r.description?Ro.html`<span class="option-description">${r.description}</span>`:Ro.nothing}
14391
+ ${r.description?Io.html`<span class="option-description">${r.description}</span>`:Io.nothing}
14379
14392
  </span>
14380
14393
  </div>
14381
- `):Ro.html`<div class="empty">${this._t("select.empty","\u65E0\u5339\u914D\u9879")}</div>`}
14394
+ `):Io.html`<div class="empty">${this._t("select.empty","\u65E0\u5339\u914D\u9879")}</div>`}
14382
14395
  </div>
14383
14396
  </lui-popover>
14384
- `}};mt.styles=[A,P,Sn,Ro.css`
14397
+ `}};mt.styles=[A,P,Sn,Io.css`
14385
14398
  :host {
14386
14399
  display: inline-block;
14387
14400
  width: 100%;
@@ -14437,7 +14450,7 @@
14437
14450
  font-size: var(--lui-font-size-sm);
14438
14451
  text-align: center;
14439
14452
  }
14440
- `],a([(0,zt.property)({attribute:!1})],mt.prototype,"options",2),a([(0,zt.property)()],mt.prototype,"value",2),a([(0,zt.property)()],mt.prototype,"placeholder",2),a([(0,zt.property)({reflect:!0})],mt.prototype,"size",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"readonly",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"clearable",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"invalid",2),a([(0,zt.property)({type:Number,attribute:"min-chars"})],mt.prototype,"minChars",2),a([(0,zt.property)({type:Number,attribute:"max-items"})],mt.prototype,"maxItems",2),a([(0,zt.property)({attribute:!1})],mt.prototype,"filter",2),a([(0,zt.property)({type:Boolean})],mt.prototype,"portal",2),a([(0,zt.property)({reflect:!0})],mt.prototype,"locale",2),a([(0,zt.property)({attribute:!1})],mt.prototype,"translations",2),a([(0,zt.state)()],mt.prototype,"_matches",2),a([(0,zt.state)()],mt.prototype,"_activeIndex",2),a([(0,zt.state)()],mt.prototype,"_open",2),a([(0,zt.query)("lui-popover")],mt.prototype,"_popover",2),a([(0,zt.query)("lui-input")],mt.prototype,"_input",2),mt=a([(0,zt.customElement)("lui-autocomplete")],mt);var kd=kn(ra(),1),Zi=require("lit"),Io=require("lit/decorators.js");var ro=class extends Zi.LitElement{constructor(){super(...arguments);this.orientation="horizontal";this.percent=50;this.minFirst=80;this.minSecond=80;this.disabled=!1;this.noGrip=!1;this._dragging=!1;this._interact=null;this._origin={total:0,percent:50};this._onKeyDown=e=>{if(this.disabled)return;let t=this._isHorizontal?"ArrowLeft":"ArrowUp",r=this._isHorizontal?"ArrowRight":"ArrowDown",n=null;if(e.key===t?n=this.percent-(e.shiftKey?10:2):e.key===r?n=this.percent+(e.shiftKey?10:2):e.key==="Home"?n=0:e.key==="End"&&(n=100),n===null)return;e.preventDefault();let s=this._root?.getBoundingClientRect(),d=(this._isHorizontal?s?.width:s?.height)??0,h=this._clampPercent(n,d);h!==this.percent&&(this.percent=h,this._emit("resize"),this._emit("change"))}}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}firstUpdated(){this._setup()}updated(e){(e.has("disabled")||e.has("orientation"))&&(this._teardown(),this._setup())}get _isHorizontal(){return this.orientation!=="vertical"}_pxMin(e,t){let r=Ot(e);if(r.endsWith("%")){let s=Number.parseFloat(r)/100;return Number.isFinite(s)?t*s:0}let n=Number.parseFloat(r);return Number.isFinite(n)?n:0}_clampPercent(e,t){if(t<=0)return Math.min(100,Math.max(0,e));let r=this._gutter?.getBoundingClientRect(),n=(this._isHorizontal?r?.width:r?.height)??0,s=Math.max(0,t-n),d=this._pxMin(this.minFirst,s),h=this._pxMin(this.minSecond,s);if(d+h>=s)return 50;let p=d/s*100,f=100-h/s*100;return Math.min(f,Math.max(p,e))}_setup(){let e=this._gutter;!e||this.disabled||(this._interact=(0,kd.default)(e).draggable({inertia:!1,modifiers:[kd.default.modifiers.restrict({restriction:"parent"})],listeners:{start:()=>{let t=this._root?.getBoundingClientRect();this._origin={total:(this._isHorizontal?t?.width:t?.height)??0,percent:this.percent},this._dragging=!0,this.toggleAttribute("data-dragging",!0)},move:t=>{let{total:r}=this._origin;if(r<=0)return;let n=this._isHorizontal?t.dx:t.dy,s=this._clampPercent(this.percent+n/r*100,r);s!==this.percent&&(this.percent=s,this._emit("resize"))},end:()=>{this._dragging=!1,this.toggleAttribute("data-dragging",!1),this._emit("change")}}}))}_teardown(){this._interact?.unset(),this._interact=null,this.toggleAttribute("data-dragging",!1)}_emit(e){let t=this._root?.getBoundingClientRect(),r=(this._isHorizontal?t?.width:t?.height)??0;this.dispatchEvent(new CustomEvent(e,{detail:{percent:this.percent,size:r*this.percent/100},bubbles:!0,composed:!0}))}render(){let t=L(this,"splitter").orientation??this.orientation;return Zi.html`
14453
+ `],a([(0,zt.property)({attribute:!1})],mt.prototype,"options",2),a([(0,zt.property)()],mt.prototype,"value",2),a([(0,zt.property)()],mt.prototype,"placeholder",2),a([(0,zt.property)({reflect:!0})],mt.prototype,"size",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"readonly",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"clearable",2),a([(0,zt.property)({type:Boolean,reflect:!0})],mt.prototype,"invalid",2),a([(0,zt.property)({type:Number,attribute:"min-chars"})],mt.prototype,"minChars",2),a([(0,zt.property)({type:Number,attribute:"max-items"})],mt.prototype,"maxItems",2),a([(0,zt.property)({attribute:!1})],mt.prototype,"filter",2),a([(0,zt.property)({type:Boolean})],mt.prototype,"portal",2),a([(0,zt.property)({reflect:!0})],mt.prototype,"locale",2),a([(0,zt.property)({attribute:!1})],mt.prototype,"translations",2),a([(0,zt.state)()],mt.prototype,"_matches",2),a([(0,zt.state)()],mt.prototype,"_activeIndex",2),a([(0,zt.state)()],mt.prototype,"_open",2),a([(0,zt.query)("lui-popover")],mt.prototype,"_popover",2),a([(0,zt.query)("lui-input")],mt.prototype,"_input",2),mt=a([(0,zt.customElement)("lui-autocomplete")],mt);var kd=kn(ra(),1),Zi=require("lit"),Vo=require("lit/decorators.js");var ro=class extends Zi.LitElement{constructor(){super(...arguments);this.orientation="horizontal";this.percent=50;this.minFirst=80;this.minSecond=80;this.disabled=!1;this.noGrip=!1;this._dragging=!1;this._interact=null;this._origin={total:0,percent:50};this._onKeyDown=e=>{if(this.disabled)return;let t=this._isHorizontal?"ArrowLeft":"ArrowUp",r=this._isHorizontal?"ArrowRight":"ArrowDown",n=null;if(e.key===t?n=this.percent-(e.shiftKey?10:2):e.key===r?n=this.percent+(e.shiftKey?10:2):e.key==="Home"?n=0:e.key==="End"&&(n=100),n===null)return;e.preventDefault();let s=this._root?.getBoundingClientRect(),d=(this._isHorizontal?s?.width:s?.height)??0,h=this._clampPercent(n,d);h!==this.percent&&(this.percent=h,this._emit("resize"),this._emit("change"))}}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}firstUpdated(){this._setup()}updated(e){(e.has("disabled")||e.has("orientation"))&&(this._teardown(),this._setup())}get _isHorizontal(){return this.orientation!=="vertical"}_pxMin(e,t){let r=Ot(e);if(r.endsWith("%")){let s=Number.parseFloat(r)/100;return Number.isFinite(s)?t*s:0}let n=Number.parseFloat(r);return Number.isFinite(n)?n:0}_clampPercent(e,t){if(t<=0)return Math.min(100,Math.max(0,e));let r=this._gutter?.getBoundingClientRect(),n=(this._isHorizontal?r?.width:r?.height)??0,s=Math.max(0,t-n),d=this._pxMin(this.minFirst,s),h=this._pxMin(this.minSecond,s);if(d+h>=s)return 50;let p=d/s*100,f=100-h/s*100;return Math.min(f,Math.max(p,e))}_setup(){let e=this._gutter;!e||this.disabled||(this._interact=(0,kd.default)(e).draggable({inertia:!1,modifiers:[kd.default.modifiers.restrict({restriction:"parent"})],listeners:{start:()=>{let t=this._root?.getBoundingClientRect();this._origin={total:(this._isHorizontal?t?.width:t?.height)??0,percent:this.percent},this._dragging=!0,this.toggleAttribute("data-dragging",!0)},move:t=>{let{total:r}=this._origin;if(r<=0)return;let n=this._isHorizontal?t.dx:t.dy,s=this._clampPercent(this.percent+n/r*100,r);s!==this.percent&&(this.percent=s,this._emit("resize"))},end:()=>{this._dragging=!1,this.toggleAttribute("data-dragging",!1),this._emit("change")}}}))}_teardown(){this._interact?.unset(),this._interact=null,this.toggleAttribute("data-dragging",!1)}_emit(e){let t=this._root?.getBoundingClientRect(),r=(this._isHorizontal?t?.width:t?.height)??0;this.dispatchEvent(new CustomEvent(e,{detail:{percent:this.percent,size:r*this.percent/100},bubbles:!0,composed:!0}))}render(){let t=L(this,"splitter").orientation??this.orientation;return Zi.html`
14441
14454
  <div class="root" style=${`--lui-splitter-first:${this.percent}%;`}>
14442
14455
  <div part="pane first"><slot name="first"></slot></div>
14443
14456
  <div
@@ -14455,7 +14468,7 @@
14455
14468
  </div>
14456
14469
  <div part="pane second"><slot name="second"></slot></div>
14457
14470
  </div>
14458
- `}};ro.styles=[A,P,Co,Zi.css`
14471
+ `}};ro.styles=[A,P,zo,Zi.css`
14459
14472
  :host {
14460
14473
  display: block;
14461
14474
  width: 100%;
@@ -14540,15 +14553,15 @@
14540
14553
  user-select: none;
14541
14554
  pointer-events: none;
14542
14555
  }
14543
- `],a([(0,Io.property)({reflect:!0})],ro.prototype,"orientation",2),a([(0,Io.property)({type:Number})],ro.prototype,"percent",2),a([(0,Io.property)({attribute:"min-first"})],ro.prototype,"minFirst",2),a([(0,Io.property)({attribute:"min-second"})],ro.prototype,"minSecond",2),a([(0,Io.property)({type:Boolean,reflect:!0})],ro.prototype,"disabled",2),a([(0,Io.property)({type:Boolean,attribute:"no-grip",reflect:!0})],ro.prototype,"noGrip",2),a([(0,Io.state)()],ro.prototype,"_dragging",2),a([(0,Io.query)('[part="gutter"]')],ro.prototype,"_gutter",2),a([(0,Io.query)(".root")],ro.prototype,"_root",2),ro=a([(0,Io.customElement)("lui-splitter")],ro);var xo=require("lit"),oo=require("lit/decorators.js");var t1=["L","M","Q","H"],r1=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],Wg=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Ug=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],Gg=21522,Yg={L:1,M:0,Q:3,H:2},fs=new Uint8Array(512),wd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)fs[o]=i,wd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)fs[o]=fs[o-255]}function o1(i,o){return i===0||o===0?0:fs[wd[i]+wd[o]]}function Xg(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=o1(o[r],fs[e]);o=t}return o}function Zg(i,o){let e=Xg(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=o1(e[s+1],n)}return t}var _d=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Md(i,o){let[,e,t,r,n]=r1[i-1][t1.indexOf(o)];return e*t+r*n}function Cd(i){return i<10?8:16}function Qg(i,o){for(let e=1;e<=40;e+=1)if(4+Cd(e)+i*8<=Md(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function Jg(i,o,e){let t=Md(o,e)*8,r=new _d;r.push(4,4),r.push(i.length,Cd(o));for(let z of i)r.push(z,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let z=0;n.length<t/8;z+=1)n.push(z%2===0?236:17);let[s,d,h,p,f]=r1[o-1][t1.indexOf(e)],x=[],k=0;for(let[z,T]of[[d,h],[p,f]])for(let j=0;j<z;j+=1){let H=new Uint8Array(n.slice(k,k+T));k+=T,x.push({data:H,ec:Zg(H,s)})}let C=[],$=Math.max(...x.map(z=>z.data.length));for(let z=0;z<$;z+=1)for(let T of x)z<T.data.length&&C.push(T.data[z]);for(let z=0;z<s;z+=1)for(let T of x)C.push(T.ec[z]);return new Uint8Array(C)}function ef(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function Mi(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function xd(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));Mi(i,n,s,d&&h!==2)}}function tf(i,o){xd(i,0,0),xd(i,i.size-7,0),xd(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;Mi(i,t,6,r),Mi(i,6,t,r)}let e=Wg[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));Mi(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(Mi(i,t,8,!1),Mi(i,8,t,!1));for(let t=0;t<8;t+=1)Mi(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)Mi(i,8,i.size-1-t,!1);if(Mi(i,8,i.size-8,!0),o>=7){let t=Ug[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;Mi(i,s,d,n),Mi(i,d,s,n)}}}function rf(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function of(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function nf(i,o,e){let t=Yg[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^Gg;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function af(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function _l(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??Qg(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Cd(r)+t.length*8>Md(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=Jg(t,r,e),d=ef(r);tf(d,r),rf(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map(($,z)=>$.map((T,j)=>d.reserved[z][j]?!!T:!!T!==of(p,j,z))),x={...d,modules:f};nf(x,e,p);let k=x.modules.map($=>$.map(Boolean)),C=af(k);(!h||C<h.score)&&(h={matrix:k,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var gr=class extends xo.LitElement{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":Ot(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=_l(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,k)=>{x&&(h+=`M${k+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=L(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=_l(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return xo.html`
14544
- <div class="frame" part="base" style=${d||xo.nothing}>
14556
+ `],a([(0,Vo.property)({reflect:!0})],ro.prototype,"orientation",2),a([(0,Vo.property)({type:Number})],ro.prototype,"percent",2),a([(0,Vo.property)({attribute:"min-first"})],ro.prototype,"minFirst",2),a([(0,Vo.property)({attribute:"min-second"})],ro.prototype,"minSecond",2),a([(0,Vo.property)({type:Boolean,reflect:!0})],ro.prototype,"disabled",2),a([(0,Vo.property)({type:Boolean,attribute:"no-grip",reflect:!0})],ro.prototype,"noGrip",2),a([(0,Vo.state)()],ro.prototype,"_dragging",2),a([(0,Vo.query)('[part="gutter"]')],ro.prototype,"_gutter",2),a([(0,Vo.query)(".root")],ro.prototype,"_root",2),ro=a([(0,Vo.customElement)("lui-splitter")],ro);var wo=require("lit"),oo=require("lit/decorators.js");var t1=["L","M","Q","H"],r1=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],Wg=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Ug=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],Gg=21522,Yg={L:1,M:0,Q:3,H:2},fs=new Uint8Array(512),wd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)fs[o]=i,wd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)fs[o]=fs[o-255]}function o1(i,o){return i===0||o===0?0:fs[wd[i]+wd[o]]}function Xg(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=o1(o[r],fs[e]);o=t}return o}function Zg(i,o){let e=Xg(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=o1(e[s+1],n)}return t}var _d=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Md(i,o){let[,e,t,r,n]=r1[i-1][t1.indexOf(o)];return e*t+r*n}function Cd(i){return i<10?8:16}function Qg(i,o){for(let e=1;e<=40;e+=1)if(4+Cd(e)+i*8<=Md(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function Jg(i,o,e){let t=Md(o,e)*8,r=new _d;r.push(4,4),r.push(i.length,Cd(o));for(let z of i)r.push(z,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let z=0;n.length<t/8;z+=1)n.push(z%2===0?236:17);let[s,d,h,p,f]=r1[o-1][t1.indexOf(e)],x=[],k=0;for(let[z,T]of[[d,h],[p,f]])for(let j=0;j<z;j+=1){let H=new Uint8Array(n.slice(k,k+T));k+=T,x.push({data:H,ec:Zg(H,s)})}let C=[],$=Math.max(...x.map(z=>z.data.length));for(let z=0;z<$;z+=1)for(let T of x)z<T.data.length&&C.push(T.data[z]);for(let z=0;z<s;z+=1)for(let T of x)C.push(T.ec[z]);return new Uint8Array(C)}function ef(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function Mi(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function xd(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));Mi(i,n,s,d&&h!==2)}}function tf(i,o){xd(i,0,0),xd(i,i.size-7,0),xd(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;Mi(i,t,6,r),Mi(i,6,t,r)}let e=Wg[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));Mi(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(Mi(i,t,8,!1),Mi(i,8,t,!1));for(let t=0;t<8;t+=1)Mi(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)Mi(i,8,i.size-1-t,!1);if(Mi(i,8,i.size-8,!0),o>=7){let t=Ug[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;Mi(i,s,d,n),Mi(i,d,s,n)}}}function rf(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function of(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function nf(i,o,e){let t=Yg[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^Gg;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function af(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function _l(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??Qg(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Cd(r)+t.length*8>Md(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=Jg(t,r,e),d=ef(r);tf(d,r),rf(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map(($,z)=>$.map((T,j)=>d.reserved[z][j]?!!T:!!T!==of(p,j,z))),x={...d,modules:f};nf(x,e,p);let k=x.modules.map($=>$.map(Boolean)),C=af(k);(!h||C<h.score)&&(h={matrix:k,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var gr=class extends wo.LitElement{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":Ot(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=_l(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,k)=>{x&&(h+=`M${k+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=L(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=_l(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return wo.html`
14557
+ <div class="frame" part="base" style=${d||wo.nothing}>
14545
14558
  <div part="error" role="img" aria-label=${s}>
14546
14559
  <lui-icon name="circle-x"></lui-icon>
14547
14560
  <span>${s}</span>
14548
14561
  </div>
14549
14562
  </div>
14550
- `;let h=n.size+t*2;return xo.html`
14551
- <div class="frame" part="base" style=${d||xo.nothing}>
14563
+ `;let h=n.size+t*2;return wo.html`
14564
+ <div class="frame" part="base" style=${d||wo.nothing}>
14552
14565
  <svg
14553
14566
  part="svg"
14554
14567
  viewBox="0 0 ${h} ${h}"
@@ -14563,16 +14576,16 @@
14563
14576
  fill="var(--lui-qrcode-bg)"
14564
14577
  ></rect>
14565
14578
  <g part="modules" fill="var(--lui-qrcode-fg)">
14566
- ${n.matrix.map((p,f)=>p.map((x,k)=>x?xo.svg`<rect x=${k+t} y=${f+t} width="1" height="1"></rect>`:xo.nothing))}
14579
+ ${n.matrix.map((p,f)=>p.map((x,k)=>x?wo.svg`<rect x=${k+t} y=${f+t} width="1" height="1"></rect>`:wo.nothing))}
14567
14580
  </g>
14568
14581
  </svg>
14569
- ${this.logo?xo.html`
14582
+ ${this.logo?wo.html`
14570
14583
  <span part="logo">
14571
14584
  <img src=${this.logo} alt="" aria-hidden="true" />
14572
14585
  </span>
14573
- `:xo.nothing}
14586
+ `:wo.nothing}
14574
14587
  </div>
14575
- `}};gr.styles=[A,P,xo.css`
14588
+ `}};gr.styles=[A,P,wo.css`
14576
14589
  :host {
14577
14590
  display: inline-block;
14578
14591
  --lui-qrcode-size: 160px;
@@ -14862,11 +14875,11 @@
14862
14875
  .toast.error .progress-bar {
14863
14876
  background: var(--lui-color-danger);
14864
14877
  }
14865
- `],a([(0,Br.property)({reflect:!0})],cr.prototype,"position",2),a([(0,Br.property)({reflect:!0})],cr.prototype,"radius",2),a([(0,Br.property)({type:Number})],cr.prototype,"duration",2),a([(0,Br.property)({type:Number})],cr.prototype,"max",2),a([(0,Br.property)({type:Boolean})],cr.prototype,"listen",2),a([(0,Br.property)({type:Boolean,attribute:"pause-on-hover"})],cr.prototype,"pauseOnHover",2),a([(0,Br.property)({type:Boolean,attribute:"show-progress"})],cr.prototype,"showProgress",2),a([(0,Br.property)({type:Boolean,reflect:!0})],cr.prototype,"stacked",2),a([(0,Br.property)({type:Number,attribute:"stack-max-visible"})],cr.prototype,"stackMaxVisible",2),a([(0,Br.property)({type:Number,attribute:"stack-gap"})],cr.prototype,"stackGap",2),a([(0,Br.property)()],cr.prototype,"locale",2),a([(0,Br.property)({attribute:!1})],cr.prototype,"translations",2),a([(0,Br.state)()],cr.prototype,"_stackExpanded",2),cr=a([(0,Br.customElement)("lui-toast")],cr);function df(i){let o=document.createElement("lui-command-palette");return se(o,Wt("commandPalette")),i.items!=null&&(o.items=i.items),i.size!=null&&(o.size=i.size),i.backdrop!=null&&(o.backdrop=i.backdrop),i.placeholder!=null&&(o.placeholder=i.placeholder),i.emptyText!=null&&(o.emptyText=i.emptyText),i.hotkey!=null&&(o.hotkey=i.hotkey),i.closeOnSelect!=null&&(o.closeOnSelect=i.closeOnSelect),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.showFooter!=null&&(o.showFooter=i.showFooter),o}function Cl(i={}){let o=df(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=h=>{t||(t=!0,r(h))};return o.addEventListener("select",h=>{if(h.target!==o)return;let p=h.detail;s({action:"select",item:p.item,id:p.id,value:p.value,query:p.query})}),o.addEventListener("close",h=>{h.target===o&&s({action:"close"})}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.show(),this},hide(){return o.close(),this},close(){o.close(),s({action:"close"})},update(h){return Object.assign(o,h),this},destroy(){t||s({action:"close"}),this.unmount()},clear(){o.clear()}}}function uf(i={}){let o=Cl(i);return o.show(),o}function hf(){document.querySelectorAll("lui-command-palette").forEach(i=>{i.close?.()})}function pf(){document.querySelectorAll("lui-command-palette").forEach(i=>{i.close?.(),i.remove()})}var l1={create:Cl,open:uf,closeAll:hf,destroyAll:pf};var zl=new Set;function mf(i){return Sr("modal",i??Vi()??Ii())}function gf(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function ff(i,o){if(o==null)return;let e=typeof o=="function"?o():o,t=r=>{if(r instanceof HTMLElement||r instanceof SVGElement){r.setAttribute("slot","backdrop"),i.appendChild(r);return}let n=document.createElement("div");n.slot="backdrop",n.appendChild(r),i.appendChild(n)};if(typeof e=="string"){let r=document.createElement("div");r.slot="backdrop",r.textContent=e,i.appendChild(r);return}if(e instanceof DocumentFragment){let r=document.createElement("div");r.slot="backdrop",r.appendChild(e),i.appendChild(r);return}t(e)}function vf(i,o){if(o==null)return;let e=typeof o=="function"?o():o;if(typeof e=="string"){let t=document.createElement("div");t.textContent=e,t.style.lineHeight="1.6",i.appendChild(t);return}i.appendChild(e)}function bf(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function yf(i,o){o.title!=null&&(i.title=o.title),o.placement!=null&&(i.placement=o.placement),o.radius!=null&&(i.radius=o.radius),o.backdrop!=null&&(i.backdrop=o.backdrop),o.backdropStyle!=null&&(i.backdropStyle=o.backdropStyle),o.closeOnOutsidePress!=null&&(i.closeOnOutsidePress=o.closeOnOutsidePress),o.shakeOnOutsideClick!=null&&(i.shakeOnOutsideClick=o.shakeOnOutsideClick),o.noClose!=null&&(i.noClose=o.noClose),o.noHeader!=null&&(i.noHeader=o.noHeader),o.noFooter!=null&&(i.noFooter=o.noFooter),o.portal!=null&&(i.portal=o.portal),o.overlayLayer!=null&&(i.overlayLayer=o.overlayLayer),o.container!=null&&(i.container=o.container),i.requestUpdate?.()}function kf(i){let o=document.createElement("lui-drawer"),e=ui();return o.locale=e.locale,o.translations=e.translations,se(o,Wt("drawer")),o.title=i.title??"",i.placement!=null&&(o.placement=i.placement),i.radius!=null&&(o.radius=i.radius),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.shakeOnOutsideClick!=null&&(o.shakeOnOutsideClick=i.shakeOnOutsideClick),i.noClose!=null&&(o.noClose=i.noClose),i.noHeader!=null&&(o.noHeader=i.noHeader),i.noFooter!=null&&(o.noFooter=i.noFooter),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),o}function xf(i){i.open=!1,zl.delete(i),queueMicrotask(()=>i.remove())}function El(i={}){let o=typeof i=="string"?{content:i}:i,e=kf(o);ff(e,void 0),vf(e,o.content);let t=!1,r=!1,n,s=new Promise(p=>{n=p}),d=()=>{r||(r=!0,xf(e),n({action:"close"}))};if(e.addEventListener("close",p=>{p.target===e&&d()}),o.showCloseButton!==!1&&!o.noFooter){let p=bf(o.closeText??gf("common.close","\u5173\u95ED"),"primary");p.addEventListener("click",()=>d(),{once:!1}),e.append(p)}return{el:e,get mounted(){return t&&e.isConnected},get visible(){return e.open},get closed(){return s},mount(p){if(e.isConnected)return this;let f=mf(p??o.container);return f.appendChild(e),Jt(e,f,"modal"),zl.add(e),Et(e),t=!0,this},unmount(){return e.isConnected&&e.remove(),zl.delete(e),t=!1,this},show(){return e.isConnected||this.mount(),Et(e),e.show(),this},hide(){return e.close(!1),this},close(){d()},update(p){return yf(e,p),this},destroy(){r||(r=!0,n({action:"close"})),this.unmount()}}}function wf(i){let o=El(i);return o.show(),o}function _f(){[...zl].forEach(i=>i.close?.())}var c1={create:El,open:wf,closeAll:_f};var $l=new Set;function Ma(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function Ed(i){let o=document.createElement("lui-dialog"),e=ui(),t=Un();if(o.locale=e.locale,o.translations=e.translations,t.theme&&o.setAttribute("theme",t.theme),t.direction&&o.setAttribute("dir",t.direction),se(o,Wt("dialog")),o.title=i.title??"",i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.shakeOnOutsideClick!=null&&(o.shakeOnOutsideClick=i.shakeOnOutsideClick),o.noClose=i.noClose??!1,i.noHeader!=null&&(o.noHeader=i.noHeader),i.noFooter!=null&&(o.noFooter=i.noFooter),i.draggable!=null&&(o.draggable=i.draggable),i.resizable!=null&&(o.resizable=i.resizable),i.destroyOnClose!=null&&(o.destroyOnClose=i.destroyOnClose),i.fullscreen!=null&&(o.fullscreen=i.fullscreen),i.width!=null&&(o.width=i.width),i.portal!=null&&(o.portal=i.portal),i.overlayLayer&&(o.overlayLayer=i.overlayLayer),i.container&&(o.container=i.container),i.placement&&(o.placement=i.placement),i.offset&&(o.offset=i.offset),i.backdrop&&(o.backdrop=i.backdrop),i.backdropStyle&&(o.backdropStyle=i.backdropStyle),i.backdropContent&&!i.backdrop&&(o.backdrop="custom"),Cf(o,i.backdropContent),i.message){let r=document.createElement("div");r.textContent=i.message,r.style.lineHeight="1.6",o.appendChild(r)}return o}function Sl(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function $d(i){i.open=!1,$l.delete(i),queueMicrotask(()=>i.remove())}function Mf(i,o){o.title!=null&&(i.title=o.title),o.closeOnOutsidePress!=null&&(i.closeOnOutsidePress=o.closeOnOutsidePress),o.shakeOnOutsideClick!=null&&(i.shakeOnOutsideClick=o.shakeOnOutsideClick),o.noClose!=null&&(i.noClose=o.noClose),o.noHeader!=null&&(i.noHeader=o.noHeader),o.noFooter!=null&&(i.noFooter=o.noFooter),o.draggable!=null&&(i.draggable=o.draggable),o.resizable!=null&&(i.resizable=o.resizable),o.destroyOnClose!=null&&(i.destroyOnClose=o.destroyOnClose),o.fullscreen!=null&&(i.fullscreen=o.fullscreen),o.width!=null&&(i.width=o.width),o.portal!=null&&(i.portal=o.portal),o.overlayLayer!=null&&(i.overlayLayer=o.overlayLayer),o.container!=null&&(i.container=o.container),o.placement!=null&&(i.placement=o.placement),o.offset!=null&&(i.offset=o.offset),o.backdrop!=null&&(i.backdrop=o.backdrop),o.backdropStyle!=null&&(i.backdropStyle=o.backdropStyle),i.requestUpdate?.()}function Cf(i,o){if(o==null)return;let e=typeof o=="function"?o():o,t=r=>{if(r instanceof HTMLElement||r instanceof SVGElement){r.setAttribute("slot","backdrop"),i.appendChild(r);return}let n=document.createElement("div");n.slot="backdrop",n.appendChild(r),i.appendChild(n)};if(typeof e=="string"){let r=document.createElement("div");r.slot="backdrop",r.textContent=e,i.appendChild(r);return}if(e instanceof DocumentFragment){let r=document.createElement("div");r.slot="backdrop",r.appendChild(e),i.appendChild(r);return}t(e)}function zf(i,o){if(o==null)return;let e=typeof o=="function"?o():o;if(typeof e=="string"){let t=document.createElement("div");t.textContent=e,t.style.lineHeight="1.6",i.appendChild(t);return}i.appendChild(e)}function Ca(i={}){let o=typeof i=="string"?{message:i}:i,e=Ed(o);zf(e,o.content);let t=!0,r=!1,n,s=new Promise(p=>{n=p}),d=p=>{r||(r=!0,$d(e),n({action:p}))};return e.addEventListener("close",p=>{p.target===e&&d("close")}),{el:e,get mounted(){return t&&e.isConnected},get visible(){return e.open},get closed(){return s},mount(p){if(e.isConnected)return this;let f=Sr("modal",p??o.container??Vi()??Ii());return f.appendChild(e),Jt(e,f,"modal"),$l.add(e),Et(e),t=!0,this},unmount(){return e.isConnected&&e.remove(),$l.delete(e),t=!1,this},show(){return e.isConnected||this.mount(),Et(e),e.show(),this},hide(){return e.close(!1),this},close(p){d(p?.action??"close")},update(p){return Mf(e,p),this},destroy(){r||(r=!0,n({action:"close"})),this.unmount()}}}function Sd(i){let o=typeof i=="string"?{message:i}:i,e=Ca(o),t=e.el,r=[];return o.showCancel!==!1&&r.push(Sl(o.cancelText??Ma("common.cancel","\u53D6\u6D88"))),r.push(Sl(o.confirmText??Ma("common.confirm","\u786E\u5B9A"),o.danger?"danger":"primary")),t.append(...r),r.length>1&&r[0].addEventListener("click",()=>e.close({action:"cancel"}),{once:!0}),r[r.length-1].addEventListener("click",()=>e.close({action:"confirm"}),{once:!0}),e.show(),e}function Ef(i){return Sd({...typeof i=="string"?{message:i}:i,showCancel:!1}).closed.then(()=>{})}function $f(i){return Sd(typeof i=="string"?{message:i,showCancel:!0}:{...i,showCancel:!0}).closed.then(o=>o.action==="confirm")}function Sf(i){let o=typeof i=="string"?{message:i}:i,e=Ed(o),t=document.createElement("lui-input"),r=ui();t.locale=r.locale,t.translations=r.translations,se(t,Wt("input")),t.value=o.value??"",t.placeholder=o.placeholder??"",t.style.display="block",t.style.marginTop=o.message?"12px":"0",e.appendChild(t);let n=Sl(o.cancelText??Ma("common.cancel","\u53D6\u6D88")),s=Sl(o.confirmText??Ma("common.confirm","\u786E\u5B9A"),"primary");return e.append(n,s),new Promise(d=>{let h=!1,p=f=>{h||(h=!0,$d(e),d(f))};n.addEventListener("click",()=>p(null),{once:!0}),s.addEventListener("click",()=>p(t.value??""),{once:!0}),t.addEventListener("submit",()=>p(t.value??""),{once:!0}),e.addEventListener("close",f=>{f.target===e&&p(null)}),e.show(),requestAnimationFrame(()=>t.focus())})}function Tf(i){let o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="12px",o.style.lineHeight="1.6";let e=document.createElement("span");e.style.width="18px",e.style.height="18px",e.style.border="2px solid currentColor",e.style.borderTopColor="transparent",e.style.borderRadius="999px",e.style.animation="lui-dialog-loading-spin 0.8s linear infinite",e.style.display="inline-block",o.appendChild(e);let t=document.createElement("span");if(t.textContent=i,t.dataset.role="message",o.appendChild(t),!document.getElementById("lui-dialog-loading-style")){let r=document.createElement("style");r.id="lui-dialog-loading-style",r.textContent=`
14878
+ `],a([(0,Br.property)({reflect:!0})],cr.prototype,"position",2),a([(0,Br.property)({reflect:!0})],cr.prototype,"radius",2),a([(0,Br.property)({type:Number})],cr.prototype,"duration",2),a([(0,Br.property)({type:Number})],cr.prototype,"max",2),a([(0,Br.property)({type:Boolean})],cr.prototype,"listen",2),a([(0,Br.property)({type:Boolean,attribute:"pause-on-hover"})],cr.prototype,"pauseOnHover",2),a([(0,Br.property)({type:Boolean,attribute:"show-progress"})],cr.prototype,"showProgress",2),a([(0,Br.property)({type:Boolean,reflect:!0})],cr.prototype,"stacked",2),a([(0,Br.property)({type:Number,attribute:"stack-max-visible"})],cr.prototype,"stackMaxVisible",2),a([(0,Br.property)({type:Number,attribute:"stack-gap"})],cr.prototype,"stackGap",2),a([(0,Br.property)()],cr.prototype,"locale",2),a([(0,Br.property)({attribute:!1})],cr.prototype,"translations",2),a([(0,Br.state)()],cr.prototype,"_stackExpanded",2),cr=a([(0,Br.customElement)("lui-toast")],cr);function df(i){let o=document.createElement("lui-command-palette");return se(o,Wt("commandPalette")),i.items!=null&&(o.items=i.items),i.size!=null&&(o.size=i.size),i.backdrop!=null&&(o.backdrop=i.backdrop),i.placeholder!=null&&(o.placeholder=i.placeholder),i.emptyText!=null&&(o.emptyText=i.emptyText),i.hotkey!=null&&(o.hotkey=i.hotkey),i.closeOnSelect!=null&&(o.closeOnSelect=i.closeOnSelect),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.showFooter!=null&&(o.showFooter=i.showFooter),o}function Cl(i={}){let o=df(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=h=>{t||(t=!0,r(h))};return o.addEventListener("select",h=>{if(h.target!==o)return;let p=h.detail;s({action:"select",item:p.item,id:p.id,value:p.value,query:p.query})}),o.addEventListener("close",h=>{h.target===o&&s({action:"close"})}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.show(),this},hide(){return o.close(),this},close(){o.close(),s({action:"close"})},update(h){return Object.assign(o,h),this},destroy(){t||s({action:"close"}),this.unmount()},clear(){o.clear()}}}function uf(i={}){let o=Cl(i);return o.show(),o}function hf(){document.querySelectorAll("lui-command-palette").forEach(i=>{i.close?.()})}function pf(){document.querySelectorAll("lui-command-palette").forEach(i=>{i.close?.(),i.remove()})}var l1={create:Cl,open:uf,closeAll:hf,destroyAll:pf};var zl=new Set;function mf(i){return Tr("modal",i??Vi()??Ii())}function gf(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function ff(i,o){if(o==null)return;let e=typeof o=="function"?o():o,t=r=>{if(r instanceof HTMLElement||r instanceof SVGElement){r.setAttribute("slot","backdrop"),i.appendChild(r);return}let n=document.createElement("div");n.slot="backdrop",n.appendChild(r),i.appendChild(n)};if(typeof e=="string"){let r=document.createElement("div");r.slot="backdrop",r.textContent=e,i.appendChild(r);return}if(e instanceof DocumentFragment){let r=document.createElement("div");r.slot="backdrop",r.appendChild(e),i.appendChild(r);return}t(e)}function vf(i,o){if(o==null)return;let e=typeof o=="function"?o():o;if(typeof e=="string"){let t=document.createElement("div");t.textContent=e,t.style.lineHeight="1.6",i.appendChild(t);return}i.appendChild(e)}function bf(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function yf(i,o){o.title!=null&&(i.title=o.title),o.placement!=null&&(i.placement=o.placement),o.radius!=null&&(i.radius=o.radius),o.backdrop!=null&&(i.backdrop=o.backdrop),o.backdropStyle!=null&&(i.backdropStyle=o.backdropStyle),o.closeOnOutsidePress!=null&&(i.closeOnOutsidePress=o.closeOnOutsidePress),o.shakeOnOutsideClick!=null&&(i.shakeOnOutsideClick=o.shakeOnOutsideClick),o.noClose!=null&&(i.noClose=o.noClose),o.noHeader!=null&&(i.noHeader=o.noHeader),o.noFooter!=null&&(i.noFooter=o.noFooter),o.portal!=null&&(i.portal=o.portal),o.overlayLayer!=null&&(i.overlayLayer=o.overlayLayer),o.container!=null&&(i.container=o.container),i.requestUpdate?.()}function kf(i){let o=document.createElement("lui-drawer"),e=ui();return o.locale=e.locale,o.translations=e.translations,se(o,Wt("drawer")),o.title=i.title??"",i.placement!=null&&(o.placement=i.placement),i.radius!=null&&(o.radius=i.radius),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.shakeOnOutsideClick!=null&&(o.shakeOnOutsideClick=i.shakeOnOutsideClick),i.noClose!=null&&(o.noClose=i.noClose),i.noHeader!=null&&(o.noHeader=i.noHeader),i.noFooter!=null&&(o.noFooter=i.noFooter),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),o}function xf(i){i.open=!1,zl.delete(i),queueMicrotask(()=>i.remove())}function El(i={}){let o=typeof i=="string"?{content:i}:i,e=kf(o);ff(e,void 0),vf(e,o.content);let t=!1,r=!1,n,s=new Promise(p=>{n=p}),d=()=>{r||(r=!0,xf(e),n({action:"close"}))};if(e.addEventListener("close",p=>{p.target===e&&d()}),o.showCloseButton!==!1&&!o.noFooter){let p=bf(o.closeText??gf("common.close","\u5173\u95ED"),"primary");p.addEventListener("click",()=>d(),{once:!1}),e.append(p)}return{el:e,get mounted(){return t&&e.isConnected},get visible(){return e.open},get closed(){return s},mount(p){if(e.isConnected)return this;let f=mf(p??o.container);return f.appendChild(e),Jt(e,f,"modal"),zl.add(e),Et(e),t=!0,this},unmount(){return e.isConnected&&e.remove(),zl.delete(e),t=!1,this},show(){return e.isConnected||this.mount(),Et(e),e.show(),this},hide(){return e.close(!1),this},close(){d()},update(p){return yf(e,p),this},destroy(){r||(r=!0,n({action:"close"})),this.unmount()}}}function wf(i){let o=El(i);return o.show(),o}function _f(){[...zl].forEach(i=>i.close?.())}var c1={create:El,open:wf,closeAll:_f};var $l=new Set;function Ma(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function Ed(i){let o=document.createElement("lui-dialog"),e=ui(),t=Un();if(o.locale=e.locale,o.translations=e.translations,t.theme&&o.setAttribute("theme",t.theme),t.direction&&o.setAttribute("dir",t.direction),se(o,Wt("dialog")),o.title=i.title??"",i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.shakeOnOutsideClick!=null&&(o.shakeOnOutsideClick=i.shakeOnOutsideClick),o.noClose=i.noClose??!1,i.noHeader!=null&&(o.noHeader=i.noHeader),i.noFooter!=null&&(o.noFooter=i.noFooter),i.draggable!=null&&(o.draggable=i.draggable),i.resizable!=null&&(o.resizable=i.resizable),i.destroyOnClose!=null&&(o.destroyOnClose=i.destroyOnClose),i.fullscreen!=null&&(o.fullscreen=i.fullscreen),i.width!=null&&(o.width=i.width),i.portal!=null&&(o.portal=i.portal),i.overlayLayer&&(o.overlayLayer=i.overlayLayer),i.container&&(o.container=i.container),i.placement&&(o.placement=i.placement),i.offset&&(o.offset=i.offset),i.backdrop&&(o.backdrop=i.backdrop),i.backdropStyle&&(o.backdropStyle=i.backdropStyle),i.backdropContent&&!i.backdrop&&(o.backdrop="custom"),Cf(o,i.backdropContent),i.message){let r=document.createElement("div");r.textContent=i.message,r.style.lineHeight="1.6",o.appendChild(r)}return o}function Sl(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function $d(i){i.open=!1,$l.delete(i),queueMicrotask(()=>i.remove())}function Mf(i,o){o.title!=null&&(i.title=o.title),o.closeOnOutsidePress!=null&&(i.closeOnOutsidePress=o.closeOnOutsidePress),o.shakeOnOutsideClick!=null&&(i.shakeOnOutsideClick=o.shakeOnOutsideClick),o.noClose!=null&&(i.noClose=o.noClose),o.noHeader!=null&&(i.noHeader=o.noHeader),o.noFooter!=null&&(i.noFooter=o.noFooter),o.draggable!=null&&(i.draggable=o.draggable),o.resizable!=null&&(i.resizable=o.resizable),o.destroyOnClose!=null&&(i.destroyOnClose=o.destroyOnClose),o.fullscreen!=null&&(i.fullscreen=o.fullscreen),o.width!=null&&(i.width=o.width),o.portal!=null&&(i.portal=o.portal),o.overlayLayer!=null&&(i.overlayLayer=o.overlayLayer),o.container!=null&&(i.container=o.container),o.placement!=null&&(i.placement=o.placement),o.offset!=null&&(i.offset=o.offset),o.backdrop!=null&&(i.backdrop=o.backdrop),o.backdropStyle!=null&&(i.backdropStyle=o.backdropStyle),i.requestUpdate?.()}function Cf(i,o){if(o==null)return;let e=typeof o=="function"?o():o,t=r=>{if(r instanceof HTMLElement||r instanceof SVGElement){r.setAttribute("slot","backdrop"),i.appendChild(r);return}let n=document.createElement("div");n.slot="backdrop",n.appendChild(r),i.appendChild(n)};if(typeof e=="string"){let r=document.createElement("div");r.slot="backdrop",r.textContent=e,i.appendChild(r);return}if(e instanceof DocumentFragment){let r=document.createElement("div");r.slot="backdrop",r.appendChild(e),i.appendChild(r);return}t(e)}function zf(i,o){if(o==null)return;let e=typeof o=="function"?o():o;if(typeof e=="string"){let t=document.createElement("div");t.textContent=e,t.style.lineHeight="1.6",i.appendChild(t);return}i.appendChild(e)}function Ca(i={}){let o=typeof i=="string"?{message:i}:i,e=Ed(o);zf(e,o.content);let t=!0,r=!1,n,s=new Promise(p=>{n=p}),d=p=>{r||(r=!0,$d(e),n({action:p}))};return e.addEventListener("close",p=>{p.target===e&&d("close")}),{el:e,get mounted(){return t&&e.isConnected},get visible(){return e.open},get closed(){return s},mount(p){if(e.isConnected)return this;let f=Tr("modal",p??o.container??Vi()??Ii());return f.appendChild(e),Jt(e,f,"modal"),$l.add(e),Et(e),t=!0,this},unmount(){return e.isConnected&&e.remove(),$l.delete(e),t=!1,this},show(){return e.isConnected||this.mount(),Et(e),e.show(),this},hide(){return e.close(!1),this},close(p){d(p?.action??"close")},update(p){return Mf(e,p),this},destroy(){r||(r=!0,n({action:"close"})),this.unmount()}}}function Sd(i){let o=typeof i=="string"?{message:i}:i,e=Ca(o),t=e.el,r=[];return o.showCancel!==!1&&r.push(Sl(o.cancelText??Ma("common.cancel","\u53D6\u6D88"))),r.push(Sl(o.confirmText??Ma("common.confirm","\u786E\u5B9A"),o.danger?"danger":"primary")),t.append(...r),r.length>1&&r[0].addEventListener("click",()=>e.close({action:"cancel"}),{once:!0}),r[r.length-1].addEventListener("click",()=>e.close({action:"confirm"}),{once:!0}),e.show(),e}function Ef(i){return Sd({...typeof i=="string"?{message:i}:i,showCancel:!1}).closed.then(()=>{})}function $f(i){return Sd(typeof i=="string"?{message:i,showCancel:!0}:{...i,showCancel:!0}).closed.then(o=>o.action==="confirm")}function Sf(i){let o=typeof i=="string"?{message:i}:i,e=Ed(o),t=document.createElement("lui-input"),r=ui();t.locale=r.locale,t.translations=r.translations,se(t,Wt("input")),t.value=o.value??"",t.placeholder=o.placeholder??"",t.style.display="block",t.style.marginTop=o.message?"12px":"0",e.appendChild(t);let n=Sl(o.cancelText??Ma("common.cancel","\u53D6\u6D88")),s=Sl(o.confirmText??Ma("common.confirm","\u786E\u5B9A"),"primary");return e.append(n,s),new Promise(d=>{let h=!1,p=f=>{h||(h=!0,$d(e),d(f))};n.addEventListener("click",()=>p(null),{once:!0}),s.addEventListener("click",()=>p(t.value??""),{once:!0}),t.addEventListener("submit",()=>p(t.value??""),{once:!0}),e.addEventListener("close",f=>{f.target===e&&p(null)}),e.show(),requestAnimationFrame(()=>t.focus())})}function Tf(i){let o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="12px",o.style.lineHeight="1.6";let e=document.createElement("span");e.style.width="18px",e.style.height="18px",e.style.border="2px solid currentColor",e.style.borderTopColor="transparent",e.style.borderRadius="999px",e.style.animation="lui-dialog-loading-spin 0.8s linear infinite",e.style.display="inline-block",o.appendChild(e);let t=document.createElement("span");if(t.textContent=i,t.dataset.role="message",o.appendChild(t),!document.getElementById("lui-dialog-loading-style")){let r=document.createElement("style");r.id="lui-dialog-loading-style",r.textContent=`
14866
14879
  @keyframes lui-dialog-loading-spin {
14867
14880
  to { transform: rotate(360deg); }
14868
14881
  }
14869
- `,document.head.appendChild(r)}return o}function Af(i){let o=typeof i=="string"?{message:i}:i,e=Ed({title:o.title??Ma("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=Tf(o.message??Ma("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>$d(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function jf(){[...$l].forEach(i=>i.close?.())}var d1={create:Ca,open:Sd,alert:Ef,confirm:$f,prompt:Sf,loading:Af,closeAll:jf};function u1(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function h1(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function Ad(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(Ad):void 0,condition:i.condition?{...i.condition}:void 0}}function Pf(i){return{...i,fields:i.fields.map(Ad)}}function Tl(i,o){return{...i,fields:i.fields?i.fields.map(Ad):void 0,steps:i.steps?i.steps.map(Pf):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function jd(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");se(e,Wt("form")),e.schema=Tl(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??Tl(o);return e.schema=Tl({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var p1=jd;function Pd(i){let o=i.schema.onSubmit,e=Tl(i.schema,async x=>{await o?.(x),h(x)}),t=jd(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ca({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=h1(i.cancelText??e.cancelLabel??u1("common.cancel","\u53D6\u6D88")),k=h1(i.submitText??e.submitLabel??u1("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),k.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,k)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,k){t.setValue(x,k)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function Td(i){let o=Pd(i);return o.show(),o}function Of(i){return"onSubmit"in i?Td({schema:i}):Td(i)}var m1={create:jd,open:Td,prompt:Of};function Hf(){let i=document.createElement("lui-context-menu");return se(i,Wt("contextMenu")),i.trigger="manual",i}function Od(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function vs(i={}){let o=Hf(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Sr("menu",s??i.container??Vi()??Ii());return d.appendChild(o),Jt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};Od(o,d),Et(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),Od(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&Od(o,{x:0,y:0,...i}),n}var Ln=null,g1=new WeakMap;function Hd(i){if(i.container){let o=g1.get(i.container);return(!o||!o.el.isConnected)&&(o=vs({container:i.container}),g1.set(i.container,o)),o.show(i),o}return(!Ln||!Ln.el.isConnected)&&(Ln=vs()),Ln.show(i),Ln}function Rd(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function Rf(){Ln?.destroy(),Ln=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var f1={create:vs,show:Hd,hideAll:Rd,destroyAll:Rf};function bs(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function If(i){let o=document.createElement("lui-popover");return se(o,Wt("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),bs(o,"trigger",i.triggerContent),bs(o,"header",i.header),bs(o,"content",i.content),bs(o,"footer",i.footer),bs(o,"backdrop",i.backdropContent),o}function Al(i={}){let o=If(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&Et(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function Vf(i={}){let o=Al({...i,trigger:"manual"});return o.show(),o}function Df(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function Ff(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var v1={create:Al,open:Vf,closeAll:Df,destroyAll:Ff};var ii=new Map;function Nf(){return Sr("toast",Vi()??Ii())}function k1(i){let o=Wt("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function Id(i){let o=ui();i.locale=o.locale,i.translations=o.translations,se(i,Wt("toast"))}function Pl(){for(let[i,o]of ii)o?.isConnected||ii.delete(i)}function Lf(i){let o=ii.get(i);o&&(ii.delete(i),o.isConnected&&o.remove())}function Bf(i,o,e,t,r,n){Pl();let s=k1(i),d=ii.get(s);if(d?.isConnected)return Id(d),Et(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,Id(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Lf(s));let p=Nf();return p.appendChild(h),Jt(h,p,"toast"),ii.set(s,h),h}function Dd(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=k1(i.position);e=document.createElement("lui-toast"),e.listen=!1,Id(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Sr("toast",r??Vi()??Ii());return s.appendChild(e),Jt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function qf(){Pl();for(let i of ii.values())i.clear()}function Vd(i){let o=typeof i=="string"?{message:i}:i;return Bf(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function b1(i){Pl();for(let o of ii.values())if(o.has(i))return o;return null}function jl(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return Vd({...t,level:i,duration:t.duration??e})}function y1(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ji={create:Dd,show:Vd,clearAll:qf,close(i){let o=b1(i);return o?o.close(i):!1},update(i,o){let e=b1(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=Vd({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ji.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ji.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ji.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=y1(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=y1(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(Pl(),i){let o=ii.get(i);if(!o?.isConnected){ii.delete(i);return}o.clear();return}for(let[o,e]of ii){if(!e?.isConnected){ii.delete(o);continue}e.clear()}},info(i,o){return jl("info",i,o)},success(i,o){return jl("success",i,o)},warning(i,o){return jl("warning",i,o)},error(i,o){return jl("error",i,o)}};function Fd(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function Nd(i={}){let o=document.createElement("lui-table");se(o,Wt("table")),Fd(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return Fd(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return Fd(o,r),this}}}var x1={create:Nd};0&&(module.exports={BP,LuiAlert,LuiAutocomplete,LuiAvatar,LuiAvatarGroup,LuiBackground,LuiBadge,LuiBreadcrumb,LuiBreadcrumbItem,LuiButton,LuiButtonGroup,LuiButtonGroupItem,LuiCalendar,LuiCard,LuiCascader,LuiCheckbox,LuiCheckboxGroup,LuiCol,LuiCollapse,LuiCollapseItem,LuiColorPicker,LuiCommandPalette,LuiConfigProvider,LuiContextMenu,LuiDateRangePicker,LuiDatepicker,LuiDialog,LuiDivider,LuiDrawer,LuiDropdown,LuiDropmenu,LuiEmptyState,LuiFileInput,LuiForm,LuiFormItem,LuiIcon,LuiIconPicker,LuiImage,LuiImageCropper,LuiInput,LuiInputNumber,LuiInputOpt,LuiMenu,LuiMenuDivider,LuiMenuItem,LuiOption,LuiOptionGroup,LuiOverlayRoot,LuiPagination,LuiPopconfirm,LuiPopover,LuiProgress,LuiQrcode,LuiRadio,LuiRadioGroup,LuiRow,LuiScrollArea,LuiSelect,LuiSkeleton,LuiSlider,LuiSpinner,LuiSplitter,LuiStatistic,LuiSwitch,LuiTab,LuiTabPanel,LuiTable,LuiTableColumn,LuiTabs,LuiTag,LuiText,LuiTextarea,LuiToast,LuiTooltip,LuiTree,LuiTreeSelect,baseStyles,bringOverlayStackToFront,builtinIconCollection,builtinIconNames,builtinIconPrefix,builtinTranslations,commandPalette,contextMenu,createCommandPalette,createContextMenu,createDialog,createDialogForm,createDrawer,createForm,createPopover,createTable,createToastHost,dialog,drawer,encodeQr,ensureOverlayExternalLayer,ensureOverlayLayer,ensureOverlayRoot,eventPathContainsOwnedOverlay,form,formatDate,formatSize,getLocale,hasRecentOverlayInteraction,hideAllContextMenus,isImageIconSource,isOverlayTopmost,markOverlayInteraction,mergeTranslations,normalizeStatus,onLocaleChange,popover,registerFormField,registerOverlayStack,registerTranslations,resolveBuiltinIcon,resolveBuiltinTranslations,resolveOverlayLayerRegistration,setLocale,setOverlayOwner,setupBuiltinIcons,showContextMenu,statusColorToken,statusColorVar,statusIcon,statusOrder,t,table,toCssLength,toast,tokens,translate,unregisterFormField,unregisterOverlayStack});
14882
+ `,document.head.appendChild(r)}return o}function Af(i){let o=typeof i=="string"?{message:i}:i,e=Ed({title:o.title??Ma("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=Tf(o.message??Ma("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>$d(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function jf(){[...$l].forEach(i=>i.close?.())}var d1={create:Ca,open:Sd,alert:Ef,confirm:$f,prompt:Sf,loading:Af,closeAll:jf};function u1(i,o){let e=ui();return ae(ne(e.locale,e.translations),i,o)}function h1(i,o="default"){let e=document.createElement("lui-button");return se(e,Wt("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function Ad(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(Ad):void 0,condition:i.condition?{...i.condition}:void 0}}function Pf(i){return{...i,fields:i.fields.map(Ad)}}function Tl(i,o){return{...i,fields:i.fields?i.fields.map(Ad):void 0,steps:i.steps?i.steps.map(Pf):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function jd(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");se(e,Wt("form")),e.schema=Tl(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??Tl(o);return e.schema=Tl({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var p1=jd;function Pd(i){let o=i.schema.onSubmit,e=Tl(i.schema,async x=>{await o?.(x),h(x)}),t=jd(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ca({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=h1(i.cancelText??e.cancelLabel??u1("common.cancel","\u53D6\u6D88")),k=h1(i.submitText??e.submitLabel??u1("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),k.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,k)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,k){t.setValue(x,k)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function Td(i){let o=Pd(i);return o.show(),o}function Of(i){return"onSubmit"in i?Td({schema:i}):Td(i)}var m1={create:jd,open:Td,prompt:Of};function Hf(){let i=document.createElement("lui-context-menu");return se(i,Wt("contextMenu")),i.trigger="manual",i}function Od(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function vs(i={}){let o=Hf(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Tr("menu",s??i.container??Vi()??Ii());return d.appendChild(o),Jt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};Od(o,d),Et(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),Od(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&Od(o,{x:0,y:0,...i}),n}var Ln=null,g1=new WeakMap;function Hd(i){if(i.container){let o=g1.get(i.container);return(!o||!o.el.isConnected)&&(o=vs({container:i.container}),g1.set(i.container,o)),o.show(i),o}return(!Ln||!Ln.el.isConnected)&&(Ln=vs()),Ln.show(i),Ln}function Rd(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function Rf(){Ln?.destroy(),Ln=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var f1={create:vs,show:Hd,hideAll:Rd,destroyAll:Rf};function bs(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function If(i){let o=document.createElement("lui-popover");return se(o,Wt("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),bs(o,"trigger",i.triggerContent),bs(o,"header",i.header),bs(o,"content",i.content),bs(o,"footer",i.footer),bs(o,"backdrop",i.backdropContent),o}function Al(i={}){let o=If(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&Et(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function Vf(i={}){let o=Al({...i,trigger:"manual"});return o.show(),o}function Df(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function Ff(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var v1={create:Al,open:Vf,closeAll:Df,destroyAll:Ff};var ii=new Map;function Nf(){return Tr("toast",Vi()??Ii())}function k1(i){let o=Wt("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function Id(i){let o=ui();i.locale=o.locale,i.translations=o.translations,se(i,Wt("toast"))}function Pl(){for(let[i,o]of ii)o?.isConnected||ii.delete(i)}function Lf(i){let o=ii.get(i);o&&(ii.delete(i),o.isConnected&&o.remove())}function Bf(i,o,e,t,r,n){Pl();let s=k1(i),d=ii.get(s);if(d?.isConnected)return Id(d),Et(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,Id(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Lf(s));let p=Nf();return p.appendChild(h),Jt(h,p,"toast"),ii.set(s,h),h}function Dd(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=k1(i.position);e=document.createElement("lui-toast"),e.listen=!1,Id(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Tr("toast",r??Vi()??Ii());return s.appendChild(e),Jt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function qf(){Pl();for(let i of ii.values())i.clear()}function Vd(i){let o=typeof i=="string"?{message:i}:i;return Bf(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function b1(i){Pl();for(let o of ii.values())if(o.has(i))return o;return null}function jl(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return Vd({...t,level:i,duration:t.duration??e})}function y1(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ji={create:Dd,show:Vd,clearAll:qf,close(i){let o=b1(i);return o?o.close(i):!1},update(i,o){let e=b1(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=Vd({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ji.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ji.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ji.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ji.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=y1(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=y1(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(Pl(),i){let o=ii.get(i);if(!o?.isConnected){ii.delete(i);return}o.clear();return}for(let[o,e]of ii){if(!e?.isConnected){ii.delete(o);continue}e.clear()}},info(i,o){return jl("info",i,o)},success(i,o){return jl("success",i,o)},warning(i,o){return jl("warning",i,o)},error(i,o){return jl("error",i,o)}};function Fd(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function Nd(i={}){let o=document.createElement("lui-table");se(o,Wt("table")),Fd(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return Fd(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return Fd(o,r),this}}}var x1={create:Nd};0&&(module.exports={BP,LuiAlert,LuiAutocomplete,LuiAvatar,LuiAvatarGroup,LuiBackground,LuiBadge,LuiBreadcrumb,LuiBreadcrumbItem,LuiButton,LuiButtonGroup,LuiButtonGroupItem,LuiCalendar,LuiCard,LuiCascader,LuiCheckbox,LuiCheckboxGroup,LuiCol,LuiCollapse,LuiCollapseItem,LuiColorPicker,LuiCommandPalette,LuiConfigProvider,LuiContextMenu,LuiDateRangePicker,LuiDatepicker,LuiDialog,LuiDivider,LuiDrawer,LuiDropdown,LuiDropmenu,LuiEmptyState,LuiFileInput,LuiForm,LuiFormItem,LuiIcon,LuiIconPicker,LuiImage,LuiImageCropper,LuiInput,LuiInputNumber,LuiInputOpt,LuiMenu,LuiMenuDivider,LuiMenuItem,LuiOption,LuiOptionGroup,LuiOverlayRoot,LuiPagination,LuiPopconfirm,LuiPopover,LuiProgress,LuiQrcode,LuiRadio,LuiRadioGroup,LuiRow,LuiScrollArea,LuiSelect,LuiSkeleton,LuiSlider,LuiSpinner,LuiSplitter,LuiStatistic,LuiSwitch,LuiTab,LuiTabPanel,LuiTable,LuiTableColumn,LuiTabs,LuiTag,LuiText,LuiTextarea,LuiToast,LuiTooltip,LuiTree,LuiTreeSelect,baseStyles,bringOverlayStackToFront,builtinIconCollection,builtinIconNames,builtinIconPrefix,builtinTranslations,commandPalette,contextMenu,createCommandPalette,createContextMenu,createDialog,createDialogForm,createDrawer,createForm,createPopover,createTable,createToastHost,dialog,drawer,encodeQr,ensureOverlayExternalLayer,ensureOverlayLayer,ensureOverlayRoot,eventPathContainsOwnedOverlay,form,formatDate,formatSize,getLocale,hasRecentOverlayInteraction,hideAllContextMenus,isImageIconSource,isOverlayTopmost,markOverlayInteraction,mergeTranslations,normalizeStatus,onLocaleChange,popover,registerFormField,registerOverlayStack,registerTranslations,resolveBuiltinIcon,resolveBuiltinTranslations,resolveOverlayLayerRegistration,setLocale,setOverlayOwner,setupBuiltinIcons,showContextMenu,statusColorToken,statusColorVar,statusIcon,statusOrder,t,table,toCssLength,toast,tokens,translate,unregisterFormField,unregisterOverlayStack});
14870
14883
  /*! Bundled license information:
14871
14884
 
14872
14885
  @lit-labs/virtualizer/layouts/shared/SizeCache.js: