123 |
- /*! For license information please see theming-personal-theming.js.LICENSE.txt */
- !function(){var e,n,r,o={45112:function(e,n,r){"use strict";var o=r(77958),i=r(20144);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l=r(79753),c=r(43554),u=r(93664),s=r(67606),d=r(67912),f=r(64024),h=(r(97248),r(20296)),p=r.n(h),g=r(37776),v=r(1082),m=r.n(v),b=r(80419),y=r(82675),A={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},w=r(51900),_=(0,w.Z)(A,(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,"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,C=r(25108);function x(t){return x="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},x(t)}function k(){k=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new E(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var g={};c(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(D([])));m&&m!==e&&n.call(m,i)&&(g=m);var b=p.prototype=f.prototype=Object.create(g);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=s(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==x(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function D(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=p,r(b,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=c(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},y(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(b),c(b,l,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=D,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function S(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){S(i,r,o,a,l,"next",t)}function l(t){S(i,r,o,a,l,"throw",t)}a(void 0)}))}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var T=(0,c.j)("theming","backgroundImage"),O=(0,c.j)("theming","shippedBackgrounds"),I=(0,c.j)("theming","themingDefaultBackground"),L=(0,c.j)("theming","defaultShippedBackground"),P=function(t){return(0,l.generateFilePath)("theming","","img/background/")+t},M={name:"BackgroundSettings",components:{Check:b.default,Close:y.default,ImageEdit:_,NcColorPicker:g.Z},data:function(){return{loading:!1,Theming:(0,c.j)("theming","data",{}),backgroundImage:T}},computed:{shippedBackgrounds:function(){var t=this;return Object.keys(O).map((function(t){return{name:t,url:P(t),preview:P("preview/"+t),details:O[t]}})).filter((function(e){return!(!t.isGlobalBackgroundDeleted&&!t.isGlobalBackgroundDefault)||e.name!==L}))},isGlobalBackgroundDefault:function(){return!!I},isGlobalBackgroundDeleted:function(){return"backgroundColor"===I},isBackgroundDisabled:function(){return"disabled"===this.backgroundImage||!this.backgroundImage}},methods:{invertTextColor:function(t){return this.calculateLuma(t)>.6},calculateLuma:function(t){var e,n,r=(e=this.hexToRGB(t),n=3,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,n)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return(.2126*r[0]+.7152*r[1]+.0722*r[2])/255},hexToRGB:function(t){var 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},update:function(t){var e=this;return E(k().mark((function n(){return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e.backgroundImage=t.backgroundImage,e.Theming.color=t.backgroundColor,e.$emit("update:background"),e.loading=!1;case 4:case"end":return n.stop()}}),n)})))()},setDefault:function(){var t=this;return E(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="default",e.next=3,u.Z.post((0,l.generateUrl)("/apps/theming/background/default"));case 3:n=e.sent,t.update(n.data);case 5:case"end":return e.stop()}}),e)})))()},setShipped:function(t){var e=this;return E(k().mark((function n(){var r;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading=t,n.next=3,u.Z.post((0,l.generateUrl)("/apps/theming/background/shipped"),{value:t});case 3:r=n.sent,e.update(r.data);case 5:case"end":return n.stop()}}),n)})))()},setFile:function(t){var e=arguments,n=this;return E(k().mark((function r(){var o,i;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.length>1&&void 0!==e[1]?e[1]:null,n.loading="custom",r.next=4,u.Z.post((0,l.generateUrl)("/apps/theming/background/custom"),{value:t,color:o});case 4:i=r.sent,n.update(i.data);case 6:case"end":return r.stop()}}),r)})))()},removeBackground:function(){var t=this;return E(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="remove",e.next=3,u.Z.delete((0,l.generateUrl)("/apps/theming/background/custom"));case 3:n=e.sent,t.update(n.data);case 5:case"end":return e.stop()}}),e)})))()},pickColor:function(t){var e=this;return E(k().mark((function n(){var r,o,i,a;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading="color",i=(null==t||null===(r=t.target)||void 0===r||null===(r=r.dataset)||void 0===r?void 0:r.color)||(null===(o=e.Theming)||void 0===o?void 0:o.color)||"#0082c9",n.next=4,u.Z.post((0,l.generateUrl)("/apps/theming/background/color"),{color:i});case 4:a=n.sent,e.update(a.data);case 6:case"end":return n.stop()}}),n)})))()},debouncePickColor:p()((function(){this.pickColor.apply(this,arguments)}),200),pickFile:function(){var e=this;(0,f.fn)(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:function(t){var n;e.applyFile(null===(n=t[0])||void 0===n?void 0:n.path)},type:"primary"}).build().pick()},applyFile:function(e){var n=this;return E(k().mark((function r(){var i,a,c,s,d,h;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e&&"string"==typeof e&&0!==e.trim().length&&"/"!==e){r.next=4;break}return C.error("No valid background have been selected",{path:e}),(0,f.x2)(t("theming","No background has been selected")),r.abrupt("return");case 4:return n.loading="custom",i=null,a=null,r.prev=7,s=(0,l.generateRemoteUrl)("dav/files/"+(0,o.ts)().uid+e),r.next=11,u.Z.get(s,{responseType:"blob"});case 11:return i=r.sent,d=URL.createObjectURL(i.data),r.next=15,n.getColorPaletteFromBlob(d);case 15:h=r.sent,a=null==h||null===(c=h.DarkVibrant)||void 0===c?void 0:c.hex,n.setFile(e,a),C.debug("Extracted colour",a,"from custom image",e,h),r.next=25;break;case 21:r.prev=21,r.t0=r.catch(7),n.setFile(e),C.error("Unable to extract colour from custom image",{error:r.t0,path:e,response:i,color:a});case 25:case"end":return r.stop()}}),r,null,[[7,21]])})))()},getColorPaletteFromBlob:function(t){return new Promise((function(e,n){new(m())(t).getPalette((function(t,r){t&&n(t),e(r)}))}))}}},j=M,N=r(93379),B=r.n(N),F=r(7795),R=r.n(F),U=r(90569),G=r.n(U),Z=r(3565),H=r.n(Z),V=r(19216),Y=r.n(V),z=r(44589),q=r.n(z),X=r(53767),W={};W.styleTagTransform=q(),W.setAttributes=H(),W.insert=G().bind(null,"head"),W.domAPI=R(),W.insertStyleElement=Y(),B()(X.Z,W),X.Z&&X.Z.locals&&X.Z.locals;var $=(0,w.Z)(j,(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-color-bright":t.invertTextColor(t.Theming.color),"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:26}}):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.defaultColor},attrs:{"aria-pressed":"default"===t.backgroundImage,"data-color-bright":t.invertTextColor(t.Theming.defaultColor),"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(" "),e("NcColorPicker",{on:{input:t.debouncePickColor},model:{value:t.Theming.color,callback:function(e){t.$set(t.Theming,"color",e)},expression:"Theming.color"}},[e("button",{staticClass:"background background__color",style:{backgroundColor:t.Theming.color,"--border-color":t.Theming.color},attrs:{"data-color":t.Theming.color,"data-color-bright":t.invertTextColor(t.Theming.color),"data-user-theming-background-color":"",tabindex:"0"}},[t._v("\n\t\t\t"+t._s(t.t("theming","Change color"))+"\n\t\t")])]),t._v(" "),e("button",{class:{"background background__delete":!0,"background--active":t.isBackgroundDisabled},attrs:{"aria-pressed":t.isBackgroundDisabled,"data-user-theming-background-clear":"",tabindex:"0"},on:{click:t.removeBackground}},[t._v("\n\t\t"+t._s(t.t("theming","No background"))+"\n\t\t"),t.isBackgroundDisabled?t._e():e("Close",{attrs:{size:32}}),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),t._l(t.shippedBackgrounds,(function(n){return e("button",{key:n.name,class:{"background background__shipped":!0,"icon-loading":t.loading===n.name,"background--active":t.backgroundImage===n.name},style:{backgroundImage:"url("+n.preview+")","--border-color":n.details.primary_color},attrs:{title:n.details.attribution,"aria-label":n.details.attribution,"aria-pressed":t.backgroundImage===n.name,"data-color-bright":"dark"===n.details.theming,"data-user-theming-background-shipped":n.name,tabindex:"0"},on:{click:function(e){return t.setShipped(n.name)}}},[e("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"27ef6e15",null).exports,K=r(25108),Q={name:"ItemPreview",components:{NcCheckboxRadioSwitch:s.Z},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:function(){return this.unique?"switch":"radio"},name:function(){return this.unique?null:this.type},img:function(){return(0,l.generateFilePath)("theming","img",this.theme.id+".jpg")},checked:{get:function(){return this.selected},set:function(t){K.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:function(){"radio"!==this.switchType?this.checked=!this.checked:this.checked=!0}}},J=r(22465),tt={};tt.styleTagTransform=q(),tt.setAttributes=H(),tt.insert=G().bind(null,"head"),tt.domAPI=R(),tt.insertStyleElement=Y(),B()(J.Z,tt),J.Z&&J.Z.locals&&J.Z.locals;var et=(0,w.Z)(Q,(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,nt=r(31352);function rt(t){return"function"==typeof t?t():(0,i.unref)(t)}i.default.util.warn,r(25108);const ot="undefined"!=typeof window&&"undefined"!=typeof document;function it(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}Object.prototype.toString;const at=/\B([A-Z])/g,lt=(it((t=>t.replace(at,"-$1").toLowerCase())),/-(\w)/g);it((t=>t.replace(lt,((t,e)=>e?e.toUpperCase():"")))),r(25108),ot&&window;const ct=ot?window.document:void 0;function ut(t){return ut="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},ut(t)}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dt(){return dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dt.apply(this,arguments)}function ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){st(t,e,n[e])}))}return t}function ht(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}ot&&window.navigator,ot&&window.location,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,Number.POSITIVE_INFINITY;var pt=ht(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),gt=ht(/Edge/i),vt=ht(/firefox/i),mt=ht(/safari/i)&&!ht(/chrome/i)&&!ht(/android/i),bt=ht(/iP(ad|od|hone)/i),yt=ht(/chrome/i)&&ht(/android/i),At={capture:!1,passive:!1};function wt(t,e,n){t.addEventListener(e,n,!pt&&At)}function _t(t,e,n){t.removeEventListener(e,n,!pt&&At)}function Ct(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 xt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function kt(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Ct(t,e):Ct(t,e))||r&&t===n)return t;if(t===n)break}while(t=xt(t))}return null}var St,Et=/\s+/g;function Dt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Et," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Et," ")}}function Tt(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Ot(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Tt(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function It(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function Lt(){return document.scrollingElement||document.documentElement}function Pt(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var i,a,l,c,u,s,d;if(t!==window&&t!==Lt()?(a=(i=t.getBoundingClientRect()).top,l=i.left,c=i.bottom,u=i.right,s=i.height,d=i.width):(a=0,l=0,c=window.innerHeight,u=window.innerWidth,s=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!pt))do{if(o&&o.getBoundingClientRect&&("none"!==Tt(o,"transform")||n&&"static"!==Tt(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(Tt(o,"border-top-width")),l-=f.left+parseInt(Tt(o,"border-left-width")),c=a+i.height,u=l+i.width;break}}while(o=o.parentNode);if(r&&t!==window){var h=Ot(o||t),p=h&&h.a,g=h&&h.d;h&&(c=(a/=g)+(s/=g),u=(l/=p)+(d/=p))}return{top:a,left:l,bottom:c,right:u,width:d,height:s}}}function Mt(t,e,n){for(var r=Rt(t,!0),o=Pt(t)[e];r;){var i=Pt(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===Lt())break;r=Rt(r,!1)}return!1}function jt(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==Ue.ghost&&i[o]!==Ue.dragged&&kt(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function Nt(t,e){for(var n=t.lastElementChild;n&&(n===Ue.ghost||"none"===Tt(n,"display")||e&&!Ct(n,e));)n=n.previousElementSibling;return n||null}function Bt(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ue.clone||e&&!Ct(t,e)||n++;return n}function Ft(t){var e=0,n=0,r=Lt();if(t)do{var o=Ot(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function Rt(t,e){if(!t||!t.getBoundingClientRect)return Lt();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Tt(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Lt();if(r||e)return n;r=!0}}}while(n=n.parentNode);return Lt()}function Ut(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 Gt(t,e){return function(){if(!St){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),St=setTimeout((function(){St=void 0}),e)}}}function Zt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Ht(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var Vt="Sortable"+(new Date).getTime();var Yt=[],zt={initializeByDefault:!0},qt={mount:function(t){for(var e in zt)zt.hasOwnProperty(e)&&!(e in t)&&(t[e]=zt[e]);Yt.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";Yt.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](ft({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](ft({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in Yt.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var i=new r(t,e,t.options);i.sortable=t,i.options=t.options,t[o]=i,dt(n,i.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var i=this.modifyOption(t,o,t.options[o]);void 0!==i&&(t.options[o]=i)}},getEventProperties:function(t,e){var n={};return Yt.forEach((function(r){"function"==typeof r.eventProperties&&dt(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Yt.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var Xt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(n,["evt"]);qt.pluginEvent.bind(Ue)(t,e,ft({dragEl:$t,parentEl:Kt,ghostEl:Qt,rootEl:Jt,nextEl:te,lastDownEl:ee,cloneEl:ne,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Ue.active,originalEvent:r,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le,hideGhostForTarget:Ne,unhideGhostForTarget:Be,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(t){Wt({sortable:e,name:t,originalEvent:r})}},o))};function Wt(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,l=t.fromEl,c=t.oldIndex,u=t.newIndex,s=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,h=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[Vt]){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||pt||gt?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=o||n,g.clone=i,g.oldIndex=c,g.newIndex=u,g.oldDraggableIndex=s,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=h?h.lastPutMode:void 0;var b=ft({},p,qt.getEventProperties(r,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}(ft({putSortable:ue,cloneEl:ne,targetEl:$t,rootEl:Jt,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le},t))}var $t,Kt,Qt,Jt,te,ee,ne,re,oe,ie,ae,le,ce,ue,se,de,fe,he,pe,ge,ve,me,be,ye,Ae,we=!1,_e=!1,Ce=[],xe=!1,ke=!1,Se=[],Ee=!1,De=[],Te="undefined"!=typeof document,Oe=bt,Ie=gt||pt?"cssFloat":"float",Le=Te&&!yt&&!bt&&"draggable"in document.createElement("div"),Pe=function(){if(Te){if(pt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Me=function(t,e){var n=Tt(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=jt(t,0,e),i=jt(t,1,e),a=o&&Tt(o),l=i&&Tt(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Pt(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Pt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var s="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==s?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Ie]||i&&"none"===n[Ie]&&c+u>r)?"vertical":"horizontal"},je=function(t){function e(t,n){return function(r,o,i,a){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==ut(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Ne=function(){!Pe&&Qt&&Tt(Qt,"display","none")},Be=function(){!Pe&&Qt&&Tt(Qt,"display","")};Te&&document.addEventListener("click",(function(t){if(_e)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),_e=!1,!1}),!0);var Fe=function(t){if($t){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Ce.some((function(t){if(!Nt(t)){var e=Pt(t),n=t[Vt].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,l=i>=e.top-n&&i<=e.bottom+n;return n&&r&&l?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Vt]._onDragOver(n)}}var o,i,a},Re=function(t){$t&&$t.parentNode[Vt]._isOutsideThisEl(t.target)};function Ue(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=dt({},e),t[Vt]=this;var n,r,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 Me(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!==Ue.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in qt.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var a in je(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Le,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?wt(t,"pointerdown",this._onTapStart):(wt(t,"mousedown",this._onTapStart),wt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(wt(t,"dragover",this),wt(t,"dragenter",this)),Ce.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),dt(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Tt(t,"display")&&t!==Ue.ghost){r.push({target:t,rect:Pt(t)});var e=ft({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=Ot(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,i=0;r.forEach((function(t){var n=0,r=t.target,a=r.fromRect,l=Pt(r),c=r.prevFromRect,u=r.prevToRect,s=t.rect,d=Ot(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&Ut(c,l)&&!Ut(a,l)&&(s.top-l.top)/(s.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(s,c,u,e.options)),Ut(l,a)||(r.prevFromRect=a,r.prevToRect=l,n||(n=e.options.animation),e.animate(r,s,l,n)),n&&(o=!0,i=Math.max(i,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof t&&t()}),i):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){Tt(t,"transition",""),Tt(t,"transform","");var o=Ot(this.el),i=o&&o.a,a=o&&o.d,l=(e.left-n.left)/(i||1),c=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!c,Tt(t,"transform","translate3d("+l+"px,"+c+"px,0)"),function(t){t.offsetWidth}(t),Tt(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Tt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Tt(t,"transition",""),Tt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function Ge(t,e,n,r,o,i,a,l){var c,u,s=t[Vt],d=s.options.onMove;return!window.CustomEvent||pt||gt?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||Pt(e),c.willInsertAfter=l,c.originalEvent=a,t.dispatchEvent(c),d&&(u=d.call(s,c,a)),u}function Ze(t){t.draggable=!1}function He(){Ee=!1}function Ve(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Ye(t){return setTimeout(t,0)}function ze(t){return clearTimeout(t)}Ue.prototype={constructor:Ue,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(me=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$t):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=r.filter;if(function(t){De.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&De.push(r)}}(n),!$t&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(l=kt(l,r.draggable,n,!1))&&l.animated||ee===l)){if(oe=Bt(l),ae=Bt(l,r.draggable),"function"==typeof u){if(u.call(this,t,l,this))return Wt({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),Xt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=kt(c,r.trim(),n,!1))return Wt({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),Xt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!kt(c,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!$t&&n.parentNode===i){var c=Pt(n);if(Jt=i,Kt=($t=n).parentNode,te=$t.nextSibling,ee=n,ce=a.group,Ue.dragged=$t,se={target:$t,clientX:(e||t).clientX,clientY:(e||t).clientY},pe=se.clientX-c.left,ge=se.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$t.style["will-change"]="all",r=function(){Xt("delayEnded",o,{evt:t}),Ue.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!vt&&o.nativeDraggable&&($t.draggable=!0),o._triggerDragStart(t,e),Wt({sortable:o,name:"choose",originalEvent:t}),Dt($t,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){It($t,t.trim(),Ze)})),wt(l,"dragover",Fe),wt(l,"mousemove",Fe),wt(l,"touchmove",Fe),wt(l,"mouseup",o._onDrop),wt(l,"touchend",o._onDrop),wt(l,"touchcancel",o._onDrop),vt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$t.draggable=!0),Xt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(gt||pt))r();else{if(Ue.eventCanceled)return void this._onDrop();wt(l,"mouseup",o._disableDelayedDrag),wt(l,"touchend",o._disableDelayedDrag),wt(l,"touchcancel",o._disableDelayedDrag),wt(l,"mousemove",o._delayedDragTouchMoveHandler),wt(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&wt(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.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(){$t&&Ze($t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_t(t,"mouseup",this._disableDelayedDrag),_t(t,"touchend",this._disableDelayedDrag),_t(t,"touchcancel",this._disableDelayedDrag),_t(t,"mousemove",this._delayedDragTouchMoveHandler),_t(t,"touchmove",this._delayedDragTouchMoveHandler),_t(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?wt(document,"pointermove",this._onTouchMove):wt(document,e?"touchmove":"mousemove",this._onTouchMove):(wt($t,"dragend",this),wt(Jt,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(we=!1,Jt&&$t){Xt("dragStarted",this,{evt:e}),this.nativeDraggable&&wt(document,"dragover",Re);var n=this.options;!t&&Dt($t,n.dragClass,!1),Dt($t,n.ghostClass,!0),Ue.active=this,t&&this._appendGhost(),Wt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,Ne();for(var t=document.elementFromPoint(de.clientX,de.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==e;)e=t;if($t.parentNode[Vt]._isOutsideThisEl(t),e)do{if(e[Vt]&&e[Vt]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Be()}},_onTouchMove:function(t){if(se){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=Qt&&Ot(Qt,!0),a=Qt&&i&&i.a,l=Qt&&i&&i.d,c=Oe&&Ae&&Ft(Ae),u=(o.clientX-se.clientX+r.x)/(a||1)+(c?c[0]-Se[0]:0)/(a||1),s=(o.clientY-se.clientY+r.y)/(l||1)+(c?c[1]-Se[1]:0)/(l||1);if(!Ue.active&&!we){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Qt){i?(i.e+=u-(fe||0),i.f+=s-(he||0)):i={a:1,b:0,c:0,d:1,e:u,f:s};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Tt(Qt,"webkitTransform",d),Tt(Qt,"mozTransform",d),Tt(Qt,"msTransform",d),Tt(Qt,"transform",d),fe=u,he=s,de=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Qt){var t=this.options.fallbackOnBody?document.body:Jt,e=Pt($t,!0,Oe,!0,t),n=this.options;if(Oe){for(Ae=t;"static"===Tt(Ae,"position")&&"none"===Tt(Ae,"transform")&&Ae!==document;)Ae=Ae.parentNode;Ae!==document.body&&Ae!==document.documentElement?(Ae===document&&(Ae=Lt()),e.top+=Ae.scrollTop,e.left+=Ae.scrollLeft):Ae=Lt(),Se=Ft(Ae)}Dt(Qt=$t.cloneNode(!0),n.ghostClass,!1),Dt(Qt,n.fallbackClass,!0),Dt(Qt,n.dragClass,!0),Tt(Qt,"transition",""),Tt(Qt,"transform",""),Tt(Qt,"box-sizing","border-box"),Tt(Qt,"margin",0),Tt(Qt,"top",e.top),Tt(Qt,"left",e.left),Tt(Qt,"width",e.width),Tt(Qt,"height",e.height),Tt(Qt,"opacity","0.8"),Tt(Qt,"position",Oe?"absolute":"fixed"),Tt(Qt,"zIndex","100000"),Tt(Qt,"pointerEvents","none"),Ue.ghost=Qt,t.appendChild(Qt),Tt(Qt,"transform-origin",pe/parseInt(Qt.style.width)*100+"% "+ge/parseInt(Qt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;Xt("dragStart",this,{evt:t}),Ue.eventCanceled?this._onDrop():(Xt("setupClone",this),Ue.eventCanceled||((ne=Ht($t)).draggable=!1,ne.style["will-change"]="",this._hideClone(),Dt(ne,this.options.chosenClass,!1),Ue.clone=ne),n.cloneId=Ye((function(){Xt("clone",n),Ue.eventCanceled||(n.options.removeCloneOnHide||Jt.insertBefore(ne,$t),n._hideClone(),Wt({sortable:n,name:"clone"}))})),!e&&Dt($t,o.dragClass,!0),e?(_e=!0,n._loopId=setInterval(n._emulateDragOver,50)):(_t(document,"mouseup",n._onDrop),_t(document,"touchend",n._onDrop),_t(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,$t)),wt(document,"drop",n),Tt($t,"transform","translateZ(0)")),we=!0,n._dragStartId=Ye(n._dragStarted.bind(n,e,t)),wt(document,"selectstart",n),ve=!0,mt&&Tt(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,i=this.el,a=t.target,l=this.options,c=l.group,u=Ue.active,s=ce===c,d=l.sort,f=ue||u,h=this,p=!1;if(!Ee){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=kt(a,l.draggable,i,!0),D("dragOver"),Ue.eventCanceled)return p;if($t.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return O(!1);if(_e=!1,u&&!l.disabled&&(s?d||(r=!Jt.contains($t)):ue===this||(this.lastPutMode=ce.checkPull(this,u,$t,t))&&c.checkPut(this,u,$t,t))){if(o="vertical"===this._getDirection(t,a),e=Pt($t),D("dragOverValid"),Ue.eventCanceled)return p;if(r)return Kt=Jt,T(),this._hideClone(),D("revert"),Ue.eventCanceled||(te?Jt.insertBefore($t,te):Jt.appendChild($t)),O(!0);var g=Nt(i,l.draggable);if(!g||function(t,e,n){var r=Pt(Nt(n.el,n.options.draggable));return e?t.clientX>r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!g.animated){if(g===$t)return O(!1);if(g&&i===t.target&&(a=g),a&&(n=Pt(a)),!1!==Ge(Jt,i,$t,e,a,n,t,!!a))return T(),i.appendChild($t),Kt=i,I(),O(!0)}else if(a.parentNode===i){n=Pt(a);var v,m,b,y=$t.parentNode!==i,A=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===l||r+i/2===a+c/2}($t.animated&&$t.toRect||e,a.animated&&a.toRect||n,o),w=o?"top":"left",_=Mt(a,"top","top")||Mt($t,"top","top"),C=_?_.scrollTop:void 0;if(me!==a&&(m=n[w],xe=!1,ke=!A&&l.invertSwap||y),v=function(t,e,n,r,o,i,a,l){var c=r?t.clientY:t.clientX,u=r?n.height:n.width,s=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!a)if(l&&ye<u*o){if(!xe&&(1===be?c>s+u*i/2:c<d-u*i/2)&&(xe=!0),xe)f=!0;else if(1===be?c<s+ye:c>d-ye)return-be}else if(c>s+u*(1-o)/2&&c<d-u*(1-o)/2)return function(t){return Bt($t)<Bt(t)?1:-1}(e);return(f=f||a)&&(c<s+u*i/2||c>d-u*i/2)?c>s+u/2?1:-1:0}(t,a,n,o,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ke,me===a),0!==v){var x=Bt($t);do{x-=v,b=Kt.children[x]}while(b&&("none"===Tt(b,"display")||b===Qt))}if(0===v||b===a)return O(!1);me=a,be=v;var k=a.nextElementSibling,S=!1,E=Ge(Jt,i,$t,e,a,n,t,S=1===v);if(!1!==E)return 1!==E&&-1!==E||(S=1===E),Ee=!0,setTimeout(He,30),T(),S&&!k?i.appendChild($t):a.parentNode.insertBefore($t,S?k:a),_&&Zt(_,0,C-_.scrollTop),Kt=$t.parentNode,void 0===m||ke||(ye=Math.abs(m-Pt(a)[w])),I(),O(!0)}if(i.contains($t))return O(!1)}return!1}function D(l,c){Xt(l,h,ft({evt:t,isOwner:s,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:O,onMove:function(n,r){return Ge(Jt,i,$t,e,n,Pt(n),t,r)},changed:I},c))}function T(){D("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function O(e){return D("dragOverCompleted",{insertion:e}),e&&(s?u._hideClone():u._showClone(h),h!==f&&(Dt($t,ue?ue.options.ghostClass:u.options.ghostClass,!1),Dt($t,l.ghostClass,!0)),ue!==h&&h!==Ue.active?ue=h:h===Ue.active&&ue&&(ue=null),f===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){D("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===$t&&!$t.animated||a===i&&!a.animated)&&(me=null),l.dragoverBubble||t.rootEl||a===document||($t.parentNode[Vt]._isOutsideThisEl(t.target),!e&&Fe(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function I(){ie=Bt($t),le=Bt($t,l.draggable),Wt({sortable:h,name:"change",toEl:i,newIndex:ie,newDraggableIndex:le,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_t(document,"mousemove",this._onTouchMove),_t(document,"touchmove",this._onTouchMove),_t(document,"pointermove",this._onTouchMove),_t(document,"dragover",Fe),_t(document,"mousemove",Fe),_t(document,"touchmove",Fe)},_offUpEvents:function(){var t=this.el.ownerDocument;_t(t,"mouseup",this._onDrop),_t(t,"touchend",this._onDrop),_t(t,"pointerup",this._onDrop),_t(t,"touchcancel",this._onDrop),_t(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ie=Bt($t),le=Bt($t,n.draggable),Xt("drop",this,{evt:t}),Kt=$t&&$t.parentNode,ie=Bt($t),le=Bt($t,n.draggable),Ue.eventCanceled||(we=!1,ke=!1,xe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ze(this.cloneId),ze(this._dragStartId),this.nativeDraggable&&(_t(document,"drop",this),_t(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),mt&&Tt(document.body,"user-select",""),Tt($t,"transform",""),t&&(ve&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Qt&&Qt.parentNode&&Qt.parentNode.removeChild(Qt),(Jt===Kt||ue&&"clone"!==ue.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),$t&&(this.nativeDraggable&&_t($t,"dragend",this),Ze($t),$t.style["will-change"]="",ve&&!we&&Dt($t,ue?ue.options.ghostClass:this.options.ghostClass,!1),Dt($t,this.options.chosenClass,!1),Wt({sortable:this,name:"unchoose",toEl:Kt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Jt!==Kt?(ie>=0&&(Wt({rootEl:Kt,name:"add",toEl:Kt,fromEl:Jt,originalEvent:t}),Wt({sortable:this,name:"remove",toEl:Kt,originalEvent:t}),Wt({rootEl:Kt,name:"sort",toEl:Kt,fromEl:Jt,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),ue&&ue.save()):ie!==oe&&ie>=0&&(Wt({sortable:this,name:"update",toEl:Kt,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),Ue.active&&(null!=ie&&-1!==ie||(ie=oe,le=ae),Wt({sortable:this,name:"end",toEl:Kt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Xt("nulling",this),Jt=$t=Kt=Qt=te=ne=ee=re=se=de=ve=ie=le=oe=ae=me=be=ue=ce=Ue.dragged=Ue.ghost=Ue.clone=Ue.active=null,De.forEach((function(t){t.checked=!0})),De.length=fe=he=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$t&&(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=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)kt(t=n[r],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||Ve(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];kt(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return kt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=qt.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&je(n)},destroy:function(){Xt("destroy",this);var t=this.el;t[Vt]=null,_t(t,"mousedown",this._onTapStart),_t(t,"touchstart",this._onTapStart),_t(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_t(t,"dragover",this),_t(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!re){if(Xt("hideClone",this),Ue.eventCanceled)return;Tt(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),re=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(re){if(Xt("showClone",this),Ue.eventCanceled)return;Jt.contains($t)&&!this.options.group.revertClone?Jt.insertBefore(ne,$t):te?Jt.insertBefore(ne,te):Jt.appendChild(ne),this.options.group.revertClone&&this.animate($t,ne),Tt(ne,"display",""),re=!1}}else this._hideClone()}},Te&&wt(document,"touchmove",(function(t){(Ue.active||we)&&t.cancelable&&t.preventDefault()})),Ue.utils={on:wt,off:_t,css:Tt,find:It,is:function(t,e){return!!kt(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:Gt,closest:kt,toggleClass:Dt,clone:Ht,index:Bt,nextTick:Ye,cancelNextTick:ze,detectDirection:Me,getChild:jt},Ue.get=function(t){return t[Vt]},Ue.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];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&&(Ue.utils=ft({},Ue.utils,t.utils)),qt.mount(t)}))},Ue.create=function(t,e){return new Ue(t,e)},Ue.version="1.10.2";var qe,Xe,We,$e,Ke,Qe,Je=[],tn=!1;function en(){Je.forEach((function(t){clearInterval(t.pid)})),Je=[]}function nn(){clearInterval(Qe)}var rn=Gt((function(t,e,n,r){if(e.scroll){var o,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,c=e.scrollSpeed,u=Lt(),s=!1;Xe!==n&&(Xe=n,en(),qe=e.scroll,o=e.scrollFn,!0===qe&&(qe=Rt(n,!0)));var d=0,f=qe;do{var h=f,p=Pt(h),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,A=p.height,w=void 0,_=void 0,C=h.scrollWidth,x=h.scrollHeight,k=Tt(h),S=h.scrollLeft,E=h.scrollTop;h===u?(w=y<C&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=A<x&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(w=y<C&&("auto"===k.overflowX||"scroll"===k.overflowX),_=A<x&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=w&&(Math.abs(b-i)<=l&&S+y<C)-(Math.abs(m-i)<=l&&!!S),T=_&&(Math.abs(v-a)<=l&&E+A<x)-(Math.abs(g-a)<=l&&!!E);if(!Je[d])for(var O=0;O<=d;O++)Je[O]||(Je[O]={});Je[d].vx==D&&Je[d].vy==T&&Je[d].el===h||(Je[d].el=h,Je[d].vx=D,Je[d].vy=T,clearInterval(Je[d].pid),0==D&&0==T||(s=!0,Je[d].pid=setInterval(function(){r&&0===this.layer&&Ue.active._onTouchMove(Ke);var e=Je[this.layer].vy?Je[this.layer].vy*c:0,n=Je[this.layer].vx?Je[this.layer].vx*c:0;"function"==typeof o&&"continue"!==o.call(Ue.dragged.parentNode[Vt],n,e,t,Ke,Je[this.layer].el)||Zt(Je[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&f!==u&&(f=Rt(f,!1)));tn=s}}),30),on=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var c=n||o;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(s)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function an(){}function ln(){}an.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=jt(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:on},dt(an,{pluginName:"revertOnSpill"}),ln.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:on},dt(ln,{pluginName:"removeOnSpill"}),Ue.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?wt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?wt(document,"pointermove",this._handleFallbackAutoScroll):e.touches?wt(document,"touchmove",this._handleFallbackAutoScroll):wt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_t(document,"dragover",this._handleAutoScroll):(_t(document,"pointermove",this._handleFallbackAutoScroll),_t(document,"touchmove",this._handleFallbackAutoScroll),_t(document,"mousemove",this._handleFallbackAutoScroll)),nn(),en(),clearTimeout(St),St=void 0},nulling:function(){Ke=Xe=qe=tn=Qe=We=$e=null,Je.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(Ke=t,e||gt||pt||mt){rn(t,this.options,i,e);var a=Rt(i,!0);!tn||Qe&&r===We&&o===$e||(Qe&&nn(),Qe=setInterval((function(){var i=Rt(document.elementFromPoint(r,o),!0);i!==a&&(a=i,en()),rn(t,n.options,i,e)}),10),We=r,$e=o)}else{if(!this.options.bubbleScroll||Rt(i,!0)===Lt())return void en();rn(t,this.options,Rt(i,!1),!1)}}},dt(t,{pluginName:"scroll",initializeByDefault:!0})}),Ue.mount(ln,an);var cn=Ue;function un(t,e,n={}){let r;const{document:o=ct,...a}=n,l={onUpdate:t=>{!function(t,e,n){const r=(0,i.isRef)(t),o=r?[...rt(t)]:rt(t);if(n>=0&&n<o.length){const a=o.splice(e,1)[0];(0,i.nextTick)((()=>{o.splice(n,0,a),r&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},c=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):function(t){var e;const n=rt(t);return null!=(e=null==n?void 0:n.$el)?e:n}(t);e&&(r=new cn(e,{...l,...a}))},u=()=>null==r?void 0:r.destroy();return function(t,e=!0){(0,i.getCurrentInstance)()?(0,i.onMounted)(t):e?t():(0,i.nextTick)(t)}(c),s=u,!!(0,i.getCurrentScope)()&&(0,i.onScopeDispose)(s),{stop:u,start:c,option:(t,e)=>{if(void 0===e)return null==r?void 0:r.option(t);null==r||r.option(t,e)}};var s}var sn=r(74139),dn=r(76236),fn=r(85313),hn=r(57274),pn=(0,i.defineComponent)({name:"AppOrderSelectorElement",components:{IconArrowDown:dn.Z,IconArrowUp:fn.Z,NcButton:hn.Z},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":function(){return!0},"move:down":function(){return!0},"update:focus":function(){return!0}},setup:function(t,e){var n=e.emit,r=(0,i.ref)(),o=(0,i.ref)(),a=0;return{buttonUp:r,buttonDown:o,moveUp:function(){n("move:up"),a=1},moveDown:function(){n("move:down"),a=-1},keepFocus:function(){0!==a&&(1!==a&&!t.isLast||t.isFirst?(0,i.nextTick)((function(){return o.value.$el.focus()})):(0,i.nextTick)((function(){return r.value.$el.focus()}))),a=0},t:nt.Iu}}}),gn=r(77004),vn={};vn.styleTagTransform=q(),vn.setAttributes=H(),vn.insert=G().bind(null,"head"),vn.domAPI=R(),vn.insertStyleElement=Y(),B()(gn.Z,vn),gn.Z&&gn.Z.locals&&gn.Z.locals;var mn=(0,w.Z)(pn,(function(){var t,e=this,n=e._self._c;return e._self._setupProxy,n("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")}}},[n("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[n("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(" "),n("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(" "),n("div",{staticClass:"order-selector-element__actions"},[n("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[n("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("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(" "),n("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[n("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("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;function bn(t){return function(t){if(Array.isArray(t))return yn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return yn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var An=(0,i.defineComponent)({name:"AppOrderSelector",components:{AppOrderSelectorElement:mn,Fragment:sn.Fragment},props:{ariaDetails:{type:String,default:null},value:{type:Array,required:!0}},emits:{"update:value":function(t){return Array.isArray(t)}},setup:function(t,e){var n=e.emit,r=(0,i.ref)(null),o=(0,i.computed)({get:function(){return t.value},set:function(e){var r=bn(e).sort((function(t,n){return(n.default?1:0)-(t.default?1:0)||e.indexOf(t)-e.indexOf(n)}));r.some((function(e,n){return e.id!==t.value[n].id}))?n("update:value",r):a.value+=1}}),a=(0,i.ref)(0);un(r,o,{filter:".order-selector-element--disabled"});var l=(0,i.ref)([]);(0,i.onUpdated)((function(){l.value.forEach((function(t){return t.keepFocus()}))}));var c=(0,i.ref)("");return{appList:o,listElement:r,moveDown:function(e){var r=e>0?t.value.slice(0,e):[];r.push(t.value[e+1]);var o=e<t.value.length-2?t.value.slice(e+2):[];n("update:value",[].concat(bn(r),[t.value[e]],bn(o)))},moveUp:function(e){var r,o=e>1?t.value.slice(0,e-1):[];if(null===(r=t.value[e-1])||void 0===r||!r.default){var i=[t.value[e-1]];e<t.value.length-1&&i.push.apply(i,bn(t.value.slice(e+1))),n("update:value",[].concat(bn(o),[t.value[e]],i))}},statusInfoId:"sorting-status-info-".concat((Math.random()+1).toString(36).substring(7)),statusInfo:c,updateStatusInfo:function(e){c.value=(0,nt.Iu)("theming","Current selected app: {app}, position {position} of {total}",{app:t.value[e].label,position:e+1,total:t.value.length})},renderCount:a,selectorElements:l}}}),wn=An,_n=r(78741),Cn={};Cn.styleTagTransform=q(),Cn.setAttributes=H(),Cn.insert=G().bind(null,"head"),Cn.domAPI=R(),Cn.insertStyleElement=Y(),B()(_n.Z,Cn),_n.Z&&_n.Z.locals&&_n.Z.locals;var xn=(0,w.Z)(wn,(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(n,r){return e("AppOrderSelectorElement",t._g({key:"".concat(n.id).concat(t.renderCount),ref:"selectorElements",refInFor:!0,attrs:{app:n,"aria-details":t.ariaDetails,"aria-describedby":t.statusInfoId,"is-first":0===r||!!t.appList[r-1].default,"is-last":r===t.value.length-1}},n.default?{}:{"move:up":function(){return t.moveUp(r)},"move:down":function(){return t.moveDown(r)},"update:focus":function(){return t.updateStatusInfo(r)}}))})),1)])}),[],!1,null,"df3bf8da",null),kn=xn.exports,Sn=r(71884),En=r(6156),Dn=r(25108);function Tn(t){return Tn="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},Tn(t)}function On(){On=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new k(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var g={};c(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(g=m);var b=p.prototype=f.prototype=Object.create(g);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=s(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Tn(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,r(b,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=c(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},y(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(b),c(b,l,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function In(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function Ln(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){In(i,r,o,a,l,"next",t)}function l(t){In(i,r,o,a,l,"throw",t)}a(void 0)}))}}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mn(Object(n),!0).forEach((function(e){Nn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Nn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Tn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Tn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Tn(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bn=(0,i.defineComponent)({name:"UserAppMenuSection",components:{AppOrderSelector:kn,IconUndo:Sn.default,NcButton:hn.Z,NcNoteCard:En.Z,NcSettingsSection:d.Z},setup:function(){var t,e=(0,c.j)("theming","navigationBar"),n=e.userAppOrder,r=e.enforcedDefaultApp,o=Object.values((0,c.j)("core","apps")).filter((function(t){return"link"===t.type})).map((function(t){return jn(jn({},t),{},{label:t.name,default:t.default&&t.app===r})})),a=(0,i.ref)(!Array.isArray(n)||Object.values(n).length>0),s=(0,i.computed)((function(){return o.some((function(t,e){return t.id!==g.value[e].id}))})),d="theming-apporder-changed-infocard",h="theming-apporder-changed-infocard",p=(0,i.computed)((function(){return(s.value?"".concat(d," "):"")+(r?h:"")})),g=(0,i.ref)(function(t){if(Array.isArray(t))return Pn(t)}(t=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=function(){var t=Ln(On().mark((function t(){var e,n;return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m("apporder",[]);case 3:return a.value=!1,t.next=6,u.Z.get((0,l.generateOcsUrl)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});case 6:e=t.sent,n=e.data,g.value=n.ocs.data.map((function(t){return jn(jn({},t),{},{label:t.name,default:t.default&&t.app===r})})),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),Dn.warn(t.t0),(0,f.x2)((0,nt.Iu)("theming","Could not reset the app order"));case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(){return t.apply(this,arguments)}}(),m=function(){var t=Ln(On().mark((function t(e,n){var r;return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,l.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:e}),t.next=3,u.Z.post(r,{configValue:JSON.stringify(n)});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return{appOrder:g,updateAppOrder:function(t){var e={};t.forEach((function(t,n){var r=t.app,o=t.key;e[r]=jn(jn({},e[r]),{},Nn({},o,n))})),m("apporder",e).then((function(){g.value=t,a.value=!0})).catch((function(t){Dn.warn("Could not set the app order",t),(0,f.x2)((0,nt.Iu)("theming","Could not set the app order"))}))},resetAppOrder:v,enforcedDefaultApp:r,hasAppOrderChanged:s,hasCustomAppOrder:a,ariaDetailsAppOrder:p,elementIdAppOrderChanged:d,elementIdEnforcedDefaultApp:h,t:nt.Iu}}}),Fn=Bn,Rn=r(1563),Un={};Un.styleTagTransform=q(),Un.setAttributes=H(),Un.insert=G().bind(null,"head"),Un.domAPI=R(),Un.insertStyleElement=Y(),B()(Rn.Z,Un),Rn.Z&&Rn.Z.locals&&Rn.Z.locals;var Gn=(0,w.Z)(Fn,(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,"0b68cf15",null).exports,Zn=r(25108);function Hn(t){return Hn="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},Hn(t)}function Vn(){Vn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new k(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var g={};c(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(g=m);var b=p.prototype=f.prototype=Object.create(g);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,l){var c=s(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Hn(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=s(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,r(b,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=c(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},y(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(b),c(b,l,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Yn(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function zn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,l,"next",t)}function l(t){Yn(i,r,o,a,l,"throw",t)}a(void 0)}))}}function qn(t){return function(t){if(Array.isArray(t))return Xn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Wn=(0,c.j)("theming","themes",[]),$n=(0,c.j)("theming","enforceTheme",""),Kn=(0,c.j)("theming","shortcutsDisabled",!1),Qn=(0,c.j)("theming","isUserThemingDisabled"),Jn={name:"UserThemes",components:{ItemPreview:et,NcCheckboxRadioSwitch:s.Z,NcSettingsSection:d.Z,BackgroundSettings:$,UserAppMenuSection:Gn},data:function(){return{availableThemes:Wn,enforceTheme:$n,shortcutsDisabled:Kn,isUserThemingDisabled:Qn}},computed:{themes:function(){return this.availableThemes.filter((function(t){return 1===t.type}))},fonts:function(){return this.availableThemes.filter((function(t){return 2===t.type}))},selectedTheme:function(){return this.themes.find((function(t){return!0===t.enabled}))||this.themes[0]},description:function(){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:function(){return'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">'},descriptionDetail:function(){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:function(){return'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">'},designteamLink:function(){return'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'}},watch:{shortcutsDisabled:function(t){this.changeShortcutsDisabled(t)}},methods:{refreshGlobalStyles:function(){qn(document.head.querySelectorAll("link.theme")).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var n=t.cloneNode();n.href=e.toString(),n.onload=function(){return t.remove()},document.head.append(n)}))},updateBackground:function(t){this.background="custom"===t.type||"default"===t.type?t.type:t.value,this.refreshGlobalStyles()},changeTheme:function(t){var e=t.enabled,n=t.id;this.themes.forEach((function(t){t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},changeFont:function(t){var e=t.enabled,n=t.id;this.fonts.forEach((function(t){t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},changeShortcutsDisabled:function(t){return zn(Vn().mark((function e(){return Vn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"});case 3:e.next=7;break;case 5:return e.next=7,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"});case 7:case"end":return e.stop()}}),e)})))()},updateBodyAttributes:function(){var t=this.themes.filter((function(t){return!0===t.enabled})).map((function(t){return t.id})),e=this.fonts.filter((function(t){return!0===t.enabled})).map((function(t){return t.id}));this.themes.forEach((function(t){document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),this.fonts.forEach((function(t){document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),document.body.setAttribute("data-themes",[].concat(qn(t),qn(e)).join(","))},selectItem:function(e,n){return zn(Vn().mark((function r(){return Vn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!e){r.next=6;break}return r.next=4,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:n}),method:"PUT"});case 4:r.next=8;break;case 6:return r.next=8,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}",{themeId:n}),method:"DELETE"});case 8:r.next=14;break;case 10:r.prev=10,r.t0=r.catch(0),Zn.error(r.t0,r.t0.response),OC.Notification.showTemporary(t("theming",r.t0.response.data.ocs.meta.message+". Unable to apply the setting."));case 14:case"end":return r.stop()}}),r,null,[[0,10]])})))()}}},tr=r(67053),er={};er.styleTagTransform=q(),er.setAttributes=H(),er.insert=G().bind(null,"head"),er.domAPI=R(),er.insertStyleElement=Y(),B()(tr.Z,er),tr.Z&&tr.Z.locals&&tr.Z.locals;var nr=(0,w.Z)(Jn,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{staticClass:"theming",attrs:{name:t.t("theming","Appearance and accessibility"),"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(n){return e("ItemPreview",{key:n.id,attrs:{enforced:n.id===t.enforceTheme,selected:t.selectedTheme.id===n.id,theme:n,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(n){return e("ItemPreview",{key:n.id,attrs:{selected:n.enabled,theme:n,unique:1===t.fonts.length,type:"font"},on:{change:t.changeFont}})})),1)]),t._v(" "),e("NcSettingsSection",{staticClass:"background",attrs:{name:t.t("theming","Background"),"data-user-theming-background-disabled":""}},[t.isUserThemingDisabled?[e("p",[t._v(t._s(t.t("theming","Customization has been disabled by your administrator")))])]:[e("p",[t._v(t._s(t.t("theming","Set a custom background")))]),t._v(" "),e("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":t.refreshGlobalStyles}})]],2),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Keyboard shortcuts")}},[e("p",[t._v(t._s(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.")))]),t._v(" "),e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.shortcutsDisabled,name:"shortcuts_disabled",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,"552ffff3",null).exports;r.nc=btoa((0,o.IH)()),i.default.prototype.OC=OC,i.default.prototype.t=t;var rr=new(i.default.extend(nr));rr.$mount("#theming"),rr.$on("update:background",(function(){var t;(t=document.head.querySelectorAll("link.theme"),function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var n=t.cloneNode();n.href=e.toString(),n.onload=function(){return t.remove()},document.head.append(n)}))}))},67053:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".theming p[data-v-552ffff3]{max-width:800px}.theming[data-v-552ffff3] a{font-weight:bold}.theming[data-v-552ffff3] a:hover,.theming[data-v-552ffff3] a:focus{text-decoration:underline}.theming__preview-list[data-v-552ffff3]{--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-552ffff3]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-552ffff3]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserThemes.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:""}]),e.Z=a},78741:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".order-selector[data-v-df3bf8da]{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:""}]),e.Z=a},77004:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.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:""}]),e.Z=a},53767:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".background-selector[data-v-27ef6e15]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background[data-v-27ef6e15]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker.background--active[data-v-27ef6e15]{color:#fff;background-image:var(--image-background)}.background-selector .background__default[data-v-27ef6e15]{background-color:var(--color-primary-default);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--image-background-plain, var(--image-background-default))}.background-selector .background__filepicker[data-v-27ef6e15],.background-selector .background__default[data-v-27ef6e15],.background-selector .background__color[data-v-27ef6e15]{border-color:var(--color-border)}.background-selector .background__color[data-v-27ef6e15]{color:var(--color-primary-text);background-color:var(--color-primary-default)}.background-selector .background__default[data-v-27ef6e15],.background-selector .background__shipped[data-v-27ef6e15]{color:#fff}.background-selector .background[data-color-bright][data-v-27ef6e15]{color:#000}.background-selector .background--active[data-v-27ef6e15],.background-selector .background[data-v-27ef6e15]:hover,.background-selector .background[data-v-27ef6e15]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-27ef6e15]{margin:4px}.background-selector .background .check-icon[data-v-27ef6e15]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-27ef6e15]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAGC,iFACC,UAAA,CACA,wCAAA,CAIF,2DACC,6CAAA,CACA,wJAAA,CAGD,kLACC,gCAAA,CAGD,yDACC,+BAAA,CACA,6CAAA,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 {\n\t\toverflow: hidden;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\ttext-align: center;\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\t&.background--active {\n\t\t\t\tcolor: white;\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-primary-default);\n\t\t\tbackground-image: linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)), var(--image-background-plain, var(--image-background-default));\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&__color {\n\t\t\tcolor: var(--color-primary-text);\n\t\t\tbackground-color: var(--color-primary-default);\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:""}]),e.Z=a},22465:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.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:""}]),e.Z=a},1563:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".user-app-menu-order[data-v-0b68cf15]{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:""}]),e.Z=a},89881:function(t,e,n){var r=n(47816),o=n(99291)(r);t.exports=o},80760:function(t,e,n){var r=n(89881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}},47816:function(t,e,n){var r=n(28483),o=n(3674);t.exports=function(t,e){return t&&r(t,e,o)}},99291:function(t,e,n){var r=n(98612);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,l=Object(n);(e?a--:++a<i)&&!1!==o(l[a],a,l););return n}}},91747:function(t,e,n){var r=n(5976),o=n(77813),i=n(16612),a=n(81704),l=Object.prototype,c=l.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&i(e[0],e[1],u)&&(r=1);++n<r;)for(var s=e[n],d=a(s),f=-1,h=d.length;++f<h;){var p=d[f],g=t[p];(void 0===g||o(g,l[p])&&!c.call(t,p))&&(t[p]=s[p])}return t}));t.exports=u},63105:function(t,e,n){var r=n(34963),o=n(80760),i=n(67206),a=n(1469);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},1082:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=r(n(8110)),i=r(n(21904));o.default.DefaultOpts.ImageClass=i.default,t.exports=o.default},31564:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(8110)),i=n(66678),a=function(){function t(t,e){void 0===e&&(e={}),this._src=t,this._opts=e,this._opts.filters=i(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=a},97248:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var r=n(67294),o=n(63105),i=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 n=t.r,r=t.g,o=t.b;return e(n,r,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],n=t[1],o=t[2];this._hsl=r.rgbToHsl(e,n,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],n=t[1],o=t[2];this._hex=r.rgbToHex(e,n,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=i},68498:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return r>=125&&!(t>250&&e>250&&n>250)}},63096:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var r=n(68498);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}}),e.combineFilters=function(t){return Array.isArray(t)&&0!==t.length?function(e,n,r,o){if(0===o)return!1;for(var i=0;i<t.length;i++)if(!t[i](e,n,r,o))return!1;return!0}:null}},73977:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97248),o=n(67294),i=n(91747),a={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,n,r,o,i,a,l,c,u){var s=null,d=0;return e.forEach((function(e){var f=e.getHsl(),h=f[1],p=f[2];if(h>=l&&h<=c&&p>=o&&p<=i&&!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,n,r,o,i,a){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 n=0,r=0,o=0;o<t.length;o+=2){var i=t[o],a=t[o+1];n+=i*a,r+=a}return n/r}(l(t,e),a.weightSaturation,l(n,r),a.weightLuma,o/i,a.weightPopulation)}(h,a,p,r,e.getPopulation(),n,u);(null===s||g>d)&&(s=e,d=g)}})),s}e.default=function(t,e){e=i({},e,a);var n=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),c=function(t,e,n){var r={};return r.Vibrant=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.LightVibrant=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.DarkVibrant=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.Muted=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.LightMuted=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.DarkMuted=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r}(t,n,e);return function(t,e,n){if(null===t.Vibrant&&null===t.DarkVibrant&&null===t.LightVibrant){if(null===t.DarkVibrant&&null!==t.DarkMuted){var i=t.DarkMuted.getHsl(),a=i[0],l=i[1],c=i[2];c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var u=t.LightMuted.getHsl();a=u[0],l=u[1],c=u[2],c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var s=t.DarkVibrant.getHsl();a=s[0],l=s[1],c=s[2],c=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();a=d[0],l=d[1],c=d[2],c=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var f=t.Vibrant.getHsl();a=f[0],l=f[1],c=f[2],c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();a=h[0],l=h[1],c=h[2],c=n.targetLightLuma,t.LightVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.Muted&&null!==t.Vibrant){var p=t.Vibrant.getHsl();a=p[0],l=p[1],c=p[2],c=n.targetMutesSaturation,t.Muted=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var g=t.DarkVibrant.getHsl();a=g[0],l=g[1],c=g[2],c=n.targetMutesSaturation,t.DarkMuted=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var v=t.LightVibrant.getHsl();a=v[0],l=v[1],c=v[2],c=n.targetMutesSaturation,t.LightMuted=new r.Swatch(o.hslToRgb(a,l,c),0)}}(c,0,e),c}},77234:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(73977);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}})},83614:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageBase=void 0;var n=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),n=this.getHeight(),r=1;if(t.maxDimension>0){var o=Math.max(e,n);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,n*r,r)},t.prototype.applyFilter=function(t){var e=this.getImageData();if("function"==typeof t)for(var n=e.data,r=n.length/4,o=void 0,i=0;i<r;i++)t(n[0+(o=4*i)],n[o+1],n[o+2],n[o+3])||(n[o+3]=0);return Promise.resolve(e)},t}();e.ImageBase=n},21904:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=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 n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var c=n(83614),u=l(n(8575)),s=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"),n=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,n.drawImage(t,0,0),document.body.appendChild(e)},e.prototype.load=function(t){var e,n,r,o,i,a,l=this,c=null,s=null;if("string"==typeof t)c=document.createElement("img"),i=t,null===(a=u.parse(i)).protocol&&null===a.host&&null===a.port||(e=window.location.href,n=t,r=u.parse(e),o=u.parse(n),r.protocol===o.protocol&&r.hostname===o.hostname&&r.port===o.port)||(c.crossOrigin="anonymous"),s=c.src=t;else{if(!(t instanceof HTMLImageElement))return Promise.reject(new Error("Cannot load buffer as an image in browser"));c=t,s=t.src}return this.image=c,new Promise((function(t,e){var n=function(){l._initCanvas(),t(l)};c.complete?n():(c.onload=n,c.onerror=function(t){return e(new Error("Fail to load image: "+s))})}))},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,n){var r=this,o=r._canvas,i=r._context,a=r.image;this._width=o.width=t,this._height=o.height=e,i.scale(n,n),i.drawImage(a,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}(c.ImageBase);e.default=s},14853:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorker=void 0;var r=n(20628);Object.defineProperty(e,"MMCQ",{enumerable:!0,get:function(){return r.default}}),e.WebWorker=null},20628:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(97248),i=r(n(5828)),a=r(n(37514));function l(t,e){for(var n=t.size();t.size()<e;){var r=t.pop();if(!(r&&r.count()>0))break;var o=r.split(),i=o[0],a=o[1];if(t.push(i),a&&a.count()>0&&t.push(a),t.size()===n)break;n=t.size()}}e.default=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");var n=i.default.build(t),r=n.hist,c=(Object.keys(r).length,new a.default((function(t,e){return t.count()-e.count()})));c.push(n),l(c,.75*e.colorCount);var u=new a.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return u.contents=c.contents,l(u,e.colorCount-u.size()),function(t){for(var e=[];t.size();){var n=t.pop(),r=n.avg();r[0],r[1],r[2],e.push(new o.Swatch(r,n.count()))}return e}(u)}},37514:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=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=n},5828:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(67294),o=function(){function t(t,e,n,r,o,i,a){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:n,g2:r,b1:o,b2:i},this.hist=a}return t.build=function(e,n){var o,i,a,l,c,u,s,d,f,h=1<<3*r.SIGBITS,p=new Uint32Array(h);o=a=c=0,i=l=u=Number.MAX_VALUE;for(var g=e.length/4,v=0;v<g;){var m=4*v;v++,s=e[m+0],d=e[m+1],f=e[m+2],0!==e[m+3]&&(s>>=r.RSHIFT,d>>=r.RSHIFT,f>>=r.RSHIFT,p[r.getColorIndex(s,d,f)]+=1,s>o&&(o=s),s<i&&(i=s),d>a&&(a=d),d<l&&(l=d),f>c&&(c=f),f<u&&(u=f))}return new t(i,o,l,a,u,c,p)},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,n=t.r2,r=t.g1,o=t.g2,i=t.b1,a=t.b2;this._volume=(n-e+1)*(o-r+1)*(a-i+1)}return this._volume},t.prototype.count=function(){if(this._count<0){for(var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,a=e.g2,l=e.b1,c=e.b2,u=0,s=n;s<=o;s++)for(var d=i;d<=a;d++)for(var f=l;f<=c;f++)u+=t[r.getColorIndex(s,d,f)];this._count=u}return this._count},t.prototype.clone=function(){var e=this.hist,n=this.dimension;return new t(n.r1,n.r2,n.g1,n.g2,n.b1,n.b2,e)},t.prototype.avg=function(){if(!this._avg){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,a=e.g2,l=e.b1,c=e.b2,u=0,s=1<<8-r.SIGBITS,d=void 0,f=void 0,h=void 0;d=f=h=0;for(var p=n;p<=o;p++)for(var g=i;g<=a;g++)for(var v=l;v<=c;v++){var m=t[r.getColorIndex(p,g,v)];u+=m,d+=m*(p+.5)*s,f+=m*(g+.5)*s,h+=m*(v+.5)*s}this._avg=u?[~~(d/u),~~(f/u),~~(h/u)]:[~~(s*(n+o+1)/2),~~(s*(i+a+1)/2),~~(s*(l+c+1)/2)]}return this._avg},t.prototype.contains=function(t){var e=t[0],n=t[1],o=t[2],i=this.dimension,a=i.r1,l=i.r2,c=i.g1,u=i.g2,s=i.b1,d=i.b2;return e>>=r.RSHIFT,n>>=r.RSHIFT,o>>=r.RSHIFT,e>=a&&e<=l&&n>=c&&n<=u&&o>=s&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,a=e.g2,l=e.b1,c=e.b2,u=this.count();if(!u)return[];if(1===u)return[this.clone()];var s,d,f=o-n+1,h=a-i+1,p=c-l+1,g=Math.max(f,h,p),v=null;s=d=0;var m=null;if(g===f){m="r",v=new Uint32Array(o+1);for(var b=n;b<=o;b++){s=0;for(var y=i;y<=a;y++)for(var A=l;A<=c;A++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[b]=d}}else if(g===h)for(m="g",v=new Uint32Array(a+1),y=i;y<=a;y++){for(s=0,b=n;b<=o;b++)for(A=l;A<=c;A++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[y]=d}else for(m="b",v=new Uint32Array(c+1),A=l;A<=c;A++){for(s=0,b=n;b<=o;b++)for(y=i;y<=a;y++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[A]=d}for(var w=-1,_=new Uint32Array(v.length),C=0;C<v.length;C++){var x=v[C];w<0&&x>d/2&&(w=C),_[C]=d-x}var k=this;return function(t){var e=t+"1",n=t+"2",r=k.dimension[e],o=k.dimension[n],i=k.clone(),a=k.clone(),l=w-r,c=o-w;for(l<=c?(o=Math.min(o-1,~~(w+c/2)),o=Math.max(0,o)):(o=Math.max(r,~~(w-1-l/2)),o=Math.min(k.dimension[n],o));!v[o];)o++;for(var u=_[o];!u&&v[o-1];)u=_[--o];return i.dimension[n]=o,a.dimension[e]=o+1,[i,a]}(m)},t}();e.default=o},67294:function(t,e){"use strict";function n(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 r(t,e,n){return e/=255,n/=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,n=n>.04045?Math.pow((n+.005)/1.055,2.4):n/12.92,[.4124*(t*=100)+.3576*(e*=100)+.1805*(n*=100),.2126*t+.7152*e+.0722*n,.0193*t+.1192*e+.9505*n]}function o(t,e,n){return e/=100,n/=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-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function i(t,e,n){var i=r(t,e,n);return o(i[0],i[1],i[2])}function a(t,e){var n=t[0],r=t[1],o=t[2],i=e[0],a=e[1],l=e[2],c=n-i,u=r-a,s=o-l,d=Math.sqrt(r*r+o*o),f=i-n,h=Math.sqrt(a*a+l*l)-d,p=Math.sqrt(c*c+u*u+s*s),g=Math.sqrt(p)>Math.sqrt(Math.abs(f))+Math.sqrt(Math.abs(h))?Math.sqrt(p*p-f*f-h*h):0;return f/=1,h/=1*(1+.045*d),g/=1*(1+.015*d),Math.sqrt(f*f+h*h+g*g)}function l(t,e){return a(i.apply(void 0,t),i.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,n=new Promise((function(n,r){t=n,e=r}));return{resolve:t,reject:e,promise:n}},e.hexToRgb=n,e.rgbToHex=function(t,e,n){return"#"+((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1,7)},e.rgbToHsl=function(t,e,n){t/=255,e/=255,n/=255;var r,o,i=Math.max(t,e,n),a=Math.min(t,e,n),l=(i+a)/2;if(i===a)r=o=0;else{var c=i-a;switch(o=l>.5?c/(2-i-a):c/(i+a),i){case t:r=(e-n)/c+(e<n?6:0);break;case e:r=(n-t)/c+2;break;case n:r=(t-e)/c+4}r/=6}return[r,o,l]},e.hslToRgb=function(t,e,n){var r,o,i;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0===e)r=o=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,c=2*n-l;r=a(c,l,t+1/3),o=a(c,l,t),i=a(c,l,t-1/3)}return[255*r,255*o,255*i]},e.rgbToXyz=r,e.xyzToCIELab=o,e.rgbToCIELab=i,e.deltaE94=a,e.rgbDiff=l,e.hexDiff=function(t,e){return l(n(t),n(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,n,r){return(t<<2*e.SIGBITS)+(n<<e.SIGBITS)+r}},8110:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(97248),c=a(n(31564)),u=i(n(67294)),s=i(n(14853)),d=i(n(77234)),f=i(n(63096)),h=n(91747),p=function(){function t(e,n){this._src=e,this.opts=h({},n,t.DefaultOpts),this.opts.combinedFilter=f.combineFilters(this.opts.filters)}return t.from=function(t){return new c.default(t)},t.prototype._process=function(t,e){var n=e.quantizer,r=e.generator;return t.scaleDown(e),t.applyFilter(e.combinedFilter).then((function(t){return n(t.data,e)})).then((function(t){return l.Swatch.applyFilter(t,e.combinedFilter)})).then((function(t){return Promise.resolve(r(t))}))},t.prototype.palette=function(){return this.swatches()},t.prototype.swatches=function(){return this._palette},t.prototype.getPalette=function(t){var e=this,n=new this.opts.ImageClass,r=n.load(this._src).then((function(t){return e._process(t,e.opts)})).then((function(t){return e._palette=t,n.remove(),t}),(function(t){throw n.remove(),t}));return t&&r.then((function(e){return t(null,e)}),(function(e){return t(e)})),r},t.Builder=c.default,t.Quantizer=s,t.Generator=d,t.Filter=f,t.Util=u,t.Swatch=l.Swatch,t.DefaultOpts={colorCount:64,quality:5,generator:d.Default,ImageClass:null,quantizer:s.MMCQ,filters:[f.Default]},t}();e.default=p},24654:function(){}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return o[t].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=function(t,n,r,o){if(!n){var i=1/0;for(s=0;s<e.length;s++){n=e[s][0],r=e[s][1],o=e[s][2];for(var l=!0,c=0;c<n.length;c++)(!1&o||i>=o)&&Object.keys(a.O).every((function(t){return a.O[t](n[c])}))?n.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(s--,1);var u=r();void 0!==u&&(t=u)}}return t}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,r,o]},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce((function(e,n){return a.f[n](t,e),e}),[]))},a.u=function(t){return t+"-"+t+".js?v="+{2250:"34f75a254de23027f023",7608:"e10b56a26e98ac647fb2"}[t]},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},r="nextcloud:",a.l=function(t,e,o,i){if(n[t])n[t].push(e);else{var l,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var d=u[s];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+o){l=d;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+o),l.src=t),n[t]=[e];var f=function(e,r){l.onerror=l.onload=null,clearTimeout(h);var o=n[t];if(delete n[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((function(t){return t(r)})),e)return e(r)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),c&&document.head.appendChild(l)}},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},a.j=1474,function(){var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!t;)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t}(),function(){a.b=document.baseURI||self.location.href;var t={1474:0};a.f.j=function(e,n){var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=t[e]=[n,o]}));n.push(r[2]=o);var i=a.p+a.u(e),l=new Error;a.l(i,(function(n){if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+e,e)}},a.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,o,i=n[0],l=n[1],c=n[2],u=0;if(i.some((function(e){return 0!==t[e]}))){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);if(c)var s=c(a)}for(e&&e(n);u<i.length;u++)o=i[u],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(s)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),a.nc=void 0;var l=a.O(void 0,[7874],(function(){return a(45112)}));l=a.O(l)}();
- //# sourceMappingURL=theming-personal-theming.js.map?v=9f760c26021ed57ac5ea
|