balm-ui
Version:
A modular and customizable UI library based on Material Design and Vue 3
1 lines • 550 kB
JavaScript
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue"),require("flatpickr")):"function"===typeof define&&define.amd?define("BalmUI",["vue","flatpickr"],t):"object"===typeof exports?exports.BalmUI=t(require("vue"),require("flatpickr")):e.BalmUI=t(e.Vue,e.flatpickr)}("undefined"!==typeof self?self:this,(function(e,t){return function(){var n={744:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var o={};return n.isMergeableObject(e)&&r(e).forEach((function(t){o[t]=i(e[t],n)})),r(t).forEach((function(r){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(a(e,r)&&n.isMergeableObject(t[r])?o[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(r,n)(e[r],t[r],n):o[r]=i(t[r],n))})),o}function l(e,n,r){(r=r||{}).arrayMerge=r.arrayMerge||o,r.isMergeableObject=r.isMergeableObject||t,r.cloneUnlessOtherwiseSpecified=i;var a=Array.isArray(n);return a===Array.isArray(e)?a?r.arrayMerge(e,n,r):s(e,n,r):i(n,r)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},370:function(e){e.exports=function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)},t=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]};function n(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function i(e){try{return"function"===typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var o={shorthand:!1,dateFormat:"F Y",altFormat:"F Y",theme:"light"};function r(r){var a=e(e({},o),r);return function(e){e.config.dateFormat=a.dateFormat,e.config.altFormat=a.altFormat;var o={monthsContainer:null};function r(){if(e.rContainer){n(e.rContainer);for(var t=0;t<e.monthElements.length;t++){var i=e.monthElements[t];i.parentNode&&i.parentNode.removeChild(i)}}}function s(){e.rContainer&&(o.monthsContainer=e._createElement("div","flatpickr-monthSelect-months"),o.monthsContainer.tabIndex=-1,l(),e.rContainer.appendChild(o.monthsContainer),e.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+a.theme))}function l(){if(o.monthsContainer){n(o.monthsContainer);for(var i=document.createDocumentFragment(),r=0;r<12;r++){var s=e.createDay("flatpickr-monthSelect-month",new Date(e.currentYear,r),0,r);s.dateObj.getMonth()===(new Date).getMonth()&&s.dateObj.getFullYear()===(new Date).getFullYear()&&s.classList.add("today"),s.textContent=t(r,a.shorthand,e.l10n),s.addEventListener("click",p),i.appendChild(s)}o.monthsContainer.appendChild(i),e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()?e.prevMonthNav.classList.add("flatpickr-disabled"):e.prevMonthNav.classList.remove("flatpickr-disabled"),e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.nextMonthNav.classList.add("flatpickr-disabled"):e.nextMonthNav.classList.remove("flatpickr-disabled")}}function c(){e._bind(e.prevMonthNav,"click",(function(t){t.preventDefault(),t.stopPropagation(),e.changeYear(e.currentYear-1),d(),l()})),e._bind(e.nextMonthNav,"click",(function(t){t.preventDefault(),t.stopPropagation(),e.changeYear(e.currentYear+1),d(),l()})),e._bind(o.monthsContainer,"mouseover",(function(t){"range"===e.config.mode&&e.onMouseOver(i(t),"flatpickr-monthSelect-month")}))}function u(){if(e.rContainer&&e.selectedDates.length){for(var t=e.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected"),n=0;n<t.length;n++)t[n].classList.remove("selected");var i=e.selectedDates[0].getMonth(),o=e.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(i+1)+")");o&&o.classList.add("selected")}}function d(){var t=e.selectedDates[0];t&&((t=new Date(t)).setFullYear(e.currentYear),e.config.minDate&&t<e.config.minDate&&(t=e.config.minDate),e.config.maxDate&&t>e.config.maxDate&&(t=e.config.maxDate),e.currentYear=t.getFullYear()),e.currentYearElement.value=String(e.currentYear),e.rContainer&&e.rContainer.querySelectorAll(".flatpickr-monthSelect-month").forEach((function(t){t.dateObj.setFullYear(e.currentYear),e.config.minDate&&t.dateObj<e.config.minDate||e.config.maxDate&&t.dateObj>e.config.maxDate?t.classList.add("flatpickr-disabled"):t.classList.remove("flatpickr-disabled")})),u()}function p(t){t.preventDefault(),t.stopPropagation();var n=i(t);if(n instanceof Element&&!n.classList.contains("flatpickr-disabled")&&!n.classList.contains("notAllowed")&&(h(n.dateObj),e.config.closeOnSelect)){var o="single"===e.config.mode,r="range"===e.config.mode&&2===e.selectedDates.length;(o||r)&&e.close()}}function h(t){var n=new Date(e.currentYear,t.getMonth(),t.getDate()),i=[];switch(e.config.mode){case"single":i=[n];break;case"multiple":i.push(n);break;case"range":2===e.selectedDates.length?i=[n]:(i=e.selectedDates.concat([n])).sort((function(e,t){return e.getTime()-t.getTime()}))}e.setDate(i,!0),u()}var f={37:-1,39:1,40:3,38:-3};function m(t,n,i,r){var a=void 0!==f[r.keyCode];if((a||13===r.keyCode)&&e.rContainer&&o.monthsContainer){var s=e.rContainer.querySelector(".flatpickr-monthSelect-month.selected"),l=Array.prototype.indexOf.call(o.monthsContainer.children,document.activeElement);if(-1===l){var c=s||o.monthsContainer.firstElementChild;c.focus(),l=c.$i}a?o.monthsContainer.children[(12+l+f[r.keyCode])%12].focus():13===r.keyCode&&o.monthsContainer.contains(document.activeElement)&&h(document.activeElement.dateObj)}}function E(){var t;"range"===(null===(t=e.config)||void 0===t?void 0:t.mode)&&1===e.selectedDates.length&&e.clear(!1),e.selectedDates.length||l()}function g(){a._stubbedCurrentMonth=e._initialDate.getMonth(),e._initialDate.setMonth(a._stubbedCurrentMonth),e.currentMonth=a._stubbedCurrentMonth}function y(){a._stubbedCurrentMonth&&(e._initialDate.setMonth(a._stubbedCurrentMonth),e.currentMonth=a._stubbedCurrentMonth,delete a._stubbedCurrentMonth)}function v(){if(null!==o.monthsContainer)for(var e=o.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month"),t=0;t<e.length;t++)e[t].removeEventListener("click",p)}return{onParseConfig:function(){e.config.enableTime=!1},onValueUpdate:u,onKeyDown:m,onReady:[g,r,s,c,u,function(){e.config.onClose.push(E),e.loadedPlugins.push("monthSelect")}],onDestroy:[y,v,function(){e.config.onClose=e.config.onClose.filter((function(e){return e!==E}))}]}}}return r}()},645:function(e){e.exports=function(){"use strict";function e(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}function t(t){return void 0===t&&(t={}),function(n){var i,o,r,a="",s=function(){if(t.input){if(!(i=t.input instanceof Element?t.input:window.document.querySelector(t.input)))return void n.config.errorHandler(new Error("Invalid input element specified"));n.config.wrap&&(i=i.querySelector("[data-input]"))}else(i=n._input.cloneNode()).removeAttribute("id"),i._flatpickr=void 0;if(i.value){var e=n.parseDate(i.value);e&&n.selectedDates.push(e)}i.setAttribute("data-fp-omit",""),n.config.clickOpens&&(n._bind(i,["focus","click"],(function(){n.selectedDates[1]&&(n.latestSelectedDateObj=n.selectedDates[1],n._setHoursFromDate(n.selectedDates[1]),n.jumpToDate(n.selectedDates[1])),o=!0,n.isOpen=!1,n.open(void 0,"left"===t.position?n._input:i)})),n._bind(n._input,["focus","click"],(function(e){e.preventDefault(),n.isOpen=!1,n.open()}))),n.config.allowInput&&n._bind(i,"keydown",(function(e){"Enter"===e.key&&(n.setDate([n.selectedDates[0],i.value],!0,a),i.click())})),t.input||n._input.parentNode&&n._input.parentNode.insertBefore(i,n._input.nextSibling)},l={onParseConfig:function(){n.config.mode="range",a=n.config.altInput?n.config.altFormat:n.config.dateFormat},onReady:function(){s(),n.config.ignoredFocusElements.push(i),n.config.allowInput?(n._input.removeAttribute("readonly"),i.removeAttribute("readonly")):i.setAttribute("readonly","readonly"),n._bind(n._input,"focus",(function(){n.latestSelectedDateObj=n.selectedDates[0],n._setHoursFromDate(n.selectedDates[0]),o=!1,n.jumpToDate(n.selectedDates[0])})),n.config.allowInput&&n._bind(n._input,"keydown",(function(e){"Enter"===e.key&&n.setDate([n._input.value,n.selectedDates[1]],!0,a)})),n.setDate(n.selectedDates,!1),l.onValueUpdate(n.selectedDates),n.loadedPlugins.push("range")},onPreCalendarPosition:function(){o&&(n._positionElement=i,setTimeout((function(){n._positionElement=n._input}),0))},onChange:function(){n.selectedDates.length||setTimeout((function(){n.selectedDates.length||(i.value="",r=[])}),10),o&&setTimeout((function(){i.focus()}),0)},onDestroy:function(){t.input||i.parentNode&&i.parentNode.removeChild(i)},onValueUpdate:function(t){var s,l,c;if(i){if((r=!r||t.length>=r.length?e(t):r).length>t.length){var u=t[0],d=o?[r[0],u]:[u,r[1]];d[0].getTime()>d[1].getTime()&&(o?d[0]=d[1]:d[1]=d[0]),n.setDate(d,!1),r=e(d)}l=(s=n.selectedDates.map((function(e){return n.formatDate(e,a)})))[0],n._input.value=void 0===l?"":l,c=s[1],i.value=void 0===c?"":c}}};return l}}return t}()},262:function(e,t){"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n}},144:function(e){"use strict";e.exports=t},154:function(t){"use strict";t.exports=e}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e].call(r.exports,r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";o.r(r),o.d(r,{$alert:function(){return pv},$confirm:function(){return Cv},$event:function(){return sy},$grid:function(){return vy},$store:function(){return fy},$theme:function(){return Vy},$toast:function(){return kv},$typography:function(){return jy},$validator:function(){return Fv},UiAlert:function(){return Hf},UiAutocomplete:function(){return Ps},UiBadge:function(){return Of},UiBanner:function(){return gE},UiButton:function(){return oe},UiCard:function(){return Ap},UiCardActions:function(){return Fp},UiCardButtons:function(){return $p},UiCardContent:function(){return Np},UiCardIcons:function(){return Wp},UiCardMedia:function(){return Rp},UiCardMediaContent:function(){return Dp},UiCardText:function(){return Pp},UiCheckbox:function(){return Ql},UiChip:function(){return Wc},UiChips:function(){return Zc},UiCollapse:function(){return Df},UiDatepicker:function(){return qs},UiDialog:function(){return em},UiDialogActions:function(){return cm},UiDialogContent:function(){return rm},UiDialogTitle:function(){return im},UiDivider:function(){return Gt},UiDrawer:function(){return Zn},UiDrawerAppContent:function(){return mi},UiDrawerContent:function(){return di},UiDrawerHeader:function(){return ni},UiDrawerSubtitle:function(){return li},UiDrawerTitle:function(){return ri},UiFab:function(){return he},UiFile:function(){return Ld},UiForm:function(){return Yr},UiFormField:function(){return ta},UiGrid:function(){return kt},UiGridCell:function(){return Pt},UiIcon:function(){return T},UiIconButton:function(){return _e},UiImageItem:function(){return vp},UiImageList:function(){return dp},UiImageText:function(){return Sp},UiItem:function(){return Wd},UiItemDivider:function(){return fr},UiItemFirstContent:function(){return ep},UiItemLastContent:function(){return np},UiItemText1:function(){return Xd},UiItemText2:function(){return Qd},UiItemTextContent:function(){return Yd},UiList:function(){return $d},UiListDivider:function(){return op},UiListGroup:function(){return ap},UiListGroupSubheader:function(){return lp},UiMenu:function(){return vr},UiMenuAnchor:function(){return ko},UiMenuitem:function(){return ur},UiMenuitemDivider:function(){return Tr},UiMenuitemIcon:function(){return Zo},UiMenuitemText:function(){return tr},UiNav:function(){return Dd},UiNavItem:function(){return Md},UiPagination:function(){return Kr},UiPanel:function(){return _o},UiPanels:function(){return So},UiProgress:function(){return IE},UiRadio:function(){return cc},UiRangepicker:function(){return il},UiSegmentedButton:function(){return Xe},UiSegmentedButtons:function(){return tt},UiSelect:function(){return Ll},UiSelectHelper:function(){return kl},UiSelectIcon:function(){return Vl},UiSlider:function(){return Td},UiSnackbar:function(){return Hm},UiSpinner:function(){return JE},UiSwitch:function(){return yu},UiTab:function(){return Eo},UiTabBar:function(){return to},UiTabIndicator:function(){return oo},UiTabScroller:function(){return Ji},UiTable:function(){return vf},UiTabs:function(){return vo},UiTextfield:function(){return hs},UiTextfieldHelper:function(){return gs},UiTextfieldIcon:function(){return Ts},UiTooltip:function(){return jg},UiTooltipAnchor:function(){return tg},UiTopAppBar:function(){return It},ban:function(){return IC},default:function(){return NC},detectIE:function(){return bC},helpers:function(){return TC},install:function(){return LC},types:function(){return yC},useAlert:function(){return dv},useBus:function(){return ay},useConfirm:function(){return vv},useEvent:function(){return ry},useGrid:function(){return yy},useStore:function(){return hy},useTheme:function(){return By},useToast:function(){return Rv},useTypography:function(){return $y},useValidator:function(){return Mv},vAccessibility:function(){return aC},vBadge:function(){return uC},vButton:function(){return $v},vDebounce:function(){return EC},vRipple:function(){return Wv},vShadow:function(){return iC},vShape:function(){return Qv},vTooltip:function(){return fC},version:function(){return e}});var e="10.31.1",t=o(744),n=o.n(t);const i=/(?:^\[object\s(.*?)\]$)/;var a=e=>Object.prototype.toString.call(e).replace(i,"$1").toLowerCase();const s=e=>{let{componentProps:t,propName:i,props:o}=e,r=o[i];if("object"===a(r)){const e=t[i].default;t[i].default=()=>n()(e,r)}else Array.isArray(r)?t[i].default=()=>r:t[i].default=r},l=e=>{let{componentMixins:t,propName:n,props:i}=e;if(t.length){let e=t.length;for(;e--;)if(t[e].props&&void 0!==t[e].props[n]){s({componentProps:t[e].props,propName:n,props:i});break}}};var c=(e,t)=>{for(const n of Object.keys(t))e.props?void 0===e.props[n]?l({componentMixins:e.mixins,propName:n,props:t}):s({componentProps:e.props,propName:n,props:t}):l({componentMixins:e.mixins,propName:n,props:t})};var u=(e,t)=>{for(const n of Object.keys(t))if(/^Ui[A-Z]{1}[A-Za-z]+$/.test(n)){const i=e[n],o=t[n];c(i,o)}};var d=(e,t,n)=>{let{Components:i,Plugins:o,Directives:r}=n;u(i,t);for(const a in i){const t=i[a];e.component(t.name,t)}for(const a in o){const n=o[a];t[a]?e.use(n,t[a]):e.use(n)}for(const a in r){const t=r[a];e.directive(t.name,t)}},p=o(154);const h={cssClasses:{icon:"material-icons"},EVENTS:{CLICK:"click"},getMaterialIconClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return[h.cssClasses.icon,...t]}};function f(e){let{emit:t}=e;return{handleClick:function(e){t(h.EVENTS.CLICK,e)}}}var m=h;var E=(e,t,n)=>e[n]||e.type===t[n]||e.type===n;const g="UiIcon",y={TYPES:{filled:0,outlined:1,round:2,twoTone:3,sharp:4},DEFAULT_SIZE:24},v={name:g,customOptions:{name:g,UI_GLOBAL:m,UI_ICON:y}};var C=Object.assign(v,{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:y.DEFAULT_SIZE},dark:{type:Boolean,default:!1},light:{type:Boolean,default:!1},inactive:{type:Boolean,default:!1}},emits:[m.EVENTS.CLICK],setup(e,t){let{emit:n}=t;const i=e,o=n,{handleClick:r}=f({emit:o}),a=(0,p.computed)((()=>E(i,y.TYPES,"filled"))),s=(0,p.computed)((()=>E(i,y.TYPES,"outlined"))),l=(0,p.computed)((()=>E(i,y.TYPES,"round"))),c=(0,p.computed)((()=>E(i,y.TYPES,"twoTone"))),u=(0,p.computed)((()=>E(i,y.TYPES,"sharp"))),d=(0,p.computed)((()=>i.dark&&i.light)),h=(0,p.computed)((()=>i.dark||i.light)),m=(0,p.computed)((()=>{let e={"material-icons":a.value,"material-icons-outlined":s.value,"material-icons-round":l.value,"material-icons-two-tone":c.value,"material-icons-sharp":u.value,"md-dark":i.dark&&!i.light,"md-light":i.light&&!i.dark,"md-inactive":i.inactive};return+i.size!==y.DEFAULT_SIZE&&i.size>0&&(e[`md-${i.size}`]=!0),e}));return(0,p.onBeforeMount)((()=>{(d.value||!h.value&&i.inactive)&&console.warn(`[${g}]: Invalid dark or light icon`)})),(e,t)=>((0,p.openBlock)(),(0,p.createElementBlock)("i",{class:(0,p.normalizeClass)(m.value),"aria-hidden":"true",onClick:t[0]||(t[0]=function(){return(0,p.unref)(r)&&(0,p.unref)(r)(...arguments)})},[(0,p.renderSlot)(e.$slots,"default")],2))}});var T=C,b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},b(e,t)};function S(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)};function A(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(t){r(t)}}function s(e){try{l(i.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function _(e,t){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=t.call(e,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])}}}Object.create;function O(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function L(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >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 N(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var x=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),R=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,N([],L(n))),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new x({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"===typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function k(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(o){t=!1}return t}(e)&&{passive:!0}}function w(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(D(n,t))return n;n=n.parentElement}return null}function D(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var B,V={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"},P={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"},M={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var F=["touchstart","pointerdown","mousedown","keydown"],H=["touchend","pointerup","mouseup","contextmenu"],U=[],$=function(e){function t(n){var i=e.call(this,I(I({},t.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(e){i.activateImpl(e)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return S(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(t,"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}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=t.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(o),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},t.prototype.activate=function(e){this.activateImpl(e)},t.prototype.deactivate=function(){this.deactivateImpl()},t.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers=function(e){var t,n;if(e){try{for(var i=O(F),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},t.prototype.registerDeactivationHandlers=function(e){var t,n;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=O(H),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.deregisterRootHandlers=function(){var e,t;try{for(var n=O(F),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},t.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=O(H),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.removeCssVars=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)}))},t.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==e&&i.type!==e.type))n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&U.length>0&&U.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(U.push(e.target),this.registerDeactivationHandlers(e)),n.wasElementMadeActive=this.checkElementMadeActive(e),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){U=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive(e),n.wasElementMadeActive&&t.animateActivation()),n.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},t.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=t.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,l=t.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(){e.activationTimerCallback()}),l)},t.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,o,r=t.x,a=t.y,s=r+n.left,l=a+n.top;if("touchstart"===e.type){var c=e;i=c.changedTouches[0].pageX-s,o=c.changedTouches[0].pageY-l}else{var u=e;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:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},t.prototype.runDeactivationUXLogicIfReady=function(){var e=this,n=t.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(){e.adapter.removeClass(n)}),M.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var n=I({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(n),e.resetActivationState()})))}},t.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady()},t.prototype.layoutInternal=function(){var e=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(e.frame.width,2)+Math.pow(e.frame.height,2))+t.numbers.PADDING;var i=Math.floor(n*t.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()},t.prototype.updateLayoutCssVars=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,o=e.VAR_TOP,r=e.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"))},t}(x),j=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return S(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var i=new t(e);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n,i=e.CSS;if("boolean"===typeof B&&!t)return B;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,t||(B=n),n}(window)},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,k())},deregisterInteractionHandler:function(t,n){return e.root.removeEventListener(t,n,k())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return D(e.root,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,k())},registerInteractionHandler:function(t,n){return e.root.addEventListener(t,n,k())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,n){return e.root.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(e){this.isUnbounded=Boolean(e),this.setUnbounded()},enumerable:!1,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new $(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.isUnbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},t}(R);function G(e){return new j(e)}function K(e,t){(0,p.onMounted)((()=>{const n=e.value;G(n),(0,p.watch)((()=>t.type),(()=>G(n)))}))}const W={icon:{type:String,default:""}};function z(e){return{materialIcon:(0,p.computed)((()=>e.icon||!1))}}const Y={action:"mdc-card__actions",button:"mdc-card__action-buttons",icon:"mdc-card__action-icons"};let q={cardButton:!1,cardIcon:!1};function X(e){const t=(0,p.computed)((()=>({"mdc-card__action":q.cardButton||q.cardIcon,"mdc-card__action--button":q.cardButton,"mdc-card__action--icon":q.cardIcon})));return(0,p.onMounted)((()=>{var t;const n=null===(t=e.value)||void 0===t?void 0:t.parentNode;n&&"htmldivelement"===a(n)&&(q.cardButton=n.classList.contains(Y.button)||n.classList.contains(Y.action),q.cardIcon=n.classList.contains(Y.icon))})),{cardActionClasses:t}}const J=["type"],Q=(0,p.createElementVNode)("span",{class:"mdc-button__ripple"},null,-1),Z=(0,p.createElementVNode)("span",{class:"mdc-button__focus-ring"},null,-1),ee=["textContent"],te={TYPES:{text:0,outlined:1,raised:2,unelevated:3},cssClasses:{icon:"mdc-button__icon",label:"mdc-button__label",touch:"mdc-button--touch"}},ne={name:"UiButton",customOptions:{UI_GLOBAL:m,UI_BUTTON:te}};var ie=Object.assign(ne,{props:{type:{type:[String,Number],default:0},outlined:{type:Boolean,default:!1},raised:{type:Boolean,default:!1},unelevated:{type:Boolean,default:!1},...W,nativeType:{type:String,default:"button"}},emits:[m.EVENTS.CLICK],setup(e,t){let{emit:n}=t;const i=e,o=n,r=(0,p.ref)(null),{handleClick:a}=f({emit:o});K(r,i);const{materialIcon:s}=z(i),{cardActionClasses:l}=X(r),c=(0,p.computed)((()=>E(i,te.TYPES,"outlined"))),u=(0,p.computed)((()=>E(i,te.TYPES,"raised"))),d=(0,p.computed)((()=>E(i,te.TYPES,"unelevated"))),h=(0,p.computed)((()=>r.value&&r.value.classList.contains(te.cssClasses.touch))),g=(0,p.computed)((()=>[{"mdc-button":!0,"mdc-button--outlined":c.value,"mdc-button--raised":u.value,"mdc-button--unelevated":d.value,"mdc-button--touch":h.value},l.value]));return(t,n)=>((0,p.openBlock)(),(0,p.createElementBlock)("button",{ref_key:"button",ref:r,type:e.nativeType,class:(0,p.normalizeClass)(g.value),onClick:n[0]||(n[0]=function(){return(0,p.unref)(a)&&(0,p.unref)(a)(...arguments)})},[Q,Z,(0,p.renderSlot)(t.$slots,"before",{iconClass:te.cssClasses.icon},(()=>[(0,p.unref)(s)?((0,p.openBlock)(),(0,p.createElementBlock)("i",{key:0,class:(0,p.normalizeClass)((0,p.unref)(m).getMaterialIconClass(te.cssClasses.icon)),"aria-hidden":"true",textContent:(0,p.toDisplayString)((0,p.unref)(s))},null,10,ee)):(0,p.createCommentVNode)("",!0)])),(0,p.createElementVNode)("span",{class:(0,p.normalizeClass)(te.cssClasses.label)},[(0,p.renderSlot)(t.$slots,"default")],2),(0,p.renderSlot)(t.$slots,"after",{iconClass:te.cssClasses.icon})],10,J))}});var oe=ie,re={TYPES:{regular:0,extended:1},cssClasses:{icon:"mdc-fab__icon",touch:"mdc-fab--touch"}};const ae=(0,p.createElementVNode)("div",{class:"mdc-fab__ripple"},null,-1),se=(0,p.createElementVNode)("div",{class:"mdc-fab__focus-ring"},null,-1),le=["textContent"],ce={class:"mdc-fab__label"},ue=["textContent"],de={name:"UiFab",customOptions:{UI_GLOBAL:m,UI_FAB:re}};var pe=Object.assign(de,{props:{type:{type:[String,Number],default:0},extended:{type:Boolean,default:!1},...W,mini:{type:Boolean,default:!1},exited:{type:Boolean,default:!1}},emits:[m.EVENTS.CLICK],setup(e,t){let{emit:n}=t;const i=e,o=n,r=(0,p.ref)(null),{handleClick:a}=f({emit:o});K(r,i);const{materialIcon:s}=z(i),l=(0,p.computed)((()=>E(i,re.TYPES,"extended"))),c=(0,p.computed)((()=>r.value&&r.value.classList.contains(re.cssClasses.touch))),u=(0,p.computed)((()=>({"mdc-fab":!0,"mdc-fab--extended":l.value,"mdc-fab--mini":i.mini,"mdc-fab--exited":i.exited,"mdc-fab--touch":c.value})));return(e,t)=>((0,p.openBlock)(),(0,p.createElementBlock)("button",{ref_key:"fab",ref:r,type:"button",class:(0,p.normalizeClass)(u.value),onClick:t[0]||(t[0]=function(){return(0,p.unref)(a)&&(0,p.unref)(a)(...arguments)})},[ae,se,l.value?((0,p.openBlock)(),(0,p.createElementBlock)(p.Fragment,{key:0},[(0,p.renderSlot)(e.$slots,"before",{iconClass:(0,p.unref)(re).cssClasses.icon},(()=>[(0,p.unref)(s)?((0,p.openBlock)(),(0,p.createElementBlock)("i",{key:0,class:(0,p.normalizeClass)((0,p.unref)(m).getMaterialIconClass((0,p.unref)(re).cssClasses.icon)),textContent:(0,p.toDisplayString)((0,p.unref)(s))},null,10,le)):(0,p.createCommentVNode)("",!0)])),(0,p.createElementVNode)("span",ce,[(0,p.renderSlot)(e.$slots,"default")]),(0,p.renderSlot)(e.$slots,"after",{iconClass:(0,p.unref)(re).cssClasses.icon})],64)):(0,p.renderSlot)(e.$slots,"default",{key:1,iconClass:(0,p.unref)(re).cssClasses.icon},(()=>[(0,p.unref)(s)?((0,p.openBlock)(),(0,p.createElementBlock)("i",{key:0,class:(0,p.normalizeClass)((0,p.unref)(m).getMaterialIconClass((0,p.unref)(re).cssClasses.icon)),textContent:(0,p.toDisplayString)((0,p.unref)(s))},null,10,ue)):(0,p.createCommentVNode)("",!0)]))],2))}});var he=pe,fe={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},me={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"},Ee=function(e){function t(n){var i=e.call(this,I(I({},t.defaultAdapter),n))||this;return i.hasToggledAriaLabel=!1,i}return S(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return fe},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return me},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=this.adapter.getAttr(me.DATA_ARIA_LABEL_ON),t=this.adapter.getAttr(me.DATA_ARIA_LABEL_OFF);if(e&&t){if(null!==this.adapter.getAttr(me.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(me.ARIA_PRESSED,String(this.isOn()))},t.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},t.prototype.isOn=function(){return this.adapter.hasClass(fe.ICON_BUTTON_ON)},t.prototype.toggle=function(e){if(void 0===e&&(e=!this.isOn()),e?this.adapter.addClass(fe.ICON_BUTTON_ON):this.adapter.removeClass(fe.ICON_BUTTON_ON),this.hasToggledAriaLabel){var t=e?this.adapter.getAttr(me.DATA_ARIA_LABEL_ON):this.adapter.getAttr(me.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(me.ARIA_LABEL,t||"")}else this.adapter.setAttr(me.ARIA_PRESSED,""+e)},t}(x),ge=Ee.strings,ye=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleComponent=t.createRipple(),t}return S(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Ee({addClass:function(t){return e.root.classList.add(t)},hasClass:function(t){return e.root.classList.contains(t)},notifyChange:function(t){e.emit(ge.CHANGE_EVENT,t)},removeClass:function(t){return e.root.classList.remove(t)},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){return e.root.setAttribute(t,n)}})},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!1,configurable:!0}),t.prototype.createRipple=function(){var e=new j(this.root);return e.unbounded=!0,e},t}(R);const ve=(0,p.createElementVNode)("div",{class:"mdc-icon-button__ripple"},null,-1),Ce=(0,p.createElementVNode)("span",{class:"mdc-icon-button__focus-ring"},null,-1),Te=["textContent"],be=["textContent"],Se={cssClasses:{off:"mdc-icon-button__icon",on:"mdc-icon-button__icon mdc-icon-button__icon--on"},EVENTS:{CHANGE:"update:modelValue"}},Ie={name:"UiIconButton",customOptions:{UI_GLOBAL:m,UI_ICON_BUTTON:Se}};var Ae=Object.assign(Ie,{props:{modelValue:{type:Boolean,default:!1},...W,toggle:{type:Object,default:()=>({})}},emits:[m.EVENTS.CLICK,Se.EVENTS.CHANGE],setup(e,t){let{emit:n}=t;const i=e,o=n,r=(0,p.ref)(null),{handleClick:a}=f({emit:o}),{cardActionClasses:s}=X(r),l=(0,p.computed)((()=>i.toggle.on&&i.toggle.off)),c=(0,p.computed)((()=>[{"mdc-icon-button":!0,"material-icons":!l.value},s.value]));return(0,p.onMounted)((()=>{const e=new ye(r.value);e.listen(me.CHANGE_EVENT,(e=>{let{detail:t}=e;o(Se.EVENTS.CHANGE,t.isOn)})),e.on=i.modelValue,(0,p.watch)((()=>i.modelValue),(t=>e.on=t))})),(t,n)=>((0,p.openBlock)(),(0,p.createElementBlock)("button",{ref_key:"iconButton",ref:r,type:"button",class:(0,p.normalizeClass)(c.value),onClick:n[0]||(n[0]=function(){return(0,p.unref)(a)&&(0,p.unref)(a)(...arguments)})},[ve,Ce,l.value?((0,p.openBlock)(),(0,p.createElementBlock)(p.Fragment,{key:0},[(0,p.createElementVNode)("i",{class:(0,p.normalizeClass)((0,p.unref)(m).getMaterialIconClass(Se.cssClasses.off)),textContent:(0,p.toDisplayString)(e.toggle.off)},null,10,Te),(0,p.createElementVNode)("i",{class:(0,p.normalizeClass)((0,p.unref)(m).getMaterialIconClass(Se.cssClasses.on)),textContent:(0,p.toDisplayString)(e.toggle.on)},null,10,be)],64)):(0,p.renderSlot)(t.$slots,"default",{key:1,onClass:Se.cssClasses.on,offClass:Se.cssClasses.off},(()=>[(0,p.createTextVNode)((0,p.toDisplayString)(t.icon),1)]))],2))}});var _e=Ae,Oe=".mdc-segmented-button__segment",Le="selected",Ne="change",xe="mdc-segmented-button--single-select",Re=function(e){function t(n){return e.call(this,I(I({},t.defaultAdapter),n))||this}return S(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},getSegments:function(){return[]},selectSegment:function(){},unselectSegment:function(){},notifySelectedChange:function(){}}},enumerable:!1,configurable:!0}),t.prototype.selectSegment=function(e){this.adapter.selectSegment(e)},t.prototype.unselectSegment=function(e){this.adapter.unselectSegment(e)},t.prototype.getSelectedSegments=function(){return this.adapter.getSegments().filter((function(e){return e.selected}))},t.prototype.isSegmentSelected=function(e){return this.adapter.getSegments().some((function(t){return(t.index===e||t.segmentId===e)&&t.selected}))},t.prototype.isSingleSelect=function(){return this.adapter.hasClass(xe)},t.prototype.handleSelected=function(e){this.isSingleSelect()&&this.unselectPrevSelected(e.index),this.adapter.notifySelectedChange(e)},t.prototype.unselectPrevSelected=function(e){var t,n;try{for(var i=O(this.getSelectedSegments()),o=i.next();!o.done;o=i.next()){var r=o.value;r.index!==e&&this.unselectSegment(r.index)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t}(x),ke="true",we="false",De="aria-checked",Be="aria-pressed",Ve="data-segment-id",Pe="click",Me="selected",Fe="mdc-segmented-button__segment--selected",He={bottom:0,height:0,left:0,right:0,top:0,width:0},Ue=function(e){function t(n){return e.call(this,I(I({},t.defaultAdapter),n))||this}return S(t,e),Object.defineProperty(t,"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 He}}},enumerable:!1,configurable:!0}),t.prototype.isSelected=function(){return this.adapter.hasClass(Fe)},t.prototype.setSelected=function(){this.adapter.addClass(Fe),this.setAriaAttr(ke)},t.prototype.setUnselected=function(){this.adapter.removeClass(Fe),this.setAriaAttr(we)},t.prototype.getSegmentId=function(){var e;return null!==(e=this.adapter.getAttr(Ve))&&void 0!==e?e:void 0},t.prototype.handleClick=function(){this.adapter.isSingleSelect()?this.setSelected():this.toggleSelection(),this.adapter.notifySelectedChange(this.isSelected())},t.prototype.getDimensions=function(){return this.adapter.getRootBoundingClientRect()},t.prototype.toggleSelection=function(){this.isSelected()?this.setUnselected():this.setSelected()},t.prototype.setAriaAttr=function(e){this.adapter.isSingleSelect()?this.adapter.setAttr(De,e):this.adapter.setAttr(Be,e)},t}(x),$e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e){var t=this;void 0===e&&(e=function(e,t){return new j(e,t)});var n=I(I({},j.createAdapter(this)),{computeBoundingRect:function(){return t.foundation.getDimensions()}});this.rippleComponent=e(this.root,new $(n))},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen(Pe,this.handleClick)},t.prototype.destroy=function(){this.ripple.destroy(),this.unlisten(Pe,this.handleClick),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new Ue({isSingleSelect:function(){return e.isSingleSelect},getAttr:function(t){return e.root.getAttribute(t)},setAttr:function(t,n){e.root.setAttribute(t,n)},addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},hasClass:function(t){return e.root.classList.contains(t)},notifySelectedChange:function(t){e.emit(Me,{index:e.index,selected:t,segmentId:e.getSegmentId()},!0)},getRootBoundingClientRect:function(){return e.root.getBoundingClientRect()}})},t.prototype.setIndex=function(e){this.index=e},t.prototype.setIsSingleSelect=function(e){this.isSingl