framework7
Version:
Full featured mobile HTML framework for building iOS & Android apps
13 lines (12 loc) • 738 kB
JavaScript
/**
* Framework7 8.1.0
* Full featured mobile HTML framework for building iOS & Android apps
* https://framework7.io/
*
* Copyright 2014-2023 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: June 12, 2023
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Framework7=t()}(this,(function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(a,r){void 0===a&&(a={}),void 0===r&&(r={}),Object.keys(r).forEach((s=>{void 0===a[s]?a[s]=r[s]:e(r[s])&&e(a[s])&&Object.keys(r[s]).length>0&&t(a[s],r[s])}))}const a={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){const e="undefined"!=typeof document?document:{};return t(e,a),e}const s={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){const e="undefined"!=typeof window?window:{};return t(e,s),e}class n extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function i(e){void 0===e&&(e=[]);const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...i(e)):t.push(e)})),t}function l(e,t){return Array.prototype.filter.call(e,t)}function c(e,t){const a=o(),s=r();let i=[];if(!t&&e instanceof n)return e;if(!e)return new n(i);if("string"==typeof e){const a=e.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){let e="div";0===a.indexOf("<li")&&(e="ul"),0===a.indexOf("<tr")&&(e="tbody"),0!==a.indexOf("<td")&&0!==a.indexOf("<th")||(e="tr"),0===a.indexOf("<tbody")&&(e="table"),0===a.indexOf("<option")&&(e="select");const t=s.createElement(e);t.innerHTML=a;for(let e=0;e<t.childNodes.length;e+=1)i.push(t.childNodes[e])}else i=function(e,t){if("string"!=typeof e)return[e];const a=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)a.push(r[e]);return a}(e.trim(),t||s)}else if(e.nodeType||e===a||e===s)i.push(e);else if(Array.isArray(e)){if(e instanceof n)return e;i=e}return new n(function(e){const t=[];for(let a=0;a<e.length;a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}(i))}c.fn=n.prototype;const p="resize scroll".split(" ");function d(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];if(void 0===a[0]){for(let t=0;t<this.length;t+=1)p.indexOf(e)<0&&(e in this[t]?this[t][e]():c(this[t]).trigger(e));return this}return this.on(e,...a)}}const u=d("click"),h=d("blur"),m=d("focus"),f=d("focusin"),g=d("focusout"),v=d("keyup"),b=d("keydown"),w=d("keypress"),y=d("submit"),E=d("change"),C=d("mousedown"),$=d("mousemove"),x=d("mouseup"),k=d("mouseenter"),T=d("mouseleave"),S=d("mouseout"),M=d("mouseover"),P=d("touchstart"),A=d("touchend"),O=d("touchmove"),I=d("resize"),B=d("scroll");var L=Object.freeze({__proto__:null,$:c,add:function(){const e=this;let t,a;for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];for(t=0;t<s.length;t+=1){const r=c(s[t]);for(a=0;a<r.length;a+=1)e.push(r[a])}return e},addClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];const r=i(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.add(...r)})),this},animate:function(e,t){const a=o(),r=this,s={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:r,animating:!1,que:[],easingProgress:(e,t)=>"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t,stop(){s.frameId&&a.cancelAnimationFrame(s.frameId),s.animating=!1,s.elements.each((e=>{delete e.dom7AnimateInstance})),s.que=[]},done(e){if(s.animating=!1,s.elements.each((e=>{delete e.dom7AnimateInstance})),e&&e(r),s.que.length>0){const e=s.que.shift();s.animate(e[0],e[1])}},animate(e,t){if(s.animating)return s.que.push([e,t]),s;const o=[];s.elements.each(((t,r)=>{let n,i,l,c,p;t.dom7AnimateInstance||(s.elements[r].dom7AnimateInstance=s),o[r]={container:t},Object.keys(e).forEach((s=>{n=a.getComputedStyle(t,null).getPropertyValue(s).replace(",","."),i=parseFloat(n),l=n.replace(i,""),c=parseFloat(e[s]),p=e[s]+l,o[r][s]={initialFullValue:n,initialValue:i,unit:l,finalValue:c,finalFullValue:p,currentValue:i}}))}));let n,i,l=null,c=0,p=0,d=!1;return s.animating=!0,s.frameId=a.requestAnimationFrame((function u(){let h,m;n=(new Date).getTime(),d||(d=!0,t.begin&&t.begin(r)),null===l&&(l=n),t.progress&&t.progress(r,Math.max(Math.min((n-l)/t.duration,1),0),l+t.duration-n<0?0:l+t.duration-n,l),o.forEach((a=>{const r=a;i||r.done||Object.keys(e).forEach((a=>{if(i||r.done)return;h=Math.max(Math.min((n-l)/t.duration,1),0),m=s.easingProgress(t.easing,h);const{initialValue:d,finalValue:u,unit:f}=r[a];r[a].currentValue=d+m*(u-d);const g=r[a].currentValue;(u>d&&g>=u||u<d&&g<=u)&&(r.container.style[a]=u+f,p+=1,p===Object.keys(e).length&&(r.done=!0,c+=1),c===o.length&&(i=!0)),i?s.done(t.complete):r.container.style[a]=g+f}))})),i||(s.frameId=a.requestAnimationFrame(u))})),s}};if(0===s.elements.length)return r;let n;for(let e=0;e<s.elements.length;e+=1)s.elements[e].dom7AnimateInstance?n=s.elements[e].dom7AnimateInstance:s.elements[e].dom7AnimateInstance=s;return n||(n=s),"stop"===e?n.stop():n.animate(s.props,s.params),r},animationEnd:function(e){const t=this;return e&&t.on("animationend",(function a(r){r.target===this&&(e.call(this,r),t.off("animationend",a))})),this},append:function(){let e;const t=r();for(let a=0;a<arguments.length;a+=1){e=a<0||arguments.length<=a?void 0:arguments[a];for(let a=0;a<this.length;a+=1)if("string"==typeof e){const r=t.createElement("div");for(r.innerHTML=e;r.firstChild;)this[a].appendChild(r.firstChild)}else if(e instanceof n)for(let t=0;t<e.length;t+=1)this[a].appendChild(e[t]);else this[a].appendChild(e)}return this},appendTo:function(e){return c(e).append(this),this},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let a=0;a<this.length;a+=1)if(2===arguments.length)this[a].setAttribute(e,t);else for(const t in e)this[a][t]=e[t],this[a].setAttribute(t,e[t]);return this},blur:h,change:E,children:function(e){const t=[];for(let a=0;a<this.length;a+=1){const r=this[a].children;for(let a=0;a<r.length;a+=1)e&&!c(r[a]).is(e)||t.push(r[a])}return c(t)},click:u,closest:function(e){let t=this;return void 0===e?c([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},css:function(e,t){const a=o();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return a.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this},data:function(e,t){let a;if(void 0===t){if(a=this[0],!a)return;if(a.dom7ElementDataStorage&&e in a.dom7ElementDataStorage)return a.dom7ElementDataStorage[e];const t=a.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)a=this[r],a.dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this},dataset:function(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const a in e.dataset)t[a]=e.dataset[a];else for(let r=0;r<e.attributes.length;r+=1){const s=e.attributes[r];s.name.indexOf("data-")>=0&&(t[(a=s.name.split("data-")[1],a.toLowerCase().replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=s.value)}var a;for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t},default:c,detach:function(){return this.remove()},each:function(e){return e?(this.forEach(((t,a)=>{e.apply(t,[t,a])})),this):this},empty:function(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this},eq:function(e){if(void 0===e)return this;const t=this.length;if(e>t-1)return c([]);if(e<0){const a=t+e;return c(a<0?[]:[this[a]])}return c([this[e]])},filter:function(e){return c(l(this,e))},find:function(e){const t=[];for(let a=0;a<this.length;a+=1){const r=this[a].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return c(t)},focus:m,focusin:f,focusout:g,hasClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];const r=i(t.map((e=>e.split(" "))));return l(this,(e=>r.filter((t=>e.classList.contains(t))).length>0)).length>0},height:function(){const e=o();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null},hide:function(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},insertAfter:function(e){const t=c(e);for(let e=0;e<this.length;e+=1)if(1===t.length)t[0].parentNode.insertBefore(this[e],t[0].nextSibling);else if(t.length>1)for(let a=0;a<t.length;a+=1)t[a].parentNode.insertBefore(this[e].cloneNode(!0),t[a].nextSibling)},insertBefore:function(e){const t=c(e);for(let e=0;e<this.length;e+=1)if(1===t.length)t[0].parentNode.insertBefore(this[e],t[0]);else if(t.length>1)for(let a=0;a<t.length;a+=1)t[a].parentNode.insertBefore(this[e].cloneNode(!0),t[a])},is:function(e){const t=o(),a=r(),s=this[0];let i,l;if(!s||void 0===e)return!1;if("string"==typeof e){if(s.matches)return s.matches(e);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(e);if(s.msMatchesSelector)return s.msMatchesSelector(e);for(i=c(e),l=0;l<i.length;l+=1)if(i[l]===s)return!0;return!1}if(e===a)return s===a;if(e===t)return s===t;if(e.nodeType||e instanceof n){for(i=e.nodeType?[e]:e,l=0;l<i.length;l+=1)if(i[l]===s)return!0;return!1}return!1},keydown:b,keypress:w,keyup:v,mousedown:C,mouseenter:k,mouseleave:T,mousemove:$,mouseout:S,mouseover:M,mouseup:x,next:function(e){return this.length>0?e?this[0].nextElementSibling&&c(this[0].nextElementSibling).is(e)?c([this[0].nextElementSibling]):c([]):this[0].nextElementSibling?c([this[0].nextElementSibling]):c([]):c([])},nextAll:function(e){const t=[];let a=this[0];if(!a)return c([]);for(;a.nextElementSibling;){const r=a.nextElementSibling;e?c(r).is(e)&&t.push(r):t.push(r),a=r}return c(t)},off:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];let[r,s,o,n]=t;"function"==typeof t[1]&&([r,o,n]=t,s=void 0),n||(n=!1);const i=r.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const a=this[e];let r;if(!s&&a.dom7Listeners?r=a.dom7Listeners[t]:s&&a.dom7LiveListeners&&(r=a.dom7LiveListeners[t]),r&&r.length)for(let e=r.length-1;e>=0;e-=1){const s=r[e];o&&s.listener===o||o&&s.listener&&s.listener.dom7proxy&&s.listener.dom7proxy===o?(a.removeEventListener(t,s.proxyListener,n),r.splice(e,1)):o||(a.removeEventListener(t,s.proxyListener,n),r.splice(e,1))}}}return this},offset:function(){if(this.length>0){const e=o(),t=r(),a=this[0],s=a.getBoundingClientRect(),n=t.body,i=a.clientTop||n.clientTop||0,l=a.clientLeft||n.clientLeft||0,c=a===e?e.scrollY:a.scrollTop,p=a===e?e.scrollX:a.scrollLeft;return{top:s.top+c-i,left:s.left+p-l}}return null},on:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];let[r,s,o,n]=t;function i(e){const t=e.target;if(!t)return;const a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),c(t).is(s))o.apply(t,a);else{const e=c(t).parents();for(let t=0;t<e.length;t+=1)c(e[t]).is(s)&&o.apply(e[t],a)}}function l(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),o.apply(this,t)}"function"==typeof t[1]&&([r,o,n]=t,s=void 0),n||(n=!1);const p=r.split(" ");let d;for(let e=0;e<this.length;e+=1){const t=this[e];if(s)for(d=0;d<p.length;d+=1){const e=p[d];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:o,proxyListener:i}),t.addEventListener(e,i,n)}else for(d=0;d<p.length;d+=1){const e=p[d];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:o,proxyListener:l}),t.addEventListener(e,l,n)}}return this},once:function(){const e=this;for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];let[s,o,n,i]=a;function l(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];n.apply(this,a),e.off(s,o,l,i),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof a[1]&&([s,n,i]=a,o=void 0),l.dom7proxy=n,e.on(s,o,l,i)},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},parent:function(e){const t=[];for(let a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?c(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return c(t)},parents:function(e){const t=[];for(let a=0;a<this.length;a+=1){let r=this[a].parentNode;for(;r;)e?c(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return c(t)},prepend:function(e){const t=r();let a,s;for(a=0;a<this.length;a+=1)if("string"==typeof e){const r=t.createElement("div");for(r.innerHTML=e,s=r.childNodes.length-1;s>=0;s-=1)this[a].insertBefore(r.childNodes[s],this[a].childNodes[0])}else if(e instanceof n)for(s=0;s<e.length;s+=1)this[a].insertBefore(e[s],this[a].childNodes[0]);else this[a].insertBefore(e,this[a].childNodes[0]);return this},prependTo:function(e){return c(e).prepend(this),this},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&c(t.previousElementSibling).is(e)?c([t.previousElementSibling]):c([]):t.previousElementSibling?c([t.previousElementSibling]):c([])}return c([])},prevAll:function(e){const t=[];let a=this[0];if(!a)return c([]);for(;a.previousElementSibling;){const r=a.previousElementSibling;e?c(r).is(e)&&t.push(r):t.push(r),a=r}return c(t)},prop:function(e,t){if(1!==arguments.length||"string"!=typeof e){for(let a=0;a<this.length;a+=1)if(2===arguments.length)this[a][e]=t;else for(const t in e)this[a][t]=e[t];return this}return this[0]?this[0][e]:this},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},removeClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];const r=i(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...r)})),this},removeData:function(e){for(let t=0;t<this.length;t+=1){const a=this[t];a.dom7ElementDataStorage&&a.dom7ElementDataStorage[e]&&(a.dom7ElementDataStorage[e]=null,delete a.dom7ElementDataStorage[e])}},resize:I,scroll:B,scrollLeft:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];let[r,s,o,n]=t;3===t.length&&"function"==typeof o&&([r,s,n,o]=t);const i=this;return void 0===r?i.length>0?i[0].scrollLeft:null:i.scrollTo(r,void 0,s,o,n)},scrollTo:function(){const e=o();for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];let[s,n,i,l,c]=a;return 4===a.length&&"function"==typeof l&&(c=l,[s,n,i,c,l]=a),void 0===l&&(l="swing"),this.each((function(){const t=this;let a,r,o,p,d,u,h,m,f=n>0||0===n,g=s>0||0===s;if(void 0===l&&(l="swing"),f&&(a=t.scrollTop,i||(t.scrollTop=n)),g&&(r=t.scrollLeft,i||(t.scrollLeft=s)),!i)return;f&&(o=t.scrollHeight-t.offsetHeight,d=Math.max(Math.min(n,o),0)),g&&(p=t.scrollWidth-t.offsetWidth,u=Math.max(Math.min(s,p),0));let v=null;f&&d===a&&(f=!1),g&&u===r&&(g=!1),e.requestAnimationFrame((function s(o){void 0===o&&(o=(new Date).getTime()),null===v&&(v=o);const n=Math.max(Math.min((o-v)/i,1),0),p="linear"===l?n:.5-Math.cos(n*Math.PI)/2;let b;f&&(h=a+p*(d-a)),g&&(m=r+p*(u-r)),f&&d>a&&h>=d&&(t.scrollTop=d,b=!0),f&&d<a&&h<=d&&(t.scrollTop=d,b=!0),g&&u>r&&m>=u&&(t.scrollLeft=u,b=!0),g&&u<r&&m<=u&&(t.scrollLeft=u,b=!0),b?c&&c():(f&&(t.scrollTop=h),g&&(t.scrollLeft=m),e.requestAnimationFrame(s))}))}))},scrollTop:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];let[r,s,o,n]=t;3===t.length&&"function"==typeof o&&([r,s,n,o]=t);const i=this;return void 0===r?i.length>0?i[0].scrollTop:null:i.scrollTo(void 0,r,s,o,n)},show:function(){const e=o();for(let t=0;t<this.length;t+=1){const a=this[t];"none"===a.style.display&&(a.style.display=""),"none"===e.getComputedStyle(a,null).getPropertyValue("display")&&(a.style.display="block")}return this},siblings:function(e){return this.nextAll(e).add(this.prevAll(e))},stop:function(){const e=this;for(let t=0;t<e.length;t+=1)e[t].dom7AnimateInstance&&e[t].dom7AnimateInstance.stop()},styles:function(){const e=o();return this[0]?e.getComputedStyle(this[0],null):{}},submit:y,text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},toggleClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];const r=i(t.map((e=>e.split(" "))));this.forEach((e=>{r.forEach((t=>{e.classList.toggle(t)}))}))},touchend:A,touchmove:O,touchstart:P,transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?`${e}ms`:e;return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",(function a(r){r.target===this&&(e.call(this,r),t.off("transitionend",a))})),this},transitionStart:function(e){const t=this;return e&&t.on("transitionstart",(function a(r){r.target===this&&(e.call(this,r),t.off("transitionstart",a))})),this},trigger:function(){const e=o();for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];const s=a[0].split(" "),n=a[1];for(let t=0;t<s.length;t+=1){const r=s[t];for(let t=0;t<this.length;t+=1){const s=this[t];if(e.CustomEvent){const t=new e.CustomEvent(r,{detail:n,bubbles:!0,cancelable:!0});s.dom7EventData=a.filter(((e,t)=>t>0)),s.dispatchEvent(t),s.dom7EventData=[],delete s.dom7EventData}}}return this},val:function(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let a=0;a<e.selectedOptions.length;a+=1)t.push(e.selectedOptions[a].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const a=this[t];if(Array.isArray(e)&&a.multiple&&"select"===a.nodeName.toLowerCase())for(let t=0;t<a.options.length;t+=1)a.options[t].selected=e.indexOf(a.options[t].value)>=0;else a.value=e}return this},value:function(e){return this.val(e)},width:function(){const e=o();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}});Object.keys(L).forEach((e=>{"$"!==e&&(c.fn[e]=L[e])}));var R=c;function D(e){return e<0?-1:0===e?0:1}function z(e,t,a){return(1-a)*e+a*t}function H(e){return(e%=360)<0&&(e+=360),e}function N(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}const V=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],F=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],_=[95.047,100,108.883];function q(e,t,a){return(255<<24|(255&e)<<16|(255&t)<<8|255&a)>>>0}function j(e){return q(Q(e[0]),Q(e[1]),Q(e[2]))}function Y(e){return e>>16&255}function W(e){return e>>8&255}function X(e){return 255&e}function G(e){return 116*function(e){return e>216/24389?Math.pow(e,1/3):(903.2962962962963*e+16)/116}(function(e){return N([K(Y(e)),K(W(e)),K(X(e))],V)}(e)[1]/100)-16}function U(e){return 100*function(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/903.2962962962963}((e+16)/116)}function K(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function Q(e){const t=e/100;let a=0;return a=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,r=0,s=255,(o=Math.round(255*a))<r?r:o>s?s:o;var r,s,o}class Z{static make(e,t,a,r,s){void 0===e&&(e=_),void 0===t&&(t=200/Math.PI*U(50)/100),void 0===a&&(a=50),void 0===r&&(r=2),void 0===s&&(s=!1);const o=e,n=.401288*o[0]+.650173*o[1]+-.051461*o[2],i=-.250268*o[0]+1.204414*o[1]+.045854*o[2],l=-.002079*o[0]+.048952*o[1]+.953127*o[2],c=.8+r/10,p=c>=.9?z(.59,.69,10*(c-.9)):z(.525,.59,10*(c-.8));let d=s?1:c*(1-1/3.6*Math.exp((-t-42)/92));d=d>1?1:d<0?0:d;const u=c,h=[d*(100/n)+1-d,d*(100/i)+1-d,d*(100/l)+1-d],m=1/(5*t+1),f=m*m*m*m,g=1-f,v=f*t+.1*g*g*Math.cbrt(5*t),b=U(a)/e[1],w=1.48+Math.sqrt(b),y=.725/Math.pow(b,.2),E=y,C=[Math.pow(v*h[0]*n/100,.42),Math.pow(v*h[1]*i/100,.42),Math.pow(v*h[2]*l/100,.42)],$=[400*C[0]/(C[0]+27.13),400*C[1]/(C[1]+27.13),400*C[2]/(C[2]+27.13)];return new Z(b,(2*$[0]+$[1]+.05*$[2])*y,y,E,p,u,h,v,Math.pow(v,.25),w)}constructor(e,t,a,r,s,o,n,i,l,c){this.n=e,this.aw=t,this.nbb=a,this.ncb=r,this.c=s,this.nc=o,this.rgbD=n,this.fl=i,this.fLRoot=l,this.z=c}}Z.DEFAULT=Z.make();class J{constructor(e,t,a,r,s,o,n,i,l){this.hue=e,this.chroma=t,this.j=a,this.q=r,this.m=s,this.s=o,this.jstar=n,this.astar=i,this.bstar=l}distance(e){const t=this.jstar-e.jstar,a=this.astar-e.astar,r=this.bstar-e.bstar,s=Math.sqrt(t*t+a*a+r*r);return 1.41*Math.pow(s,.63)}static fromInt(e){return J.fromIntInViewingConditions(e,Z.DEFAULT)}static fromIntInViewingConditions(e,t){const a=(65280&e)>>8,r=255&e,s=K((16711680&e)>>16),o=K(a),n=K(r),i=.41233895*s+.35762064*o+.18051042*n,l=.2126*s+.7152*o+.0722*n,c=.01932141*s+.11916382*o+.95034478*n,p=.401288*i+.650173*l-.051461*c,d=-.250268*i+1.204414*l+.045854*c,u=-.002079*i+.048952*l+.953127*c,h=t.rgbD[0]*p,m=t.rgbD[1]*d,f=t.rgbD[2]*u,g=Math.pow(t.fl*Math.abs(h)/100,.42),v=Math.pow(t.fl*Math.abs(m)/100,.42),b=Math.pow(t.fl*Math.abs(f)/100,.42),w=400*D(h)*g/(g+27.13),y=400*D(m)*v/(v+27.13),E=400*D(f)*b/(b+27.13),C=(11*w+-12*y+E)/11,$=(w+y-2*E)/9,x=(20*w+20*y+21*E)/20,k=(40*w+20*y+E)/20,T=180*Math.atan2($,C)/Math.PI,S=T<0?T+360:T>=360?T-360:T,M=S*Math.PI/180,P=k*t.nbb,A=100*Math.pow(P/t.aw,t.c*t.z),O=4/t.c*Math.sqrt(A/100)*(t.aw+4)*t.fLRoot,I=S<20.14?S+360:S,B=5e4/13*(.25*(Math.cos(I*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(C*C+$*$)/(x+.305),L=Math.pow(B,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),R=L*Math.sqrt(A/100),z=R*t.fLRoot,H=50*Math.sqrt(L*t.c/(t.aw+4)),N=(1+100*.007)*A/(1+.007*A),V=1/.0228*Math.log(1+.0228*z),F=V*Math.cos(M),_=V*Math.sin(M);return new J(S,R,A,O,z,H,N,F,_)}static fromJch(e,t,a){return J.fromJchInViewingConditions(e,t,a,Z.DEFAULT)}static fromJchInViewingConditions(e,t,a,r){const s=4/r.c*Math.sqrt(e/100)*(r.aw+4)*r.fLRoot,o=t*r.fLRoot,n=t/Math.sqrt(e/100),i=50*Math.sqrt(n*r.c/(r.aw+4)),l=a*Math.PI/180,c=(1+100*.007)*e/(1+.007*e),p=1/.0228*Math.log(1+.0228*o),d=p*Math.cos(l),u=p*Math.sin(l);return new J(a,t,e,s,o,i,c,d,u)}static fromUcs(e,t,a){return J.fromUcsInViewingConditions(e,t,a,Z.DEFAULT)}static fromUcsInViewingConditions(e,t,a,r){const s=t,o=a,n=Math.sqrt(s*s+o*o),i=(Math.exp(.0228*n)-1)/.0228/r.fLRoot;let l=Math.atan2(o,s)*(180/Math.PI);l<0&&(l+=360);const c=e/(1-.007*(e-100));return J.fromJchInViewingConditions(c,i,l,r)}toInt(){return this.viewed(Z.DEFAULT)}viewed(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),a=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),r=this.hue*Math.PI/180,s=.25*(Math.cos(r+2)+3.8),o=e.aw*Math.pow(this.j/100,1/e.c/e.z),n=s*(5e4/13)*e.nc*e.ncb,i=o/e.nbb,l=Math.sin(r),c=Math.cos(r),p=23*(i+.305)*a/(23*n+11*a*c+108*a*l),d=p*c,u=p*l,h=(460*i+451*d+288*u)/1403,m=(460*i-891*d-261*u)/1403,f=(460*i-220*d-6300*u)/1403,g=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),v=D(h)*(100/e.fl)*Math.pow(g,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),w=D(m)*(100/e.fl)*Math.pow(b,1/.42),y=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),E=D(f)*(100/e.fl)*Math.pow(y,1/.42),C=v/e.rgbD[0],$=w/e.rgbD[1],x=E/e.rgbD[2];return function(e,t,a){const r=F,s=r[0][0]*e+r[0][1]*t+r[0][2]*a,o=r[1][0]*e+r[1][1]*t+r[1][2]*a,n=r[2][0]*e+r[2][1]*t+r[2][2]*a;return q(Q(s),Q(o),Q(n))}(1.86206786*C-1.01125463*$+.14918677*x,.38752654*C+.62144744*$-.00897398*x,-.0158415*C-.03412294*$+1.04996444*x)}}class ee{static sanitizeRadians(e){return(e+8*Math.PI)%(2*Math.PI)}static trueDelinearized(e){const t=e/100;let a=0;return a=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,255*a}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return 400*D(e)*t/(t+27.13)}static hueOf(e){const t=N(e,ee.SCALED_DISCOUNT_FROM_LINRGB),a=ee.chromaticAdaptation(t[0]),r=ee.chromaticAdaptation(t[1]),s=ee.chromaticAdaptation(t[2]),o=(11*a+-12*r+s)/11,n=(a+r-2*s)/9;return Math.atan2(n,o)}static areInCyclicOrder(e,t,a){return ee.sanitizeRadians(t-e)<ee.sanitizeRadians(a-e)}static intercept(e,t,a){return(t-e)/(a-e)}static lerpPoint(e,t,a){return[e[0]+(a[0]-e[0])*t,e[1]+(a[1]-e[1])*t,e[2]+(a[2]-e[2])*t]}static setCoordinate(e,t,a,r){const s=ee.intercept(e[r],t,a[r]);return ee.lerpPoint(e,s,a)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,t){const a=ee.Y_FROM_LINRGB[0],r=ee.Y_FROM_LINRGB[1],s=ee.Y_FROM_LINRGB[2],o=t%4<=1?0:100,n=t%2==0?0:100;if(t<4){const t=o,i=n,l=(e-t*r-i*s)/a;return ee.isBounded(l)?[l,t,i]:[-1,-1,-1]}if(t<8){const t=o,i=n,l=(e-i*a-t*s)/r;return ee.isBounded(l)?[i,l,t]:[-1,-1,-1]}{const t=o,i=n,l=(e-t*a-i*r)/s;return ee.isBounded(l)?[t,i,l]:[-1,-1,-1]}}static bisectToSegment(e,t){let a=[-1,-1,-1],r=a,s=0,o=0,n=!1,i=!0;for(let l=0;l<12;l++){const c=ee.nthVertex(e,l);if(c[0]<0)continue;const p=ee.hueOf(c);n?(i||ee.areInCyclicOrder(s,p,o))&&(i=!1,ee.areInCyclicOrder(s,t,p)?(r=c,o=p):(a=c,s=p)):(a=c,r=c,s=p,o=p,n=!0)}return[a,r]}static midpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,t){const a=ee.bisectToSegment(e,t);let r=a[0],s=ee.hueOf(r),o=a[1];for(let e=0;e<3;e++)if(r[e]!==o[e]){let a=-1,n=255;r[e]<o[e]?(a=ee.criticalPlaneBelow(ee.trueDelinearized(r[e])),n=ee.criticalPlaneAbove(ee.trueDelinearized(o[e]))):(a=ee.criticalPlaneAbove(ee.trueDelinearized(r[e])),n=ee.criticalPlaneBelow(ee.trueDelinearized(o[e])));for(let i=0;i<8&&!(Math.abs(n-a)<=1);i++){const i=Math.floor((a+n)/2),l=ee.CRITICAL_PLANES[i],c=ee.setCoordinate(r,l,o,e),p=ee.hueOf(c);ee.areInCyclicOrder(s,t,p)?(o=c,n=i):(r=c,s=p,a=i)}}return ee.midpoint(r,o)}static inverseChromaticAdaptation(e){const t=Math.abs(e),a=Math.max(0,27.13*t/(400-t));return D(e)*Math.pow(a,1/.42)}static findResultByJ(e,t,a){let r=11*Math.sqrt(a);const s=Z.DEFAULT,o=1/Math.pow(1.64-Math.pow(.29,s.n),.73),n=.25*(Math.cos(e+2)+3.8)*(5e4/13)*s.nc*s.ncb,i=Math.sin(e),l=Math.cos(e);for(let e=0;e<5;e++){const c=r/100,p=0===t||0===r?0:t/Math.sqrt(c),d=Math.pow(p*o,1/.9),u=s.aw*Math.pow(c,1/s.c/s.z)/s.nbb,h=23*(u+.305)*d/(23*n+11*d*l+108*d*i),m=h*l,f=h*i,g=(460*u+451*m+288*f)/1403,v=(460*u-891*m-261*f)/1403,b=(460*u-220*m-6300*f)/1403,w=N([ee.inverseChromaticAdaptation(g),ee.inverseChromaticAdaptation(v),ee.inverseChromaticAdaptation(b)],ee.LINRGB_FROM_SCALED_DISCOUNT);if(w[0]<0||w[1]<0||w[2]<0)return 0;const y=ee.Y_FROM_LINRGB[0],E=ee.Y_FROM_LINRGB[1],C=ee.Y_FROM_LINRGB[2],$=y*w[0]+E*w[1]+C*w[2];if($<=0)return 0;if(4===e||Math.abs($-a)<.002)return w[0]>100.01||w[1]>100.01||w[2]>100.01?0:j(w);r-=($-a)*r/(2*$)}return 0}static solveToInt(e,t,a){if(t<1e-4||a<1e-4||a>99.9999)return function(e){const t=Q(U(e));return q(t,t,t)}(a);const r=(e=H(e))/180*Math.PI,s=U(a),o=ee.findResultByJ(r,t,s);return 0!==o?o:j(ee.bisectToLimit(s,r))}static solveToCam(e,t,a){return J.fromInt(ee.solveToInt(e,t,a))}}ee.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],ee.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],ee.Y_FROM_LINRGB=[.2126,.7152,.0722],ee.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];class te{static from(e,t,a){return new te(ee.solveToInt(e,t,a))}static fromInt(e){return new te(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(ee.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(ee.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(ee.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const t=J.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=G(e),this.argb=e}setInternalState(e){const t=J.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=G(e),this.argb=e}}class ae{static harmonize(e,t){const a=te.fromInt(e),r=te.fromInt(t),s=(l=a.hue,c=r.hue,180-Math.abs(Math.abs(l-c)-180)),o=Math.min(.5*s,15),n=H(a.hue+o*(i=a.hue,H(r.hue-i)<=180?1:-1));var i,l,c;return te.from(n,a.chroma,a.tone).toInt()}static hctHue(e,t,a){const r=ae.cam16Ucs(e,t,a),s=J.fromInt(r),o=J.fromInt(e);return te.from(s.hue,o.chroma,G(e)).toInt()}static cam16Ucs(e,t,a){const r=J.fromInt(e),s=J.fromInt(t),o=r.jstar,n=r.astar,i=r.bstar,l=o+(s.jstar-o)*a,c=n+(s.astar-n)*a,p=i+(s.bstar-i)*a;return J.fromUcs(l,c,p).toInt()}}class re{static fromInt(e){const t=te.fromInt(e);return re.fromHueAndChroma(t.hue,t.chroma)}static fromHueAndChroma(e,t){return new re(e,t)}constructor(e,t){this.hue=e,this.chroma=t,this.cache=new Map}tone(e){let t=this.cache.get(e);return void 0===t&&(t=te.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}}class se{static of(e){return new se(e,!1)}static contentOf(e){return new se(e,!0)}static fromColors(e){return se.createPaletteFromColors(!1,e)}static contentFromColors(e){return se.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,t){const a=new se(t.primary,e);if(t.secondary){const r=new se(t.secondary,e);a.a2=r.a1}if(t.tertiary){const r=new se(t.tertiary,e);a.a3=r.a1}if(t.error){const r=new se(t.error,e);a.error=r.a1}if(t.neutral){const r=new se(t.neutral,e);a.n1=r.n1}if(t.neutralVariant){const r=new se(t.neutralVariant,e);a.n2=r.n2}return a}constructor(e,t){const a=te.fromInt(e),r=a.hue,s=a.chroma;t?(this.a1=re.fromHueAndChroma(r,s),this.a2=re.fromHueAndChroma(r,s/3),this.a3=re.fromHueAndChroma(r+60,s/2),this.n1=re.fromHueAndChroma(r,Math.min(s/12,4)),this.n2=re.fromHueAndChroma(r,Math.min(s/6,8))):(this.a1=re.fromHueAndChroma(r,Math.max(48,s)),this.a2=re.fromHueAndChroma(r,16),this.a3=re.fromHueAndChroma(r+60,24),this.n1=re.fromHueAndChroma(r,4),this.n2=re.fromHueAndChroma(r,8)),this.error=re.fromHueAndChroma(25,84)}}class oe{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(e){return oe.lightFromCorePalette(se.of(e))}static dark(e){return oe.darkFromCorePalette(se.of(e))}static lightContent(e){return oe.lightFromCorePalette(se.contentOf(e))}static darkContent(e){return oe.darkFromCorePalette(se.contentOf(e))}static lightFromCorePalette(e){return new oe({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})}static darkFromCorePalette(e){return new oe({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})}constructor(e){this.props=e}toJSON(){return{...this.props}}}function ne(e){const t=Y(e),a=W(e),r=X(e),s=[t.toString(16),a.toString(16),r.toString(16)];for(const[e,t]of s.entries())1===t.length&&(s[e]="0"+t);return"#"+s.join("")}function ie(e){const t=3===(e=e.replace("#","")).length,a=6===e.length,r=8===e.length;if(!t&&!a&&!r)throw new Error("unexpected hex "+e);let s=0,o=0,n=0;return t?(s=le(e.slice(0,1).repeat(2)),o=le(e.slice(1,2).repeat(2)),n=le(e.slice(2,3).repeat(2))):a?(s=le(e.slice(0,2)),o=le(e.slice(2,4)),n=le(e.slice(4,6))):r&&(s=le(e.slice(2,4)),o=le(e.slice(4,6)),n=le(e.slice(6,8))),(255<<24|(255&s)<<16|(255&o)<<8|255&n)>>>0}function le(e){return parseInt(e,16)}function ce(e,t){void 0===t&&(t=[]);const a=se.of(e);return{source:e,schemes:{light:oe.light(e),dark:oe.dark(e)},palettes:{primary:a.a1,secondary:a.a2,tertiary:a.a3,neutral:a.n1,neutralVariant:a.n2,error:a.error},customColors:t.map((t=>function(e,t){let a=t.value;const r=a,s=e;t.blend&&(a=ae.harmonize(r,s));const o=se.of(a).a1;return{color:t,value:a,light:{color:o.tone(40),onColor:o.tone(100),colorContainer:o.tone(90),onColorContainer:o.tone(10)},dark:{color:o.tone(80),onColor:o.tone(20),colorContainer:o.tone(30),onColorContainer:o.tone(90)}}}(e,t)))}}function pe(e){const t=Math.round,a=e.length,r={};return"rgb"===e.slice(0,3).toLowerCase()?(e=e.replace(" ","").split(","),r[0]=parseInt(e[0].slice("a"===e[3].toLowerCase()?5:4),10),r[1]=parseInt(e[1],10),r[2]=parseInt(e[2],10),r[3]=e[3]?parseFloat(e[3]):-1):(e=a<6?parseInt(String(e[1])+e[1]+e[2]+e[2]+e[3]+e[3]+(a>4?String(e[4])+e[4]:""),16):parseInt(e.slice(1),16),r[0]=e>>16&255,r[1]=e>>8&255,r[2]=255&e,r[3]=9===a||5===a?t((e>>24&255)/255*1e4)/1e4:-1),r}function de(e,t,a){void 0===a&&(a=.5);const r=Math.round;e=e.trim(),t=t.trim();a=a<0?-1*a:a;const s=pe(e),o=pe(t);return"r"===t[0]?"rgb"+("a"===t[3]?"a(":"(")+r((o[0]-s[0])*a+s[0])+","+r((o[1]-s[1])*a+s[1])+","+r((o[2]-s[2])*a+s[2])+(s[3]<0&&o[3]<0?"":","+(s[3]>-1&&o[3]>-1?r(1e4*((o[3]-s[3])*a+s[3]))/1e4:o[3]<0?s[3]:o[3]))+")":"#"+(4294967296+16777216*(s[3]>-1&&o[3]>-1?r(255*((o[3]-s[3])*a+s[3])):o[3]>-1?r(255*o[3]):s[3]>-1?r(255*s[3]):255)+65536*r((o[0]-s[0])*a+s[0])+256*r((o[1]-s[1])*a+s[1])+r((o[2]-s[2])*a+s[2])).toString(16).slice(s[3]>-1||o[3]>-1?1:3)}const ue=function(e){void 0===e&&(e="");const t=ce(ie(`#${e.replace("#","")}`));[.05,.08,.11,.12,.14].forEach(((e,a)=>{t.schemes.light.props[`surface${a+1}`]=ie(de(ne(t.schemes.light.props.surface),ne(t.schemes.light.props.primary),e)),t.schemes.dark.props[`surface${a+1}`]=ie(de(ne(t.schemes.dark.props.surface),ne(t.schemes.dark.props.primary),e))}));const a=e=>e.split("").map((e=>e.toUpperCase()===e&&"-"!==e&&"7"!==e?`-${e.toLowerCase()}`:e)).join(""),r=e=>["tertiary","shadow","scrim","error","background"].filter((t=>e.toLowerCase().includes(t))).length>0,s={},o={};return Object.keys(t.schemes.light.props).forEach((e=>{r(e)||(s[a(`--f7-md-${e}`)]=ne(t.schemes.light.props[e]))})),Object.keys(t.schemes.dark.props).forEach((e=>{r(e)||(o[a(`--f7-md-${e}`)]=ne(t.schemes.dark.props[e]))})),{light:s,dark:o}};let he=0;function me(e,t){void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef");const a=t.length;return e.replace(/x/g,(()=>t[Math.floor(Math.random()*a)]))}const fe='\n <span class="preloader-inner">\n <svg viewBox="0 0 36 36">\n <circle cx="18" cy="18" r="16"></circle>\n </svg>\n </span>\n'.trim(),ge=`\n <span class="preloader-inner">\n ${[0,1,2,3,4,5,6,7].map((()=>'<span class="preloader-inner-line"></span>')).join("")}\n </span>\n`.trim();function ve(e){let t;return e.split("").map(((e,a)=>e.match(/[A-Z]/)&&0!==a&&!t?(t=!0,`:${e.toLowerCase()}`):e.toLowerCase())).join("")}function be(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}function we(e){return o().requestAnimationFrame(e)}function ye(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function Ee(e){return we((()=>{we(e)}))}function Ce(){return Date.now()}function $e(e){const t=o(),a={};let r,s,n,i,l=e||t.location.href;if("string"==typeof l&&l.length)for(l=l.indexOf("?")>-1?l.replace(/\S*\?/,""):"",s=l.split("&").filter((e=>""!==e)),i=s.length,r=0;r<i;r+=1)n=s[r].replace(/#\S+/g,"").split("="),a[decodeURIComponent(n[0])]=void 0===n[1]?void 0:decodeURIComponent(n.slice(1).join("="))||"";return a}function xe(e,t){void 0===t&&(t="x");const a=o();let r,s,n;const i=a.getComputedStyle(e,null);return a.WebKitCSSMatrix?(s=i.transform||i.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map((e=>e.replace(",","."))).join(", ")),n=new a.WebKitCSSMatrix("none"===s?"":s)):(n=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=n.toString().split(",")),"x"===t&&(s=a.WebKitCSSMatrix?n.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(s=a.WebKitCSSMatrix?n.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),s||0}function ke(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;const a=[];let r;function s(e){if(t.length>0){let a="";for(let e=0;e<t.length;e+=1)a+=0===e?t[e]:`[${encodeURIComponent(t[e])}]`;return`${a}[${encodeURIComponent(e)}]`}return encodeURIComponent(e)}function o(e){return encodeURIComponent(e)}return Object.keys(e).forEach((n=>{let i;if(Array.isArray(e[n])){i=[];for(let a=0;a<e[n].length;a+=1)Array.isArray(e[n][a])||"object"!=typeof e[n][a]?i.push(`${s(n)}[]=${o(e[n][a])}`):(r=t.slice(),r.push(n),r.push(String(a)),i.push(ke(e[n][a],r)));i.length>0&&a.push(i.join("&"))}else null===e[n]||""===e[n]?a.push(`${s(n)}=`):"object"==typeof e[n]?(r=t.slice(),r.push(n),i=ke(e[n],r),""!==i&&a.push(i)):void 0!==e[n]&&""!==e[n]?a.push(`${s(n)}=${o(e[n])}`):""===e[n]&&a.push(s(n))})),a.join("&")}function Te(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object}function Se(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];const r=t[0];t.splice(0,1);const s=t;for(let e=0;e<s.length;e+=1){const a=t[e];if(null!=a){const e=Object.keys(Object(a));for(let t=0,s=e.length;t<s;t+=1){const s=e[t],o=Object.getOwnPropertyDescriptor(a,s);void 0!==o&&o.enumerable&&(r[s]=a[s])}}}return r}function Me(){let e,t,a=!0;for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];"boolean"==typeof s[0]?(a=s[0],e=s[1],s.splice(0,2),t=s):(e=s[0],s.splice(0,1),t=s);for(let r=0;r<t.length;r+=1){const t=s[r];if(null!=t){const r=Object.keys(Object(t));for(let s=0,o=r.length;s<o;s+=1){const o=r[s],n=Object.getOwnPropertyDescriptor(t,o);void 0!==n&&n.enumerable&&(a?Te(e[o])&&Te(t[o])?Me(e[o],t[o]):!Te(e[o])&&Te(t[o])?(e[o]={},Me(e[o],t[o])):e[o]=t[o]:e[o]=t[o])}}}return e}function Pe(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,a,r)=>t+t+a+a+r+r)),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return a?a.slice(1).map((e=>parseInt(e,16))):null}function Ae(e,t,a){const r=[e,t,a].map((e=>{const t=e.toString(16);return 1===t.length?`0${t}`:t})).join("");return`#${r}`}function Oe(e,t,a){e/=255,t/=255,a/=255;const r=Math.max(e,t,a),s=Math.min(e,t,a),o=r-s;let n;0===o?n=0:r===e?n=(t-a)/o%6:r===t?n=(a-e)/o+2:r===a&&(n=(e-t)/o+4);const i=(s+r)/2;return n<0&&(n=6+n),[60*n,0===o?0:o/(1-Math.abs(2*i-1)),i]}function Ie(e,t,a){const r=(1-Math.abs(2*a-1))*t,s=e/60,o=r*(1-Math.abs(s%2-1));let n;Number.isNaN(e)||void 0===e?n=[0,0,0]:s<=1?n=[r,o,0]:s<=2?n=[o,r,0]:s<=3?n=[0,r,o]:s<=4?n=[0,o,r]:s<=5?n=[o,0,r]:s<=6&&(n=[r,0,o]);const i=a-r/2;return n.map((e=>Math.max(0,Math.min(255,Math.round(255*(e+i))))))}function Be(e,t,a){const r={h:e,s:0,l:0},s=t,o=a;return r.l=(2-s)*o/2,r.s=r.l&&r.l<1?s*o/(r.l<.5?2*r.l:2-2*r.l):r.s,[r.h,r.s,r.l]}function Le(e,t,a){const r={h:e,s:0,b:0},s=a,o=t*(s<.5?s:1-s);return r.b=s+o,r.s=s>0?2*o/r.b:r.s,[r.h,r.s,r.b]}const Re=e=>{const t=Oe(...e),a=[t[0],t[1],Math.max(0,t[2]-.08)],r=[t[0],t[1],Math.max(0,t[2]+.08)];return{shade:Ae(...Ie(...a)),tint:Ae(...Ie(...r))}};function De(){let e,t;for(var a=arguments.length,r=new Array(a),s=0;s<a;s++)r[s]=arguments[s];if(1===r.length?(e=r[0],t=Pe(e)):3===r.length&&(t=r,e=Ae(...t)),!t)return{};const{light:o,dark:n}=ue(e),i=Re(t),l=Re(Pe(o["--f7-md-primary"])),c=Re(Pe(n["--f7-md-primary"]));return Object.keys(o).forEach((e=>{e.includes("surface-")&&(o[`${e}-rgb`]=Pe(o[e]))})),Object.keys(n).forEach((e=>{e.includes("surface-")&&(n[`${e}-rgb`]=Pe(n[e]))})),{ios:{"--f7-theme-color":"var(--f7-ios-primary)","--f7-theme-color-rgb":"var(--f7-ios-primary-rgb)","--f7-theme-color-shade":"var(--f7-ios-primary-shade)","--f7-theme-color-tint":"var(--f7-ios-primary-tint)"},md:{"--f7-theme-color":"var(--f7-md-primary)","--f7-theme-color-rgb":"var(--f7-md-primary-rgb)","--f7-theme-color-shade":"var(--f7-md-primary-shade)","--f7-theme-color-tint":"var(--f7-md-primary-tint)"},light:{"--f7-ios-primary":e,"--f7-ios-primary-shade":i.shade,"--f7-ios-primary-tint":i.tint,"--f7-ios-primary-rgb":t.join(", "),"--f7-md-primary-shade":l.shade,"--f7-md-primary-tint":l.tint,"--f7-md-primary-rgb":Pe(o["--f7-md-primary"]).join(", "),...o},dark:{"--f7-md-primary-shade":c.shade,"--f7-md-primary-tint":c.tint,"--f7-md-primary-rgb":Pe(n["--f7-md-primary"]).join(", "),...n}}}function ze(e,t){Object.keys(t).forEach((a=>{Te(t[a])&&Object.keys(t[a]).forEach((r=>{"function"==typeof t[a][r]&&(t[a][r]=t[a][r].bind(e))})),e[a]=t[a]}))}function He(){const e=[];for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return a.forEach((t=>{Array.isArray(t)?e.push(...He(...t)):e.push(t)})),e}var Ne=Object.freeze({__proto__:null,bindMethods:ze,cancelAnimationFrame:function(e){return o().cancelAnimationFrame(e)},colorHexToRgb:Pe,colorHsbToHsl:Be,colorHslToHsb:Le,colorHslToRgb:Ie,colorRgbToHex:Ae,colorRgbToHsl:Oe,colorThemeCSSProperties:De,colorThemeCSSStyles:function(e){void 0===e&&(e={});const t=e=>{let t="";return Object.keys(e).forEach((a=>{t+=`${a}:${e[a]};`})),t},a=De(e.primary),r=[