/*! For license information please see app.min.js.LICENSE.txt */ (()=>{"use strict";var e,t,n,i,r,o,a,s,u={},l=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function h(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function p(t,n,i){var r,o,a,s={};for(a in n)"key"==a?r=n[a]:"ref"==a?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return _(t,s,r,o,null)}function _(e,i,r,o,a){var s={type:e,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(s),s}function g(e){return e.children}function v(e,t){this.props=e,this.context=t}function m(e,t){if(null==t)return e.__?m(e.__,e.__i+1):null;for(var n;tn&&i.sort(a));w.__r=0}function x(e,t,n,i,r,o,a,s,c,d,h){var f,p,_,g,v,m=i&&i.__k||l,y=t.length;for(n.__d=c,P(n,t,m),c=n.__d,f=0;f0?_(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=O(r,n,a=i+h,c),r.__i=s,o=null,-1!==s&&(c--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&h--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s===a+1?h++:s>a?c>u-a?h+=s-a:h--:h=s(null!=u&&0==(131072&u.__u)?1:0))for(;a>=0||s=0){if((u=t[a])&&0==(131072&u.__u)&&r==u.key&&o===u.type)return a;a--}if(s2&&(u.children=arguments.length>3?e.call(arguments,2):i),_(t.type,u,r||t.key,o||t.ref,null)}e=l.slice,t={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},n=0,v.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},v.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},v.prototype.render=g,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},w.__r=0,s=0;var H,q=((H={path:void 0,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}).exports=function(e,t,n,i,r){for(t=t.split?t.split("."):t,i=0;i1?"s":"")+" required, but only "+t.length+" present")}function W(e){V(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===B(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function $(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Y(e){V(1,arguments);var t=W(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t}function G(e){V(1,arguments);var t=W(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=Y(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Y(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var X={};function K(){return X}function J(e,t){var n,i,r,o,a,s,u,l;V(1,arguments);var c=K(),d=$(null!==(n=null!==(i=null!==(r=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==i?i:null===(u=c.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(e),f=h.getUTCDay(),p=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var _=J(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var v=J(g,t);return c.getTime()>=_.getTime()?d+1:c.getTime()>=v.getTime()?d:d-1}function Z(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length0?n:1-n;return Z("yy"===t?i%100:i,t.length)},te=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Z(n+1,2)},ne=function(e,t){return Z(e.getUTCDate(),t.length)},ie=function(e,t){return Z(e.getUTCHours()%12||12,t.length)},re=function(e,t){return Z(e.getUTCHours(),t.length)},oe=function(e,t){return Z(e.getUTCMinutes(),t.length)},ae=function(e,t){return Z(e.getUTCSeconds(),t.length)},se=function(e,t){var n=t.length,i=e.getUTCMilliseconds();return Z(Math.floor(i*Math.pow(10,n-3)),t.length)};var ue={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return ee(e,t)},Y:function(e,t,n,i){var r=Q(e,i),o=r>0?r:1-r;return"YY"===t?Z(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Z(o,t.length)},R:function(e,t){return Z(G(e),t.length)},u:function(e,t){return Z(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return Z(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return Z(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return te(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return Z(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=function(e,t){V(1,arguments);var n=W(e),i=J(n,t).getTime()-function(e,t){var n,i,r,o,a,s,u,l;V(1,arguments);var c=K(),d=$(null!==(n=null!==(i=null!==(r=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==i?i:null===(u=c.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1),h=Q(e,t),f=new Date(0);return f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0),J(f,t)}(n,t).getTime();return Math.round(i/6048e5)+1}(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):Z(r,t.length)},I:function(e,t,n){var i=function(e){V(1,arguments);var t=W(e),n=Y(t).getTime()-function(e){V(1,arguments);var t=G(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Y(n)}(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):Z(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ne(e,t)},D:function(e,t,n){var i=function(e){V(1,arguments);var t=W(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=n-t.getTime();return Math.floor(i/864e5)+1}(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):Z(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Z(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Z(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return Z(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,r=e.getUTCHours();switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,r=e.getUTCHours();switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return ie(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):re(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):Z(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):Z(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):oe(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ae(e,t)},S:function(e,t){return se(e,t)},X:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ce(r);case"XXXX":case"XX":return de(r);default:return de(r,":")}},x:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return ce(r);case"xxxx":case"xx":return de(r);default:return de(r,":")}},O:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+le(r,":");default:return"GMT"+de(r,":")}},z:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+le(r,":");default:return"GMT"+de(r,":")}},t:function(e,t,n,i){var r=i._originalDate||e;return Z(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,i){return Z((i._originalDate||e).getTime(),t.length)}};function le(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=t||"";return n+String(r)+a+Z(o,2)}function ce(e,t){return e%60==0?(e>0?"-":"+")+Z(Math.abs(e)/60,2):de(e,t)}function de(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+Z(Math.floor(r/60),2)+n+Z(r%60,2)}const he=ue;var fe=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},pe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},_e={p:pe,P:function(e,t){var n,i=e.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return fe(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",fe(r,t)).replace("{{time}}",pe(o,t))}};const ge=_e;function ve(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var me=["D","DD"],ye=["YY","YYYY"];function be(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var we={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function xe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Pe,Ee={date:xe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ke={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Oe(e){return function(t,n){var i;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):r;i=e.formattingValues[o]||e.formattingValues[r]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function Ce(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var a,s=o[0],u=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(u)?function(e,t){for(var n=0;n0?"in "+i:i+" ago":i},formatLong:Ee,formatRelative:function(e,t,n,i){return ke[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Oe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Oe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Oe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Oe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Oe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Pe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(Pe.matchPattern);if(!n)return null;var i=n[0],r=e.match(Pe.parsePattern);if(!r)return null;var o=Pe.valueCallback?Pe.valueCallback(r[0]):r[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(i.length)}}),era:Ce({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ce({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ce({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ce({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ce({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Te=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,Me=/''/g,De=/[a-zA-Z]/;function Ie(e,t,n){var i,r,o,a,s,u,l,c,d,h,f,p,_,g,v,m,y,b;V(2,arguments);var w=String(t),x=K(),P=null!==(i=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:x.locale)&&void 0!==i?i:Se,E=$(null!==(o=null!==(a=null!==(s=null!==(u=null==n?void 0:n.firstWeekContainsDate)&&void 0!==u?u:null==n||null===(l=n.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:x.firstWeekContainsDate)&&void 0!==a?a:null===(d=x.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=$(null!==(f=null!==(p=null!==(_=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(m=v.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==_?_:x.weekStartsOn)&&void 0!==p?p:null===(y=x.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var O=W(e);if(!function(e){if(V(1,arguments),!function(e){return V(1,arguments),e instanceof Date||"object"===B(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=W(e);return!isNaN(Number(t))}(O))throw new RangeError("Invalid time value");var C=function(e,t){return V(2,arguments),function(e,t){V(2,arguments);var n=W(e).getTime(),i=$(t);return new Date(n+i)}(e,-$(t))}(O,ve(O)),S={firstWeekContainsDate:E,weekStartsOn:k,locale:P,_originalDate:O};return w.match(Ae).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,ge[t])(e,P.formatLong):e})).join("").match(Te).map((function(i){if("''"===i)return"'";var r,o,a=i[0];if("'"===a)return(o=(r=i).match(Re))?o[1].replace(Me,"'"):r;var s,u=he[a];if(u)return null!=n&&n.useAdditionalWeekYearTokens||(s=i,-1===ye.indexOf(s))||be(i,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==me.indexOf(e)}(i)||be(i,t,String(e)),u(C,i,P.localize,S);if(a.match(De))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return i})).join("")}function je(e){V(1,arguments);var t=W(e);return t.setHours(0,0,0,0),t}var Le=/\d[a-z]{2}$/i,Ne=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,ze=/\s+/gi,Fe=function(e){return e.replace(ze,"").toUpperCase()},He=function(e){return null!==e.match(Ne)},qe=function(e){var t=Ue(e);if(null===t)return null;var n=Be(e);return null===n?null:t+" "+n},Ue=function(e){return He(e)?Fe(e).replace(Le,""):null},Be=function(e){if(!He(e))return null;var t=function(e,t){return Fe(e).match(t)}(e,Le);return function(e){return null===e?null:e[0]}(t)};function Ve(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class We extends v{constructor(){super(),Ve(this,"ref",{current:null}),Ve(this,"getDay",(e=>Ie(new Date(1e3*e),"EEEE"))),Ve(this,"getPrettyDate",(e=>Ie(new Date(1e3*e),"EEEE do MMMM yyyy"))),Ve(this,"formatTime",(e=>Ie(e=new Date(1e3*e),"HH:mm"))),Ve(this,"validatePostcode",(e=>{e.preventDefault(),He(this.state.lookup)?this.setState({lookup:qe(this.state.lookup),isPostcodeLookup:!0},(()=>{this.lookup()})):this.setState({isPostcodeLookup:!1},(()=>{this.lookup()}))})),Ve(this,"lookup",(()=>{const e=`/wp-json/weather/v1/autocomplete?query=${encodeURIComponent(this.state.lookup)}&ispc=${this.state.isPostcodeLookup}&key=0837f6a326e526008db432939f78234b`;fetch(e).then((e=>e.json())).then((e=>{this.setState({results:e})})).catch((function(e){console.log(e)}))})),Ve(this,"getFavourites",(()=>JSON.parse(window.localStorage.getItem("weather_favourites"))||[])),Ve(this,"saveFavourites",(()=>{window.localStorage.setItem("weather_favourites",JSON.stringify(this.state.favourites))})),Ve(this,"getWeather",(()=>{this.setState({isLoading:!0});const e=`/wp-json/weather/v1/weather?lat=${this.state.location.lat}&lon=${this.state.location.lon}&key=0837f6a326e526008db432939f78234b`;fetch(e).then((e=>e.json())).then((e=>{this.setState({weather:e,results:[],isLoading:!1,selectedIndex:0}),this.addFavourite(this.state.location)})).catch((function(e){console.log(e)}))})),Ve(this,"addFavourite",(e=>{const t=this.state.favourites.filter((t=>this.getPlaceName(t.display_name)!==this.getPlaceName(e.display_name)));this.setState({favourites:[e,...t].slice(0,5)},(()=>{this.saveFavourites()}))})),Ve(this,"removeFavourite",(e=>{const t=this.state.favourites.filter((t=>this.getPlaceName(e)!==this.getPlaceName(t.display_name)));this.setState({favourites:t},(()=>{this.saveFavourites()}))})),Ve(this,"setLocation",(e=>{this.setState({location:e,results:[]},(()=>{this.getWeather()}))})),Ve(this,"geolocateUser",(()=>{this.setState({isLoading:!0}),navigator.geolocation?navigator.geolocation.getCurrentPosition((e=>{const t=`/wp-json/weather/v1/reverse?lat=${e.coords.latitude}&lon=${e.coords.longitude}&key=0837f6a326e526008db432939f78234b`;fetch(t).then((e=>e.json())).then((e=>{this.setLocation(e)})).catch((function(e){this.setState({geoUnavailable:!0,isLoading:!1}),console.log(e)}))}),(e=>{this.setState({geoUnavailable:!0,isLoading:!1}),console.log(e)})):this.setState({geoUnavailable:!0,isLoading:!1})})),Ve(this,"getPlaceName",(e=>`${e.split(",")[0]}`)),Ve(this,"changeDay",(e=>{this.setState({selectedIndex:e})})),Ve(this,"getIcon",(e=>{let t="cloudy-black";return"01d"===e&&(t="clear-day-black"),"01n"===e&&(t="clear-night-black"),"02d"===e&&(t="partly-cloudy-day-black"),"02n"===e&&(t="partly-cloudy-night-black"),"09d"!==e&&"09n"!==e||(t="light-rain"),"10d"!==e&&"10n"!==e||(t="rain-black"),"11d"!==e&&"11n"!==e||(t="thunderstorm-black"),"13d"!==e&&"13n"!==e||(t="snow-black"),"50d"!==e&&"50n"!==e||(t="fog-black"),`/wp-content/themes/stvnews/static/images/weather/${t}.png`})),Ve(this,"getUVColor",(e=>0==(e=parseInt(e))?"#999999":e>=2&&e<=5?"#f7e401":e>=6&&e<=7?"#f95901":e>=8?"#d90011":"#299501")),Ve(this,"getUVTextColor",(e=>(e=parseInt(e))>=2&&e<=5?"#000000":"#ffffff")),this.state={lookup:null,results:[],location:null,favourites:[],selectedIndex:0,isLoading:!1,isPostcodeLookup:!1,geoUnavailable:!1},this.ref={current:null}}componentDidMount(){this.setState({favourites:this.getFavourites()},(()=>{if(this.state.favourites.length>0){let e=this.state.favourites[0];this.setState({location:e},(()=>{this.getWeather()}))}}))}render(){return"weather-page"===this.props.widgetType?p("div",{id:"weather-widget"},p("section",{class:"search-area"},p("div",{class:"desktop-row"},p("form",{onSubmit:this.validatePostcode},p("div",{class:"input-wrapper"},p("input",{type:"search",autocomplete:"off",placeholder:"Enter a UK town, city or postcode",value:this.state.lookup,onInput:U(this,"lookup"),onSearch:U(this,"lookup")}),p("button",{type:"submit"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/search.svg"}),p("span",{class:"sr-only"},"Search"))),this.state.results.length>0&&p("ul",{class:"search-results"},this.state.results.slice(0,6).map((e=>p("li",null,p("button",{onClick:()=>this.setLocation(e)},e.address.name&&!this.state.isPostcodeLookup&&`${e.address.name}, `,e.address.city&&`${e.address.city}, `,e.address.state&&`${e.address.state}`)))))),p("div",{class:"geo-btn-wrapper"},this.state.geoUnavailable?p("div",{class:"geo-btn unavailable"},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"})),"Location not available"):p("button",{onClick:this.geolocateUser,class:"geo-btn"},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},p("circle",{cx:"12",cy:"12",r:"4"}),p("path",{d:"M13 4.069V2h-2v2.069A8.01 8.01 0 0 0 4.069 11H2v2h2.069A8.008 8.008 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"})),this.state.isLoading?"Please wait...":"Use current location"))),p("div",{class:"favourites"},p("div",{class:"title"},"Your locations: ",!this.state.favourites.length&&"None"),p("ul",null,this.state.favourites.map((e=>p("li",null,p("button",{onClick:t=>{"svg"!==t.target.tagName&&this.setLocation(e)}},this.getPlaceName(e.display_name),p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",onClick:()=>this.removeFavourite(e.display_name)},p("path",{d:"M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm52.7 283.3L256 278.6l-52.7 52.7c-6.2 6.2-16.4 6.2-22.6 0-3.1-3.1-4.7-7.2-4.7-11.3 0-4.1 1.6-8.2 4.7-11.3l52.7-52.7-52.7-52.7c-3.1-3.1-4.7-7.2-4.7-11.3 0-4.1 1.6-8.2 4.7-11.3 6.2-6.2 16.4-6.2 22.6 0l52.7 52.7 52.7-52.7c6.2-6.2 16.4-6.2 22.6 0 6.2 6.2 6.2 16.4 0 22.6L278.6 256l52.7 52.7c6.2 6.2 6.2 16.4 0 22.6-6.2 6.3-16.4 6.3-22.6 0z"}))))))))),this.state.weather&&p("section",{class:"full-weather"},p("ol",{class:"select-day"},this.state.weather.daily.map(((e,t)=>p("li",null,p("button",{class:this.state.selectedIndex===t?"active ":"",onClick:()=>this.changeDay(t)},p("div",null,p("span",{class:"day"},this.getDay(e.dt)),p("span",{class:"conditions"},Math.round(parseInt(e.temp.max)),"°C",p("span",null,Math.round(parseInt(e.temp.min)),"°C"))),p("img",{src:this.getIcon(e.weather[0].icon)})))))),p("section",{class:"daily-forecast"},p("div",{class:"overview"},p("div",{class:"content"},p("span",{class:"date"},this.getPrettyDate(this.state.weather.daily[this.state.selectedIndex].dt)),p("h3",null,this.getPlaceName(this.state.location.display_name)),p("div",{class:"temps"},Math.round(parseInt(this.state.weather.daily[this.state.selectedIndex].temp.max)),"°C",p("span",null,Math.round(parseInt(this.state.weather.daily[this.state.selectedIndex].temp.min)),"°C")),p("div",{class:"suntimes"},p("span",{class:"sunrise"},p("span",null,p("img",{src:"/wp-content/themes/stvnews/static/images/weather/SunriseIcon.svg"}),"Sunrise:"),p("span",null,this.formatTime(this.state.weather.daily[this.state.selectedIndex].sunrise))),p("span",{class:"sunset"},p("span",null,p("img",{src:"/wp-content/themes/stvnews/static/images/weather/clear-night-black.png"}),"Sunset:"),p("span",null,this.formatTime(this.state.weather.daily[this.state.selectedIndex].sunset))))),p("div",{class:"icon"},p("img",{src:this.getIcon(this.state.weather.daily[this.state.selectedIndex].weather[0].icon)}))),p("section",{class:"meta"},p("ul",null,p("li",{class:"rain"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/RainIcon.svg"})," ",Math.round(100*this.state.weather.daily[this.state.selectedIndex].pop),"%"),p("li",{class:"wind"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/WindIcon.svg",style:`transform:rotate(${this.state.weather.daily[this.state.selectedIndex].wind_deg-180}deg)`})," ",Math.round(2.237*this.state.weather.daily[this.state.selectedIndex].wind_speed),"mph"),p("li",{class:"uv"},p("span",{style:`color: ${this.getUVTextColor(this.state.weather.daily[this.state.selectedIndex].uvi)}; background-color: ${this.getUVColor(this.state.weather.daily[this.state.selectedIndex].uvi)};`},Math.round(this.state.weather.daily[this.state.selectedIndex].uvi)),"UV Index")))),this.state.selectedIndex<=1&&p("section",{class:"hourly"},p("ol",{ref:this.ref},this.state.weather.hourly.map((e=>{if(function(e,t){V(2,arguments);var n=je(e),i=je(t);return n.getTime()===i.getTime()}(new Date(1e3*e.dt),new Date(1e3*this.state.weather.daily[this.state.selectedIndex].dt)))return p("li",null,p("div",{class:"time"},this.formatTime(e.dt)),p("img",{class:"weather-icon",src:this.getIcon(e.weather[0].icon)}),p("div",{class:"temp","data-temp":Math.round(parseInt(e.temp))},Math.round(parseInt(e.temp)),"°C"),p("div",{class:"rain"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/RainIcon.svg"})," ",p("span",null,Math.round(100*e.pop),"%")),p("div",{class:"wind"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/WindIcon.svg",style:`transform:rotate(${e.wind_deg-180}deg)`})," ",Math.round(2.237*e.wind_speed)))})))))):"desktop-widget"===this.props.widgetType?this.state.favourites.length>0&&this.state.weather?p("a",{href:"/weather"},p("div",{id:"weather-widget",class:"widget-layout"},p("div",{class:"widget-title"},"Weather in ",p("strong",null,this.getPlaceName(this.state.favourites[0].display_name))),p("div",null,p("img",{class:"weather-icon",src:this.getIcon(this.state.weather.hourly[0].weather[0].icon)})," ",p("span",{class:"temp"},Math.round(parseInt(this.state.weather.hourly[0].temp)),"°C")),p("div",null,p("img",{class:"wind-icon",src:"/wp-content/themes/stvnews/static/images/weather/WindIcon.svg",style:`transform:rotate(${this.state.weather.hourly[0].wind_deg-180}deg)`})," ",Math.round(2.237*this.state.weather.hourly[0].wind_speed),"mph"),p("div",null,p("img",{class:"rain-icon",src:"/wp-content/themes/stvnews/static/images/weather/RainIcon.svg"})," ",Math.round(100*this.state.weather.hourly[0].pop),"%"),p("div",{class:"hide-if-ads-disabled sponsor-wrapper"},p("span",{class:"sponsored-by"},"Sponsored by"),p("img",{src:"/wp-content/themes/stvnews/static/images/weather/tui/tui-logo-red.svg"})))):p("div",{id:"weather-widget"},p("span",{class:"widget-title"},p("a",{href:"/weather"},"Weather")," where you are"),this.state.geoUnavailable?p("div",{class:"geo-btn"},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"})),"Location not available"):p("button",{tabindex:"0",class:"geo-btn",onClick:this.geolocateUser},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},p("circle",{cx:"12",cy:"12",r:"4"}),p("path",{d:"M13 4.069V2h-2v2.069A8.01 8.01 0 0 0 4.069 11H2v2h2.069A8.008 8.008 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"})),this.state.isLoading?"Please wait...":"Use current location"),p("div",{class:"hide-if-ads-disabled sponsor-wrapper"},p("span",{class:"sponsored-by"},"Sponsored by"),p("img",{src:"/wp-content/themes/stvnews/static/images/weather/tui/tui-logo-red.svg"}))):"mobile-widget"===this.props.widgetType?this.state.favourites.length>0&&this.state.weather?p("div",{id:"weather-widget"},p("div",{class:"container"},p("div",{class:"weather-wrapper"},p("div",{class:"left"},p("div",{class:"location-wrapper"},p("span",null,"Current weather conditions in"),p("strong",null,this.getPlaceName(this.state.favourites[0].display_name))),p("span",{class:"temp"},Math.round(parseInt(this.state.weather.hourly[0].temp)),"°C"),p("span",{class:"icons"},p("img",{src:"/wp-content/themes/stvnews/static/images/weather/WindIcon.svg",style:`transform:rotate(${this.state.weather.hourly[0].wind_deg-180}deg)`,class:"wind-icon"})," ",Math.round(2.237*this.state.weather.hourly[0].wind_speed),"mph",p("img",{src:"/wp-content/themes/stvnews/static/images/weather/RainIcon.svg",class:"rain-icon"})," ",Math.round(100*this.state.weather.hourly[0].pop),"%"),p("div",{class:"meta"},p("a",{href:"/weather"},"Full UK Forecasts →")," ",p("span",{class:"hide-if-ads-disabled sponsor-wrapper"},p("span",null,"Sponsored by"),p("img",{src:"/wp-content/themes/stvnews/static/images/weather/tui/tui-logo-red.svg"})))),p("div",{class:"right"},p("img",{src:this.getIcon(this.state.weather.hourly[0].weather[0].icon),class:"weather-icon"}))))):p("div",{id:"weather-widget",class:"showbg"},p("div",{class:"container"},p("div",{class:"location-wrapper"},p("strong",null,"Accurate weather",p("br",null),"where you are"),this.state.geoUnavailable?p("div",null,p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"})),"Location not available"):p("button",{onClick:this.geolocateUser,class:"geo-btn"},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},p("circle",{cx:"12",cy:"12",r:"4"}),p("path",{d:"M13 4.069V2h-2v2.069A8.01 8.01 0 0 0 4.069 11H2v2h2.069A8.008 8.008 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"})),this.state.isLoading?"Please wait...":"Use current location")),p("div",{class:"meta"},p("a",{href:"/weather"},"Full UK Forecasts →")," ",p("span",{class:"hide-if-ads-disabled sponsor-wrapper"},p("span",null,"Sponsored by"),p("img",{src:"/wp-content/themes/stvnews/static/images/weather/tui/tui-logo-red.svg"}))))):void 0}}var $e,Ye,Ge,Xe,Ke=0,Je=[],Qe=[],Ze=t.__b,et=t.__r,tt=t.diffed,nt=t.__c,it=t.unmount;function rt(e,n){t.__h&&t.__h(Ye,e,Ke||n),Ke=0;var i=Ye.__H||(Ye.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:Qe}),i.__[e]}function ot(e){return Ke=1,function(e,t,n){var i=rt($e++,2);if(i.t=e,!i.__c&&(i.__=[ft(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Ye,!Ye.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};Ye.u=!0;var o=Ye.shouldComponentUpdate,a=Ye.componentWillUpdate;Ye.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}a&&a.call(this,e,t,n)},Ye.shouldComponentUpdate=r}return i.__N||i.__}(ft,e)}function at(e,n){var i=rt($e++,3);!t.__s&&ht(i.__H,n)&&(i.__=e,i.i=n,Ye.__H.__h.push(i))}function st(){for(var e;e=Je.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ct),e.__H.__h.forEach(dt),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){Ye=null,Ze&&Ze(e)},t.__r=function(e){et&&et(e),$e=0;var t=(Ye=e.__c).__H;t&&(Ge===Ye?(t.__h=[],Ye.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Qe,e.__N=e.i=void 0}))):(t.__h.forEach(ct),t.__h.forEach(dt),t.__h=[],$e=0)),Ge=Ye},t.diffed=function(e){tt&&tt(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==Je.push(n)&&Xe===t.requestAnimationFrame||((Xe=t.requestAnimationFrame)||lt)(st)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Qe&&(e.__=e.__V),e.i=void 0,e.__V=Qe}))),Ge=Ye=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ct),e.__h=e.__h.filter((function(e){return!e.__||dt(e)}))}catch(i){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(i,e.__v)}})),nt&&nt(e,n)},t.unmount=function(e){it&&it(e);var n,i=e.__c;i&&i.__H&&(i.__H.__.forEach((function(e){try{ct(e)}catch(e){n=e}})),i.__H=void 0,n&&t.__e(n,i.__v))};var ut="function"==typeof requestAnimationFrame;function lt(e){var t,n=function(){clearTimeout(i),ut&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);ut&&(t=requestAnimationFrame(n))}function ct(e){var t=Ye,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ye=t}function dt(e){var t=Ye;e.__c=e.__(),Ye=t}function ht(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ft(e,t){return"function"==typeof t?t(e):t}var pt,_t,gt,vt=0,mt=[],yt=t.__b,bt=t.__r,wt=t.diffed,xt=t.__c,Pt=t.unmount;function Et(e,n){t.__h&&t.__h(_t,e,vt||n),vt=0;var i=_t.__H||(_t.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function kt(e,t,n){var i=Et(pt++,2);return i.t=e,i.__c||(i.__=[n?n(t):Dt(void 0,t),function(e){var t=i.t(i.__[0],e);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=_t),i.__}function Ot(e,n){var i=Et(pt++,4);!t.__s&&Mt(i.__H,n)&&(i.__=e,i.__H=n,_t.__h.push(i))}function Ct(e,t){var n=Et(pt++,7);return Mt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function St(){var e;for(mt.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=mt.pop();)if(e.__P)try{e.__H.__h.forEach(At),e.__H.__h.forEach(Rt),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){_t=null,yt&&yt(e)},t.__r=function(e){bt&&bt(e),pt=0;var t=(_t=e.__c).__H;t&&(t.__h.forEach(At),t.__h.forEach(Rt),t.__h=[])},t.diffed=function(e){wt&&wt(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==mt.push(n)&>===t.requestAnimationFrame||((gt=t.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),Tt&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);Tt&&(t=requestAnimationFrame(n))})(St)),_t=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(At),e.__h=e.__h.filter((function(e){return!e.__||Rt(e)}))}catch(i){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(i,e.__v)}})),xt&&xt(e,n)},t.unmount=function(e){Pt&&Pt(e);var n,i=e.__c;i&&i.__H&&(i.__H.__.forEach((function(e){try{At(e)}catch(e){n=e}})),n&&t.__e(n,i.__v))};var Tt="function"==typeof requestAnimationFrame;function At(e){var t=_t,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),_t=t}function Rt(e){var t=_t;e.__c=e.__(),_t=t}function Mt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Dt(e,t){return"function"==typeof t?t(e):t}function It(e,t){for(var n in t)e[n]=t[n];return e}function jt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function Lt(e){this.props=e}(Lt.prototype=new v).isPureReactComponent=!0,Lt.prototype.shouldComponentUpdate=function(e,t){return jt(this.props,e)||jt(this.state,t)};var Nt=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var zt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ft=function(e,t){return null==e?null:k(k(e).map(t))},Ht={map:Ft,forEach:Ft,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},qt=t.__e;t.__e=function(e,t,n){if(e.then)for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);qt(e,t,n)};var Ut=t.unmount;function Bt(){this.__u=0,this.t=null,this.__b=null}function Vt(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Wt(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ut&&Ut(e)},(Bt.prototype=new v).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Vt(i.__v),o=!1,a=function(){o||(o=!0,n.__R=null,r?r(s):s())};n.__R=a;var s=function(){if(! --i.__u){if(i.state.__e){var e=i.state.__e;i.__v.__k[0]=function e(t,n,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)})),t.__c&&t.__c.__P===n&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__e:i.__b=null});t=i.t.pop();)t.forceUpdate()}},u=!0===t.__h;i.__u++||u||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(a,a)},Bt.prototype.componentWillUnmount=function(){this.t=[]},Bt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,i){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=It({},t)).__c&&(t.__c.__P===i&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)}))),t}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&p(g,null,e.fallback);return r&&(r.__h=null),[p(g,null,t.__e?null:e.children),r]};var $t=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),N(p(Yt,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(Wt.prototype=new v).__e=function(e){var t=this,n=Vt(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),$t(t,e,i)):r()};n?n(o):o()}},Wt.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Wt.prototype.componentDidUpdate=Wt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){$t(e,n,t)}))};var Xt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Kt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Jt="undefined"!=typeof document,Qt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};v.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(v.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Zt=t.event;function en(){}function tn(){return this.cancelBubble}function nn(){return this.defaultPrevented}t.event=function(e){return Zt&&(e=Zt(e)),e.persist=en,e.isPropagationStopped=tn,e.isDefaultPrevented=nn,e.nativeEvent=e};var rn,on={configurable:!0,get:function(){return this.class}},an=t.vnode;t.vnode=function(e){var t=e.type,n=e.props,i=n;if("string"==typeof t){var r=-1===t.indexOf("-");for(var o in i={},n){var a=n[o];Jt&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!Qt(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():r&&Kt.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),i[o]=a)}"select"==t&&i.multiple&&Array.isArray(i.value)&&(i.value=k(n.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==t&&null!=i.defaultValue&&(i.value=k(n.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),e.props=i,n.class!=n.className&&(on.enumerable="className"in n,null!=n.className&&(i.class=n.className),Object.defineProperty(i,"className",on))}e.$$typeof=Xt,an&&an(e)};var sn=t.__r;function un(e){return!!e&&e.$$typeof===Xt}function ln(e){return un(e)?F.apply(null,arguments):e}function cn(e){return e&&(e.base||1===e.nodeType&&e)||null}t.__r=function(e){sn&&sn(e),rn=e.__c};var dn={useState:function(e){return vt=1,kt(Dt,e)},useReducer:kt,useEffect:function(e,n){var i=Et(pt++,3);!t.__s&&Mt(i.__H,n)&&(i.__=e,i.__H=n,_t.__H.__h.push(i))},useLayoutEffect:Ot,useRef:function(e){return vt=5,Ct((function(){return{current:e}}),[])},useImperativeHandle:function(e,t,n){vt=6,Ot((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:Ct,useCallback:function(e,t){return vt=8,Ct((function(){return e}),t)},useContext:function(e){var t=_t.context[e.__c],n=Et(pt++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(_t)),t.props.value):e.__},useDebugValue:function(e,n){t.useDebugValue&&t.useDebugValue(n?n(e):e)},version:"17.0.2",Children:Ht,render:function(e,t,n){return null==t.__k&&(t.textContent=""),N(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return z(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(N(null,e),!0)},createPortal:function(e,t){return p(Gt,{__v:e,i:t})},createElement:p,createContext:function(e,t){var n={__c:t="__cC"+s++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,b(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return p.bind(null,e)},cloneElement:ln,createRef:function(){return{current:null}},Fragment:g,isValidElement:un,findDOMNode:cn,Component:v,PureComponent:Lt,memo:function(e,t){function n(e){var n=this.props.ref,i=n==e.ref;return!i&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!i:jt(this.props,e)}function i(t){return this.shouldComponentUpdate=n,p(e,t)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i},forwardRef:function(e){function t(t,n){var i=It({},t);return delete i.ref,e(i,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=zt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:g,Suspense:Bt,SuspenseList:Wt,lazy:function(e){var t,n,i;function r(r){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){i=e})),i)throw i;if(!n)throw t;return p(n,r)}return r.displayName="Lazy",r.__f=!0,r},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(e){return rn.__n[e.__c].props.value}}}}};function hn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function fn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function pn(){for(var e=[],t=0;t1?Yn(e[0],e[1]):function(t,n){return Yn(t,n,e[0])}}function Xn(e){var t;(t=e.prototype).subscribe=function(e,t){this[e],Jn(this,e).subscribe(t)},t.unsubscribe=function(e,t){var n,i=this;e?e in this&&Jn(this,e).unsubscribe(t):(n=Kn(this),Object.keys(n)).forEach((function(e){i.unsubscribe(e)}))}}function Kn(e,t){var n,i;e[Hn]||function(e){var t={};Object.defineProperty(e,Hn,{get:function(){return t}})}(e);var r=e[Hn];if(!t){var o=null===(i=null===(n=null==e?void 0:e.constructor)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i[qn];o&&o.forEach((function(t){!(t in r)&&t in e&&e[t]}))}return r}function Jn(e,t,n){var i=Kn(e);return i[t]||(i[t]=function(e){return new Wn(e)}(n)),i[t]}function Qn(e,t,n){var i=n.get,r={configurable:!0,get:function(){var e,n=Kn(this,!0);return t in n||(n[t]=(e=i.bind(this),new $n(e))),Jn(this,t).current}};e[qn]||(e[qn]=[]);var o=e[qn];return-1===o.indexOf(t)&&o.push(t),Object.defineProperty(e,t,r),r}var Zn=function(e,t){return Zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Zn(e,t)};function ei(e,t){function n(){this.constructor=e}Zn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ti,ni=function(){return ni=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}ti="undefined"==typeof window?{navigator:{userAgent:""}}:window;var ri="left",oi="right",ai="middle",si={1:ri,2:ai,3:oi},ui="ontouchstart"in ti&&"safari"===(function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(e){var t=navigator.userAgentData,n=(t.uaList||t.brands).slice(),i=t.mobile||!1,r=n[0],o=(t.platform||navigator.platform).toLowerCase(),a={name:r.brand,version:r.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Mn(Nn,n).brand||Fn(Sn())},s={name:"unknown",version:"-1",majorVersion:-1};a.webkit=!a.chromium&&On(Ln,(function(e){return Dn(n,e)}));var u=Mn(jn,n);if(a.chromium=!!u.brand,a.chromiumVersion=u.version,!a.chromium){var l=Mn(Ln,n);a.webkit=!!l.brand,a.webkitVersion=l.version}var c=Cn(zn,(function(e){return new RegExp(""+e.test,"g").exec(o)}));s.name=c?c.id:"";var d=Mn(In,n);return a.name=d.brand||a.name,a.version=(d.brand,d.version),a.webkit&&(s.name=i?"ios":"mac"),"ios"===s.name&&a.webview&&(a.version="-1"),s.version=An(s.version),a.version=An(a.version),s.majorVersion=parseInt(s.version,10),a.majorVersion=parseInt(a.version,10),{browser:a,os:s,isMobile:i,isHints:!0}}():function(e){var t=Sn(undefined),n=!!/mobi/g.exec(t),i={name:"unknown",version:"-1",majorVersion:-1,webview:Fn(t),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Rn(In,t),a=o.preset,s=o.version,u=Rn(zn,t),l=u.preset,c=u.version,d=Rn(jn,t);if(i.chromium=!!d.preset,i.chromiumVersion=d.version,!i.chromium){var h=Rn(Ln,t);i.webkit=!!h.preset,i.webkitVersion=h.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}()).browser.name,li=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,t=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=t.length;n]*)>/)){var i=document.createElement("div");i.innerHTML=e,n=di(i.childNodes)}else n=di(document.querySelectorAll(e));t||(n=n.length>=1?n[0]:void 0)}else e===ti?n=e:"value"in e||"current"in e?n=e.value||e.current:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in ti&&e instanceof jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map((function(e){return hi(e)})),t||(n=n.length>=1?n[0]:void 0)):n=e;return n},fi=ti.requestAnimationFrame||ti.webkitRequestAnimationFrame,pi=ti.cancelAnimationFrame||ti.webkitCancelAnimationFrame;if(fi&&!pi){var _i={},gi=fi;fi=function(e){var t=gi((function(n){_i[t]&&e(n)}));return _i[t]=!0,t},pi=function(e){delete _i[e]}}else fi&&pi||(fi=function(e){return ti.setTimeout((function(){e(ti.performance&&ti.performance.now&&ti.performance.now()||(new Date).getTime())}),16)},pi=ti.clearTimeout);var vi=function(e,t){var n={};for(var i in e)i&&(n[i]=t(e[i],i));return n},mi=function(e,t){var n={};for(var i in e)i&&t(e[i],i)&&(n[i]=e[i]);return n},yi=function(e,t){for(var n in e)if(n&&!t(e[n],n))return!1;return!0},bi=function(e,t){return yi(e,(function(e,n){return e===t[n]}))},wi={},xi=function(e,t){return wi[t]||(wi[t]=ki(t)),wi[t](e)},Pi=function(e,t){return e&&t?vi(e,(function(e,n){return xi(e,"number"==typeof t?t:t[n])})):e},Ei=function(e){if(!isFinite(e))return 0;var t="".concat(e);if(t.indexOf("e")>=0){for(var n=0,i=1;Math.round(e*i)/i!==e;)i*=10,n++;return n}return t.indexOf(".")>=0?t.length-t.indexOf(".")-1:0},ki=function(e){var t=e<1?Math.pow(10,Ei(e)):1;return function(n){return 0===e?0:Math.round(Math.round(n/e)*e*t)/t}},Oi=function(e,t,n){return n?!!(30===t||t&e&&n&e):!!(t&e)},Ci=function(){function e(e){this._axes=e,this.holdingCount=0}var t=e.prototype;return t.hold=function(e,t){var n=this._getRoundPos(e).roundPos;this._axes.trigger(new mn("hold",{pos:n,input:t.input||null,inputEvent:t.event||null,isTrusted:!0}))},t.triggerRelease=function(e){var t=this._getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;e.destPos=n,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration),this._axes.trigger(new mn("release",ni(ni({},e),{bounceRatio:this._getBounceRatio(n)})))},t.triggerChange=function(e,t,n,i){var r=this;void 0===i&&(i=!1);var o=this.animationManager,a=o.axisManager,s=o.getEventInfo(),u=this._getRoundPos(e,t),l=u.roundPos,c=u.roundDepa,d=a.moveTo(l,c),h=(null==n?void 0:n.event)||(null==s?void 0:s.event)||null,f={pos:d.pos,delta:d.delta,bounceRatio:this._getBounceRatio(d.pos),holding:i,inputEvent:h,isTrusted:!!h,input:(null==n?void 0:n.input)||(null==s?void 0:s.input)||null,set:h?this._createUserControll(d.pos):function(){}},p=new mn("change",f);return this._axes.trigger(p),Object.keys(d.pos).forEach((function(e){var t=d.pos[e];Jn(r._axes,e,t).current=t})),h&&a.set(f.set().destPos),!p.isCanceled()},t.triggerAnimationStart=function(e){var t=this._getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;e.destPos=n,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration);var r=new mn("animationStart",e);return this._axes.trigger(r),!r.isCanceled()},t.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this._axes.trigger(new mn("animationEnd",{isTrusted:e}))},t.triggerFinish=function(e){void 0===e&&(e=!1),this._axes.trigger(new mn("finish",{isTrusted:e}))},t.setAnimationManager=function(e){this.animationManager=e},t.destroy=function(){this._axes.off()},t._createUserControll=function(e,t){void 0===t&&(t=0);var n={destPos:ni({},e),duration:t};return function(e,t){return e&&(n.destPos=ni({},e)),void 0!==t&&(n.duration=t),n}},t._getRoundPos=function(e,t){var n=this._axes.options.round;return{roundPos:Pi(e,n),roundDepa:Pi(t,n)}},t._getBounceRatio=function(e){return this._axes.axisManager.map(e,(function(e,t){return et.range[1]&&0!==t.bounce[1]?(e-t.range[1])/t.bounce[1]:0}))},ii([Gn],e.prototype,"holdingCount",void 0),e}(),Si=function(){function e(e){this._options=e,this._prevented=!1}var t=e.prototype;return t.isInterrupting=function(){return this._options.interruptable||this._prevented},t.isInterrupted=function(){return!this._options.interruptable&&this._prevented},t.setInterrupt=function(e){this._options.interruptable||(this._prevented=e)},e}(),Ti=function(e,t,n,i){var r=e,o=[n[0]?t[0]:i?t[0]-i[0]:t[0],n[1]?t[1]:i?t[1]+i[1]:t[1]];return r=Math.max(o[0],r),Math.min(o[1],r)},Ai=function(e,t){return et[1]},Ri=function(e,t,n){return n[1]&&e>t[1]||n[0]&&eo&&(i=(i-o)%a+r),n[0]&&e=16)&&(f&&(g=(t=[(l-f.deltaX)/_,(c-f.deltaY)/_])[0],v=t[1]),this._latestInterval={timestamp:p,deltaX:l,deltaY:c}),{srcEvent:e,scale:s,angle:u,center:o,deltaX:l,deltaY:c,offsetX:d,offsetY:h,velocityX:g,velocityY:v,preventSystemEvent:!0}},t._getDistance=function(e,t){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return Math.sqrt(n*n+i*i)},t._getButton=function(e){var t={1:ri,2:oi,4:ai};return(this._isTouchEvent(e)?ri:t[e.buttons])||null},t._isTouchEvent=function(e){return e.type&&e.type.indexOf("touch")>-1},t._isValidButton=function(e,t){return t.indexOf(e)>-1},t._isValidEvent=function(e,t,n){return(!t||function(e,t){return!!(!t||t.indexOf("any")>-1||t.indexOf("none")>-1&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey||t.indexOf("shift")>-1&&e.shiftKey||t.indexOf("ctrl")>-1&&e.ctrlKey||t.indexOf("alt")>-1&&e.altKey||t.indexOf("meta")>-1&&e.metaKey)}(e,t))&&(!n||this._isValidButton(this._getButton(e),n))},t._preventMouseButton=function(e,t){t===oi?ti.addEventListener("contextmenu",this._stopContextMenu):t===ai&&e.preventDefault()},e}(),zi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}ei(t,e);var n=t.prototype;return n.onEventStart=function(e,t,n){var i=this._getButton(e);return this._isValidEvent(e,t,n)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},n.onEventMove=function(e,t,n){return this._isValidEvent(e,t,n)?this.extendEvent(e):null},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(e,t){return t&&this._isValidButton(si[e.which],t)&&-1===this.end.indexOf(e.type)?1:0},n._getScale=function(){return 1},n._getCenter=function(e){return{x:e.clientX,y:e.clientY}},n._getMovement=function(e){var t=this.prevEvent.srcEvent;return{x:e.clientX-t.clientX,y:e.clientY-t.clientY}},t}(Ni),Fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["touchstart"],t.move=["touchmove"],t.end=["touchend","touchcancel"],t}ei(t,e);var n=t.prototype;return n.onEventStart=function(e,t){return this._baseTouches=e.touches,this._isValidEvent(e,t)?this.extendEvent(e):null},n.onEventMove=function(e,t){return this._isValidEvent(e,t)?this.extendEvent(e):null},n.onEventEnd=function(e){this._baseTouches=e.touches},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(e){return e.touches.length},n._getScale=function(e){return 2!==e.touches.length||this._baseTouches.length<2?null:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},n._getCenter=function(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}},n._getMovement=function(e){var t=this.prevEvent.srcEvent;return e.touches[0].identifier!==t.touches[0].identifier?{x:0,y:0}:{x:e.touches[0].clientX-t.touches[0].clientX,y:e.touches[0].clientY-t.touches[0].clientY}},t}(Ni),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=ji?["pointerdown"]:["MSPointerDown"],t.move=ji?["pointermove"]:["MSPointerMove"],t.end=ji?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}ei(t,e);var n=t.prototype;return n.onEventStart=function(e,t,n){var i=this._getButton(e);return this._isValidEvent(e,t,n)?(this._preventMouseButton(e,i),this._updatePointerEvent(e),this.extendEvent(e)):null},n.onEventMove=function(e,t,n){return this._isValidEvent(e,t,n)?(this._updatePointerEvent(e),this.extendEvent(e)):null},n.onEventEnd=function(e){this._removePointerEvent(e)},n.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},n.getTouches=function(){return this._recentInputs.length},n._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},n._getCenter=function(e){return{x:e.clientX,y:e.clientY}},n._getMovement=function(e){var t=this.prevEvent.srcEvent;return e.pointerId!==t.pointerId?{x:0,y:0}:{x:e.clientX-t.clientX,y:e.clientY-t.clientY}},n._updatePointerEvent=function(e){var t=this,n=!1;this._recentInputs.forEach((function(i,r){i.pointerId===e.pointerId&&(n=!0,t._recentInputs[r]=e)})),n||(this._firstInputs.push(e),this._recentInputs.push(e))},n._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter((function(t){return t.pointerId!==e.pointerId})),this._recentInputs=this._recentInputs.filter((function(t){return t.pointerId!==e.pointerId}))},t}(Ni),qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown","touchstart"],t.move=["mousemove","touchmove"],t.end=["mouseup","touchend","touchcancel"],t}ei(t,e);var n=t.prototype;return n.onEventStart=function(e,t,n){var i=this._getButton(e);return this._isTouchEvent(e)&&(this._baseTouches=e.touches),this._isValidEvent(e,t,n)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},n.onEventMove=function(e,t,n){return this._isValidEvent(e,t,n)?this.extendEvent(e):null},n.onEventEnd=function(e){this._isTouchEvent(e)&&(this._baseTouches=e.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(e,t){return this._isTouchEvent(e)?e.touches.length:this._isValidButton(si[e.which],t)&&-1===this.end.indexOf(e.type)?1:0},n._getScale=function(e){return this._isTouchEvent(e)?2!==e.touches.length||this._baseTouches.length<2?1:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},n._getCenter=function(e){return this._isTouchEvent(e)?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}},n._getMovement=function(e){var t=this,n=[e,this.prevEvent.srcEvent].map((function(e){return t._isTouchEvent(e)?{id:e.touches[0].identifier,x:e.touches[0].clientX,y:e.touches[0].clientY}:{id:null,x:e.clientX,y:e.clientY}})),i=n[0],r=n[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},t}(Ni),Ui=function(e,t){return t.reduce((function(t,n,i){return e[i]&&(t[e[i]]=n),t}),{})};function Bi(e){return e.indexOf("touch")>-1&&{passive:!1}}var Vi=function(){function e(e){var t=e.options,n=e.interruptManager,i=e.eventManager,r=e.axisManager,o=e.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=t,this._interruptManager=n,this._eventManager=i,this._axisManager=r,this._animationManager=o}var t=e.prototype;return t.get=function(e){return this._axisManager.get(e.axes)},t.hold=function(e,t){if(!this._interruptManager.isInterrupted()&&e.axes.length){var n={input:e,event:t};this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(n),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),n),this._isOutside=this._axisManager.isOutside(e.axes),this._moveDistance=this._axisManager.get(e.axes)}},t.change=function(e,t,n,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&!this._axisManager.every(n,(function(e){return 0===e}))){var r=t.srcEvent?t.srcEvent:t;if(!r.__childrenAxesAlreadyChanged){var o,a=this._moveDistance||this._axisManager.get(e.axes);o=vi(a,(function(e,t){return e+(n[t]||0)})),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,(function(e,t){var n=t.circular,i=t.range;return n&&(n[0]||n[1])?Mi(e,i,n):e}))),this._isOutside&&this._axisManager.every(a,(function(e,t){return!Ai(e,t.range)}))&&(this._isOutside=!1),a=this._atOutside(a),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(n,a,o)||(r.__childrenAxesAlreadyChanged=!0);var s={input:e,event:t};if(i){var u=this._animationManager.getDuration(o,a);this._animationManager.animateTo(o,u,s)}else!this._eventManager.triggerChange(o,a,s,!0)&&(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))}}},t.release=function(e,t,n,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance){var r=t.srcEvent?t.srcEvent:t;r.__childrenAxesAlreadyReleased&&(n=n.map((function(){return 0})));var o=this._axisManager.get(e.axes),a=this._axisManager.get(),s=this._animationManager.getDisplacement(n),u=Ui(e.axes,s),l=this._axisManager.get(this._axisManager.map(u,(function(e,t,n){return t.circular&&(t.circular[0]||t.circular[1])?o[n]+e:Ti(o[n]+e,t.range,t.circular,t.bounce)})));r.__childrenAxesAlreadyReleased=!0;var c=this._animationManager.getDuration(l,o,i);0===c&&(l=ni({},a));var d={depaPos:a,destPos:l,duration:c,delta:this._axisManager.getDelta(a,l),inputEvent:t,input:e,isTrusted:!0};--this._eventManager.holdingCount,this._eventManager.triggerRelease(d),0===this._eventManager.holdingCount&&(this._moveDistance=null);var h=this._animationManager.getUserControl(d),f=bi(h.destPos,a),p={input:e,event:t};f||0===h.duration?(f||this._eventManager.triggerChange(h.destPos,a,p,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(p):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(h.destPos,h.duration,p)}},t._atOutside=function(e){var t=this;return this._isOutside?this._axisManager.map(e,(function(e,t){var n=t.range[0]-t.bounce[0],i=t.range[1]+t.bounce[1];return e>i?i:er?e:er?r+t._animationManager.interpolate(e-r,o[1]):e}))},t._isEndofAxis=function(e,t,n){return this._axisManager.every(t,(function(i,r,o){return 0===e[o]||t[o]===n[o]&&function(e,t,n,i){return!i[0]&&e===t[0]-n[0]||!i[1]&&e===t[1]+n[1]}(i,r.range,r.bounce,r.circular)}))},e}(),Wi=function(e,t,n){return Math.max(Math.min(e,n),t)},$i=function(){function e(e){var t=e.options,n=e.interruptManager,i=e.eventManager,r=e.axisManager;this._options=t,this.interruptManager=n,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var t=e.prototype;return t.getDuration=function(e,t,n){var i,r=this;if(void 0!==n)i=n;else{var o=vi(t,(function(t,n){return function(e,t){var n=Math.sqrt(e/t*2);return n<100?0:n}(Math.abs(t-e[n]),r._options.deceleration)}));i=Object.keys(o).reduce((function(e,t){return Math.max(e,o[t])}),-1/0)}return Wi(i,this._options.minimumDuration,this._options.maximumDuration)},t.getDisplacement=function(e){var t=Math.pow(e.reduce((function(e,t){return e+t*t}),0),1/e.length),n=Math.abs(t/-this._options.deceleration);return e.map((function(e){return e/2*n}))},t.stopAnimation=function(e){if(this._animateParam){var t=this.axisManager.get(),n=this.axisManager.map(t,(function(e,t){return Mi(e,t.range,t.circular)}));yi(n,(function(e,n){return t[n]===e}))||this.eventManager.triggerChange(n,t,e,!!e),this._animateParam=null,this._raf&&(i=this._raf,pi(i)),this._raf=null,this.eventManager.triggerAnimationEnd(!!(null==e?void 0:e.event))}var i},t.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},t.restore=function(e){var t=this.axisManager.get(),n=this.axisManager.map(t,(function(e,t){return Math.min(t.range[1],Math.max(t.range[0],e))}));this.stopAnimation(),this.animateTo(n,this.getDuration(t,n),e)},t.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var t=this.axisManager.filter(this.axisManager.get(),(function(e,t){return Ri(e,t.range,t.circular)}));Object.keys(t).length>0&&this.setTo(this.axisManager.map(t,(function(e,t){return Mi(e,t.range,t.circular)}))),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!e),this.axisManager.isOutside()?this.restore(e):this.finish(!!e)},t.finish=function(e){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(e)},t.getUserControl=function(e){var t=e.setTo();return t.destPos=this.axisManager.get(t.destPos),t.duration=Wi(t.duration,this._options.minimumDuration,this._options.maximumDuration),t},t.animateTo=function(e,t,n){var i=this;this.stopAnimation();var r=this._createAnimationParam(e,t,n),o=ni({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),s=this.getUserControl(r);if(!a&&this.axisManager.every(s.destPos,(function(e,t){return Ri(e,t.range,t.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!bi(s.destPos,o)){var u=(null==n?void 0:n.event)||null;this._animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axisManager.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:(null==n?void 0:n.input)||null},(function(){return i.animationEnd()}))}},t.setTo=function(e,t){void 0===t&&(t=0);var n=Object.keys(e),i=this.axisManager.get(n);if(bi(e,i))return this;this.interruptManager.setInterrupt(!0);var r=mi(e,(function(e,t){return i[t]!==e}));return Object.keys(r).length?(r=this.axisManager.map(r,(function(e,t){var n=t.range,i=t.circular;return i&&(i[0]||i[1])?e:Ti(e,n,i)})),bi(r,i)||(t>0?this.animateTo(r,t):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},t.setBy=function(e,t){return void 0===t&&(t=0),this.setTo(vi(this.axisManager.get(Object.keys(e)),(function(t,n){return t+e[n]})),t)},t.setOptions=function(e){this._options=ni(ni({},this._options),e)},t._createAnimationParam=function(e,t,n){var i=this.axisManager.get(),r=e,o=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:r,duration:Wi(t,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:o,input:(null==n?void 0:n.input)||null,isTrusted:!!o,done:this.animationEnd}},t._animateLoop=function(e,t){var n=this;if(e.duration){this._animateParam=ni(ni({},e),{startTime:(new Date).getTime()});var i=vi(e.destPos,(function(e){return e})),r=this._initState(this._animateParam),o=function(){n._raf=null;var e=n._animateParam,a=n._getNextState(r),s=!n.eventManager.triggerChange(a.pos,r.pos);if(r=a,a.finished)return e.destPos=n._getFinalPos(e.destPos,i),bi(e.destPos,n.axisManager.get(Object.keys(e.destPos)))||n.eventManager.triggerChange(e.destPos,a.pos),void t();s?n.finish(!1):n._raf=fi(o)};o()}else this.eventManager.triggerChange(e.destPos),t()},t._getFinalPos=function(e,t){var n=this,i=1e-6;return vi(e,(function(e,r){if(e>=t[r]-i&&e<=t[r]+i)return t[r];var o=n._getRoundUnit(e,r);return xi(e,o)}))},t._getRoundUnit=function(e,t){var n,i=this._options.round,r=null;if(!i){var o=this.axisManager.getAxisOptions(t);n=Math.max(Ei(o.range[0]),Ei(o.range[1]),Ei(e)),r=1/Math.pow(10,n)}return r||i},e}(),Yi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}ei(t,e);var n=t.prototype;return n.interpolate=function(e,t){var n=this._easing(1e-5)/1e-5;return this._easing(e/(t*n))*t},n.updateAnimation=function(e){var t,n=this._animateParam;if(n){var i=(new Date).getTime()-n.startTime,r=(null==e?void 0:e.destPos)||n.destPos,o=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:n.duration;if((null==e?void 0:e.restart)||o<=i)this.setTo(r,o-i);else{if(null==e?void 0:e.destPos){var a=this.axisManager.get();this._initialEasingPer=this._prevEasingPer,n.delta=this.axisManager.getDelta(a,r),n.destPos=r}if(null==e?void 0:e.duration){var s=(i+this._durationOffset)/n.duration;this._durationOffset=s*o-i,n.duration=o}}}},n._initState=function(e){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:e.depaPos,easingPer:0,finished:!1}},n._getNextState=function(e){var t=this,n=this._animateParam,i=e.pos,r=n.destPos,o=vi(i,(function(e,t){return e<=r[t]?1:-1})),a=((new Date).getTime()-n.startTime+this._durationOffset)/n.duration,s=this._easing(a),u=this.axisManager.map(i,(function(e,u,l){var c=a>=1?r[l]:e+n.delta[l]*(s-t._prevEasingPer)/(1-t._initialEasingPer),d=Mi(c,u.range,u.circular);if(c!==d){var h=o[l]*(u.range[1]-u.range[0]);r[l]-=h,i[l]-=h}return d}));return this._prevEasingPer=s,{pos:u,easingPer:s,finished:s>=1}},n._easing=function(e){return e>1?1:this._options.easing(e)},t}($i),Gi=function(e){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var r=e.call(this)||this;return r.axis=t,r._inputs=[],r.options=ni({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},n),Object.keys(i).forEach((function(e){r.axis[e].startPos=i[e]})),r.interruptManager=new Si(r.options),r.axisManager=new Di(r.axis),r.eventManager=new Ci(r),r.animationManager=new Yi(r),r.inputObserver=new Vi(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange(r.axisManager.get()),r}ei(t,e);var n=t.prototype;return Object.defineProperty(n,"holding",{get:function(){return this.eventManager.holdingCount>0},enumerable:!1,configurable:!0}),n.connect=function(e,t){var n;return n="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(t)&&this.disconnect(t),t.mapAxes(n),t.connect(this.inputObserver),this._inputs.push(t),this},n.disconnect=function(e){if(e){var t=this._inputs.indexOf(e);t>=0&&(this._inputs[t].disconnect(),this._inputs.splice(t,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},n.get=function(e){return this.axisManager.get(e)},n.setTo=function(e,t){return void 0===t&&(t=0),this.animationManager.setTo(e,t),this},n.setBy=function(e,t){return void 0===t&&(t=0),this.animationManager.setBy(e,t),this},n.setOptions=function(e){return this.options=ni(ni({},this.options),e),this.animationManager.setOptions(e),this},n.setAxis=function(e){return this.axisManager.setAxis(e),this},n.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},n.updateAnimation=function(e){return this.animationManager.updateAnimation(e),this},n.isBounceArea=function(e){return this.axisManager.isOutside(e)},n.destroy=function(){this.disconnect(),this.eventManager.destroy()},t.VERSION="3.9.0",t.TRANSFORM=li,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=16,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=24,t.DIRECTION_ALL=30,ii([Qn],t.prototype,"holding",null),ii([Xn],t)}(vn),Xi=function(){function e(e,t){var n=this;this.axes=[],this.element=null,this._enabled=!1,this._activeEvent=null,this._atRightEdge=!1,this._rightEdgeTimer=0,this._dragged=!1,this._isOverThreshold=!1,this._preventClickWhenDragged=function(e){n._dragged&&(e.preventDefault(),e.stopPropagation()),n._dragged=!1},this._voidFunction=function(){},this.element=hi(e),this.options=ni({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[ri],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},t),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var t=e.prototype;return t.mapAxes=function(e){var t,n;this._direction=(t=!!e[0],n=!!e[1],t&&n?30:t?6:n?24:1),this.axes=e},t.connect=function(e){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(e),this._originalCssProps=function(e,t,n){var i,r=((i={})[1]="auto",i[30]="none",i[24]="pan-x",i[6]="pan-y",i),o={};if(e&&e.style){var a=t.touchAction?t.touchAction:r[n],s=ni(ni({},ci),{"touch-action":"none"===e.style["touch-action"]?"none":a});Object.keys(s).forEach((function(t){o[t]=e.style[t],e.style[t]=s[t]}))}return o}(this.element,this.options,this._direction),this},t.disconnect=function(){var e,t;return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),e=this._originalCssProps,t=!0,Object.keys(ci).forEach((function(n){e&&e[n]===ci[n]||(t=!1)})),t||function(e,t){e&&e.style&&t&&Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}(this.element,this._originalCssProps),this._direction=1,this},t.destroy=function(){this.disconnect(),this.element=null},t.enable=function(){return this._enabled=!0,this},t.disable=function(){return this._enabled=!1,this},t.isEnabled=function(){return this._enabled},t.release=function(){var e=this._activeEvent,t=e.prevEvent;return e.onRelease(),this._observer.release(this,t,[0,0]),this._detachWindowEvent(e),this},t._onPanstart=function(e){var t=this.options,n=t.inputKey,i=t.inputButton,r=t.preventDefaultOnDrag,o=this._activeEvent,a=o.onEventStart(e,n,i);if(a&&this._enabled&&!(o.getTouches(e,i)>1)&&!1!==a.srcEvent.cancelable){var s=this.options.iOSEdgeSwipeThreshold;this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,a),this._atRightEdge=ui&&a.center.x>window.innerWidth-s,this._attachWindowEvent(o),r&&"touchstart"!==a.srcEvent.type&&a.srcEvent.preventDefault(),o.prevEvent=a}},t._onPanmove=function(e){var t=this,n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.preventClickOnDrag,o=n.releaseOnScroll,a=n.inputKey,s=n.inputButton,u=n.threshold,l=n.thresholdAngle,c=this._activeEvent,d=c.onEventMove(e,a,s),h=c.getTouches(e,s);if(0===h||o&&d&&!d.srcEvent.cancelable)this._onPanend(e);else if(d&&this._enabled&&!(h>1)){var f=function(e,t){if(t<0||t>90)return 1;var n=Math.abs(e);return n>t&&n<180-t?24:6}(d.angle,l),p=Oi(6,this._direction,f),_=Oi(24,this._direction,f);if(c.prevEvent&&ui){if(d.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),d.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout((function(){return t.release()}),100))}var g=this._getDistance([d.deltaX,d.deltaY],[p,_]),v=this._getOffset([d.offsetX,d.offsetY],[p,_]),m=v.some((function(e){return 0!==e}));m&&(!1!==d.srcEvent.cancelable&&d.srcEvent.preventDefault(),d.srcEvent.stopPropagation()),d.preventSystemEvent=m,m&&(this._isOverThreshold||g>=u)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,d,Ui(this.axes,v))),c.prevEvent=d}},t._onPanend=function(e){var t=this.options.inputButton,n=this._activeEvent;if(n.onEventEnd(e),this._enabled&&0===n.getTouches(e,t)){this._detachWindowEvent(n),clearTimeout(this._rightEdgeTimer);var i=n.prevEvent,r=this._isOverThreshold?this._getOffset([Math.abs(i.velocityX)*(i.offsetX<0?-1:1),Math.abs(i.velocityY)*(i.offsetY<0?-1:1)],[Oi(6,this._direction),Oi(24,this._direction)]):[0,0];n.onRelease(),this._observer.release(this,i,r)}},t._attachWindowEvent=function(e){var t=this;null==e||e.move.forEach((function(e){window.addEventListener(e,t._onPanmove,Bi(e))})),null==e||e.end.forEach((function(e){window.addEventListener(e,t._onPanend,Bi(e))}))},t._detachWindowEvent=function(e){var t=this;null==e||e.move.forEach((function(e){window.removeEventListener(e,t._onPanmove)})),null==e||e.end.forEach((function(e){window.removeEventListener(e,t._onPanend)}))},t._getOffset=function(e,t){var n=this.options.scale;return[t[0]?e[0]*n[0]:0,t[1]?e[1]*n[1]:0]},t._getDistance=function(e,t){return Math.sqrt(Number(t[0])*Math.pow(e[0],2)+Number(t[1])*Math.pow(e[1],2))},t._attachElementEvent=function(e){var t=this,n=function(e){void 0===e&&(e=[]);var t=!1,n=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":n=!0;break;case"touch":t=Ii;break;case"pointer":i=Li}})),i?new Hi:t&&n?new qi:t?new Fi:n?new zi:null}(this.options.inputType),i=this.element;if(n){if(!i)throw new Error("Element to connect input does not exist.");this._observer=e,this._enabled=!0,this._activeEvent=n,i.addEventListener("click",this._preventClickWhenDragged,!0),n.start.forEach((function(e){i.addEventListener(e,t._onPanstart)})),n.move.forEach((function(e){i.addEventListener(e,t._voidFunction)}))}},t._detachElementEvent=function(){var e=this,t=this._activeEvent,n=this.element;n&&(n.removeEventListener("click",this._preventClickWhenDragged,!0),null==t||t.start.forEach((function(t){n.removeEventListener(t,e._onPanstart)})),null==t||t.move.forEach((function(t){n.removeEventListener(t,e._voidFunction)}))),this._enabled=!1,this._observer=null},e}(),Ki=function(e,t){return Ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ki(e,t)};function Ji(e,t){function n(){this.constructor=e}Ki(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Qi=function(){return Qi=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0},n.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){e.loader&&e.loader.destroy()})),this.elementInfos=[]},n.destroy=function(){this.clear(),this.off()},n.getLoader=function(e,t){var n=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=t.prefix,a=Object.keys(r);if(r[i])return new r[i](e,t);var s=new vr(e,t),u=sr(e.querySelectorAll(a.join(", ")));s.setHasLoading(u.some((function(e){return ur(e,o)})));var l=!1,c=this.clone().on("error",(function(e){s.onError(e.target)})).on("ready",(function(){s.onReady(l)}));return s.on("requestChildren",(function(){var t=function(e,t,n){var i=sr(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t=1||(e.error?(this.onAlreadyError(e),1):(this.addEvents(),0)))},t.EVENTS=["loadedmetadata","error"],t}(gr),wr=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Qi({loaders:{img:yr,video:br}},t))||this}return Ji(t,e),t}(mr),xr=function(e,t){return xr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xr(e,t)};function Pr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Er=function(){return Er=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Tr(){for(var e=[],t=0;tn&&(e=t+(e-n)%i),e},oo=function(e,t,n){return(e-t)/(n-t)},ao=function(e){return window.getComputedStyle(e)||e.currentStyle},so=function(e,t){var n=t.width,i=t.height;null!=n&&(io(n)?e.style.width=n:e.style.width=n+"px"),null!=i&&(io(i)?e.style.height=i:e.style.height=i+"px")},uo=function(e,t,n){return e>=t&&e<=n},lo=function(e,t){return e>=t?e%t:e<0?to((e+1)%t-1,t):e},co=function(e){for(var t=new Array(e),n=0;n0&&i>=t&&(n._maxResizeDebounceTimer=window.setTimeout(n._doScheduledResize,i)),n._resizeTimer>0&&(clearTimeout(n._resizeTimer),n._resizeTimer=0),n._resizeTimer=window.setTimeout(n._doScheduledResize,t))},this._doScheduledResize=function(){clearTimeout(n._resizeTimer),clearTimeout(n._maxResizeDebounceTimer),n._maxResizeDebounceTimer=-1,n._resizeTimer=-1,n._flicking.resize()},this._skipFirstResize=(t=!0,function(){t?t=!1:n._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var t=e.prototype;return Object.defineProperty(t,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),t.enable=function(){var e=this._flicking,t=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var n=0!==t.width||0!==t.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);n.observe(e.viewport.element),this._resizeObserver=n}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},t.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),vo=function(){function e(e){this._element=e,this._rendered=!0}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),t.show=function(e){var t=this.element,n=e.camera.element;t.parentElement!==n&&(n.appendChild(t),this._rendered=!0)},t.hide=function(e){var t=this.element,n=e.camera.element;t.parentElement===n&&(n.removeChild(t),this._rendered=!1)},e}(),mo=function(){function e(e){this._flicking=e}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(t,"_virtualElement",{get:function(){var e=this._flicking,t=this._panel.elementIndex;return e.virtual.elements[t]},enumerable:!1,configurable:!0}),t.init=function(e){this._panel=e},t.show=function(){},t.hide=function(){},e}(),yo=function(){function e(e,t){var n,i,r,o;this._flicking=e,this._renderPanel=null!==(n=null==t?void 0:t.renderPanel)&&void 0!==n?n:function(){return""},this._initialPanelCount=null!==(i=null==t?void 0:t.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==t?void 0:t.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==t?void 0:t.panelClass)&&void 0!==o?o:"flicking-panel",this._elements=[]}var t=e.prototype;return Object.defineProperty(t,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var t=e.camera.children;this._elements=t.map((function(e){return{nativeElement:e,visible:!0}}))}},t.show=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!0,n.style.display&&(n.style.display="")},t.hide=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!1,n.style.display="none"},t.append=function(e){void 0===e&&(e=1);var t=this._flicking;return this.insert(t.panels.length,e)},t.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},t.insert=function(e,t){return void 0===t&&(t=1),t<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:co(t),hasDOMInElements:!1})},t.remove=function(e,t){return t<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!1})},t._initVirtualElements=function(){var e=this,t=this._flicking,n=t.camera.element,i=t.panelsPerView,r=document.createDocumentFragment();co(i+1).map((function(t){var n=document.createElement("div");return n.className=e._panelClass,n.dataset.elementIndex=t.toString(),n})).forEach((function(e){r.appendChild(e)})),n.appendChild(r)},e}(),bo={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},wo="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(Ar||(Ar={}));var xo=function(){function e(){this._delta=0,this._targetPanel=null}var t=e.prototype;return Object.defineProperty(t,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(t,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),t.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},t.onHold=function(e){},t.onChange=function(e){},t.onRelease=function(e){},t.onAnimationEnd=function(e){},t.onFinish=function(e){},t._moveToChangedPosition=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.delta[wo];if(r){this._delta+=r;var o=t.camera,a=o.position,s=n.pos[wo],u=t.circularEnabled?ro(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new mn(Nr.MOVE,{isTrusted:n.isTrusted,holding:this.holding,direction:Zr(0,n.delta[wo]),axesEvent:n});t.trigger(l),l.isCanceled()&&(o.lookAt(a),i(Ar.DISABLED))}},e}(),Po=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!1,t}Pr(t,e);var n=t.prototype;return n.onEnter=function(){this._delta=0,this._targetPanel=null},n.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.renderer.panelCount<=0)i(Ar.DISABLED);else{var r=new mn(Nr.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(Ar.DISABLED):i(Ar.HOLDING)}},n.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control.controller.animatingContext,o=new mn(Nr.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:Zr(r.start,r.end),axesEvent:n});t.trigger(o),o.isCanceled()?i(Ar.DISABLED):i(Ar.ANIMATING).onChange(e)},t}(xo),Eo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!1,t._releaseEvent=null,t}Pr(t,e);var n=t.prototype;return n.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.inputEvent,o=t.horizontal?r.offsetX:r.offsetY,a=new mn(Nr.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:Zr(0,-o),axesEvent:n});t.trigger(a),a.isCanceled()?i(Ar.DISABLED):i(Ar.DRAGGING).onChange(e)},n.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.trigger(new mn(Nr.HOLD_END,{axesEvent:n})),0!==n.delta.flick)return n.setTo({flick:t.camera.position},0),void i(Ar.IDLE);this._releaseEvent=n},n.onFinish=function(e){var t,n,i=e.flicking;if((0,e.transitTo)(Ar.IDLE),this._releaseEvent){var r,o=this._releaseEvent.inputEvent.srcEvent;if("touchend"===o.type){var a=o.changedTouches[0];r=document.elementFromPoint(a.clientX,a.clientY)}else r=o.target;var s=i.renderer.panels,u=null;try{for(var l=Cr(s),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.contains(r)){u=d;break}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}if(u){var h=i.camera.position,f=u.position;i.trigger(new mn(Nr.SELECT,{index:u.index,panel:u,direction:Zr(h,f)}))}}},t}(xo),ko=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!0,t}Pr(t,e);var n=t.prototype;return n.onChange=function(e){this._moveToChangedPosition(e)},n.onRelease=function(e){var t,n=e.flicking,i=e.axesEvent,r=e.transitTo;if(n.trigger(new mn(Nr.HOLD_END,{axesEvent:i})),n.renderer.panelCount<=0)r(Ar.IDLE);else{r(Ar.ANIMATING);var o=n.control,a=i.destPos[wo],s=Math.max(i.duration,n.duration);try{o.moveToPosition(a,s,i)}catch(e){r(Ar.IDLE),i.setTo(((t={})[wo]=n.camera.position,t),0)}}},t}(xo),Oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}Pr(t,e);var n=t.prototype;return n.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=this._targetPanel,o=t.control;this._delta=0,t.control.updateInput(),t.changeOnHold&&r&&o.setActive(r,o.activePanel,n.isTrusted);var a=new mn(Nr.HOLD_START,{axesEvent:n});t.trigger(a),a.isCanceled()?i(Ar.DISABLED):i(Ar.DRAGGING)},n.onChange=function(e){this._moveToChangedPosition(e)},n.onFinish=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control,o=r.controller.animatingContext;i(Ar.IDLE),t.trigger(new mn(Nr.MOVE_END,{isTrusted:n.isTrusted,direction:Zr(o.start,o.end),axesEvent:n}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,n.isTrusted)},t}(xo),Co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}Pr(t,e);var n=t.prototype;return n.onAnimationEnd=function(e){(0,e.transitTo)(Ar.IDLE)},n.onChange=function(e){var t=e.axesEvent,n=e.transitTo;t.stop(),n(Ar.IDLE)},n.onRelease=function(e){var t=e.axesEvent,n=e.transitTo;0===t.delta.flick&&n(Ar.IDLE)},t}(xo),So=function(){function e(){var e=this;this.transitTo=function(t){var n;switch(t){case Ar.IDLE:n=new Po;break;case Ar.HOLDING:n=new Eo;break;case Ar.DRAGGING:n=new ko;break;case Ar.ANIMATING:n=new Oo;break;case Ar.DISABLED:n=new Co}return n.onEnter(e._state),e._state=n,e._state},this._state=new Po}var t=e.prototype;return Object.defineProperty(t,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.fire=function(e,t){var n=this._state,i=Er(Er({},t),{transitTo:this.transitTo});switch(e){case bo.HOLD:n.onHold(i);break;case bo.CHANGE:n.onChange(i);break;case bo.RELEASE:n.onRelease(i);break;case bo.ANIMATION_END:n.onAnimationEnd(i);break;case bo.FINISH:n.onFinish(i)}},e}(),To=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var t;e._dragged=!!(null===(t=e._panInput)||void 0===t?void 0:t.isEnabled())},this._preventClickWhenDragged=function(t){e._dragged&&(t.preventDefault(),t.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new So}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panInput",{get:function(){return this._panInput},enumerable:!1,configurable:!0}),Object.defineProperty(t,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var t=e.axis[wo];return{range:{min:t.range[0],max:t.range[1]},circular:t.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,t;return null!==(t=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.get([wo])[wo])&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.axis[wo].range)&&void 0!==t?t:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[wo].bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,n=this;this._flicking=e,this._axes=new Gi(((t={})[wo]={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new Xi(e.viewport.element,{inputType:e.inputType,threshold:1,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===Wr?1:-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[wo,""]:["",wo],this._panInput);var r=function(t){var r=bo[t];i.on(r,(function(t){n._stateMachine.fire(r,{flicking:e,axesEvent:t})}))};for(var o in bo)r(o);return this},t.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},t.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},t.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},t.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},t.updateAnimation=function(e,t){var n,i;return this._animatingContext=Er(Er({},this._animatingContext),{end:e}),null===(i=this._axes)||void 0===i||i.updateAnimation({destPos:(n={},n[wo]=e,n),duration:t}),this},t.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},t.update=function(e){var t,n=Yr(this._flicking),i=n.camera,r=this._axes,o=r.axis[wo];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=function(e,t){var n;if(Array.isArray(e))n=e.map((function(e){return Kr(e,t)}));else{var i=Kr(e,t);n=[i,i]}return n.map((function(t){if(null==t)throw new po(Dr("bounce",e),4);return t}))}(n.bounce,i.size),r.axisManager.set(((t={})[wo]=e.position,t)),this},t.addPreventClickHandler=function(){var e=Yr(this._flicking),t=this._axes,n=e.camera.element;return t.on(bo.HOLD,this._onAxesHold),t.on(bo.CHANGE,this._onAxesChange),n.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=Yr(this._flicking),t=this._axes,n=e.camera.element;return t.off(bo.HOLD,this._onAxesHold),t.off(bo.CHANGE,this._onAxesChange),n.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,t,n){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new po(Mr,3));var s=o.get([wo])[wo];if(s===e){var u=Yr(this._flicking);return u.camera.lookAt(e),a.targetPanel&&u.control.setActive(a.targetPanel,u.control.activePanel,null!==(i=null==n?void 0:n.isTrusted)&&void 0!==i&&i),Promise.resolve()}return this._animatingContext={start:s,end:e,offset:0},new Promise((function(i,a){var s=function(){o.off(bo.HOLD,u),i()},u=function(){o.off(bo.FINISH,s),a(new po("Animation is interrupted by user input.",9))};o.once(bo.FINISH,s),o.once(bo.HOLD,u),function(){var i,a;o.once(bo.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),n?n.setTo(((i={})[wo]=e,i),t):o.setTo(((a={})[wo]=e,a),t)}()}))},t.updateDirection=function(){var e=Yr(this._flicking),t=this._axes,n=this._panInput;t.disconnect(n),t.connect(e.horizontal?[wo,""]:["",wo],n),n.options.scale=e.horizontal?[e.camera.panelOrder===Wr?1:-1,0]:[0,-1]},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),Ao=function(){function e(){this._flicking=null,this._controller=new To,this._activePanel=null}var t=e.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,t;return null!==(t=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==t?t:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._controller.init(e),this},t.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},t.enable=function(){return this._controller.enable(),this},t.disable=function(){return this._controller.disable(),this},t.release=function(){return this._controller.release(),this},t.updateAnimation=function(e,t,n){var i=this._controller.state,r=this._getPosition(e,null!=n?n:Br);return i.targetPanel=e,this._controller.updateAnimation(r,t),this},t.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},t.updatePosition=function(e){var t=Yr(this._flicking).camera,n=this._activePanel;n&&t.lookAt(t.clampToReachablePosition(n.position))},t.updateInput=function(){var e=Yr(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,t){var n=t.duration,i=t.direction,r=void 0===i?Br:i,o=t.axesEvent;return kr(this,void 0,void 0,(function(){var t;return Or(this,(function(i){return t=this._getPosition(e,r),this._triggerIndexChangeEvent(e,e.position,o),[2,this._animateToPosition({position:t,duration:n,newActivePanel:e,axesEvent:o})]}))}))},t.setActive=function(e,t,n){var i,r=Yr(this._flicking);this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==t?r.trigger(new mn(Nr.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==t?void 0:t.index)&&void 0!==i?i:-1,prevPanel:t,isTrusted:n,direction:t?Zr(t.position,e.position):Br})):r.trigger(new mn(Nr.RESTORED,{isTrusted:n}))},t.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},t._triggerIndexChangeEvent=function(e,t,n){var i,r=Yr(this._flicking),o=e!==this._activePanel?Nr.WILL_CHANGE:Nr.WILL_RESTORE,a=r.camera,s=this._activePanel,u=new mn(o,{index:e.index,panel:e,isTrusted:(null==n?void 0:n.isTrusted)||!1,direction:Zr(null!==(i=null==s?void 0:s.position)&&void 0!==i?i:a.position,t)});if(r.trigger(u),u.isCanceled())throw new po("Event stop() is called by user.",8)},t._animateToPosition=function(e){var t=e.position,n=e.duration,i=e.newActivePanel,r=e.axesEvent;return kr(this,void 0,void 0,(function(){var e,o,a=this;return Or(this,(function(s){return e=Yr(this._flicking),o=function(){return a._controller.animateTo(t,n,r)},this._controller.state.targetPanel=i,n<=0?[2,o()]:[2,o().then((function(){return kr(a,void 0,void 0,(function(){return Or(this,(function(t){switch(t.label){case 0:return[4,e.renderer.render()];case 1:return t.sent(),[2]}}))}))})).catch((function(e){if(!(r&&e instanceof po&&9===e.code))throw e}))]}))}))},t._getPosition=function(e,t){void 0===t&&(t=Br);var n=Yr(this._flicking),i=n.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new po(jr(e.position),6);if(i.canReach(e)){if(n.circularEnabled){var a=this._controller.position,s=i.rangeDiff,u=[r,r+s,r-s].filter((function(e){return t===Br||(t===qr?e<=a:e>=a)}));r=u.reduce((function(e,t){return Math.abs(a-t)=l&&h>0)u=this._findSnappedAnchor(e,a);else{if(!(d>=i.threshold&&d>0))return this.moveToPanel(a.panel,{duration:t,axesEvent:n});u=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(u.panel,e,n),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:t,newActivePanel:u.panel,axesEvent:n})},n._findSnappedAnchor=function(e,t){var n=Yr(this._flicking),i=n.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!t||!s)throw new po(jr(e),6);if(!isFinite(r))return s;var u=n.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.indext.position&&s.index===t.index?c+=1:(et.index||s.positiono&&p.indext.index&&(_-=1),new Ro({index:p.index,position:p.position+_*i.rangeDiff,panel:p.panel})}return l[$r(t.index+Math.sign(e-o)*r,0,l.length-1)]},n._findAdjacentAnchor=function(e,t,n){var i,r=Yr(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==n.position)return o}return null!==(i=t>0?r.getNextAnchor(n):r.getPrevAnchor(n))&&void 0!==i?i:n},n._calcSnapThreshold=function(e,t){var n=e>t.position,i=t.panel,r=i.size,o=i.alignPosition;return n?r-o+i.margin.next:o+i.margin.prev},t}(Ao),Do=function(e){function t(t){var n=(void 0===t?{}:t).stopAtEdge,i=void 0===n||n,r=e.call(this)||this;return r._stopAtEdge=i,r}Pr(t,e);var n=t.prototype;return Object.defineProperty(n,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),n.updatePosition=function(e){var t=Yr(this._flicking).camera,n=this._activePanel;if(n){var i=n.range,r=i.min+(i.max-i.min)*e;t.lookAt(t.clampToReachablePosition(r))}},n.moveToPosition=function(e,t,n){var i=Yr(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new po(jr(e),6));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,n),this._animateToPosition({position:this._stopAtEdge?r:e,duration:t,newActivePanel:a,axesEvent:n})},t}(Ao),Io=function(e){function t(t){var n=(void 0===t?{}:t).count,i=void 0===n?1:n,r=e.call(this)||this;return r.setActive=function(t,n,i){e.prototype.setActive.call(r,t,n,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}Pr(t,e);var n=t.prototype;return Object.defineProperty(n,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),n.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},n.updateInput=function(){var e,t=Yr(this._flicking),n=t.camera,i=t.renderer,r=this._controller,o=n.controlParams,a=this._count,s=r.state.animating?null===(e=n.findNearestAnchor(n.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,d=i.panelCount,h=c-a,f=c+a;h<0&&(h=t.circularEnabled?to((h+1)%d-1,d):$r(h,0,d-1)),f>=d&&(f=t.circularEnabled?f%d:$r(f,0,d-1));var p=i.panels[h],_=i.panels[f],g=Math.max(p.position,u.min),v=Math.min(_.position,u.max);return g>l&&(g-=n.rangeDiff),vv&&(o.position-=n.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:p.index,max:_.index},this},n.moveToPanel=function(t,n){return kr(this,void 0,void 0,(function(){var i,r;return Or(this,(function(o){return i=Yr(this._flicking),r=i.camera,this._controller.update(r.controlParams),[2,e.prototype.moveToPanel.call(this,t,n)]}))}))},n.moveToPosition=function(e,t,n){var i=Yr(this._flicking),r=i.camera,o=this._activePanel,a=this._controller.range,s=this._indexRange,u=r.range,l=this._controller.state,c=$r(r.clampToReachablePosition(e),a[0],a[1]),d=r.findAnchorIncludePosition(c);if(!d||!o)return Promise.reject(new po(jr(e),6));var h,f,p=o.position,_=i.animating?l.delta:e-r.position,g=Math.abs(_)>=i.threshold,v=e>p?r.getNextAnchor(d):r.getPrevAnchor(d),m=r.anchorPoints,y=m[0],b=m[m.length-1],w=e<=u.min&&uo(y.panel.index,s.min,s.max),x=e>=u.max&&uo(b.panel.index,s.min,s.max),P=v&&(s.min<=s.max?uo(v.index,s.min,s.max):v.index>=s.min||v.index<=s.max);if(w||x){var E=en)return t[i-1];n=o}return t[t.length-1]},t.clampToReachablePosition=function(e){var t=this._flicking.camera.range;return $r(e,t.min,t.max)},t.getCircularOffset=function(){return 0},t.canReach=function(e){var t=this._flicking.camera.range;if(e.removed)return!1;var n=e.position;return n>=t.min&&n<=t.max},t.canSee=function(e){var t=this._flicking.camera.visibleRange;return e.isVisibleOnRange(t.min,t.max)},e}(),Lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Pr(t,e);var n=t.prototype;return n.checkAvailability=function(){return!0},n.getRange=function(){var e,t,n=this._flicking.renderer,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(t=null==r?void 0:r.position)&&void 0!==t?t:0}},t}(jo),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Pr(t,e);var n=t.prototype;return n.checkAvailability=function(){var e=this._flicking,t=e.renderer.panels;if(t.length<=0)return!1;var n=t[0],i=t[t.length-1],r=n.range.min-n.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return t.every((function(e){return s-e.size>=a}))},n.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var t=e[0],n=e[e.length-1];return{min:t.range.min-t.margin.prev,max:n.range.max+n.margin.next}},n.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new Ro({index:t,position:e.position,panel:e})}))},n.findNearestAnchor=function(e){var t=this._flicking.camera,n=t.anchorPoints;if(n.length<=0)return null;for(var i=t.range,r=1/0,o=-1,a=0;a0&&(t===i.min||t===i.max)){var l=[u,new Ro({index:0,position:r[0].position+o,panel:r[0].panel}),new Ro({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,n){return e&&Math.abs(e.position-t)i.max?(c=Math.floor((t-i.max)/o)+1,new Ro({index:u.index,position:u.position+o*c,panel:u.panel})):u},n.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var t=e.panels.filter((function(e){return e.toggled})),n=t.filter((function(e){return e.toggleDirection===qr})),i=t.filter((function(e){return e.toggleDirection===Ur}));return this._calcPanelAreaSum(n)-this._calcPanelAreaSum(i)},n.clampToReachablePosition=function(e){return e},n.canReach=function(e){return!e.removed},n.canSee=function(t){var n=this._flicking.camera,i=n.range,r=n.rangeDiff,o=n.visibleRange,a=e.prototype.canSee.call(this,t);return o.mini.max?a||t.isVisibleOnRange(o.min-r,o.max-r):a},n._calcPanelAreaSum=function(e){return e.reduce((function(e,t){return e+t.sizeIncludingMargin}),0)},t}(jo),zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Pr(t,e);var n=t.prototype;return n.checkAvailability=function(){var e=this._flicking,t=e.renderer,n=t.getPanel(0),i=t.getPanel(t.panelCount-1);if(!n||!i)return!1;var r=e.camera.size,o=n.range.min;return r0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,t){return new Ro({index:t+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new Ro({index:0,position:i.min,panel:n[r[0].index-1]})),a&&u.push(new Ro({index:u.length,position:i.max,panel:n[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,n),c=l.index===n.length-1?l.prev():l,d=c.next();return[new Ro({index:0,position:i.min,panel:c}),new Ro({index:1,position:i.max,panel:d})]}return[new Ro({index:0,position:i.min,panel:this._findNearestPanel(i.min,n)})]},n.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints;return r.length<=0?null:t<=i.min?r[0]:t>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,t)},n._findNearestPanel=function(e,t){for(var n=1/0,i=0;in)return t[i-1];n=o}return t[t.length-1]},t}(jo),Fo=function(){function e(e,t){var n=this,i=(void 0===t?{}:t).align,r=void 0===i?Fr:i;this._checkTranslateSupport=function(){var e,t,i=document.documentElement.style,r="";try{for(var o=Cr(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),a=o.next();!a.done;a=o.next()){var s=a.value;s in i&&(r=s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}if(!r)throw new po("Browser does not support CSS transform.",7);n._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return Gr(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,t=this._position+this._offset,n=this.findNearestAnchor(this._position);if(!e||!n)return NaN;var i=n.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(t===r)return i.index;if(tr&&(d-=l),i.index-1+oo(t,d,r)}var h=i.next(),f=h?h.position+h.offset:u+o[1];return f0||o.length>0)&&t.renderer.render().then((function(){t.trigger(new mn(Nr.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:n}))}))},t._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var t=Yr(this._flicking),n=t.renderer.panels;if(n.length<=0)return e.prev||(t.trigger(new mn(Nr.NEED_PANEL,{direction:qr})),e.prev=!0),void(e.next||(t.trigger(new mn(Nr.NEED_PANEL,{direction:Ur})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=t.needPanelThreshold,s=i-this._alignPos,u=s+r,l=n[0],c=n[n.length-1];e.prev||(s<=l.range.min+a||i<=o.min+a)&&(t.trigger(new mn(Nr.NEED_PANEL,{direction:qr})),e.prev=!0),e.next||(u>=c.range.max-a||i>=o.max-a)&&(t.trigger(new mn(Nr.NEED_PANEL,{direction:Ur})),e.next=!0)}},t._checkReachEnd=function(e,t){var n=Yr(this._flicking),i=this._range,r=e>i.min&&ei.min&&t0){var n=t[0];n.resize(),this._updatePanelSizeByGrid(n,t)}else e.panels.forEach((function(e){return e.resize()}));return this},t.batchInsert=function(){for(var e=[],t=0;t0){var d=o||c[0].resize();e._updatePanelSizeByGrid(d,c)}else c.forEach((function(e){return e.resize()}));return l.forEach((function(e){e.increaseIndex(c.length),e.updatePosition()})),Tr(t,c)}),[])},t.batchRemove=function(){for(var e=[],t=0;ta.length-1&&(u=a.length-1),o.moveToPanel(a[u],{duration:0}).catch((function(){}))}else o.moveToPanel(s,{duration:0}).catch((function(){}));i.camera.updateOffset(),(e.length>0||t.length>0)&&(i.trigger(new mn(Nr.PANEL_CHANGE,{added:e,removed:t})),this.checkPanelContentsReady(Tr(e,t)))},t.checkPanelContentsReady=function(e){var t=this,n=Yr(this._flicking),i=n.resizeOnContentsReady,r=this._panels;if(i&&!n.virtualEnabled&&!((e=e.filter((function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new wr;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(t._flicking){var a=e[i.index],s=n.camera,u=n.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),n.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){t._flicking&&t.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){t._flicking&&t.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}},t._updateCameraAndControl=function(){var e=Yr(this._flicking),t=e.camera,n=e.control;t.updateRange(),t.updateOffset(),t.updateAnchors(),t.resetNeedPanelHistory(),n.updateInput()},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in n||t.loading?t.markForShow():e.holding||t.markForHide()}))},t._updatePanelSizeByGrid=function(e,t){var n=Yr(this._flicking),i=n.panelsPerView;if(i<=0)throw new po(Dr("panelsPerView",i),4);if(!(t.length<=0)){var r=(n.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,o=n.horizontal?{width:r}:{height:r},a=Er({size:r,margin:e.margin},!n.horizontal&&{height:e.height});n.noPanelStyleOverride||this._strategy.updatePanelSizes(n,o),n.panels.forEach((function(e){return e.resize(a)}))}},t._removeAllChildsFromCamera=function(){for(var e=Yr(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},t._insertPanelElements=function(e,t){void 0===t&&(t=null);var n=Yr(this._flicking).camera.element,i=(null==t?void 0:t.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),n.insertBefore(r,i)},t._removePanelElements=function(e){var t=Yr(this._flicking).camera.element;e.forEach((function(e){t.removeChild(e.element)}))},t._afterRender=function(){Yr(this._flicking).camera.applyTransform()},e}(),qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Pr(t,e);var n=t.prototype;return n.render=function(){return kr(this,void 0,void 0,(function(){var e,t;return Or(this,(function(n){return e=Yr(this._flicking),(t=this._strategy).updateRenderingPanels(e),t.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},n._collectPanels=function(){var e=Yr(this._flicking),t=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,t.children)},n._createPanel=function(e,t){return this._strategy.createPanel(e,t)},n._resetPanelElementOrder=function(){var e=Yr(this._flicking),t=e.camera.element,n=this._strategy.getRenderingElementsByOrder(e).reverse();n.forEach((function(e,i){var r=n[i-1]?n[i-1]:null;e.nextElementSibling!==r&&t.insertBefore(e,r)}))},n._removeAllTextNodes=function(){var e=Yr(this._flicking).camera.element;Gr(e.childNodes).forEach((function(t){t.nodeType===Node.TEXT_NODE&&e.removeChild(t)}))},t}(Ho),Uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Pr(t,e);var n=t.prototype;return n._removePanelElements=function(e){},n._removeAllChildsFromCamera=function(){},t}(Ho),Bo=function(){function e(e){var t=e.index,n=e.align,i=e.flicking,r=e.elementProvider;this._index=t,this._flicking=i,this._elProvider=r,this._align=n,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(t,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){var e=this._toggleDirection,t=this._flicking.camera.rangeDiff;return e!==Br&&this._toggled?e===qr?-t:t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(t,"outsetProgress",{get:function(){var e=this.position+this.offset,t=this._alignPos,n=this._flicking.camera,i=n.position;if(i===e)return 0;if(i=i.max)return 0;var a=t;return i.min>r&&(a-=i.min-r),i.max=r.min&&e<=r.max},t.isVisibleOnRange=function(e,t){var n=this.range;return t>n.min&&ee?i>=e&&i<=t&&(this._toggled=n===Ur):i<=e&&i>=t&&(this._toggled=n!==Ur),r!==this._toggled},t.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=Br,this._togglePosition=0,this._toggled=!1,this;var t=e.camera,n=t.range,i=t.alignPosition,r=t.visibleRange,o=r.max-r.min,a=n.min-i,s=n.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=qr,this._togglePosition=this.range.max+n.min-n.max+i,this.toggle(1/0,t.position)):l?(this._toggleDirection=Ur,this._togglePosition=this.range.min+n.max-o+i,this.toggle(-1/0,t.position)):(this._toggleDirection=Br,this._togglePosition=0),this},t._updateAlignPos=function(){this._alignPos=Xr(this._align,this._size)},t._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=Br},e}(),Vo=function(){function e(e){var t=e.providerCtor;this._providerCtor=t}var t=e.prototype;return t.renderPanels=function(){},t.getRenderingIndexesByOrder=function(e){var t=e.renderer.panels.filter((function(e){return e.rendered})),n=t.filter((function(e){return e.toggled&&e.toggleDirection===qr})),i=t.filter((function(e){return e.toggled&&e.toggleDirection===Ur}));return Tr(n,t.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},t.getRenderingElementsByOrder=function(e){var t=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].element}))},t.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},t.collectPanels=function(e,t){var n=this,i=Qr(e.renderer.align);return t.map((function(t,r){return new Bo({index:r,elementProvider:new n._providerCtor(t),align:i,flicking:e})}))},t.createPanel=function(e,t){return new Bo(Er(Er({},t),{elementProvider:new this._providerCtor(e)}))},t.updatePanelSizes=function(e,t){e.panels.forEach((function(e){return e.setSize(t)}))},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in i||t.loading?t.markForShow():e.holding||t.markForHide()})),n.updateOffset()},e}(),Wo=function(e){function t(t){var n=e.call(this,t)||this;return t.elementProvider.init(n),n._elProvider=t.elementProvider,n._cachedInnerHTML=null,n}Pr(t,e);var n=t.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementIndex",{get:function(){var e=this._flicking,t=e.panelsPerView+1,n=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===Ur?i+n:i-n),lo(i,t)},enumerable:!1,configurable:!0}),n.cacheRenderResult=function(e){this._cachedInnerHTML=e},n.uncacheRenderResult=function(){this._cachedInnerHTML=null},n.render=function(){var e=this._flicking.virtual,t=e.renderPanel,n=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||t(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,n&&this.cacheRenderResult(r))},n.increaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,t)},n.decreaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,t)},t}(Bo),$o=function(){function e(){}var t=e.prototype;return t.renderPanels=function(e){var t=e.virtual,n=e.visiblePanels,i=co(e.panelsPerView+1);n.forEach((function(e){var n=e.elementIndex;e.render(),t.show(n),i[n]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){t.hide(e)}))},t.getRenderingIndexesByOrder=function(e){var t=e.virtual,n=Tr(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)}));return n.length<=0?t.elements.map((function(e,t){return t})):Tr(n.map((function(e){return e.elementIndex})),t.elements.map((function(e,t){return Er(Er({},e),{idx:t})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},t.getRenderingElementsByOrder=function(e){var t=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].nativeElement}))},t.updateRenderingPanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),n.updateOffset()},t.collectPanels=function(e){var t=Qr(e.renderer.align);return co(e.virtual.initialPanelCount).map((function(n){return new Wo({index:n,elementProvider:new mo(e),align:t,flicking:e})}))},t.createPanel=function(e,t){return new Wo(Er(Er({},t),{elementProvider:new mo(t.flicking)}))},t.updatePanelSizes=function(e,t){e.virtual.elements.forEach((function(e){so(e.nativeElement,t)})),e.panels.forEach((function(e){return e.setSize(t)}))},e}(),Yo=function(e){function t(t,n){var i=void 0===n?{}:n,r=i.align,o=void 0===r?Fr:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,d=void 0!==c&&c,h=i.circularFallback,f=void 0===h?"linear":h,p=i.bound,_=void 0!==p&&p,g=i.adaptive,v=void 0!==g&&g,m=i.panelsPerView,y=void 0===m?-1:m,b=i.noPanelStyleOverride,w=void 0!==b&&b,x=i.resizeOnContentsReady,P=void 0!==x&&x,E=i.nested,k=void 0!==E&&E,O=i.needPanelThreshold,C=void 0===O?0:O,S=i.preventEventsBeforeInit,T=void 0===S||S,A=i.deceleration,R=void 0===A?.0075:A,M=i.duration,D=void 0===M?500:M,I=i.easing,j=void 0===I?function(e){return 1-Math.pow(1-e,3)}:I,L=i.inputType,N=void 0===L?["mouse","touch"]:L,z=i.moveType,F=void 0===z?"snap":z,H=i.threshold,q=void 0===H?40:H,U=i.interruptable,B=void 0===U||U,V=i.bounce,W=void 0===V?"20%":V,$=i.iOSEdgeSwipeThreshold,Y=void 0===$?30:$,G=i.preventClickOnDrag,X=void 0===G||G,K=i.preventDefaultOnDrag,J=void 0!==K&&K,Q=i.disableOnInit,Z=void 0!==Q&&Q,ee=i.changeOnHold,te=void 0!==ee&&ee,ne=i.renderOnlyVisible,ie=void 0!==ne&&ne,re=i.virtual,oe=void 0===re?null:re,ae=i.autoInit,se=void 0===ae||ae,ue=i.autoResize,le=void 0===ue||ue,ce=i.useResizeObserver,de=void 0===ce||ce,he=i.resizeDebounce,fe=void 0===he?0:he,pe=i.maxResizeDebounce,_e=void 0===pe?100:pe,ge=i.useFractionalSize,ve=void 0!==ge&&ge,me=i.externalRenderer,ye=void 0===me?null:me,be=i.renderExternal,we=void 0===be?null:be,xe=e.call(this)||this;return xe._initialized=!1,xe._plugins=[],xe._align=o,xe._defaultIndex=s,xe._horizontal=l,xe._circular=d,xe._circularFallback=f,xe._bound=_,xe._adaptive=v,xe._panelsPerView=y,xe._noPanelStyleOverride=w,xe._resizeOnContentsReady=P,xe._nested=k,xe._virtual=oe,xe._needPanelThreshold=C,xe._preventEventsBeforeInit=T,xe._deceleration=R,xe._duration=D,xe._easing=j,xe._inputType=N,xe._moveType=F,xe._threshold=q,xe._interruptable=B,xe._bounce=W,xe._iOSEdgeSwipeThreshold=Y,xe._preventClickOnDrag=X,xe._preventDefaultOnDrag=J,xe._disableOnInit=Z,xe._changeOnHold=te,xe._renderOnlyVisible=ie,xe._autoInit=se,xe._autoResize=le,xe._useResizeObserver=de,xe._resizeDebounce=fe,xe._maxResizeDebounce=_e,xe._useFractionalSize=ve,xe._externalRenderer=ye,xe._renderExternal=we,xe._viewport=new _o(xe,function(e,t){var n=null;if(io(e)){var i=document.querySelector(e);if(!i)throw new po('Element with selector "'+e+'" not found.',1);n=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(n=e);if(!n)throw new po(Rr(e,["HTMLElement","string"]),0);return n}(t)),xe._autoResizer=new go(xe),xe._renderer=xe._createRenderer(),xe._camera=xe._createCamera(),xe._control=xe._createControl(),xe._virtualManager=new yo(xe,oe),xe._autoInit&&xe.init(),xe}Pr(t,e);var n=t.prototype;return Object.defineProperty(n,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(n,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(n,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var t=this._control.controller.axes;t&&(t.options.nested=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e;var t=this._control.controller.axes;t&&(t.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var t=this._control.controller.axes;t&&(t.options.easing=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e;var t=this._control.controller.panInput;t&&(t.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var t=this._control,n=this._createControl(),i=t.activePanel;n.copy(t);var r=i?this._camera.getProgressInPanel(i):0;this._control=n,this._control.updatePosition(r),this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var t=this._control.controller.axes;t&&(t.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var t=this._control.controller.panInput;t&&(t.options.iOSEdgeSwipeThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var t=this._control.controller;e?t.addPreventClickHandler():t.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var t=this._control.controller.panInput;t&&(t.options.preventDefaultOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(n,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(n,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(n,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(n,"useFractionalSize",{get:function(){return this._useFractionalSize},enumerable:!1,configurable:!0}),Object.defineProperty(n,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),n.init=function(){var e=this;if(this._initialized)return Promise.resolve();var t=this._camera,n=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return t.init(),r.init(),n.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),n.checkPanelContentsReady(n.panels),this._initialized=!0,n.render().then((function(){e._plugins.forEach((function(t){return t.init(e)})),a&&(e.trigger=o),e.trigger(new mn(Nr.READY))}))},n.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},n.prev=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.prev())||void 0===n?void 0:n.index)&&void 0!==i?i:-1,e,qr)},n.next=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.next())||void 0===n?void 0:n.index)&&void 0!==i?i:this._renderer.panelCount,e,Ur)},n.moveTo=function(e,t,n){void 0===t&&(t=this._duration),void 0===n&&(n=Br);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new po("Animation is already playing.",10)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:t,direction:n})):Promise.reject(new po(Ir(e,0,r-1),5))},n.updateAnimation=function(e,t,n){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new po(Ir(e,0,r-1),5);this._control.updateAnimation(o,t,n)}},n.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},n.getPanel=function(e){return this._renderer.getPanel(e)},n.enableInput=function(){return this._control.enable(),this},n.disableInput=function(){return this._control.disable(),this},n.getStatus=function(e){var t,n,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,d=void 0!==c&&c,h=this._camera,f={panels:(d?this.visiblePanels:this.panels).map((function(e){var t={index:e.index};return l&&(t.html=e.element.outerHTML),t}))};if(o&&(f.index=this.index),s){var p=h.findNearestAnchor(h.position);p&&(f.position={panel:p.panel.index,progressInPanel:h.getProgressInPanel(p.panel)})}if(d){var _=this.visiblePanels;f.visibleOffset=null!==(n=null===(t=_[0])||void 0===t?void 0:t.index)&&void 0!==n?n:0}return f},n.setStatus=function(e){var t;if(!this._initialized)throw new po("Flicking is not initialized yet, call init() first.",12);var n=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(t=o[0])||void 0===t?void 0:t.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:eo(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=n){var u=r?n-r:n;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===Vr.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,d=(u=r?l-r:l,a.panels[u].range),h=d.min+(d.max-d.min)*c;s.moveToPosition(h,0).catch((function(){}))}},n.addPlugins=function(){for(var e,t=this,n=[],i=0;i=0&&(t.destroy(),e._plugins.splice(n,1))})),this},n.resize=function(){return kr(this,void 0,void 0,(function(){var e,t,n,i,r,o,a,s,u,l,c;return Or(this,(function(d){switch(d.label){case 0:return e=this._viewport,t=this._renderer,n=this._camera,i=this._control,r=i.activePanel,o=e.width,a=e.height,s=r?n.getProgressInPanel(r):0,this.trigger(new mn(Nr.BEFORE_RESIZE,{width:o,height:a,element:e.element})),e.resize(),[4,t.forceRenderAllPanels()];case 1:return d.sent(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),n.updateAdaptiveHeight(),n.updatePanelOrder(),n.updateOffset(),[4,t.render()];case 2:return d.sent(),i.animating||(i.updatePosition(s),i.updateInput()),u=e.width,l=e.height,c=u!==o||l!==a,this.trigger(new mn(Nr.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:o,height:a},sizeChanged:c,element:e.element})),[2]}}))}))},n.append=function(e){return this.insert(this._renderer.panelCount,e)},n.prepend=function(e){return this.insert(0,e)},n.insert=function(e,t){if(this._renderExternal)throw new po(Lr,11);return this._renderer.batchInsert({index:e,elements:eo(t),hasDOMInElements:!0})},n.remove=function(e,t){if(void 0===t&&(t=1),this._renderExternal)throw new po(Lr,11);return this._renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!0})},n._createControl=function(){var e,t=this._moveType,n=Object.keys(Vr).map((function(e){return Vr[e]})),i=Array.isArray(t)?t[0]:t,r=Array.isArray(t)&&null!==(e=t[1])&&void 0!==e?e:{};if(!no(n,i))throw new po(Dr("moveType",JSON.stringify(t)),4);switch(i){case Vr.SNAP:return new Mo(r);case Vr.FREE_SCROLL:return new Do(r);case Vr.STRICT:return new Io(r)}},n._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Fo(this,{align:this._align})},n._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},n._createExternalRenderer=function(){var e=this._renderExternal,t=e.renderer,n=e.rendererOptions;return new t(Er({align:this._align},n))},n._createVanillaRenderer=function(){var e=this.virtualEnabled;return new qo({align:this._align,strategy:e?new $o:new Vo({providerCtor:vo})})},n._moveToInitialPanel=function(){var e=this._renderer,t=this._control,n=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=n.findNearestAnchor(i.position),o=r&&i.index!==r.panel.index?r.panel:i;if(t.setActive(o,null,!1),!r)throw new po(jr(o.position),6);var a=o.position;n.canReach(o)||(a=r.position),n.lookAt(a),t.updateInput(),n.updateOffset()}},n._initialResize=function(){var e=this._viewport,t=this._renderer,n=this._camera,i=this._control;this.trigger(new mn(Nr.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),n.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new mn(Nr.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},t.VERSION="4.11.1",t}(vn),Go=function(e,t){[vn.prototype,Yo.prototype].forEach((function(n){Object.getOwnPropertyNames(n).filter((function(t){return!e[t]&&0!==t.indexOf("_")&&"constructor"!==t})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,n=[],i=0;i0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]0?new $o:new Vo({providerCtor:fa})},n=new Yo(this._viewportElement,ia(ia({},e),{externalRenderer:new la(t)}));this._vanillaFlicking=n;var i=this._getChildren();this._jsxDiffer=new kn(i,(function(e){return e.key})),this._pluginsDiffer=new kn,this._prevChildren=i,this._bindEvents(),this._checkPlugins(),e.status&&n.setStatus(e.status)},n.componentWillUnmount=function(){var e;null===(e=this._vanillaFlicking)||void 0===e||e.destroy()},n.shouldComponentUpdate=function(e){var t=this._vanillaFlicking,n=this.props;if(!t||!t.initialized)return!1;var i=e.children,r=ra(e,["children"]);for(var o in r)if(n[o]!==e[o])return!0;var a=this._prevChildren,s=this._getChildren(i);return!(!e.renderOnSameKey&&this._hasSameChildren(a,s))},n.beforeRender=function(){var e=this._vanillaFlicking,t=this.props,n=this._prevChildren;if(e&&e.initialized&&!this._diffResult){var i=this._getChildren(t.children);!t.renderOnSameKey&&this._hasSameChildren(n,i)||(this._panels=this._createPanelRefs(t,i),this._diffResult=this._jsxDiffer.update(i),this._prevChildren=i)}},n.componentDidUpdate=function(){var e=this._vanillaFlicking,t=this._renderEmitter,n=this._diffResult;this._checkPlugins(),t.trigger("render"),e.camera.updateOffset();var i=this.props;i.virtual;var r=ra(i,["virtual"]);for(var o in r)o in e&&e[o]!==r[o]&&(e[o]=r[o]);n&&e.initialized&&(function(e,t,n){var i=e.renderer,r=i.panels,o=Tr(t.prevList),a=[],s=[];if(t.removed.length>0){var u=-1,l=-1;t.removed.forEach((function(e){u<0&&(u=e),l>=0&&e!==l-1?(s.push.apply(s,Tr(Ko(i,l,u+1))),u=e,l=e):l=e,o.splice(e,1)})),s.push.apply(s,Tr(Ko(i,l,u+1)))}if(t.ordered.forEach((function(e){var t=Sr(e,2),n=t[0],i=t[1],o=r.splice(n,1)[0];r.splice(i,0,o)})),t.ordered.length>0&&(r.forEach((function(e,t){var n=t-e.index;n>0?e.increaseIndex(n):e.decreaseIndex(-n)})),r.sort((function(e,t){return e.index-t.index})),r.forEach((function(e){e.updatePosition()}))),t.added.length>0){var c=-1,d=-1,h=n.slice(o.length);t.added.forEach((function(e,n){c<0&&(c=n),d>=0&&e!==d+1?(a.push.apply(a,Tr(Xo(i,t,h,c,n+1))),c=-1,d=-1):d=e})),c>=0&&a.push.apply(a,Tr(Xo(i,t,h,c)))}(t.added.length>0||t.removed.length>0)&&i.updateAfterPanelChange(a,s)}(e,n,this.reactPanels),this._diffResult=null)},n.render=function(){var e,t,n=this,i=this.props,r=i.viewportTag,o=i.cameraTag,a={},s=this._vanillaFlicking;for(var u in this.beforeRender(),i)u in ua||u in Yo.prototype||(a[u]=i[u]);var l=s&&s.initialized,c=["flicking-viewport"],d=["flicking-camera"];(s?s.horizontal:null===(e=i.horizontal)||void 0===e||e)||c.push("vertical"),i.hideBeforeInit&&!l&&c.push("flicking-hidden"),a.className&&c.push(a.className),i.cameraClass&&d.push(i.cameraClass);var h=!l&&i.firstPanelSize?{style:{transform:Jo(this.props.align,this.props.horizontal,this.props.firstPanelSize)}}:{},f=i.virtual&&(null!==(t=i.panelsPerView)&&void 0!==t?t:-1)>0?this._getVirtualPanels():this._getPanels();return p(r,ia({},a,{className:c.join(" "),ref:function(e){e&&(n._viewportElement=e)}}),p(o,ia({className:d.join(" ")},h),f),this._getViewportSlot())},n._createPanelRefs=function(e,t){var n,i=null!==(n=e.panelsPerView)&&void 0!==n?n:-1;return i>0&&e.virtual?co(i+1).map((function(){return{current:null}})):t.map((function(){return{current:null}}))},n._bindEvents=function(){var e=this,t=this._vanillaFlicking;Object.keys(Nr).forEach((function(n){var i=Nr[n],r="on".concat(i.charAt(0).toUpperCase()+i.slice(1));t.on(i,(function(t){t.currentTarget=e,(0,e.props[r])(t)}))})),t.once(Nr.READY,(function(){e.forceUpdate()}))},n._checkPlugins=function(){var e=this._vanillaFlicking,t=this._pluginsDiffer.update(this.props.plugins),n=t.list,i=t.added,r=t.removed,o=t.prevList;e.addPlugins.apply(e,i.map((function(e){return n[e]}))),e.removePlugins.apply(e,r.map((function(e){return o[e]})))},n._hasSameChildren=function(e,t){return e.length===t.length&&0!==e.length&&e.every((function(e,n){var i=t[n];return e.key&&i.key?e.key===i.key:e===i}))},n._getChildren=function(e){var t=this;return void 0===e&&(e=this.props.children),Ht.toArray(e).filter((function(e){return e.type!==ha})).reduce((function(e,n){return sa(sa([],e,!0),t._unpackFragment(n),!0)}),[])},n._getViewportSlot=function(){return Ht.toArray(this.props.children).filter((function(e){return e.type===ha}))},n._unpackFragment=function(e){var t=this;return this._isFragment(e)?Ht.toArray(e.props.children).reduce((function(e,n){return sa(sa([],e,!0),t._unpackFragment(n),!0)}),[]):[e]},n._getVirtualPanels=function(){var e=this,t=this.props.virtual.panelClass,n=void 0===t?"flicking-panel":t,i=this.props.panelsPerView,r=this._vanillaFlicking,o=r&&r.initialized?r.renderer.strategy.getRenderingIndexesByOrder(r):co(i+1),a=r&&r.panels[0],s=a?r.horizontal?{width:a.size}:{height:a.size}:{};return o.map((function(t){return p("div",{key:t,"data-element-index":t,ref:e._panels[t],className:n,style:s})}))},n._getPanels=function(){var e=this,t=this._getChildren(),n=this._vanillaFlicking,i=this._diffResult,r=n&&n.initialized?function(e,t){var n=t.removed.reduce((function(e,t){return e[t]=!0,e}),{}),i=t.maintained.reduce((function(e,t){var n=Sr(t,2),i=n[0],r=n[1];return e[i]=r,e}),{});return Tr(e.panels.filter((function(e){return!n[e.index]})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)})).map((function(e){return t.list[i[e.index]]})),t.added.map((function(e){return t.list[e]})))}(n,i||En(t,t)):t;return this.props.useFindDOMNode?r.map((function(t,n){return p(da,{key:t.key,ref:e._panels[n]},t)})):r.map((function(t,n){return p(ca,{key:t.key,ref:e._panels[n]},t)}))},n._isFragment=function(e){return e.type?e.type===g:e===g},t.defaultProps=ua,function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([Go],t.prototype,"_vanillaFlicking",void 0),t}(v);const _a=pa;function ga(){const[e,t]=ot([]),[n,i]=ot(null),[r,o]=ot(!0),[a,s]=ot("mobile"),[u,l]=ot(!1),[c,d]=ot(!1),h=(Ke=5,function(e,t){var n=rt($e++,7);return ht(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}((function(){return{current:void 0}}),[])),f=()=>{window.innerWidth>1e3?s("desktop"):window.innerWidth<=1e3&&s("mobile")};at((()=>{if(document.body.classList.contains("home"))_();else{let e=!1;document.addEventListener("scroll",(()=>{document.querySelector(".trigger-clips").getBoundingClientRect().top{const e=await fetch("/wp-json/shorts/v1/latest"),n=await e.json();t(n),window.addEventListener("resize",(()=>{f()})),f()};at((()=>{e[0]&&(document.querySelector(".home-splash .s1")&&(document.querySelector(".home-splash .s1 .image").style.backgroundImage="url("+e[0].cover+")",document.querySelector(".home-splash .s2 .image").style.backgroundImage="url("+e[1].cover+")"),document.querySelector(".recirculation .s1")&&(document.querySelector(".recirculation .s1 .image").style.backgroundImage="url("+e[0].cover+")",document.querySelector(".recirculation .s2 .image").style.backgroundImage="url("+e[1].cover+")",document.querySelector(".recirculation .s3 .image").style.backgroundImage="url("+e[2].cover+")"))}),[e]),at((()=>{window.active_playerid=n?n.id:0,n&&(r?(history.pushState({},"",n.permalink),o(!1)):history.replaceState({},"",n.permalink),setTimeout((()=>{window.modal_open&&n.id===window.active_playerid&&(console.log("send parsely hit"),console.log("location.href",location.href),console.log("document.referrer",document.referrer),PARSELY.beacon.trackPageView({url:location.href,urlref:document.referrer,js:1}))}),3e3))}),[n]);const v=()=>{document.querySelectorAll(".player video").forEach((e=>{e.pause()}))},m=e=>{console.log("initialise player "+e);const t=document.querySelector(`.player[data-index='${e}']`);if(console.log(t),t.querySelector("video"))setTimeout((()=>{document.querySelector(`.player[data-index='${e}'] video`).play()}),50);else{const n=document.querySelector(`.player[data-index='${e}']`).getAttribute("data-streamable").replace("https://streamable.com/","").replace("/","");fetch("https://api.streamable.com/videos/"+n).then((e=>e.json())).then((n=>{console.log(n);const i="desktop"===a?n.files.mp4.url:n.files["mp4-mobile"].url;t.innerHTML='';const r=videojs("vid"+e,{controls:!0,fullscreen:{options:{navigationUI:!1}},controlBar:{remainingTimeDisplay:{displayNegative:!1}}});setTimeout((()=>{console.log("play video"),r.play(),t.querySelector("video").addEventListener("ended",(()=>{console.log("ended event listener triggered"),window.modal_open&&h.current.index+1p("div",{className:"short"},p("div",{className:"cover"}),p("span",{className:"play-button"},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M96 52v408l320-204L96 52z"})))))))))):p(g,null,p("section",{className:"shorts-section"},p("div",{className:"container "+(u?"":"no-start-fade")},p("h3",{className:"section-title"},p("div",{className:"shorts-logo"},p("svg",{width:"71",height:"31",viewBox:"0 0 71 31",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("rect",{x:"25.5941",width:"6.51518",height:"36.1954",transform:"rotate(45 25.5941 0)",fill:"white"}),p("rect",{x:"38.7969",width:"6.51518",height:"36.1954",transform:"rotate(45 38.7969 0)",fill:"white"}),p("rect",{x:"52.4635",width:"6.51518",height:"36.1954",transform:"rotate(45 52.4635 0)",fill:"white"}),p("rect",{x:"66.1307",width:"6.51518",height:"36.1954",transform:"rotate(45 66.1307 0)",fill:"white"}))),p("div",{className:"text"},"Clips")),p("div",{className:"shorts-wrapper"},p(_a,{horizontal:!0,circular:!1,bound:!0,moveType:"freeScroll",bounce:"100%",duration:400,align:"prev",preventClickOnDrag:!0,onMove:e=>{e.axesEvent.pos.flick<1?l(!1):l(!0)}},e.map(((t,n)=>p("a",{key:n,className:"short",href:t.permalink,onClick:r=>((t,n,r)=>{t.preventDefault(),window.modal_open=!0,window.store_scrolltop=window.scrollY,setTimeout((()=>{window.scrollTo({top:0,behavior:"instant"})}),300),document.body.style.overflow="hidden";const a=e.find((e=>e.id===n));i(a),h.current.index===r&&m(r),h.current.moveTo(r,0),c||(window.addEventListener("popstate",(()=>{!0===window.modal_open&&(v(),window.modal_open=!1,i(null),o(!0),document.body.style.overflowY="auto",setTimeout((()=>{window.scrollTo({top:window.store_scrolltop,behavior:"instant"})}),1))})),window.addEventListener("keydown",(function(e){if(window.modal_open){const t=e.key;"ArrowRight"===t&&h.current.next(),"ArrowLeft"===t&&h.current.prev(),"Tab"===t&&(h.current.index+1history.back()},p("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},p("path",{d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}))),p("span",{className:"prev-button",onClick:()=>{h.current.prev()}},p("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},p("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),p("polyline",{points:"5 12 12 5 19 12"}))),p("span",{className:"next-button",onClick:()=>h.current.next()},p("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},p("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),p("polyline",{points:"19 12 12 19 5 12"})))),p(_a,{horizontal:"desktop"===a,align:"desktop"===a?"center":"prev",circular:!1,bounce:"100%",duration:300,inputType:"desktop"===a?["mouse"]:[],onWillChange:t=>{v();const n=t.index;m(n),i(e[n])},onClick:e=>{null!=e.target.getAttribute("data-index")&&(e.target.getAttribute("data-index")>h.current.index?h.current.next():e.target.getAttribute("data-index")p("div",{"data-index":t,key:t,className:"player "+(n&&n.id===e.id?"active":""),"data-streamable":e.video_url},p("img",{src:e.cover,className:"cover",loading:"lazy"})))))))}function va(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var ma=1440,ya=525600;var ba,wa,xa,Pa,Ea=!1,ka=!1,Oa=[],Ca=-1;function Sa(e){let t=Oa.indexOf(e);-1!==t&&t>Ca&&Oa.splice(t,1)}function Ta(){Ea=!1,ka=!0;for(let e=0;e{let r=e();JSON.stringify(r),i?n=r:queueMicrotask((()=>{t(r,n),n=r})),i=!1}));return()=>xa(r)}var Da=[],Ia=[],ja=[];function La(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Ia.push(t))}function Na(e){Da.push(e)}function za(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Fa(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach((([n,i])=>{(void 0===t||t.includes(n))&&(i.forEach((e=>e())),delete e._x_attributeCleanups[n])}))}var Ha=new MutationObserver(Ga),qa=!1;function Ua(){Ha.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),qa=!0}function Ba(){!function(){let e=Ha.takeRecords();Va.push((()=>e.length>0&&Ga(e)));let t=Va.length;queueMicrotask((()=>{if(Va.length===t)for(;Va.length>0;)Va.shift()()}))}(),Ha.disconnect(),qa=!1}var Va=[];function Wa(e){if(!qa)return e();Ba();let t=e();return Ua(),t}var $a=!1,Ya=[];function Ga(e){if($a)return void(Ya=Ya.concat(e));let t=new Set,n=new Set,i=new Map,r=new Map;for(let o=0;o1===e.nodeType&&t.add(e))),e[o].removedNodes.forEach((e=>1===e.nodeType&&n.add(e)))),"attributes"===e[o].type)){let t=e[o].target,n=e[o].attributeName,a=e[o].oldValue,s=()=>{i.has(t)||i.set(t,[]),i.get(t).push({name:n,value:t.getAttribute(n)})},u=()=>{r.has(t)||r.set(t,[]),r.get(t).push(n)};t.hasAttribute(n)&&null===a?s():t.hasAttribute(n)?(u(),s()):u()}r.forEach(((e,t)=>{Fa(t,e)})),i.forEach(((e,t)=>{Da.forEach((n=>n(t,e)))}));for(let e of n)t.has(e)||Ia.forEach((t=>t(e)));t.forEach((e=>{e._x_ignoreSelf=!0,e._x_ignore=!0}));for(let e of t)n.has(e)||e.isConnected&&(delete e._x_ignoreSelf,delete e._x_ignore,ja.forEach((t=>t(e))),e._x_ignore=!0,e._x_ignoreSelf=!0);t.forEach((e=>{delete e._x_ignoreSelf,delete e._x_ignore})),t=null,n=null,i=null,r=null}function Xa(e){return Qa(Ja(e))}function Ka(e,t,n){return e._x_dataStack=[t,...Ja(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter((e=>e!==t))}}function Ja(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?Ja(e.host):e.parentNode?Ja(e.parentNode):[]}function Qa(e){return new Proxy({objects:e},Za)}var Za={ownKeys:({objects:e})=>Array.from(new Set(e.flatMap((e=>Object.keys(e))))),has:({objects:e},t)=>t!=Symbol.unscopables&&e.some((e=>Object.prototype.hasOwnProperty.call(e,t)||Reflect.has(e,t))),get:({objects:e},t,n)=>"toJSON"==t?es:Reflect.get(e.find((e=>Reflect.has(e,t)))||{},t,n),set({objects:e},t,n,i){const r=e.find((e=>Object.prototype.hasOwnProperty.call(e,t)))||e[e.length-1],o=Object.getOwnPropertyDescriptor(r,t);return o?.set&&o?.get?o.set.call(i,n)||!0:Reflect.set(r,t,n)}};function es(){return Reflect.ownKeys(this).reduce(((e,t)=>(e[t]=Reflect.get(this,t),e)),{})}function ts(e){let t=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach((([r,{value:o,enumerable:a}])=>{if(!1===a||void 0===o)return;if("object"==typeof o&&null!==o&&o.__v_skip)return;let s=""===i?r:`${i}.${r}`;var u;"object"==typeof o&&null!==o&&o._x_interceptor?n[r]=o.initialize(e,s,r):"object"!=typeof(u=o)||Array.isArray(u)||null===u||o===n||o instanceof Element||t(o,s)}))};return t(e)}function ns(e,t=(()=>{})){let n={initialValue:void 0,_x_interceptor:!0,initialize(t,n,i){return e(this.initialValue,(()=>function(e,t){return t.split(".").reduce(((e,t)=>e[t]),e)}(t,n)),(e=>is(t,n,e)),n,i)}};return t(n),e=>{if("object"==typeof e&&null!==e&&e._x_interceptor){let t=n.initialize.bind(n);n.initialize=(i,r,o)=>{let a=e.initialize(i,r,o);return n.initialValue=a,t(i,r,o)}}else n.initialValue=e;return n}}function is(e,t,n){if("string"==typeof t&&(t=t.split(".")),1!==t.length){if(0===t.length)throw error;return e[t[0]]||(e[t[0]]={}),is(e[t[0]],t.slice(1),n)}e[t[0]]=n}var rs={};function os(e,t){rs[e]=t}function as(e,t){return Object.entries(rs).forEach((([n,i])=>{let r=null;Object.defineProperty(e,`$${n}`,{get:()=>i(t,function(){if(r)return r;{let[e,n]=Os(t);return r={interceptor:ns,...e},La(t,n),r}}()),enumerable:!1})})),e}function ss(e,t,n,...i){try{return n(...i)}catch(n){us(n,e,t)}}function us(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message}\n\n${n?'Expression: "'+n+'"\n\n':""}`,t),setTimeout((()=>{throw e}),0)}var ls=!0;function cs(e){let t=ls;ls=!1;let n=e();return ls=t,n}function ds(e,t,n={}){let i;return hs(e,t)((e=>i=e),n),i}function hs(...e){return fs(...e)}var fs=ps;function ps(e,t){let n={};as(n,e);let i=[n,...Ja(e)],r="function"==typeof t?function(e,t){return(n=(()=>{}),{scope:i={},params:r=[]}={})=>{gs(n,t.apply(Qa([i,...e]),r))}}(i,t):function(e,t,n){let i=function(e,t){if(_s[e])return _s[e];let n=Object.getPrototypeOf((async function(){})).constructor,i=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e;let r=(()=>{try{let t=new n(["__self","scope"],`with (scope) { __self.result = ${i} }; __self.finished = true; return __self.result;`);return Object.defineProperty(t,"name",{value:`[Alpine] ${e}`}),t}catch(n){return us(n,t,e),Promise.resolve()}})();return _s[e]=r,r}(t,n);return(r=(()=>{}),{scope:o={},params:a=[]}={})=>{i.result=void 0,i.finished=!1;let s=Qa([o,...e]);if("function"==typeof i){let e=i(i,s).catch((e=>us(e,n,t)));i.finished?(gs(r,i.result,s,a,n),i.result=void 0):e.then((e=>{gs(r,e,s,a,n)})).catch((e=>us(e,n,t))).finally((()=>i.result=void 0))}}}(i,t,e);return ss.bind(null,e,t,r)}var _s={};function gs(e,t,n,i,r){if(ls&&"function"==typeof t){let o=t.apply(n,i);o instanceof Promise?o.then((t=>gs(e,t,n,i))).catch((e=>us(e,r,t))):e(o)}else"object"==typeof t&&t instanceof Promise?t.then((t=>e(t))):e(t)}var vs="x-";function ms(e=""){return vs+e}var ys={};function bs(e,t){return ys[e]=t,{before(t){if(!ys[t])return void console.warn(String.raw`Cannot find directive \`${t}\`. \`${e}\` will use the default order of execution`);const n=Is.indexOf(t);Is.splice(n>=0?n:Is.indexOf("DEFAULT"),0,e)}}}function ws(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let n=Object.entries(e._x_virtualDirectives).map((([e,t])=>({name:e,value:t}))),i=xs(n);n=n.map((e=>i.find((t=>t.name===e.name))?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e)),t=t.concat(n)}let i={},r=t.map(Ss(((e,t)=>i[e]=t))).filter(Rs).map(function(e,t){return({name:n,value:i})=>{let r=n.match(Ms()),o=n.match(/:([a-zA-Z0-9\-_:]+)/),a=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[n]||n;return{type:r?r[1]:null,value:o?o[1]:null,modifiers:a.map((e=>e.replace(".",""))),expression:i,original:s}}}(i,n)).sort(js);return r.map((t=>function(e,t){let n=ys[t.type]||(()=>{}),[i,r]=Os(e);za(e,t.original,r);let o=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),Ps?Es.get(ks).push(n):n())};return o.runCleanups=r,o}(e,t)))}function xs(e){return Array.from(e).map(Ss()).filter((e=>!Rs(e)))}var Ps=!1,Es=new Map,ks=Symbol();function Os(e){let t=[],[n,i]=function(e){let t=()=>{};return[n=>{let i=wa(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((e=>e()))}),e._x_effects.add(i),t=()=>{void 0!==i&&(e._x_effects.delete(i),xa(i))},i},()=>{t()}]}(e);return t.push(i),[{Alpine:Ru,effect:n,cleanup:e=>t.push(e),evaluateLater:hs.bind(hs,e),evaluate:ds.bind(ds,e)},()=>t.forEach((e=>e()))]}var Cs=(e,t)=>({name:n,value:i})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:i});function Ss(e=(()=>{})){return({name:t,value:n})=>{let{name:i,value:r}=Ts.reduce(((e,t)=>t(e)),{name:t,value:n});return i!==t&&e(i,t),{name:i,value:r}}}var Ts=[];function As(e){Ts.push(e)}function Rs({name:e}){return Ms().test(e)}var Ms=()=>new RegExp(`^${vs}([^:^.]+)\\b`),Ds="DEFAULT",Is=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Ds,"teleport"];function js(e,t){let n=-1===Is.indexOf(e.type)?Ds:e.type,i=-1===Is.indexOf(t.type)?Ds:t.type;return Is.indexOf(n)-Is.indexOf(i)}function Ls(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function Ns(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach((e=>Ns(e,t)));let n=!1;if(t(e,(()=>n=!0)),n)return;let i=e.firstElementChild;for(;i;)Ns(i,t),i=i.nextElementSibling}function zs(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var Fs=!1,Hs=[],qs=[];function Us(){return Hs.map((e=>e()))}function Bs(){return Hs.concat(qs).map((e=>e()))}function Vs(e){Hs.push(e)}function Ws(e){qs.push(e)}function $s(e,t=!1){return Ys(e,(e=>{if((t?Bs():Us()).some((t=>e.matches(t))))return!0}))}function Ys(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return Ys(e.parentElement,t)}}var Gs=[];function Xs(e,t=Ns,n=(()=>{})){!function(i){Ps=!0;let r=Symbol();ks=r,Es.set(r,[]);let o=()=>{for(;Es.get(r).length;)Es.get(r).shift()();Es.delete(r)};t(e,((e,t)=>{n(e,t),Gs.forEach((n=>n(e,t))),ws(e,e.attributes).forEach((e=>e())),e._x_ignore&&t()})),Ps=!1,o()}()}function Ks(e,t=Ns){t(e,(e=>{Fa(e),function(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}(e)}))}var Js=[],Qs=!1;function Zs(e=(()=>{})){return queueMicrotask((()=>{Qs||setTimeout((()=>{eu()}))})),new Promise((t=>{Js.push((()=>{e(),t()}))}))}function eu(){for(Qs=!1;Js.length;)Js.shift()()}function tu(e,t){return Array.isArray(t)?nu(e,t.join(" ")):"object"==typeof t&&null!==t?function(e,t){let n=e=>e.split(" ").filter(Boolean),i=Object.entries(t).flatMap((([e,t])=>!!t&&n(e))).filter(Boolean),r=Object.entries(t).flatMap((([e,t])=>!t&&n(e))).filter(Boolean),o=[],a=[];return r.forEach((t=>{e.classList.contains(t)&&(e.classList.remove(t),a.push(t))})),i.forEach((t=>{e.classList.contains(t)||(e.classList.add(t),o.push(t))})),()=>{a.forEach((t=>e.classList.add(t))),o.forEach((t=>e.classList.remove(t)))}}(e,t):"function"==typeof t?tu(e,t()):nu(e,t)}function nu(e,t){return t=!0===t?t="":t||"",n=t.split(" ").filter((t=>!e.classList.contains(t))).filter(Boolean),e.classList.add(...n),()=>{e.classList.remove(...n)};var n}function iu(e,t){return"object"==typeof t&&null!==t?function(e,t){let n={};return Object.entries(t).forEach((([t,i])=>{n[t]=e.style[t],t.startsWith("--")||(t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),e.style.setProperty(t,i)})),setTimeout((()=>{0===e.style.length&&e.removeAttribute("style")})),()=>{iu(e,n)}}(e,t):function(e,t){let n=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",n||"")}}(e,t)}function ru(e,t=(()=>{})){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}function ou(e,t,n={}){e._x_transition||(e._x_transition={enter:{during:n,start:n,end:n},leave:{during:n,start:n,end:n},in(n=(()=>{}),i=(()=>{})){su(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=(()=>{}),i=(()=>{})){su(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}function au(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:au(t)}function su(e,t,{during:n,start:i,end:r}={},o=(()=>{}),a=(()=>{})){if(e._x_transitioning&&e._x_transitioning.cancel(),0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(r).length)return o(),void a();let s,u,l;!function(e,t){let n,i,r,o=ru((()=>{Wa((()=>{n=!0,i||t.before(),r||(t.end(),eu()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning}))}));e._x_transitioning={beforeCancels:[],beforeCancel(e){this.beforeCancels.push(e)},cancel:ru((function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()})),finish:o},Wa((()=>{t.start(),t.during()})),Qs=!0,requestAnimationFrame((()=>{if(n)return;let o=1e3*Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s","")),a=1e3*Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""));0===o&&(o=1e3*Number(getComputedStyle(e).animationDuration.replace("s",""))),Wa((()=>{t.before()})),i=!0,requestAnimationFrame((()=>{n||(Wa((()=>{t.end()})),eu(),setTimeout(e._x_transitioning.finish,o+a),r=!0)}))}))}(e,{start(){s=t(e,i)},during(){u=t(e,n)},before:o,end(){s(),l=t(e,r)},after:a,cleanup(){u(),l()}})}function uu(e,t,n){if(-1===e.indexOf(t))return n;const i=e[e.indexOf(t)+1];if(!i)return n;if("scale"===t&&isNaN(i))return n;if("duration"===t||"delay"===t){let e=i.match(/([0-9]+)ms/);if(e)return e[1]}return"origin"===t&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[i,e[e.indexOf(t)+2]].join(" "):i}bs("transition",((e,{value:t,modifiers:n,expression:i},{evaluate:r})=>{"function"==typeof i&&(i=r(i)),!1!==i&&(i&&"boolean"!=typeof i?function(e,t,n){ou(e,tu,""),{enter:t=>{e._x_transition.enter.during=t},"enter-start":t=>{e._x_transition.enter.start=t},"enter-end":t=>{e._x_transition.enter.end=t},leave:t=>{e._x_transition.leave.during=t},"leave-start":t=>{e._x_transition.leave.start=t},"leave-end":t=>{e._x_transition.leave.end=t}}[n](t)}(e,i,t):function(e,t,n){ou(e,iu);let i=!t.includes("in")&&!t.includes("out")&&!n,r=i||t.includes("in")||["enter"].includes(n),o=i||t.includes("out")||["leave"].includes(n);t.includes("in")&&!i&&(t=t.filter(((e,n)=>nn>t.indexOf("out"))));let a=!t.includes("opacity")&&!t.includes("scale"),s=a||t.includes("opacity")?0:1,u=a||t.includes("scale")?uu(t,"scale",95)/100:1,l=uu(t,"delay",0)/1e3,c=uu(t,"origin","center"),d="opacity, transform",h=uu(t,"duration",150)/1e3,f=uu(t,"duration",75)/1e3,p="cubic-bezier(0.4, 0.0, 0.2, 1)";r&&(e._x_transition.enter.during={transformOrigin:c,transitionDelay:`${l}s`,transitionProperty:d,transitionDuration:`${h}s`,transitionTimingFunction:p},e._x_transition.enter.start={opacity:s,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:c,transitionDelay:`${l}s`,transitionProperty:d,transitionDuration:`${f}s`,transitionTimingFunction:p},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:s,transform:`scale(${u})`})}(e,n,t))})),window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,n,i){const r="visible"===document.visibilityState?requestAnimationFrame:setTimeout;let o=()=>r(n);t?e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(n):o():e._x_transition?e._x_transition.in(n):o():(e._x_hidePromise=e._x_transition?new Promise(((t,n)=>{e._x_transition.out((()=>{}),(()=>t(i))),e._x_transitioning&&e._x_transitioning.beforeCancel((()=>n({isFromCancelledTransition:!0})))})):Promise.resolve(i),queueMicrotask((()=>{let t=au(e);t?(t._x_hideChildren||(t._x_hideChildren=[]),t._x_hideChildren.push(e)):r((()=>{let t=e=>{let n=Promise.all([e._x_hidePromise,...(e._x_hideChildren||[]).map(t)]).then((([e])=>e?.()));return delete e._x_hidePromise,delete e._x_hideChildren,n};t(e).catch((e=>{if(!e.isFromCancelledTransition)throw e}))}))})))};var lu=!1;function cu(e,t=(()=>{})){return(...n)=>lu?t(...n):e(...n)}var du=[];function hu(e){du.push(e)}var fu=!1;function pu(e){let t=wa;Ra(((e,n)=>{let i=t(e);return xa(i),()=>{}})),e(),Ra(t)}function _u(e,t,n,i=[]){switch(e._x_bindings||(e._x_bindings=ba({})),e._x_bindings[t]=n,t=i.includes("camel")?t.toLowerCase().replace(/-(\w)/g,((e,t)=>t.toUpperCase())):t){case"value":!function(e,t){if("radio"===e.type)void 0===e.attributes.value&&(e.value=t),window.fromModel&&(e.checked="boolean"==typeof t?mu(e.value)===t:vu(e.value,t));else if("checkbox"===e.type)Number.isInteger(t)?e.value=t:Array.isArray(t)||"boolean"==typeof t||[null,void 0].includes(t)?Array.isArray(t)?e.checked=t.some((t=>vu(t,e.value))):e.checked=!!t:e.value=String(t);else if("SELECT"===e.tagName)!function(e,t){const n=[].concat(t).map((e=>e+""));Array.from(e.options).forEach((e=>{e.selected=n.includes(e.value)}))}(e,t);else{if(e.value===t)return;e.value=void 0===t?"":t}}(e,n);break;case"style":!function(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=iu(e,t)}(e,n);break;case"class":!function(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=tu(e,t)}(e,n);break;case"selected":case"checked":!function(e,t,n){gu(e,t,n),function(e,t,n){e[t]!==n&&(e[t]=n)}(e,t,n)}(e,t,n);break;default:gu(e,t,n)}}function gu(e,t,n){[null,void 0,!1].includes(n)&&function(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}(t)?e.removeAttribute(t):(yu(t)&&(n=t),function(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}(e,t,n))}function vu(e,t){return e==t}function mu(e){return!![1,"1","true","on","yes",!0].includes(e)||![0,"0","false","off","no",!1].includes(e)&&(e?Boolean(e):null)}function yu(e){return["disabled","checked","required","readonly","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function bu(e,t,n){let i=e.getAttribute(t);return null===i?"function"==typeof n?n():n:""===i||(yu(t)?!![t,"true"].includes(i):i)}function wu(e,t){var n;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){n=null,e.apply(i,r)}),t)}}function xu(e,t){let n;return function(){let i=arguments;n||(e.apply(this,i),n=!0,setTimeout((()=>n=!1),t))}}function Pu({get:e,set:t},{get:n,set:i}){let r,o,a=!0,s=wa((()=>{let s=e(),u=n();if(a)i(Eu(s)),a=!1;else{let e=JSON.stringify(s),n=JSON.stringify(u);e!==r?i(Eu(s)):e!==n&&t(Eu(u))}r=JSON.stringify(e()),o=JSON.stringify(n())}));return()=>{xa(s)}}function Eu(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var ku={},Ou=!1,Cu={};function Su(e,t,n){let i=[];for(;i.length;)i.pop()();let r=Object.entries(t).map((([e,t])=>({name:e,value:t}))),o=xs(r);return r=r.map((e=>o.find((t=>t.name===e.name))?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e)),ws(e,r,n).map((e=>{i.push(e.runCleanups),e()})),()=>{for(;i.length;)i.pop()()}}var Tu={},Au={get reactive(){return ba},get release(){return xa},get effect(){return wa},get raw(){return Pa},version:"3.14.1",flushAndStopDeferringMutations:function(){$a=!1,Ga(Ya),Ya=[]},dontAutoEvaluateFunctions:cs,disableEffectScheduling:function(e){Aa=!1,e(),Aa=!0},startObservingMutations:Ua,stopObservingMutations:Ba,setReactivityEngine:function(e){ba=e.reactive,xa=e.release,wa=t=>e.effect(t,{scheduler:e=>{Aa?function(e){var t;t=e,Oa.includes(t)||Oa.push(t),ka||Ea||(Ea=!0,queueMicrotask(Ta))}(e):e()}}),Pa=e.raw},onAttributeRemoved:za,onAttributesAdded:Na,closestDataStack:Ja,skipDuringClone:cu,onlyDuringClone:function(e){return(...t)=>lu&&e(...t)},addRootSelector:Vs,addInitSelector:Ws,interceptClone:hu,addScopeToNode:Ka,deferMutations:function(){$a=!0},mapAttributes:As,evaluateLater:hs,interceptInit:function(e){Gs.push(e)},setEvaluator:function(e){fs=e},mergeProxies:Qa,extractProp:function(e,t,n,i=!0){if(e._x_bindings&&void 0!==e._x_bindings[t])return e._x_bindings[t];if(e._x_inlineBindings&&void 0!==e._x_inlineBindings[t]){let n=e._x_inlineBindings[t];return n.extract=i,cs((()=>ds(e,n.expression)))}return bu(e,t,n)},findClosest:Ys,onElRemoved:La,closestRoot:$s,destroyTree:Ks,interceptor:ns,transition:su,setStyles:iu,mutateDom:Wa,directive:bs,entangle:Pu,throttle:xu,debounce:wu,evaluate:ds,initTree:Xs,nextTick:Zs,prefixed:ms,prefix:function(e){vs=e},plugin:function(e){(Array.isArray(e)?e:[e]).forEach((e=>e(Ru)))},magic:os,store:function(e,t){if(Ou||(ku=ba(ku),Ou=!0),void 0===t)return ku[e];ku[e]=t,"object"==typeof t&&null!==t&&t.hasOwnProperty("init")&&"function"==typeof t.init&&ku[e].init(),ts(ku[e])},start:function(){var e;Fs&&zs("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Fs=!0,document.body||zs("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `