1
0

theming-personal-theming.js 137 KB

123
  1. /*! For license information please see theming-personal-theming.js.license?v=c7f55b5a61527a0bd2fb */
  2. (()=>{var e,r,n,o={69250:(e,r,n)=>{"use strict";var o=n(92457),a=n(85471);async function i(){const t=[...document.head.querySelectorAll("link.theme")].map((t=>new Promise((e=>{const r=new URL(t.href);r.searchParams.set("v",Date.now());const n=t.cloneNode();n.href=r.toString(),n.onload=()=>{t.remove(),e()},document.head.append(n)}))));await Promise.allSettled(t)}var l=n(63814),s=n(38613),c=n(26287),u=n(32073),d=n(88837),p=n(85168),h=(n(93525),n(17334)),f=n.n(h),g=n(23503),m=n(64866),v=n.n(m),b=n(85338);const y={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var A=n(14486);const C=(0,A.A)(y,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-edit-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M21 5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H11V19.1L12.1 18H5L8.5 13.5L11 16.5L14.5 12L16.1 14.1L21 9.1V5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,_={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},w=(0,A.A)(_,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon palette-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var k=n(96763);const x=(0,s.C)("theming","shippedBackgrounds"),S=(0,s.C)("theming","userBackgroundImage"),{backgroundImage:D,backgroundColor:T,backgroundMime:E,defaultShippedBackground:O}=(0,s.C)("theming","themingDefaults"),I=t=>(0,l.fg)("theming","","img/background/")+t,j={name:"BackgroundSettings",components:{Check:b.A,ColorPalette:w,ImageEdit:C,NcColorPicker:g.N},data:()=>({loading:!1,Theming:(0,s.C)("theming","data",{}),backgroundImage:S}),computed:{shippedBackgrounds(){return Object.keys(x).filter((t=>t!==O||!this.isGlobalBackgroundDefault)).map((t=>({name:t,url:I(t),preview:I("preview/"+t),details:x[t]})))},isGlobalBackgroundDefault:()=>""===E,isGlobalBackgroundDeleted:()=>"backgroundColor"===E,cssDefaultBackgroundImage:()=>"url('".concat(D,"')")},methods:{invertTextColor(t){return this.calculateLuma(t)>.6},calculateLuma(t){const[e,r,n]=this.hexToRGB(t);return(.2126*e+.7152*r+.0722*n)/255},hexToRGB(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null},async update(t){this.backgroundImage=t.backgroundImage,this.Theming.backgroundColor=t.backgroundColor,this.$emit("update:background"),this.loading=!1},async setDefault(){this.loading="default";const t=await c.A.post((0,l.Jv)("/apps/theming/background/default"));this.update(t.data)},async setShipped(t){this.loading=t;const e=await c.A.post((0,l.Jv)("/apps/theming/background/shipped"),{value:t});this.update(e.data)},async setFile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.loading="custom";const r=await c.A.post((0,l.Jv)("/apps/theming/background/custom"),{value:t,color:e});this.update(r.data)},async removeBackground(){this.loading="remove";const t=await c.A.delete((0,l.Jv)("/apps/theming/background/custom"));this.update(t.data)},async pickColor(t){this.loading="color";const{data:e}=await c.A.post((0,l.Jv)("/apps/theming/background/color"),{color:t||"#0082c9"});this.update(e)},debouncePickColor:f()((function(){this.pickColor(...arguments)}),200),pickFile(){(0,p.a1)(t("theming","Select a background from your files")).allowDirectories(!1).setMimeTypeFilter(["image/png","image/gif","image/jpeg","image/svg+xml","image/svg"]).setMultiSelect(!1).addButton({id:"select",label:t("theming","Select background"),callback:t=>{var e;this.applyFile(null===(e=t[0])||void 0===e?void 0:e.path)},type:"primary"}).build().pick()},async applyFile(e){if(!e||"string"!=typeof e||0===e.trim().length||"/"===e)return k.error("No valid background have been selected",{path:e}),void(0,p.Qg)(t("theming","No background has been selected"));this.loading="custom";let r=null,n=null;try{var a;const t=(0,l.dC)("dav/files/"+(0,o.HW)().uid+e);r=await c.A.get(t,{responseType:"blob"});const i=URL.createObjectURL(r.data),s=await this.getColorPaletteFromBlob(i);n=null==s||null===(a=s.DarkVibrant)||void 0===a?void 0:a.hex,this.setFile(e,n),k.debug("Extracted colour",n,"from custom image",e,s)}catch(t){this.setFile(e),k.error("Unable to extract colour from custom image",{error:t,path:e,response:r,color:n})}},getColorPaletteFromBlob:t=>new Promise(((e,r)=>{new(v())(t).getPalette(((t,n)=>{t&&r(t),e(n)}))}))}},M=()=>{(0,a.$9)(((t,e)=>({"18e555b2":t.cssDefaultBackgroundImage})))},P=j.setup;j.setup=P?(t,e)=>(M(),P(t,e)):M;const N=j;var L=n(85072),B=n.n(L),R=n(97825),F=n.n(R),H=n(77659),q=n.n(H),U=n(55056),z=n.n(U),V=n(10540),W=n.n(V),Y=n(41113),$=n.n(Y),G=n(81761),X={};X.styleTagTransform=$(),X.setAttributes=z(),X.insert=q().bind(null,"head"),X.domAPI=F(),X.insertStyleElement=W(),B()(G.A,X),G.A&&G.A.locals&&G.A.locals;const K=(0,A.A)(N,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[e("button",{class:{"icon-loading":"custom"===t.loading,"background background__filepicker":!0,"background--active":"custom"===t.backgroundImage},attrs:{"aria-pressed":"custom"===t.backgroundImage,"data-user-theming-background-custom":"",tabindex:"0"},on:{click:t.pickFile}},[t._v("\n\t\t"+t._s(t.t("theming","Custom background"))+"\n\t\t"),"custom"!==t.backgroundImage?e("ImageEdit",{attrs:{size:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),e("NcColorPicker",{on:{"update:value":t.debouncePickColor},model:{value:t.Theming.backgroundColor,callback:function(e){t.$set(t.Theming,"backgroundColor",e)},expression:"Theming.backgroundColor"}},[e("button",{class:{"icon-loading":"color"===t.loading,"background background__color":!0,"background--active":"color"===t.backgroundImage},style:{backgroundColor:t.Theming.backgroundColor,"--border-color":t.Theming.backgroundColor},attrs:{"aria-pressed":"color"===t.backgroundImage,"data-color":t.Theming.backgroundColor,"data-color-bright":t.invertTextColor(t.Theming.backgroundColor),"data-user-theming-background-color":"",tabindex:"0"},on:{click:function(e){"color"!==t.backgroundImage&&t.debouncePickColor(t.Theming.backgroundColor)}}},[t._v("\n\t\t\t"+t._s(t.t("theming","Plain background"))+"\n\t\t\t"),"color"!==t.backgroundImage?e("ColorPalette",{attrs:{size:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1)]),t._v(" "),e("button",{class:{"icon-loading":"default"===t.loading,"background background__default":!0,"background--active":"default"===t.backgroundImage},style:{"--border-color":t.Theming.defaultBackgroundColor},attrs:{"aria-pressed":"default"===t.backgroundImage,"data-color-bright":t.invertTextColor(t.Theming.defaultBackgroundColor),"data-user-theming-background-default":"",tabindex:"0"},on:{click:t.setDefault}},[t._v("\n\t\t"+t._s(t.t("theming","Default background"))+"\n\t\t"),e("Check",{attrs:{size:44}})],1),t._v(" "),t._l(t.shippedBackgrounds,(function(r){return e("button",{key:r.name,class:{"background background__shipped":!0,"icon-loading":t.loading===r.name,"background--active":t.backgroundImage===r.name},style:{backgroundImage:"url("+r.preview+")","--border-color":r.details.primary_color},attrs:{title:r.details.attribution,"aria-label":r.details.description,"aria-pressed":t.backgroundImage===r.name,"data-color-bright":t.invertTextColor(r.details.background_color),"data-user-theming-background-shipped":r.name,tabindex:"0"},on:{click:function(e){return t.setShipped(r.name)}}},[e("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"069b6cb8",null).exports;var Q=n(96763);const J={name:"ItemPreview",components:{NcCheckboxRadioSwitch:u.A},props:{enforced:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},theme:{type:Object,required:!0},type:{type:String,default:""},unique:{type:Boolean,default:!1}},computed:{switchType(){return this.unique?"switch":"radio"},name(){return this.unique?null:this.type},img(){return(0,l.fg)("theming","img",this.theme.id+".jpg")},checked:{get(){return this.selected},set(t){Q.debug("Changed theme",this.theme.id,t),this.unique?this.$emit("change",{enabled:!0===t,id:this.theme.id}):this.$emit("change",{enabled:!0,id:this.theme.id})}}},methods:{onToggle(){"radio"!==this.switchType?this.checked=!this.checked:this.checked=!0}}};var Z=n(86619),tt={};tt.styleTagTransform=$(),tt.setAttributes=z(),tt.insert=q().bind(null,"head"),tt.domAPI=F(),tt.insertStyleElement=W(),B()(Z.A,tt),Z.A&&Z.A.locals&&Z.A.locals;const et=(0,A.A)(J,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theming__preview",class:"theming__preview--"+t.theme.id},[e("div",{staticClass:"theming__preview-image",style:{backgroundImage:"url("+t.img+")"},on:{click:t.onToggle}}),t._v(" "),e("div",{staticClass:"theming__preview-description"},[e("h3",[t._v(t._s(t.theme.title))]),t._v(" "),e("p",{staticClass:"theming__preview-explanation"},[t._v(t._s(t.theme.description))]),t._v(" "),t.enforced?e("span",{staticClass:"theming__preview-warning",attrs:{role:"note"}},[t._v("\n\t\t\t"+t._s(t.t("theming","Theme selection is enforced"))+"\n\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.checked,disabled:t.enforced,name:t.name,type:t.switchType},on:{"update:checked":function(e){t.checked=e}}},[t._v("\n\t\t\t"+t._s(t.theme.enableLabel)+"\n\t\t")])],1)])}),[],!1,null,"1a08e35a",null).exports;var rt=n(53334),nt=n(13073),ot=n(59271);function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function it(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lt(){return lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},lt.apply(this,arguments)}function st(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){it(t,e,r[e])}))}return t}function ct(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var ut=ct(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),dt=ct(/Edge/i),pt=ct(/firefox/i),ht=ct(/safari/i)&&!ct(/chrome/i)&&!ct(/android/i),ft=ct(/iP(ad|od|hone)/i),gt=ct(/chrome/i)&&ct(/android/i),mt={capture:!1,passive:!1};function vt(t,e,r){t.addEventListener(e,r,!ut&&mt)}function bt(t,e,r){t.removeEventListener(e,r,!ut&&mt)}function yt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function At(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Ct(t,e,r,n){if(t){r=r||document;do{if(null!=e&&(">"===e[0]?t.parentNode===r&&yt(t,e):yt(t,e))||n&&t===r)return t;if(t===r)break}while(t=At(t))}return null}var _t,wt=/\s+/g;function kt(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(wt," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(wt," ")}}function xt(t,e,r){var n=t&&t.style;if(n){if(void 0===r)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),void 0===e?r:r[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=r+("string"==typeof r?"":"px")}}function St(t,e){var r="";if("string"==typeof t)r=t;else do{var n=xt(t,"transform");n&&"none"!==n&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function Dt(t,e,r){if(t){var n=t.getElementsByTagName(e),o=0,a=n.length;if(r)for(;o<a;o++)r(n[o],o);return n}return[]}function Tt(){return document.scrollingElement||document.documentElement}function Et(t,e,r,n,o){if(t.getBoundingClientRect||t===window){var a,i,l,s,c,u,d;if(t!==window&&t!==Tt()?(i=(a=t.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,u=a.height,d=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||r)&&t!==window&&(o=o||t.parentNode,!ut))do{if(o&&o.getBoundingClientRect&&("none"!==xt(o,"transform")||r&&"static"!==xt(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(xt(o,"border-top-width")),l-=p.left+parseInt(xt(o,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(o=o.parentNode);if(n&&t!==window){var h=St(o||t),f=h&&h.a,g=h&&h.d;h&&(s=(i/=g)+(u/=g),c=(l/=f)+(d/=f))}return{top:i,left:l,bottom:s,right:c,width:d,height:u}}}function Ot(t,e,r){for(var n=Nt(t,!0),o=Et(t)[e];n;){var a=Et(n)[r];if(!("top"===r||"left"===r?o>=a:o<=a))return n;if(n===Tt())break;n=Nt(n,!1)}return!1}function It(t,e,r){for(var n=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Le.ghost&&a[o]!==Le.dragged&&Ct(a[o],r.draggable,t,!1)){if(n===e)return a[o];n++}o++}return null}function jt(t,e){for(var r=t.lastElementChild;r&&(r===Le.ghost||"none"===xt(r,"display")||e&&!yt(r,e));)r=r.previousElementSibling;return r||null}function Mt(t,e){var r=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Le.clone||e&&!yt(t,e)||r++;return r}function Pt(t){var e=0,r=0,n=Tt();if(t)do{var o=St(t),a=o.a,i=o.d;e+=t.scrollLeft*a,r+=t.scrollTop*i}while(t!==n&&(t=t.parentNode));return[e,r]}function Nt(t,e){if(!t||!t.getBoundingClientRect)return Tt();var r=t,n=!1;do{if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var o=xt(r);if(r.clientWidth<r.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||r.clientHeight<r.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!r.getBoundingClientRect||r===document.body)return Tt();if(n||e)return r;n=!0}}}while(r=r.parentNode);return Tt()}function Lt(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Bt(t,e){return function(){if(!_t){var r=arguments;1===r.length?t.call(this,r[0]):t.apply(this,r),_t=setTimeout((function(){_t=void 0}),e)}}}function Rt(t,e,r){t.scrollLeft+=e,t.scrollTop+=r}function Ft(t){var e=window.Polymer,r=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):r?r(t).clone(!0)[0]:t.cloneNode(!0)}var Ht="Sortable"+(new Date).getTime();var qt=[],Ut={initializeByDefault:!0},zt={mount:function(t){for(var e in Ut)Ut.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ut[e]);qt.push(t)},pluginEvent:function(t,e,r){var n=this;this.eventCanceled=!1,r.cancel=function(){n.eventCanceled=!0};var o=t+"Global";qt.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](st({sortable:e},r)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](st({sortable:e},r)))}))},initializePlugins:function(t,e,r,n){for(var o in qt.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var a=new n(t,e,t.options);a.sortable=t,a.options=t.options,t[o]=a,lt(r,a.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);void 0!==a&&(t.options[o]=a)}},getEventProperties:function(t,e){var r={};return qt.forEach((function(n){"function"==typeof n.eventProperties&&lt(r,n.eventProperties.call(e[n.pluginName],t))})),r},modifyOption:function(t,e,r){var n;return qt.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],r))})),n}};var Vt=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.evt,o=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(r,["evt"]);zt.pluginEvent.bind(Le)(t,e,st({dragEl:Yt,parentEl:$t,ghostEl:Gt,rootEl:Xt,nextEl:Kt,lastDownEl:Qt,cloneEl:Jt,cloneHidden:Zt,dragStarted:pe,putSortable:ae,activeSortable:Le.active,originalEvent:n,oldIndex:te,oldDraggableIndex:re,newIndex:ee,newDraggableIndex:ne,hideGhostForTarget:je,unhideGhostForTarget:Me,cloneNowHidden:function(){Zt=!0},cloneNowShown:function(){Zt=!1},dispatchSortableEvent:function(t){Wt({sortable:e,name:t,originalEvent:n})}},o))};function Wt(t){!function(t){var e=t.sortable,r=t.rootEl,n=t.name,o=t.targetEl,a=t.cloneEl,i=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,f=t.extraEventProperties;if(e=e||r&&r[Ht]){var g,m=e.options,v="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||ut||dt?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=i||r,g.from=l||r,g.item=o||r,g.clone=a,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var b=st({},f,zt.getEventProperties(n,e));for(var y in b)g[y]=b[y];r&&r.dispatchEvent(g),m[v]&&m[v].call(e,g)}}(st({putSortable:ae,cloneEl:Jt,targetEl:Yt,rootEl:Xt,oldIndex:te,oldDraggableIndex:re,newIndex:ee,newDraggableIndex:ne},t))}var Yt,$t,Gt,Xt,Kt,Qt,Jt,Zt,te,ee,re,ne,oe,ae,ie,le,se,ce,ue,de,pe,he,fe,ge,me,ve=!1,be=!1,ye=[],Ae=!1,Ce=!1,_e=[],we=!1,ke=[],xe="undefined"!=typeof document,Se=ft,De=dt||ut?"cssFloat":"float",Te=xe&&!gt&&!ft&&"draggable"in document.createElement("div"),Ee=function(){if(xe){if(ut)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Oe=function(t,e){var r=xt(t),n=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=It(t,0,e),a=It(t,1,e),i=o&&xt(o),l=a&&xt(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Et(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Et(a).width;if("flex"===r.display)return"column"===r.flexDirection||"column-reverse"===r.flexDirection?"vertical":"horizontal";if("grid"===r.display)return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=n&&"none"===r[De]||a&&"none"===r[De]&&s+c>n)?"vertical":"horizontal"},Ie=function(t){function e(t,r){return function(n,o,a,i){var l=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(r||l))return!0;if(null==t||!1===t)return!1;if(r&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,a,i),r)(n,o,a,i);var s=(r?n:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var r={},n=t.group;n&&"object"==at(n)||(n={name:n}),r.name=n.name,r.checkPull=e(n.pull,!0),r.checkPut=e(n.put),r.revertClone=n.revertClone,t.group=r},je=function(){!Ee&&Gt&&xt(Gt,"display","none")},Me=function(){!Ee&&Gt&&xt(Gt,"display","")};xe&&document.addEventListener("click",(function(t){if(be)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),be=!1,!1}),!0);var Pe=function(t){if(Yt){var e=function(t,e){var r;return ye.some((function(n){if(!jt(n)){var o=Et(n),a=n[Ht].options.emptyInsertThreshold,i=t>=o.left-a&&t<=o.right+a,l=e>=o.top-a&&e<=o.bottom+a;return a&&i&&l?r=n:void 0}})),r}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.target=r.rootEl=e,r.preventDefault=void 0,r.stopPropagation=void 0,e[Ht]._onDragOver(r)}}},Ne=function(t){Yt&&Yt.parentNode[Ht]._isOutsideThisEl(t.target)};function Le(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=lt({},e),t[Ht]=this;var r,n,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Oe(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Le.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in zt.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var i in Ie(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Te,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?vt(t,"pointerdown",this._onTapStart):(vt(t,"mousedown",this._onTapStart),vt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(vt(t,"dragover",this),vt(t,"dragenter",this)),ye.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),lt(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==xt(t,"display")&&t!==Le.ghost){n.push({target:t,rect:Et(t)});var e=st({},n[n.length-1].rect);if(t.thisAnimationDuration){var r=St(t,!0);r&&(e.top-=r.f,e.left-=r.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var r in t)if(t.hasOwnProperty(r))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[r][n])return Number(r);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(r),void("function"==typeof t&&t());var o=!1,a=0;n.forEach((function(t){var r=0,n=t.target,i=n.fromRect,l=Et(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=St(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&Lt(s,l)&&!Lt(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(r=function(t,e,r,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))*n.animation}(u,s,c,e.options)),Lt(l,i)||(n.prevFromRect=i,n.prevToRect=l,r||(r=e.options.animation),e.animate(n,u,l,r)),r&&(o=!0,a=Math.max(a,r),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),r),n.thisAnimationDuration=r)})),clearTimeout(r),o?r=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),n=[]},animate:function(t,e,r,n){if(n){xt(t,"transition",""),xt(t,"transform","");var o=St(this.el),a=o&&o.a,i=o&&o.d,l=(e.left-r.left)/(a||1),s=(e.top-r.top)/(i||1);t.animatingX=!!l,t.animatingY=!!s,xt(t,"transform","translate3d("+l+"px,"+s+"px,0)"),function(t){t.offsetWidth}(t),xt(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),xt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){xt(t,"transition",""),xt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Be(t,e,r,n,o,a,i,l){var s,c,u=t[Ht],d=u.options.onMove;return!window.CustomEvent||ut||dt?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=r,s.draggedRect=n,s.related=o||e,s.relatedRect=a||Et(e),s.willInsertAfter=l,s.originalEvent=i,t.dispatchEvent(s),d&&(c=d.call(u,s,i)),c}function Re(t){t.draggable=!1}function Fe(){we=!1}function He(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,r=e.length,n=0;r--;)n+=e.charCodeAt(r);return n.toString(36)}function qe(t){return setTimeout(t,0)}function Ue(t){return clearTimeout(t)}Le.prototype={constructor:Le,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(he=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Yt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,r=this.el,n=this.options,o=n.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(i||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=n.filter;if(function(t){ke.length=0;for(var e=t.getElementsByTagName("input"),r=e.length;r--;){var n=e[r];n.checked&&ke.push(n)}}(r),!Yt&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||n.disabled||s.isContentEditable||(l=Ct(l,n.draggable,r,!1))&&l.animated||Qt===l)){if(te=Mt(l),re=Mt(l,n.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Wt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:r,fromEl:r}),Vt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=Ct(s,n.trim(),r,!1))return Wt({sortable:e,rootEl:n,name:"filter",targetEl:l,fromEl:r,toEl:r}),Vt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!Ct(s,n.handle,r,!1)||this._prepareDragStart(t,i,l)}}},_prepareDragStart:function(t,e,r){var n,o=this,a=o.el,i=o.options,l=a.ownerDocument;if(r&&!Yt&&r.parentNode===a){var s=Et(r);if(Xt=a,$t=(Yt=r).parentNode,Kt=Yt.nextSibling,Qt=r,oe=i.group,Le.dragged=Yt,ie={target:Yt,clientX:(e||t).clientX,clientY:(e||t).clientY},ue=ie.clientX-s.left,de=ie.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Yt.style["will-change"]="all",n=function(){Vt("delayEnded",o,{evt:t}),Le.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!pt&&o.nativeDraggable&&(Yt.draggable=!0),o._triggerDragStart(t,e),Wt({sortable:o,name:"choose",originalEvent:t}),kt(Yt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){Dt(Yt,t.trim(),Re)})),vt(l,"dragover",Pe),vt(l,"mousemove",Pe),vt(l,"touchmove",Pe),vt(l,"mouseup",o._onDrop),vt(l,"touchend",o._onDrop),vt(l,"touchcancel",o._onDrop),pt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Yt.draggable=!0),Vt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(dt||ut))n();else{if(Le.eventCanceled)return void this._onDrop();vt(l,"mouseup",o._disableDelayedDrag),vt(l,"touchend",o._disableDelayedDrag),vt(l,"touchcancel",o._disableDelayedDrag),vt(l,"mousemove",o._delayedDragTouchMoveHandler),vt(l,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&vt(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Yt&&Re(Yt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;bt(t,"mouseup",this._disableDelayedDrag),bt(t,"touchend",this._disableDelayedDrag),bt(t,"touchcancel",this._disableDelayedDrag),bt(t,"mousemove",this._delayedDragTouchMoveHandler),bt(t,"touchmove",this._delayedDragTouchMoveHandler),bt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?vt(document,"pointermove",this._onTouchMove):vt(document,e?"touchmove":"mousemove",this._onTouchMove):(vt(Yt,"dragend",this),vt(Xt,"dragstart",this._onDragStart));try{document.selection?qe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(ve=!1,Xt&&Yt){Vt("dragStarted",this,{evt:e}),this.nativeDraggable&&vt(document,"dragover",Ne);var r=this.options;!t&&kt(Yt,r.dragClass,!1),kt(Yt,r.ghostClass,!0),Le.active=this,t&&this._appendGhost(),Wt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,je();for(var t=document.elementFromPoint(le.clientX,le.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==e;)e=t;if(Yt.parentNode[Ht]._isOutsideThisEl(t),e)do{if(e[Ht]&&e[Ht]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Me()}},_onTouchMove:function(t){if(ie){var e=this.options,r=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=Gt&&St(Gt,!0),i=Gt&&a&&a.a,l=Gt&&a&&a.d,s=Se&&me&&Pt(me),c=(o.clientX-ie.clientX+n.x)/(i||1)+(s?s[0]-_e[0]:0)/(i||1),u=(o.clientY-ie.clientY+n.y)/(l||1)+(s?s[1]-_e[1]:0)/(l||1);if(!Le.active&&!ve){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(Gt){a?(a.e+=c-(se||0),a.f+=u-(ce||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");xt(Gt,"webkitTransform",d),xt(Gt,"mozTransform",d),xt(Gt,"msTransform",d),xt(Gt,"transform",d),se=c,ce=u,le=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Gt){var t=this.options.fallbackOnBody?document.body:Xt,e=Et(Yt,!0,Se,!0,t),r=this.options;if(Se){for(me=t;"static"===xt(me,"position")&&"none"===xt(me,"transform")&&me!==document;)me=me.parentNode;me!==document.body&&me!==document.documentElement?(me===document&&(me=Tt()),e.top+=me.scrollTop,e.left+=me.scrollLeft):me=Tt(),_e=Pt(me)}kt(Gt=Yt.cloneNode(!0),r.ghostClass,!1),kt(Gt,r.fallbackClass,!0),kt(Gt,r.dragClass,!0),xt(Gt,"transition",""),xt(Gt,"transform",""),xt(Gt,"box-sizing","border-box"),xt(Gt,"margin",0),xt(Gt,"top",e.top),xt(Gt,"left",e.left),xt(Gt,"width",e.width),xt(Gt,"height",e.height),xt(Gt,"opacity","0.8"),xt(Gt,"position",Se?"absolute":"fixed"),xt(Gt,"zIndex","100000"),xt(Gt,"pointerEvents","none"),Le.ghost=Gt,t.appendChild(Gt),xt(Gt,"transform-origin",ue/parseInt(Gt.style.width)*100+"% "+de/parseInt(Gt.style.height)*100+"%")}},_onDragStart:function(t,e){var r=this,n=t.dataTransfer,o=r.options;Vt("dragStart",this,{evt:t}),Le.eventCanceled?this._onDrop():(Vt("setupClone",this),Le.eventCanceled||((Jt=Ft(Yt)).draggable=!1,Jt.style["will-change"]="",this._hideClone(),kt(Jt,this.options.chosenClass,!1),Le.clone=Jt),r.cloneId=qe((function(){Vt("clone",r),Le.eventCanceled||(r.options.removeCloneOnHide||Xt.insertBefore(Jt,Yt),r._hideClone(),Wt({sortable:r,name:"clone"}))})),!e&&kt(Yt,o.dragClass,!0),e?(be=!0,r._loopId=setInterval(r._emulateDragOver,50)):(bt(document,"mouseup",r._onDrop),bt(document,"touchend",r._onDrop),bt(document,"touchcancel",r._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(r,n,Yt)),vt(document,"drop",r),xt(Yt,"transform","translateZ(0)")),ve=!0,r._dragStartId=qe(r._dragStarted.bind(r,e,t)),vt(document,"selectstart",r),pe=!0,ht&&xt(document.body,"user-select","none"))},_onDragOver:function(t){var e,r,n,o,a=this.el,i=t.target,l=this.options,s=l.group,c=Le.active,u=oe===s,d=l.sort,p=ae||c,h=this,f=!1;if(!we){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),i=Ct(i,l.draggable,a,!0),T("dragOver"),Le.eventCanceled)return f;if(Yt.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return O(!1);if(be=!1,c&&!l.disabled&&(u?d||(n=!Xt.contains(Yt)):ae===this||(this.lastPutMode=oe.checkPull(this,c,Yt,t))&&s.checkPut(this,c,Yt,t))){if(o="vertical"===this._getDirection(t,i),e=Et(Yt),T("dragOverValid"),Le.eventCanceled)return f;if(n)return $t=Xt,E(),this._hideClone(),T("revert"),Le.eventCanceled||(Kt?Xt.insertBefore(Yt,Kt):Xt.appendChild(Yt)),O(!0);var g=jt(a,l.draggable);if(!g||function(t,e,r){var n=Et(jt(r.el,r.options.draggable));return e?t.clientX>n.right+10||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+10}(t,o,this)&&!g.animated){if(g===Yt)return O(!1);if(g&&a===t.target&&(i=g),i&&(r=Et(i)),!1!==Be(Xt,a,Yt,e,i,r,t,!!i))return E(),a.appendChild(Yt),$t=a,I(),O(!0)}else if(i.parentNode===a){r=Et(i);var m,v,b,y=Yt.parentNode!==a,A=!function(t,e,r){var n=r?t.left:t.top,o=r?t.right:t.bottom,a=r?t.width:t.height,i=r?e.left:e.top,l=r?e.right:e.bottom,s=r?e.width:e.height;return n===i||o===l||n+a/2===i+s/2}(Yt.animated&&Yt.toRect||e,i.animated&&i.toRect||r,o),C=o?"top":"left",_=Ot(i,"top","top")||Ot(Yt,"top","top"),w=_?_.scrollTop:void 0;if(he!==i&&(v=r[C],Ae=!1,Ce=!A&&l.invertSwap||y),m=function(t,e,r,n,o,a,i,l){var s=n?t.clientY:t.clientX,c=n?r.height:r.width,u=n?r.top:r.left,d=n?r.bottom:r.right,p=!1;if(!i)if(l&&ge<c*o){if(!Ae&&(1===fe?s>u+c*a/2:s<d-c*a/2)&&(Ae=!0),Ae)p=!0;else if(1===fe?s<u+ge:s>d-ge)return-fe}else if(s>u+c*(1-o)/2&&s<d-c*(1-o)/2)return function(t){return Mt(Yt)<Mt(t)?1:-1}(e);return(p=p||i)&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(t,i,r,o,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ce,he===i),0!==m){var k=Mt(Yt);do{k-=m,b=$t.children[k]}while(b&&("none"===xt(b,"display")||b===Gt))}if(0===m||b===i)return O(!1);he=i,fe=m;var x=i.nextElementSibling,S=!1,D=Be(Xt,a,Yt,e,i,r,t,S=1===m);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),we=!0,setTimeout(Fe,30),E(),S&&!x?a.appendChild(Yt):i.parentNode.insertBefore(Yt,S?x:i),_&&Rt(_,0,w-_.scrollTop),$t=Yt.parentNode,void 0===v||Ce||(ge=Math.abs(v-Et(i)[C])),I(),O(!0)}if(a.contains(Yt))return O(!1)}return!1}function T(l,s){Vt(l,h,st({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:r,canSort:d,fromSortable:p,target:i,completed:O,onMove:function(r,n){return Be(Xt,a,Yt,e,r,Et(r),t,n)},changed:I},s))}function E(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function O(e){return T("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==p&&(kt(Yt,ae?ae.options.ghostClass:c.options.ghostClass,!1),kt(Yt,l.ghostClass,!0)),ae!==h&&h!==Le.active?ae=h:h===Le.active&&ae&&(ae=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===Yt&&!Yt.animated||i===a&&!i.animated)&&(he=null),l.dragoverBubble||t.rootEl||i===document||(Yt.parentNode[Ht]._isOutsideThisEl(t.target),!e&&Pe(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function I(){ee=Mt(Yt),ne=Mt(Yt,l.draggable),Wt({sortable:h,name:"change",toEl:a,newIndex:ee,newDraggableIndex:ne,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){bt(document,"mousemove",this._onTouchMove),bt(document,"touchmove",this._onTouchMove),bt(document,"pointermove",this._onTouchMove),bt(document,"dragover",Pe),bt(document,"mousemove",Pe),bt(document,"touchmove",Pe)},_offUpEvents:function(){var t=this.el.ownerDocument;bt(t,"mouseup",this._onDrop),bt(t,"touchend",this._onDrop),bt(t,"pointerup",this._onDrop),bt(t,"touchcancel",this._onDrop),bt(document,"selectstart",this)},_onDrop:function(t){var e=this.el,r=this.options;ee=Mt(Yt),ne=Mt(Yt,r.draggable),Vt("drop",this,{evt:t}),$t=Yt&&Yt.parentNode,ee=Mt(Yt),ne=Mt(Yt,r.draggable),Le.eventCanceled||(ve=!1,Ce=!1,Ae=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ue(this.cloneId),Ue(this._dragStartId),this.nativeDraggable&&(bt(document,"drop",this),bt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ht&&xt(document.body,"user-select",""),xt(Yt,"transform",""),t&&(pe&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),(Xt===$t||ae&&"clone"!==ae.lastPutMode)&&Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),Yt&&(this.nativeDraggable&&bt(Yt,"dragend",this),Re(Yt),Yt.style["will-change"]="",pe&&!ve&&kt(Yt,ae?ae.options.ghostClass:this.options.ghostClass,!1),kt(Yt,this.options.chosenClass,!1),Wt({sortable:this,name:"unchoose",toEl:$t,newIndex:null,newDraggableIndex:null,originalEvent:t}),Xt!==$t?(ee>=0&&(Wt({rootEl:$t,name:"add",toEl:$t,fromEl:Xt,originalEvent:t}),Wt({sortable:this,name:"remove",toEl:$t,originalEvent:t}),Wt({rootEl:$t,name:"sort",toEl:$t,fromEl:Xt,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:$t,originalEvent:t})),ae&&ae.save()):ee!==te&&ee>=0&&(Wt({sortable:this,name:"update",toEl:$t,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:$t,originalEvent:t})),Le.active&&(null!=ee&&-1!==ee||(ee=te,ne=re),Wt({sortable:this,name:"end",toEl:$t,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Vt("nulling",this),Xt=Yt=$t=Gt=Kt=Jt=Qt=Zt=ie=le=pe=ee=ne=te=re=he=fe=ae=oe=Le.dragged=Le.ghost=Le.clone=Le.active=null,ke.forEach((function(t){t.checked=!0})),ke.length=se=ce=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Yt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],r=this.el.children,n=0,o=r.length,a=this.options;n<o;n++)Ct(t=r[n],a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||He(t));return e},sort:function(t){var e={},r=this.el;this.toArray().forEach((function(t,n){var o=r.children[n];Ct(o,this.options.draggable,r,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(r.removeChild(e[t]),r.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Ct(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var r=this.options;if(void 0===e)return r[t];var n=zt.modifyOption(this,t,e);r[t]=void 0!==n?n:e,"group"===t&&Ie(r)},destroy:function(){Vt("destroy",this);var t=this.el;t[Ht]=null,bt(t,"mousedown",this._onTapStart),bt(t,"touchstart",this._onTapStart),bt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(bt(t,"dragover",this),bt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ye.splice(ye.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Zt){if(Vt("hideClone",this),Le.eventCanceled)return;xt(Jt,"display","none"),this.options.removeCloneOnHide&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),Zt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Zt){if(Vt("showClone",this),Le.eventCanceled)return;Xt.contains(Yt)&&!this.options.group.revertClone?Xt.insertBefore(Jt,Yt):Kt?Xt.insertBefore(Jt,Kt):Xt.appendChild(Jt),this.options.group.revertClone&&this.animate(Yt,Jt),xt(Jt,"display",""),Zt=!1}}else this._hideClone()}},xe&&vt(document,"touchmove",(function(t){(Le.active||ve)&&t.cancelable&&t.preventDefault()})),Le.utils={on:vt,off:bt,css:xt,find:Dt,is:function(t,e){return!!Ct(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},throttle:Bt,closest:Ct,toggleClass:kt,clone:Ft,index:Mt,nextTick:qe,cancelNextTick:Ue,detectDirection:Oe,getChild:It},Le.get=function(t){return t[Ht]},Le.mount=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Le.utils=st({},Le.utils,t.utils)),zt.mount(t)}))},Le.create=function(t,e){return new Le(t,e)},Le.version="1.10.2";var ze,Ve,We,Ye,$e,Ge,Xe=[],Ke=!1;function Qe(){Xe.forEach((function(t){clearInterval(t.pid)})),Xe=[]}function Je(){clearInterval(Ge)}var Ze=Bt((function(t,e,r,n){if(e.scroll){var o,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=Tt(),u=!1;Ve!==r&&(Ve=r,Qe(),ze=e.scroll,o=e.scrollFn,!0===ze&&(ze=Nt(r,!0)));var d=0,p=ze;do{var h=p,f=Et(h),g=f.top,m=f.bottom,v=f.left,b=f.right,y=f.width,A=f.height,C=void 0,_=void 0,w=h.scrollWidth,k=h.scrollHeight,x=xt(h),S=h.scrollLeft,D=h.scrollTop;h===c?(C=y<w&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),_=A<k&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(C=y<w&&("auto"===x.overflowX||"scroll"===x.overflowX),_=A<k&&("auto"===x.overflowY||"scroll"===x.overflowY));var T=C&&(Math.abs(b-a)<=l&&S+y<w)-(Math.abs(v-a)<=l&&!!S),E=_&&(Math.abs(m-i)<=l&&D+A<k)-(Math.abs(g-i)<=l&&!!D);if(!Xe[d])for(var O=0;O<=d;O++)Xe[O]||(Xe[O]={});Xe[d].vx==T&&Xe[d].vy==E&&Xe[d].el===h||(Xe[d].el=h,Xe[d].vx=T,Xe[d].vy=E,clearInterval(Xe[d].pid),0==T&&0==E||(u=!0,Xe[d].pid=setInterval(function(){n&&0===this.layer&&Le.active._onTouchMove($e);var e=Xe[this.layer].vy?Xe[this.layer].vy*s:0,r=Xe[this.layer].vx?Xe[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Le.dragged.parentNode[Ht],r,e,t,$e,Xe[this.layer].el)||Rt(Xe[this.layer].el,r,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&p!==c&&(p=Nt(p,!1)));Ke=u}}),30),tr=function(t){var e=t.originalEvent,r=t.putSortable,n=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,i=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=r||o;i();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(a("spill"),this.onSpill({dragEl:n,putSortable:r}))}};function er(){}function rr(){}er.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var n=It(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),r&&r.animateAll()},drop:tr},lt(er,{pluginName:"revertOnSpill"}),rr.prototype={onSpill:function(t){var e=t.dragEl,r=t.putSortable||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:tr},lt(rr,{pluginName:"removeOnSpill"}),Le.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?vt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?vt(document,"pointermove",this._handleFallbackAutoScroll):e.touches?vt(document,"touchmove",this._handleFallbackAutoScroll):vt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?bt(document,"dragover",this._handleAutoScroll):(bt(document,"pointermove",this._handleFallbackAutoScroll),bt(document,"touchmove",this._handleFallbackAutoScroll),bt(document,"mousemove",this._handleFallbackAutoScroll)),Je(),Qe(),clearTimeout(_t),_t=void 0},nulling:function(){$e=Ve=ze=Ke=Ge=We=Ye=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var r=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(n,o);if($e=t,e||dt||ut||ht){Ze(t,this.options,a,e);var i=Nt(a,!0);!Ke||Ge&&n===We&&o===Ye||(Ge&&Je(),Ge=setInterval((function(){var a=Nt(document.elementFromPoint(n,o),!0);a!==i&&(i=a,Qe()),Ze(t,r.options,a,e)}),10),We=n,Ye=o)}else{if(!this.options.bubbleScroll||Nt(a,!0)===Tt())return void Qe();Ze(t,this.options,Nt(a,!1),!1)}}},lt(t,{pluginName:"scroll",initializeByDefault:!0})}),Le.mount(rr,er);const nr=Le;a.Ay.util.warn;var or=n(54914),ar=n(10620),ir=n(41645),lr=n(9518);const sr=(0,a.pM)({name:"AppOrderSelectorElement",components:{IconArrowDown:ar.A,IconArrowUp:ir.A,NcButton:lr.A},props:{ariaDescribedby:{type:String,default:null},ariaDetails:{type:String,default:null},app:{type:Object,required:!0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},emits:{"move:up":()=>!0,"move:down":()=>!0,"update:focus":()=>!0},setup(t,e){let{emit:r}=e;const n=(0,a.KR)(),o=(0,a.KR)();let i=0;return{buttonUp:n,buttonDown:o,moveUp:()=>{r("move:up"),i=1},moveDown:()=>{r("move:down"),i=-1},keepFocus:()=>{0!==i&&(1!==i&&!t.isLast||t.isFirst?(0,a.dY)((()=>o.value.$el.focus())):(0,a.dY)((()=>n.value.$el.focus()))),i=0},t:rt.Tl}}});var cr=n(12182),ur={};ur.styleTagTransform=$(),ur.setAttributes=z(),ur.insert=q().bind(null,"head"),ur.domAPI=F(),ur.insertStyleElement=W(),B()(cr.A,ur),cr.A&&cr.A.locals&&cr.A.locals;const dr=(0,A.A)(sr,(function(){var t,e=this,r=e._self._c;return e._self._setupProxy,r("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":e.app.default},attrs:{"data-cy-app-order-element":e.app.id},on:{focusin:function(t){return e.$emit("update:focus")}}},[r("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[r("image",{staticClass:"order-selector-element__icon",attrs:{preserveAspectRatio:"xMinYMin meet",x:"0",y:"0",width:"20",height:"20","xlink:href":e.app.icon}})]),e._v(" "),r("div",{staticClass:"order-selector-element__label"},[e._v("\n\t\t"+e._s(null!==(t=e.app.label)&&void 0!==t?t:e.app.id)+"\n\t")]),e._v(" "),r("div",{staticClass:"order-selector-element__actions"},[r("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isFirst&&!e.app.default,expression:"!isFirst && !app.default"}],ref:"buttonUp",attrs:{"aria-label":e.t("settings","Move up"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:e.moveUp},scopedSlots:e._u([{key:"icon",fn:function(){return[r("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isFirst||!!e.app.default,expression:"isFirst || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}}),e._v(" "),r("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isLast&&!e.app.default,expression:"!isLast && !app.default"}],ref:"buttonDown",attrs:{"aria-label":e.t("settings","Move down"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:e.moveDown},scopedSlots:e._u([{key:"icon",fn:function(){return[r("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isLast||!!e.app.default,expression:"isLast || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}})],1)])}),[],!1,null,"081ebc45",null).exports,pr=(0,a.pM)({name:"AppOrderSelector",components:{AppOrderSelectorElement:dr,Fragment:or.F},props:{ariaDetails:{type:String,default:null},value:{type:Array,required:!0}},emits:{"update:value":t=>Array.isArray(t)},setup(t,e){let{emit:r}=e;const n=(0,a.KR)(null),o=(0,a.EW)({get:()=>t.value,set:e=>{const n=[...e].sort(((t,r)=>(r.default?1:0)-(t.default?1:0)||e.indexOf(t)-e.indexOf(r)));n.some(((e,r)=>{let{id:n}=e;return n!==t.value[r].id}))?r("update:value",n):i.value+=1}}),i=(0,a.KR)(0);!function(t,e,r={}){let n;const{document:o=nt.PWG,...i}=r,l={onUpdate:t=>{!function(t,e,r){const n=(0,a.i9)(t),o=n?[...(0,ot.BA)(t)]:(0,ot.BA)(t);if(r>=0&&r<o.length){const i=o.splice(e,1)[0];(0,a.dY)((()=>{o.splice(r,0,i),n&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},s=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):(0,nt.F4c)(t);e&&void 0===n&&(n=new nr(e,{...l,...i}))},c=()=>{null==n||n.destroy(),n=void 0};(0,ot.rd)(s),(0,ot.Uo)(c)}(n,o,{filter:".order-selector-element--disabled"});const l=(0,a.KR)([]);(0,a.$u)((()=>{l.value.forEach((t=>t.keepFocus()))}));const s=(0,a.KR)("");return{appList:o,listElement:n,moveDown:e=>{const n=e>0?t.value.slice(0,e):[];n.push(t.value[e+1]);const o=e<t.value.length-2?t.value.slice(e+2):[];r("update:value",[...n,t.value[e],...o])},moveUp:e=>{var n;const o=e>1?t.value.slice(0,e-1):[];if(null!==(n=t.value[e-1])&&void 0!==n&&n.default)return;const a=[t.value[e-1]];e<t.value.length-1&&a.push(...t.value.slice(e+1)),r("update:value",[...o,t.value[e],...a])},statusInfoId:"sorting-status-info-".concat((Math.random()+1).toString(36).substring(7)),statusInfo:s,updateStatusInfo:e=>{s.value=(0,rt.Tl)("theming","Current selected app: {app}, position {position} of {total}",{app:t.value[e].label,position:e+1,total:t.value.length})},renderCount:i,selectorElements:l}}}),hr=pr;var fr=n(12467),gr={};gr.styleTagTransform=$(),gr.setAttributes=z(),gr.insert=q().bind(null,"head"),gr.domAPI=F(),gr.insertStyleElement=W(),B()(fr.A,gr),fr.A&&fr.A.locals&&fr.A.locals;var mr=(0,A.A)(hr,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("Fragment",[e("div",{staticClass:"hidden-visually",attrs:{id:t.statusInfoId,"aria-live":"polite",role:"status"}},[t._v("\n\t\t"+t._s(t.statusInfo)+"\n\t")]),t._v(" "),e("ol",{ref:"listElement",staticClass:"order-selector",attrs:{"data-cy-app-order":""}},t._l(t.appList,(function(r,n){return e("AppOrderSelectorElement",t._g({key:"".concat(r.id).concat(t.renderCount),ref:"selectorElements",refInFor:!0,attrs:{app:r,"aria-details":t.ariaDetails,"aria-describedby":t.statusInfoId,"is-first":0===n||!!t.appList[n-1].default,"is-last":n===t.value.length-1}},r.default?{}:{"move:up":()=>t.moveUp(n),"move:down":()=>t.moveDown(n),"update:focus":()=>t.updateStatusInfo(n)}))})),1)])}),[],!1,null,"76d01da8",null);const vr=mr.exports,br={name:"UndoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},yr=(0,A.A)(br,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Ar=n(48934),Cr=n(96763);const _r=(0,a.pM)({name:"UserAppMenuSection",components:{AppOrderSelector:vr,IconUndo:yr,NcButton:lr.A,NcNoteCard:Ar.A,NcSettingsSection:d.A},setup(){const{userAppOrder:t,enforcedDefaultApp:e}=(0,s.C)("theming","navigationBar"),r=Object.values((0,s.C)("core","apps")).filter((t=>{let{type:e}=t;return"link"===e})).map((t=>({...t,label:t.name,default:t.default&&t.app===e}))),n=(0,a.KR)(!Array.isArray(t)||Object.values(t).length>0),o=(0,a.EW)((()=>r.some(((t,e)=>{let{id:r}=t;return r!==h.value[e].id})))),i="theming-apporder-changed-infocard",u="theming-apporder-changed-infocard",d=(0,a.EW)((()=>(o.value?"".concat(i," "):"")+(e?u:""))),h=(0,a.KR)([...r]),f=async(t,e)=>{const r=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:t});return await c.A.post(r,{configValue:JSON.stringify(e)})};return{appOrder:h,updateAppOrder:t=>{const e={};t.forEach(((t,r)=>{let{app:n,id:o}=t;e[o]={order:r,app:n}})),f("apporder",e).then((()=>{h.value=t,n.value=!0})).catch((t=>{Cr.warn("Could not set the app order",t),(0,p.Qg)((0,rt.Tl)("theming","Could not set the app order"))}))},resetAppOrder:async()=>{try{await f("apporder",[]),n.value=!1;const{data:t}=await c.A.get((0,l.KT)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});h.value=t.ocs.data.map((t=>({...t,label:t.name,default:t.default&&t.app===e})))}catch(t){Cr.warn(t),(0,p.Qg)((0,rt.Tl)("theming","Could not reset the app order"))}},enforcedDefaultApp:e,hasAppOrderChanged:o,hasCustomAppOrder:n,ariaDetailsAppOrder:d,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:u,t:rt.Tl}}}),wr=_r;var kr=n(21997),xr={};xr.styleTagTransform=$(),xr.setAttributes=z(),xr.insert=q().bind(null,"head"),xr.domAPI=F(),xr.insertStyleElement=W(),B()(kr.A,xr),kr.A&&kr.A.locals&&kr.A.locals;const Sr=(0,A.A)(wr,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcSettingsSection",{attrs:{name:t.t("theming","Navigation bar settings")}},[e("p",[t._v("\n\t\t"+t._s(t.t("theming","You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo."))+"\n\t")]),t._v(" "),t.enforcedDefaultApp?e("NcNoteCard",{attrs:{id:t.elementIdEnforcedDefaultApp,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The default app can not be changed because it was configured by the administrator."))+"\n\t")]):t._e(),t._v(" "),t.hasAppOrderChanged?e("NcNoteCard",{attrs:{id:t.elementIdAppOrderChanged,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The app order was changed, to see it in action you have to reload the page."))+"\n\t")]):t._e(),t._v(" "),e("AppOrderSelector",{staticClass:"user-app-menu-order",attrs:{"aria-details":t.ariaDetailsAppOrder,value:t.appOrder},on:{"update:value":t.updateAppOrder}}),t._v(" "),e("NcButton",{attrs:{"data-test-id":"btn-apporder-reset",disabled:!t.hasCustomAppOrder,type:"tertiary"},on:{click:t.resetAppOrder},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset default app order"))+"\n\t")])],1)}),[],!1,null,"3d6952db",null).exports;var Dr={grad:.9,turn:360,rad:360/(2*Math.PI)},Tr=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},Er=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Or=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),t>r?r:t>e?t:e},Ir=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},jr=function(t){return{r:Or(t.r,0,255),g:Or(t.g,0,255),b:Or(t.b,0,255),a:Or(t.a)}},Mr=function(t){return{r:Er(t.r),g:Er(t.g),b:Er(t.b),a:Er(t.a,3)}},Pr=/^#([0-9a-f]{3,8})$/i,Nr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Lr=function(t){var e=t.r,r=t.g,n=t.b,o=t.a,a=Math.max(e,r,n),i=a-Math.min(e,r,n),l=i?a===e?(r-n)/i:a===r?2+(n-e)/i:4+(e-r)/i:0;return{h:60*(l<0?l+6:l),s:a?i/a*100:0,v:a/255*100,a:o}},Br=function(t){var e=t.h,r=t.s,n=t.v,o=t.a;e=e/360*6,r/=100,n/=100;var a=Math.floor(e),i=n*(1-r),l=n*(1-(e-a)*r),s=n*(1-(1-e+a)*r),c=a%6;return{r:255*[n,l,i,i,s,n][c],g:255*[s,n,n,l,i,i][c],b:255*[i,i,s,n,n,l][c],a:o}},Rr=function(t){return{h:Ir(t.h),s:Or(t.s,0,100),l:Or(t.l,0,100),a:Or(t.a)}},Fr=function(t){return{h:Er(t.h),s:Er(t.s),l:Er(t.l),a:Er(t.a,3)}},Hr=function(t){return Br((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},qr=function(t){return{h:(e=Lr(t)).h,s:(o=(200-(r=e.s))*(n=e.v)/100)>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,r,n,o},Ur=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yr={string:[[function(t){var e=Pr.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?Er(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?Er(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Vr.exec(t)||Wr.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:jr({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Ur.exec(t)||zr.exec(t);if(!e)return null;var r,n,o=Rr({h:(r=e[1],n=e[2],void 0===n&&(n="deg"),Number(r)*(Dr[n]||1)),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)});return Hr(o)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,o=t.a,a=void 0===o?1:o;return Tr(e)&&Tr(r)&&Tr(n)?jr({r:Number(e),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,o=t.a,a=void 0===o?1:o;if(!Tr(e)||!Tr(r)||!Tr(n))return null;var i=Rr({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return Hr(i)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,o=t.a,a=void 0===o?1:o;if(!Tr(e)||!Tr(r)||!Tr(n))return null;var i=function(t){return{h:Ir(t.h),s:Or(t.s,0,100),v:Or(t.v,0,100),a:Or(t.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Br(i)},"hsv"]]},$r=function(t,e){for(var r=0;r<e.length;r++){var n=e[r][0](t);if(n)return[n,e[r][1]]}return[null,void 0]},Gr=function(t,e){var r=qr(t);return{h:r.h,s:Or(r.s+100*e,0,100),l:r.l,a:r.a}},Xr=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Kr=function(t,e){var r=qr(t);return{h:r.h,s:r.s,l:Or(r.l+100*e,0,100),a:r.a}},Qr=function(){function t(t){this.parsed=function(t){return"string"==typeof t?$r(t.trim(),Yr.string):"object"==typeof t&&null!==t?$r(t,Yr.object):[null,void 0]}(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return null!==this.parsed},t.prototype.brightness=function(){return Er(Xr(this.rgba),2)},t.prototype.isDark=function(){return Xr(this.rgba)<.5},t.prototype.isLight=function(){return Xr(this.rgba)>=.5},t.prototype.toHex=function(){return e=(t=Mr(this.rgba)).r,r=t.g,n=t.b,a=(o=t.a)<1?Nr(Er(255*o)):"","#"+Nr(e)+Nr(r)+Nr(n)+a;var t,e,r,n,o,a},t.prototype.toRgb=function(){return Mr(this.rgba)},t.prototype.toRgbString=function(){return e=(t=Mr(this.rgba)).r,r=t.g,n=t.b,(o=t.a)<1?"rgba("+e+", "+r+", "+n+", "+o+")":"rgb("+e+", "+r+", "+n+")";var t,e,r,n,o},t.prototype.toHsl=function(){return Fr(qr(this.rgba))},t.prototype.toHslString=function(){return e=(t=Fr(qr(this.rgba))).h,r=t.s,n=t.l,(o=t.a)<1?"hsla("+e+", "+r+"%, "+n+"%, "+o+")":"hsl("+e+", "+r+"%, "+n+"%)";var t,e,r,n,o},t.prototype.toHsv=function(){return t=Lr(this.rgba),{h:Er(t.h),s:Er(t.s),v:Er(t.v),a:Er(t.a,3)};var t},t.prototype.invert=function(){return Jr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},t.prototype.saturate=function(t){return void 0===t&&(t=.1),Jr(Gr(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),Jr(Gr(this.rgba,-t))},t.prototype.grayscale=function(){return Jr(Gr(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),Jr(Kr(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),Jr(Kr(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){return"number"==typeof t?Jr({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):Er(this.rgba.a,3);var e},t.prototype.hue=function(t){var e=qr(this.rgba);return"number"==typeof t?Jr({h:t,s:e.s,l:e.l,a:e.a}):Er(e.h)},t.prototype.isEqual=function(t){return this.toHex()===Jr(t).toHex()},t}(),Jr=function(t){return t instanceof Qr?t:new Qr(t)},Zr=n(46222);const tn={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},en=(0,A.A)(tn,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var rn=n(96763);const{primaryColor:nn,defaultPrimaryColor:on}=(0,s.C)("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),an=(0,a.pM)({name:"UserPrimaryColor",components:{IconColorPalette:w,IconUndo:en,NcButton:lr.A,NcColorPicker:g.N,NcLoadingIcon:Zr.A},emits:["refresh-styles"],data:()=>({primaryColor:nn,loading:!1}),computed:{isdefaultPrimaryColor(){return Jr(this.primaryColor).isEqual(Jr(on))},debouncedOnUpdate(){return(0,h.debounce)(this.onUpdate,500)}},methods:{t:rt.Tl,reload(){const t=this.$refs.trigger,e=window.getComputedStyle(t).backgroundColor;e.toLowerCase()!==this.primaryColor&&(this.primaryColor=e)},onReset(){this.primaryColor=on,this.onUpdate(null)},async onUpdate(t){this.loading=!0;const e=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"primary_color"});try{t?await c.A.post(e,{configValue:t}):await c.A.delete(e),this.$emit("refresh-styles")}catch(t){rn.error("Could not update primary color",t),(0,p.Qg)((0,rt.Tl)("theming","Could not set primary color"))}this.loading=!1}}}),ln=an;var sn=n(30487),cn={};cn.styleTagTransform=$(),cn.setAttributes=z(),cn.insert=q().bind(null,"head"),cn.domAPI=F(),cn.insertStyleElement=W(),B()(sn.A,cn),sn.A&&sn.A.locals&&sn.A.locals;const un=(0,A.A)(ln,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"primary-color__wrapper"},[e("NcColorPicker",{attrs:{"data-user-theming-primary-color":""},on:{"update:value":t.debouncedOnUpdate},model:{value:t.primaryColor,callback:function(e){t.primaryColor=e},expression:"primaryColor"}},[e("button",{ref:"trigger",staticClass:"color-container primary-color__trigger",style:{"background-color":t.primaryColor},attrs:{"data-user-theming-primary-color-trigger":""}},[t._v("\n\t\t\t"+t._s(t.t("theming","Primary color"))+"\n\t\t\t"),t.loading?e("NcLoadingIcon"):e("IconColorPalette",{attrs:{size:20}})],1)]),t._v(" "),e("NcButton",{attrs:{type:"tertiary",disabled:t.isdefaultPrimaryColor},on:{click:t.onReset},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset primary color"))+"\n\t")])],1)}),[],!1,null,"95242fa6",null).exports;var dn=n(96763);const pn=(0,s.C)("theming","themes",[]),hn=(0,s.C)("theming","enforceTheme",""),fn=(0,s.C)("theming","shortcutsDisabled",!1),gn=(0,s.C)("theming","isUserThemingDisabled"),mn={name:"UserTheming",components:{ItemPreview:et,NcCheckboxRadioSwitch:u.A,NcSettingsSection:d.A,BackgroundSettings:K,UserAppMenuSection:Sr,UserPrimaryColor:un},data:()=>({availableThemes:pn,enforceTheme:hn,shortcutsDisabled:fn,isUserThemingDisabled:gn}),computed:{themes(){return this.availableThemes.filter((t=>1===t.type))},fonts(){return this.availableThemes.filter((t=>2===t.type))},selectedTheme(){return this.themes.find((t=>!0===t.enabled))||this.themes[0]},description(){return t("theming","Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink).replace("{linkend}","</a>")},guidelinesLink:()=>'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">',descriptionDetail(){return t("theming","If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink).replace(/\{linkend\}/g,"</a>")},issuetrackerLink:()=>'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">',designteamLink:()=>'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'},watch:{shortcutsDisabled(t){this.changeShortcutsDisabled(t)}},methods:{async refreshGlobalStyles(){await i(),this.$nextTick((()=>this.$refs.primaryColor.reload()))},changeTheme(t){let{enabled:e,id:r}=t;this.themes.forEach((t=>{t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},changeFont(t){let{enabled:e,id:r}=t;this.fonts.forEach((t=>{t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},async changeShortcutsDisabled(t){t?await(0,c.A)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"}):await(0,c.A)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"})},updateBodyAttributes(){const t=this.themes.filter((t=>!0===t.enabled)).map((t=>t.id)),e=this.fonts.filter((t=>!0===t.enabled)).map((t=>t.id));this.themes.forEach((t=>{document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),this.fonts.forEach((t=>{document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),document.body.setAttribute("data-themes",[...t,...e].join(","))},async selectItem(e,r){try{e?await(0,c.A)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:r}),method:"PUT"}):await(0,c.A)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}",{themeId:r}),method:"DELETE"})}catch(e){dn.error(e,e.response),OC.Notification.showTemporary(t("theming",e.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var vn=n(64603),bn={};bn.styleTagTransform=$(),bn.setAttributes=z(),bn.insert=q().bind(null,"head"),bn.domAPI=F(),bn.insertStyleElement=W(),B()(vn.A,bn),vn.A&&vn.A.locals&&vn.A.locals;const yn=(0,A.A)(mn,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{staticClass:"theming",attrs:{name:t.t("theming","Appearance and accessibility settings"),"limit-width":!1}},[e("p",{domProps:{innerHTML:t._s(t.description)}}),t._v(" "),e("p",{domProps:{innerHTML:t._s(t.descriptionDetail)}}),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.themes,(function(r){return e("ItemPreview",{key:r.id,attrs:{enforced:r.id===t.enforceTheme,selected:t.selectedTheme.id===r.id,theme:r,unique:1===t.themes.length,type:"theme"},on:{change:t.changeTheme}})})),1),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.fonts,(function(r){return e("ItemPreview",{key:r.id,attrs:{selected:r.enabled,theme:r,unique:1===t.fonts.length,type:"font"},on:{change:t.changeFont}})})),1)]),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Primary color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements.")}},[t.isUserThemingDisabled?t._e():e("UserPrimaryColor",{ref:"primaryColor",on:{"refresh-styles":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{staticClass:"background",attrs:{name:t.t("theming","Background and color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","The background can be set to an image from the default set, a custom uploaded image, or a plain color.")}},[t.isUserThemingDisabled?t._e():e("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Keyboard shortcuts"),description:t.t("theming","In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps.")}},[e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.shortcutsDisabled,type:"switch"},on:{"update:checked":function(e){t.shortcutsDisabled=e},change:t.changeShortcutsDisabled}},[t._v("\n\t\t\t"+t._s(t.t("theming","Disable all keyboard shortcuts"))+"\n\t\t")])],1),t._v(" "),e("UserAppMenuSection")],1)}),[],!1,null,"17f2eb7a",null).exports;n.nc=btoa((0,o.do)()),a.Ay.prototype.OC=OC,a.Ay.prototype.t=t;const An=new(a.Ay.extend(yn));An.$mount("#theming"),An.$on("update:background",i)},64603:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".theming p[data-v-17f2eb7a]{max-width:800px}.theming[data-v-17f2eb7a] a{font-weight:bold}.theming[data-v-17f2eb7a] a:hover,.theming[data-v-17f2eb7a] a:focus{text-decoration:underline}.theming__preview-list[data-v-17f2eb7a]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap);grid-template-columns:1fr 1fr}.background__grid[data-v-17f2eb7a]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-17f2eb7a]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserTheming.vue"],names:[],mappings:"AAGC,4BACC,eAAA,CAID,4BACC,gBAAA,CAEA,oEAEC,yBAAA,CAIF,wCACC,WAAA,CAEA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kBAAA,CACA,6BAAA,CAKD,mCACC,eAAA,CAIF,0BACC,wCACC,YAAA,CACA,qBAAA,CAAA",sourcesContent:["\n.theming {\n\t// Limit width of settings sections for readability\n\tp {\n\t\tmax-width: 800px;\n\t}\n\n\t// Proper highlight for links and focus feedback\n\t&::v-deep a {\n\t\tfont-weight: bold;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t&__preview-list {\n\t\t--gap: 30px;\n\n\t\tdisplay: grid;\n\t\tmargin-top: var(--gap);\n\t\tcolumn-gap: var(--gap);\n\t\trow-gap: var(--gap);\n\t\tgrid-template-columns: 1fr 1fr;\n\t}\n}\n\n.background {\n\t&__grid {\n\t\tmargin-top: 30px;\n\t}\n}\n\n@media (max-width: 1440px) {\n\t.theming__preview-list {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n"],sourceRoot:""}]);const l=i},12467:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".order-selector[data-v-76d01da8]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourcesContent:["\n.order-selector {\n\twidth: max-content;\n\tmin-width: 260px; // align with NcSelect\n}\n"],sourceRoot:""}]);const l=i},12182:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".order-selector-element[data-v-081ebc45]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-081ebc45]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-081ebc45]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-081ebc45]{opacity:75%}.order-selector-element__actions[data-v-081ebc45]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-081ebc45]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-081ebc45]{height:44px;width:44px}.order-selector-element__icon[data-v-081ebc45]{filter:var(--background-invert-if-bright)}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelectorElement.vue"],names:[],mappings:"AACA,yCAEC,eAAA,CAEA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,QAAA,CACA,mBAAA,CAEA,+CACC,8CAAA,CACA,wCAAA,CAGD,mDACC,0CAAA,CACA,mCAAA,CAEA,iFACC,WAAA,CAIF,kDACC,QAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CAGD,gDACC,QAAA,CACA,sBAAA,CACA,eAAA,CAGD,sDACC,WAAA,CACA,UAAA,CAGD,+CACC,yCAAA",sourcesContent:["\n.order-selector-element {\n\t// hide default styling\n\tlist-style: none;\n\t// Align children\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\t// Spacing\n\tgap: 12px;\n\tpadding-inline: 12px;\n\n\t&:hover {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\n\t&--disabled {\n\t\tborder-color: var(--color-text-maxcontrast);\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t.order-selector-element__icon {\n\t\t\topacity: 75%;\n\t\t}\n\t}\n\n\t&__actions {\n\t\tflex: 0 0;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 6px;\n\t}\n\n\t&__label {\n\t\tflex: 1 1;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t&__placeholder {\n\t\theight: 44px;\n\t\twidth: 44px;\n\t}\n\n\t&__icon {\n\t\tfilter: var(--background-invert-if-bright);\n\t}\n}\n"],sourceRoot:""}]);const l=i},81761:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".background-selector[data-v-069b6cb8]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background-color[data-v-069b6cb8]{display:flex;justify-content:center;align-items:center;width:176px;height:96px;margin:8px;border-radius:var(--border-radius-large);background-color:var(--color-primary)}.background-selector .background[data-v-069b6cb8]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker[data-v-069b6cb8]{background-color:var(--color-main-text);background-color:var(--color-background-dark)}.background-selector .background__filepicker.background--active[data-v-069b6cb8]{color:var(--color-background-plain-text);background-image:var(--image-background)}.background-selector .background__default[data-v-069b6cb8]{background-color:var(--color-background-plain);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--18e555b2)}.background-selector .background__filepicker[data-v-069b6cb8],.background-selector .background__default[data-v-069b6cb8],.background-selector .background__color[data-v-069b6cb8]{border-color:var(--color-border)}.background-selector .background__default[data-v-069b6cb8],.background-selector .background__shipped[data-v-069b6cb8]{color:#fff}.background-selector .background[data-color-bright][data-v-069b6cb8]{color:#000}.background-selector .background--active[data-v-069b6cb8],.background-selector .background[data-v-069b6cb8]:hover,.background-selector .background[data-v-069b6cb8]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-069b6cb8]{margin:4px}.background-selector .background .check-icon[data-v-069b6cb8]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-069b6cb8]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,wDACC,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,wCAAA,CACA,qCAAA,CAGD,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CACA,YAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAEA,8DACC,uCAAA,CACA,6CAAA,CAEA,iFACC,wCAAA,CACA,wCAAA,CAIF,2DACC,8CAAA,CACA,yGAAA,CAGD,kLACC,gCAAA,CAID,sHAEC,UAAA,CAID,qEACC,UAAA,CAGD,0KAGC,mDAAA,CACA,oDAAA,CAID,uDACC,UAAA,CAGD,8DACC,YAAA,CAIA,yFAEC,wBAAA",sourcesContent:["\n.background-selector {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: center;\n\n\t.background-color {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-color: var(--color-primary);\n\t}\n\n\t.background {\n\t\toverflow: hidden;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\ttext-align: center;\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-position: center center;\n\t\tbackground-size: cover;\n\n\t\t&__filepicker {\n\t\t\tbackground-color: var(--color-main-text);\n\t\t\tbackground-color: var(--color-background-dark);\n\n\t\t\t&.background--active {\n\t\t\t\tcolor: var(--color-background-plain-text);\n\t\t\t\tbackground-image: var(--image-background);\n\t\t\t}\n\t\t}\n\n\t\t&__default {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\tbackground-image: linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)), v-bind(cssDefaultBackgroundImage);\n\t\t}\n\n\t\t&__filepicker, &__default, &__color {\n\t\t\tborder-color: var(--color-border);\n\t\t}\n\n\t\t// Over a background image\n\t\t&__default,\n\t\t&__shipped {\n\t\t\tcolor: white;\n\t\t}\n\n\t\t// Text and svg icon dark on bright background\n\t\t&[data-color-bright] {\n\t\t\tcolor: black;\n\t\t}\n\n\t\t&--active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t}\n\n\t\t// Icon\n\t\tspan {\n\t\t\tmargin: 4px;\n\t\t}\n\n\t\t.check-icon {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&--active:not(.icon-loading) {\n\t\t\t.check-icon {\n\t\t\t\t// Show checkmark\n\t\t\t\tdisplay: block !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const l=i},86619:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".theming__preview[data-v-1a08e35a]{--ratio: 16;position:relative;display:flex;justify-content:flex-start;max-width:800px}.theming__preview[data-v-1a08e35a],.theming__preview *[data-v-1a08e35a]{user-select:none}.theming__preview-image[data-v-1a08e35a]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-right:var(--gap);cursor:pointer;border-radius:var(--border-radius);background-repeat:no-repeat;background-position:top left;background-size:cover}.theming__preview-explanation[data-v-1a08e35a]{margin-bottom:10px}.theming__preview-description[data-v-1a08e35a]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-1a08e35a]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-1a08e35a]{padding:12px 0}.theming__preview--default[data-v-1a08e35a]{grid-column:span 2}.theming__preview-warning[data-v-1a08e35a]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-1a08e35a]{flex-direction:column}.theming__preview-image[data-v-1a08e35a]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CAEA,iBAAA,CACA,YAAA,CACA,0BAAA,CACA,eAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,uBAAA,CACA,cAAA,CACA,kCAAA,CACA,2BAAA,CACA,4BAAA,CACA,qBAAA,CAGD,+CACC,kBAAA,CAGD,+CACC,YAAA,CACA,qBAAA,CAEA,kDACC,gBAAA,CACA,eAAA,CAGD,qDACC,cAAA,CAIF,4CACC,kBAAA,CAGD,2CACC,0BAAA,CAIF,oCACC,mCACC,qBAAA,CAEA,yCACC,QAAA,CAAA",sourcesContent:["\n@use 'sass:math';\n\n.theming__preview {\n\t// We make previews on 16/10 screens\n\t--ratio: 16;\n\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\tmax-width: 800px;\n\n\t&,\n\t* {\n\t\tuser-select: none;\n\t}\n\n\t&-image {\n\t\tflex-basis: calc(16px * var(--ratio));\n\t\tflex-shrink: 0;\n\t\theight: calc(10px * var(--ratio));\n\t\tmargin-right: var(--gap);\n\t\tcursor: pointer;\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tbackground-size: cover;\n\t}\n\n\t&-explanation {\n\t\tmargin-bottom: 10px;\n\t}\n\n\t&-description {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3 {\n\t\t\tfont-weight: bold;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tlabel {\n\t\t\tpadding: 12px 0;\n\t\t}\n\t}\n\n\t&--default {\n\t\tgrid-column: span 2;\n\t}\n\n\t&-warning {\n\t\tcolor: var(--color-warning);\n\t}\n}\n\n@media (max-width: math.div(1024px, 1.5)) {\n\t.theming__preview {\n\t\tflex-direction: column;\n\n\t\t&-image {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const l=i},21997:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".user-app-menu-order[data-v-3d6952db]{margin-block:12px}","",{version:3,sources:["webpack://./apps/theming/src/components/UserAppMenuSection.vue"],names:[],mappings:"AACA,sCACC,iBAAA",sourcesContent:["\n.user-app-menu-order {\n\tmargin-block: 12px;\n}\n"],sourceRoot:""}]);const l=i},30487:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".primary-color__wrapper[data-v-95242fa6]{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px}.primary-color__trigger[data-v-95242fa6]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background-color:var(--color-primary);color:var(--color-primary-text);width:350px;max-width:100vw;height:96px;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large)}.primary-color__trigger[data-v-95242fa6]:active{background-color:var(--color-primary-hover) !important}.primary-color__trigger[data-v-95242fa6]:hover,.primary-color__trigger[data-v-95242fa6]:focus,.primary-color__trigger[data-v-95242fa6]:focus-visible{border-color:var(--color-main-background) !important;outline:2px solid var(--color-main-text) !important}","",{version:3,sources:["webpack://./apps/theming/src/components/UserPrimaryColor.vue"],names:[],mappings:"AAEC,yCACC,YAAA,CACA,kBAAA,CACA,cAAA,CACA,QAAA,CAGD,yCACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,OAAA,CAEA,qCAAA,CACA,+BAAA,CACA,WAAA,CACA,eAAA,CACA,WAAA,CAEA,oBAAA,CACA,YAAA,CAEA,6CAAA,CACA,wCAAA,CAEA,gDACC,sDAAA,CAGD,qJAGC,oDAAA,CACA,mDAAA",sourcesContent:["\n.primary-color {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t}\n\n\t&__trigger {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tgap: 8px;\n\n\t\tbackground-color: var(--color-primary);\n\t\tcolor: var(--color-primary-text);\n\t\twidth: 350px;\n\t\tmax-width: 100vw;\n\t\theight: 96px;\n\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-hover) !important;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:focus-visible {\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const l=i},80909:(t,e,r)=>{var n=r(30641),o=r(38329)(n);t.exports=o},16574:(t,e,r)=>{var n=r(80909);t.exports=function(t,e){var r=[];return n(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}},30641:(t,e,r)=>{var n=r(86649),o=r(95950);t.exports=function(t,e){return t&&n(t,e,o)}},38329:(t,e,r)=>{var n=r(64894);t.exports=function(t,e){return function(r,o){if(null==r)return r;if(!n(r))return t(r,o);for(var a=r.length,i=e?a:-1,l=Object(r);(e?i--:++i<a)&&!1!==o(l[i],i,l););return r}}},84684:(t,e,r)=>{var n=r(69302),o=r(75288),a=r(36800),i=r(37241),l=Object.prototype,s=l.hasOwnProperty,c=n((function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&a(e[0],e[1],c)&&(n=1);++r<n;)for(var u=e[r],d=i(u),p=-1,h=d.length;++p<h;){var f=d[p],g=t[f];(void 0===g||o(g,l[f])&&!s.call(t,f))&&(t[f]=u[f])}return t}));t.exports=c},87612:(t,e,r)=>{var n=r(79770),o=r(16574),a=r(15389),i=r(56449);t.exports=function(t,e){return(i(t)?n:o)(t,a(e,3))}},64866:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=n(r(3772)),a=n(r(5820));o.default.DefaultOpts.ImageClass=a.default,t.exports=o.default},38445:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(3772)),a=r(32629),i=function(){function t(t,e){void 0===e&&(e={}),this._src=t,this._opts=e,this._opts.filters=a(o.default.DefaultOpts.filters)}return t.prototype.maxColorCount=function(t){return this._opts.colorCount=t,this},t.prototype.maxDimension=function(t){return this._opts.maxDimension=t,this},t.prototype.addFilter=function(t){return this._opts.filters.push(t),this},t.prototype.removeFilter=function(t){var e=this._opts.filters.indexOf(t);return e>0&&this._opts.filters.splice(e),this},t.prototype.clearFilters=function(){return this._opts.filters=[],this},t.prototype.quality=function(t){return this._opts.quality=t,this},t.prototype.useImageClass=function(t){return this._opts.ImageClass=t,this},t.prototype.useGenerator=function(t){return this._opts.generator=t,this},t.prototype.useQuantizer=function(t){return this._opts.quantizer=t,this},t.prototype.build=function(){return new o.default(this._src,this._opts)},t.prototype.getPalette=function(t){return this.build().getPalette(t)},t.prototype.getSwatches=function(t){return this.build().getPalette(t)},t}();e.default=i},93525:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var n=r(17388),o=r(87612),a=function(){function t(t,e){this._rgb=t,this._population=e}return t.applyFilter=function(t,e){return"function"==typeof e?o(t,(function(t){var r=t.r,n=t.g,o=t.b;return e(r,n,o,255)})):t},Object.defineProperty(t.prototype,"r",{get:function(){return this._rgb[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._rgb[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._rgb[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsl",{get:function(){if(!this._hsl){var t=this._rgb,e=t[0],r=t[1],o=t[2];this._hsl=n.rgbToHsl(e,r,o)}return this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){if(!this._hex){var t=this._rgb,e=t[0],r=t[1],o=t[2];this._hex=n.rgbToHex(e,r,o)}return this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"population",{get:function(){return this._population},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return{rgb:this.rgb,population:this.population}},t.prototype.getRgb=function(){return this._rgb},t.prototype.getHsl=function(){return this.hsl},t.prototype.getPopulation=function(){return this._population},t.prototype.getHex=function(){return this.hex},t.prototype.getYiq=function(){if(!this._yiq){var t=this._rgb;this._yiq=(299*t[0]+587*t[1]+114*t[2])/1e3}return this._yiq},Object.defineProperty(t.prototype,"titleTextColor",{get:function(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodyTextColor",{get:function(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor},enumerable:!1,configurable:!0}),t.prototype.getTitleTextColor=function(){return this.titleTextColor},t.prototype.getBodyTextColor=function(){return this.bodyTextColor},t}();e.Swatch=a},54824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n){return n>=125&&!(t>250&&e>250&&r>250)}},53565:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var n=r(54824);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return n.default}}),e.combineFilters=function(t){return Array.isArray(t)&&0!==t.length?function(e,r,n,o){if(0===o)return!1;for(var a=0;a<t.length;a++)if(!t[a](e,r,n,o))return!1;return!0}:null}},71593:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(93525),o=r(17388),a=r(84684),i={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function l(t,e,r,n,o,a,i,l,s,c){var u=null,d=0;return e.forEach((function(e){var p=e.getHsl(),h=p[1],f=p[2];if(h>=l&&h<=s&&f>=o&&f<=a&&!function(t,e){return t.Vibrant===e||t.DarkVibrant===e||t.LightVibrant===e||t.Muted===e||t.DarkMuted===e||t.LightMuted===e}(t,e)){var g=function(t,e,r,n,o,a,i){function l(t,e){return 1-Math.abs(t-e)}return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=0,o=0;o<t.length;o+=2){var a=t[o],i=t[o+1];r+=a*i,n+=i}return r/n}(l(t,e),i.weightSaturation,l(r,n),i.weightLuma,o/a,i.weightPopulation)}(h,i,f,n,e.getPopulation(),r,c);(null===u||g>d)&&(u=e,d=g)}})),u}e.default=function(t,e){e=a({},e,i);var r=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),s=function(t,e,r){var n={};return n.Vibrant=l(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.LightVibrant=l(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.DarkVibrant=l(n,t,e,r.targetDarkLuma,0,r.maxDarkLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.Muted=l(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.LightMuted=l(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.DarkMuted=l(n,t,e,r.targetDarkLuma,0,r.maxDarkLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n}(t,r,e);return function(t,e,r){if(null===t.Vibrant&&null===t.DarkVibrant&&null===t.LightVibrant){if(null===t.DarkVibrant&&null!==t.DarkMuted){var a=t.DarkMuted.getHsl(),i=a[0],l=a[1],s=a[2];s=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var c=t.LightMuted.getHsl();i=c[0],l=c[1],s=c[2],s=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var u=t.DarkVibrant.getHsl();i=u[0],l=u[1],s=u[2],s=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();i=d[0],l=d[1],s=d[2],s=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var p=t.Vibrant.getHsl();i=p[0],l=p[1],s=p[2],s=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();i=h[0],l=h[1],s=h[2],s=r.targetLightLuma,t.LightVibrant=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.Muted&&null!==t.Vibrant){var f=t.Vibrant.getHsl();i=f[0],l=f[1],s=f[2],s=r.targetMutesSaturation,t.Muted=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var g=t.DarkVibrant.getHsl();i=g[0],l=g[1],s=g[2],s=r.targetMutesSaturation,t.DarkMuted=new n.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var m=t.LightVibrant.getHsl();i=m[0],l=m[1],s=m[2],s=r.targetMutesSaturation,t.LightMuted=new n.Swatch(o.hslToRgb(i,l,s),0)}}(s,0,e),s}},3528:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(71593);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return n.default}})},59327:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageBase=void 0;var r=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),r=this.getHeight(),n=1;if(t.maxDimension>0){var o=Math.max(e,r);o>t.maxDimension&&(n=t.maxDimension/o)}else n=1/t.quality;n<1&&this.resize(e*n,r*n,n)},t.prototype.applyFilter=function(t){var e=this.getImageData();if("function"==typeof t)for(var r=e.data,n=r.length/4,o=void 0,a=0;a<n;a++)t(r[0+(o=4*a)],r[o+1],r[o+2],r[o+3])||(r[o+3]=0);return Promise.resolve(e)},t}();e.ImageBase=r},5820:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&a(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=r(59327),c=l(r(88835)),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype._initCanvas=function(){var t=this.image,e=this._canvas=document.createElement("canvas"),r=this._context=e.getContext("2d");e.className="vibrant-canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,r.drawImage(t,0,0),document.body.appendChild(e)},e.prototype.load=function(t){var e,r,n,o,a,i,l=this,s=null,u=null;if("string"==typeof t)s=document.createElement("img"),a=t,null===(i=c.parse(a)).protocol&&null===i.host&&null===i.port||(e=window.location.href,r=t,n=c.parse(e),o=c.parse(r),n.protocol===o.protocol&&n.hostname===o.hostname&&n.port===o.port)||(s.crossOrigin="anonymous"),u=s.src=t;else{if(!(t instanceof HTMLImageElement))return Promise.reject(new Error("Cannot load buffer as an image in browser"));s=t,u=t.src}return this.image=s,new Promise((function(t,e){var r=function(){l._initCanvas(),t(l)};s.complete?r():(s.onload=r,s.onerror=function(t){return e(new Error("Fail to load image: "+u))})}))},e.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},e.prototype.update=function(t){this._context.putImageData(t,0,0)},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.resize=function(t,e,r){var n=this,o=n._canvas,a=n._context,i=n.image;this._width=o.width=t,this._height=o.height=e,a.scale(r,r),a.drawImage(i,0,0)},e.prototype.getPixelCount=function(){return this._width*this._height},e.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},e.prototype.remove=function(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},e}(s.ImageBase);e.default=u},5182:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorker=void 0;var n=r(89950);Object.defineProperty(e,"MMCQ",{enumerable:!0,get:function(){return n.default}}),e.WebWorker=null},89950:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(93525),a=n(r(72747)),i=n(r(46839));function l(t,e){for(var r=t.size();t.size()<e;){var n=t.pop();if(!(n&&n.count()>0))break;var o=n.split(),a=o[0],i=o[1];if(t.push(a),i&&i.count()>0&&t.push(i),t.size()===r)break;r=t.size()}}e.default=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");var r=a.default.build(t),n=r.hist,s=(Object.keys(n).length,new i.default((function(t,e){return t.count()-e.count()})));s.push(r),l(s,.75*e.colorCount);var c=new i.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return c.contents=s.contents,l(c,e.colorCount-c.size()),function(t){for(var e=[];t.size();){var r=t.pop(),n=r.avg();n[0],n[1],n[2],e.push(new o.Swatch(n,r.count()))}return e}(c)}},46839:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this._comparator=t,this.contents=[],this._sorted=!1}return t.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},t.prototype.push=function(t){this.contents.push(t),this._sorted=!1},t.prototype.peek=function(t){return this._sort(),t="number"==typeof t?t:this.contents.length-1,this.contents[t]},t.prototype.pop=function(){return this._sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this._sort(),this.contents.map(t)},t}();e.default=r},72747:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(17388),o=function(){function t(t,e,r,n,o,a,i){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:r,g2:n,b1:o,b2:a},this.hist=i}return t.build=function(e,r){var o,a,i,l,s,c,u,d,p,h=1<<3*n.SIGBITS,f=new Uint32Array(h);o=i=s=0,a=l=c=Number.MAX_VALUE;for(var g=e.length/4,m=0;m<g;){var v=4*m;m++,u=e[v+0],d=e[v+1],p=e[v+2],0!==e[v+3]&&(u>>=n.RSHIFT,d>>=n.RSHIFT,p>>=n.RSHIFT,f[n.getColorIndex(u,d,p)]+=1,u>o&&(o=u),u<a&&(a=u),d>i&&(i=d),d<l&&(l=d),p>s&&(s=p),p<c&&(c=p))}return new t(a,o,l,i,c,s,f)},t.prototype.invalidate=function(){this._volume=this._count=-1,this._avg=null},t.prototype.volume=function(){if(this._volume<0){var t=this.dimension,e=t.r1,r=t.r2,n=t.g1,o=t.g2,a=t.b1,i=t.b2;this._volume=(r-e+1)*(o-n+1)*(i-a+1)}return this._volume},t.prototype.count=function(){if(this._count<0){for(var t=this.hist,e=this.dimension,r=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=0,u=r;u<=o;u++)for(var d=a;d<=i;d++)for(var p=l;p<=s;p++)c+=t[n.getColorIndex(u,d,p)];this._count=c}return this._count},t.prototype.clone=function(){var e=this.hist,r=this.dimension;return new t(r.r1,r.r2,r.g1,r.g2,r.b1,r.b2,e)},t.prototype.avg=function(){if(!this._avg){var t=this.hist,e=this.dimension,r=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=0,u=1<<8-n.SIGBITS,d=void 0,p=void 0,h=void 0;d=p=h=0;for(var f=r;f<=o;f++)for(var g=a;g<=i;g++)for(var m=l;m<=s;m++){var v=t[n.getColorIndex(f,g,m)];c+=v,d+=v*(f+.5)*u,p+=v*(g+.5)*u,h+=v*(m+.5)*u}this._avg=c?[~~(d/c),~~(p/c),~~(h/c)]:[~~(u*(r+o+1)/2),~~(u*(a+i+1)/2),~~(u*(l+s+1)/2)]}return this._avg},t.prototype.contains=function(t){var e=t[0],r=t[1],o=t[2],a=this.dimension,i=a.r1,l=a.r2,s=a.g1,c=a.g2,u=a.b1,d=a.b2;return e>>=n.RSHIFT,r>>=n.RSHIFT,o>>=n.RSHIFT,e>=i&&e<=l&&r>=s&&r<=c&&o>=u&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,r=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=this.count();if(!c)return[];if(1===c)return[this.clone()];var u,d,p=o-r+1,h=i-a+1,f=s-l+1,g=Math.max(p,h,f),m=null;u=d=0;var v=null;if(g===p){v="r",m=new Uint32Array(o+1);for(var b=r;b<=o;b++){u=0;for(var y=a;y<=i;y++)for(var A=l;A<=s;A++)u+=t[n.getColorIndex(b,y,A)];d+=u,m[b]=d}}else if(g===h)for(v="g",m=new Uint32Array(i+1),y=a;y<=i;y++){for(u=0,b=r;b<=o;b++)for(A=l;A<=s;A++)u+=t[n.getColorIndex(b,y,A)];d+=u,m[y]=d}else for(v="b",m=new Uint32Array(s+1),A=l;A<=s;A++){for(u=0,b=r;b<=o;b++)for(y=a;y<=i;y++)u+=t[n.getColorIndex(b,y,A)];d+=u,m[A]=d}for(var C=-1,_=new Uint32Array(m.length),w=0;w<m.length;w++){var k=m[w];C<0&&k>d/2&&(C=w),_[w]=d-k}var x=this;return function(t){var e=t+"1",r=t+"2",n=x.dimension[e],o=x.dimension[r],a=x.clone(),i=x.clone(),l=C-n,s=o-C;for(l<=s?(o=Math.min(o-1,~~(C+s/2)),o=Math.max(0,o)):(o=Math.max(n,~~(C-1-l/2)),o=Math.min(x.dimension[r],o));!m[o];)o++;for(var c=_[o];!c&&m[o-1];)c=_[--o];return a.dimension[r]=o,i.dimension[e]=o+1,[a,i]}(v)},t}();e.default=o},17388:(t,e)=>{"use strict";function r(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return null===e?null:[e[1],e[2],e[3]].map((function(t){return parseInt(t,16)}))}function n(t,e,r){return e/=255,r/=255,t=(t/=255)>.04045?Math.pow((t+.005)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.005)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.005)/1.055,2.4):r/12.92,[.4124*(t*=100)+.3576*(e*=100)+.1805*(r*=100),.2126*t+.7152*e+.0722*r,.0193*t+.1192*e+.9505*r]}function o(t,e,r){return e/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(e=e>.008856?Math.pow(e,1/3):7.787*e+16/116)-16,500*(t-e),200*(e-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function a(t,e,r){var a=n(t,e,r);return o(a[0],a[1],a[2])}function i(t,e){var r=t[0],n=t[1],o=t[2],a=e[0],i=e[1],l=e[2],s=r-a,c=n-i,u=o-l,d=Math.sqrt(n*n+o*o),p=a-r,h=Math.sqrt(i*i+l*l)-d,f=Math.sqrt(s*s+c*c+u*u),g=Math.sqrt(f)>Math.sqrt(Math.abs(p))+Math.sqrt(Math.abs(h))?Math.sqrt(f*f-p*p-h*h):0;return p/=1,h/=1*(1+.045*d),g/=1*(1+.015*d),Math.sqrt(p*p+h*h+g*g)}function l(t,e){return i(a.apply(void 0,t),a.apply(void 0,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.getColorIndex=e.getColorDiffStatus=e.hexDiff=e.rgbDiff=e.deltaE94=e.rgbToCIELab=e.xyzToCIELab=e.rgbToXyz=e.hslToRgb=e.rgbToHsl=e.rgbToHex=e.hexToRgb=e.defer=e.RSHIFT=e.SIGBITS=e.DELTAE94_DIFF_STATUS=void 0,e.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},e.SIGBITS=5,e.RSHIFT=8-e.SIGBITS,e.defer=function(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return{resolve:t,reject:e,promise:r}},e.hexToRgb=r,e.rgbToHex=function(t,e,r){return"#"+((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1,7)},e.rgbToHsl=function(t,e,r){t/=255,e/=255,r/=255;var n,o,a=Math.max(t,e,r),i=Math.min(t,e,r),l=(a+i)/2;if(a===i)n=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return[n,o,l]},e.hslToRgb=function(t,e,r){var n,o,a;function i(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(0===e)n=o=a=r;else{var l=r<.5?r*(1+e):r+e-r*e,s=2*r-l;n=i(s,l,t+1/3),o=i(s,l,t),a=i(s,l,t-1/3)}return[255*n,255*o,255*a]},e.rgbToXyz=n,e.xyzToCIELab=o,e.rgbToCIELab=a,e.deltaE94=i,e.rgbDiff=l,e.hexDiff=function(t,e){return l(r(t),r(e))},e.getColorDiffStatus=function(t){return t<e.DELTAE94_DIFF_STATUS.NA?"N/A":t<=e.DELTAE94_DIFF_STATUS.PERFECT?"Perfect":t<=e.DELTAE94_DIFF_STATUS.CLOSE?"Close":t<=e.DELTAE94_DIFF_STATUS.GOOD?"Good":t<e.DELTAE94_DIFF_STATUS.SIMILAR?"Similar":"Wrong"},e.getColorIndex=function(t,r,n){return(t<<2*e.SIGBITS)+(r<<e.SIGBITS)+n}},3772:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=r(93525),s=i(r(38445)),c=a(r(17388)),u=a(r(5182)),d=a(r(3528)),p=a(r(53565)),h=r(84684),f=function(){function t(e,r){this._src=e,this.opts=h({},r,t.DefaultOpts),this.opts.combinedFilter=p.combineFilters(this.opts.filters)}return t.from=function(t){return new s.default(t)},t.prototype._process=function(t,e){var r=e.quantizer,n=e.generator;return t.scaleDown(e),t.applyFilter(e.combinedFilter).then((function(t){return r(t.data,e)})).then((function(t){return l.Swatch.applyFilter(t,e.combinedFilter)})).then((function(t){return Promise.resolve(n(t))}))},t.prototype.palette=function(){return this.swatches()},t.prototype.swatches=function(){return this._palette},t.prototype.getPalette=function(t){var e=this,r=new this.opts.ImageClass,n=r.load(this._src).then((function(t){return e._process(t,e.opts)})).then((function(t){return e._palette=t,r.remove(),t}),(function(t){throw r.remove(),t}));return t&&n.then((function(e){return t(null,e)}),(function(e){return t(e)})),n},t.Builder=s.default,t.Quantizer=u,t.Generator=d,t.Filter=p,t.Util=c,t.Swatch=l.Swatch,t.DefaultOpts={colorCount:64,quality:5,generator:d.Default,ImageClass:null,quantizer:u.MMCQ,filters:[p.Default]},t}();e.default=f},58859:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=n&&o&&"function"==typeof o.get?o.get:null,i=n&&Map.prototype.forEach,l="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"==typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,y=String.prototype.replace,A=String.prototype.toUpperCase,C=String.prototype.toLowerCase,_=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,x=Array.prototype.slice,S=Math.floor,D="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function P(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-S(-t):S(t);if(n!==t){var o=String(n),a=b.call(e,o.length+1);return y.call(o,r,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(e,r,"$&_")}var N=r(42634),L=N.custom,B=U(L)?L:null;function R(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function F(t){return y.call(String(t),/"/g,"&quot;")}function H(t){return!("[object Array]"!==W(t)||I&&"object"==typeof t&&I in t)}function q(t){return!("[object RegExp]"!==W(t)||I&&"object"==typeof t&&I in t)}function U(t){if(O)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,o,l){var s=n||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return $(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return A?P(e,_):_}if("bigint"==typeof e){var S=String(e)+"n";return A?P(e,S):S}var T=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=T&&T>0&&"object"==typeof e)return H(e)?"[Array]":"[Object]";var L,z=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=k.call(Array(t.indent+1)," ")}return{base:r,prev:k.call(Array(e+1),r)}}(s,o);if(void 0===l)l=[];else if(Y(l,e)>=0)return"[Circular]";function G(e,r,n){if(r&&(l=x.call(l)).push(r),n){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,o+1,l)}return t(e,s,o+1,l)}if("function"==typeof e&&!q(e)){var tt=function(t){if(t.name)return t.name;var e=v.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),et=Z(e,G);return"[Function"+(tt?": "+tt:" (anonymous)")+"]"+(et.length>0?" { "+k.call(et,", ")+" }":"")}if(U(e)){var rt=O?y.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(e);return"object"!=typeof e||O?rt:X(rt)}if((L=e)&&"object"==typeof L&&("undefined"!=typeof HTMLElement&&L instanceof HTMLElement||"string"==typeof L.nodeName&&"function"==typeof L.getAttribute)){for(var nt="<"+C.call(String(e.nodeName)),ot=e.attributes||[],at=0;at<ot.length;at++)nt+=" "+ot[at].name+"="+R(F(ot[at].value),"double",s);return nt+=">",e.childNodes&&e.childNodes.length&&(nt+="..."),nt+"</"+C.call(String(e.nodeName))+">"}if(H(e)){if(0===e.length)return"[]";var it=Z(e,G);return z&&!function(t){for(var e=0;e<t.length;e++)if(Y(t[e],"\n")>=0)return!1;return!0}(it)?"["+J(it,z)+"]":"[ "+k.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==W(t)||I&&"object"==typeof t&&I in t)}(e)){var lt=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||j.call(e,"cause")?0===lt.length?"["+String(e)+"]":"{ ["+String(e)+"] "+k.call(lt,", ")+" }":"{ ["+String(e)+"] "+k.call(w.call("[cause]: "+G(e.cause),lt),", ")+" }"}if("object"==typeof e&&g){if(B&&"function"==typeof e[B]&&N)return N(e,{depth:T-o});if("symbol"!==g&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return i&&i.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Q("Map",a.call(e),st,z)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return u&&u.call(e,(function(t){ct.push(G(t,e))})),Q("Set",c.call(e),ct,z)}if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return X(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!D)return!1;try{return D.call(t),!0}catch(t){}return!1}(e))return X(G(D.call(e)));if(function(t){return!("[object Boolean]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return X(f.call(e));if(function(t){return!("[object String]"!==W(t)||I&&"object"==typeof t&&I in t)}(e))return X(G(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==W(t)||I&&"object"==typeof t&&I in t)}(e)&&!q(e)){var ut=Z(e,G),dt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",ht=!dt&&I&&Object(e)===e&&I in e?b.call(W(e),8,-1):pt?"Object":"",ft=(dt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||pt?"["+k.call(w.call([],ht||[],pt||[]),": ")+"] ":"");return 0===ut.length?ft+"{}":z?ft+"{"+J(ut,z)+"}":ft+"{ "+k.call(ut,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return z.call(t,e)}function W(t){return g.call(t)}function Y(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function $(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return $(b.call(t,0,e.maxStringLength),e)+n}return R(y.call(y.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G),"single",e)}function G(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+A.call(e.toString(16))}function X(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Q(t,e,r,n){return t+" ("+e+") {"+(n?J(r,n):k.call(r,", "))+"}"}function J(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+k.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=H(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=V(t,o)?e(t[o],t):""}var a,i="function"==typeof T?T(t):[];if(O){a={};for(var l=0;l<i.length;l++)a["$"+i[l]]=i[l]}for(var s in t)V(t,s)&&(r&&String(Number(s))===s&&s<t.length||O&&a["$"+s]instanceof Symbol||(_.call(/[^\w$]/,s)?n.push(e(s,t)+": "+e(t[s],t)):n.push(s+": "+e(t[s],t))));if("function"==typeof T)for(var c=0;c<i.length;c++)j.call(t,i[c])&&n.push("["+e(i[c])+"]: "+e(t[i[c]],t));return n}},920:(t,e,r)=>{"use strict";var n=r(70453),o=r(38075),a=r(58859),i=r(69675),l=n("%WeakMap%",!0),s=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new i("Side channel does not contain "+a(t))},get:function(n){if(l&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(s){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(l&&n&&("object"==typeof n||"function"==typeof n)){if(t)return d(t,n)}else if(s){if(e)return f(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){l&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new l),u(t,n,o)):s?(e||(e=new s),h(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},61270:function(t,e,r){var n;t=r.nmd(t),function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof r.g&&r.g;a.global!==a&&a.window!==a&&a.self;var i,l=2147483647,s=36,c=26,u=38,d=700,p=/^xn--/,h=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=s-1,v=Math.floor,b=String.fromCharCode;function y(t){throw new RangeError(g[t])}function A(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function C(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+A((t=t.replace(f,".")).split("."),e).join(".")}function _(t){for(var e,r,n=[],o=0,a=t.length;o<a;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<a?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function w(t){return A(t,(function(t){var e="";return t>65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+b(t)})).join("")}function k(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,r){var n=0;for(t=r?v(t/d):t>>1,t+=v(t/e);t>m*c>>1;n+=s)t=v(t/m);return v(n+(m+1)*t/(t+u))}function S(t){var e,r,n,o,a,i,u,d,p,h,f,g=[],m=t.length,b=0,A=128,C=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&y("not-basic"),g.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<m;){for(a=b,i=1,u=s;o>=m&&y("invalid-input"),((d=(f=t.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:s)>=s||d>v((l-b)/i))&&y("overflow"),b+=d*i,!(d<(p=u<=C?1:u>=C+c?c:u-C));u+=s)i>v(l/(h=s-p))&&y("overflow"),i*=h;C=x(b-a,e=g.length+1,0==a),v(b/e)>l-A&&y("overflow"),A+=v(b/e),b%=e,g.splice(b++,0,A)}return w(g)}function D(t){var e,r,n,o,a,i,u,d,p,h,f,g,m,A,C,w=[];for(g=(t=_(t)).length,e=128,r=0,a=72,i=0;i<g;++i)(f=t[i])<128&&w.push(b(f));for(n=o=w.length,o&&w.push("-");n<g;){for(u=l,i=0;i<g;++i)(f=t[i])>=e&&f<u&&(u=f);for(u-e>v((l-r)/(m=n+1))&&y("overflow"),r+=(u-e)*m,e=u,i=0;i<g;++i)if((f=t[i])<e&&++r>l&&y("overflow"),f==e){for(d=r,p=s;!(d<(h=p<=a?1:p>=a+c?c:p-a));p+=s)C=d-h,A=s-h,w.push(b(k(h+C%A,0))),d=v(C/A);w.push(b(k(d,0))),a=x(r,m,n==o),r=0,++n}++r,++e}return w.join("")}i={version:"1.4.1",ucs2:{decode:_,encode:w},decode:S,encode:D,toASCII:function(t){return C(t,(function(t){return h.test(t)?"xn--"+D(t):t}))},toUnicode:function(t){return C(t,(function(t){return p.test(t)?S(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return i}.call(e,r,e,t))||(t.exports=n)}()},95902:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,n="RFC3986";t.exports={default:n,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:n}},63098:(t,e,r)=>{"use strict";var n=r(91207),o=r(60969),a=r(95902);t.exports={formats:a,parse:o,stringify:n}},60969:(t,e,r)=>{"use strict";var n=r(62795),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},s=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,r,n){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&null!==(l=i.exec(a))&&d<r.depth;){if(d+=1,!r.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+a.slice(l.index)+"]"),function(t,e,r,n){for(var o=n?e:s(e,r),a=t.length-1;a>=0;--a){var i,l=t[a];if("[]"===l&&r.parseArrays)i=[].concat(o);else{i=r.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&l!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=o:"__proto__"!==c&&(i[c]=o):i={0:o}}o=i}return o}(u,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return i;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?i.charset:t.charset;return{allowDots:void 0===t.allowDots?i.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:i.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:i.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:i.comma,decoder:"function"==typeof t.decoder?t.decoder:i.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:i.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:i.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:i.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:i.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof t?function(t,e){var r,c={__proto__:null},u=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,d=e.parameterLimit===1/0?void 0:e.parameterLimit,p=u.split(e.delimiter,d),h=-1,f=e.charset;if(e.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?f="utf-8":"utf8=%26%2310003%3B"===p[r]&&(f="iso-8859-1"),h=r,r=p.length);for(r=0;r<p.length;++r)if(r!==h){var g,m,v=p[r],b=v.indexOf("]="),y=-1===b?v.indexOf("="):b+1;-1===y?(g=e.decoder(v,i.decoder,f,"key"),m=e.strictNullHandling?null:""):(g=e.decoder(v.slice(0,y),i.decoder,f,"key"),m=n.maybeMap(s(v.slice(y+1),e),(function(t){return e.decoder(t,i.decoder,f,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===f&&(m=l(m)),v.indexOf("[]=")>-1&&(m=a(m)?[m]:m),o.call(c,g)?c[g]=n.combine(c[g],m):c[g]=m}return c}(t,r):t,d=r.plainObjects?Object.create(null):{},p=Object.keys(u),h=0;h<p.length;++h){var f=p[h],g=c(f,u[f],r,"string"==typeof t);d=n.merge(d,g,r)}return!0===r.allowSparse?d:n.compact(d)}},91207:(t,e,r)=>{"use strict";var n=r(920),o=r(62795),a=r(95902),i=Object.prototype.hasOwnProperty,l={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},s=Array.isArray,c=Array.prototype.push,u=function(t,e){c.apply(t,s(e)?e:[e])},d=Date.prototype.toISOString,p=a.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:a.formatters[p],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},f={},g=function t(e,r,a,i,l,c,d,p,g,m,v,b,y,A,C,_){for(var w,k=e,x=_,S=0,D=!1;void 0!==(x=x.get(f))&&!D;){var T=x.get(e);if(S+=1,void 0!==T){if(T===S)throw new RangeError("Cyclic object value");D=!0}void 0===x.get(f)&&(S=0)}if("function"==typeof p?k=p(r,k):k instanceof Date?k=v(k):"comma"===a&&s(k)&&(k=o.maybeMap(k,(function(t){return t instanceof Date?v(t):t}))),null===k){if(l)return d&&!A?d(r,h.encoder,C,"key",b):r;k=""}if("string"==typeof(w=k)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||o.isBuffer(k))return d?[y(A?r:d(r,h.encoder,C,"key",b))+"="+y(d(k,h.encoder,C,"value",b))]:[y(r)+"="+y(String(k))];var E,O=[];if(void 0===k)return O;if("comma"===a&&s(k))A&&d&&(k=o.maybeMap(k,d)),E=[{value:k.length>0?k.join(",")||null:void 0}];else if(s(p))E=p;else{var I=Object.keys(k);E=g?I.sort(g):I}for(var j=i&&s(k)&&1===k.length?r+"[]":r,M=0;M<E.length;++M){var P=E[M],N="object"==typeof P&&void 0!==P.value?P.value:k[P];if(!c||null!==N){var L=s(k)?"function"==typeof a?a(j,P):j:j+(m?"."+P:"["+P+"]");_.set(e,S);var B=n();B.set(f,_),u(O,t(N,L,a,i,l,c,"comma"===a&&A&&s(k)?null:d,p,g,m,v,b,y,A,C,B))}}return O};t.exports=function(t,e){var r,o=t,c=function(t){if(!t)return h;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=a.default;if(void 0!==t.format){if(!i.call(a.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=a.formatters[r],o=h.filter;return("function"==typeof t.filter||s(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof c.filter?o=(0,c.filter)("",o):s(c.filter)&&(r=c.filter);var d,p=[];if("object"!=typeof o||null===o)return"";d=e&&e.arrayFormat in l?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=l[d];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var v=n(),b=0;b<r.length;++b){var y=r[b];c.skipNulls&&null===o[y]||u(p,g(o[y],y,f,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,v))}var A=p.join(c.delimiter),C=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?C+="utf8=%26%2310003%3B&":C+="utf8=%E2%9C%93&"),A.length>0?C+A:""}},62795:(t,e,r)=>{"use strict";var n=r(95902),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r};t.exports={arrayToObject:l,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],l=Object.keys(i),s=0;s<l.length;++s){var c=l[s],u=i[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:i,prop:c}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,o,a){if(0===t.length)return t;var l=t;if("symbol"==typeof t?l=Symbol.prototype.toString.call(t):"string"!=typeof t&&(l=String(t)),"iso-8859-1"===r)return escape(l).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var s="",c=0;c<l.length;++c){var u=l.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===n.RFC1738&&(40===u||41===u)?s+=l.charAt(c):u<128?s+=i[u]:u<2048?s+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?s+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&l.charCodeAt(c)),s+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return s},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(a(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r){if(a(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var i=e;return a(e)&&!a(r)&&(i=l(e,n)),a(e)&&a(r)?(r.forEach((function(r,a){if(o.call(e,a)){var i=e[a];i&&"object"==typeof i&&r&&"object"==typeof r?e[a]=t(i,r,n):e.push(r)}else e[a]=r})),e):Object.keys(r).reduce((function(e,a){var i=r[a];return o.call(e,a)?e[a]=t(e[a],i,n):e[a]=i,e}),i)}}},88835:(t,e,r)=>{"use strict";var n=r(61270);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var a=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(s),u=["%","/","?",";","#"].concat(c),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(63098);function b(t,e,r){if(t&&"object"==typeof t&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),i=-1!==o&&o<t.indexOf("#")?"?":"#",s=t.split(i);s[0]=s[0].replace(/\\/g,"/");var b=t=s.join(i);if(b=b.trim(),!r&&1===t.split("#").length){var y=l.exec(b);if(y)return this.path=b,this.href=b,this.pathname=y[1],y[2]?(this.search=y[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var A=a.exec(b);if(A){var C=(A=A[0]).toLowerCase();this.protocol=C,b=b.substr(A.length)}if(r||A||b.match(/^\/\/[^@/]+@[^@/]+/)){var _="//"===b.substr(0,2);!_||A&&g[A]||(b=b.substr(2),this.slashes=!0)}if(!g[A]&&(_||A&&!m[A])){for(var w,k,x=-1,S=0;S<d.length;S++)-1!==(D=b.indexOf(d[S]))&&(-1===x||D<x)&&(x=D);for(-1!==(k=-1===x?b.lastIndexOf("@"):b.lastIndexOf("@",x))&&(w=b.slice(0,k),b=b.slice(k+1),this.auth=decodeURIComponent(w)),x=-1,S=0;S<u.length;S++){var D;-1!==(D=b.indexOf(u[S]))&&(-1===x||D<x)&&(x=D)}-1===x&&(x=b.length),this.host=b.slice(0,x),b=b.slice(x),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var E=this.hostname.split(/\./),O=(S=0,E.length);S<O;S++){var I=E[S];if(I&&!I.match(p)){for(var j="",M=0,P=I.length;M<P;M++)I.charCodeAt(M)>127?j+="x":j+=I[M];if(!j.match(p)){var N=E.slice(0,S),L=E.slice(S+1),B=I.match(h);B&&(N.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var R=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+R,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!f[C])for(S=0,O=c.length;S<O;S++){var H=c[S];if(-1!==b.indexOf(H)){var q=encodeURIComponent(H);q===H&&(q=escape(H)),b=b.split(H).join(q)}}var U=b.indexOf("#");-1!==U&&(this.hash=b.substr(U),b=b.slice(0,U));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),e&&(this.query=v.parse(this.query)),b=b.slice(0,z)):e&&(this.search="",this.query={}),b&&(this.pathname=b),m[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){R=this.pathname||"";var V=this.search||"";this.path=R+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(a=v.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var i=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||m[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),i&&"?"!==i.charAt(0)&&(i="?"+i),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(i=i.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if("string"==typeof t){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var i=n[a];r[i]=this[i]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),s=0;s<l.length;s++){var c=l[s];"protocol"!==c&&(r[c]=t[c])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!m[t.protocol]){for(var u=Object.keys(t),d=0;d<u.length;d++){var p=u[d];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||g[t.protocol])r.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var f=r.pathname||"",v=r.search||"";r.path=f+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),A=y||b||r.host&&t.pathname,C=A,_=r.pathname&&r.pathname.split("/")||[],w=(h=t.pathname&&t.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),A=A&&(""===h[0]||""===_[0])),y)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,_=h;else if(h.length)_||(_=[]),_.pop(),_=_.concat(h),r.search=t.search,r.query=t.query;else if(null!=t.search)return w&&(r.host=_.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=_.slice(-1)[0],x=(r.host||t.host||_.length>1)&&("."===k||".."===k)||""===k,S=0,D=_.length;D>=0;D--)"."===(k=_[D])?_.splice(D,1):".."===k?(_.splice(D,1),S++):S&&(_.splice(D,1),S--);if(!A&&!C)for(;S--;S)_.unshift("..");!A||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),x&&"/"!==_.join("/").substr(-1)&&_.push("");var T,E=""===_[0]||_[0]&&"/"===_[0].charAt(0);return w&&(r.hostname=E?"":_.length?_.shift():"",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),(A=A||r.host&&_.length)&&!E&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=i.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=b(t)),t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o},42634:()=>{}},a={};function i(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={id:t,loaded:!1,exports:{}};return o[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=o,e=[],i.O=(t,r,n,o)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){r=e[u][0],n=e[u][1],o=e[u][2];for(var l=!0,s=0;s<r.length;s++)(!1&o||a>=o)&&Object.keys(i.O).every((t=>i.O[t](r[s])))?r.splice(s--,1):(l=!1,o<a&&(a=o));if(l){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,n,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,r)=>(i.f[r](t,e),e)),[])),i.u=t=>t+"-"+t+".js?v="+{1110:"a5d6e6f59aa058840a1e",5455:"70389af1c0aeb085252a"}[t],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},n="nextcloud:",i.l=(t,e,o,a)=>{if(r[t])r[t].push(e);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+o){l=d;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",n+o),l.src=t),r[t]=[e];var p=(e,n)=>{l.onerror=l.onload=null,clearTimeout(h);var o=r[t];if(delete r[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((t=>t(n))),e)return e(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.j=6673,(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{i.b=document.baseURI||self.location.href;var t={6673:0};i.f.j=(e,r)=>{var n=i.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var a=i.p+i.u(e),l=new Error;i.l(a,(r=>{if(i.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,n[1](l)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,a=r[0],l=r[1],s=r[2],c=0;if(a.some((e=>0!==t[e]))){for(n in l)i.o(l,n)&&(i.m[n]=l[n]);if(s)var u=s(i)}for(e&&e(r);c<a.length;c++)o=a[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(u)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),i.nc=void 0;var l=i.O(void 0,[4208],(()=>i(69250)));l=i.O(l)})();
  3. //# sourceMappingURL=theming-personal-theming.js.map?v=c7f55b5a61527a0bd2fb