UNPKG

balm-ui

Version:

A modular and customizable UI library based on Material Design and Vue 3

1 lines 566 kB
import{computed as t,onBeforeMount as e,openBlock as n,createElementBlock as i,normalizeClass as o,unref as r,renderSlot as a,onMounted as s,watch as l,ref as c,toDisplayString as u,createCommentVNode as d,createElementVNode as p,Fragment as h,createTextVNode as f,reactive as m,toRefs as g,renderList as E,createBlock as y,nextTick as v,createVNode as C,withCtx as T,useSlots as b,getTransitionRawChildren as I,getCurrentInstance as S,onUpdated as A,normalizeStyle as _,withDirectives as O,isRef as L,vModelSelect as x,normalizeProps as N,guardReactiveProps as D,withKeys as w,withModifiers as R,vModelText as k,mergeProps as M,vModelDynamic as P,onBeforeUnmount as F,vShow as H,createStaticVNode as V,vModelCheckbox as B,vModelRadio as U,createSlots as $,resolveDirective as j,createSSRApp as G,createApp as W}from"vue";var K="10.31.1";"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self;function Y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var q=function(t){return function(t){return!!t&&"object"===typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===X}(t)}(t)};var X="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function z(t,e){return!1!==e.clone&&e.isMergeableObject(t)?et((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function J(t,e,n){return t.concat(e).map((function(t){return z(t,n)}))}function Q(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function Z(t,e){try{return e in t}catch(n){return!1}}function tt(t,e,n){var i={};return n.isMergeableObject(t)&&Q(t).forEach((function(e){i[e]=z(t[e],n)})),Q(e).forEach((function(o){(function(t,e){return Z(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(Z(t,o)&&n.isMergeableObject(e[o])?i[o]=function(t,e){if(!e.customMerge)return et;var n=e.customMerge(t);return"function"===typeof n?n:et}(o,n)(t[o],e[o],n):i[o]=z(e[o],n))})),i}function et(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||J,n.isMergeableObject=n.isMergeableObject||q,n.cloneUnlessOtherwiseSpecified=z;var i=Array.isArray(e);return i===Array.isArray(t)?i?n.arrayMerge(t,e,n):tt(t,e,n):z(e,n)}et.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return et(t,n,e)}),{})};var nt=Y(et);const it=/(?:^\[object\s(.*?)\]$)/,ot=t=>Object.prototype.toString.call(t).replace(it,"$1").toLowerCase(),rt=t=>{let{componentProps:e,propName:n,props:i}=t,o=i[n];if("object"===ot(o)){const t=e[n].default;e[n].default=()=>nt(t,o)}else Array.isArray(o)?e[n].default=()=>o:e[n].default=o},at=t=>{let{componentMixins:e,propName:n,props:i}=t;if(e.length){let t=e.length;for(;t--;)if(e[t].props&&void 0!==e[t].props[n]){rt({componentProps:e[t].props,propName:n,props:i});break}}},st=(t,e)=>{for(const n of Object.keys(e))t.props?void 0===t.props[n]?at({componentMixins:t.mixins,propName:n,props:e}):rt({componentProps:t.props,propName:n,props:e}):at({componentMixins:t.mixins,propName:n,props:e})},lt=(t,e,n)=>{let{Components:i,Plugins:o,Directives:r}=n;((t,e)=>{for(const n of Object.keys(e))if(/^Ui[A-Z]{1}[A-Za-z]+$/.test(n)){const i=t[n],o=e[n];st(i,o)}})(i,e);for(const a in i){const e=i[a];t.component(e.name,e)}for(const a in o){const n=o[a];e[a]?t.use(n,e[a]):t.use(n)}for(const a in r){const e=r[a];t.directive(e.name,e)}},ct={cssClasses:{icon:"material-icons"},EVENTS:{CLICK:"click"},getMaterialIconClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return[ct.cssClasses.icon,...e]}};function ut(t){let{emit:e}=t;return{handleClick:function(t){e(ct.EVENTS.CLICK,t)}}}const dt=(t,e,n)=>t[n]||t.type===e[n]||t.type===n,pt="UiIcon",ht={TYPES:{filled:0,outlined:1,round:2,twoTone:3,sharp:4},DEFAULT_SIZE:24},ft={name:pt,customOptions:{name:pt,UI_GLOBAL:ct,UI_ICON:ht}};var mt,gt=Object.assign(ft,{props:{type:{type:[String,Number],default:0},outlined:{type:Boolean,default:!1},round:{type:Boolean,default:!1},twoTone:{type:Boolean,default:!1},sharp:{type:Boolean,default:!1},size:{type:[Number,String],default:ht.DEFAULT_SIZE},dark:{type:Boolean,default:!1},light:{type:Boolean,default:!1},inactive:{type:Boolean,default:!1}},emits:[ct.EVENTS.CLICK],setup(s,l){let{emit:c}=l;const u=s,d=c,{handleClick:p}=ut({emit:d}),h=t((()=>dt(u,ht.TYPES,"filled"))),f=t((()=>dt(u,ht.TYPES,"outlined"))),m=t((()=>dt(u,ht.TYPES,"round"))),g=t((()=>dt(u,ht.TYPES,"twoTone"))),E=t((()=>dt(u,ht.TYPES,"sharp"))),y=t((()=>u.dark&&u.light)),v=t((()=>u.dark||u.light)),C=t((()=>{let t={"material-icons":h.value,"material-icons-outlined":f.value,"material-icons-round":m.value,"material-icons-two-tone":g.value,"material-icons-sharp":E.value,"md-dark":u.dark&&!u.light,"md-light":u.light&&!u.dark,"md-inactive":u.inactive};return+u.size!==ht.DEFAULT_SIZE&&u.size>0&&(t[`md-${u.size}`]=!0),t}));return e((()=>{(y.value||!v.value&&u.inactive)&&console.warn(`[${pt}]: Invalid dark or light icon`)})),(t,e)=>(n(),i("i",{class:o(C.value),"aria-hidden":"true",onClick:e[0]||(e[0]=function(){return r(p)&&r(p)(...arguments)})},[a(t.$slots,"default")],2))}});var Et=function(t,e){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Et(t,e)};function yt(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Et(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var vt=function(){return vt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},vt.apply(this,arguments)};function Ct(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(e){r(e)}}function s(t){try{l(i.throw(t))}catch(e){r(e)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function Tt(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(l){s=[6,l],i=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function bt(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function It(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function St(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}"function"===typeof SuppressedError&&SuppressedError;var At=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),_t=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=t,this.initialize.apply(this,St([],It(n))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new At({}))},t.prototype.initialize=function(){},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation.destroy()},t.prototype.listen=function(t,e,n){this.root.addEventListener(t,e,n)},t.prototype.unlisten=function(t,e,n){this.root.removeEventListener(t,e,n)},t.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"===typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(i)},t}();function Ot(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch(o){e=!1}return e}(t)&&{passive:!0}}function Lt(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(xt(n,e))return n;n=n.parentElement}return null}function xt(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}var Nt={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Dt={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},wt={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},Rt=["touchstart","pointerdown","mousedown","keydown"],kt=["touchend","pointerup","mouseup","contextmenu"],Mt=[],Pt=function(t){function e(n){var i=t.call(this,vt(vt({},e.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(t){i.activateImpl(t)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return yt(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Nt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Dt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return wt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=e.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(r),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(i),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,n;if(t){try{for(var i=bt(Rt),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,n;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=bt(kt),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var n=bt(Rt),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(r){t={error:r}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=bt(kt),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(r){t={error:r}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,n=e.strings;Object.keys(n).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(n[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==t&&i.type!==t.type))n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&Mt.length>0&&Mt.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(Mt.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Mt=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive(t),n.wasElementMadeActive&&e.animateActivation()),n.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=e.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),p=d.startPoint,h=d.endPoint;c=p.x+"px, "+p.y+"px",u=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),l)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,o,r=e.x,a=e.y,s=r+n.left,l=a+n.top;if("touchstart"===t.type){var c=t;i=c.changedTouches[0].pageX-s,o=c.changedTouches[0].pageY-l}else{var u=t;i=u.pageX-s,o=u.pageY-l}return{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(n)}),wt.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var n=vt({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var n=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?n:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var i=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!==0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,o=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(At),Ft=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return yt(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var n,i=t.CSS;if("boolean"===typeof mt&&!e)return mt;if(!i||"function"!==typeof i.supports)return!1;var o=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=o||r,e||(mt=n),n}(window)},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,Ot())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,Ot())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return xt(t.root,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,Ot())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,Ot())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,n){return t.root.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getDefaultFoundation=function(){return new Pt(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},e}(_t);function Ht(t){return new Ft(t)}function Vt(t,e){s((()=>{const n=t.value;Ht(n),l((()=>e.type),(()=>Ht(n)))}))}const Bt={icon:{type:String,default:""}};function Ut(e){return{materialIcon:t((()=>e.icon||!1))}}const $t={action:"mdc-card__actions",button:"mdc-card__action-buttons",icon:"mdc-card__action-icons"};let jt={cardButton:!1,cardIcon:!1};function Gt(e){const n=t((()=>({"mdc-card__action":jt.cardButton||jt.cardIcon,"mdc-card__action--button":jt.cardButton,"mdc-card__action--icon":jt.cardIcon})));return s((()=>{var t;const n=null===(t=e.value)||void 0===t?void 0:t.parentNode;n&&"htmldivelement"===ot(n)&&(jt.cardButton=n.classList.contains($t.button)||n.classList.contains($t.action),jt.cardIcon=n.classList.contains($t.icon))})),{cardActionClasses:n}}const Wt=["type"],Kt=p("span",{class:"mdc-button__ripple"},null,-1),Yt=p("span",{class:"mdc-button__focus-ring"},null,-1),qt=["textContent"],Xt={TYPES:{text:0,outlined:1,raised:2,unelevated:3},cssClasses:{icon:"mdc-button__icon",label:"mdc-button__label",touch:"mdc-button--touch"}},zt={name:"UiButton",customOptions:{UI_GLOBAL:ct,UI_BUTTON:Xt}};var Jt=Object.assign(zt,{props:{type:{type:[String,Number],default:0},outlined:{type:Boolean,default:!1},raised:{type:Boolean,default:!1},unelevated:{type:Boolean,default:!1},...Bt,nativeType:{type:String,default:"button"}},emits:[ct.EVENTS.CLICK],setup(e,s){let{emit:l}=s;const h=e,f=l,m=c(null),{handleClick:g}=ut({emit:f});Vt(m,h);const{materialIcon:E}=Ut(h),{cardActionClasses:y}=Gt(m),v=t((()=>dt(h,Xt.TYPES,"outlined"))),C=t((()=>dt(h,Xt.TYPES,"raised"))),T=t((()=>dt(h,Xt.TYPES,"unelevated"))),b=t((()=>m.value&&m.value.classList.contains(Xt.cssClasses.touch))),I=t((()=>[{"mdc-button":!0,"mdc-button--outlined":v.value,"mdc-button--raised":C.value,"mdc-button--unelevated":T.value,"mdc-button--touch":b.value},y.value]));return(t,s)=>(n(),i("button",{ref_key:"button",ref:m,type:e.nativeType,class:o(I.value),onClick:s[0]||(s[0]=function(){return r(g)&&r(g)(...arguments)})},[Kt,Yt,a(t.$slots,"before",{iconClass:Xt.cssClasses.icon},(()=>[r(E)?(n(),i("i",{key:0,class:o(r(ct).getMaterialIconClass(Xt.cssClasses.icon)),"aria-hidden":"true",textContent:u(r(E))},null,10,qt)):d("",!0)])),p("span",{class:o(Xt.cssClasses.label)},[a(t.$slots,"default")],2),a(t.$slots,"after",{iconClass:Xt.cssClasses.icon})],10,Wt))}}),Qt={TYPES:{regular:0,extended:1},cssClasses:{icon:"mdc-fab__icon",touch:"mdc-fab--touch"}};const Zt=p("div",{class:"mdc-fab__ripple"},null,-1),te=p("div",{class:"mdc-fab__focus-ring"},null,-1),ee=["textContent"],ne={class:"mdc-fab__label"},ie=["textContent"],oe={name:"UiFab",customOptions:{UI_GLOBAL:ct,UI_FAB:Qt}};var re=Object.assign(oe,{props:{type:{type:[String,Number],default:0},extended:{type:Boolean,default:!1},...Bt,mini:{type:Boolean,default:!1},exited:{type:Boolean,default:!1}},emits:[ct.EVENTS.CLICK],setup(e,s){let{emit:l}=s;const f=e,m=l,g=c(null),{handleClick:E}=ut({emit:m});Vt(g,f);const{materialIcon:y}=Ut(f),v=t((()=>dt(f,Qt.TYPES,"extended"))),C=t((()=>g.value&&g.value.classList.contains(Qt.cssClasses.touch))),T=t((()=>({"mdc-fab":!0,"mdc-fab--extended":v.value,"mdc-fab--mini":f.mini,"mdc-fab--exited":f.exited,"mdc-fab--touch":C.value})));return(t,e)=>(n(),i("button",{ref_key:"fab",ref:g,type:"button",class:o(T.value),onClick:e[0]||(e[0]=function(){return r(E)&&r(E)(...arguments)})},[Zt,te,v.value?(n(),i(h,{key:0},[a(t.$slots,"before",{iconClass:r(Qt).cssClasses.icon},(()=>[r(y)?(n(),i("i",{key:0,class:o(r(ct).getMaterialIconClass(r(Qt).cssClasses.icon)),textContent:u(r(y))},null,10,ee)):d("",!0)])),p("span",ne,[a(t.$slots,"default")]),a(t.$slots,"after",{iconClass:r(Qt).cssClasses.icon})],64)):a(t.$slots,"default",{key:1,iconClass:r(Qt).cssClasses.icon},(()=>[r(y)?(n(),i("i",{key:0,class:o(r(ct).getMaterialIconClass(r(Qt).cssClasses.icon)),textContent:u(r(y))},null,10,ie)):d("",!0)]))],2))}}),ae={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},se={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},le=function(t){function e(n){var i=t.call(this,vt(vt({},e.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return yt(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ae},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return se},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.getAttr(se.DATA_ARIA_LABEL_ON),e=this.adapter.getAttr(se.DATA_ARIA_LABEL_OFF);if(t&&e){if(null!==this.adapter.getAttr(se.ARIA_PRESSED))throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(se.ARIA_PRESSED,String(this.isOn()))},e.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},e.prototype.isOn=function(){return this.adapter.hasClass(ae.ICON_BUTTON_ON)},e.prototype.toggle=function(t){if(void 0===t&&(t=!this.isOn()),t?this.adapter.addClass(ae.ICON_BUTTON_ON):this.adapter.removeClass(ae.ICON_BUTTON_ON),this.hasToggledAriaLabel){var e=t?this.adapter.getAttr(se.DATA_ARIA_LABEL_ON):this.adapter.getAttr(se.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(se.ARIA_LABEL,e||"")}else this.adapter.setAttr(se.ARIA_PRESSED,""+t)},e}(At),ce=le.strings,ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rippleComponent=e.createRipple(),e}return yt(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new le({addClass:function(e){return t.root.classList.add(e)},hasClass:function(e){return t.root.classList.contains(e)},notifyChange:function(e){t.emit(ce.CHANGE_EVENT,e)},removeClass:function(e){return t.root.classList.remove(e)},getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){return t.root.setAttribute(e,n)}})},Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(t){this.foundation.toggle(t)},enumerable:!1,configurable:!0}),e.prototype.createRipple=function(){var t=new Ft(this.root);return t.unbounded=!0,t},e}(_t);const de=p("div",{class:"mdc-icon-button__ripple"},null,-1),pe=p("span",{class:"mdc-icon-button__focus-ring"},null,-1),he=["textContent"],fe=["textContent"],me={cssClasses:{off:"mdc-icon-button__icon",on:"mdc-icon-button__icon mdc-icon-button__icon--on"},EVENTS:{CHANGE:"update:modelValue"}},ge={name:"UiIconButton",customOptions:{UI_GLOBAL:ct,UI_ICON_BUTTON:me}};var Ee=Object.assign(ge,{props:{modelValue:{type:Boolean,default:!1},...Bt,toggle:{type:Object,default:()=>({})}},emits:[ct.EVENTS.CLICK,me.EVENTS.CHANGE],setup(e,d){let{emit:m}=d;const g=e,E=m,y=c(null),{handleClick:v}=ut({emit:E}),{cardActionClasses:C}=Gt(y),T=t((()=>g.toggle.on&&g.toggle.off)),b=t((()=>[{"mdc-icon-button":!0,"material-icons":!T.value},C.value]));return s((()=>{const t=new ue(y.value);t.listen(se.CHANGE_EVENT,(t=>{let{detail:e}=t;E(me.EVENTS.CHANGE,e.isOn)})),t.on=g.modelValue,l((()=>g.modelValue),(e=>t.on=e))})),(t,s)=>(n(),i("button",{ref_key:"iconButton",ref:y,type:"button",class:o(b.value),onClick:s[0]||(s[0]=function(){return r(v)&&r(v)(...arguments)})},[de,pe,T.value?(n(),i(h,{key:0},[p("i",{class:o(r(ct).getMaterialIconClass(me.cssClasses.off)),textContent:u(e.toggle.off)},null,10,he),p("i",{class:o(r(ct).getMaterialIconClass(me.cssClasses.on)),textContent:u(e.toggle.on)},null,10,fe)],64)):a(t.$slots,"default",{key:1,onClass:me.cssClasses.on,offClass:me.cssClasses.off},(()=>[f(u(t.icon),1)]))],2))}}),ye=".mdc-segmented-button__segment",ve="selected",Ce="change",Te="mdc-segmented-button--single-select",be=function(t){function e(n){return t.call(this,vt(vt({},e.defaultAdapter),n))||this}return yt(e,t),Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},getSegments:function(){return[]},selectSegment:function(){},unselectSegment:function(){},notifySelectedChange:function(){}}},enumerable:!1,configurable:!0}),e.prototype.selectSegment=function(t){this.adapter.selectSegment(t)},e.prototype.unselectSegment=function(t){this.adapter.unselectSegment(t)},e.prototype.getSelectedSegments=function(){return this.adapter.getSegments().filter((function(t){return t.selected}))},e.prototype.isSegmentSelected=function(t){return this.adapter.getSegments().some((function(e){return(e.index===t||e.segmentId===t)&&e.selected}))},e.prototype.isSingleSelect=function(){return this.adapter.hasClass(Te)},e.prototype.handleSelected=function(t){this.isSingleSelect()&&this.unselectPrevSelected(t.index),this.adapter.notifySelectedChange(t)},e.prototype.unselectPrevSelected=function(t){var e,n;try{for(var i=bt(this.getSelectedSegments()),o=i.next();!o.done;o=i.next()){var r=o.value;r.index!==t&&this.unselectSegment(r.index)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},e}(At),Ie="true",Se="false",Ae="aria-checked",_e="aria-pressed",Oe="data-segment-id",Le="click",xe="selected",Ne="mdc-segmented-button__segment--selected",De={bottom:0,height:0,left:0,right:0,top:0,width:0},we=function(t){function e(n){return t.call(this,vt(vt({},e.defaultAdapter),n))||this}return yt(e,t),Object.defineProperty(e,"defaultAdapter",{get:function(){return{isSingleSelect:function(){return!1},getAttr:function(){return""},setAttr:function(){},addClass:function(){},removeClass:function(){},hasClass:function(){return!1},notifySelectedChange:function(){},getRootBoundingClientRect:function(){return De}}},enumerable:!1,configurable:!0}),e.prototype.isSelected=function(){return this.adapter.hasClass(Ne)},e.prototype.setSelected=function(){this.adapter.addClass(Ne),this.setAriaAttr(Ie)},e.prototype.setUnselected=function(){this.adapter.removeClass(Ne),this.setAriaAttr(Se)},e.prototype.getSegmentId=function(){var t;return null!==(t=this.adapter.getAttr(Oe))&&void 0!==t?t:void 0},e.prototype.handleClick=function(){this.adapter.isSingleSelect()?this.setSelected():this.toggleSelection(),this.adapter.notifySelectedChange(this.isSelected())},e.prototype.getDimensions=function(){return this.adapter.getRootBoundingClientRect()},e.prototype.toggleSelection=function(){this.isSelected()?this.setUnselected():this.setSelected()},e.prototype.setAriaAttr=function(t){this.adapter.isSingleSelect()?this.adapter.setAttr(Ae,t):this.adapter.setAttr(_e,t)},e}(At),Re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e=this;void 0===t&&(t=function(t,e){return new Ft(t,e)});var n=vt(vt({},Ft.createAdapter(this)),{computeBoundingRect:function(){return e.foundation.getDimensions()}});this.rippleComponent=t(this.root,new Pt(n))},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen(Le,this.handleClick)},e.prototype.destroy=function(){this.ripple.destroy(),this.unlisten(Le,this.handleClick),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new we({isSingleSelect:function(){return t.isSingleSelect},getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){t.root.setAttribute(e,n)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},notifySelectedChange:function(e){t.emit(xe,{index:t.index,selected:e,segmentId:t.getSegmentId()},!0)},getRootBoundingClientRect:function(){return t.root.getBoundingClientRect()}})},e.prototype.setIndex=function(t){this.index=t},e.prototype.setIsSingleSelect=function(t){this.isSingleSelect=t},e.prototype.isSelected=function(){return this.foundation.isSelected()},e.prototype.setSelected=function(){this.foundation.setSelected()},e.prototype.setUnselected=function(){this.foundation.setUnselected()},e.prototype.getSegmentId=function(){return this.foundation.getSegmentId()},e}(_t),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"segments",{get:function(){return this.segmentsList.slice()},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t){void 0===t&&(t=function(t){return new Re(t)}),this.segmentFactory=t,this.segmentsList=this.instantiateSegments(this.segmentFactory)},e.prototype.instantiateSegments=function(t){return[].slice.call(this.root.querySelectorAll(ye)).map((function(e){return t(e)}))},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleSelected=function(e){t.foundation.handleSelected(e.detail)},this.listen(ve,this.handleSelected);for(var e=this.foundation.isSingleSelect(),n=0;n<this.segmentsList.length;n++){var i=this.segmentsList[n];i.setIndex(n),i.setIsSingleSelect(e)}var o=this.segmentsList.filter((function(t){return t.isSelected()}));if(e&&0===o.length&&this.segmentsList.length>0)throw new Error("No segment selected in singleSelect mdc-segmented-button");if(e&&o.length>1)throw new Error("Multiple segments selected in singleSelect mdc-segmented-button")},e.prototype.destroy=function(){var e,n;try{for(var i=bt(this.segmentsList),o=i.next();!o.done;o=i.next()){o.value.destroy()}}catch(r){e={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.unlisten(ve,this.handleSelected),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new be({hasClass:function(e){return t.root.classList.contains(e)},getSegments:function(){return t.mappedSegments()},selectSegment:function(e){var n=t.mappedSegments().find((function(t){return t.index===e||t.segmentId===e}));n&&t.segmentsList[n.index].setSelected()},unselectSegment:function(e){var n=t.mappedSegments().find((function(t){return t.index===e||t.segmentId===e}));n&&t.segmentsList[n.index].setUnselected()},notifySelectedChange:function(e){t.emit(Ce,e,!0)}})},e.prototype.getSelectedSegments=function(){return this.foundation.getSelectedSegments()},e.prototype.selectSegment=function(t){this.foundation.selectSegment(t)},e.prototype.unselectSegment=function(t){this.foundation.unselectSegment(t)},e.prototype.isSegmentSelected=function(t){return this.foundation.isSegmentSelected(t)},e.prototype.mappedSegments=function(){return this.segmentsList.map((function(t,e){return{index:e,selected:t.isSelected(),segmentId:t.getSegmentId()}}))},e}(_t);const Me=["role"],Pe=p("div",{class:"mdc-segmented-button__ripple"},null,-1),Fe=["textContent"],He={cssClasses:{icon:"mdc-segmented-button__icon",label:"mdc-segmented-button__label",touch:"mdc-segmented-button--touch"}},Ve={name:"UiSegmentedButton",customOptions:{UI_GLOBAL:ct,UI_SEGMENTED_BUTTON:He}};var Be=Object.assign(Ve,{props:{selected:{type:Boolean,default:!1},...Bt,text:{type:String,default:""}},emits:[ct.EVENTS.CLICK],setup(e,s){let{emit:l}=s;const p=e,h=l,f=c(null),{handleClick:m}=ut({emit:h}),{materialIcon:g}=Ut(p),E=t((()=>f.value&&f.value.classList.contains(He.cssClasses.touch))),y=t((()=>({"mdc-segmented-button__segment":!0,"mdc-segmented-button__segment--selected":p.selected,"mdc-segmented-button--touch":E.value})));return(t,s)=>(n(),i("button",{ref_key:"segmentedButton",ref:f,class:o(y.value),role:t.$parent.singleSelect?"radio":null,onClick:s[0]||(s[0]=function(){return r(m)&&r(m)(...arguments)})},[Pe,a(t.$slots,"before",{iconClass:He.cssClasses.icon},(()=>[r(g)?(n(),i("i",{key:0,class:o(r(ct).getMaterialIconClass(He.cssClasses.icon)),"aria-hidden":"true",textContent:u(r(g))},null,10,Fe)):d("",!0)])),a(t.$slots,"default",{textClass:He.cssClasses.label},(()=>[e.text?(n(),i("span",{key:0,class:o(He.cssClasses.label)},u(e.text),3)):d("",!0)])),a(t.$slots,"after",{iconClass:He.cssClasses.icon})],10,Me))}});const Ue=["role"],$e={EVENTS:{CHANGE:"update:modelValue",SELECTED:"selected"}},je={name:"UiSegmentedButtons",customOptions:{UI_SEGMENTED_BUTTONS:$e}};var Ge=Object.assign(je,{props:{modelValue:{type:[Array,Number],default:()=>[]},items:{type:Array,default:()=>[]},singleSelect:{type:Boolean,default:!1}},emits:[$e.EVENTS.CHANGE,$e.EVENTS.SELECTED],setup(e,u){let{emit:d}=u;const p=e,f=d,v=c(null),C=m({selectedValue:p.modelValue}),{selectedValue:T}=g(C),b=t((()=>({"mdc-segmented-button":!0,"mdc-segmented-button--single-select":p.singleSelect}))),I=t((()=>p.singleSelect?"radiogroup":"group"));return l((()=>p.modelValue),(t=>{C.selectedValue=t})),s((()=>{try{!function(t){const e=new ke(t);e.listen(Ce,(t=>{let{detail:e}=t;const n=e.index;let i=C.selectedValue;p.singleSelect?i=n:(e.selected?(i.push(n),i=[...new Set(i)]):i=i.filter((t=>t!==n)),i.sort(((t,e)=>t-e))),f($e.EVENTS.CHANGE,i),f($e.EVENTS.SELECTED,n)}));const n=e.segments.filter(((t,e)=>C.selectedValue.includes(e)));n.length&&n.forEach((t=>t.setSelected()))}(v.value)}catch(t){}})),(t,s)=>(n(),i("div",{ref_key:"segmentedButtons",ref:v,class:o(b.value),role:I.value},[a(t.$slots,"default",{},(()=>[(n(!0),i(h,null,E(e.items,((t,i)=>(n(),y(Be,{key:i,text:t.text||null,icon:t.icon||null,selected:!!e.singleSelect&&i===r(T),onClick:t=>{return e=i,void(p.singleSelect&&(C.selectedValue=e,f($e.EVENTS.CHANGE,C.selectedValue),f($e.EVENTS.SELECTED,e)));var e}},null,8,["text","icon","selected","onClick"])))),128))]))],10,Ue))}}),We={FIXED_CLASS:"mdc-top-app-bar--fixed",FIXED_SCROLLED_CLASS:"mdc-top-app-bar--fixed-scrolled",SHORT_CLASS:"mdc-top-app-bar--short",SHORT_COLLAPSED_CLASS:"mdc-top-app-bar--short-collapsed",SHORT_HAS_ACTION_ITEM_CLASS:"mdc-top-app-bar--short-has-action-item"},Ke={DEBOUNCE_THROTTLE_RESIZE_TIME_MS:100,MAX_TOP_APP_BAR_HEIGHT:128},Ye={ACTION_ITEM_SELECTOR:".mdc-top-app-bar__action-item",NAVIGATION_EVENT:"MDCTopAppBar:nav",NAVIGATION_ICON_SELECTOR:".mdc-top-app-bar__navigation-icon",ROOT_SELECTOR:".mdc-top-app-bar",TITLE_SELECTOR:".mdc-top-app-bar__title"},qe=function(t){function e(n){return t.call(this,vt(vt({},e.defaultAdapter),n))||this}return yt(e,t),Object.defineProperty(e,"strings",{get:function(){return Ye},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return We},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ke},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},getTopAppBarHeight:function(){return 0},notifyNavigationIconClicked:function(){},getViewportScrollY:function(){return 0},getTotalActionItems:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.handleTargetScroll=function(){},e.prototype.handleWindowResize=function(){},e.prototype.handleNavigationClick=function(){this.adapter.notifyNavigationIconClicked()},e}(At),Xe=function(t){function e(e){var n=t.call(this,e)||this;return n.wasDocked=!0,n.isDockedShowing=!0,n.currentAppBarOffsetTop=0,n.isCurrentlyBeingResized=!1,n.resizeThrottleId=0,n.resizeDebounceId=0,n.lastScrollPosition=n.adapter.getViewportScrollY(),n.topAppBarHeight=n.adapter.getTopAppBarHeight(),n}return yt(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.adapter.setStyle("top","")},e.prototype.handleTargetScroll=function(){var t=Math.max(this.adapter.getViewportScrollY(),0),e=t-this.lastScrollPosition;this.lastScrollPosition=t,this.isCurrentlyBeingResized||(this.currentAppBarOffsetTop-=e,this.currentAppBarOffsetTop>0?this.currentAppBarOffsetTop=0:Math.abs(this.currentAppBarOffsetTop)>this.topAppBarHeight&&(this.currentAppBarOffsetTop=-this.topAppBarHeight),this.moveTopAppBar())},e.prototype.handleWindowResize=function(){var t=this;this.resizeThrottleId||(this.resizeThrottleId=setTimeout((function(){t.resizeThrottleId=0,t.throttledResizeHandler()}),Ke.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)),this.isCurrentlyBeingResized=!0,this.resizeDebounceId&&clearTimeout(this.resizeDebounceId),this.resizeDebounceId=setTimeout((function(){t.handleTargetScroll(),t.isCurrentlyBeingResized=!1,t.resizeDebounceId=0}),Ke.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)},e.prototype.checkForUpdate=function(){var t=-this.topAppBarHeight,e=this.currentAppBarOffsetTop<0,n=this.currentAppBarOffsetTop>t,i=e&&n;if(i)this.wasDocked=!1;else{if(!this.wasDocked)return this.wasDocked=!0,!0;if(this.isDockedShowing!==n)return this.isDockedShowing=n,!0}return i},e.prototype.moveTopAppBar=function(){if(this.checkForUpdate()){var t=this.currentAppBarOffsetTop;Math.abs(t)>=this.topAppBarHeight&&(t=-Ke.MAX_TOP_APP_BAR_HEIGHT),this.adapter.setStyle("top",t+"px")}},e.prototype.throttledResizeHandler=function(){var t=this.adapter.getTopAppBarHeight();this.topAppBarHeight!==t&&(this.wasDocked=!1,this.currentAppBarOffsetTop-=this.topAppBarHeight-t,this.topAppBarHeight=t),this.handleTargetScroll()},e}(qe),ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.wasScrolled=!1,e}return yt(e,t),e.prototype.handleTargetScroll=function(){this.adapter.getViewportScrollY()<=0?this.wasScrolled&&(this.adapter.removeClass(We.FIXED_SCROLLED_CLASS),this.wasScrolled=!1):this.wasScrolled||(this.adapter.addClass(We.FIXED_SCROLLED_CLASS),this.wasScrolled=!0)},e}(Xe),Je=function(t){function e(e){var n=t.call(this,e)||this;return n.collapsed=!1,n.isAlwaysCollapsed=!1,n}return yt(e,t),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this.collapsed},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this),this.adapter.getTotalActionItems()>0&&this.adapter.addClass(We.SHORT_HAS_ACTION_ITEM_CLASS),this.setAlwaysCollapsed(this.adapter.hasClass(We.SHORT_COLLAPSED_CLASS))},e.prototype.setAlwaysCollapsed=function(t){this.isAlwaysCollapsed=!!t,this.isAlwaysCollapsed?this.collapse():this.maybeCollapseBar()},e.prototype.getAlwaysCollapsed=function(){return this.isAlwaysCollapsed},e.prototype.handleTargetScroll=function(){this.maybeCollapseBar()},e.prototype.maybeCollapseBar=function(){this.isAlwaysCollapsed||(this.adapter.getViewportScrollY()<=0?this.collapsed&&this.uncollapse():this.collapsed||this.collapse())},e.prototype.uncollapse=function(){this.adapter.removeClass(We.SHORT_COLLAPSED_CLASS),this.collapsed=!1},e.prototype.collapse=function(){this.adapter.addClass(We.SHORT_COLLAPSED_CLASS),this.collapsed=!0},e}(qe),Qe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){void 0===t&&(t=function(t){return Ft.attachTo(t)}),this.navIcon=this.root.querySelector(Ye.NAVIGATION_ICON_SELECTOR);var e=[].slice.call(this.root.querySelectorAll(Ye.ACTION_ITEM_SELECTOR));this.navIcon&&e.push(this.navIcon),this.iconRipples=e.map((function(e){var n=t(e);return n.unbounded=!0,n})),this.scrollTarget=window},e.prototype.initialSyncWithDOM=function(){this.handleNavigationClick=this.foundation.handleNavigationClick.bind(this.foundation),this.handleWindowResize=this.foundation.handleWindowResize.bind(this.foundation),this.handleTargetScroll=this.foundation.handleTargetScroll.bind(this.foundation),this.scrollTarget.addEventListener("scroll",this.handleTargetScroll),this.navIcon&&this.navIcon.addEventListener("click",this.handleNavigationClick);var t=this.root.classList.contains(We.FIXED_CLASS);this.root.classList.contains(We.SHORT_CLASS)||t||window.addEventListener("resize",this.handleWindowResize)},e.prototype.destroy=function(){var e,n;try{for(var i=bt(this.iconRipples),o=i.next();!o.done;o=i.next()){o.value.destroy()}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll),this.navIcon&&this.navIcon.removeEventListener("click",this.handleNavigationClick);var r=this.root.classList.contains(We.FIXED_CLASS);this.root.classList.contains(We.SHORT_CLASS)||r||window.removeEventListener("resize",this.handleWindowResize),t.prototype.destroy.call(this)},e.prototype.setScrollTarget=function(t){this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll),this.scrollTarget=t,this.handleTargetScroll=this.foundation.handleTargetScroll.bind(this.foundation),this.scrollTarget.addEventListener("scroll",this.handleTargetScroll)},e.prototype.getDefaultFoundation=function(){var t=this,e={hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},setStyle:function(e,n){return t.root.style.setProperty(e,n)},getTopAppBarHeight:function(){return t.root.clientHeight},notifyNavigationIconClicked:function(){return t.emit(Ye.NAVIGATION_EVENT,{})},getViewportScrollY:function(){var e=t.scrollTarget,n=t.scrollTarget;return void 0!==e.pageYOffset?e.pageYOffset:n.scrollTop},getTotalActionItems:function(){return t.root.querySelectorAll(Ye.ACTION_ITEM_SELECTOR).length}};return this.root.classList.contains(We.SHORT_CLASS)?new Je(e):this.root.classList.contains(We.FIXED_CLASS)?new ze(e):new Xe(e)},e}(_t);const Ze=p("div",{class:"mdc-icon-button__ripple"},null,-1),tn=p("span",{class:"mdc-icon-button__focus-ring"},null,-1),en={name:"MdcIconButton",customOptions:{UI_GLOBAL:ct}};var nn=Object.assign(en,{emits:[ct.EVENTS.CLICK],setup(t,e){let{emit:s}=e;const l=s,{handleClick:c}=ut({emit:l});return(t,e)=>(n(),i("button",{type:"button",class:o(["mdc-icon-button",r(ct).cssClasses.icon]),onClick:e[0]||(e[0]=function(){return r(c)&&r(c)(...arguments)})},[Ze,tn,a(t.$slots,"default")],2))}});const on={class:"mdc-top-app-bar__row"},rn={class:"mdc-top-app-bar__sec