/** * Framework7 9.0.3 * Full featured mobile HTML framework for building iOS & Android apps * https://framework7.io/ * * Copyright 2014-2026 Vladimir Kharlampidi * * Released under the MIT License * * Released on: February 13, 2026 */ !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(r={},a={}){Object.keys(a).forEach(s=>{void 0===r[s]?r[s]=a[s]:e(a[s])&&e(r[s])&&Object.keys(a[s]).length>0&&t(r[s],a[s])})}const r={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 a(){const e="undefined"!=typeof document?document:{};return t(e,r),e}const s={document:r,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=[]){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){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function p(e,t){const r=o(),s=a();let i=[];if(!t&&e instanceof n)return e;if(!e)return new n(i);if("string"==typeof e){const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";0===r.indexOf("e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this},animate:function(e,t){const r=o(),a=this,s={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:a,animating:!1,que:[],easingProgress:(e,t)=>"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t,stop(){s.frameId&&r.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(a),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,a)=>{let n,i,l,c,p;t.dom7AnimateInstance||(s.elements[a].dom7AnimateInstance=s),o[a]={container:t},Object.keys(e).forEach(s=>{n=r.getComputedStyle(t,null).getPropertyValue(s).replace(",","."),i=parseFloat(n),l=n.replace(i,""),c=parseFloat(e[s]),p=e[s]+l,o[a][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=r.requestAnimationFrame(function u(){let h,m;n=(new Date).getTime(),d||(d=!0,t.begin&&t.begin(a)),null===l&&(l=n),t.progress&&t.progress(a,Math.max(Math.min((n-l)/t.duration,1),0),l+t.duration-n<0?0:l+t.duration-n,l),o.forEach(r=>{const a=r;i||a.done||Object.keys(e).forEach(r=>{if(i||a.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}=a[r];a[r].currentValue=d+m*(u-d);const g=a[r].currentValue;(u>d&&g>=u||u=0&&(t[c(a.name.split("data-")[1])]=a.value)}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:p,detach:function(){return this.remove()},each:function(e){return e?(this.forEach((t,r)=>{e.apply(t,[t,r])}),this):this},empty:function(){for(let e=0;et-1)return p([]);if(e<0){const r=t+e;return p(r<0?[]:[this[r]])}return p([this[e]])},filter:function(e){return p(l(this,e))},find:function(e){const t=[];for(let r=0;re.split(" ")));return l(this,e=>t.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;e1)for(let r=0;r1)for(let r=0;r0?e?this[0].nextElementSibling&&p(this[0].nextElementSibling).is(e)?p([this[0].nextElementSibling]):p([]):this[0].nextElementSibling?p([this[0].nextElementSibling]):p([]):p([])},nextAll:function(e){const t=[];let r=this[0];if(!r)return p([]);for(;r.nextElementSibling;){const a=r.nextElementSibling;e?p(a).is(e)&&t.push(a):t.push(a),r=a}return p(t)},off:function(...e){let[t,r,a,s]=e;"function"==typeof e[1]&&([t,a,s]=e,r=void 0),s||(s=!1);const o=t.split(" ");for(let e=0;e=0;e-=1){const r=n[e];a&&r.listener===a||a&&r.listener&&r.listener.dom7proxy&&r.listener.dom7proxy===a?(o.removeEventListener(t,r.proxyListener,s),n.splice(e,1)):a||(o.removeEventListener(t,r.proxyListener,s),n.splice(e,1))}}}return this},offset:function(){if(this.length>0){const e=o(),t=a(),r=this[0],s=r.getBoundingClientRect(),n=t.body,i=r.clientTop||n.clientTop||0,l=r.clientLeft||n.clientLeft||0,c=r===e?e.scrollY:r.scrollTop,p=r===e?e.scrollX:r.scrollLeft;return{top:s.top+c-i,left:s.left+p-l}}return null},on:function(...e){let[t,r,a,s]=e;function o(e){const t=e.target;if(!t)return;const s=e.target.dom7EventData||[];if(s.indexOf(e)<0&&s.unshift(e),p(t).is(r))a.apply(t,s);else{const e=p(t).parents();for(let t=0;t0){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 r=0;r=0;s-=1)this[r].insertBefore(a.childNodes[s],this[r].childNodes[0])}else if(e instanceof n)for(s=0;s0){const t=this[0];return e?t.previousElementSibling&&p(t.previousElementSibling).is(e)?p([t.previousElementSibling]):p([]):t.previousElementSibling?p([t.previousElementSibling]):p([])}return p([])},prevAll:function(e){const t=[];let r=this[0];if(!r)return p([]);for(;r.previousElementSibling;){const a=r.previousElementSibling;e?p(a).is(e)&&t.push(a):t.push(a),r=a}return p(t)},prop:function(e,t){if(1!==arguments.length||"string"!=typeof e){for(let r=0;re.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this},removeData:function(e){for(let t=0;t0?o[0].scrollLeft:null:o.scrollTo(t,void 0,r,a,s)},scrollTo:function(...e){const t=o();let[r,a,s,n,i]=e;return 4===e.length&&"function"==typeof n&&(i=n,[r,a,s,i,n]=e),void 0===n&&(n="swing"),this.each(function(){const e=this;let o,l,c,p,d,u,h,m,f=a>0||0===a,g=r>0||0===r;if(void 0===n&&(n="swing"),f&&(o=e.scrollTop,s||(e.scrollTop=a)),g&&(l=e.scrollLeft,s||(e.scrollLeft=r)),!s)return;f&&(c=e.scrollHeight-e.offsetHeight,d=Math.max(Math.min(a,c),0)),g&&(p=e.scrollWidth-e.offsetWidth,u=Math.max(Math.min(r,p),0));let v=null;f&&d===o&&(f=!1),g&&u===l&&(g=!1),t.requestAnimationFrame(function r(a=(new Date).getTime()){null===v&&(v=a);const c=Math.max(Math.min((a-v)/s,1),0),p="linear"===n?c:.5-Math.cos(c*Math.PI)/2;let b;f&&(h=o+p*(d-o)),g&&(m=l+p*(u-l)),f&&d>o&&h>=d&&(e.scrollTop=d,b=!0),f&&dl&&m>=u&&(e.scrollLeft=u,b=!0),g&&u0?o[0].scrollTop:null:o.scrollTo(void 0,t,r,a,s)},show:function(){const e=o();for(let t=0;te.split(" ")));this.forEach(e=>{t.forEach(t=>{e.classList.toggle(t)})})},touchend:I,touchmove:B,touchstart:O,transform:function(e){for(let t=0;tt>0),s.dispatchEvent(r),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 r=0;r=0;else r.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(A).forEach(e=>{"$"!==e&&(p.fn[e]=A[e])});var R=p;function H(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function z(e={},t={}){const r=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>r.indexOf(e)<0).forEach(r=>{void 0===e[r]?e[r]=t[r]:H(t[r])&&H(e[r])&&Object.keys(t[r]).length>0&&z(e[r],t[r])})}const V={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 _(){const e="undefined"!=typeof document?document:{};return z(e,V),e}const F={document:V,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 N(){const e="undefined"!=typeof window?window:{};return z(e,F),e}function q(e){return e<0?-1:0===e?0:1}function j(e,t,r){return(1-r)*e+r*t}function Y(e,t,r){return rt?t:r}function W(e){return(e%=360)<0&&(e+=360),e}function X(e){return(e%=360)<0&&(e+=360),e}function U(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 G=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],K=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Q=[95.047,100,108.883];function J(e,t,r){return(255<<24|(255&e)<<16|(255&t)<<8|255&r)>>>0}function Z(e){return J(ie(e[0]),ie(e[1]),ie(e[2]))}function ee(e){return e>>16&255}function te(e){return e>>8&255}function re(e){return 255&e}function ae(e){return 116*le(function(e){return U([ne(ee(e)),ne(te(e)),ne(re(e))],G)}(e)[1]/100)-16}function se(e){return 100*function(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/903.2962962962963}((e+16)/116)}function oe(e){return 116*le(e/100)-16}function ne(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function ie(e){const t=e/100;let r=0;return r=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,a=0,s=255,(o=Math.round(255*r))s?s:o;var a,s,o}function le(e){return e>216/24389?Math.pow(e,1/3):(903.2962962962963*e+16)/116}class ce{static make(e=function(){return Q}(),t=200/Math.PI*se(50)/100,r=50,a=2,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+a/10,p=c>=.9?j(.59,.69,10*(c-.9)):j(.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=se(r)/e[1],y=1.48+Math.sqrt(b),w=.725/Math.pow(b,.2),C=w,E=[Math.pow(v*h[0]*n/100,.42),Math.pow(v*h[1]*i/100,.42),Math.pow(v*h[2]*l/100,.42)],k=[400*E[0]/(E[0]+27.13),400*E[1]/(E[1]+27.13),400*E[2]/(E[2]+27.13)];return new ce(b,(2*k[0]+k[1]+.05*k[2])*w,w,C,p,u,h,v,Math.pow(v,.25),y)}constructor(e,t,r,a,s,o,n,i,l,c){this.n=e,this.aw=t,this.nbb=r,this.ncb=a,this.c=s,this.nc=o,this.rgbD=n,this.fl=i,this.fLRoot=l,this.z=c}}ce.DEFAULT=ce.make();class pe{constructor(e,t,r,a,s,o,n,i,l){this.hue=e,this.chroma=t,this.j=r,this.q=a,this.m=s,this.s=o,this.jstar=n,this.astar=i,this.bstar=l}distance(e){const t=this.jstar-e.jstar,r=this.astar-e.astar,a=this.bstar-e.bstar,s=Math.sqrt(t*t+r*r+a*a);return 1.41*Math.pow(s,.63)}static fromInt(e){return pe.fromIntInViewingConditions(e,ce.DEFAULT)}static fromIntInViewingConditions(e,t){const r=(65280&e)>>8,a=255&e,s=ne((16711680&e)>>16),o=ne(r),n=ne(a),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),y=400*q(h)*g/(g+27.13),w=400*q(m)*v/(v+27.13),C=400*q(f)*b/(b+27.13),E=(11*y+-12*w+C)/11,k=(y+w-2*C)/9,x=(20*y+20*w+21*C)/20,$=(40*y+20*w+C)/20,T=180*Math.atan2(k,E)/Math.PI,S=T<0?T+360:T>=360?T-360:T,P=S*Math.PI/180,M=$*t.nbb,O=100*Math.pow(M/t.aw,t.c*t.z),I=4/t.c*Math.sqrt(O/100)*(t.aw+4)*t.fLRoot,B=S<20.14?S+360:S,L=5e4/13*(.25*(Math.cos(B*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(E*E+k*k)/(x+.305),D=Math.pow(L,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),A=D*Math.sqrt(O/100),R=A*t.fLRoot,H=50*Math.sqrt(D*t.c/(t.aw+4)),z=(1+100*.007)*O/(1+.007*O),V=1/.0228*Math.log(1+.0228*R),_=V*Math.cos(P),F=V*Math.sin(P);return new pe(S,A,O,I,R,H,z,_,F)}static fromJch(e,t,r){return pe.fromJchInViewingConditions(e,t,r,ce.DEFAULT)}static fromJchInViewingConditions(e,t,r,a){const s=4/a.c*Math.sqrt(e/100)*(a.aw+4)*a.fLRoot,o=t*a.fLRoot,n=t/Math.sqrt(e/100),i=50*Math.sqrt(n*a.c/(a.aw+4)),l=r*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 pe(r,t,e,s,o,i,c,d,u)}static fromUcs(e,t,r){return pe.fromUcsInViewingConditions(e,t,r,ce.DEFAULT)}static fromUcsInViewingConditions(e,t,r,a){const s=t,o=r,n=Math.sqrt(s*s+o*o),i=(Math.exp(.0228*n)-1)/.0228/a.fLRoot;let l=Math.atan2(o,s)*(180/Math.PI);l<0&&(l+=360);const c=e/(1-.007*(e-100));return pe.fromJchInViewingConditions(c,i,l,a)}toInt(){return this.viewed(ce.DEFAULT)}viewed(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),a=this.hue*Math.PI/180,s=.25*(Math.cos(a+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(a),c=Math.cos(a),p=23*(i+.305)*r/(23*n+11*r*c+108*r*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=q(h)*(100/e.fl)*Math.pow(g,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=q(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),C=q(f)*(100/e.fl)*Math.pow(w,1/.42),E=v/e.rgbD[0],k=y/e.rgbD[1],x=C/e.rgbD[2];return function(e,t,r){const a=K,s=a[0][0]*e+a[0][1]*t+a[0][2]*r,o=a[1][0]*e+a[1][1]*t+a[1][2]*r,n=a[2][0]*e+a[2][1]*t+a[2][2]*r;return J(ie(s),ie(o),ie(n))}(1.86206786*E-1.01125463*k+.14918677*x,.38752654*E+.62144744*k-.00897398*x,-.0158415*E-.03412294*k+1.04996444*x)}static fromXyzInViewingConditions(e,t,r,a){const s=.401288*e+.650173*t-.051461*r,o=-.250268*e+1.204414*t+.045854*r,n=-.002079*e+.048952*t+.953127*r,i=a.rgbD[0]*s,l=a.rgbD[1]*o,c=a.rgbD[2]*n,p=Math.pow(a.fl*Math.abs(i)/100,.42),d=Math.pow(a.fl*Math.abs(l)/100,.42),u=Math.pow(a.fl*Math.abs(c)/100,.42),h=400*q(i)*p/(p+27.13),m=400*q(l)*d/(d+27.13),f=400*q(c)*u/(u+27.13),g=(11*h+-12*m+f)/11,v=(h+m-2*f)/9,b=(20*h+20*m+21*f)/20,y=(40*h+20*m+f)/20,w=180*Math.atan2(v,g)/Math.PI,C=w<0?w+360:w>=360?w-360:w,E=C*Math.PI/180,k=y*a.nbb,x=100*Math.pow(k/a.aw,a.c*a.z),$=4/a.c*Math.sqrt(x/100)*(a.aw+4)*a.fLRoot,T=C<20.14?C+360:C,S=5e4/13*(1/4*(Math.cos(T*Math.PI/180+2)+3.8))*a.nc*a.ncb*Math.sqrt(g*g+v*v)/(b+.305),P=Math.pow(S,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),M=P*Math.sqrt(x/100),O=M*a.fLRoot,I=50*Math.sqrt(P*a.c/(a.aw+4)),B=(1+100*.007)*x/(1+.007*x),L=Math.log(1+.0228*O)/.0228,D=L*Math.cos(E),A=L*Math.sin(E);return new pe(C,M,x,$,O,I,B,D,A)}xyzInViewingConditions(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),r=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),a=this.hue*Math.PI/180,s=.25*(Math.cos(a+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(a),c=Math.cos(a),p=23*(i+.305)*r/(23*n+11*r*c+108*r*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=q(h)*(100/e.fl)*Math.pow(g,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=q(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),C=q(f)*(100/e.fl)*Math.pow(w,1/.42),E=v/e.rgbD[0],k=y/e.rgbD[1],x=C/e.rgbD[2];return[1.86206786*E-1.01125463*k+.14918677*x,.38752654*E+.62144744*k-.00897398*x,-.0158415*E-.03412294*k+1.04996444*x]}}class de{static sanitizeRadians(e){return(e+8*Math.PI)%(2*Math.PI)}static trueDelinearized(e){const t=e/100;let r=0;return r=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,255*r}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return 400*q(e)*t/(t+27.13)}static hueOf(e){const t=U(e,de.SCALED_DISCOUNT_FROM_LINRGB),r=de.chromaticAdaptation(t[0]),a=de.chromaticAdaptation(t[1]),s=de.chromaticAdaptation(t[2]),o=(11*r+-12*a+s)/11,n=(r+a-2*s)/9;return Math.atan2(n,o)}static areInCyclicOrder(e,t,r){return de.sanitizeRadians(t-e)100.01||y[1]>100.01||y[2]>100.01?0:Z(y);a-=(k-r)*a/(2*k)}return 0}static solveToInt(e,t,r){if(t<1e-4||r<1e-4||r>99.9999)return function(e){const t=ie(se(e));return J(t,t,t)}(r);const a=(e=X(e))/180*Math.PI,s=se(r),o=de.findResultByJ(a,t,s);return 0!==o?o:Z(de.bisectToLimit(s,a))}static solveToCam(e,t,r){return pe.fromInt(de.solveToInt(e,t,r))}}de.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],de.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],de.Y_FROM_LINRGB=[.2126,.7152,.0722],de.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 ue{static from(e,t,r){return new ue(de.solveToInt(e,t,r))}static fromInt(e){return new ue(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(de.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(de.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(de.solveToInt(this.internalHue,this.internalChroma,e))}setValue(e,t){this[e]=t}toString(){return`HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(e){return e>=250&&e<270}static isYellow(e){return e>=105&&e<125}static isCyan(e){return e>=170&&e<207}constructor(e){this.argb=e;const t=pe.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=ae(e),this.argb=e}setInternalState(e){const t=pe.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=ae(e),this.argb=e}inViewingConditions(e){const t=pe.fromInt(this.toInt()).xyzInViewingConditions(e),r=pe.fromXyzInViewingConditions(t[0],t[1],t[2],ce.make());return ue.from(r.hue,r.chroma,oe(t[1]))}}class he{static ratioOfTones(e,t){return e=Y(0,100,e),t=Y(0,100,t),he.ratioOfYs(se(e),se(t))}static ratioOfYs(e,t){const r=e>t?e:t;return(r+5)/((r===t?e:t)+5)}static lighter(e,t){if(e<0||e>100)return-1;const r=se(e),a=t*(r+5)-5,s=he.ratioOfYs(a,r),o=Math.abs(s-t);if(s.04)return-1;const n=oe(a)+.4;return n<0||n>100?-1:n}static darker(e,t){if(e<0||e>100)return-1;const r=se(e),a=(r+5)/t-5,s=he.ratioOfYs(r,a),o=Math.abs(s-t);if(s.04)return-1;const n=oe(a)-.4;return n<0||n>100?-1:n}static lighterUnsafe(e,t){const r=he.lighter(e,t);return r<0?100:r}static darkerUnsafe(e,t){const r=he.darker(e,t);return r<0?0:r}}class me{static isDisliked(e){const t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,r=Math.round(e.chroma)>16,a=Math.round(e.tone)<65;return t&&r&&a}static fixIfDisliked(e){return me.isDisliked(e)?ue.from(e.hue,e.chroma,70):e}}function fe(e,t,r){return function(e,t,r){if(e.name!==r.name)throw new Error(`Attempting to extend color ${e.name} with color ${r.name} of different name for spec version ${t}.`);if(e.isBackground!==r.isBackground)throw new Error(`Attempting to extend color ${e.name} as a ${e.isBackground?"background":"foreground"} with color ${r.name} as a ${r.isBackground?"background":"foreground"} for spec version ${t}.`)}(e,t,r),ge.fromPalette({name:e.name,palette:a=>a.specVersion===t?r.palette(a):e.palette(a),tone:a=>a.specVersion===t?r.tone(a):e.tone(a),isBackground:e.isBackground,chromaMultiplier:a=>{const s=a.specVersion===t?r.chromaMultiplier:e.chromaMultiplier;return void 0!==s?s(a):1},background:a=>{const s=a.specVersion===t?r.background:e.background;return void 0!==s?s(a):void 0},secondBackground:a=>{const s=a.specVersion===t?r.secondBackground:e.secondBackground;return void 0!==s?s(a):void 0},contrastCurve:a=>{const s=a.specVersion===t?r.contrastCurve:e.contrastCurve;return void 0!==s?s(a):void 0},toneDeltaPair:a=>{const s=a.specVersion===t?r.toneDeltaPair:e.toneDeltaPair;return void 0!==s?s(a):void 0}})}class ge{static fromPalette(e){return new ge(e.name??"",e.palette,e.tone??ge.getInitialToneFromBackground(e.background),e.isBackground??!1,e.chromaMultiplier,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}static getInitialToneFromBackground(e){return void 0===e?e=>50:t=>e(t)?e(t).getTone(t):50}constructor(e,t,r,a,s,o,n,i,l){if(this.name=e,this.palette=t,this.tone=r,this.isBackground=a,this.chromaMultiplier=s,this.background=o,this.secondBackground=n,this.contrastCurve=i,this.toneDeltaPair=l,this.hctCache=new Map,!o&&n)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!o&&i)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(o&&!i)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return ge.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear()}getArgb(e){return this.getHct(e).toInt()}getHct(e){const t=this.hctCache.get(e);if(null!=t)return t;const r=ye(e.specVersion).getHct(e,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,r),r}getTone(e){return ye(e.specVersion).getTone(e,this)}static foregroundTone(e,t){const r=he.lighterUnsafe(e,t),a=he.darkerUnsafe(e,t),s=he.ratioOfTones(r,e),o=he.ratioOfTones(a,e);if(ge.tonePrefersLightForeground(e)){const e=Math.abs(s-o)<.1&&s=t||s>=o||e?r:a}return o>=t||o>=s?a:r}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return ge.tonePrefersLightForeground(e)&&!ge.toneAllowsLightForeground(e)?49:e}}const ve=new class{getHct(e,t){const r=t.getTone(e);return t.palette(e).getHct(r)}getTone(e,t){const r=e.contrastLevel<0,a=t.toneDeltaPair?t.toneDeltaPair(e):void 0;if(a){const s=a.roleA,o=a.roleB,n=a.delta,i=a.polarity,l=a.stayTogether,c="nearer"===i||"lighter"===i&&!e.isDark||"darker"===i&&e.isDark,p=c?s:o,d=c?o:s,u=t.name===p.name,h=e.isDark?1:-1;let m=p.tone(e),f=d.tone(e);if(t.background&&p.contrastCurve&&d.contrastCurve){const a=t.background(e),s=p.contrastCurve(e),o=d.contrastCurve(e);if(a&&s&&o){const t=a.getTone(e),n=s.get(e.contrastLevel),i=o.get(e.contrastLevel);he.ratioOfTones(t,m)=n||(m=Y(0,100,f-n*h))),50<=m&&m<60?h>0?(m=60,f=Math.max(f,m+n*h)):(m=49,f=Math.min(f,m+n*h)):50<=f&&f<60&&(l?h>0?(m=60,f=Math.max(f,m+n*h)):(m=49,f=Math.min(f,m+n*h)):f=h>0?60:49),u?m:f}{let a=t.tone(e);if(null==t.background||void 0===t.background(e)||null==t.contrastCurve||void 0===t.contrastCurve(e))return a;const s=t.background(e).getTone(e),o=t.contrastCurve(e).get(e.contrastLevel);if(he.ratioOfTones(s,a)>=o||(a=ge.foregroundTone(s,o)),r&&(a=ge.foregroundTone(s,o)),t.isBackground&&50<=a&&a<60&&(a=he.ratioOfTones(49,s)>=o?49:60),null==t.secondBackground||void 0===t.secondBackground(e))return a;const[n,i]=[t.background,t.secondBackground],[l,c]=[n(e).getTone(e),i(e).getTone(e)],[p,d]=[Math.max(l,c),Math.min(l,c)];if(he.ratioOfTones(p,a)>=o&&he.ratioOfTones(d,a)>=o)return a;const u=he.lighter(p,o),h=he.darker(d,o),m=[];return-1!==u&&m.push(u),-1!==h&&m.push(h),ge.tonePrefersLightForeground(l)||ge.tonePrefersLightForeground(c)?u<0?100:u:1===m.length?m[0]:h<0?0:h}}},be=new class{getHct(e,t){const r=t.palette(e),a=t.getTone(e),s=r.hue,o=r.chroma*(t.chromaMultiplier?t.chromaMultiplier(e):1);return ue.from(s,o,a)}getTone(e,t){const r=t.toneDeltaPair?t.toneDeltaPair(e):void 0;if(r){const a=r.roleA,s=r.roleB,o=r.polarity,n=r.constraint,i="darker"===o||"relative_lighter"===o&&e.isDark||"relative_darker"===o&&!e.isDark?-r.delta:r.delta,l=t.name===a.name,c=l?s:a;let p=(l?a:s).tone(e),d=c.getTone(e);const u=i*(l?1:-1);if("exact"===n?p=Y(0,100,d+u):"nearer"===n?p=Y(0,100,u>0?Y(d,d+u,p):Y(d+u,d,p)):"farther"===n&&(p=u>0?Y(d+u,100,p):Y(0,d+u,p)),t.background&&t.contrastCurve){const r=t.background(e),a=t.contrastCurve(e);if(r&&a){const t=r.getTone(e),s=a.get(e.contrastLevel);p=he.ratioOfTones(t,p)>=s&&e.contrastLevel>=0?p:ge.foregroundTone(t,s)}}return t.isBackground&&!t.name.endsWith("_fixed_dim")&&(p=p>=57?Y(65,100,p):Y(0,49,p)),p}{let r=t.tone(e);if(null==t.background||void 0===t.background(e)||null==t.contrastCurve||void 0===t.contrastCurve(e))return r;const a=t.background(e).getTone(e),s=t.contrastCurve(e).get(e.contrastLevel);if(r=he.ratioOfTones(a,r)>=s&&e.contrastLevel>=0?r:ge.foregroundTone(a,s),t.isBackground&&!t.name.endsWith("_fixed_dim")&&(r=r>=57?Y(65,100,r):Y(0,49,r)),null==t.secondBackground||void 0===t.secondBackground(e))return r;const[o,n]=[t.background,t.secondBackground],[i,l]=[o(e).getTone(e),n(e).getTone(e)],[c,p]=[Math.max(i,l),Math.min(i,l)];if(he.ratioOfTones(c,r)>=s&&he.ratioOfTones(p,r)>=s)return r;const d=he.lighter(c,s),u=he.darker(p,s),h=[];return-1!==d&&h.push(d),-1!==u&&h.push(u),ge.tonePrefersLightForeground(i)||ge.tonePrefersLightForeground(l)?d<0?100:d:1===h.length?h[0]:u<0?0:u}}};function ye(e){return"2025"===e?be:ve}class we{static fromInt(e){const t=ue.fromInt(e);return we.fromHct(t)}static fromHct(e){return new we(e.hue,e.chroma,e)}static fromHueAndChroma(e,t){const r=new Ce(e,t).create();return new we(e,t,r)}constructor(e,t,r){this.hue=e,this.chroma=t,this.keyColor=r,this.cache=new Map}tone(e){let t=this.cache.get(e);return void 0===t&&(t=99==e&&ue.isYellow(this.hue)?this.averageArgb(this.tone(98),this.tone(100)):ue.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return ue.fromInt(this.tone(e))}averageArgb(e,t){const r=e>>>16&255,a=e>>>8&255,s=255&e,o=t>>>16&255,n=t>>>8&255,i=255&t;return(255<<24|(255&Math.round((r+o)/2))<<16|(255&Math.round((a+n)/2))<<8|255&Math.round((s+i)/2))>>>0}}class Ce{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e=this.requestedChroma-.01)if(Math.abs(e-50)0)return this.hctsByTempCache;const e=this.hctsByHue.concat([this.input]),t=this.tempsByHct;return e.sort((e,r)=>t.get(e)-t.get(r)),this.hctsByTempCache=e,e}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(e=5,t=12){const r=Math.round(this.input.hue),a=this.hctsByHue[r];let s=this.relativeTemperature(a);const o=[a];let n=0;for(let e=0;e<360;e++){const t=W(r+e),a=this.hctsByHue[t],o=this.relativeTemperature(a),i=Math.abs(o-s);s=o,n+=i}let i=1;const l=n/t;let c=0;for(s=this.relativeTemperature(a);o.length=o.length*l,d=1;for(;p&&o.length=(o.length+d)*l,d++;if(s=n,i++,i>360){for(;o.length=o.length&&(t%=o.length),p.splice(0,0,o[t])}const u=e-d-1;for(let e=1;e=o.length&&(t%=o.length),p.push(o[t])}return p}get complement(){if(null!=this.complementCache)return this.complementCache;const e=this.coldest.hue,t=this.tempsByHct.get(this.coldest),r=this.warmest.hue,a=this.tempsByHct.get(this.warmest)-t,s=Ee.isBetween(this.input.hue,e,r),o=s?r:e,n=s?e:r;let i=1e3,l=this.hctsByHue[Math.round(this.input.hue)];const c=1-this.inputRelativeTemperature;for(let e=0;e<=360;e+=1){const r=X(o+1*e);if(!Ee.isBetween(r,o,n))continue;const s=this.hctsByHue[Math.round(r)],p=(this.tempsByHct.get(s)-t)/a,d=Math.abs(c-p);d=0||(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input)),this.inputRelativeTemperatureCache}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;const e=this.hctsByHue.concat([this.input]),t=new Map;for(const r of e)t.set(r,Ee.rawTemperature(r));return this.tempsByHctCache=t,t}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;const e=[];for(let t=0;t<=360;t+=1){const r=ue.from(t,this.input.chroma,this.input.tone);e.push(r)}return this.hctsByHueCache=e,this.hctsByHueCache}static isBetween(e,t,r){return te.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return ge.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return ge.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return ge.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return ge.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return ge.fromPalette({name:"error_palette_key_color",palette:e=>e.errorPalette,tone:e=>e.errorPalette.keyColor.tone})}background(){return ge.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0})}onBackground(){return ge.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>this.background(),contrastCurve:e=>new ke(3,3,4.5,7)})}surface(){return ge.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0})}surfaceDim(){return ge.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new ke(87,87,80,75).get(e.contrastLevel),isBackground:!0})}surfaceBright(){return ge.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(24,24,29,34).get(e.contrastLevel):98,isBackground:!0})}surfaceContainerLowest(){return ge.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(4,4,2,0).get(e.contrastLevel):100,isBackground:!0})}surfaceContainerLow(){return ge.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(10,10,11,12).get(e.contrastLevel):new ke(96,96,96,95).get(e.contrastLevel),isBackground:!0})}surfaceContainer(){return ge.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(12,12,16,20).get(e.contrastLevel):new ke(94,94,92,90).get(e.contrastLevel),isBackground:!0})}surfaceContainerHigh(){return ge.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(17,17,21,25).get(e.contrastLevel):new ke(92,92,88,85).get(e.contrastLevel),isBackground:!0})}surfaceContainerHighest(){return ge.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ke(22,22,26,30).get(e.contrastLevel):new ke(90,90,84,80).get(e.contrastLevel),isBackground:!0})}onSurface(){return ge.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(4.5,7,11,21)})}surfaceVariant(){return ge.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0})}onSurfaceVariant(){return ge.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(3,4.5,7,11)})}inverseSurface(){return ge.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20,isBackground:!0})}inverseOnSurface(){return ge.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>this.inverseSurface(),contrastCurve:e=>new ke(4.5,7,11,21)})}outline(){return ge.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1.5,3,4.5,7)})}outlineVariant(){return ge.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5)})}shadow(){return ge.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0})}scrim(){return ge.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0})}surfaceTint(){return ge.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0})}primary(){return ge.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>Se(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(3,4.5,7,7),toneDeltaPair:e=>new xe(this.primaryContainer(),this.primary(),10,"nearer",!1)})}primaryDim(){}onPrimary(){return ge.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>Se(e)?e.isDark?10:90:e.isDark?20:100,background:e=>this.primary(),contrastCurve:e=>new ke(4.5,7,11,21)})}primaryContainer(){return ge.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>Te(e)?e.sourceColorHct.tone:Se(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.primaryContainer(),this.primary(),10,"nearer",!1)})}onPrimaryContainer(){return ge.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>Te(e)?ge.foregroundTone(this.primaryContainer().tone(e),4.5):Se(e)?e.isDark?0:100:e.isDark?90:30,background:e=>this.primaryContainer(),contrastCurve:e=>new ke(3,4.5,7,11)})}inversePrimary(){return ge.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>this.inverseSurface(),contrastCurve:e=>new ke(3,4.5,7,7)})}secondary(){return ge.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(3,4.5,7,7),toneDeltaPair:e=>new xe(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}secondaryDim(){}onSecondary(){return ge.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>Se(e)?e.isDark?10:100:e.isDark?20:100,background:e=>this.secondary(),contrastCurve:e=>new ke(4.5,7,11,21)})}secondaryContainer(){return ge.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;return Se(e)?e.isDark?30:85:Te(e)?function(e,t,r,a){let s=r,o=ue.from(e,t,r);if(o.chroman.chroma)break;if(Math.abs(n.chroma-t)<.4)break;Math.abs(n.chroma-t)this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}onSecondaryContainer(){return ge.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>Se(e)?e.isDark?90:10:Te(e)?ge.foregroundTone(this.secondaryContainer().tone(e),4.5):e.isDark?90:30,background:e=>this.secondaryContainer(),contrastCurve:e=>new ke(3,4.5,7,11)})}tertiary(){return ge.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(3,4.5,7,7),toneDeltaPair:e=>new xe(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}tertiaryDim(){}onTertiary(){return ge.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?e.isDark?10:90:e.isDark?20:100,background:e=>this.tertiary(),contrastCurve:e=>new ke(4.5,7,11,21)})}tertiaryContainer(){return ge.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(Se(e))return e.isDark?60:49;if(!Te(e))return e.isDark?30:90;const t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return me.fixIfDisliked(t).tone},isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}onTertiaryContainer(){return ge.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?e.isDark?0:100:Te(e)?ge.foregroundTone(this.tertiaryContainer().tone(e),4.5):e.isDark?90:30,background:e=>this.tertiaryContainer(),contrastCurve:e=>new ke(3,4.5,7,11)})}error(){return ge.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(3,4.5,7,7),toneDeltaPair:e=>new xe(this.errorContainer(),this.error(),10,"nearer",!1)})}errorDim(){}onError(){return ge.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>this.error(),contrastCurve:e=>new ke(4.5,7,11,21)})}errorContainer(){return ge.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.errorContainer(),this.error(),10,"nearer",!1)})}onErrorContainer(){return ge.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>Se(e)?e.isDark?90:10:e.isDark?90:30,background:e=>this.errorContainer(),contrastCurve:e=>new ke(3,4.5,7,11)})}primaryFixed(){return ge.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>Se(e)?40:90,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}primaryFixedDim(){return ge.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>Se(e)?30:80,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}onPrimaryFixed(){return ge.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>Se(e)?100:10,background:e=>this.primaryFixedDim(),secondBackground:e=>this.primaryFixed(),contrastCurve:e=>new ke(4.5,7,11,21)})}onPrimaryFixedVariant(){return ge.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>Se(e)?90:30,background:e=>this.primaryFixedDim(),secondBackground:e=>this.primaryFixed(),contrastCurve:e=>new ke(3,4.5,7,11)})}secondaryFixed(){return ge.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>Se(e)?80:90,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}secondaryFixedDim(){return ge.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>Se(e)?70:80,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}onSecondaryFixed(){return ge.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>this.secondaryFixedDim(),secondBackground:e=>this.secondaryFixed(),contrastCurve:e=>new ke(4.5,7,11,21)})}onSecondaryFixedVariant(){return ge.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>Se(e)?25:30,background:e=>this.secondaryFixedDim(),secondBackground:e=>this.secondaryFixed(),contrastCurve:e=>new ke(3,4.5,7,11)})}tertiaryFixed(){return ge.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?40:90,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}tertiaryFixedDim(){return ge.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?30:80,isBackground:!0,background:e=>this.highestSurface(e),contrastCurve:e=>new ke(1,1,3,4.5),toneDeltaPair:e=>new xe(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}onTertiaryFixed(){return ge.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?100:10,background:e=>this.tertiaryFixedDim(),secondBackground:e=>this.tertiaryFixed(),contrastCurve:e=>new ke(4.5,7,11,21)})}onTertiaryFixedVariant(){return ge.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>Se(e)?90:30,background:e=>this.tertiaryFixedDim(),secondBackground:e=>this.tertiaryFixed(),contrastCurve:e=>new ke(3,4.5,7,11)})}highestSurface(e){return e.isDark?this.surfaceBright():this.surfaceDim()}}function Me(e,t=0,r=100,a=1){return Y(t,r,Ie(e.hue,e.chroma*a,100,!0))}function Oe(e,t=0,r=100){return Y(t,r,Ie(e.hue,e.chroma,0,!1))}function Ie(e,t,r,a){let s=r,o=ue.from(e,t,s);for(;o.chroma100);){r+=a?-1:1;const n=ue.from(e,t,r);o.chromavoid 0!==e)}highestSurface(e){return Le.colorSpec.highestSurface(e)}primaryPaletteKeyColor(){return Le.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return Le.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return Le.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return Le.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return Le.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return Le.colorSpec.errorPaletteKeyColor()}background(){return Le.colorSpec.background()}onBackground(){return Le.colorSpec.onBackground()}surface(){return Le.colorSpec.surface()}surfaceDim(){return Le.colorSpec.surfaceDim()}surfaceBright(){return Le.colorSpec.surfaceBright()}surfaceContainerLowest(){return Le.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return Le.colorSpec.surfaceContainerLow()}surfaceContainer(){return Le.colorSpec.surfaceContainer()}surfaceContainerHigh(){return Le.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return Le.colorSpec.surfaceContainerHighest()}onSurface(){return Le.colorSpec.onSurface()}surfaceVariant(){return Le.colorSpec.surfaceVariant()}onSurfaceVariant(){return Le.colorSpec.onSurfaceVariant()}outline(){return Le.colorSpec.outline()}outlineVariant(){return Le.colorSpec.outlineVariant()}inverseSurface(){return Le.colorSpec.inverseSurface()}inverseOnSurface(){return Le.colorSpec.inverseOnSurface()}shadow(){return Le.colorSpec.shadow()}scrim(){return Le.colorSpec.scrim()}surfaceTint(){return Le.colorSpec.surfaceTint()}primary(){return Le.colorSpec.primary()}primaryDim(){return Le.colorSpec.primaryDim()}onPrimary(){return Le.colorSpec.onPrimary()}primaryContainer(){return Le.colorSpec.primaryContainer()}onPrimaryContainer(){return Le.colorSpec.onPrimaryContainer()}inversePrimary(){return Le.colorSpec.inversePrimary()}primaryFixed(){return Le.colorSpec.primaryFixed()}primaryFixedDim(){return Le.colorSpec.primaryFixedDim()}onPrimaryFixed(){return Le.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return Le.colorSpec.onPrimaryFixedVariant()}secondary(){return Le.colorSpec.secondary()}secondaryDim(){return Le.colorSpec.secondaryDim()}onSecondary(){return Le.colorSpec.onSecondary()}secondaryContainer(){return Le.colorSpec.secondaryContainer()}onSecondaryContainer(){return Le.colorSpec.onSecondaryContainer()}secondaryFixed(){return Le.colorSpec.secondaryFixed()}secondaryFixedDim(){return Le.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return Le.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return Le.colorSpec.onSecondaryFixedVariant()}tertiary(){return Le.colorSpec.tertiary()}tertiaryDim(){return Le.colorSpec.tertiaryDim()}onTertiary(){return Le.colorSpec.onTertiary()}tertiaryContainer(){return Le.colorSpec.tertiaryContainer()}onTertiaryContainer(){return Le.colorSpec.onTertiaryContainer()}tertiaryFixed(){return Le.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return Le.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return Le.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return Le.colorSpec.onTertiaryFixedVariant()}error(){return Le.colorSpec.error()}errorDim(){return Le.colorSpec.errorDim()}onError(){return Le.colorSpec.onError()}errorContainer(){return Le.colorSpec.errorContainer()}onErrorContainer(){return Le.colorSpec.onErrorContainer()}static highestSurface(e){return Le.colorSpec.highestSurface(e)}}Le.contentAccentToneDelta=15,Le.colorSpec=new class extends Pe{surface(){const e=ge.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>(super.surface().tone(e),"phone"===e.platform?e.isDark?4:ue.isYellow(e.neutralPalette.hue)?99:e.variant===$e.VIBRANT?97:98:0),isBackground:!0});return fe(super.surface(),"2025",e)}surfaceDim(){const e=ge.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:ue.isYellow(e.neutralPalette.hue)?90:e.variant===$e.VIBRANT?85:87,isBackground:!0,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===$e.NEUTRAL)return 2.5;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===$e.VIBRANT)return 1.36}return 1}});return fe(super.surfaceDim(),"2025",e)}surfaceBright(){const e=ge.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:ue.isYellow(e.neutralPalette.hue)?99:e.variant===$e.VIBRANT?97:98,isBackground:!0,chromaMultiplier:e=>{if(e.isDark){if(e.variant===$e.NEUTRAL)return 2.5;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===$e.VIBRANT)return 1.36}return 1}});return fe(super.surfaceBright(),"2025",e)}surfaceContainerLowest(){const e=ge.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:!0});return fe(super.surfaceContainerLowest(),"2025",e)}surfaceContainerLow(){const e=ge.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>"phone"===e.platform?e.isDark?6:ue.isYellow(e.neutralPalette.hue)?98:e.variant===$e.VIBRANT?95:96:15,isBackground:!0,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 1.3;if(e.variant===$e.TONAL_SPOT)return 1.25;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===$e.VIBRANT)return 1.08}return 1}});return fe(super.surfaceContainerLow(),"2025",e)}surfaceContainer(){const e=ge.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>"phone"===e.platform?e.isDark?9:ue.isYellow(e.neutralPalette.hue)?96:e.variant===$e.VIBRANT?92:94:20,isBackground:!0,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 1.6;if(e.variant===$e.TONAL_SPOT)return 1.4;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===$e.VIBRANT)return 1.15}return 1}});return fe(super.surfaceContainer(),"2025",e)}surfaceContainerHigh(){const e=ge.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>"phone"===e.platform?e.isDark?12:ue.isYellow(e.neutralPalette.hue)?94:e.variant===$e.VIBRANT?90:92:25,isBackground:!0,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 1.9;if(e.variant===$e.TONAL_SPOT)return 1.5;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===$e.VIBRANT)return 1.22}return 1}});return fe(super.surfaceContainerHigh(),"2025",e)}surfaceContainerHighest(){const e=ge.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:ue.isYellow(e.neutralPalette.hue)?92:e.variant===$e.VIBRANT?88:90,isBackground:!0,chromaMultiplier:e=>e.variant===$e.NEUTRAL?2.2:e.variant===$e.TONAL_SPOT?1.7:e.variant===$e.EXPRESSIVE?ue.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===$e.VIBRANT?1.29:1});return fe(super.surfaceContainerHighest(),"2025",e)}onSurface(){const e=ge.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===$e.VIBRANT?Me(e.neutralPalette,0,100,1.1):ge.getInitialToneFromBackground(e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 2.2;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark?Be(11):Be(9)});return fe(super.onSurface(),"2025",e)}onSurfaceVariant(){const e=ge.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 2.2;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?e.isDark?Be(6):Be(4.5):Be(7)});return fe(super.onSurfaceVariant(),"2025",e)}outline(){const e=ge.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 2.2;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(3):Be(4.5)});return fe(super.outline(),"2025",e)}outlineVariant(){const e=ge.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if("phone"===e.platform){if(e.variant===$e.NEUTRAL)return 2.2;if(e.variant===$e.TONAL_SPOT)return 1.7;if(e.variant===$e.EXPRESSIVE)return ue.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(1.5):Be(3)});return fe(super.outlineVariant(),"2025",e)}inverseSurface(){const e=ge.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:!0});return fe(super.inverseSurface(),"2025",e)}inverseOnSurface(){const e=ge.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>Be(7)});return fe(super.inverseOnSurface(),"2025",e)}primary(){const e=ge.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===$e.NEUTRAL?"phone"===e.platform?e.isDark?80:40:90:e.variant===$e.TONAL_SPOT?"phone"===e.platform?e.isDark?80:Me(e.primaryPalette):Me(e.primaryPalette,0,90):e.variant===$e.EXPRESSIVE?Me(e.primaryPalette,0,ue.isYellow(e.primaryPalette.hue)?25:ue.isCyan(e.primaryPalette.hue)?88:98):Me(e.primaryPalette,0,ue.isCyan(e.primaryPalette.hue)?88:98),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(4.5):Be(7),toneDeltaPair:e=>"phone"===e.platform?new xe(this.primaryContainer(),this.primary(),5,"relative_lighter",!0,"farther"):void 0});return fe(super.primary(),"2025",e)}primaryDim(){return ge.fromPalette({name:"primary_dim",palette:e=>e.primaryPalette,tone:e=>e.variant===$e.NEUTRAL?85:e.variant===$e.TONAL_SPOT?Me(e.primaryPalette,0,90):Me(e.primaryPalette),isBackground:!0,background:e=>this.surfaceContainerHigh(),contrastCurve:e=>Be(4.5),toneDeltaPair:e=>new xe(this.primaryDim(),this.primary(),5,"darker",!0,"farther")})}onPrimary(){const e=ge.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>"phone"===e.platform?this.primary():this.primaryDim(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onPrimary(),"2025",e)}primaryContainer(){const e=ge.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>"watch"===e.platform?30:e.variant===$e.NEUTRAL?e.isDark?30:90:e.variant===$e.TONAL_SPOT?e.isDark?Oe(e.primaryPalette,35,93):Me(e.primaryPalette,0,90):e.variant===$e.EXPRESSIVE?e.isDark?Me(e.primaryPalette,30,93):Me(e.primaryPalette,78,ue.isCyan(e.primaryPalette.hue)?88:90):e.isDark?Oe(e.primaryPalette,66,93):Me(e.primaryPalette,66,ue.isCyan(e.primaryPalette.hue)?88:93),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,toneDeltaPair:e=>"phone"===e.platform?void 0:new xe(this.primaryContainer(),this.primaryDim(),10,"darker",!0,"farther"),contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.primaryContainer(),"2025",e)}onPrimaryContainer(){const e=ge.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onPrimaryContainer(),"2025",e)}primaryFixed(){const e=ge.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let t=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.primaryContainer().getTone(t)},isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.primaryFixed(),"2025",e)}primaryFixedDim(){const e=ge.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new xe(this.primaryFixedDim(),this.primaryFixed(),5,"darker",!0,"exact")});return fe(super.primaryFixedDim(),"2025",e)}onPrimaryFixed(){const e=ge.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>Be(7)});return fe(super.onPrimaryFixed(),"2025",e)}onPrimaryFixedVariant(){const e=ge.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>Be(4.5)});return fe(super.onPrimaryFixedVariant(),"2025",e)}inversePrimary(){const e=ge.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>Me(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.inversePrimary(),"2025",e)}secondary(){const e=ge.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>"watch"===e.platform?e.variant===$e.NEUTRAL?90:Me(e.secondaryPalette,0,90):e.variant===$e.NEUTRAL?e.isDark?Oe(e.secondaryPalette,0,98):Me(e.secondaryPalette):e.variant===$e.VIBRANT?Me(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:Me(e.secondaryPalette),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(4.5):Be(7),toneDeltaPair:e=>"phone"===e.platform?new xe(this.secondaryContainer(),this.secondary(),5,"relative_lighter",!0,"farther"):void 0});return fe(super.secondary(),"2025",e)}secondaryDim(){return ge.fromPalette({name:"secondary_dim",palette:e=>e.secondaryPalette,tone:e=>e.variant===$e.NEUTRAL?85:Me(e.secondaryPalette,0,90),isBackground:!0,background:e=>this.surfaceContainerHigh(),contrastCurve:e=>Be(4.5),toneDeltaPair:e=>new xe(this.secondaryDim(),this.secondary(),5,"darker",!0,"farther")})}onSecondary(){const e=ge.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>"phone"===e.platform?this.secondary():this.secondaryDim(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onSecondary(),"2025",e)}secondaryContainer(){const e=ge.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>"watch"===e.platform?30:e.variant===$e.VIBRANT?e.isDark?Oe(e.secondaryPalette,30,40):Me(e.secondaryPalette,84,90):e.variant===$e.EXPRESSIVE?e.isDark?15:Me(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,toneDeltaPair:e=>"watch"===e.platform?new xe(this.secondaryContainer(),this.secondaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.secondaryContainer(),"2025",e)}onSecondaryContainer(){const e=ge.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onSecondaryContainer(),"2025",e)}secondaryFixed(){const e=ge.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let t=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.secondaryContainer().getTone(t)},isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.secondaryFixed(),"2025",e)}secondaryFixedDim(){const e=ge.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new xe(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",!0,"exact")});return fe(super.secondaryFixedDim(),"2025",e)}onSecondaryFixed(){const e=ge.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>Be(7)});return fe(super.onSecondaryFixed(),"2025",e)}onSecondaryFixedVariant(){const e=ge.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>Be(4.5)});return fe(super.onSecondaryFixedVariant(),"2025",e)}tertiary(){const e=ge.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>"watch"===e.platform?e.variant===$e.TONAL_SPOT?Me(e.tertiaryPalette,0,90):Me(e.tertiaryPalette):e.variant===$e.EXPRESSIVE||e.variant===$e.VIBRANT?Me(e.tertiaryPalette,0,ue.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?Me(e.tertiaryPalette,0,98):Me(e.tertiaryPalette),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(4.5):Be(7),toneDeltaPair:e=>"phone"===e.platform?new xe(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",!0,"farther"):void 0});return fe(super.tertiary(),"2025",e)}tertiaryDim(){return ge.fromPalette({name:"tertiary_dim",palette:e=>e.tertiaryPalette,tone:e=>e.variant===$e.TONAL_SPOT?Me(e.tertiaryPalette,0,90):Me(e.tertiaryPalette),isBackground:!0,background:e=>this.surfaceContainerHigh(),contrastCurve:e=>Be(4.5),toneDeltaPair:e=>new xe(this.tertiaryDim(),this.tertiary(),5,"darker",!0,"farther")})}onTertiary(){const e=ge.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>"phone"===e.platform?this.tertiary():this.tertiaryDim(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onTertiary(),"2025",e)}tertiaryContainer(){const e=ge.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>"watch"===e.platform?e.variant===$e.TONAL_SPOT?Me(e.tertiaryPalette,0,90):Me(e.tertiaryPalette):e.variant===$e.NEUTRAL?e.isDark?Me(e.tertiaryPalette,0,93):Me(e.tertiaryPalette,0,96):e.variant===$e.TONAL_SPOT?Me(e.tertiaryPalette,0,e.isDark?93:100):e.variant===$e.EXPRESSIVE?Me(e.tertiaryPalette,75,ue.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?Me(e.tertiaryPalette,0,93):Me(e.tertiaryPalette,72,100),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,toneDeltaPair:e=>"watch"===e.platform?new xe(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.tertiaryContainer(),"2025",e)}onTertiaryContainer(){const e=ge.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onTertiaryContainer(),"2025",e)}tertiaryFixed(){const e=ge.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let t=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.tertiaryContainer().getTone(t)},isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.tertiaryFixed(),"2025",e)}tertiaryFixedDim(){const e=ge.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new xe(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",!0,"exact")});return fe(super.tertiaryFixedDim(),"2025",e)}onTertiaryFixed(){const e=ge.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>Be(7)});return fe(super.onTertiaryFixed(),"2025",e)}onTertiaryFixedVariant(){const e=ge.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>Be(4.5)});return fe(super.onTertiaryFixedVariant(),"2025",e)}error(){const e=ge.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>"phone"===e.platform?e.isDark?Oe(e.errorPalette,0,98):Me(e.errorPalette):Oe(e.errorPalette),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>"phone"===e.platform?Be(4.5):Be(7),toneDeltaPair:e=>"phone"===e.platform?new xe(this.errorContainer(),this.error(),5,"relative_lighter",!0,"farther"):void 0});return fe(super.error(),"2025",e)}errorDim(){return ge.fromPalette({name:"error_dim",palette:e=>e.errorPalette,tone:e=>Oe(e.errorPalette),isBackground:!0,background:e=>this.surfaceContainerHigh(),contrastCurve:e=>Be(4.5),toneDeltaPair:e=>new xe(this.errorDim(),this.error(),5,"darker",!0,"farther")})}onError(){const e=ge.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>"phone"===e.platform?this.error():this.errorDim(),contrastCurve:e=>"phone"===e.platform?Be(6):Be(7)});return fe(super.onError(),"2025",e)}errorContainer(){const e=ge.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>"watch"===e.platform?30:e.isDark?Oe(e.errorPalette,30,93):Me(e.errorPalette,0,90),isBackground:!0,background:e=>"phone"===e.platform?this.highestSurface(e):void 0,toneDeltaPair:e=>"watch"===e.platform?new xe(this.errorContainer(),this.errorDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>"phone"===e.platform&&e.contrastLevel>0?Be(1.5):void 0});return fe(super.errorContainer(),"2025",e)}onErrorContainer(){const e=ge.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>"phone"===e.platform?Be(4.5):Be(7)});return fe(super.onErrorContainer(),"2025",e)}surfaceVariant(){const e=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return fe(super.surfaceVariant(),"2025",e)}surfaceTint(){const e=Object.assign(this.primary().clone(),{name:"surface_tint"});return fe(super.surfaceTint(),"2025",e)}background(){const e=Object.assign(this.surface().clone(),{name:"background"});return fe(super.background(),"2025",e)}onBackground(){const e=Object.assign(this.onSurface().clone(),{name:"on_background"});return fe(super.onBackground(),"2025",e)}},Le.primaryPaletteKeyColor=Le.colorSpec.primaryPaletteKeyColor(),Le.secondaryPaletteKeyColor=Le.colorSpec.secondaryPaletteKeyColor(),Le.tertiaryPaletteKeyColor=Le.colorSpec.tertiaryPaletteKeyColor(),Le.neutralPaletteKeyColor=Le.colorSpec.neutralPaletteKeyColor(),Le.neutralVariantPaletteKeyColor=Le.colorSpec.neutralVariantPaletteKeyColor(),Le.background=Le.colorSpec.background(),Le.onBackground=Le.colorSpec.onBackground(),Le.surface=Le.colorSpec.surface(),Le.surfaceDim=Le.colorSpec.surfaceDim(),Le.surfaceBright=Le.colorSpec.surfaceBright(),Le.surfaceContainerLowest=Le.colorSpec.surfaceContainerLowest(),Le.surfaceContainerLow=Le.colorSpec.surfaceContainerLow(),Le.surfaceContainer=Le.colorSpec.surfaceContainer(),Le.surfaceContainerHigh=Le.colorSpec.surfaceContainerHigh(),Le.surfaceContainerHighest=Le.colorSpec.surfaceContainerHighest(),Le.onSurface=Le.colorSpec.onSurface(),Le.surfaceVariant=Le.colorSpec.surfaceVariant(),Le.onSurfaceVariant=Le.colorSpec.onSurfaceVariant(),Le.inverseSurface=Le.colorSpec.inverseSurface(),Le.inverseOnSurface=Le.colorSpec.inverseOnSurface(),Le.outline=Le.colorSpec.outline(),Le.outlineVariant=Le.colorSpec.outlineVariant(),Le.shadow=Le.colorSpec.shadow(),Le.scrim=Le.colorSpec.scrim(),Le.surfaceTint=Le.colorSpec.surfaceTint(),Le.primary=Le.colorSpec.primary(),Le.onPrimary=Le.colorSpec.onPrimary(),Le.primaryContainer=Le.colorSpec.primaryContainer(),Le.onPrimaryContainer=Le.colorSpec.onPrimaryContainer(),Le.inversePrimary=Le.colorSpec.inversePrimary(),Le.secondary=Le.colorSpec.secondary(),Le.onSecondary=Le.colorSpec.onSecondary(),Le.secondaryContainer=Le.colorSpec.secondaryContainer(),Le.onSecondaryContainer=Le.colorSpec.onSecondaryContainer(),Le.tertiary=Le.colorSpec.tertiary(),Le.onTertiary=Le.colorSpec.onTertiary(),Le.tertiaryContainer=Le.colorSpec.tertiaryContainer(),Le.onTertiaryContainer=Le.colorSpec.onTertiaryContainer(),Le.error=Le.colorSpec.error(),Le.onError=Le.colorSpec.onError(),Le.errorContainer=Le.colorSpec.errorContainer(),Le.onErrorContainer=Le.colorSpec.onErrorContainer(),Le.primaryFixed=Le.colorSpec.primaryFixed(),Le.primaryFixedDim=Le.colorSpec.primaryFixedDim(),Le.onPrimaryFixed=Le.colorSpec.onPrimaryFixed(),Le.onPrimaryFixedVariant=Le.colorSpec.onPrimaryFixedVariant(),Le.secondaryFixed=Le.colorSpec.secondaryFixed(),Le.secondaryFixedDim=Le.colorSpec.secondaryFixedDim(),Le.onSecondaryFixed=Le.colorSpec.onSecondaryFixed(),Le.onSecondaryFixedVariant=Le.colorSpec.onSecondaryFixedVariant(),Le.tertiaryFixed=Le.colorSpec.tertiaryFixed(),Le.tertiaryFixedDim=Le.colorSpec.tertiaryFixedDim(),Le.onTertiaryFixed=Le.colorSpec.onTertiaryFixed(),Le.onTertiaryFixedVariant=Le.colorSpec.onTertiaryFixedVariant();class De{constructor(e){this.sourceColorArgb=e.sourceColorHct.toInt(),this.variant=e.variant,this.contrastLevel=e.contrastLevel,this.isDark=e.isDark,this.platform=e.platform??"phone",this.specVersion=e.specVersion??"2021",this.sourceColorHct=e.sourceColorHct,this.primaryPalette=e.primaryPalette??Ve(this.specVersion).getPrimaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=e.secondaryPalette??Ve(this.specVersion).getSecondaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=e.tertiaryPalette??Ve(this.specVersion).getTertiaryPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=e.neutralPalette??Ve(this.specVersion).getNeutralPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=e.neutralVariantPalette??Ve(this.specVersion).getNeutralVariantPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=e.errorPalette??Ve(this.specVersion).getErrorPalette(this.variant,e.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??we.fromHueAndChroma(25,84),this.colors=new Le}toString(){return`Scheme: variant=${$e[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(e,t,r){const a=Math.min(t.length-1,r.length),s=e.hue;for(let e=0;e=t[e]&&s=105&&o<125?1.6:2.3));case $e.VIBRANT:const i=Re.getVibrantNeutralHue(t),l=Re.getVibrantNeutralChroma(t,a);return we.fromHueAndChroma(i,1.29*l);default:return super.getNeutralVariantPalette(e,t,r,a,s)}}getErrorPalette(e,t,r,a,s){const o=De.getPiecewiseHue(t,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(e){case $e.NEUTRAL:return we.fromHueAndChroma(o,"phone"===a?50:40);case $e.TONAL_SPOT:return we.fromHueAndChroma(o,"phone"===a?60:48);case $e.EXPRESSIVE:return we.fromHueAndChroma(o,"phone"===a?64:48);case $e.VIBRANT:return we.fromHueAndChroma(o,"phone"===a?80:60);default:return super.getErrorPalette(e,t,r,a,s)}}}const He=new Ae,ze=new Re;function Ve(e){return"2025"===e?ze:He}class _e extends De{constructor(e,t,r,a=De.DEFAULT_SPEC_VERSION,s=De.DEFAULT_PLATFORM){super({sourceColorHct:e,variant:$e.MONOCHROME,contrastLevel:r,isDark:t,platform:s,specVersion:a})}}class Fe extends De{constructor(e,t,r,a=De.DEFAULT_SPEC_VERSION,s=De.DEFAULT_PLATFORM){super({sourceColorHct:e,variant:$e.TONAL_SPOT,contrastLevel:r,isDark:t,platform:s,specVersion:a})}}class Ne extends De{constructor(e,t,r,a=De.DEFAULT_SPEC_VERSION,s=De.DEFAULT_PLATFORM){super({sourceColorHct:e,variant:$e.VIBRANT,contrastLevel:r,isDark:t,platform:s,specVersion:a})}}function qe(e){const t=ee(e),r=te(e),a=re(e),s=[t.toString(16),r.toString(16),a.toString(16)];for(const[e,t]of s.entries())1===t.length&&(s[e]="0"+t);return"#"+s.join("")}function je(e){const t=3===(e=e.replace("#","")).length,r=6===e.length,a=8===e.length;if(!t&&!r&&!a)throw new Error("unexpected hex "+e);let s=0,o=0,n=0;return t?(s=Ye(e.slice(0,1).repeat(2)),o=Ye(e.slice(1,2).repeat(2)),n=Ye(e.slice(2,3).repeat(2))):r?(s=Ye(e.slice(0,2)),o=Ye(e.slice(2,4)),n=Ye(e.slice(4,6))):a&&(s=Ye(e.slice(2,4)),o=Ye(e.slice(4,6)),n=Ye(e.slice(6,8))),(255<<24|(255&s)<<16|(255&o)<<8|255&n)>>>0}function Ye(e){return parseInt(e,16)}function We(e){const t=Math.round,r=e.length,a={};return"rgb"===e.slice(0,3).toLowerCase()?(e=e.replace(" ","").split(","),a[0]=parseInt(e[0].slice("a"===e[3].toLowerCase()?5:4),10),a[1]=parseInt(e[1],10),a[2]=parseInt(e[2],10),a[3]=e[3]?parseFloat(e[3]):-1):(e=r<6?parseInt(String(e[1])+e[1]+e[2]+e[2]+e[3]+e[3]+(r>4?String(e[4])+e[4]:""),16):parseInt(e.slice(1),16),a[0]=e>>16&255,a[1]=e>>8&255,a[2]=255&e,a[3]=9===r||5===r?t((e>>24&255)/255*1e4)/1e4:-1),a}function Xe(e,t,r=.5){const a=Math.round;e=e.trim(),t=t.trim();r=r<0?-1*r:r;const s=We(e),o=We(t);return"r"===t[0]?"rgb"+("a"===t[3]?"a(":"(")+a((o[0]-s[0])*r+s[0])+","+a((o[1]-s[1])*r+s[1])+","+a((o[2]-s[2])*r+s[2])+(s[3]<0&&o[3]<0?"":","+(s[3]>-1&&o[3]>-1?a(1e4*((o[3]-s[3])*r+s[3]))/1e4:o[3]<0?s[3]:o[3]))+")":"#"+(4294967296+16777216*(s[3]>-1&&o[3]>-1?a(255*((o[3]-s[3])*r+s[3])):o[3]>-1?a(255*o[3]):s[3]>-1?a(255*s[3]):255)+65536*a((o[0]-s[0])*r+s[0])+256*a((o[1]-s[1])*r+s[1])+a((o[2]-s[2])*r+s[2])).toString(16).slice(s[3]>-1||o[3]>-1?1:3)}let Ue=null;const Ge={},Ke=(e="",t="default")=>{const r=`${e}-${t}`;if(Ge[r])return Ge[r];if(Ue&&t.includes("monochrome")){const a=Ke(e,"monochrome"===t?"default":"vibrant");return Ge[r]={light:{...a.light,...Ue.light},dark:{...a.dark,...Ue.dark}},Ge[r]}const a=je(`#${e.replace("#","")}`);let s,o;const n=ue.fromInt(a);"default"===t&&(s=new Fe(n,!1,0,"2025"),o=new Fe(n,!0,0,"2025")),"vibrant"===t&&(s=new Ne(n,!1,0,"2025"),o=new Ne(n,!0,0,"2025")),t.includes("monochrome")&&(s=new _e(n,!1,0,"2025"),o=new _e(n,!0,0,"2025"));const i=e=>{let t=e;return"surface_dim"===e&&(t="surface_variant"),"surface_container_low"===e&&(t="surface_1"),"surface_container"===e&&(t="surface_2"),"surface_container_high"===e&&(t="surface_3"),"surface_container_highest"===e&&(t="surface_4"),t},l={light:{},dark:{}};s.colors.allColors.forEach(e=>{const t=i(e.name),r=e.getArgb(s);l.light[t]=r}),o.colors.allColors.forEach(e=>{const t=i(e.name),r=e.getArgb(o);l.dark[t]=r}),l.light.surface_5=je(Xe(qe(l.light.surface_4),qe(l.light.primary),.05)),l.dark.surface_5=je(Xe(qe(l.dark.surface_4),qe(l.dark.primary),.05));const c=e=>e.replace(/_/g,"-"),p=e=>{const r=["inverse_primary","primary","on_primary","primary_container","on_primary_container","secondary","on_secondary","secondary_container","on_secondary_container","outline","outline_variant"],a=["on_surface","on_surface_variant","inverse_on_surface","inverse_surface","surface","surface_variant","surface_1","surface_2","surface_3","surface_4","surface_5"];return("default"===t||"vibrant"===t?[...r,...a]:a).includes(e)},d={},u={};if(Object.keys(l.light).forEach(e=>{p(e)&&(d[c(`--f7-md-${e}`)]=qe(l.light[e]))}),Object.keys(l.dark).forEach(e=>{p(e)&&(u[c(`--f7-md-${e}`)]=qe(l.dark[e]))}),t.includes("monochrome")){Ue={light:d,dark:u};const a=Ke(e,"monochrome"===t?"default":"vibrant");return Ge[r]={light:{...a.light,...d},dark:{...a.dark,...u}},Ge[r]}return Ge[r]={light:d,dark:u},Ge[r]};let Qe=0;function Je(e="xxxxxxxxxx",t="0123456789abcdef"){const r=t.length;return e.replace(/x/g,()=>t[Math.floor(Math.random()*r)])}const Ze='\n \n \n \n \n \n'.trim(),et=`\n \n ${[0,1,2,3,4,5,6,7].map(()=>'').join("")}\n \n`.trim();function tt(e){let t;return e.split("").map((e,r)=>e.match(/[A-Z]/)&&0!==r&&!t?(t=!0,`:${e.toLowerCase()}`):e.toLowerCase()).join("")}function rt(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}function at(e){return N().requestAnimationFrame(e)}function st(e,t=0){return setTimeout(e,t)}function ot(e){return at(()=>{at(e)})}function nt(){return Date.now()}function it(e){const t=N(),r={};let a,s,o,n,i=e||t.location.href;if("string"==typeof i&&i.length)for(i=i.indexOf("?")>-1?i.replace(/\S*\?/,""):"",s=i.split("&").filter(e=>""!==e),n=s.length,a=0;a6&&(s=s.split(", ").map(e=>e.replace(",",".")).join(", ")),o=new r.WebKitCSSMatrix("none"===s?"":s)):(o=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=o.toString().split(",")),"x"===t&&(s=r.WebKitCSSMatrix?o.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(s=r.WebKitCSSMatrix?o.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),s||0}function ct(e,t=[]){if("string"==typeof e)return e;const r=[];let a;function s(e){if(t.length>0){let r="";for(let e=0;e{let i;if(Array.isArray(e[n])){i=[];for(let r=0;r0&&r.push(i.join("&"))}else null===e[n]||""===e[n]?r.push(`${s(n)}=`):"object"==typeof e[n]?(a=t.slice(),a.push(n),i=ct(e[n],a),""!==i&&r.push(i)):void 0!==e[n]&&""!==e[n]?r.push(`${s(n)}=${o(e[n])}`):""===e[n]&&r.push(s(n))}),r.join("&")}function pt(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object}function dt(...e){const t=e[0];e.splice(0,1);const r=e;for(let a=0;at+t+r+r+a+a),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?r.slice(1).map(e=>parseInt(e,16)):null}function mt(e,t,r){const a=[e,t,r].map(e=>{const t=e.toString(16);return 1===t.length?`0${t}`:t}).join("");return`#${a}`}function ft(e,t,r){e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=a-s;let n;0===o?n=0:a===e?n=(t-r)/o%6:a===t?n=(r-e)/o+2:a===r&&(n=(e-t)/o+4);const i=(s+a)/2;return n<0&&(n=6+n),[60*n,0===o?0:o/(1-Math.abs(2*i-1)),i]}function gt(e,t,r){const a=(1-Math.abs(2*r-1))*t,s=e/60,o=a*(1-Math.abs(s%2-1));let n;Number.isNaN(e)||void 0===e?n=[0,0,0]:s<=1?n=[a,o,0]:s<=2?n=[o,a,0]:s<=3?n=[0,a,o]:s<=4?n=[0,o,a]:s<=5?n=[o,0,a]:s<=6&&(n=[a,0,o]);const i=r-a/2;return n.map(e=>Math.max(0,Math.min(255,Math.round(255*(e+i)))))}function vt(e,t,r){const a={h:e,s:0,l:0},s=t,o=r;return a.l=(2-s)*o/2,a.s=a.l&&a.l<1?s*o/(a.l<.5?2*a.l:2-2*a.l):a.s,[a.h,a.s,a.l]}function bt(e,t,r){const a={h:e,s:0,b:0},s=r,o=t*(s<.5?s:1-s);return a.b=s+o,a.s=s>0?2*o/a.b:a.s,[a.h,a.s,a.b]}const yt=e=>{const t=ft(...e),r=[t[0],t[1],Math.max(0,t[2]-.08)],a=[t[0],t[1],Math.max(0,t[2]+.08)];return{shade:mt(...gt(...r)),tint:mt(...gt(...a))}};function wt(...e){let t,r,a;if(1===e.length?(t=e[0],r=ht(t)):2===e.length?(t=e[0],r=ht(t),a=e[1]||"default"):3===e.length?(r=e,t=mt(...r)):4===e.length&&(r=e.slice(0,3),t=mt(...r),a=e[3]||"default"),!r)return{};const{light:s,dark:o}=Ke(t,a),n=yt(r),i=yt(ht(s["--f7-md-primary"])),l=yt(ht(o["--f7-md-primary"]));return Object.keys(s).forEach(e=>{e.includes("surface-")&&!e.includes("-rgb")&&(s[`${e}-rgb`]=ht(s[e]))}),Object.keys(o).forEach(e=>{e.includes("surface-")&&!e.includes("-rgb")&&(o[`${e}-rgb`]=ht(o[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":t,"--f7-ios-primary-shade":n.shade,"--f7-ios-primary-tint":n.tint,"--f7-ios-primary-rgb":r.join(", "),"--f7-md-primary-shade":i.shade,"--f7-md-primary-tint":i.tint,"--f7-md-primary-rgb":ht(s["--f7-md-primary"]).join(", "),...s},dark:{"--f7-md-primary-shade":l.shade,"--f7-md-primary-tint":l.tint,"--f7-md-primary-rgb":ht(o["--f7-md-primary"]).join(", "),...o}}}function Ct(e,t){Object.keys(t).forEach(r=>{pt(t[r])&&Object.keys(t[r]).forEach(a=>{"function"==typeof t[r][a]&&(t[r][a]=t[r][a].bind(e))}),e[r]=t[r]})}function Et(...e){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Et(...e)):t.push(e)}),t}var kt=Object.freeze({__proto__:null,bindMethods:Ct,cancelAnimationFrame:function(e){return N().cancelAnimationFrame(e)},colorHexToRgb:ht,colorHsbToHsl:vt,colorHslToHsb:bt,colorHslToRgb:gt,colorRgbToHex:mt,colorRgbToHsl:ft,colorThemeCSSProperties:wt,colorThemeCSSStyles:function(e={},t="default"){const r=e=>{let t="";return Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),t},a=wt(e.primary,t),s=[":root{",r(a.light),"--swiper-theme-color:var(--f7-theme-color);",...Object.keys(e).map(t=>`--f7-color-${t}: ${e[t]};`),"}",".dark{",r(a.dark),"}",".ios, .ios .dark{",r(a.ios),"}",".md, .md .dark{",r(a.md),"}"].join(""),o={};Object.keys(e).forEach(r=>{const a=e[r];o[r]=wt(a,t)});let n="";return Object.keys(e).forEach(t=>{const{light:a,dark:s,ios:i,md:l}=o[t],c="\n --f7-ios-primary: #ffffff;\n --f7-ios-primary-shade: #ebebeb;\n --f7-ios-primary-tint: #ffffff;\n --f7-ios-primary-rgb: 255, 255, 255;\n --f7-md-primary-shade: #eee;\n --f7-md-primary-tint: #fff;\n --f7-md-primary-rgb: 255, 255, 255;\n --f7-md-primary: #fff;\n --f7-md-on-primary: #000;\n --f7-md-primary-container: #fff;\n --f7-md-on-primary-container: #000;\n --f7-md-secondary: #fff;\n --f7-md-on-secondary: #000;\n --f7-md-secondary-container: #555;\n --f7-md-on-secondary-container: #fff;\n --f7-md-surface: #fff;\n --f7-md-on-surface: #000;\n --f7-md-surface-variant: #333;\n --f7-md-on-surface-variant: #fff;\n --f7-md-outline: #fff;\n --f7-md-outline-variant: #fff;\n --f7-md-inverse-surface: #000;\n --f7-md-inverse-on-surface: #fff;\n --f7-md-inverse-primary: #000;\n --f7-md-surface-1: #f8f8f8;\n --f7-md-surface-2: #f1f1f1;\n --f7-md-surface-3: #e7e7e7;\n --f7-md-surface-4: #e1e1e1;\n --f7-md-surface-5: #d7d7d7;\n --f7-md-surface-variant-rgb: 51, 51, 51;\n --f7-md-on-surface-variant-rgb: 255, 255, 255;\n --f7-md-surface-1-rgb: 248, 248, 248;\n --f7-md-surface-2-rgb: 241, 241, 241;\n --f7-md-surface-3-rgb: 231, 231, 231;\n --f7-md-surface-4-rgb: 225, 225, 225;\n --f7-md-surface-5-rgb: 215, 215, 215;\n ",p="\n --f7-ios-primary: #000;\n --f7-ios-primary-shade: #000;\n --f7-ios-primary-tint: #232323;\n --f7-ios-primary-rgb: 0, 0, 0;\n --f7-md-primary-shade: #000;\n --f7-md-primary-tint: #232323;\n --f7-md-primary-rgb: 0, 0, 0;\n --f7-md-primary: #000;\n --f7-md-on-primary: #fff;\n --f7-md-primary-container: #000;\n --f7-md-on-primary-container: #fff;\n --f7-md-secondary: #000;\n --f7-md-on-secondary: #fff;\n --f7-md-secondary-container: #aaa;\n --f7-md-on-secondary-container: #000;\n --f7-md-surface: #000;\n --f7-md-on-surface: #fff;\n --f7-md-surface-variant: #ccc;\n --f7-md-on-surface-variant: #000;\n --f7-md-outline: #000;\n --f7-md-outline-variant: #000;\n --f7-md-inverse-surface: #fff;\n --f7-md-inverse-on-surface: #000;\n --f7-md-inverse-primary: #fff;\n --f7-md-surface-1: #070707;\n --f7-md-surface-2: #161616;\n --f7-md-surface-3: #232323;\n --f7-md-surface-4: #303030;\n --f7-md-surface-5: #373737;\n --f7-md-surface-variant-rgb: 204, 204, 204;\n --f7-md-on-surface-variant-rgb: 0, 0, 0;\n --f7-md-surface-1-rgb: 7, 7, 7;\n --f7-md-surface-2-rgb: 22, 22, 22;\n --f7-md-surface-3-rgb: 35, 35, 35;\n --f7-md-surface-4-rgb: 48, 48, 48;\n --f7-md-surface-5-rgb: 55, 55, 55;\n ",d="white"===t?c:"black"===t?p:r(a),u="white"===t?c:"black"===t?p:r(s);n+=[`.color-${t} {`,d,"--swiper-theme-color: var(--f7-theme-color);","}",`.color-${t}.dark, .color-${t} .dark, .dark .color-${t} {`,u,"--swiper-theme-color: var(--f7-theme-color);","}",`.ios .color-${t}, .ios.color-${t}, .ios .dark .color-${t}, .ios .dark.color-${t} {`,r(i),"}",`.md .color-${t}, .md.color-${t}, .md .dark .color-${t}, .md .dark.color-${t} {`,r(l),"}",`.text-color-${t} {`,`--f7-theme-color-text-color: ${e[t]};`,"}",`.bg-color-${t} {`,`--f7-theme-color-bg-color: ${e[t]};`,"}",`.border-color-${t} {`,`--f7-theme-color-border-color: ${e[t]};`,"}",`.ripple-color-${t} {`,`--f7-theme-color-ripple-color: rgba(${a["--f7-ios-primary-rgb"]}, 0.3);`,"}"].join("")}),`${s}${n}`},deleteProps:rt,eventNameToColonCase:tt,extend:ut,flattenArray:Et,getTranslate:lt,id:Je,iosPreloaderContent:et,isObject:pt,mdPreloaderContent:Ze,merge:dt,nextFrame:ot,nextTick:st,now:nt,parseUrlQuery:it,requestAnimationFrame:at,serializeObject:ct,uniqueNumber:function(){return Qe+=1,Qe}});let xt,$t;function Tt(){return xt||(xt=function(){const e=N(),t=_();return{touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),xt}const St=(()=>{const e=_();try{return Boolean(e&&e.body&&e.body.getBoundingClientRect&&e.body.getBoundingClientRect().width>0)}catch(e){return!1}})();function Pt(e={},t=St){return $t&&!t||($t=function({userAgent:e}={}){const t=Tt(),r=N(),a=r.navigator.platform,s=e||r.navigator.userAgent,o={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!!r.cordova,electron:!1,capacitor:!!r.Capacitor,nwjs:!1},n=r.screen.width,i=r.screen.height,l=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad).*OS\s([\d_]+)/);const p=s.match(/(iPod)(.*OS\s([\d_]+))?/),d=!c&&s.match(/(iPhone\sOS|iOS|iPhone;\sCPU\sOS)\s([\d_]+)/),u=s.indexOf("MSIE ")>=0||s.indexOf("Trident/")>=0,h=s.indexOf("Edge/")>=0,m=s.indexOf("Gecko/")>=0&&s.indexOf("Firefox/")>=0,f="Win32"===a,g=s.toLowerCase().indexOf("electron")>=0,v="undefined"!=typeof nw&&"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.nw;let b="MacIntel"===a;return!c&&b&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${n}x${i}`)>=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),b=!1),o.ie=u,o.edge=h,o.firefox=m,l&&(o.os="android",o.osVersion=l[2],o.android=!0,o.androidChrome=s.toLowerCase().indexOf("chrome")>=0),(c||d||p)&&(o.os="ios",o.ios=!0),d&&!p&&(o.osVersion=d[2].replace(/_/g,"."),o.iphone=!0),c&&(o.osVersion=c[2].replace(/_/g,"."),o.ipad=!0),p&&(o.osVersion=p[3]?p[3].replace(/_/g,"."):null,o.ipod=!0),o.ios&&o.osVersion&&s.indexOf("Version/")>=0&&"10"===o.osVersion.split(".")[0]&&(o.osVersion=s.toLowerCase().split("version/")[1].split(" ")[0]),o.webView=!(!(d||c||p)||!s.match(/.*AppleWebKit(?!.*Safari)/i)&&!r.navigator.standalone)||r.matchMedia&&r.matchMedia("(display-mode: standalone)").matches,o.webview=o.webView,o.standalone=o.webView,o.desktop=!(o.ios||o.android)||g||v,o.desktop&&(o.electron=g,o.nwjs=v,o.macos=b,o.windows=f,o.macos&&(o.os="macos"),o.windows&&(o.os="windows")),o.pixelRatio=r.devicePixelRatio||1,o.prefersColorScheme=function(){let e;return r.matchMedia&&r.matchMedia("(prefers-color-scheme: light)").matches&&(e="light"),r.matchMedia&&r.matchMedia("(prefers-color-scheme: dark)").matches&&(e="dark"),e},o}(e)),$t}class Mt{constructor(e=[]){this.eventsParents=e,this.eventsListeners={}}on(e,t,r){const a=this;if("function"!=typeof t)return a;const s=r?"unshift":"push";return e.split(" ").forEach(e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][s](t)}),a}once(e,t,r){const a=this;if("function"!=typeof t)return a;function s(...r){a.off(e,s),s.f7proxy&&delete s.f7proxy,t.apply(a,r)}return s.f7proxy=t,a.on(e,s,r)}off(e,t){const r=this;return r.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?r.eventsListeners[e]=[]:r.eventsListeners[e]&&r.eventsListeners[e].forEach((a,s)=>{(a===t||a.f7proxy&&a.f7proxy===t)&&r.eventsListeners[e].splice(s,1)})}),r):r}emit(...e){const t=this;if(!t.eventsListeners)return t;let r,a,s,o;"string"==typeof e[0]||Array.isArray(e[0])?(r=e[0],a=e.slice(1,e.length),s=t,o=t.eventsParents):(r=e[0].events,a=e[0].data,s=e[0].context||t,o=e[0].local?[]:e[0].parents||t.eventsParents);const n=Array.isArray(r)?r:r.split(" "),i=n.map(e=>e.replace("local::","")),l=n.filter(e=>e.indexOf("local::")<0);return i.forEach(e=>{if(t.eventsListeners&&t.eventsListeners[e]){const r=[];t.eventsListeners[e].forEach(e=>{r.push(e)}),r.forEach(e=>{e.apply(s,a)})}}),o&&o.length>0&&o.forEach(e=>{e.emit(l,...a)}),t}}class Ot extends Mt{constructor(e={},t=[]){super(t);const r=this;r.params=e,r.params&&r.params.on&&Object.keys(r.params.on).forEach(e=>{r.on(e,r.params.on[e])})}useModuleParams(e,t){if(e.params){const r={};Object.keys(e.params).forEach(e=>{void 0!==t[e]&&(r[e]=ut({},t[e]))}),ut(t,e.params),Object.keys(r).forEach(e=>{ut(t[e],r[e])})}}useModulesParams(e){const t=this;t.modules&&Object.keys(t.modules).forEach(r=>{const a=t.modules[r];a.params&&ut(e,a.params)})}useModule(e="",t={}){const r=this;if(!r.modules)return;const a="string"==typeof e?r.modules[e]:e;a&&(a.instance&&Object.keys(a.instance).forEach(e=>{const t=a.instance[e];r[e]="function"==typeof t?t.bind(r):t}),a.on&&r.on&&Object.keys(a.on).forEach(e=>{r.on(e,a.on[e])}),a.vnode&&(r.vnodeHooks||(r.vnodeHooks={}),Object.keys(a.vnode).forEach(e=>{Object.keys(a.vnode[e]).forEach(t=>{const s=a.vnode[e][t];r.vnodeHooks[t]||(r.vnodeHooks[t]={}),r.vnodeHooks[t][e]||(r.vnodeHooks[t][e]=[]),r.vnodeHooks[t][e].push(s.bind(r))})})),a.create&&a.create.bind(r)(t))}useModules(e={}){const t=this;t.modules&&Object.keys(t.modules).forEach(r=>{const a=e[r]||{};t.useModule(r,a)})}static set components(e){this.use&&this.use(e)}static installModule(e,...t){const r=this;r.prototype.modules||(r.prototype.modules={});const a=e.name||`${Object.keys(r.prototype.modules).length}_${nt()}`;return r.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach(t=>{r.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(t=>{r[t]=e.static[t]}),e.install&&e.install.apply(r,t),r}static use(e,...t){const r=this;return Array.isArray(e)?(e.forEach(e=>r.installModule(e)),r):r.installModule(e,...t)}}function It(e={}){const{defaultSelector:t,constructor:r,domProp:a,app:s,addMethods:o}=e,n={create:(...e)=>s?new r(s,...e):new r(...e),get(e=t){if(e instanceof r)return e;const s=R(e);return 0!==s.length?s[0][a]:void 0},destroy(e){const t=n.get(e);if(t&&t.destroy)return t.destroy()}};return o&&Array.isArray(o)&&o.forEach(e=>{n[e]=(r=t,...a)=>{const s=n.get(r);if(s&&s[e])return s[e](...a)}}),n}function Bt(e={}){const{defaultSelector:t,constructor:r,app:a}=e,s=ut(It({defaultSelector:t,constructor:r,app:a,domProp:"f7Modal"}),{open(e,t,s){let o=R(e);if(o.length>1&&s){const e=R(s).parents(".page");e.length&&o.each(t=>{const r=R(t);r.parents(e)[0]===e[0]&&(o=r)})}if(o.length>1&&(o=o.eq(o.length-1)),!o.length)return;let n=o[0].f7Modal;if(!n){const e=o.dataset();n=new r(a,{el:o,...e})}return n.open(t)},close(e=t,s,o){let n=R(e);if(!n.length)return;if(n.length>1){let e;if(o){const t=R(o);t.length&&(e=t.parents(n))}n=e&&e.length>0?e:n.eq(n.length-1)}let i=n[0].f7Modal;if(!i){const e=n.dataset();i=new r(a,{el:n,...e})}return i.close(s)}});return s}const Lt=[];const Dt=(e,t,...r)=>{const a=t||{},s=r||[],o=Object.keys(a).map(e=>"_"===e[0]?a[e]?e.replace("_",""):"":`${e}="${a[e]}"`).filter(e=>!!e).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return`<${e} ${o} />`.trim();return`<${e} ${o}>${s.filter(e=>!!e).map(e=>Array.isArray(e)?e.join(""):e).join("")}`.trim()};class At extends Ot{constructor(e={}){if(super(e),At.instance&&"undefined"!=typeof window)throw new Error("Framework7 is already initialized and can't be initialized more than once");const t=Pt({userAgent:e.userAgent||void 0}),r=Tt(),a=ut({},e),s=this;s.device=t,s.support=r;const o=N(),n=_();At.instance=s;const i={el:"body",theme:"auto",routes:[],name:"Framework7",lazyModulesPath:null,initOnDeviceReady:!0,init:!0,darkMode:void 0,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0,userAgent:null,url:null,mdColorScheme:"default",colors:{primary:"#007aff",red:"#ff3b30",green:"#4cd964",blue:"#2196f3",pink:"#ff2d55",yellow:"#ffcc00",orange:"#ff9500",purple:"#9c27b0",deeppurple:"#673ab7",lightblue:"#5ac8fa",teal:"#009688",lime:"#cddc39",deeporange:"#ff6b22",white:"#ffffff",black:"#000000"}};return s.useModulesParams(i),s.params=ut(i,e),ut(s,{name:s.params.name,routes:s.params.routes,theme:"auto"===s.params.theme?t.ios?"ios":"md":s.params.theme,passedParams:a,online:o.navigator.onLine,colors:s.params.colors,mdColorScheme:s.params.mdColorScheme||"default",darkMode:s.params.darkMode}),e.store&&(s.params.store=e.store),s.$el&&s.$el[0]&&(s.$el[0].f7=s),s.useModules(),s.initStore(),s.params.init&&(t.cordova&&s.params.initOnDeviceReady?R(n).on("deviceready",()=>{s.init()}):s.init()),s}setColorTheme(e,t){if(!e)return;const r=this;r.colors.primary=e,r.mdColorScheme=t||r.mdColorScheme,r.setColors()}setMdColorScheme(e){const t=this;t.mdColorScheme=e||t.mdColorScheme,t.setColors()}setColors(){const e=this,t=_();e.colorsStyleEl||(e.colorsStyleEl=t.createElement("style"),t.head.prepend(e.colorsStyleEl)),e.colorsStyleEl.textContent=e.utils.colorThemeCSSStyles(e.colors,e.mdColorScheme)}mount(e){const t=this,r=N(),a=_(),s=R(e||t.params.el).eq(0);t.$el=s,t.$el&&t.$el[0]&&(t.el=t.$el[0],t.el.f7=t,t.rtl="rtl"===s.css("direction"));const o="(prefers-color-scheme: dark)",n="(prefers-color-scheme: light)";t.mq={},r.matchMedia&&(t.mq.dark=r.matchMedia(o),t.mq.light=r.matchMedia(n)),t.colorSchemeListener=function({matches:e,media:r}){if(!e)return;const s=a.querySelector("html");r===o?(s.classList.add("dark"),t.darkMode=!0,t.emit("darkModeChange",!0)):r===n&&(s.classList.remove("dark"),t.darkMode=!1,t.emit("darkModeChange",!1))},t.emit("mount")}initStore(){const e=this;void 0!==e.params.store&&e.params.store.__store?e.store=e.params.store:e.store=e.createStore(e.params.store)}enableAutoDarkMode(){const e=N(),t=_();if(!e.matchMedia)return;const r=this,a=t.querySelector("html");r.mq.dark&&r.mq.light&&(r.mq.dark.addEventListener("change",r.colorSchemeListener),r.mq.light.addEventListener("change",r.colorSchemeListener)),r.mq.dark&&r.mq.dark.matches?(a.classList.add("dark"),r.darkMode=!0,r.emit("darkModeChange",!0)):r.mq.light&&r.mq.light.matches&&(a.classList.remove("dark"),r.darkMode=!1,r.emit("darkModeChange",!1))}disableAutoDarkMode(){if(!N().matchMedia)return;const e=this;e.mq.dark&&e.mq.dark.removeEventListener("change",e.colorSchemeListener),e.mq.light&&e.mq.light.removeEventListener("change",e.colorSchemeListener)}setDarkMode(e){const t=this;"auto"===e?t.enableAutoDarkMode():(t.disableAutoDarkMode(),R("html")[e?"addClass":"removeClass"]("dark"),t.darkMode=e)}initAppComponent(e){const t=this;t.router.componentLoader(t.params.component,t.params.componentUrl,{componentOptions:{el:t.$el[0]}},r=>{t.$el=R(r),t.$el[0].f7=t,t.$elComponent=r.f7Component,t.el=t.$el[0],e&&e()},()=>{})}init(e){const t=this;t.setColors(),t.mount(e);const r=()=>{if(t.initialized)return;t.$el.addClass("framework7-initializing"),t.rtl&&R("html").attr("dir","rtl"),void 0===t.params.darkMode?t.darkMode=R("html").hasClass("dark"):t.setDarkMode(t.params.darkMode);const e=N();e.addEventListener("offline",()=>{t.online=!1,t.emit("offline"),t.emit("connection",!1)}),e.addEventListener("online",()=>{t.online=!0,t.emit("online"),t.emit("connection",!0)}),t.$el.addClass("framework7-root"),R("html").removeClass("ios md").addClass(t.theme),t.params.iosTranslucentBars&&"ios"===t.theme&&R("html").addClass("ios-translucent-bars"),t.params.iosTranslucentModals&&"ios"===t.theme&&R("html").addClass("ios-translucent-modals"),ot(()=>{t.$el.removeClass("framework7-initializing")}),t.initialized=!0,t.emit("init")};return t.params.component||t.params.componentUrl?t.initAppComponent(()=>{r()}):r(),t}loadModule(...e){return At.loadModule(...e)}loadModules(...e){return At.loadModules(...e)}getVnodeHooks(e,t){const r=this;return r.vnodeHooks&&r.vnodeHooks[e]&&r.vnodeHooks[e][t]||[]}get $(){return R}static get Dom7(){return R}static get $(){return R}static get device(){return Pt()}static get support(){return Tt()}static get Class(){return Ot}static get Events(){return Mt}}At.$jsx=Dt,At.ModalMethods=Bt,At.ConstructorMethods=It,At.loadModule=function(e){const t=this,r=N(),a=_();return new Promise((s,o)=>{const n=t.instance;let i,l,c;if(e){if("string"==typeof e){const t=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&t&&t[0].length===e.length){if(!n||n&&!n.params.lazyModulesPath)return void o(new Error('Framework7: "lazyModulesPath" app parameter must be specified to fetch module by name'));i=`${n.params.lazyModulesPath}/${e}/${e}.lazy.js`}else i=e}else"function"==typeof e?c=e:l=e;if(c){const e=c(t,!1);if(!e)return void o(new Error("Framework7: Can't find Framework7 component in specified component function"));if(t.prototype.modules&&t.prototype.modules[e.name])return void s();p(e),s()}if(l){const e=l;if(!e)return void o(new Error("Framework7: Can't find Framework7 component in specified component"));if(t.prototype.modules&&t.prototype.modules[e.name])return void s();p(e),s()}if(i){if(Lt.indexOf(i)>=0)return void s();Lt.push(i);const e=new Promise((e,s)=>{fetch(i).then(e=>e.text()).then(o=>{const n=`f7_component_loader_callback_${Je()}`,l=a.createElement("script");l.innerHTML=`window.${n} = function (Framework7, Framework7AutoInstallComponent) {return ${o.trim()}}`,R("head").append(l);const c=r[n];delete r[n],R(l).remove();const d=c(t,!1);d?(t.prototype.modules&&t.prototype.modules[d.name]||p(d),e()):s(new Error(`Framework7: Can't find Framework7 component in ${i} file`))}).catch(e=>{s(e)})}),l=new Promise(e=>{fetch(i.replace(".lazy.js",n.rtl?".rtl.css":".css").replace(".js",n.rtl?".rtl.css":".css")).then(e=>e.text()).then(t=>{const r=a.createElement("style");r.innerHTML=t,R("head").append(r),e()}).catch(()=>{e()})});Promise.all([e,l]).then(()=>{s()}).catch(e=>{o(e)})}}else o(new Error("Framework7: Lazy module must be specified"));function p(e){t.use(e),n&&(n.useModuleParams(e,n.params),n.useModule(e))}})},At.loadModules=function(e){return Promise.all(e.map(e=>At.loadModule(e)))};var Rt={name:"device",static:{getDevice:Pt},on:{init(){const e=_(),t=Pt(),r=[],a=e.querySelector("html"),s=e.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');a&&(t.standalone&&t.ios&&s&&"black-translucent"===s.content&&r.push("device-full-viewport"),r.push(`device-pixel-ratio-${Math.floor(t.pixelRatio)}`),t.os&&!t.desktop?r.push(`device-${t.os}`):t.desktop&&(r.push("device-desktop"),t.os&&r.push(`device-${t.os}`)),t.cordova&&r.push("device-cordova"),t.capacitor&&r.push("device-capacitor"),r.forEach(e=>{a.classList.add(e)}))}}},Ht={name:"support",static:{getSupport:Tt}},zt={name:"utils",proto:{utils:kt},static:{utils:kt}},Vt={name:"resize",create(){const e=this;e.getSize=()=>{if(!e.el)return{width:0,height:0,left:0,top:0};const t=e.$el.offset(),[r,a,s,o]=[e.el.offsetWidth,e.el.offsetHeight,t.left,t.top];return e.width=r,e.height=a,e.left=s,e.top=o,{width:r,height:a,left:s,top:o}}},on:{init(){const e=this,t=N();e.getSize(),t.addEventListener("resize",()=>{e.emit("resize")},!1),t.addEventListener("orientationchange",()=>{e.emit("orientationchange")})},orientationchange(){const e=_();Pt().ipad&&(e.body.scrollLeft=0,setTimeout(()=>{e.body.scrollLeft=0},0))},resize(){this.getSize()}}};var _t={name:"touch",params:{touch:{touchClicksDistanceThreshold:5,disableContextMenu:!1,tapHold:!1,tapHoldDelay:750,tapHoldPreventClicks:!0,activeState:!0,activeStateElements:"a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .link, .item-link, .accordion-item-toggle",activeStateOnMouseMove:!1,touchRipple:!0,touchRippleElements:".ripple, .link, .item-link, .list label.item-content, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .list.accordion-list .accordion-item-toggle",touchRippleInsetElements:".ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back",touchHighlight:!0,touchHighlightElements:".toolbar-pane, .navbar .left, .navbar .right, .actions-group:not(.actions-grid .actions-group), .searchbar-input-wrap, .searchbar-disable-button, .subnavbar, .searchbar-input-wrap .autocomplete-dropdown, .messagebar-area, .notification, .toast, .fab > a"}},create(){const e=Tt();ut(this,{touchEvents:{start:e.touch?"touchstart":"pointerdown",move:e.touch?"touchmove":"pointermove",end:e.touch?"touchend":"pointerup"}})},on:{init:function(){const e=this,t=Pt(),r=Tt(),a=N(),s=_(),o=e.params.touch,n=o.touchRipple&&"md"===e.theme;let i,l,c,p,d,u,h,m,f,g,v,b,y;function w(e){const t=R(e),r=t.parents(o.activeStateElements);if(t.closest(".no-active-state").length)return null;let a;if(t.is(o.activeStateElements)&&(a=t),r.length>0&&(a=a?a.add(r):r),a&&a.length>1){const e=[];let t;for(let r=0;r0}function E(){m&&m.addClass("active-state")}function k(){m&&(m.removeClass("active-state"),m=null)}function x(t,r,a){t&&(g=e.touchRipple.create(e,t,r,a))}function $(){g&&(g.remove(),g=void 0,v=void 0)}function T(e){if(v=function(e){const t=o.touchRippleElements,r=R(e);if(r.is(t))return!r.hasClass("no-ripple")&&r;if(r.parents(t).length>0){const e=r.parents(t).eq(0);return!e.hasClass("no-ripple")&&e}return!1}(e),!v||0===v.length)return void(v=void 0);C(v)?(clearTimeout(b),b=setTimeout(()=>{$(),x(v,i,l)},80)):($(),x(v,i,l))}function S(){clearTimeout(b),$()}function P(){g||!v||p?$():(clearTimeout(b),x(v,i,l),setTimeout($,0))}function M(){R(".active-state").removeClass("active-state"),n&&P()}t.ios&&t.webView&&a.addEventListener("touchstart",()=>{});let O=!1,I=null;const B=".dialog-button, .actions-button";let L=!1,D=null;function A(t,r){e.emit({events:t,data:[r]})}const H={passive:!0},z={passive:!1};s.addEventListener("click",function(e){A("click",e)},!0),s.addEventListener(e.touchEvents.start,function(e){A("touchstart touchstart:active",e)},{passive:!1,capture:!0}),s.addEventListener(e.touchEvents.move,function(e){A("touchmove touchmove:active",e)},z),s.addEventListener(e.touchEvents.end,function(e){A("touchend touchend:active",e)},z),s.addEventListener(e.touchEvents.start,function(e){A("touchstart:passive",e)},{passive:!0,capture:!0}),s.addEventListener(e.touchEvents.move,function(e){A("touchmove:passive",e)},H),s.addEventListener(e.touchEvents.end,function(e){A("touchend:passive",e)},H),r.touch?(e.on("click",function(e){const r=e&&e.detail&&"f7Overswipe"===e.detail,a=e&&e.detail&&"f7Segmented"===e.detail,s=e&&e.detail&&"f7TouchMoveActivable"===e.detail;let n=h;return c&&e.target!==c?n=!(r||a||s):s&&(n=!1),o.tapHold&&o.tapHoldPreventClicks&&d&&(n=!0),n&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault()),o.tapHold&&(u=setTimeout(()=>{d=!1},t.ios||t.androidChrome?100:400)),h=!1,c=null,!n}),e.on("touchstart",function(t){return!t.isTrusted||(p=!1,d=!1,h=!1,y=void 0,t.targetTouches.length>1?(m&&k(),!0):(t.touches.length>1&&m&&k(),o.tapHold&&(u&&clearTimeout(u),u=setTimeout(()=>{t&&t.touches&&t.touches.length>1||(d=!0,t.preventDefault(),h=!0,R(t.target).trigger("taphold",t),e.emit("taphold",t))},o.tapHoldDelay)),c=t.target,i=t.targetTouches[0].pageX,l=t.targetTouches[0].pageY,O=t.target.closest(".segmented-strong .button-active, .segmented-strong .tab-link-active"),L="ios"===e.theme&&t.target.closest(B),O&&(I=O.closest(".segmented-strong")),o.activeState&&(m=w(c),m&&!C(m)?E():m&&(f=setTimeout(E,80))),n&&T(c),!0))}),e.on("touchmove",function(e){if(!e.isTrusted)return;let t,r,a=!0;"touchmove"===e.type&&(t=e.targetTouches[0],r=o.touchClicksDistanceThreshold);const d=e.targetTouches[0].pageX,g=e.targetTouches[0].pageY;if(void 0===y&&(y=!!(y||Math.abs(g-l)>Math.abs(d-i))),(L||!y&&O&&I)&&e.cancelable&&e.preventDefault(),!y&&O&&I){const t=s.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY).closest(".segmented-strong .button:not(.button-active):not(.tab-link-active)");t&&I.contains(t)&&(R(t).trigger("click","f7Segmented"),c=t)}if(r&&t){const e=t.pageX,a=t.pageY;(Math.abs(e-i)>r||Math.abs(a-l)>r)&&(p=!0)}else p=!0;if(p){if(h=!0,L){const t=s.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);D=t.closest(B),D&&m&&m[0]===D?a=!1:D&&setTimeout(()=>{m=w(D),E()})}o.tapHold&&clearTimeout(u),o.activeState&&a&&(clearTimeout(f),k()),n&&S()}}),e.on("touchend",function(e){return!(e.isTrusted&&(y=void 0,O=!1,I=null,L=!1,clearTimeout(f),clearTimeout(u),D&&(R(D).trigger("click","f7TouchMoveActivable"),D=null),s.activeElement===e.target?(o.activeState&&k(),n&&P(),0):(o.activeState&&(E(),setTimeout(k,0)),n&&P(),(o.tapHoldPreventClicks&&d||h)&&(e.cancelable&&e.preventDefault(),h=!0,1))))}),s.addEventListener("touchcancel",function(){c=null,clearTimeout(f),clearTimeout(u),o.activeState&&k(),n&&P()},{passive:!0})):o.activeState&&(e.on("touchstart",function(e){const t=w(e.target);t&&(t.addClass("active-state"),"which"in e&&3===e.which&&setTimeout(()=>{R(".active-state").removeClass("active-state")},0)),n&&(i=e.pageX,l=e.pageY,T(e.target,e.pageX,e.pageY))}),e.on("touchmove",function(){o.activeStateOnMouseMove||R(".active-state").removeClass("active-state"),n&&S()}),e.on("touchend",M),s.addEventListener("pointercancel",M,{passive:!0})),s.addEventListener("contextmenu",e=>{o.disableContextMenu&&(t.ios||t.android||t.cordova||a.Capacitor&&(a.Capacitor.isNative||a.Capacitor.isNativePlatform&&a.Capacitor.isNativePlatform()))&&e.preventDefault(),n&&(m&&k(),P())})}}};function Ft(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;n+=e[i++]}if(!n)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:n}),r=i}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),a=t.prefixes,s=void 0===a?"./":a,o="[^".concat(qt(t.delimiter||"/#?"),"]+?"),n=[],i=0,l=0,c="",p=function(e){if(l-1:void 0===k;s||(g+="(?:".concat(f,"(?=").concat(m,"))?")),x||(g+="(?=".concat(f,"|").concat(m,")"))}return new RegExp(g,jt(r))}(Ft(e,r),t,r)}function Wt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,s=r.exec(e.source);s;)t.push({name:s[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),s=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var a=e.map(function(e){return Wt(e,t,r).source});return new RegExp("(?:".concat(a.join("|"),")"),jt(r))}(e,t,r):Yt(e,t,r)}const Xt={queue:[],clearQueue(){if(0===Xt.queue.length)return;Xt.queue.shift()()},routerQueue:[],clearRouterQueue(){if(0===Xt.routerQueue.length)return;const e=Xt.routerQueue.pop(),{router:t,stateUrl:r,action:a}=e;let s=t.params.animate;!1===t.params.browserHistoryAnimate&&(s=!1),"back"===a&&t.back({animate:s,browserHistory:!1}),"load"===a&&t.navigate(r,{animate:s,browserHistory:!1})},handle(e){if(Xt.blockPopstate)return;let t=e.state;Xt.previousState=Xt.state,Xt.state=t,Xt.allowChange=!0,Xt.clearQueue(),t=Xt.state,t||(t={}),this.views.forEach(e=>{const r=e.router;let a=t[e.id];if(!a&&e.params.browserHistory&&(a={url:e.router.history[0]}),!a)return;const s=a.url||void 0;let o=r.params.animate;!1===r.params.browserHistoryAnimate&&(o=!1),s!==r.url&&(r.history.indexOf(s)>=0?r.allowPageChange?r.back({animate:o,browserHistory:!1}):Xt.routerQueue.push({action:"back",router:r}):r.allowPageChange?r.navigate(s,{animate:o,browserHistory:!1}):Xt.routerQueue.unshift({action:"load",stateUrl:s,router:r}))})},initViewState(e,t){const r=N(),a=ut({},Xt.state||{},{[e]:t});Xt.state=a,r.history.replaceState(a,"")},push(e,t,r){const a=N(),s=_();if("#!/"===r.substr(-3)&&""===(r=r.replace("#!/",""))&&(r=s.location.href).includes("#!/")&&(r=s.location.href.split("#!/")[0]),!Xt.allowChange)return void Xt.queue.push(()=>{Xt.push(e,t,r)});Xt.previousState=Xt.state;const o=ut({},Xt.previousState||{},{[e]:t});Xt.state=o,a.history.pushState(o,"",r)},replace(e,t,r){const a=N();if("#!/"===r.substr(-3)&&(r=r.replace("#!/","")),!Xt.allowChange)return void Xt.queue.push(()=>{Xt.replace(e,t,r)});Xt.previousState=Xt.state;const s=ut({},Xt.previousState||{},{[e]:t});Xt.state=s,a.history.replaceState(s,"",r)},go(e){const t=N();Xt.allowChange=!1,t.history.go(e)},back(){const e=N();Xt.allowChange=!1,e.history.back()},allowChange:!0,previousState:{},state:{},blockPopstate:!0,init(e){const t=N(),r=_();Xt.state=t.history.state,R(t).on("load",()=>{setTimeout(()=>{Xt.blockPopstate=!1},0)}),r.readyState&&"complete"===r.readyState&&(Xt.blockPopstate=!1),R(t).on("popstate",Xt.handle.bind(e))}};function Ut(e,t,r){const a=this,s=t.route.redirect,o="forward"===e?"navigate":"back";if(r.initial&&a.params.browserHistory&&(r.replaceState=!0,r.history=!0),"function"==typeof s){a.allowPageChange=!1;const n=s.call(a,{router:a,to:t,resolve:function(e,t={}){a.allowPageChange=!0,a[o](e,ut({},r,t))},reject:function(){a.allowPageChange=!0},direction:e,app:a.app});return n&&"string"==typeof n?(a.allowPageChange=!0,a[o](n,r)):a}return a[o](s,r)}function Gt(e,t,r,a,s,o,n,i){const l=[];Array.isArray(r)?l.push(...r):r&&"function"==typeof r&&l.push(r),t&&(Array.isArray(t)?l.push(...t):l.push(t)),function t(){if(0===l.length)return void o();l.shift().call(e,{router:e,to:a,from:s,resolve(){t()},reject(){n()},direction:i,app:e.app})}()}function Kt(e,t,r,a,s){const o=this;function n(){e&&e.route&&(o.params.routesBeforeEnter||e.route.beforeEnter)?(o.allowPageChange=!1,Gt(o,o.params.routesBeforeEnter,e.route.beforeEnter,e,t,()=>{o.allowPageChange=!0,r()},()=>{a()},s)):r()}t&&t.route&&(o.params.routesBeforeLeave||t.route.beforeLeave)?(o.allowPageChange=!1,Gt(o,o.params.routesBeforeLeave,t.route.beforeLeave,e,t,()=>{o.allowPageChange=!0,n()},()=>{a()},s)):n()}function Qt(e,t){if(!e.view)throw new Error(`Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router.${t}(...)`)}function Jt(e,t,r,a){function s(e){e.then(e=>{r({component:e.default||e._default||e})}).catch(e=>{throw a(),new Error(e,{cause:e})})}if(t instanceof Promise)return void s(t);const o=t.call(e);o instanceof Promise?s(o):r({component:o})}function Zt(e,t,r={}){const a=_(),s=R(t),o=e.app,n=e.view,i=ut(!1,{animate:e.params.animate,browserHistory:!0,replaceState:!1,history:!0,reloadCurrent:e.params.reloadPages,reloadPrevious:!1,reloadAll:!1,clearPreviousHistory:!1,reloadDetail:e.params.reloadDetail,on:{}},r),l=e.params.masterDetailBreakpoint>0,c=l&&i.route&&i.route.route&&(!0===i.route.route.master||"function"==typeof i.route.route.master&&i.route.route.master(o,e));let p,d,u,h=0,m=e.currentRoute.modal;if(m||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(t=>{e.currentRoute&&e.currentRoute.route&&e.currentRoute.route[t]&&(m=!0,u=t)}),m){const t=e.currentRoute.modal||e.currentRoute.route.modalInstance||o[u].get(),r=e.history[e.history.length-2];let a=e.findMatchingRoute(r);!a&&r&&(a={url:r,path:r.split("?")[0],query:it(r),route:{path:r.split("?")[0],url:r}}),e.modalRemove(t)}const f=e.$el,g=s,v=i.reloadPrevious||i.reloadCurrent||i.reloadAll;let b;if(e.allowPageChange=!1,0===g.length)return e.allowPageChange=!0,e;g.length&&e.removeThemeElements(g),i.route&&i.route.route&&i.route.route.keepAlive&&!i.route.route.keepAliveData&&(i.route.route.keepAliveData={pageEl:s[0]});const y=f.children(".page").filter(e=>e!==g[0]);if(i.reloadPrevious&&y.length<2)return e.allowPageChange=!0,e;let w,C,E;if(l&&!i.reloadAll){for(let e=0;e=e.params.masterDetailBreakpoint&&p}w&&(E=!d||C||i.reloadAll||i.reloadCurrent);let k="next";if(i.reloadCurrent||i.reloadAll||C?k="current":i.reloadPrevious&&(k="previous"),g.removeClass("page-previous page-current page-next").addClass(`page-${k}${c?" page-master":""}${w?" page-master-detail":""}${E?" page-master-detail-root":""}`).trigger("page:unstack").trigger("page:position",{position:k}),e.emit("pageUnstack",g[0]),e.emit("pagePosition",g[0],k),(c||w)&&(g.trigger("page:role",{role:c?"master":"detail",root:!!E}),e.emit("pageRole",g[0],{role:c?"master":"detail",detailRoot:!!E})),i.reloadCurrent||C)C?(b=y.filter(e=>!e.classList.contains("page-master")),b.length>1&&p&&(h=b.length-1,R(p).removeClass("page-master-stacked").trigger("page:masterunstack"),e.emit("pageMasterUnstack",p))):b=y.eq(y.length-1);else if(i.reloadPrevious)b=y.eq(y.length-2);else if(i.reloadAll)b=y.filter(e=>e!==g[0]);else{const t=[];if(y.length>1){let r=0;for(r=0;re!==g[0]&&t.indexOf(e)<0)}if(w&&!i.reloadAll&&(b.length>1||C)&&(b=b.filter(e=>!e.classList.contains("page-master"))),e.params.browserHistory&&(i.browserHistory||i.replaceState)&&!i.reloadPrevious){const t=e.params.browserHistoryRoot||"";Xt[i.reloadCurrent||C&&d||i.reloadAll||i.replaceState?"replace":"push"](n.id,{url:i.route.url},t+e.params.browserHistorySeparator+i.route.url)}i.reloadPrevious||(e.currentPageEl=g[0],e.currentRoute=i.route);const x=i.route.url;i.history&&(((i.reloadCurrent||C&&d)&&e.history.length)>0||i.replaceState?(C&&h>0&&(e.history=e.history.slice(0,e.history.length-h),e.propsHistory=e.propsHistory.slice(0,e.propsHistory.length-h)),e.history[e.history.length-(i.reloadPrevious?2:1)]=x,e.propsHistory[e.propsHistory.length-(i.reloadPrevious?2:1)]=i.props||{}):i.reloadPrevious?(e.history[e.history.length-2]=x,e.propsHistory[e.propsHistory.length-2]=i.props||{}):i.reloadAll?(e.history=[x],e.propsHistory=[i.props||{}]):(e.history.push(x),e.propsHistory.push(i.props||{}))),e.saveHistory();const $=g.parents(a).length>0,T=g[0].f7Component;if(i.reloadPrevious?T&&!$?T.mount(e=>{R(e).insertBefore(b)}):g.insertBefore(b):b.next(".page")[0]!==g[0]&&(T&&!$?T.mount(e=>{f.append(e)}):f.append(g[0])),$?i.route&&i.route.route&&i.route.route.keepAlive&&!g[0].f7PageMounted&&(g[0].f7PageMounted=!0,e.pageCallback("mounted",g,k,v?k:"current",i,b)):e.pageCallback("mounted",g,k,v?k:"current",i,b),(i.reloadCurrent||C)&&b.length>0?(e.pageCallback("beforeOut",b,"current",void 0,i),e.pageCallback("afterOut",b,"current",void 0,i),e.pageCallback("beforeRemove",b,"current",void 0,i),e.removePage(b)):i.reloadAll?b.each(t=>{const r=R(t);r.hasClass("page-current")&&(e.pageCallback("beforeOut",b,"current",void 0,i),e.pageCallback("afterOut",b,"current",void 0,i)),e.pageCallback("beforeRemove",r,"previous",void 0,i),e.removePage(r)}):i.reloadPrevious&&(e.pageCallback("beforeRemove",b,"previous",void 0,i),e.removePage(b)),i.route.route.tab&&e.tabLoad(i.route.route.tab,ut({},i,{history:!1,browserHistory:!1})),l&&n.checkMasterDetailBreakpoint(),e.pageCallback("init",g,k,v?k:"current",i,b),i.reloadCurrent||i.reloadAll||C)return e.allowPageChange=!0,e.pageCallback("beforeIn",g,k,"current",i),g.removeAttr("aria-hidden"),e.pageCallback("afterIn",g,k,"current",i),i.reloadCurrent&&i.clearPreviousHistory&&e.clearPreviousHistory(),C&&e.setPagePosition(R(p),"previous"),e;if(i.reloadPrevious)return e.allowPageChange=!0,e;function S(){e.setPagePosition(g,"current",!1),e.setPagePosition(b,"previous",!b.hasClass("page-master")),e.allowPageChange=!0,e.pageCallback("afterOut",b,"current","previous",i),e.pageCallback("afterIn",g,"next","current",i);let t=(e.params.preloadPreviousPage||e.params[`${o.theme}SwipeBack`])&&!c;t||(g.hasClass("smart-select-page")||g.hasClass("photo-browser-page")||g.hasClass("autocomplete-page")||g.hasClass("color-picker-page"))&&(t=!0),t||g.attr("data-name")&&"smart-select-page"===g.attr("data-name")||(e.pageCallback("beforeRemove",b,"previous",void 0,i),e.removePage(b)),i.clearPreviousHistory&&e.clearPreviousHistory(),e.emit("routeChanged",e.currentRoute,e.previousRoute,e),e.params.browserHistory&&Xt.clearRouterQueue()}function P(){e.setPagePosition(b,"current",!1),e.setPagePosition(g,"next",!1)}if(e.pageCallback("beforeOut",b,"current","previous",i),e.pageCallback("beforeIn",g,"next","current",i),!i.animate||c&&o.width>=e.params.masterDetailBreakpoint)S();else{const t=e.params[`${e.app.theme}PageLoadDelay`];let r=e.params.transition;i.transition&&(r=i.transition),!r&&e.currentRoute&&e.currentRoute.route&&(r=e.currentRoute.route.transition),!r&&e.currentRoute&&e.currentRoute.route.options&&(r=e.currentRoute.route.options.transition),r&&(g[0].f7PageTransition=r),t?setTimeout(()=>{P(),e.animate(b,g,"forward",r,()=>{S()})},t):(P(),e.animate(b,g,"forward",r,()=>{S()}))}return e}function er(e,t={},r={},a){if(!e.allowPageChange&&!a)return e;const s=t,o=r,{url:n,content:i,el:l,pageName:c,component:p,componentUrl:d}=s;if(!o.reloadCurrent&&o.route&&o.route.route&&o.route.route.parentPath&&e.currentRoute.route&&e.currentRoute.route.parentPath===o.route.route.parentPath){if(o.route.url===e.url)return e.allowPageChange=!0,!1;let t=Object.keys(o.route.params).length===Object.keys(e.currentRoute.params).length;if(t&&Object.keys(o.route.params).forEach(r=>{r in e.currentRoute.params&&e.currentRoute.params[r]===o.route.params[r]||(t=!1)}),t)return!!o.route.route.tab&&e.tabLoad(o.route.route.tab,o);if(!t&&o.route.route.tab&&e.currentRoute.route.tab&&e.currentRoute.parentPath===o.route.parentPath)return e.tabLoad(o.route.route.tab,o)}if(o.route&&o.route.url&&e.url===o.route.url&&!o.reloadCurrent&&!o.reloadPrevious&&!e.params.allowDuplicateUrls)return e.allowPageChange=!0,!1;if(!o.route&&n&&(o.route=e.parseRouteUrl(n),ut(o.route,{route:{url:n,path:n}})),(n||d||p)&&(e.allowPageChange=!1),i)Zt(e,e.getPageEl(i),o);else if(l)Zt(e,e.getPageEl(l),o);else if(c)Zt(e,e.$el.children(`.page[data-name="${c}"]`).eq(0),o);else if(p||d)try{e.pageComponentLoader({routerEl:e.el,component:p,componentUrl:d,options:o,resolve:function(t,r){return Zt(e,t,ut(o,r))},reject:function(){return e.allowPageChange=!0,e}})}catch(t){throw e.allowPageChange=!0,t}else n&&(e.xhrAbortController&&(e.xhrAbortController.abort(),e.xhrAbortController=!1),e.xhrRequest(n,o).then(t=>{Zt(e,e.getPageEl(t),o)}).catch(()=>{e.allowPageChange=!0}));return e}function tr(e,t,r){const a=Pt(),s=_(),o=R(t),n=e.app,i=e.view,l=ut(!1,{animate:e.params.animate,browserHistory:!0,replaceState:!1},r),c=e.params.masterDetailBreakpoint>0,p=c&&l.route&&l.route.route&&(!0===l.route.route.master||"function"==typeof l.route.route.master&&l.route.route.master(n,e));let d,u;const h=o,m=e.$el.children(".page-current"),f=0===m.length&&l.preload,g=c&&m.hasClass("page-master");if(h.length&&e.removeThemeElements(h),e.allowPageChange=!1,0===h.length||0===m.length&&!l.preload)return e.allowPageChange=!0,e;let v,b,y;if(e.removeThemeElements(h),l.route&&l.route.route&&l.route.route.keepAlive&&!l.route.route.keepAliveData&&(l.route.route.keepAliveData={pageEl:o[0]}),c){const t=e.$el.children(".page").filter(e=>e!==h[0]);for(let e=0;ee.history.indexOf(d.f7Page.route.url),!v&&!p&&d&&d.f7Page&&l.route.route.masterRoute&&(v=l.route.route.masterRoute.path===d.f7Page.route.route.path)}if(v&&d&&d.f7Page&&(b=e.history.indexOf(l.route.url)-e.history.indexOf(d.f7Page.route.url)===1),h.addClass(`page-${f?"current":"previous"}${p?" page-master":""}${v?" page-master-detail":""}${b?" page-master-detail-root":""}`).removeAttr("aria-hidden").trigger("page:unstack").trigger("page:position",{position:f?"current":"previous"}),e.emit("pageUnstack",h[0]),e.emit("pagePosition",h[0],f?"current":"previous"),(p||v)&&(h.trigger("page:role",{role:p?"master":"detail",root:!!b}),e.emit("pageRole",h[0],{role:p?"master":"detail",detailRoot:!!b})),l.force&&m.prev(".page-previous").length>=0){e.history.indexOf(l.route.url)>=0?(y=e.history.length-e.history.indexOf(l.route.url)-1,e.history=e.history.slice(0,e.history.indexOf(l.route.url)+2),e.propsHistory=e.propsHistory.slice(0,e.history.indexOf(l.route.url)+2),i.history=e.history):e.history[[e.history.length-2]]?e.propsHistory[e.propsHistory.length-2]=l.props||{}:(e.history.unshift(e.url),e.propsHistory.unshift(l.props||{}));const t=m.prev(".page-previous");t.length>0&&(e.pageCallback("beforeRemove",t,"previous",void 0,l),t[0]===d&&(u=!0),e.removePage(t))}const w=h.parents(s).length>0,C=h[0].f7Component;function E(){f&&(!w&&C?C.mount(t=>{e.$el.append(t)}):e.$el.append(h)),0===h.next(m).length&&(!w&&C?C.mount(e=>{R(e).insertBefore(m)}):h.insertBefore(m)),w?l.route&&l.route.route&&l.route.route.keepAlive&&!h[0].f7PageMounted&&(h[0].f7PageMounted=!0,e.pageCallback("mounted",h,"previous","current",l,m)):e.pageCallback("mounted",h,"previous","current",l,m)}if(l.preload){E(),l.route.route.tab&&e.tabLoad(l.route.route.tab,ut({},l,{history:!1,browserHistory:!1,preload:!0})),p&&(h.removeClass("page-master-stacked").trigger("page:masterunstack"),e.emit("pageMasterUnstack",h[0])),e.pageCallback("init",h,"previous","current",l,m),f&&(e.pageCallback("beforeIn",h,"current",void 0,l),e.pageCallback("afterIn",h,"current",void 0,l));const t=h.prevAll(".page-previous:not(.page-master)");return t.length>0&&t.each(t=>{const r=R(t);e.pageCallback("beforeRemove",r,"previous",void 0),e.removePage(r)}),e.allowPageChange=!0,e}if(!(a.ie||a.edge||a.firefox&&!a.ios)&&e.params.browserHistory&&l.browserHistory)if(l.replaceState){const t=e.params.browserHistoryRoot||"";Xt.replace(i.id,{url:l.route.url},t+e.params.browserHistorySeparator+l.route.url)}else y?Xt.go(-y):Xt.back();if(l.replaceState?(e.history[e.history.length-1]=l.route.url,e.propsHistory[e.propsHistory.length-1]=l.props||{}):(1===e.history.length&&(e.history.unshift(e.url),e.propsHistory.unshift(l.props||{})),e.history.pop(),e.propsHistory.pop()),e.saveHistory(),e.currentPageEl=h[0],e.currentRoute=l.route,(a.ie||a.edge||a.firefox&&!a.ios)&&e.params.browserHistory&&l.browserHistory)if(l.replaceState){const t=e.params.browserHistoryRoot||"";Xt.replace(i.id,{url:l.route.url},t+e.params.browserHistorySeparator+l.route.url)}else y?Xt.go(-y):Xt.back();function k(){e.setPagePosition(h,"current",!1),e.setPagePosition(m,"next",!0),e.pageCallback("afterOut",m,"current","next",l),e.pageCallback("afterIn",h,"previous","current",l),e.pageCallback("beforeRemove",m,"next",void 0,l),e.removePage(m),e.allowPageChange=!0,e.emit("routeChanged",e.currentRoute,e.previousRoute,e);(e.params.preloadPreviousPage||e.params[`${n.theme}SwipeBack`])&&e.history[e.history.length-2]&&!p&&e.back(e.history[e.history.length-2],{preload:!0,props:e.propsHistory[e.propsHistory.length-2]||{}}),e.params.browserHistory&&Xt.clearRouterQueue()}if(E(),l.route.route.tab&&e.tabLoad(l.route.route.tab,ut({},l,{history:!1,browserHistory:!1})),c&&(g||u)&&i.checkMasterDetailBreakpoint(!1),e.pageCallback("init",h,"previous","current",l,m),e.pageCallback("beforeOut",m,"current","next",l),e.pageCallback("beforeIn",h,"previous","current",l),!l.animate||g&&n.width>=e.params.masterDetailBreakpoint)k();else{let t=e.params.transition;m[0]&&m[0].f7PageTransition&&(t=m[0].f7PageTransition,delete m[0].f7PageTransition),l.transition&&(t=l.transition),!t&&e.previousRoute&&e.previousRoute.route&&(t=e.previousRoute.route.transition),!t&&e.previousRoute&&e.previousRoute.route&&e.previousRoute.route.options&&(t=e.previousRoute.route.options.transition),e.setPagePosition(m,"current"),e.setPagePosition(h,"previous",!1),e.animate(m,h,"backward",t,()=>{k()})}return e}function rr(e,t,r,a){if(!e.allowPageChange&&!a)return e;const s=t,o=r,{url:n,content:i,el:l,pageName:c,component:p,componentUrl:d}=s;if(o.route.url&&e.url===o.route.url&&!o.reloadCurrent&&!o.reloadPrevious&&!e.params.allowDuplicateUrls)return e.allowPageChange=!0,!1;if(!o.route&&n&&(o.route=e.parseRouteUrl(n)),(n||d||p)&&(e.allowPageChange=!1),i)tr(e,e.getPageEl(i),o);else if(l)tr(e,e.getPageEl(l),o);else if(c)tr(e,e.$el.children(`.page[data-name="${c}"]`).eq(0),o);else if(p||d)try{e.pageComponentLoader({routerEl:e.el,component:p,componentUrl:d,options:o,resolve:function(t,r){return tr(e,t,ut(o,r))},reject:function(){return e.allowPageChange=!0,e},direction:"backward"})}catch(t){throw e.allowPageChange=!0,t}else n&&(e.xhrAbortController&&(e.xhrAbortController.abort(),e.xhrAbortController=!1),e.xhrRequest(n,o).then(t=>{tr(e,e.getPageEl(t),o)}).catch(()=>{e.allowPageChange=!0}));return e}class ar extends Ot{constructor(e,t){super({},[void 0===t?e:t]);const r=this;r.isAppRouter=void 0===t,r.isAppRouter?ut(!1,r,{app:e,params:e.params.view,routes:e.routes||[],cache:e.cache}):ut(!1,r,{app:e,view:t,viewId:t.id,id:t.params.routerId,params:t.params,routes:t.routes,history:t.history,propsHistory:[],scrollHistory:t.scrollHistory,cache:e.cache,initialPages:[]}),r.useModules(),r.allowPageChange=!0;let a={},s={};return Object.defineProperty(r,"currentRoute",{enumerable:!0,configurable:!0,set(e={}){s=ut({},a),a=e,a&&(r.url=a.url,r.emit("routeChange",e,s,r))},get:()=>a}),Object.defineProperty(r,"previousRoute",{enumerable:!0,configurable:!0,get:()=>s,set(e){s=e}}),r}mount(){const e=this,t=e.view;ut(!1,e,{tempDom:_().createElement("div"),$el:t.$el,el:t.el}),e.emit("local::mount routerMount",e)}animate(e,t,r,a,s){const o=this;if(o.params.animateCustom)return void o.params.animateCustom.apply(o,[e,t,r,s]);const n="ios"===o.app.theme;if(a){const n=`router-transition-custom router-transition-${a}-${r}`,i=()=>{o.$el.removeClass(n),s&&s()};return("forward"===r?t:e).animationEnd(i),void o.$el.addClass(n)}const i=`router-transition-${r} router-transition`;("forward"===r?t:n?e:t).animationEnd(()=>{o.$el.removeClass(i),s&&s()}),o.$el.addClass(i)}removeModal(e){this.removeEl(e)}removeTabContent(e){R(e).html("")}removePage(e){const t=R(e),r=t&&t[0]&&t[0].f7Page;r&&r.route&&r.route.route&&r.route.route.keepAlive?t.remove():this.removeEl(e)}removeEl(e){if(!e)return;const t=this,r=R(e);0!==r.length&&(r.find(".tab").each(e=>{R(e).children().each(e=>{e.f7Component&&(R(e).trigger("tab:beforeremove"),e.f7Component.destroy())})}),r[0].f7Component&&r[0].f7Component.destroy&&r[0].f7Component.destroy(),t.params.removeElements&&(t.params.removeElementsWithTimeout?setTimeout(()=>{r.remove()},t.params.removeElementsTimeout):r.remove()))}getPageEl(e){const t=this;if("string"==typeof e)t.tempDom.innerHTML=e;else{if(R(e).hasClass("page"))return e;t.tempDom.innerHTML="",R(t.tempDom).append(e)}return t.findElement(".page",t.tempDom)}findElement(e,t){const r=this,a=r.view,s=r.app,o=R(t),n=e;let i=o.find(n).filter(e=>0===R(e).parents(".popup, .dialog, .popover, .actions-modal, .sheet-modal, .login-screen, .page").length);return i.length>1&&("string"==typeof a.selector&&(i=o.find(`${a.selector} ${n}`)),i.length>1&&(i=o.find(`.${s.params.viewMainClass} ${n}`))),1===i.length?i:(i=r.findElement(n,o),i&&1===i.length?i:i&&i.length>1?R(i[0]):void 0)}flattenRoutes(e=this.routes){const t=this;let r=[];return e.forEach(e=>{let a=!1;if("tabs"in e&&e.tabs){const s=e.tabs.map(t=>{const r=ut({},e,{path:`${e.path}/${t.path}`.replace("///","/").replace("//","/"),parentPath:e.path,tab:t});return delete r.tabs,delete r.routes,r});a=!0,r=r.concat(t.flattenRoutes(s))}if("detailRoutes"in e){const a=e.detailRoutes.map(t=>{const r=ut({},t);return r.masterRoute=e,r.masterRoutePath=e.path,r});r=r.concat(e,t.flattenRoutes(a))}if("routes"in e){const s=e.routes.map(t=>{const r=ut({},t);return r.path=`${e.path}/${r.path}`.replace("///","/").replace("//","/"),r});r=a?r.concat(t.flattenRoutes(s)):r.concat(e,t.flattenRoutes(s))}"routes"in e||"tabs"in e&&e.tabs||"detailRoutes"in e||r.push(e)}),r}parseRouteUrl(e){if(!e)return{};const t=it(e),r=e.split("#")[1],a=e.split("#")[0].split("?")[0];return{query:t,hash:r,params:{},url:e,path:a}}generateUrl(e={}){if("string"==typeof e)return e;const{name:t,path:r,params:a,query:s}=e;if(!t&&!r)throw new Error('Framework7: "name" or "path" parameter is required');const o=this,n=t?o.findRouteByKey("name",t):o.findRouteByKey("path",r);if(!n)throw t?new Error(`Framework7: route with name "${t}" not found`):new Error(`Framework7: route with path "${r}" not found`);const i=o.constructRouteUrl(n,{params:a,query:s});if(""===i)return"/";if(!i)throw new Error(`Framework7: can't construct URL for route with name "${t}"`);return i}constructRouteUrl(e,{params:t,query:r}={}){const{path:a}=e,s=Nt(a);let o;try{o=s(t||{})}catch(e){throw new Error(`Framework7: error constructing route URL from passed params:\nRoute: ${a}\n${e.toString()}`)}return r&&("string"==typeof r?o+=`?${r}`:Object.keys(r).length&&(o+=`?${ct(r)}`)),o}findTabRouteUrl(e){const t=this,r=R(e),a=t.currentRoute.route.parentPath,s=r.attr("id");let o;return t.flattenRoutes(t.routes).forEach(e=>{e.parentPath===a&&e.tab&&e.tab.id===s&&(o=t.currentRoute.params&&Object.keys(t.currentRoute.params).length>0?t.constructRouteUrl(e,{params:t.currentRoute.params,query:t.currentRoute.query}):e.path)}),o}findRouteByKey(e,t){const r=this.routes;let a;return this.flattenRoutes(r).forEach(r=>{a||r[e]===t&&(a=r)}),a}findMatchingRoute(e){if(!e)return;const t=this,r=t.routes,a=t.flattenRoutes(r),{path:s,query:o,hash:n,params:i}=t.parseRouteUrl(e);let l;return a.forEach(t=>{if(l)return;const r=[],a=[t.path||"/"];let c;if(t.alias&&("string"==typeof t.alias?a.push(t.alias):Array.isArray(t.alias)&&t.alias.forEach(e=>{a.push(e)})),a.forEach(e=>{c||(c=Wt(e,r).exec(s||"/"))}),c){let a;r.forEach((e,t)=>{if("number"==typeof e.name)return;const r=c[t+1];i[e.name]=null==r?r:decodeURIComponent(r)}),t.parentPath&&(a=(s||"/").split("/").slice(0,t.parentPath.split("/").length-1).join("/")),l={query:o,hash:n,params:i,url:e,path:s||"/",parentPath:a,route:t,name:t.name}}}),l}replaceRequestUrlParams(e="",t={}){let r=e;return"string"==typeof r&&r.indexOf("{{")>=0&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&Object.keys(t.route.params).forEach(e=>{const a=new RegExp(`{{${e}}}`,"g");r=r.replace(a,t.route.params[e]||"")}),r}removeFromXhrCache(e){const t=this.cache.xhr;let r=!1;for(let a=0;a=0;return a.passRouteQueryToRequest&&t&&t.route&&t.route.query&&Object.keys(t.route.query).length&&(o+=`${n?"&":"?"}${ct(t.route.query)}`,n=!0),a.passRouteParamsToRequest&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&(o+=`${n?"&":"?"}${ct(t.route.params)}`,n=!0),o.indexOf("{{")>=0&&(o=r.replaceRequestUrlParams(o,t)),a.xhrCacheIgnoreGetParameters&&o.indexOf("?")>=0&&(o=o.split("?")[0]),new Promise((e,n)=>{if(a.xhrCache&&!s&&o.indexOf("nocache")<0&&a.xhrCacheIgnore.indexOf(o)<0)for(let t=0;t(l=e,e.text())).then(s=>{const{status:i}=l;r.emit("routerAjaxComplete",l),"error"!==i&&"timeout"!==i&&i>=200&&i<300||0===i?(a.xhrCache&&""!==s&&(r.removeFromXhrCache(o),r.cache.xhr.push({url:o,time:nt(),content:s})),r.emit("routerAjaxSuccess",l,t),e(s)):(r.emit("routerAjaxError",l,t),n(l))}).catch(e=>{n(e)})})}setPagePosition(e,t,r){e.removeClass("page-previous page-current page-next"),e.addClass(`page-${t}`),!1===r?e.removeAttr("aria-hidden"):!0===r&&e.attr("aria-hidden","true"),e.trigger("page:position",{position:t}),this.emit("pagePosition",e[0],t)}removeThemeElements(e){const t=this.app.theme;let r;"ios"===t?r=".md-only, .if-md, .if-not-ios, .not-ios":"md"===t&&(r=".ios-only, .if-ios, .if-not-md, .not-md"),R(e).find(r).remove()}getPageData(e,t,r,a={},s){const o=this,n=R(e).eq(0),i=n[0].f7Page||{};let l,c;if(("next"===t&&"current"===r||"current"===t&&"previous"===r)&&(l="forward"),("current"===t&&"next"===r||"previous"===t&&"current"===r)&&(l="backward"),i&&!i.fromPage){const e=R(s);e.length&&(c=e[0].f7Page)}c=i.pageFrom||c,c&&c.pageFrom&&(c.pageFrom=null);const p={app:o.app,view:o.view,router:o,$el:n,el:n[0],$pageEl:n,pageEl:n[0],name:n.attr("data-name"),position:t,from:t,to:r,direction:l,route:i.route?i.route:a,pageFrom:c};return n[0].f7Page=p,p}pageCallback(e,t,r,a,s={},o){if(!t)return;const n=this,i=R(t);if(!i.length)return;const{route:l}=s,c=n.params.restoreScrollTopOnBack&&!(n.params.masterDetailBreakpoint>0&&i.hasClass("page-master")&&n.app.width>=n.params.masterDetailBreakpoint),p=i[0].f7Page&&i[0].f7Page.route&&i[0].f7Page.route.route&&i[0].f7Page.route.route.keepAlive;"beforeRemove"===e&&p&&(e="beforeUnmount");const d=`page${e[0].toUpperCase()+e.slice(1,e.length)}`,u=`page:${e.toLowerCase()}`;let h={};h="beforeRemove"===e&&i[0].f7Page?ut(i[0].f7Page,{from:r,to:a,position:r}):n.getPageData(i[0],r,a,l,o),h.swipeBack=!!s.swipeBack;const{on:m={},once:f={}}=s.route?s.route.route:{};function g(){i[0].f7RouteEventsAttached||(i[0].f7RouteEventsAttached=!0,m&&Object.keys(m).length>0&&(i[0].f7RouteEventsOn=m,Object.keys(m).forEach(e=>{m[e]=m[e].bind(n),i.on(tt(e),m[e])})),f&&Object.keys(f).length>0&&(i[0].f7RouteEventsOnce=f,Object.keys(f).forEach(e=>{f[e]=f[e].bind(n),i.once(tt(e),f[e])})))}if(s.on&&ut(m,s.on),s.once&&ut(f,s.once),"mounted"===e&&g(),"init"===e){if(c&&("previous"===r||!r)&&"current"===a&&n.scrollHistory[h.route.url]&&!i.hasClass("no-restore-scroll")){let e=i.find(".page-content");e.length>0&&(e=e.filter(e=>0===R(e).parents(".tab:not(.tab-active)").length&&!R(e).is(".tab:not(.tab-active)"))),e.scrollTop(n.scrollHistory[h.route.url])}if(g(),i[0].f7PageInitialized)return i.trigger("page:reinit",h),void n.emit("pageReinit",h);i[0].f7PageInitialized=!0}if(c&&"beforeOut"===e&&"current"===r&&"previous"===a){let e=i.find(".page-content");e.length>0&&(e=e.filter(e=>0===R(e).parents(".tab:not(.tab-active)").length&&!R(e).is(".tab:not(.tab-active)"))),n.scrollHistory[h.route.url]=e.scrollTop()}c&&"beforeOut"===e&&"current"===r&&"next"===a&&delete n.scrollHistory[h.route.url],i.trigger(u,h),n.emit(d,h),"beforeRemove"!==e&&"beforeUnmount"!==e||(i[0].f7RouteEventsAttached&&(i[0].f7RouteEventsOn&&Object.keys(i[0].f7RouteEventsOn).forEach(e=>{i.off(tt(e),i[0].f7RouteEventsOn[e])}),i[0].f7RouteEventsOnce&&Object.keys(i[0].f7RouteEventsOnce).forEach(e=>{i.off(tt(e),i[0].f7RouteEventsOnce[e])}),i[0].f7RouteEventsAttached=null,i[0].f7RouteEventsOn=null,i[0].f7RouteEventsOnce=null,delete i[0].f7RouteEventsAttached,delete i[0].f7RouteEventsOn,delete i[0].f7RouteEventsOnce),p||(i[0].f7Page=null))}saveHistory(){const e=this,t=N();e.view.history=e.history,e.params.browserHistory&&e.params.browserHistoryStoreHistory&&t.localStorage&&(t.localStorage[`f7router-${e.view.id}-history`]=JSON.stringify(e.history))}restoreHistory(){const e=this,t=N();e.params.browserHistory&&e.params.browserHistoryStoreHistory&&t.localStorage&&t.localStorage[`f7router-${e.view.id}-history`]&&(e.history=JSON.parse(t.localStorage[`f7router-${e.view.id}-history`]),e.view.history=e.history)}clearHistory(){const e=this;e.history=[],e.view&&(e.view.history=[]),e.saveHistory()}updateCurrentUrl(e){const t=this;Qt(t,"updateCurrentUrl"),t.history.length?t.history[t.history.length-1]=e:t.history.push(e);const{query:r,hash:a,params:s,url:o,path:n}=t.parseRouteUrl(e);if(t.currentRoute&&ut(t.currentRoute,{query:r,hash:a,params:s,url:o,path:n}),t.params.browserHistory){const r=t.params.browserHistoryRoot||"";Xt.replace(t.view.id,{url:e},r+t.params.browserHistorySeparator+e)}t.saveHistory(),t.emit("routeUrlUpdate",t.currentRoute,t)}getInitialUrl(){const e=this;if(e.initialUrl)return{initialUrl:e.initialUrl,historyRestored:e.historyRestored};const{app:t,view:r}=e,a=_(),s=N(),o=t.params.url&&"string"==typeof t.params.url&&"undefined"!=typeof URL?new URL(t.params.url):a.location;let n,i=e.params.url,l=o.href.split(o.origin)[1];const{browserHistory:c,browserHistoryOnLoad:p,browserHistorySeparator:d}=e.params;let{browserHistoryRoot:u}=e.params;return(s.cordova||s.Capacitor&&(s.Capacitor.isNative||s.Capacitor.isNativePlatform&&s.Capacitor.isNativePlatform()))&&c&&!d&&!u&&o.pathname.indexOf("index.html")&&(console.warn("Framework7: wrong or not complete browserHistory configuration, trying to guess browserHistoryRoot"),u=o.pathname.split("index.html")[0]),c&&p?(u&&l.indexOf(u)>=0&&(l=l.substring(l.indexOf(u)+u.length),""===l&&(l="/")),i=d.length>0&&l.indexOf(d)>=0?l.substring(l.indexOf(d)+d.length):l,e.restoreHistory(),e.history.indexOf(i)>=0?e.history=e.history.slice(0,e.history.indexOf(i)+1):e.params.url===i?e.history=[i]:Xt.state&&Xt.state[r.id]&&Xt.state[r.id].url===e.history[e.history.length-1]?i=e.history[e.history.length-1]:e.history=[l.split(d)[0]||"/",i],e.history.length>1?n=!0:e.history=[],e.saveHistory()):(i||(i=l),o.search&&i.indexOf("?")<0&&(i+=o.search),o.hash&&i.indexOf("#")<0&&(i+=o.hash)),e.initialUrl=i,e.historyRestored=n,{initialUrl:i,historyRestored:n}}init(){const e=this,{app:t,view:r}=e;e.mount();const{initialUrl:a,historyRestored:s}=e.getInitialUrl();(r&&e.params.iosSwipeBack&&"ios"===t.theme||r&&e.params.mdSwipeBack&&"md"===t.theme)&&function(e){const t=e,{$el:r,app:a,params:s}=t,o=Pt();let n=!1,i=!1;const l={};let c,p,d,u,h,m,f=[],g=[],v=!0;const b=s[`${a.theme}SwipeBackAnimateShadow`],y=s[`${a.theme}SwipeBackAnimateOpacity`],w=s[`${a.theme}SwipeBackActiveArea`],C=s[`${a.theme}SwipeBackThreshold`];function E(e){if(!e.isTrusted)return;const r=s[`${a.theme}SwipeBack`];!v||!r||n||a.swipeout&&a.swipeout.el||!t.allowPageChange||R(e.target).closest(".range-slider, .calendar-months").length>0||R(e.target).closest(".page-master, .page-master-detail").length>0&&s.masterDetailBreakpoint>0&&a.width>=s.masterDetailBreakpoint||(i=!1,n=!0,c=void 0,l.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,l.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,u=nt())}function k(e){if(!e.isTrusted)return;if(!n)return;const s="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,u="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(void 0===c&&(c=!!(c||Math.abs(u-l.y)>Math.abs(s-l.x))||sl.x&&a.rtl),c||e.f7PreventSwipeBack||a.preventSwipeBack)return void(n=!1);if(!i){let t=!1;const s=R(e.target),o=s.closest(".swipeout");o.length>0&&(!a.rtl&&o.find(".swipeout-actions-left").length>0&&(t=!0),a.rtl&&o.find(".swipeout-actions-right").length>0&&(t=!0)),f=s.closest(".page"),(f.hasClass("no-swipeback")||s.closest(".no-swipeback, .card-opened").length>0)&&(t=!0),g=r.find(".page-previous"),g.length>1&&(g=g.eq(g.length-1));let i=l.x-r.offset().left>w;if(p=r.width(),i=a.rtl?l.xw,i&&(t=!0),0!==g.length&&0!==f.length||(t=!0),t)return void(n=!1);b&&(h=f.find(".page-shadow-effect"),0===h.length&&(h=R('
'),f.append(h))),y&&(m=g.find(".page-opacity-effect"),0===m.length&&(m=R('
'),g.append(m))),R(".sheet.modal-in").length>0&&a.sheet&&a.sheet.close(R(".sheet.modal-in"))}e.f7PreventSwipePanel=!0,i=!0,a.preventSwipePanelBySwipeBack=!0,e.preventDefault();const v=a.rtl?-1:1;d=(s-l.x-C)*v,d<0&&(d=0);const E=Math.min(Math.max(d/p,0),1),k={percentage:E,progress:E,currentPageEl:f[0],previousPageEl:g[0]};r.trigger("swipeback:move",k),t.emit("swipebackMove",k);let x=d*v,$=(d/5-p/5)*v;a.rtl?(x=Math.max(x,-p),$=Math.max($,0)):(x=Math.min(x,p),$=Math.min($,0)),1===o.pixelRatio&&(x=Math.round(x),$=Math.round($)),t.swipeBackActive=!0,R([f[0],g[0]]).addClass("page-swipeback-active"),f.transform(`translate3d(${x}px,0,0)`),b&&(h[0].style.opacity=1-1*E),g.transform(`translate3d(${$}px,0,0)`),y&&(m[0].style.opacity=1-1*E)}function x(e){if(!e.isTrusted)return;if(a.preventSwipePanelBySwipeBack=!1,!n||!i)return n=!1,void(i=!1);n=!1,i=!1,t.swipeBackActive=!1;const l=R([f[0],g[0]]);if(l.removeClass("page-swipeback-active"),0===d)return l.transform(""),h&&h.length>0&&h.remove(),void(m&&m.length>0&&m.remove());const c=nt()-u;let b=!1;(c<300&&d>10||c>=300&&d>p/2)&&(f.removeClass("page-current").addClass("page-next"+("ios"!==a.theme?" page-next-on-right":"")),g.removeClass("page-previous").addClass("page-current").removeAttr("aria-hidden"),h&&(h[0].style.opacity=""),m&&(m[0].style.opacity=""),b=!0),l.addClass("page-transitioning page-transitioning-swipeback"),o.ios&&(f[0]._clientLeft=f[0].clientLeft),l.transform(""),v=!1,t.allowPageChange=!1;const y={currentPageEl:f[0],previousPageEl:g[0]};b?(t.currentRoute=g[0].f7Page.route,t.currentPage=g[0],t.pageCallback("beforeOut",f,"current","next",{route:f[0].f7Page.route,swipeBack:!0}),t.pageCallback("beforeIn",g,"previous","current",{route:g[0].f7Page.route,swipeBack:!0},f[0]),r.trigger("swipeback:beforechange",y),t.emit("swipebackBeforeChange",y)):(r.trigger("swipeback:beforereset",y),t.emit("swipebackBeforeReset",y)),f.transitionEnd(()=>{l.removeClass("page-transitioning page-transitioning-swipeback"),v=!0,t.allowPageChange=!0,b?(1===t.history.length&&t.history.unshift(t.url),t.history.pop(),t.saveHistory(),s.browserHistory&&Xt.back(),t.pageCallback("afterOut",f,"current","next",{route:f[0].f7Page.route,swipeBack:!0}),t.pageCallback("afterIn",g,"previous","current",{route:g[0].f7Page.route,swipeBack:!0}),t.pageCallback("beforeRemove",f,"next",{swipeBack:!0}),t.removePage(f),r.trigger("swipeback:afterchange",y),t.emit("swipebackAfterChange",y),t.emit("routeChanged",t.currentRoute,t.previousRoute,t),s.preloadPreviousPage&&t.back(t.history[t.history.length-2],{preload:!0})):(r.trigger("swipeback:afterreset",y),t.emit("swipebackAfterReset",y)),h&&h.length>0&&h.remove(),m&&m.length>0&&m.remove()})}!function(){const e="touchstart"===a.touchEvents.start&&{passive:!0,capture:!1};r.on(a.touchEvents.start,E,e),a.on("touchmove:active",k),a.on("touchend:passive",x)}(),t.on("routerDestroy",function(){const e="touchstart"===a.touchEvents.start&&{passive:!0,capture:!1};r.off(a.touchEvents.start,E,e),a.off("touchmove:active",k),a.off("touchend:passive",x)})}(e);const{browserHistory:o,browserHistoryOnLoad:n,browserHistoryAnimateOnLoad:i,browserHistoryInitialMatch:l}=e.params;let c;if(e.history.length>1){const t=l?a:e.history[0];c=e.findMatchingRoute(t),c||(c=ut(e.parseRouteUrl(t),{route:{url:t,path:t.split("?")[0]}}))}else c=e.findMatchingRoute(a),c||(c=ut(e.parseRouteUrl(a),{route:{url:a,path:a.split("?")[0]}}));if(0===e.$el.children(".page").length&&a&&e.params.loadInitialPage)e.navigate(a,{initial:!0,reloadCurrent:!0,browserHistory:!1,animate:!1,once:{modalOpen(){if(!s)return;(e.params.preloadPreviousPage||e.params[`${t.theme}SwipeBack`])&&e.history.length>1&&e.back({preload:!0})},pageAfterIn(){if(!s)return;(e.params.preloadPreviousPage||e.params[`${t.theme}SwipeBack`])&&e.history.length>1&&e.back({preload:!0})}}});else if(e.$el.children(".page").length){let o;if(e.currentRoute=c,e.$el.children(".page").each(a=>{const s=R(a);e.setPagePosition(s,"current"),e.currentRoute&&e.currentRoute.route&&(!0===e.currentRoute.route.master||"function"==typeof e.currentRoute.route.master&&e.currentRoute.route.master(t,e))&&e.params.masterDetailBreakpoint>0&&(s.addClass("page-master"),s.trigger("page:role",{role:"master"}),r.checkMasterDetailBreakpoint());const n={route:e.currentRoute};e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.options&&ut(n,e.currentRoute.route.options),e.currentPageEl=s[0],e.removeThemeElements(s),n.route.route.tab&&(o=!0,e.tabLoad(n.route.route.tab,ut({},n))),e.pageCallback("init",s,"current",void 0,n),e.pageCallback("beforeIn",s,"current",void 0,n),e.pageCallback("afterIn",s,"current",void 0,n)}),s)if(l){(e.params.preloadPreviousPage||e.params[`${t.theme}SwipeBack`])&&e.history.length>1&&e.back({preload:!0})}else e.navigate(a,{initial:!0,browserHistory:!1,history:!1,animate:i,once:{pageAfterIn(){(e.params.preloadPreviousPage||e.params[`${t.theme}SwipeBack`])&&e.history.length>2&&e.back({preload:!0})}}});s||o||(e.history.push(a),e.saveHistory())}!(a&&o&&n)||Xt.state&&Xt.state[r.id]||Xt.initViewState(r.id,{url:a}),e.emit("local::init routerInit",e)}destroy(){let e=this;e.emit("local::destroy routerDestroy",e),Object.keys(e).forEach(t=>{e[t]=null,delete e[t]}),e=null}}ar.prototype.navigate=function(e,t={}){const r=this;if(r.swipeBackActive)return r;let a,s,o,n,i,l,c;if("string"==typeof e?a=e:(a=e.url,s=e.route,o=e.name,n=e.path,i=e.query,l=e.params),o||n)return a=r.generateUrl({path:n,name:o,params:l,query:i}),a?r.navigate(a,t):r;const p=r.app;if(Qt(r,"navigate"),"#"===a||""===a)return r;let d=a.replace("./","");if("/"!==d[0]&&0!==d.indexOf("#")){const e=r.currentRoute.parentPath||r.currentRoute.path;d=((e?`${e}/`:"/")+d).replace("///","/").replace("//","/")}if(c=s?ut(r.parseRouteUrl(d),{route:ut({},s)}):r.findMatchingRoute(d),!c)return r;if(c.route&&c.route.viewName){const a=c.route.viewName,s=p.views[a];if(!s)throw new Error(`Framework7: There is no View with "${a}" name that was specified in this route`);if(s!==r.view)return s.router.navigate(e,t)}if(c.route.redirect)return Ut.call(r,"forward",c,t);const u={};if(c.route.options?ut(u,c.route.options,t):ut(u,t),u.openIn&&(!r.params.ignoreOpenIn||r.params.ignoreOpenIn&&r.history.length>0))return r.openIn(r,d,u);function h(){let e=!1;function t(e,t){r.allowPageChange=!1;let a=!1;"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(s=>{if(e[s]){a=!0;const o=ut({},c,{route:e});r.allowPageChange=!0,r.modalLoad(s,o,ut(u,t),"forward")}}),a||er(r,e,ut(u,t),!0)}function a(){r.allowPageChange=!0}"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(t=>{c.route[t]&&!e&&(e=!0,r.modalLoad(t,c,u,"forward"))}),c.route.keepAlive&&c.route.keepAliveData&&(er(r,{el:c.route.keepAliveData.pageEl},u,!1),e=!0),"url content component pageName el componentUrl".split(" ").forEach(t=>{c.route[t]&&!e&&(e=!0,er(r,{[t]:c.route[t]},u,!1))}),e||(c.route.async&&(r.allowPageChange=!1,c.route.async.call(r,{router:r,to:u.route,from:r.currentRoute,resolve:t,reject:a,direction:"forward",app:p})),c.route.asyncComponent&&Jt(r,c.route.asyncComponent,t,a))}function m(){r.allowPageChange=!0}if(u.route=c,r.params.masterDetailBreakpoint>0&&c.route.masterRoute){let a=!0,s=!1;if(r.currentRoute&&r.currentRoute.route&&(!(!0===r.currentRoute.route.master||"function"==typeof r.currentRoute.route.master&&r.currentRoute.route.master(p,r))||r.currentRoute.route!==c.route.masterRoute&&r.currentRoute.route.path!==c.route.masterRoute.path||(a=!1),!r.currentRoute.route.masterRoute||r.currentRoute.route.masterRoute!==c.route.masterRoute&&r.currentRoute.route.masterRoute.path!==c.route.masterRoute.path||(a=!1,s=!0)),a||s&&t.reloadAll)return r.navigate({path:c.route.masterRoute.path,params:c.params||{}},{animate:!1,reloadAll:t.reloadAll,reloadCurrent:t.reloadCurrent,reloadPrevious:t.reloadPrevious,browserHistory:!t.initial,history:!t.initial,once:{pageAfterIn(){r.navigate(e,ut({},t,{animate:!1,reloadAll:!1,reloadCurrent:!1,reloadPrevious:!1,history:!t.initial,browserHistory:!t.initial}))}}}),r}return Kt.call(r,c,r.currentRoute,()=>{c.route.modules?p.loadModules(Array.isArray(c.route.modules)?c.route.modules:[c.route.modules]).then(()=>{h()}).catch(()=>{m()}):h()},()=>{m()},"forward"),r},ar.prototype.refreshPage=function(e={}){const t=this;return Qt(t,"refreshPage"),t.navigate(t.currentRoute.url,{ignoreCache:!0,reloadCurrent:!0,props:e})},ar.prototype.tabLoad=function(e,t={}){const r=this,a=ut({animate:r.params.animate,browserHistory:!0,history:!0,parentPageEl:null,preload:!1,on:{}},t);let s,o;a.route&&(a.preload||a.route===r.currentRoute||(o=r.previousRoute,r.currentRoute=a.route),a.preload?(s=a.route,o=r.currentRoute):(s=r.currentRoute,o||(o=r.previousRoute)),r.params.browserHistory&&a.browserHistory&&!a.reloadPrevious&&Xt[r.params.browserHistoryTabs](r.view.id,{url:a.route.url},(r.params.browserHistoryRoot||"")+r.params.browserHistorySeparator+a.route.url),a.history&&(r.history[Math.max(r.history.length-1,0)]=a.route.url,r.saveHistory()));const n=R(a.parentPageEl||r.currentPageEl);let i;i=n.length&&n.find(`#${e.id}`).length?n.find(`#${e.id}`).eq(0):r.view.selector?`${r.view.selector} #${e.id}`:`#${e.id}`;const l=r.app.tab.show({tabEl:i,animate:a.animate,tabRoute:a.route}),{$newTabEl:c,$oldTabEl:p,animated:d,onTabsChanged:u}=l;if(c&&c.parents(".page").length>0&&a.route){const e=c.parents(".page")[0].f7Page;e&&a.route&&(e.route=a.route)}if(c[0].f7RouterTabLoaded)return p&&p.length?(d?u(()=>{r.emit("routeChanged",r.currentRoute,r.previousRoute,r)}):r.emit("routeChanged",r.currentRoute,r.previousRoute,r),r):r;function h(t,a){const{url:s,content:o,el:n,component:i,componentUrl:l}=t;function h(t){r.allowPageChange=!0,t&&("string"==typeof t?c.html(t):(c.html(""),t.f7Component?t.f7Component.mount(e=>{c.append(e)}):c.append(t)),c[0].f7RouterTabLoaded=!0,function(t){r.removeThemeElements(c);let a=c;"string"!=typeof t&&(a=R(t)),a.trigger("tab:init tab:mounted",e),r.emit("tabInit tabMounted",c[0],e),p&&p.length&&(d?u(()=>{r.emit("routeChanged",r.currentRoute,r.previousRoute,r),r.params.unloadTabContent&&r.tabRemove(p,c,e)}):(r.emit("routeChanged",r.currentRoute,r.previousRoute,r),r.params.unloadTabContent&&r.tabRemove(p,c,e)))}(t))}if(o)h(o);else if(n)h(n);else if(i||l)try{r.tabComponentLoader({tabEl:c[0],component:i,componentUrl:l,options:a,resolve:h,reject:function(){return r.allowPageChange=!0,r}})}catch(e){throw r.allowPageChange=!0,e}else s&&(r.xhrAbortController&&(r.xhrAbortController.abort(),r.xhrAbortController=!1),r.xhrRequest(s,a).then(e=>{h(e)}).catch(()=>{r.allowPageChange=!0}))}let m;function f(e,t){h(e,ut(a,t))}function g(){r.allowPageChange=!0}return"url content component el componentUrl".split(" ").forEach(t=>{e[t]&&(m=!0,h({[t]:e[t]},a))}),e.async?e.async.call(r,{router:r,to:s,from:o,resolve:f,reject:g,app:r.app}):e.asyncComponent?Jt(r,e.asyncComponent,f,g):m||(r.allowPageChange=!0),r},ar.prototype.tabRemove=function(e,t,r){let a;e[0]&&(e[0].f7RouterTabLoaded=!1,delete e[0].f7RouterTabLoaded),e.children().each(e=>{e.f7Component&&(a=!0,R(e).trigger("tab:beforeremove",r),e.f7Component.destroy())}),a||e.trigger("tab:beforeremove",r),this.emit("tabBeforeRemove",e[0],t[0],r),this.removeTabContent(e[0],r)},ar.prototype.modalLoad=function(e,t,r={},a){const s=this,o=s.app,n="panel"===e,i=n?"panel":"modal",l=ut({animate:s.params.animate,browserHistory:!0,history:!0,on:{},once:{}},r),c=ut({},t.route[e]),p=t.route,d=(e,t)=>{const{on:r,once:a}=l;let s;"open"===t&&(s=r.modalOpen||a.modalOpen||r.panelOpen||a.panelOpen),"close"===t&&(s=r.modalClose||a.modalClose||r.panelClose||a.panelClose),"closed"===t&&(s=r.modalClosed||a.modalClosed||r.panelClosed||a.panelClosed),s&&s(e)};function u(){const r=o[e].create(c);p.modalInstance=r;const a=r.el;function u(){r.close()}r.on(`${i}Open`,()=>{a||(s.removeThemeElements(r.el),r.$el.trigger(`${e.toLowerCase()}:init ${e.toLowerCase()}:mounted`,t,r),s.emit(`${n?"":"modalInit"} ${e}Init ${e}Mounted`,r.el,t,r)),s.once("swipeBackMove",u),d(r,"open")}),r.on(`${i}Close`,()=>{s.off("swipeBackMove",u),r.closeByRouter||s.back(),d(r,"close")}),r.on(`${i}Closed`,()=>{r.$el.trigger(`${e.toLowerCase()}:beforeremove`,t,r),r.emit(`${n?"":"modalBeforeRemove "}${e}BeforeRemove`,r.el,t,r);const a=r.el.f7Component;d(r,"closed"),a&&a.destroy(),st(()=>{(a||c.component||c.asyncComponent||c.async)&&s.removeModal(r.el),r.destroy(),delete r.route,delete p.modalInstance})}),l.route&&(s.params.browserHistory&&l.browserHistory&&Xt.push(s.view.id,{url:l.route.url,modal:e},(s.params.browserHistoryRoot||"")+s.params.browserHistorySeparator+l.route.url),l.route!==s.currentRoute&&(r.route=ut(l.route,{modal:r}),s.currentRoute=r.route),l.history&&!l.reloadCurrent&&(s.history.push(l.route.url),s.saveHistory())),a&&(s.removeThemeElements(r.el),r.$el.trigger(`${e.toLowerCase()}:init ${e.toLowerCase()}:mounted`,t,r),s.emit(`${i}Init ${e}Init ${e}Mounted`,r.el,t,r)),r.open(!1===l.animate||!0===l.animate?l.animate:void 0)}function h(e,t){const{url:r,content:a,component:n,componentUrl:i}=e;function l(e){e&&("string"==typeof e?c.content=e:e.f7Component?e.f7Component.mount(e=>{c.el=e,o.$el.append(e)}):c.el=e,u())}if(a)l(a);else if(n||i)try{s.modalComponentLoader({rootEl:o.el,component:n,componentUrl:i,options:t,resolve:l,reject:function(){return s.allowPageChange=!0,s}})}catch(e){throw s.allowPageChange=!0,e}else r?(s.xhrAbortController&&(s.xhrAbortController.abort(),s.xhrAbortController=!1),s.xhrRequest(r,t).then(e=>{c.content=e,u()}).catch(()=>{s.allowPageChange=!0})):u()}let m;function f(e,t){h(e,ut(l,t))}function g(){s.allowPageChange=!0}return"url content component el componentUrl template".split(" ").forEach(e=>{c[e]&&!m&&(m=!0,h({[e]:c[e]},l))}),m||"actions"!==e||u(),c.async&&c.async.call(s,{router:s,to:l.route,from:s.currentRoute,resolve:f,reject:g,direction:a,app:o}),c.asyncComponent&&Jt(s,c.asyncComponent,f,g),s},ar.prototype.modalRemove=function(e){ut(e,{closeByRouter:!0}),e.close()},ar.prototype.back=function(...e){const t=this,r=Pt();if(t.swipeBackActive)return t;let a,s,o,n;"object"==typeof e[0]?s=e[0]||{}:(a=e[0],s=e[1]||{});const{name:i,params:l,query:c}=s;if(i)return a=t.generateUrl({name:i,params:l,query:c}),a?t.back(a,ut({},s,{name:null,params:null,query:null})):t;const p=t.app;Qt(t,"back");let d,u=t.currentRoute.modal;if(u||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(e=>{t.currentRoute.route[e]&&(u=!0,d=e)}),u&&!s.preload){const e=t.currentRoute.modal||t.currentRoute.route.modalInstance||p[d].get(),o=t.history[t.history.length-2];let n;if(e&&e.$el){const r=e.$el.prevAll(".modal-in");if(r.length&&r[0].f7Modal){const e=r[0];t.$el.parents(e).length||(n=e.f7Modal.route)}}if(n||(n=t.findMatchingRoute(o)),!n&&o&&(n={url:o,path:o.split("?")[0],query:it(o),route:{path:o.split("?")[0],url:o}}),!(a&&0!==a.replace(/[# ]/g,"").trim().length||n&&e))return t;const i=s.force&&n&&a;if(n&&e){const o=r.ie||r.edge||r.firefox&&!r.ios,l=t.params.browserHistory&&!1!==s.browserHistory,c=t.currentRoute&&t.currentRoute.route&&t.currentRoute.route.options&&!1===t.currentRoute.route.options.browserHistory;!l||o||c||Xt.back(),t.currentRoute=n,t.history.pop(),t.propsHistory.pop(),t.saveHistory(),l&&o&&!c&&Xt.back(),t.modalRemove(e),i&&t.navigate(a,{reloadCurrent:!0})}else e&&(t.modalRemove(e),a&&t.navigate(a,{reloadCurrent:!0}));return t}let h,m=t.$el.children(".page-current").prevAll(".page-previous:not(.page-master)").eq(0);if(t.params.masterDetailBreakpoint>0){const e=[];t.$el.children(".page").each(t=>{e.push(t.className)});const r=t.$el.children(".page-current").prevAll(".page-master").eq(0);if(r.length){const e=t.history[t.history.length-2],a=t.findMatchingRoute(e);a&&r[0].f7Page&&a.route===r[0].f7Page.route.route&&(m=r,s.preload||(h=p.width>=t.params.masterDetailBreakpoint))}}if(!s.force&&m.length&&!h){const e=m[0].f7Page;if(t.params.browserHistory&&e&&t.history[t.history.length-2]!==e.route.url)return t.back(t.history[t.history.length-2],ut(s,{force:!0,props:t.propsHistory[t.propsHistory.length-2]||{}})),t;if(e){const r=e.route;return Kt.call(t,r,t.currentRoute,()=>{rr(t,{el:m},ut(s,{route:r}))},()=>{},"backward"),t}}if("#"===a&&(a=void 0),a&&"/"!==a[0]&&0!==a.indexOf("#")&&(a=((t.path||"/")+a).replace("//","/")),!a&&t.history.length>1&&(a=t.history[t.history.length-2],o=t.propsHistory[t.propsHistory.length-2]||{}),h&&!s.force&&t.history[t.history.length-3])return t.back(t.history[t.history.length-3],ut({},s||{},{force:!0,animate:!1,props:t.propsHistory[t.propsHistory.length-3]||{}}));if(h&&!s.force)return t;if(n=t.findMatchingRoute(a),n||a&&(n={url:a,path:a.split("?")[0],query:it(a),route:{path:a.split("?")[0],url:a}}),!n)return t;if(n.route.redirect)return Ut.call(t,"backward",n,s);const f={};function g(){let e=!1;function r(e,r){t.allowPageChange=!1,rr(t,e,ut(f,r),!0)}function a(){t.allowPageChange=!0}n.route.keepAlive&&n.route.keepAliveData&&(rr(t,{el:n.route.keepAliveData.pageEl},f),e=!0),"url content component pageName el componentUrl".split(" ").forEach(r=>{n.route[r]&&!e&&(e=!0,rr(t,{[r]:n.route[r]},f))}),e||(n.route.async&&(t.allowPageChange=!1,n.route.async.call(t,{router:t,to:n,from:t.currentRoute,resolve:r,reject:a,direction:"backward",app:p})),n.route.asyncComponent&&Jt(t,n.route.asyncComponent,r,a))}function v(){t.allowPageChange=!0}return n.route.options?ut(f,n.route.options,s,{props:o||{}}):ut(f,s,{props:o||{}}),f.route=n,f.preload?g():Kt.call(t,n,t.currentRoute,()=>{n.route.modules?p.loadModules(Array.isArray(n.route.modules)?n.route.modules:[n.route.modules]).then(()=>{g()}).catch(()=>{v()}):g()},()=>{v()},"backward"),t},ar.prototype.clearPreviousHistory=function(){const e=this;Qt(e,"clearPreviousHistory");const t=e.history[e.history.length-1];!function(e){Qt(e,"clearPreviousPages"),e.$el.children(".page").filter(t=>!(!e.currentRoute||!e.currentRoute.modal&&!e.currentRoute.panel)||t!==e.currentPageEl).each(t=>{const r=R(t);e.pageCallback("beforeRemove",r,"previous",void 0,{}),e.removePage(r)})}(e),e.history=[t],e.view.history=[t],e.saveHistory()};var sr={name:"router",static:{Router:ar},instance:{cache:{xhr:[],templates:[],components:[]}},create(){const e=this;e.app?e.params.router&&(e.router=new ar(e.app,e)):e.router=new ar(e)}};function or(e){const t=e.app;if(e.resizableInitialized)return;ut(e,{resizable:!0,resizableWidth:null,resizableInitialized:!0});const r=R("html"),{$el:a}=e;if(!a)return;let s,o,n;const i={};let l,c,p,d;function u(e){if(!e)return null;if(e.indexOf("%")>=0||e.indexOf("vw")>=0)return parseInt(e,10)/100*t.width;const r=parseInt(e,10);return Number.isNaN(r)?null:r}function h(t){if(!(e.resizable&&a.hasClass("view-resizable")&&a.hasClass("view-master-detail")))return;i.x="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,i.y="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY,n=!1,o=!0;const r=a.children(".page-master");p=u(r.css("min-width")),d=u(r.css("max-width"))}function m(u){if(!o)return;u.f7PreventSwipePanel=!0;const h="touchmove"===u.type?u.targetTouches[0].pageX:u.pageX;n||(c=s[0].offsetLeft+s[0].offsetWidth,a.addClass("view-resizing"),r.css("cursor","col-resize")),n=!0,u.preventDefault(),l=h-i.x;let m=c+l;p&&!Number.isNaN(p)&&(m=Math.max(m,p)),d&&!Number.isNaN(d)&&(m=Math.min(m,d)),m=Math.min(Math.max(m,0),t.width),e.resizableWidth=m,r[0].style.setProperty("--f7-page-master-width",`${m}px`),a.trigger("view:resize",m),e.emit("local::resize viewResize",e,m)}function f(){if(R("html").css("cursor",""),!o||!n)return o=!1,void(n=!1);o=!1,n=!1,r[0].style.setProperty("--f7-page-master-width",`${e.resizableWidth}px`),a.removeClass("view-resizing")}function g(){e.resizableWidth&&(p=u(s.css("min-width")),d=u(s.css("max-width")),p&&!Number.isNaN(p)&&e.resizableWidthd&&(e.resizableWidth=Math.min(e.resizableWidth,d)),e.resizableWidth=Math.min(Math.max(e.resizableWidth,0),t.width),r[0].style.setProperty("--f7-page-master-width",`${e.resizableWidth}px`))}s=e.$el.children(".view-resize-handler"),s.length||(e.$el.append('
'),s=e.$el.children(".view-resize-handler")),e.$resizeHandlerEl=s,a.addClass("view-resizable");const v={passive:!0};e.$el.on(t.touchEvents.start,".view-resize-handler",h,v),t.on("touchmove:active",m),t.on("touchend:passive",f),t.on("resize",g),e.on("beforeOpen",g),e.once("viewDestroy",()=>{a.removeClass("view-resizable"),e.$resizeHandlerEl.remove(),e.$el.off(t.touchEvents.start,".view-resize-handler",h,v),t.off("touchmove:active",m),t.off("touchend:passive",f),t.off("resize",g),e.off("beforeOpen",g)})}let nr=class extends Ot{constructor(e,t,r={}){super(r,[e]);const a=this;if(!a.params.routerId){if(!R(t).length){let e="Framework7: can't create a View instance because ";throw e+="string"==typeof t?`the selector "${t}" didn't match any element`:"el must be an HTMLElement or Dom7 object",new Error(e)}}let s;return a.params=ut({el:t},{routes:[],routesAdd:[]},e.params.view,r),a.params.routes.length>0?a.routes=a.params.routes:a.routes=[].concat(e.routes,a.params.routesAdd),ut(!1,a,{app:e,name:a.params.name,main:a.params.main,history:[],scrollHistory:{}}),a.useModules(),e.views.push(a),a.main&&(e.views.main=a),a.name&&(e.views[a.name]=a),a.index=e.views.indexOf(a),s=a.name?`view_${a.name}`:a.main?"view_main":`view_${a.index}`,a.id=s,a.params.init?(e.initialized?a.init():e.on("init",()=>{a.init()}),a):a}destroy(){let e=this;const t=e.app;e.$el.trigger("view:beforedestroy"),e.emit("local::beforeDestroy viewBeforeDestroy",e),t.off("resize",e.checkMasterDetailBreakpoint),e.main?(t.views.main=null,delete t.views.main):e.name&&(t.views[e.name]=null,delete t.views[e.name]),e.$el[0].f7View=null,delete e.$el[0].f7View,t.views.splice(t.views.indexOf(e),1),e.params.router&&e.router&&e.router.destroy(),e.emit("local::destroy viewDestroy",e),Object.keys(e).forEach(t=>{e[t]=null,delete e[t]}),e=null}checkMasterDetailBreakpoint(e){const t=this,r=t.app,a=t.$el.hasClass("view-master-detail"),s=r.width>=t.params.masterDetailBreakpoint&&t.$el.children(".page-master").length;void 0===e&&s||!0===e?(t.$el.addClass("view-master-detail"),a||(t.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint",t),t.$el.trigger("view:masterDetailBreakpoint"))):(t.$el.removeClass("view-master-detail"),a&&(t.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint",t),t.$el.trigger("view:masterDetailBreakpoint")))}initMasterDetail(){const e=this,t=e.app;e.checkMasterDetailBreakpoint=e.checkMasterDetailBreakpoint.bind(e),e.checkMasterDetailBreakpoint(),e.params.masterDetailResizable&&or(e),t.on("resize",e.checkMasterDetailBreakpoint)}mount(e){const t=this,r=t.app,a=t.params.el||e,s=R(a);let o;o="string"==typeof a?a:(s.attr("id")?`#${s.attr("id")}`:"")+(s.attr("class")?`.${s.attr("class").replace(/ /g,".").replace(".active","")}`:""),ut(t,{$el:s,el:s[0],main:t.main||s.hasClass("view-main"),selector:o}),t.main&&(r.views.main=t),s&&s[0]&&(s[0].f7View=t),t.emit("local::mount viewMount",t)}init(e){const t=this;t.mount(e),t.params.router&&(t.params.masterDetailBreakpoint>0&&t.initMasterDetail(),t.params.initRouterOnTabShow&&t.$el.hasClass("tab")&&!t.$el.hasClass("tab-active")?t.$el.once("tab:show",()=>{t.router.init()}):t.router.init(),t.$el.trigger("view:init"),t.emit("local::init viewInit",t))}};nr.use(sr);var ir={name:"clicks",params:{clicks:{externalLinks:".external"}},on:{init(){!function(e){e.on("click",function(t){const r=N(),a=R(t.target),s=a.closest("a"),o=s.length>0,n=o&&s.attr("href");if(o&&(s.is(e.params.clicks.externalLinks)||n&&n.indexOf("javascript:")>=0)){const e=s.attr("target");return void(n&&r.cordova&&r.cordova.InAppBrowser&&("_system"===e||"_blank"===e)?(t.preventDefault(),r.cordova.InAppBrowser.open(n,e)):n&&r.Capacitor&&r.Capacitor.Plugins&&r.Capacitor.Plugins.Browser&&("_system"===e||"_blank"===e)&&(t.preventDefault(),r.Capacitor.Plugins.Browser.open({url:n})))}Object.keys(e.modules).forEach(r=>{const s=e.modules[r].clicks;s&&(t.preventF7Router||Object.keys(s).forEach(r=>{const o=a.closest(r).eq(0);o.length>0&&s[r].call(e,o,o.dataset(),t)}))});let i={};if(o&&(t.preventDefault(),i=s.dataset()),i.clickedEl=s[0],!t.preventF7Router&&!s.hasClass("prevent-router")&&!s.hasClass("router-prevent")&&(n&&n.length>0&&"#"!==n[0]||s.hasClass("back"))){let t;if(i.view&&"current"===i.view?t=e.views.current:i.view?t=R(i.view)[0].f7View:(t=a.parents(".view")[0]&&a.parents(".view")[0].f7View,t&&t.params.linksView&&(!s.hasClass("back")||s.hasClass("back")&&1===t.router.history.length)&&("string"==typeof t.params.linksView?t=R(t.params.linksView)[0].f7View:t.params.linksView instanceof nr&&(t=t.params.linksView))),t||e.views.main&&(t=e.views.main),!t||!t.router)return;s[0].f7RouteProps&&(i.props=s[0].f7RouteProps),s.hasClass("back")?t.router.back(n,i):t.router.navigate(n,i)}})}(this)}}},lr={name:"routerComponentLoader",proto:{openIn(e,t,r){const a={url:t,route:{path:t,options:{...r,openIn:void 0}}},s={...r};return"popup"===r.openIn&&(a.route.popup=s),"loginScreen"===r.openIn&&(a.route.loginScreen=s),"sheet"===r.openIn&&(a.route.sheet=s),"popover"===r.openIn&&(s.targetEl=r.clickedEl||r.targetEl,a.route.popover=s),r.openIn.indexOf("panel")>=0&&(s.targetEl=r.clickedEl||r.targetEl,a.route.panel=s),s.component=(a,s)=>{const{$h:o,$onMounted:n,$el:i,$f7:l}=s;return n(()=>{const a=i.value.find(".view");l.view.create(a,{linksView:e.view.selector,ignoreOpenIn:!0,loadInitialPage:!1}).router.navigate(t,{props:r.props,reloadAll:!0})}),()=>{if("popup"===r.openIn)return o``;if("loginScreen"===r.openIn)return o``;if("sheet"===r.openIn)return o`
`;if("popover"===r.openIn)return o`
`;if(r.openIn.indexOf("panel")>=0){const e=r.openIn.split(":"),a=e[1]||"left",s=e[2]||"cover";return o`
`}}},e.navigate(a)},componentLoader(e,t,r={},a,s){const o=this,{app:n}=o,i="string"==typeof e?e:t,l=o.replaceRequestUrlParams(i,r);function c(e){let t=r.context||{};if("function"==typeof t)t=t.call(o);else if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw s(e),e}const i=dt({},t,{f7route:r.route,f7router:o}),l=dt(r.route&&r.route.params||{},r.props||{},r.routeProps||{});let c,p;r.componentOptions&&r.componentOptions.el&&(c=r.componentOptions.el),r.componentOptions&&r.componentOptions.root&&(p=r.componentOptions.root),n.component.create(e,l,{context:i,el:c,root:p}).then(e=>{a(e.el)}).catch(e=>{throw s(e),new Error(e,{cause:e})})}let p;l&&o.params.componentCache&&o.cache.components.forEach(e=>{e.url===l&&(p=e.component)}),l&&p?c(p):l&&!p?(o.xhrAbortController&&(o.xhrAbortController.abort(),o.xhrAbortController=!1),o.xhrRequest(i,r).then(e=>{const t=n.component.parse(e);o.params.componentCache&&o.cache.components.push({url:l,component:t}),c(t)}).catch(e=>{throw s(),e})):c(e)},modalComponentLoader({component:e,componentUrl:t,options:r,resolve:a,reject:s}={}){this.componentLoader(e,t,r,e=>{a(e)},s)},tabComponentLoader({component:e,componentUrl:t,options:r,resolve:a,reject:s}={}){this.componentLoader(e,t,r,e=>{a(e)},s)},pageComponentLoader({component:e,componentUrl:t,options:r,resolve:a,reject:s}={}){this.componentLoader(e,t,r,(e,t={})=>{a(e,t)},s)}}},cr=function(e,t,r,a){var s;t[0]=0;for(var o=1;o=5&&((s||!e&&5===a)&&(n.push(a,0,s,r),a=6),e&&(n.push(a,e,0,r),a=6)),s=""},l=0;l"===t?(a=1,s=""):s=t+s[0]:o?t===o?o="":s+=t:'"'===t||"'"===t?o=t:">"===t?(i(),a=1):a&&("="===t?(a=5,r=s,s=""):"/"===t&&(a<5||">"===e[l][c+1])?(i(),3===a&&(n=n[0]),a=n,(n=n[0]).push(2,0,a),a=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(i(),a=2):s+=t),3===a&&"!--"===s&&(a=4,n=n[0])}return i(),n}(e)),t),arguments,[])).length>1?t:t[0]}.bind((e,t,...r)=>({type:e,props:t||{},children:Et(r.filter(e=>dr.indexOf(e)<0))}));function hr(e,t,r,a,s){return{sel:e,data:t,children:r,text:a,elm:s,key:void 0===t?void 0:t.key}}var mr=Array.isArray;function fr(e){return"string"==typeof e||"number"==typeof e}function gr(e,t,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(var a=0;a"function"==typeof e.type?e.type.name||"CustomComponent":e.type,kr=(...e)=>{const t={};return e.forEach((e={})=>{Object.keys(e).forEach(r=>{var a;t[(a=r,a.split("-").map((e,t)=>0===t?e.toLowerCase():e[0].toUpperCase()+e.substr(1)).join(""))]=e[r]})}),t},xr=e=>"function"==typeof e||e&&e.indexOf("-")>0&&br[e];function $r(e,t,r,a,s){const o={},n=[],i=[],l=[],c=[];let p=!1,d=Er(e);t&&t.attrs&&t.attrs.component&&(d=t.attrs.component,delete t.attrs.component,p=!0);const u=xr(e.type);if(u&&(n.push(a=>{(a.sel===d||p)&&(({f7:e,treeNode:t,vnode:r,data:a})=>{const s="function"==typeof t.type?t.type:br[t.type];e.component.create(s,kr(a.attrs||{},a.props||{}),{el:r.elm,children:t.children}).then(e=>{r.data&&r.data.on&&e&&e.$el&&Object.keys(r.data.on).forEach(t=>{e.$el.on(t,r.data.on[t])}),r.elm.__component__=e})})({f7:r,treeNode:e,vnode:a,data:t})}),i.push(e=>{(e=>{const t=e&&e.elm&&e.elm.__component__;if(t){const{el:r,$el:a}=t;e.data&&e.data.on&&a&&Object.keys(e.data.on).forEach(t=>{a.off(t,e.data.on[t])}),t.destroy&&t.destroy(),r&&r.parentNode&&r.parentNode.removeChild(r),delete e.elm.__component__}})(e)}),l.push((e,t)=>{(e=>{const t=e&&e.elm&&e.elm.__component__;if(!t)return;const r=kr(e.data.attrs||{},e.data.props||{});t.children=e.data.treeNode.children,Object.assign(t.props,r),t.update()})(t)})),!u){if(!t||!t.attrs||!t.attrs.class)return o;t.attrs.class.split(" ").forEach(e=>{a||n.push(...r.getVnodeHooks("insert",e)),i.push(...r.getVnodeHooks("destroy",e)),l.push(...r.getVnodeHooks("update",e)),c.push(...r.getVnodeHooks("postpatch",e))})}return s&&!a&&c.push((e,t)=>{const r=t||e;r&&r.data&&r.data.component&&r.data.component.hook("onUpdated")}),0===n.length&&0===i.length&&0===l.length&&0===c.length||(n.length&&(o.insert=e=>{n.forEach(t=>t(e))}),i.length&&(o.destroy=e=>{i.forEach(t=>t(e))}),l.length&&(o.update=(e,t)=>{l.forEach(r=>r(e,t))}),c.length&&(o.postpatch=(e,t)=>{c.forEach(r=>r(e,t))})),o}const Tr=(e,t,r,a)=>{if(e&&e.type&&yr.indexOf(e.type)>=0)return[];const s=[],o=e.children;for(let e=0;e{if(!(e=>pt(e)&&"props"in e&&"type"in e&&"children"in e)(e))return String(e);if("slot"===e.type)return((e,t,r,a)=>{const s=e.props.name||"default",o=(t.children||[]).filter(e=>{let t="default";return e.props&&(t=e.props.slot||"default"),t===s});return 0===o.length?Tr(e,t,r,a):o.map(e=>Sr(e,t,r,a))})(e,t,r,a);const o=((e,t,r,a,s)=>{const o={component:t,treeNode:e},n=Er(e);Object.keys(e.props).forEach(t=>{const r=e.props[t];if(void 0!==r)if(wr.indexOf(t)>=0)o.props||(o.props={}),"readonly"===t&&(t="readOnly"),"routeProps"===t&&(t="f7RouteProps"),"option"===n&&"value"===t&&(o.attrs||(o.attrs={}),o.attrs.value=r),Cr.indexOf(t)>=0?o.props[t]=!1!==r:o.props[t]=r;else if("key"===t)o.key=r;else if(0===t.indexOf("@")||0===t.indexOf("on")&&t.length>2){o.on||(o.on={});let e=0===t.indexOf("@")?t.substr(1):tt(t.substr(2)),a=!1,s=!1,n=!1;e.indexOf(".")>=0&&e.split(".").forEach((t,r)=>{0===r?e=t:("stop"===t&&(a=!0),"prevent"===t&&(s=!0),"once"===t&&(n=!0))}),o.on[e]=((e,{stop:t,prevent:r,once:a}={})=>{let s=!1;return function(...o){const n=o[0];a&&s||(t&&n.stopPropagation(),r&&n.preventDefault(),s=!0,e(...o))}})(r,{stop:a,prevent:s,once:n})}else"style"===t?"string"!=typeof r?o.style=r:(o.attrs||(o.attrs={}),o.attrs.style=r):(o.attrs||(o.attrs={}),o.attrs[t]=r,"id"!==t||o.key||s||(o.key=r))});const i=$r(e,o,r,a,s);return i.prepatch=(e,t)=>{e&&t&&e&&e.data&&e.data.props&&Object.keys(e.data.props).forEach(r=>{Cr.indexOf(r)<0||(t.data||(t.data={}),t.data.props||(t.data.props={}),!0!==e.data.props[r]||r in t.data.props||(t.data.props[r]=!1))})},o.hook=i,o})(e,t,r,a,s),n=xr(e.type)?[]:Tr(e,t,r,a);return vr(Er(e),o,n)};function Pr(e={},t,r){return Sr(e,t,t.f7,r,!0)}var Mr={createElement:function(e){return document.createElement(e)},createElementNS:function(e,t){return document.createElementNS(e,t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,r){r&&r.parentNode!==e&&r.__component__&&(r=r.__component__.el),e.insertBefore(t,r)},removeChild:function(e,t){e&&e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}};function Or(e){return void 0===e}function Ir(e){return void 0!==e}var Br=hr("",{},[],void 0,void 0);function Lr(e,t){return e.key===t.key&&e.sel===t.sel}function Dr(e,t,r){var a,s,o,n={};for(a=t;a<=r;++a)null!=(o=e[a])&&void 0!==(s=o.key)&&(n[s]=a);return n}var Ar=["create","update","remove","destroy","pre","post"];function Rr(e,t){var r,a=t.elm,s=e.data.attrs,o=t.data.attrs;if((s||o)&&s!==o){for(r in s=s||{},o=o||{}){var n=o[r];s[r]!==n&&(!0===n?a.setAttribute(r,""):!1===n?a.removeAttribute(r):120!==r.charCodeAt(0)?a.setAttribute(r,n):58===r.charCodeAt(3)?a.setAttributeNS("http://www.w3.org/XML/1998/namespace",r,n):58===r.charCodeAt(5)?a.setAttributeNS("http://www.w3.org/1999/xlink",r,n):a.setAttribute(r,n))}for(r in s)r in o||a.removeAttribute(r)}}var Hr={create:Rr,update:Rr};function zr(e,t){var r,a,s=t.elm,o=e.data.props,n=t.data.props;if((o||n)&&o!==n){for(r in n=n||{},o=o||{})n[r]||delete s[r];for(r in n)a=n[r],o[r]===a||"value"===r&&s[r]===a||(s[r]=a)}}var Vr={create:zr,update:zr},_r="undefined"!=typeof window&&window.requestAnimationFrame||setTimeout;function Fr(e,t,r){var a;a=function(){e[t]=r},_r(function(){_r(a)})}function Nr(e,t){var r,a,s=t.elm,o=e.data.style,n=t.data.style;if((o||n)&&o!==n){n=n||{};var i="delayed"in(o=o||{});for(a in o)n[a]||("-"===a[0]&&"-"===a[1]?s.style.removeProperty(a):s.style[a]="");for(a in n)if(r=n[a],"delayed"===a&&n.delayed)for(var l in n.delayed)r=n.delayed[l],i&&r===o.delayed[l]||Fr(s.style,l,r);else"remove"!==a&&r!==o[a]&&("-"===a[0]&&"-"===a[1]?s.style.setProperty(a,r):s.style[a]=r)}}var qr={create:Nr,update:Nr,destroy:function(e){var t,r,a=e.elm,s=e.data.style;if(s&&(t=s.destroy))for(r in t)a.style[r]=t[r]},remove:function(e,t){var r=e.data.style;if(r&&r.remove){var a,s=e.elm,o=0,n=r.remove,i=0,l=[];for(a in n)l.push(a),s.style[a]=n[a];for(var c=getComputedStyle(s)["transition-property"].split(", ");o{o[e]||R(s).off(e,a)}):Object.keys(r).forEach(e=>{R(s).off(e,a)})),o)){const a=e.listener||function e(t,...r){!function(e,t,r){const a=e.type,s=r.data.on;s&&s[a]&&function(e,t,r){"function"==typeof e&&e(t,...r)}(s[a],e,t)}(t,r,e.vnode)};t.listener=a,a.vnode=t,r?Object.keys(o).forEach(e=>{r[e]||R(n).on(e,a)}):Object.keys(o).forEach(e=>{R(n).on(e,a)})}}const Yr=function(e,t){var r,a,s={},o=void 0!==t?t:Mr;for(r=0;r0?l:i.length,u=p>0?p:i.length,h=-1!==l||-1!==p?i.slice(0,Math.min(d,u)):i,m=e.elm=Ir(a)&&Ir(r=a.ns)?o.createElementNS(r,h):o.createElement(h);for(d0&&m.setAttribute("class",i.slice(u+1).replace(/\./g," ")),r=0;rm?p(e,null==r[v+1]?null:r[v+1].elm,r,d,v,a):u(e,t,l,m))}(i,l,d,r):Ir(d)?(Ir(e.text)&&o.setTextContent(i,""),p(i,null,d,0,d.length-1,r)):Ir(l)?u(i,l,0,l.length-1):Ir(e.text)&&o.setTextContent(i,""):e.text!==t.text&&o.setTextContent(i,t.text),Ir(n)&&Ir(a=n.postpatch)&&a(e,t)}}return function(e,t){var r,a,n,l=[];for(r=0;re,type:e=>[e].find(Array.isArray),update:(e,t)=>[t].filter(Array.isArray).find(()=>(e.length=0,e.push(...t))),insert:(e,t,r=[])=>e.splice(Math.max(t,0),0,...[r].flat()),replace:(e,t,r=[])=>e.splice(Math.max(t,0),Math.min(++t,1),...[r].flat()),append:(e,t=[])=>e.push(...[t].flat()),prepend:(e,t=[])=>e.unshift(...[t].flat()),swap:(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},fromTo:(e,t,r=t)=>e.splice(Math.max(r,0),0,...e.splice(Math.max(t,0),1)),remove:(e,t,r=e.map((e,t)=>t))=>[t].flat().filter(e=>r.includes(e)).sort((e,t)=>t-e).forEach(t=>e.splice(t,1)),clear:e=>e.length=0},{name:"object",init:e=>e,type:e=>[e].filter(e=>[null!==e,void 0!==e].every(e=>e)).find(e=>Object.getPrototypeOf(e)===Object.prototype),update:(e,t)=>Object.assign(e,t),insert:()=>{},replace:()=>{},append:()=>{},prepend:()=>{},swap:()=>({}),fromTo:()=>({}),remove:(e,t)=>[t].flat().forEach(t=>delete e[t]),clear:e=>Object.keys(e).forEach(t=>delete e[t])},{name:"atoms",type:()=>!0,init:(e,t={})=>(Object.defineProperty(t,"value",{get:()=>e,set:t=>{e=t}}),t),update:(e,t=e.value)=>{e.value=t},insert:()=>({}),replace:()=>({}),append:()=>({}),prepend:()=>({}),swap:()=>({}),fromTo:()=>({}),remove:()=>({}),clear:e=>{e.value=void 0}}];class Ur{constructor(e,t,r={},{el:a,context:s,children:o}={}){const n=_();dt(this,{f7:e,props:r||{},context:s||{},id:t.id||Je(),children:o||[],theme:{ios:"ios"===e.theme,md:"md"===e.theme},style:t.style,__updateQueue:[],__eventHandlers:[],__onceEventHandlers:[],__onBeforeMount:[],__onMounted:[],__onBeforeUpdate:[],__onUpdated:[],__onBeforeUnmount:[],__onUnmounted:[]});const i=()=>t(this.props,this.getComponentContext(!0));return new Promise((e,t)=>{(e=>new Promise((t,r)=>{"function"==typeof e?t(e):e instanceof Promise?e.then(e=>{t(e)}).catch(e=>{r(e)}):r(new Error('Framework7: Component render function is not a "function" type. Didn\'t you forget to "return $render"?'))}))(i()).then(t=>{this.renderFunction=t;const r=this.render();if(a)return this.vnode=Pr(r,this,!0),this.style&&(this.styleEl=n.createElement("style"),this.styleEl.innerHTML=this.style),this.el=a,Yr(this.el,this.vnode),this.el=this.vnode.elm,this.$el=R(this.el),this.attachEvents(),this.el.f7Component=this,this.mount(),void e(this);r&&(this.vnode=Pr(r,this,!0),this.el=n.createElement(this.vnode.sel||"div"),Yr(this.el,this.vnode),this.$el=R(this.el)),this.style&&(this.styleEl=n.createElement("style"),this.styleEl.innerHTML=this.style),this.attachEvents(),this.el&&(this.el.f7Component=this),e(this)}).catch(e=>{t(e)})})}on(e,t){this.__eventHandlers&&this.__eventHandlers.push({eventName:e,handler:t})}once(e,t){this.__eventHandlers&&this.__onceEventHandlers.push({eventName:e,handler:t})}getComponentRef(){const e=this;return t=>{let r=t;const a={};return Object.defineProperty(a,"value",{get:()=>r,set(t){r=t,e.update()}}),a}}getComponentStore(){const{state:e,_gettersPlain:t,dispatch:r}=this.f7.store,a={state:e,dispatch:r};return a.getters=new Proxy(t,{get:(e,t)=>{const r=e[t];return r.onUpdated(e=>{r.value=e,this.update()}),r}}),a}getUseState(){return e=>{const t=[e].reduce((e,t,r,a,s=e.init(t))=>({state:s,update:t=>(e.update(s,t),this.update()),remove:t=>(e.remove(s,t),this.update()),clear:()=>(e.clear(s),this.update()),insert:(t,r)=>(e.insert(s,t,r),this.update()),replace:(t,r)=>(e.replace(s,t,r),this.update()),append:t=>(e.append(s,t),this.update()),prepend:t=>(e.prepend(s,t),this.update()),swap:(t,r)=>(e.swap(s,t,r),this.update()),fromTo:(t,r)=>(e.fromTo(s,t,r),this.update()),method:(e=()=>({}))=>(e(s),this.update()),async:(e=()=>Promise.reject(s))=>e(s).then(()=>this.update())}),Xr.find(t=>t.type(e)));return t.length=12,t[Symbol.iterator]=function(){const e=Object.values(this);e.splice(e.indexOf(12),1);let t=0;return{next(){if(tthis.$el}),e&&Object.assign(t,{$on:this.on.bind(this),$once:this.once.bind(this),$onBeforeMount:e=>this.__onBeforeMount.push(e),$onMounted:e=>this.__onMounted.push(e),$onBeforeUpdate:e=>this.__onBeforeUpdate.push(e),$onUpdated:e=>this.__onUpdated.push(e),$onBeforeUnmount:e=>this.__onBeforeUnmount.push(e),$onUnmounted:e=>this.__onUnmounted.push(e)}),t}render(){return this.renderFunction(this.getComponentContext())}emit(e,t){this.el&&this.$el.trigger(e,t)}attachEvents(){const{$el:e}=this;this.__eventHandlers&&(this.__eventHandlers.forEach(({eventName:t,handler:r})=>{e.on(tt(t),r)}),this.__onceEventHandlers.forEach(({eventName:t,handler:r})=>{e.once(tt(t),r)}))}detachEvents(){const{$el:e}=this;this.__eventHandlers&&(this.__eventHandlers.forEach(({eventName:t,handler:r})=>{e.on(tt(t),r)}),this.__onceEventHandlers.forEach(({eventName:t,handler:r})=>{e.once(tt(t),r)}))}startUpdateQueue(){const e=N();if(this.__requestAnimationFrameId)return;const t=()=>{this.hook("onBeforeUpdate");const e=this.render();if(e){const t=Pr(e,this,!1);this.vnode=Yr(this.vnode,t)}};this.__requestAnimationFrameId=e.requestAnimationFrame(()=>{this.__updateIsPending&&t();let r=[...this.__updateQueue];this.__updateQueue=[],this.__updateIsPending=!1,e.cancelAnimationFrame(this.__requestAnimationFrameId),delete this.__requestAnimationFrameId,delete this.__updateIsPending,r.forEach(e=>e()),r=[]})}tick(e){return new Promise(t=>{this.__updateQueue.push(function(){t(),e&&e()}),this.startUpdateQueue()})}update(e){return this.__destroyed?new Promise(()=>{}):new Promise(t=>{this.__updateIsPending=!0,this.__updateQueue.push(()=>{t(),e&&e()}),this.startUpdateQueue()})}setState(e){return this.update(e)}f7ready(e){this.f7.initialized?e(this.f7):this.f7.once("init",()=>{e(this.f7)})}mount(e){this.hook("onBeforeMount",this.$el),this.styleEl&&R("head").append(this.styleEl),e&&e(this.el),this.hook("onMounted",this.$el)}destroy(){if(this.__destroyed)return;const e=N();this.hook("onBeforeUnmount"),this.styleEl&&R(this.styleEl).remove(),this.detachEvents(),this.hook("onUnmounted"),this.el&&this.el.f7Component&&(this.el.f7Component=null,delete this.el.f7Component),this.vnode&&(this.vnode=Yr(this.vnode,{sel:this.vnode.sel,data:{}})),e.cancelAnimationFrame(this.__requestAnimationFrameId),this.__updateQueue=[],this.__eventHandlers=[],this.__onceEventHandlers=[],this.__onBeforeMount=[],this.__onMounted=[],this.__onBeforeUpdate=[],this.__onUpdated=[],this.__onBeforeUnmount=[],this.__onUnmounted=[],rt(this),this.__destroyed=!0}hook(e,...t){this.__destroyed||this[`__${e}`].forEach(e=>{e(...t)})}}function Gr(e){const t=N(),r=_(),a=Je(),s=`f7_component_create_callback_${a}`;let o;e.match(//)&&(o=e.split(//).filter((e,t)=>t>0).join("").filter((e,t,r)=>t").replace(/{{#raw}}([ \n]*)