@salla.sa/twilight-components 2.9.0 → 2.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/LICENSE +674 -21
  2. package/dist/cjs/index-cac2fd59.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{salla-button_29.cjs.entry.js → salla-button_30.cjs.entry.js} +50 -3
  5. package/dist/cjs/twilight.cjs.js +1 -1
  6. package/dist/collection/Helpers/Helper.js +4 -0
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +3 -3
  9. package/dist/collection/components/salla-comment-form/salla-comment-form.css +3 -0
  10. package/dist/collection/components/salla-comment-form/salla-comment-form.js +102 -0
  11. package/dist/components/Helper.js +4 -0
  12. package/dist/components/index.d.ts +1 -0
  13. package/dist/components/index.js +1 -0
  14. package/dist/components/salla-cart-summary.js +3 -3
  15. package/dist/components/salla-comment-form.d.ts +11 -0
  16. package/dist/components/salla-comment-form.js +78 -0
  17. package/dist/esm/index-0ce70ad2.js +2 -2
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/{salla-button_29.entry.js → salla-button_30.entry.js} +50 -4
  20. package/dist/esm/twilight.js +1 -1
  21. package/dist/esm-es5/index-0ce70ad2.js +1 -1
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/salla-button_30.entry.js +34 -0
  24. package/dist/esm-es5/twilight.js +1 -1
  25. package/dist/twilight/p-4191f73f.entry.js +22 -0
  26. package/dist/twilight/p-d393a5f3.system.js +1 -1
  27. package/dist/twilight/p-dd56d0ec.system.entry.js +34 -0
  28. package/dist/twilight/twilight.esm.js +1 -1
  29. package/dist/types/Helpers/Helper.d.ts +1 -0
  30. package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +20 -0
  31. package/dist/types/components.d.ts +29 -0
  32. package/package.json +5 -5
  33. package/dist/esm-es5/salla-button_29.entry.js +0 -34
  34. package/dist/twilight/p-6d3e4849.entry.js +0 -22
  35. package/dist/twilight/p-6dd0ca8b.system.entry.js +0 -34
@@ -1,22 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,h as i,H as e,g as n,c as o}from"./p-ca68752d.js";import{a,c as r,g as s}from"./p-f84bae34.js";import{S as l}from"./p-475ef754.js";const c=class{constructor(i){t(this,i),this.hostAttributes={},this.shape="btn",this.color="primary",this.fill="solid",this.size="medium",this.width="normal",this.loading=!1,this.disabled=!1,this.loaderPosition="after"}async load(){return"center"==this.loaderPosition&&this.text.classList.add("s-button-hide"),this.host.setAttribute("loading",""),this.host}async stop(){return this.host.removeAttribute("loading"),this.host.querySelector("button").removeAttribute("loading"),"center"==this.loaderPosition&&this.text.classList.remove("s-button-hide"),this.host}async setText(t){return this.text.innerHTML=t,this.host}async disable(){return this.host.setAttribute("disabled",""),this.host}async enable(){return this.host.removeAttribute("disabled"),this.host}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["color","fill","size","width","id"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes.type=this.hostAttributes.type||"button",this.hostAttributes.class+=" s-button-element s-button-"+this.shape+" s-button-"+("none"==this.fill?"fill-none":this.fill)+("medium"!=this.size?" s-button-"+this.size:"")+("normal"!=this.width?" s-button-"+this.width:"")+("link"==this.shape?" s-button-"+this.color+"-link":"")+("link"!=this.shape&&"outline"!=this.fill?" s-button-"+this.color:"")+("outline"==this.fill?" s-button-"+this.color+"-outline":"")+(this.disabled?" s-button-disabled ":"")+("icon"==this.shape?" s-button-loader-center":" s-button-loader-"+this.loaderPosition),this.hostAttributes}button(){return i("button",Object.assign({},this.getBtnAttributes(),{disabled:this.disabled}),i("span",{class:"s-button-text",ref:t=>this.text=t},i("slot",null)),this.loading?i("span",{class:"s-button-loader"}):"")}render(){return i(e,{class:"s-button-wrap"},this.href?i("a",{href:this.href},this.button()):this.button())}get host(){return n(this)}};c.style="";const u=class{constructor(i){t(this,i),this.cartSummaryCount=0,this.cartSummaryTotal=0,salla.cart.event.onUpdated((()=>{this.cartSummaryCount=salla.storage.get("cart.summary.count"),this.cartSummaryCount=salla.storage.get("cart.summary.total")}))}render(){return i(e,null,i("a",{class:"s-cart-summary-wrapper",href:salla.url.get("cart")},i("slot",{name:"icon"},i("i",{class:"s-cart-summary-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">\n<title>cart</title>\n<path d="M15.426 28.084c0-1.412-0.85-2.684-2.156-3.226-1.305-0.54-2.807-0.241-3.805 0.758-0.999 0.998-1.298 2.5-0.758 3.805 0.54 1.303 1.815 2.155 3.226 2.155 1.928-0.003 3.49-1.564 3.492-3.492h0.001zM10.597 28.084h0.001c0-0.54 0.326-1.027 0.825-1.235 0.498-0.206 1.074-0.091 1.455 0.29 0.383 0.382 0.497 0.957 0.29 1.456-0.208 0.5-0.695 0.825-1.235 0.825-0.355 0-0.695-0.142-0.944-0.391-0.251-0.251-0.392-0.591-0.392-0.946h-0.001l0.001 0.001zM28.23 28.084c0-1.412-0.85-2.684-2.155-3.226-1.305-0.54-2.807-0.241-3.806 0.758s-1.297 2.5-0.756 3.805c0.54 1.303 1.813 2.155 3.226 2.155 1.927-0.003 3.49-1.564 3.491-3.492zM23.401 28.084c0-0.54 0.326-1.027 0.825-1.235 0.5-0.206 1.075-0.091 1.457 0.29s0.497 0.957 0.289 1.456c-0.206 0.5-0.693 0.825-1.233 0.825-0.738 0-1.337-0.599-1.337-1.337l-0.001 0.001zM1.953 0.234l-0.342-0.059c-0.29-0.064-0.594-0.004-0.839 0.166-0.247 0.169-0.414 0.436-0.463 0.734-0.050 0.3 0.023 0.607 0.201 0.85s0.444 0.402 0.738 0.44l0.341 0.059c1.825 0.324 3.248 1.794 3.548 3.662l1.981 12.369h-0.001c0.218 1.387 0.913 2.651 1.96 3.563s2.379 1.412 3.754 1.41h14.242c0.601 0 1.088-0.498 1.088-1.112s-0.487-1.112-1.088-1.112h-14.242c-1.679-0.001-3.139-1.183-3.525-2.854h11.463c1.614 0.004 3.188-0.518 4.493-1.49 1.305-0.973 2.271-2.346 2.762-3.918l1.298-4.136c0.145-0.455 0.065-0.953-0.213-1.336-0.278-0.385-0.72-0.608-1.187-0.602h-20.467l-0.181-1.141c-0.218-1.367-0.849-2.631-1.802-3.615-0.954-0.983-2.184-1.64-3.518-1.878h-0.001zM26.946 9.096l-0.993 3.169v-0.001c-0.353 1.122-1.044 2.101-1.975 2.796s-2.056 1.067-3.208 1.067h-11.833l-1.125-7.042 19.134 0.011z"></path>\n</svg>\n'})),i("span",{class:"s-cart-summary-count"},salla.helpers.number(this.cartSummaryCount)),i("b",{class:"s-cart-summary-total"},salla.money(this.cartSummaryTotal))))}};u.style=":host{display:block}";var p=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],d={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return"undefined"!=typeof console&&console.warn(t)},getWeek:function(t){var i=new Date(t.getTime());i.setHours(0,0,0,0),i.setDate(i.getDate()+3-(i.getDay()+6)%7);var e=new Date(i.getFullYear(),0,4);return 1+Math.round(((i.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},h={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var i=t%100;if(i>3&&i<21)return"th";switch(i%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},f=function(t,i){return void 0===i&&(i=2),("000"+t).slice(-1*i)},g=function(t){return!0===t?1:0};function _(t,i){var e;return function(){var n=this,o=arguments;clearTimeout(e),e=setTimeout((function(){return t.apply(n,o)}),i)}}var m=function(t){return t instanceof Array?t:[t]};function v(t,i,e){if(!0===e)return t.classList.add(i);t.classList.remove(i)}function x(t,i,e){var n=window.document.createElement(t);return e=e||"",n.className=i=i||"",void 0!==e&&(n.textContent=e),n}function b(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function w(t,i){return i(t)?t:t.parentNode?w(t.parentNode,i):void 0}function y(t,i){var e=x("div","numInputWrapper"),n=x("input","numInput "+t),o=x("span","arrowUp"),a=x("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==i)for(var r in i)n.setAttribute(r,i[r]);return e.appendChild(n),e.appendChild(o),e.appendChild(a),e}function E(t){try{return"function"==typeof t.composedPath?t.composedPath()[0]:t.target}catch(i){return t.target}}var k=function(){},I=function(t,i,e){return e.months[i?"shorthand":"longhand"][t]},T={D:k,F:function(t,i,e){t.setMonth(e.months.longhand.indexOf(i))},G:function(t,i){t.setHours((t.getHours()>=12?12:0)+parseFloat(i))},H:function(t,i){t.setHours(parseFloat(i))},J:function(t,i){t.setDate(parseFloat(i))},K:function(t,i,e){t.setHours(t.getHours()%12+12*g(new RegExp(e.amPM[1],"i").test(i)))},M:function(t,i,e){t.setMonth(e.months.shorthand.indexOf(i))},S:function(t,i){t.setSeconds(parseFloat(i))},U:function(t,i){return new Date(1e3*parseFloat(i))},W:function(t,i,e){var n=parseInt(i),o=new Date(t.getFullYear(),0,2+7*(n-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+e.firstDayOfWeek),o},Y:function(t,i){t.setFullYear(parseFloat(i))},Z:function(t,i){return new Date(i)},d:function(t,i){t.setDate(parseFloat(i))},h:function(t,i){t.setHours((t.getHours()>=12?12:0)+parseFloat(i))},i:function(t,i){t.setMinutes(parseFloat(i))},j:function(t,i){t.setDate(parseFloat(i))},l:k,m:function(t,i){t.setMonth(parseFloat(i)-1)},n:function(t,i){t.setMonth(parseFloat(i)-1)},s:function(t,i){t.setSeconds(parseFloat(i))},u:function(t,i){return new Date(parseFloat(i))},w:k,y:function(t,i){t.setFullYear(2e3+parseFloat(i))}},A={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},M={Z:function(t){return t.toISOString()},D:function(t,i,e){return i.weekdays.shorthand[M.w(t,i,e)]},F:function(t,i,e){return I(M.n(t,i,e)-1,!1,i)},G:function(t,i,e){return f(M.h(t,i,e))},H:function(t){return f(t.getHours())},J:function(t,i){return void 0!==i.ordinal?t.getDate()+i.ordinal(t.getDate()):t.getDate()},K:function(t,i){return i.amPM[g(t.getHours()>11)]},M:function(t,i){return I(t.getMonth(),!0,i)},S:function(t){return f(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,i,e){return e.getWeek(t)},Y:function(t){return f(t.getFullYear(),4)},d:function(t){return f(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return f(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,i){return i.weekdays.longhand[t.getDay()]},m:function(t){return f(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},D=function(t){var i=t.config,e=void 0===i?d:i,n=t.l10n,o=void 0===n?h:n,a=t.isMobile,r=void 0!==a&&a;return function(t,i,n){var a=n||o;return void 0===e.formatDate||r?i.split("").map((function(i,n,o){return M[i]&&"\\"!==o[n-1]?M[i](t,a,e):"\\"!==i?i:""})).join(""):e.formatDate(t,i,a)}},R=function(t){var i=t.config,e=void 0===i?d:i,n=t.l10n,o=void 0===n?h:n;return function(t,i,n,a){if(0===t||t){var r,s=a||o,l=t;if(t instanceof Date)r=new Date(t.getTime());else if("string"!=typeof t&&void 0!==t.toFixed)r=new Date(t);else if("string"==typeof t){var c=i||(e||d).dateFormat,u=String(t).trim();if("today"===u)r=new Date,n=!0;else if(e&&e.parseDate)r=e.parseDate(t,c);else if(/Z$/.test(u)||/GMT$/.test(u))r=new Date(t);else{for(var p=void 0,h=[],f=0,g=0,_="";f<c.length;f++){var m=c[f],v="\\"===m;if(A[m]&&"\\"!==c[f-1]&&!v){_+=A[m];var x=new RegExp(_).exec(t);x&&(p=!0)&&h["Y"!==m?"push":"unshift"]({fn:T[m],val:x[++g]})}else v||(_+=".")}r=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),h.forEach((function(t){return r=(0,t.fn)(r,t.val,s)||r})),r=p?r:void 0}}if(r instanceof Date&&!isNaN(r.getTime()))return!0===n&&r.setHours(0,0,0,0),r;e.errorHandler(new Error("Invalid date provided: "+l))}}};function O(t,i,e){return void 0===e&&(e=!0),!1!==e?new Date(t.getTime()).setHours(0,0,0,0)-new Date(i.getTime()).setHours(0,0,0,0):t.getTime()-i.getTime()}var S=function(t,i,e){return 3600*t+60*i+e};function L(t){var i=t.defaultHour,e=t.defaultMinute,n=t.defaultSeconds;if(void 0!==t.minDate){var o=t.minDate.getHours(),a=t.minDate.getMinutes(),r=t.minDate.getSeconds();i<o&&(i=o),i===o&&e<a&&(e=a),i===o&&e===a&&n<r&&(n=t.minDate.getSeconds())}if(void 0!==t.maxDate){var s=t.maxDate.getHours(),l=t.maxDate.getMinutes();(i=Math.min(i,s))===s&&(e=Math.min(l,e)),i===s&&e===l&&(n=t.maxDate.getSeconds())}return{hours:i,minutes:e,seconds:n}}"function"!=typeof Object.assign&&(Object.assign=function(t){for(var i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var n=function(i){i&&Object.keys(i).forEach((function(e){return t[e]=i[e]}))},o=0,a=i;o<a.length;o++){var r=a[o];n(r)}return t});var C=function(){return(C=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var o in i=arguments[e])Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o]);return t}).apply(this,arguments)},P=function(){for(var t=0,i=0,e=arguments.length;i<e;i++)t+=arguments[i].length;var n=Array(t),o=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,s=a.length;r<s;r++,o++)n[o]=a[r];return n};function G(t,i){var e={config:C(C({},d),N.defaultConfig),l10n:h};function n(){var t;return(null===(t=e.calendarContainer)||void 0===t?void 0:t.getRootNode()).activeElement||document.activeElement}function o(t){return t.bind(e)}function a(){var t=e.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==e.calendarContainer&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),void 0!==e.daysContainer){var i=(e.days.offsetWidth+1)*t.showMonths;e.daysContainer.style.width=i+"px",e.calendarContainer.style.width=i+(void 0!==e.weekWrapper?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}}))}function r(t){if(0===e.selectedDates.length){var i=void 0===e.config.minDate||O(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),n=L(e.config);i.setHours(n.hours,n.minutes,n.seconds,i.getMilliseconds()),e.selectedDates=[i],e.latestSelectedDateObj=i}void 0!==t&&"blur"!==t.type&&function(t){t.preventDefault();var i="keydown"===t.type,n=E(t),o=n;void 0!==e.amPM&&n===e.amPM&&(e.amPM.textContent=e.l10n.amPM[g(e.amPM.textContent===e.l10n.amPM[0])]);var a=parseFloat(o.getAttribute("min")),r=parseFloat(o.getAttribute("max")),s=parseFloat(o.getAttribute("step")),l=parseInt(o.value,10),c=l+s*(t.delta||(i?38===t.which?1:-1:0));if(void 0!==o.value&&2===o.value.length){var u=o===e.hourElement,p=o===e.minuteElement;c<a?(c=r+c+g(!u)+(g(u)&&g(!e.amPM)),p&&z(void 0,-1,e.hourElement)):c>r&&(c=o===e.hourElement?c-r-g(!e.amPM):a,p&&z(void 0,1,e.hourElement)),e.amPM&&u&&(1===s?c+l===23:Math.abs(c-l)>s)&&(e.amPM.textContent=e.l10n.amPM[g(e.amPM.textContent===e.l10n.amPM[0])]),o.value=f(c)}}(t);var o=e._input.value;s(),yt(),e._input.value!==o&&e._debouncedChange()}function s(){if(void 0!==e.hourElement&&void 0!==e.minuteElement){var t=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(e.minuteElement.value,10)||0)%60,n=void 0!==e.secondElement?(parseInt(e.secondElement.value,10)||0)%60:0;void 0!==e.amPM&&(t=t%12+12*g(e.amPM.textContent===e.l10n.amPM[1]));var o=void 0!==e.config.minTime||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&0===O(e.latestSelectedDateObj,e.config.minDate,!0),a=void 0!==e.config.maxTime||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&0===O(e.latestSelectedDateObj,e.config.maxDate,!0);if(void 0!==e.config.maxTime&&void 0!==e.config.minTime&&e.config.minTime>e.config.maxTime){var r=S(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),s=S(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),l=S(t,i,n);if(l>s&&l<r){var u=function(t){var i=Math.floor(t/3600),e=(t-3600*i)/60;return[i,e,t-3600*i-60*e]}(r);t=u[0],i=u[1],n=u[2]}}else{if(a){var p=void 0!==e.config.maxTime?e.config.maxTime:e.config.maxDate;(t=Math.min(t,p.getHours()))===p.getHours()&&(i=Math.min(i,p.getMinutes())),i===p.getMinutes()&&(n=Math.min(n,p.getSeconds()))}if(o){var d=void 0!==e.config.minTime?e.config.minTime:e.config.minDate;(t=Math.max(t,d.getHours()))===d.getHours()&&i<d.getMinutes()&&(i=d.getMinutes()),i===d.getMinutes()&&(n=Math.max(n,d.getSeconds()))}}c(t,i,n)}}function l(t){var i=t||e.latestSelectedDateObj;i&&i instanceof Date&&c(i.getHours(),i.getMinutes(),i.getSeconds())}function c(t,i,n){void 0!==e.latestSelectedDateObj&&e.latestSelectedDateObj.setHours(t%24,i,n||0,0),e.hourElement&&e.minuteElement&&!e.isMobile&&(e.hourElement.value=f(e.config.time_24hr?t:(12+t)%12+12*g(t%12==0)),e.minuteElement.value=f(i),void 0!==e.amPM&&(e.amPM.textContent=e.l10n.amPM[g(t>=12)]),void 0!==e.secondElement&&(e.secondElement.value=f(n)))}function u(t){var i=E(t),e=parseInt(i.value)+(t.delta||0);(e/1e3>1||"Enter"===t.key&&!/[^\d]/.test(e.toString()))&&J(e)}function k(t,i,n,o){return i instanceof Array?i.forEach((function(i){return k(t,i,n,o)})):t instanceof Array?t.forEach((function(t){return k(t,i,n,o)})):(t.addEventListener(i,n,o),void e._handlers.push({remove:function(){return t.removeEventListener(i,n,o)}}))}function T(){mt("onChange")}function M(t,i){var n=void 0!==t?e.parseDate(t):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),o=e.currentYear,a=e.currentMonth;try{void 0!==n&&(e.currentYear=n.getFullYear(),e.currentMonth=n.getMonth())}catch(t){t.message="Invalid date supplied: "+n,e.config.errorHandler(t)}i&&e.currentYear!==o&&(mt("onYearChange"),W()),!i||e.currentYear===o&&e.currentMonth===a||mt("onMonthChange"),e.redraw()}function G(t){var i=E(t);~i.className.indexOf("arrow")&&z(t,i.classList.contains("arrowUp")?1:-1)}function z(t,i,e){var n=t&&E(t),o=e||n&&n.parentNode&&n.parentNode.firstChild,a=vt("increment");a.delta=i,o&&o.dispatchEvent(a)}function B(t,i,n,o){var a=tt(i,!0),r=x("span",t,i.getDate().toString());return r.dateObj=i,r.$i=o,r.setAttribute("aria-label",e.formatDate(i,e.config.ariaDateFormat)),-1===t.indexOf("hidden")&&0===O(i,e.now)&&(e.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),a?(r.tabIndex=-1,xt(i)&&(r.classList.add("selected"),e.selectedDateElem=r,"range"===e.config.mode&&(v(r,"startRange",e.selectedDates[0]&&0===O(i,e.selectedDates[0],!0)),v(r,"endRange",e.selectedDates[1]&&0===O(i,e.selectedDates[1],!0)),"nextMonthDay"===t&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===e.config.mode&&function(t){return!("range"!==e.config.mode||e.selectedDates.length<2)&&O(t,e.selectedDates[0])>=0&&O(t,e.selectedDates[1])<=0}(i)&&!xt(i)&&r.classList.add("inRange"),e.weekNumbers&&1===e.config.showMonths&&"prevMonthDay"!==t&&o%7==6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(i)+"</span>"),mt("onDayCreate",r),r}function F(t){t.focus(),"range"===e.config.mode&&ot(t)}function U(t){for(var i=t>0?e.config.showMonths:-1,n=t>0?0:e.config.showMonths-1;n!=i;n+=t)for(var o=e.daysContainer.children[n],a=t>0?o.children.length:-1,r=t>0?0:o.children.length-1;r!=a;r+=t){var s=o.children[r];if(-1===s.className.indexOf("hidden")&&tt(s.dateObj))return s}}function j(t,i){var o=n(),a=it(o||document.body),r=void 0!==t?t:a?o:void 0!==e.selectedDateElem&&it(e.selectedDateElem)?e.selectedDateElem:void 0!==e.todayDateElem&&it(e.todayDateElem)?e.todayDateElem:U(i>0?1:-1);void 0===r?e._input.focus():a?function(t,i){for(var n=-1===t.className.indexOf("Month")?t.dateObj.getMonth():e.currentMonth,o=i>0?e.config.showMonths:-1,a=i>0?1:-1,r=n-e.currentMonth;r!=o;r+=a)for(var s=e.daysContainer.children[r],l=s.children.length,c=n-e.currentMonth===r?t.$i+i:i<0?s.children.length-1:0;c>=0&&c<l&&c!=(i>0?l:-1);c+=a){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&tt(u.dateObj)&&Math.abs(t.$i-c)>=Math.abs(i))return F(u)}e.changeMonth(a),j(U(a),0)}(r,i):F(r)}function H(t,i){for(var n=(new Date(t,i,1).getDay()-e.l10n.firstDayOfWeek+7)%7,o=e.utils.getDaysInMonth((i-1+12)%12,t),a=e.utils.getDaysInMonth(i,t),r=window.document.createDocumentFragment(),s=e.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",c=s?"nextMonthDay hidden":"nextMonthDay",u=o+1-n,p=0;u<=o;u++,p++)r.appendChild(B("flatpickr-day "+l,new Date(t,i-1,u),0,p));for(u=1;u<=a;u++,p++)r.appendChild(B("flatpickr-day",new Date(t,i,u),0,p));for(var d=a+1;d<=42-n&&(1===e.config.showMonths||p%7!=0);d++,p++)r.appendChild(B("flatpickr-day "+c,new Date(t,i+1,d%a),0,p));var h=x("div","dayContainer");return h.appendChild(r),h}function V(){if(void 0!==e.daysContainer){b(e.daysContainer),e.weekNumbers&&b(e.weekNumbers);for(var t=document.createDocumentFragment(),i=0;i<e.config.showMonths;i++){var n=new Date(e.currentYear,e.currentMonth,1);n.setMonth(e.currentMonth+i),t.appendChild(H(n.getFullYear(),n.getMonth()))}e.daysContainer.appendChild(t),e.days=e.daysContainer.firstChild,"range"===e.config.mode&&1===e.selectedDates.length&&ot()}}function W(){if(!(e.config.showMonths>1||"dropdown"!==e.config.monthSelectorType)){var t=function(t){return!(void 0!==e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&t<e.config.minDate.getMonth()||void 0!==e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()&&t>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var i=0;i<12;i++)if(t(i)){var n=x("option","flatpickr-monthDropdown-month");n.value=new Date(e.currentYear,i).getMonth().toString(),n.textContent=I(i,e.config.shorthandCurrentMonth,e.l10n),n.tabIndex=-1,e.currentMonth===i&&(n.selected=!0),e.monthsDropdownContainer.appendChild(n)}}}function Y(){var t,i=x("div","flatpickr-month"),n=window.document.createDocumentFragment();e.config.showMonths>1||"static"===e.config.monthSelectorType?t=x("span","cur-month"):(e.monthsDropdownContainer=x("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),k(e.monthsDropdownContainer,"change",(function(t){var i=E(t),n=parseInt(i.value,10);e.changeMonth(n-e.currentMonth),mt("onMonthChange")})),W(),t=e.monthsDropdownContainer);var o=y("cur-year",{tabindex:"-1"}),a=o.getElementsByTagName("input")[0];a.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&a.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(a.setAttribute("max",e.config.maxDate.getFullYear().toString()),a.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var r=x("div","flatpickr-current-month");return r.appendChild(t),r.appendChild(o),n.appendChild(r),i.appendChild(n),{container:i,yearElement:a,monthElement:t}}function q(){b(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var t=e.config.showMonths;t--;){var i=Y();e.yearElements.push(i.yearElement),e.monthElements.push(i.monthElement),e.monthNav.appendChild(i.container)}e.monthNav.appendChild(e.nextMonthNav)}function $(){e.weekdayContainer?b(e.weekdayContainer):e.weekdayContainer=x("div","flatpickr-weekdays");for(var t=e.config.showMonths;t--;){var i=x("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(i)}return Z(),e.weekdayContainer}function Z(){if(e.weekdayContainer){var t=e.l10n.firstDayOfWeek,i=P(e.l10n.weekdays.shorthand);t>0&&t<i.length&&(i=P(i.splice(t,i.length),i.splice(0,t)));for(var n=e.config.showMonths;n--;)e.weekdayContainer.children[n].innerHTML="\n <span class='flatpickr-weekday'>\n "+i.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function X(t,i){void 0===i&&(i=!0);var n=i?t:t-e.currentMonth;n<0&&!0===e._hidePrevMonthArrow||n>0&&!0===e._hideNextMonthArrow||(e.currentMonth+=n,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,mt("onYearChange"),W()),V(),mt("onMonthChange"),bt())}function K(t){return e.calendarContainer.contains(t)}function Q(t){if(e.isOpen&&!e.config.inline){var i=E(t),n=K(i),o=!(i===e.input||i===e.altInput||e.element.contains(i)||t.path&&t.path.indexOf&&(~t.path.indexOf(e.input)||~t.path.indexOf(e.altInput))||n||K(t.relatedTarget)),a=!e.config.ignoredFocusElements.some((function(t){return t.contains(i)}));o&&a&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),void 0!==e.timeContainer&&void 0!==e.minuteElement&&void 0!==e.hourElement&&""!==e.input.value&&void 0!==e.input.value&&r(),e.close(),e.config&&"range"===e.config.mode&&1===e.selectedDates.length&&e.clear(!1))}}function J(t){if(!(!t||e.config.minDate&&t<e.config.minDate.getFullYear()||e.config.maxDate&&t>e.config.maxDate.getFullYear())){var i=e.currentYear!==t;e.currentYear=t||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),i&&(e.redraw(),mt("onYearChange"),W())}}function tt(t,i){var n;void 0===i&&(i=!0);var o=e.parseDate(t,void 0,i);if(e.config.minDate&&o&&O(o,e.config.minDate,void 0!==i?i:!e.minDateHasTime)<0||e.config.maxDate&&o&&O(o,e.config.maxDate,void 0!==i?i:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&0===e.config.disable.length)return!0;if(void 0===o)return!1;for(var a=!!e.config.enable,r=null!==(n=e.config.enable)&&void 0!==n?n:e.config.disable,s=0,l=void 0;s<r.length;s++){if("function"==typeof(l=r[s])&&l(o))return a;if(l instanceof Date&&void 0!==o&&l.getTime()===o.getTime())return a;if("string"==typeof l){var c=e.parseDate(l,void 0,!0);return c&&c.getTime()===o.getTime()?a:!a}if("object"==typeof l&&void 0!==o&&l.from&&l.to&&o.getTime()>=l.from.getTime()&&o.getTime()<=l.to.getTime())return a}return!a}function it(t){return void 0!==e.daysContainer&&-1===t.className.indexOf("hidden")&&-1===t.className.indexOf("flatpickr-disabled")&&e.daysContainer.contains(t)}function et(t){var i=t.target===e._input,n=e._input.value.trimEnd()!==wt();!i||!n||t.relatedTarget&&K(t.relatedTarget)||e.setDate(e._input.value,!0,t.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function nt(i){var o=E(i),a=e.config.wrap?t.contains(o):o===e._input,l=e.config.allowInput,c=e.isOpen&&(!l||!a),u=e.config.inline&&a&&!l;if(13===i.keyCode&&a){if(l)return e.setDate(e._input.value,!0,o===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),o.blur();e.open()}else if(K(o)||c||u){var p=!!e.timeContainer&&e.timeContainer.contains(o);switch(i.keyCode){case 13:p?(i.preventDefault(),r(),pt()):dt(i);break;case 27:i.preventDefault(),pt();break;case 8:case 46:a&&!e.config.allowInput&&(i.preventDefault(),e.clear());break;case 37:case 39:if(p||a)e.hourElement&&e.hourElement.focus();else{i.preventDefault();var d=n();if(void 0!==e.daysContainer&&(!1===l||d&&it(d))){var h=39===i.keyCode?1:-1;i.ctrlKey?(i.stopPropagation(),X(h),j(U(1),0)):j(void 0,h)}}break;case 38:case 40:i.preventDefault();var f=40===i.keyCode?1:-1;e.daysContainer&&void 0!==o.$i||o===e.input||o===e.altInput?i.ctrlKey?(i.stopPropagation(),J(e.currentYear-f),j(U(1),0)):p||j(void 0,7*f):o===e.currentYearElement?J(e.currentYear-f):e.config.enableTime&&(!p&&e.hourElement&&e.hourElement.focus(),r(i),e._debouncedChange());break;case 9:if(p){var g=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter((function(t){return t})),_=g.indexOf(o);if(-1!==_){var m=g[_+(i.shiftKey?-1:1)];i.preventDefault(),(m||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(o)&&i.shiftKey&&(i.preventDefault(),e._input.focus())}}if(void 0!==e.amPM&&o===e.amPM)switch(i.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],s(),yt();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],s(),yt()}(a||K(o))&&mt("onKeyDown",i)}function ot(t,i){if(void 0===i&&(i="flatpickr-day"),1===e.selectedDates.length&&(!t||t.classList.contains(i)&&!t.classList.contains("flatpickr-disabled"))){for(var n=t?t.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),o=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),a=Math.min(n,e.selectedDates[0].getTime()),r=Math.max(n,e.selectedDates[0].getTime()),s=!1,l=0,c=0,u=a;u<r;u+=864e5)tt(new Date(u),!0)||(s=s||u>a&&u<r,u<o&&(!l||u>l)?l=u:u>o&&(!c||u<c)&&(c=u));Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+i)).forEach((function(i){var a,r,u,p=i.dateObj.getTime(),d=l>0&&p<l||c>0&&p>c;if(d)return i.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(t){i.classList.remove(t)}));s&&!d||(["startRange","inRange","endRange","notAllowed"].forEach((function(t){i.classList.remove(t)})),void 0!==t&&(t.classList.add(n<=e.selectedDates[0].getTime()?"startRange":"endRange"),o<n&&p===o?i.classList.add("startRange"):o>n&&p===o&&i.classList.add("endRange"),p>=l&&(0===c||p<=c)&&(r=o,u=n,(a=p)>Math.min(r,u)&&a<Math.max(r,u))&&i.classList.add("inRange")))}))}}function at(){!e.isOpen||e.config.static||e.config.inline||ct()}function rt(t){return function(i){var n=e.config["_"+t+"Date"]=e.parseDate(i,e.config.dateFormat),o=e.config["_"+("min"===t?"max":"min")+"Date"];void 0!==n&&(e["min"===t?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter((function(t){return tt(t)})),e.selectedDates.length||"min"!==t||l(n),yt()),e.daysContainer&&(ut(),void 0!==n?e.currentYearElement[t]=n.getFullYear().toString():e.currentYearElement.removeAttribute(t),e.currentYearElement.disabled=!!o&&void 0!==n&&o.getFullYear()===n.getFullYear())}}function st(){return e.config.wrap?t.querySelector("[data-input]"):t}function lt(){"object"!=typeof e.config.locale&&void 0===N.l10ns[e.config.locale]&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=C(C({},N.l10ns.default),"object"==typeof e.config.locale?e.config.locale:"default"!==e.config.locale?N.l10ns[e.config.locale]:void 0),A.D="("+e.l10n.weekdays.shorthand.join("|")+")",A.l="("+e.l10n.weekdays.longhand.join("|")+")",A.M="("+e.l10n.months.shorthand.join("|")+")",A.F="("+e.l10n.months.longhand.join("|")+")",A.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")",void 0===C(C({},i),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr&&void 0===N.defaultConfig.time_24hr&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=D(e),e.parseDate=R({config:e.config,l10n:e.l10n})}function ct(t){if("function"!=typeof e.config.position){if(void 0!==e.calendarContainer){mt("onPreCalendarPosition");var i=t||e._positionElement,n=Array.prototype.reduce.call(e.calendarContainer.children,(function(t,i){return t+i.offsetHeight}),0),o=e.calendarContainer.offsetWidth,a=e.config.position.split(" "),r=a[0],s=a.length>1?a[1]:null,l=i.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===r||"below"!==r&&c<n&&l.top>n,p=window.pageYOffset+l.top+(u?-n-2:i.offsetHeight+2);if(v(e.calendarContainer,"arrowTop",!u),v(e.calendarContainer,"arrowBottom",u),!e.config.inline){var d=window.pageXOffset+l.left,h=!1,f=!1;"center"===s?(d-=(o-l.width)/2,h=!0):"right"===s&&(d-=o-l.width,f=!0),v(e.calendarContainer,"arrowLeft",!h&&!f),v(e.calendarContainer,"arrowCenter",h),v(e.calendarContainer,"arrowRight",f);var g=window.document.body.offsetWidth-(window.pageXOffset+l.right),_=d+o>window.document.body.offsetWidth,m=g+o>window.document.body.offsetWidth;if(v(e.calendarContainer,"rightMost",_),!e.config.static)if(e.calendarContainer.style.top=p+"px",_)if(m){var x=function(){for(var t=null,i=0;i<document.styleSheets.length;i++){var e=document.styleSheets[i];if(e.cssRules){t=e;break}}return null!=t?t:(n=document.createElement("style"),document.head.appendChild(n),n.sheet);var n}();if(void 0===x)return;var b=window.document.body.offsetWidth,w=Math.max(0,b/2-o/2),y=x.cssRules.length,E="{left:"+l.left+"px;right:auto;}";v(e.calendarContainer,"rightMost",!1),v(e.calendarContainer,"centerMost",!0),x.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+E,y),e.calendarContainer.style.left=w+"px",e.calendarContainer.style.right="auto"}else e.calendarContainer.style.left="auto",e.calendarContainer.style.right=g+"px";else e.calendarContainer.style.left=d+"px",e.calendarContainer.style.right="auto"}}}else e.config.position(e,t)}function ut(){e.config.noCalendar||e.isMobile||(W(),bt(),V())}function pt(){e._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(e.close,0):e.close()}function dt(t){t.preventDefault(),t.stopPropagation();var i=w(E(t),(function(t){return t.classList&&t.classList.contains("flatpickr-day")&&!t.classList.contains("flatpickr-disabled")&&!t.classList.contains("notAllowed")}));if(void 0!==i){var n=i,o=e.latestSelectedDateObj=new Date(n.dateObj.getTime()),a=(o.getMonth()<e.currentMonth||o.getMonth()>e.currentMonth+e.config.showMonths-1)&&"range"!==e.config.mode;if(e.selectedDateElem=n,"single"===e.config.mode)e.selectedDates=[o];else if("multiple"===e.config.mode){var r=xt(o);r?e.selectedDates.splice(parseInt(r),1):e.selectedDates.push(o)}else"range"===e.config.mode&&(2===e.selectedDates.length&&e.clear(!1,!1),e.latestSelectedDateObj=o,e.selectedDates.push(o),0!==O(o,e.selectedDates[0],!0)&&e.selectedDates.sort((function(t,i){return t.getTime()-i.getTime()})));if(s(),a){var l=e.currentYear!==o.getFullYear();e.currentYear=o.getFullYear(),e.currentMonth=o.getMonth(),l&&(mt("onYearChange"),W()),mt("onMonthChange")}bt(),V(),yt(),a||"range"===e.config.mode||1!==e.config.showMonths?void 0!==e.selectedDateElem&&void 0===e.hourElement&&e.selectedDateElem&&e.selectedDateElem.focus():F(n),void 0!==e.hourElement&&void 0!==e.hourElement&&e.hourElement.focus(),e.config.closeOnSelect&&("single"===e.config.mode&&!e.config.enableTime||"range"===e.config.mode&&2===e.selectedDates.length&&!e.config.enableTime)&&pt(),T()}}e.parseDate=R({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=k,e._setHoursFromDate=l,e._positionCalendar=ct,e.changeMonth=X,e.changeYear=J,e.clear=function(t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!0),e.input.value="",void 0!==e.altInput&&(e.altInput.value=""),void 0!==e.mobileInput&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,!0===i&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),!0===e.config.enableTime){var n=L(e.config);c(n.hours,n.minutes,n.seconds)}e.redraw(),t&&mt("onChange")},e.close=function(){e.isOpen=!1,e.isMobile||(void 0!==e.calendarContainer&&e.calendarContainer.classList.remove("open"),void 0!==e._input&&e._input.classList.remove("active")),mt("onClose")},e.onMouseOver=ot,e._createElement=x,e.createDay=B,e.destroy=function(){void 0!==e.config&&mt("onDestroy");for(var t=e._handlers.length;t--;)e._handlers[t].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var i=e.calendarContainer.parentNode;if(i.lastChild&&i.removeChild(i.lastChild),i.parentNode){for(;i.firstChild;)i.parentNode.insertBefore(i.firstChild,i);i.parentNode.removeChild(i)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete e[t]}catch(t){}}))},e.isEnabled=tt,e.jumpToDate=M,e.updateValue=yt,e.open=function(t,i){if(void 0===i&&(i=e._positionElement),!0===e.isMobile){if(t){t.preventDefault();var n=E(t);n&&n.blur()}return void 0!==e.mobileInput&&(e.mobileInput.focus(),e.mobileInput.click()),void mt("onOpen")}if(!e._input.disabled&&!e.config.inline){var o=e.isOpen;e.isOpen=!0,o||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),mt("onOpen"),ct(i)),!0===e.config.enableTime&&!0===e.config.noCalendar&&(!1!==e.config.allowInput||void 0!==t&&e.timeContainer.contains(t.relatedTarget)||setTimeout((function(){return e.hourElement.select()}),50))}},e.redraw=ut,e.set=function(t,i){if(null!==t&&"object"==typeof t)for(var n in Object.assign(e.config,t),t)void 0!==ht[n]&&ht[n].forEach((function(t){return t()}));else e.config[t]=i,void 0!==ht[t]?ht[t].forEach((function(t){return t()})):p.indexOf(t)>-1&&(e.config[t]=m(i));e.redraw(),yt(!0)},e.setDate=function(t,i,n){if(void 0===i&&(i=!1),void 0===n&&(n=e.config.dateFormat),0!==t&&!t||t instanceof Array&&0===t.length)return e.clear(i);ft(t,n),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),M(void 0,i),l(),0===e.selectedDates.length&&e.clear(!1),yt(i),i&&mt("onChange")},e.toggle=function(t){if(!0===e.isOpen)return e.close();e.open(t)};var ht={locale:[lt,Z],showMonths:[q,a,$],minDate:[M],maxDate:[M],positionElement:[_t],clickOpens:[function(){!0===e.config.clickOpens?(k(e._input,"focus",e.open),k(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function ft(t,i){var n=[];if(t instanceof Array)n=t.map((function(t){return e.parseDate(t,i)}));else if(t instanceof Date||"number"==typeof t)n=[e.parseDate(t,i)];else if("string"==typeof t)switch(e.config.mode){case"single":case"time":n=[e.parseDate(t,i)];break;case"multiple":n=t.split(e.config.conjunction).map((function(t){return e.parseDate(t,i)}));break;case"range":n=t.split(e.l10n.rangeSeparator).map((function(t){return e.parseDate(t,i)}))}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));e.selectedDates=e.config.allowInvalidPreload?n:n.filter((function(t){return t instanceof Date&&tt(t,!1)})),"range"===e.config.mode&&e.selectedDates.sort((function(t,i){return t.getTime()-i.getTime()}))}function gt(t){return t.slice().map((function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date?e.parseDate(t,void 0,!0):t&&"object"==typeof t&&t.from&&t.to?{from:e.parseDate(t.from,void 0),to:e.parseDate(t.to,void 0)}:t})).filter((function(t){return t}))}function _t(){e._positionElement=e.config.positionElement||e._input}function mt(t,i){if(void 0!==e.config){var n=e.config[t];if(void 0!==n&&n.length>0)for(var o=0;n[o]&&o<n.length;o++)n[o](e.selectedDates,e.input.value,e,i);"onChange"===t&&(e.input.dispatchEvent(vt("change")),e.input.dispatchEvent(vt("input")))}}function vt(t){var i=document.createEvent("Event");return i.initEvent(t,!0,!0),i}function xt(t){for(var i=0;i<e.selectedDates.length;i++){var n=e.selectedDates[i];if(n instanceof Date&&0===O(n,t))return""+i}return!1}function bt(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((function(t,i){var n=new Date(e.currentYear,e.currentMonth,1);n.setMonth(e.currentMonth+i),e.config.showMonths>1||"static"===e.config.monthSelectorType?e.monthElements[i].textContent=I(n.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=n.getMonth().toString(),t.value=n.getFullYear().toString()})),e._hidePrevMonthArrow=void 0!==e.config.minDate&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=void 0!==e.config.maxDate&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function wt(t){var i=t||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map((function(t){return e.formatDate(t,i)})).filter((function(t,i,n){return"range"!==e.config.mode||e.config.enableTime||n.indexOf(t)===i})).join("range"!==e.config.mode?e.config.conjunction:e.l10n.rangeSeparator)}function yt(t){void 0===t&&(t=!0),void 0!==e.mobileInput&&e.mobileFormatStr&&(e.mobileInput.value=void 0!==e.latestSelectedDateObj?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=wt(e.config.dateFormat),void 0!==e.altInput&&(e.altInput.value=wt(e.config.altFormat)),!1!==t&&mt("onValueUpdate")}function Et(t){var i=E(t),n=e.prevMonthNav.contains(i),o=e.nextMonthNav.contains(i);n||o?X(n?-1:1):e.yearElements.indexOf(i)>=0?i.select():i.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):i.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}return function(){e.element=e.input=t,e.isOpen=!1,function(){var n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=C(C({},JSON.parse(JSON.stringify(t.dataset||{}))),i),r={};e.config.parseDate=a.parseDate,e.config.formatDate=a.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(t){e.config._enable=gt(t)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(t){e.config._disable=gt(t)}});var s="time"===a.mode;a.dateFormat||!a.enableTime&&!s||(r.dateFormat=a.noCalendar||s?"H:i"+(a.enableSeconds?":S":""):(N.defaultConfig.dateFormat||d.dateFormat)+" H:i"+(a.enableSeconds?":S":"")),a.altInput&&(a.enableTime||s)&&!a.altFormat&&(r.altFormat=a.noCalendar||s?"h:i"+(a.enableSeconds?":S K":" K"):(N.defaultConfig.altFormat||d.altFormat)+" h:i"+(a.enableSeconds?":S":"")+" K"),Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:rt("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:rt("max")});var l=function(t){return function(i){e.config["min"===t?"_minTime":"_maxTime"]=e.parseDate(i,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:l("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:l("max")}),"time"===a.mode&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,r,a);for(var c=0;c<n.length;c++)e.config[n[c]]=!0===e.config[n[c]]||"true"===e.config[n[c]];for(p.filter((function(t){return void 0!==e.config[t]})).forEach((function(t){e.config[t]=m(e.config[t]||[]).map(o)})),e.isMobile=!e.config.disableMobile&&!e.config.inline&&"single"===e.config.mode&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),c=0;c<e.config.plugins.length;c++){var u=e.config.plugins[c](e)||{};for(var h in u)p.indexOf(h)>-1?e.config[h]=m(u[h]).map(o).concat(e.config[h]):void 0===a[h]&&(e.config[h]=u[h])}a.altInputClass||(e.config.altInputClass=st().className+" "+e.config.altInputClass),mt("onParseConfig")}(),lt(),e.input=st(),e.input?(e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=x(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),_t()):e.config.errorHandler(new Error("Invalid input element specified")),function(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var t=e.config.defaultDate||("INPUT"!==e.input.nodeName&&"TEXTAREA"!==e.input.nodeName||!e.input.placeholder||e.input.value!==e.input.placeholder?e.input.value:null);t&&ft(t,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),void 0!==e.config.minTime&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),void 0!==e.config.maxTime&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}(),e.utils={getDaysInMonth:function(t,i){return void 0===t&&(t=e.currentMonth),void 0===i&&(i=e.currentYear),1===t&&(i%4==0&&i%100!=0||i%400==0)?29:e.l10n.daysInMonth[t]}},e.isMobile||function(){var t=window.document.createDocumentFragment();if(e.calendarContainer=x("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(t.appendChild((e.monthNav=x("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=x("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=x("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,q(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(t){e.__hidePrevMonthArrow!==t&&(v(e.prevMonthNav,"flatpickr-disabled",t),e.__hidePrevMonthArrow=t)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(t){e.__hideNextMonthArrow!==t&&(v(e.nextMonthNav,"flatpickr-disabled",t),e.__hideNextMonthArrow=t)}}),e.currentYearElement=e.yearElements[0],bt(),e.monthNav)),e.innerContainer=x("div","flatpickr-innerContainer"),e.config.weekNumbers){var i=function(){e.calendarContainer.classList.add("hasWeeks");var t=x("div","flatpickr-weekwrapper");t.appendChild(x("span","flatpickr-weekday",e.l10n.weekAbbreviation));var i=x("div","flatpickr-weeks");return t.appendChild(i),{weekWrapper:t,weekNumbers:i}}(),n=i.weekWrapper,o=i.weekNumbers;e.innerContainer.appendChild(n),e.weekNumbers=o,e.weekWrapper=n}e.rContainer=x("div","flatpickr-rContainer"),e.rContainer.appendChild($()),e.daysContainer||(e.daysContainer=x("div","flatpickr-days"),e.daysContainer.tabIndex=-1),V(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),t.appendChild(e.innerContainer)}e.config.enableTime&&t.appendChild(function(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var t=L(e.config);e.timeContainer=x("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var i=x("span","flatpickr-time-separator",":"),n=y("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=n.getElementsByTagName("input")[0];var o=y("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=o.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=f(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?t.hours:function(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}(t.hours)),e.minuteElement.value=f(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():t.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(n),e.timeContainer.appendChild(i),e.timeContainer.appendChild(o),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var a=y("flatpickr-second");e.secondElement=a.getElementsByTagName("input")[0],e.secondElement.value=f(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():t.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(x("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(a)}return e.config.time_24hr||(e.amPM=x("span","flatpickr-am-pm",e.l10n.amPM[g((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}()),v(e.calendarContainer,"rangeMode","range"===e.config.mode),v(e.calendarContainer,"animate",!0===e.config.animate),v(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(t);var a=void 0!==e.config.appendTo&&void 0!==e.config.appendTo.nodeType;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!a&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):void 0!==e.config.appendTo&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var r=x("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(r,e.element),r.appendChild(e.element),e.altInput&&r.appendChild(e.altInput),r.appendChild(e.calendarContainer)}e.config.static||e.config.inline||(void 0!==e.config.appendTo?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}(),function(){if(e.config.wrap&&["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+t+"]"),(function(i){return k(i,"click",e[t])}))})),e.isMobile)!function(){var t=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=x("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=t,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",void 0!==e.altInput&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch(t){}k(e.mobileInput,"change",(function(t){e.setDate(E(t).value,!1,e.mobileFormatStr),mt("onChange"),mt("onClose")}))}();else{var t=_(at,50);if(e._debouncedChange=_(T,300),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(e.daysContainer,"mouseover",(function(t){"range"===e.config.mode&&ot(E(t))})),k(e._input,"keydown",nt),void 0!==e.calendarContainer&&k(e.calendarContainer,"keydown",nt),e.config.inline||e.config.static||k(window,"resize",t),void 0!==window.ontouchstart?k(window.document,"touchstart",Q):k(window.document,"mousedown",Q),k(window.document,"focus",Q,{capture:!0}),!0===e.config.clickOpens&&(k(e._input,"focus",e.open),k(e._input,"click",e.open)),void 0!==e.daysContainer&&(k(e.monthNav,"click",Et),k(e.monthNav,["keyup","increment"],u),k(e.daysContainer,"click",dt)),void 0!==e.timeContainer&&void 0!==e.minuteElement&&void 0!==e.hourElement){k(e.timeContainer,["increment"],r),k(e.timeContainer,"blur",r,{capture:!0}),k(e.timeContainer,"click",G),k([e.hourElement,e.minuteElement],["focus","click"],(function(t){return E(t).select()})),void 0!==e.secondElement&&k(e.secondElement,"focus",(function(){return e.secondElement&&e.secondElement.select()})),void 0!==e.amPM&&k(e.amPM,"click",(function(t){r(t)}))}e.config.allowInput&&k(e._input,"blur",et)}}(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&l(e.config.noCalendar?e.latestSelectedDateObj:void 0),yt(!1)),a();var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&n&&ct(),mt("onReady")}(),e}function z(t,i){for(var e=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement})),n=[],o=0;o<e.length;o++){var a=e[o];try{if(null!==a.getAttribute("data-fp-omit"))continue;void 0!==a._flatpickr&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=G(a,i||{}),n.push(a._flatpickr)}catch(t){console.error(t)}}return 1===n.length?n[0]:n}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return z(this,t)},HTMLElement.prototype.flatpickr=function(t){return z([this],t)});var N=function(t,i){return"string"==typeof t?z(window.document.querySelectorAll(t),i):t instanceof Node?z([t],i):z(t,i)};N.defaultConfig={},N.l10ns={en:C({},h),default:C({},h)},N.localize=function(t){N.l10ns.default=C(C({},N.l10ns.default),t)},N.setDefaults=function(t){N.defaultConfig=C(C({},N.defaultConfig),t)},N.parseDate=R({}),N.formatDate=D({}),N.compareDates=O,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(t){return z(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof t?parseInt(t,10):t))},"undefined"!=typeof window&&(window.flatpickr=N);const B=class{constructor(i){t(this,i),this.picked=o(this,"picked",7),this.value=null,this.placeholder=salla.lang.get("blocks.buy_as_gift.select_send_date_and_time"),this.allowInput=!1,this.allowInvalidPreload=!1,this.altFormat="F j, Y",this.altInput=!1,this.appendTo=void 0,this.ariaDateFormat="F j, Y",this.autoFillDefaultTime=!0,this.clickOpens=!0,this.closeOnSelect=!0,this.dateFormat="Y-m-d",this.defaultHour=12,this.defaultMinute=0,this.defaultSeconds=0,this.disable=[],this.disableMobile=!1,this.enable=[()=>!0],this.enableSeconds=!1,this.enableTime=!1,this.hourIncrement=1,this.inline=!1,this.locale="en",this.maxDate=null,this.maxTime=null,this.minDate=null,this.minTime=null,this.minuteIncrement=5,this.mode="single",this.monthSelectorType="dropdown",this.nextArrow='<span class="sicon-keyboard_arrow_right"></span>',this.noCalendar=!1,this.position="auto",this.prevArrow='<span class="sicon-keyboard_arrow_left"></span>',this.shorthandCurrentMonth=!1,this.static=!1,this.showMonths=1,this.time_24hr=!1,this.weekNumbers=!1,this.wrap=!1}onInputChange(t){this.value=t.target.value,this.picked.emit(this.value)}componentDidLoad(){this.initPicker()}initPicker(){let t={allowInput:this.allowInput,allowInvalidPreload:this.allowInvalidPreload,altFormat:this.altFormat,altInput:this.altInput,altInputClass:this.altInputClass,appendTo:this.appendTo,ariaDateFormat:this.ariaDateFormat,autoFillDefaultTime:this.autoFillDefaultTime,clickOpens:this.clickOpens,closeOnSelect:this.closeOnSelect,conjunction:this.conjunction,dateFormat:this.dateFormat,defaultDate:this.value?Date.parse(this.value):this.defaultDate,defaultHour:this.defaultHour,defaultMinute:this.defaultMinute,defaultSeconds:this.defaultSeconds,disable:this.disable,disableMobile:this.disableMobile,enable:this.enable,enableSeconds:this.enableSeconds,enableTime:this.enableTime,formatDate:this.formatDate,hourIncrement:this.hourIncrement,inline:this.inline,locale:this.locale,maxDate:this.maxDate,maxTime:this.maxTime,minDate:this.minDate,minTime:this.minTime,minuteIncrement:this.minuteIncrement,mode:this.mode,monthSelectorType:this.monthSelectorType,nextArrow:this.nextArrow,noCalendar:this.noCalendar,onChange:this.onChange,onClose:this.onClose,onDayCreate:this.onDayCreate,onDestroy:this.onDestroy,onKeyDown:this.onKeyDown,onMonthChange:this.onMonthChange,onOpen:this.onOpen,onParseConfig:this.onParseConfig,onReady:this.onReady,onValueUpdate:this.onValueUpdate,onYearChange:this.onYearChange,parseDate:this.dateParser,position:this.position,positionElement:this.positionElement,prevArrow:this.prevArrow,shorthandCurrentMonth:this.shorthandCurrentMonth,static:this.static,showMonths:this.showMonths,time_24hr:this.time_24hr,weekNumbers:this.weekNumbers,wrap:this.wrap};N(this.dateInput,t)}render(){return i("div",{class:"s-datetime-picker"},i("input",{type:"datetime",class:"s-datetime-picker-input",ref:t=>this.dateInput=t,value:this.value,placeholder:this.placeholder,onInput:this.onInputChange.bind(this)}))}};B.style='.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}';var F=a((function(t,i){
5
- /*!
6
- * FilePond 4.30.4
7
- * Licensed under MIT, https://opensource.org/licenses/MIT/
8
- * Please visit https://pqina.nl/filepond/ for details.
9
- */
10
- !function(t){var i=function(t){return t instanceof HTMLElement},e=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=Object.assign({},t),o=[],a=[],r=function(){var t=[].concat(a);a.length=0,t.forEach((function(t){s(t.type,t.data)}))},s=function(t,i,e){!e||document.hidden?(p[t]&&p[t](i),o.push({type:t,data:i})):a.push({type:t,data:i})},l=function(t){for(var i,e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return u[t]?(i=u)[t].apply(i,n):null},c={getState:function(){return Object.assign({},n)},processActionQueue:function(){var t=[].concat(o);return o.length=0,t},processDispatchQueue:r,dispatch:s,query:l},u={};i.forEach((function(t){u=Object.assign({},t(n),{},u)}));var p={};return e.forEach((function(t){p=Object.assign({},t(s,l,n),{},p)})),c},n=function(t,i){for(var e in t)t.hasOwnProperty(e)&&i(e,t[e])},o=function(t){var i={};return n(t,(function(e){!function(t,i,e){"function"!=typeof e?Object.defineProperty(t,i,Object.assign({},e)):t[i]=e}(i,e,t[e])})),i},a=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===e)return t.getAttribute(i)||t.hasAttribute(i);t.setAttribute(i,e)},r="http://www.w3.org/2000/svg",s=["svg","path"],l=function(t){return s.includes(t)},c=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof i&&(e=i,i=null);var o=l(t)?document.createElementNS(r,t):document.createElement(t);return i&&(l(t)?a(o,"class",i):o.className=i),n(e,(function(t,i){a(o,t,i)})),o},u=function(t){return function(i,e){void 0!==e&&t.children[e]?t.insertBefore(i,t.children[e]):t.appendChild(i)}},p=function(t,i){return function(t,e){return void 0!==e?i.splice(e,0,t):i.push(t),t}},d=function(t,i){return function(e){return i.splice(i.indexOf(e),1),e.element.parentNode&&t.removeChild(e.element),e}},h="undefined"!=typeof window&&void 0!==window.document,f=function(){return h},g="children"in(f()?c("svg"):{})?function(t){return t.children.length}:function(t){return t.childNodes.length},_=function(t,i,e,n){var o=e[0]||t.left,a=e[1]||t.top,r=o+t.width,s=a+t.height*(n[1]||1),l={element:Object.assign({},t),inner:{left:t.left,top:t.top,right:t.right,bottom:t.bottom},outer:{left:o,top:a,right:r,bottom:s}};return i.filter((function(t){return!t.isRectIgnored()})).map((function(t){return t.rect})).forEach((function(t){m(l.inner,Object.assign({},t.inner)),m(l.outer,Object.assign({},t.outer))})),v(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,v(l.outer),l},m=function(t,i){i.top+=t.top,i.right+=t.left,i.bottom+=t.top,i.left+=t.left,i.bottom>t.bottom&&(t.bottom=i.bottom),i.right>t.right&&(t.right=i.right)},v=function(t){t.width=t.right-t.left,t.height=t.bottom-t.top},x=function(t){return"number"==typeof t},b=function(t,i,e){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(t-i)<n&&Math.abs(e)<n},w=function(t){return t<.5?2*t*t:(4-2*t)*t-1},y={spring:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.stiffness,e=void 0===i?.5:i,n=t.damping,a=void 0===n?.75:n,r=t.mass,s=void 0===r?10:r,l=null,c=null,u=0,p=!1,d=o({interpolate:function(t,i){if(!p){if(!x(l)||!x(c))return p=!0,void(u=0);b(c+=u+=-(c-l)*e/s,l,u*=a)||i?(u=0,p=!0,d.onupdate(c=l),d.oncomplete(c)):d.onupdate(c)}},target:{set:function(t){if(x(t)&&!x(c)&&(c=t),null===l&&(l=t,c=t),c===(l=t)||void 0===l)return p=!0,u=0,d.onupdate(c),void d.oncomplete(c);p=!1},get:function(){return l}},resting:{get:function(){return p}},onupdate:function(){},oncomplete:function(){}});return d},tween:function(){var t,i,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.duration,a=void 0===n?500:n,r=e.easing,s=void 0===r?w:r,l=e.delay,c=void 0===l?0:l,u=null,p=!0,d=!1,h=null,f=o({interpolate:function(e,n){p||null===h||(null===u&&(u=e),e-u<c||((t=e-u-c)>=a||n?(t=1,f.onupdate((i=d?0:1)*h),f.oncomplete(i*h),p=!0):(i=t/a,f.onupdate((t>=0?s(d?1-i:i):0)*h))))},target:{get:function(){return d?0:h},set:function(t){if(null===h)return h=t,f.onupdate(t),void f.oncomplete(t);t<h?(h=1,d=!0):(d=!1,h=t),p=!1,u=null}},resting:{get:function(){return p}},onupdate:function(){},oncomplete:function(){}});return f}},E=function(t,i,e){var n=t[i]&&"object"==typeof t[i][e]?t[i][e]:t[i]||t,o="string"==typeof n?n:n.type,a="object"==typeof n?Object.assign({},n):{};return y[o]?y[o](a):null},k=function(t,i,e){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(i=Array.isArray(i)?i:[i]).forEach((function(i){t.forEach((function(t){var o=t,a=function(){return e[t]},r=function(i){return e[t]=i};"object"==typeof t&&(o=t.key,a=t.getter||a,r=t.setter||r),i[o]&&!n||(i[o]={get:a,set:r})}))}))},I=function(t){return null!=t},T={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},A=function(t,i){if(Object.keys(t).length!==Object.keys(i).length)return!0;for(var e in i)if(i[e]!==t[e])return!0;return!1},M=function(t,i){var e=i.opacity,n=i.perspective,o=i.translateX,a=i.translateY,r=i.scaleX,s=i.scaleY,l=i.rotateX,c=i.rotateY,u=i.rotateZ,p=i.originX,d=i.originY,h=i.width,f=i.height,g="",_="";(I(p)||I(d))&&(_+="transform-origin: "+(p||0)+"px "+(d||0)+"px;"),I(n)&&(g+="perspective("+n+"px) "),(I(o)||I(a))&&(g+="translate3d("+(o||0)+"px, "+(a||0)+"px, 0) "),(I(r)||I(s))&&(g+="scale3d("+(I(r)?r:1)+", "+(I(s)?s:1)+", 1) "),I(u)&&(g+="rotateZ("+u+"rad) "),I(l)&&(g+="rotateX("+l+"rad) "),I(c)&&(g+="rotateY("+c+"rad) "),g.length&&(_+="transform:"+g+";"),I(e)&&(_+="opacity:"+e+";",0===e&&(_+="visibility:hidden;"),e<1&&(_+="pointer-events:none;")),I(f)&&(_+="height:"+f+"px;"),I(h)&&(_+="width:"+h+"px;");var m=t.elementCurrentStyle||"";_.length===m.length&&_===m||(t.style.cssText=_,t.elementCurrentStyle=_)},D={styles:function(t){var i=t.mixinConfig,e=t.viewProps,n=t.viewInternalAPI,o=t.viewExternalAPI,a=t.view,r=Object.assign({},e),s={};k(i,[n,o],e);var l=function(){return a.rect?_(a.rect,a.childViews,[e.translateX||0,e.translateY||0],[e.scaleX||0,e.scaleY||0]):null};return n.rect={get:l},o.rect={get:l},i.forEach((function(t){e[t]=void 0===r[t]?T[t]:r[t]})),{write:function(){if(A(s,e))return M(a.element,e),Object.assign(s,Object.assign({},e)),!0},destroy:function(){}}},listeners:function(t){var i,e=t.viewExternalAPI,n=t.view,o=[],a=(i=n.element,function(t,e){i.addEventListener(t,e)}),r=function(t){return function(i,e){t.removeEventListener(i,e)}}(n.element);return e.on=function(t,i){o.push({type:t,fn:i}),a(t,i)},e.off=function(t,i){o.splice(o.findIndex((function(e){return e.type===t&&e.fn===i})),1),r(t,i)},{write:function(){return!0},destroy:function(){o.forEach((function(t){r(t.type,t.fn)}))}}},animations:function(t){var i=t.mixinConfig,e=t.viewProps,o=t.viewInternalAPI,a=t.viewExternalAPI,r=Object.assign({},e),s=[];return n(i,(function(t,i){var n=E(i);n&&(n.onupdate=function(i){e[t]=i},n.target=r[t],k([{key:t,setter:function(t){n.target!==t&&(n.target=t)},getter:function(){return e[t]}}],[o,a],e,!0),s.push(n))})),{write:function(t){var i=document.hidden,e=!0;return s.forEach((function(n){n.resting||(e=!1),n.interpolate(t,i)})),e},destroy:function(){}}},apis:function(t){k(t.mixinConfig,t.viewExternalAPI,t.viewProps)}},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.layoutCalculated||(t.paddingTop=parseInt(e.paddingTop,10)||0,t.marginTop=parseInt(e.marginTop,10)||0,t.marginRight=parseInt(e.marginRight,10)||0,t.marginBottom=parseInt(e.marginBottom,10)||0,t.marginLeft=parseInt(e.marginLeft,10)||0,i.layoutCalculated=!0),t.left=i.offsetLeft||0,t.top=i.offsetTop||0,t.width=i.offsetWidth||0,t.height=i.offsetHeight||0,t.right=t.left+t.width,t.bottom=t.top+t.height,t.scrollTop=i.scrollTop,t.hidden=null===i.offsetParent,t},O=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.tag,e=void 0===i?"div":i,n=t.name,a=void 0===n?null:n,r=t.attributes,s=void 0===r?{}:r,l=t.read,h=void 0===l?function(){}:l,f=t.write,m=void 0===f?function(){}:f,v=t.create,x=void 0===v?function(){}:v,b=t.destroy,w=void 0===b?function(){}:b,y=t.filterFrameActionsForChild,E=void 0===y?function(t,i){return i}:y,k=t.didCreateView,I=void 0===k?function(){}:k,T=t.didWriteView,A=void 0===T?function(){}:T,M=t.ignoreRect,O=void 0!==M&&M,S=t.ignoreRectUpdate,L=void 0!==S&&S,C=t.mixins,P=void 0===C?[]:C;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c(e,"filepond--"+a,s),r=window.getComputedStyle(n,null),l=R(),f=null,v=!1,b=[],y=[],k={},T={},M=[m],S=[h],C=[w],G=function(){return n},z=function(){return b.concat()},N=function(t){return function(i,e){return i(t,e)}},B=function(){return f||(f=_(l,b,[0,0],[1,1]))},F=function(){f=null,b.forEach((function(t){return t._read()})),!(L&&l.width&&l.height)&&R(l,n,r);var t={root:q,props:i,rect:l};S.forEach((function(i){return i(t)}))},U=function(t,e,n){var o=0===e.length;return M.forEach((function(a){!1===a({props:i,root:q,actions:e,timestamp:t,shouldOptimize:n})&&(o=!1)})),y.forEach((function(i){!1===i.write(t)&&(o=!1)})),b.filter((function(t){return!!t.element.parentNode})).forEach((function(i){i._write(t,E(i,e),n)||(o=!1)})),b.forEach((function(i,a){i.element.parentNode||(q.appendChild(i.element,a),i._read(),i._write(t,E(i,e),n),o=!1)})),v=o,A({props:i,root:q,actions:e,timestamp:t}),o},j=function(){y.forEach((function(t){return t.destroy()})),C.forEach((function(t){t({root:q,props:i})})),b.forEach((function(t){return t._destroy()}))},H={element:{get:G},style:{get:function(){return r}},childViews:{get:z}},V=Object.assign({},H,{rect:{get:B},ref:{get:function(){return k}},is:function(t){return a===t},appendChild:u(n),createChildView:N(t),linkView:function(t){return b.push(t),t},unlinkView:function(t){b.splice(b.indexOf(t),1)},appendChildView:p(0,b),removeChildView:d(n,b),registerWriter:function(t){return M.push(t)},registerReader:function(t){return S.push(t)},registerDestroyer:function(t){return C.push(t)},invalidateLayout:function(){return n.layoutCalculated=!1},dispatch:t.dispatch,query:t.query}),W={element:{get:G},childViews:{get:z},rect:{get:B},resting:{get:function(){return v}},isRectIgnored:function(){return O},_read:F,_write:U,_destroy:j},Y=Object.assign({},H,{rect:{get:function(){return l}}});Object.keys(P).sort((function(t,i){return"styles"===t?1:"styles"===i?-1:0})).forEach((function(t){var e=D[t]({mixinConfig:P[t],viewProps:i,viewState:T,viewInternalAPI:V,viewExternalAPI:W,view:o(Y)});e&&y.push(e)}));var q=o(V);x({root:q,props:i});var $=g(n);return b.forEach((function(t,i){q.appendChild(t.element,$+i)})),I(q),o(W)}},S=function(t,i){return function(e){var n=e.root,o=e.props,a=e.actions,r=void 0===a?[]:a,s=e.timestamp,l=e.shouldOptimize;r.filter((function(i){return t[i.type]})).forEach((function(i){return t[i.type]({root:n,props:o,action:i.data,timestamp:s,shouldOptimize:l})})),i&&i({root:n,props:o,actions:r,timestamp:s,shouldOptimize:l})}},L=function(t,i){return i.parentNode.insertBefore(t,i)},C=function(t,i){return i.parentNode.insertBefore(t,i.nextSibling)},P=function(t){return Array.isArray(t)},G=function(t){return null==t},z=function(t){return t.trim()},N=function(t){return""+t},B=function(t){return"boolean"==typeof t},F=function(t){return B(t)?t:"true"===t},U=function(t){return"string"==typeof t},j=function(t){return x(t)?t:U(t)?N(t).replace(/[a-z]+/gi,""):0},H=function(t){return parseInt(j(t),10)},V=function(t){return parseFloat(j(t))},W=function(t){return x(t)&&isFinite(t)&&Math.floor(t)===t},Y=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(W(t))return t;var e=N(t).trim();return/MB$/i.test(e)?(e=e.replace(/MB$i/,"").trim(),H(e)*i*i):/KB/i.test(e)?(e=e.replace(/KB$i/,"").trim(),H(e)*i):H(e)},q=function(t){return"function"==typeof t},$={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Z=function(t,i,e,n,o){if(null===i)return null;if("function"==typeof i)return i;var a={url:"GET"===e||"PATCH"===e?"?"+t+"=":"",method:e,headers:o,withCredentials:!1,timeout:n,onload:null,ondata:null,onerror:null};if(U(i))return a.url=i,a;if(Object.assign(a,i),U(a.headers)){var r=a.headers.split(/:(.+)/);a.headers={header:r[0],value:r[1]}}return a.withCredentials=F(a.withCredentials),a},X=function(t){return"object"==typeof t&&null!==t},K=function(t){return P(t)?"array":function(t){return null===t}(t)?"null":W(t)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(t)?"bytes":function(t){return X(t)&&U(t.url)&&X(t.process)&&X(t.revert)&&X(t.restore)&&X(t.fetch)}(t)?"api":typeof t},Q={array:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return G(t)?[]:P(t)?t:N(t).split(i).map(z).filter((function(t){return t.length}))},boolean:F,int:function(t){return"bytes"===K(t)?Y(t):H(t)},number:V,float:V,bytes:Y,string:function(t){return q(t)?t:N(t)},function:function(t){return function(t){for(var i=self,e=t.split("."),n=null;n=e.shift();)if(!(i=i[n]))return null;return i}(t)},serverapi:function(t){return(e={}).url=U(i=t)?i:i.url||"",e.timeout=i.timeout?parseInt(i.timeout,10):0,e.headers=i.headers?i.headers:{},n($,(function(t){e[t]=Z(t,i[t],$[t],e.timeout,e.headers)})),e.process=i.process||U(i)||i.url?e.process:null,e.remove=i.remove||null,delete e.headers,e;var i,e},object:function(t){try{return JSON.parse(t.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(t){return null}}},J=function(t,i,e){if(t===i)return t;var n=K(t);if(n!==e){var o=Q[e](t);if(n=K(o),null===o)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+e+'"';t=o}return t},tt=function(t){var i={};return n(t,(function(e){var n,o,a,r=t[e];i[e]=(o=r[1],a=n=r[0],{enumerable:!0,get:function(){return a},set:function(t){a=J(t,n,o)}})})),o(i)},it=function(t){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:tt(t)}},et=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return t.split(/(?=[A-Z])/).map((function(t){return t.toLowerCase()})).join(i)},nt=function(t,i){var e={};return n(i,(function(i){e[i]={get:function(){return t.getState().options[i]},set:function(e){t.dispatch("SET_"+et(i,"_").toUpperCase(),{value:e})}}})),e},ot=function(t){return function(i,e,o){var a={};return n(t,(function(t){var e=et(t,"_").toUpperCase();a["SET_"+e]=function(n){try{o.options[t]=n.value}catch(t){}i("DID_SET_"+e,{value:o.options[t]})}})),a}},at=function(t){return function(i){var e={};return n(t,(function(t){e["GET_"+et(t,"_").toUpperCase()]=function(){return i.options[t]}})),e}},rt=1,st=2,lt=3,ct=4,ut=5,pt=function(){return Math.random().toString(36).substring(2,11)};function dt(t,i){if(null==t)return{};var e,n,o=function(t,i){if(null==t)return{};var e,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)i.indexOf(e=a[n])>=0||(o[e]=t[e]);return o}(t,i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)i.indexOf(e=a[n])>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function ht(t){return function(t){if(Array.isArray(t)){for(var i=0,e=new Array(t.length);i<t.length;i++)e[i]=t[i];return e}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ft,gt,_t=function(t,i){return t.splice(i,1)},mt=function(){var t=[],i=function(i,e){_t(t,t.findIndex((function(t){return t.event===i&&(t.cb===e||!e)})))},e=function(i,e,n){t.filter((function(t){return t.event===i})).map((function(t){return t.cb})).forEach((function(t){return function(t,i){i?t():document.hidden?Promise.resolve(1).then(t):setTimeout(t,0)}((function(){return t.apply(void 0,ht(e))}),n)}))};return{fireSync:function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e(t,n,!0)},fire:function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e(t,n,!1)},on:function(i,e){t.push({event:i,cb:e})},onOnce:function(e,n){t.push({event:e,cb:function(){i(e,n),n.apply(void 0,arguments)}})},off:i}},vt=function(t,i,e){Object.getOwnPropertyNames(t).filter((function(t){return!e.includes(t)})).forEach((function(e){return Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))}))},xt=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],bt=function(t){var i={};return vt(t,i,xt),i},wt=function(t){t.forEach((function(i,e){i.released&&_t(t,e)}))},yt={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},Et={INPUT:1,LIMBO:2,LOCAL:3},kt=function(t){return/[^0-9]+/.exec(t)},It=function(){return kt(1.1.toLocaleString())[0]},Tt={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},At=[],Mt=function(t,i,e){return new Promise((function(n,o){var a=At.filter((function(i){return i.key===t})).map((function(t){return t.cb}));if(0!==a.length){var r=a.shift();a.reduce((function(t,i){return t.then((function(t){return i(t,e)}))}),r(i,e)).then((function(t){return n(t)})).catch((function(t){return o(t)}))}else n(i)}))},Dt=function(t,i,e){return At.filter((function(i){return i.key===t})).map((function(t){return t.cb(i,e)}))},Rt=function(t,i){return At.push({key:t,cb:i})},Ot=function(){return Object.assign({},St)},St={id:[null,Tt.STRING],name:["filepond",Tt.STRING],disabled:[!1,Tt.BOOLEAN],className:[null,Tt.STRING],required:[!1,Tt.BOOLEAN],captureMethod:[null,Tt.STRING],allowSyncAcceptAttribute:[!0,Tt.BOOLEAN],allowDrop:[!0,Tt.BOOLEAN],allowBrowse:[!0,Tt.BOOLEAN],allowPaste:[!0,Tt.BOOLEAN],allowMultiple:[!1,Tt.BOOLEAN],allowReplace:[!0,Tt.BOOLEAN],allowRevert:[!0,Tt.BOOLEAN],allowRemove:[!0,Tt.BOOLEAN],allowProcess:[!0,Tt.BOOLEAN],allowReorder:[!1,Tt.BOOLEAN],allowDirectoriesOnly:[!1,Tt.BOOLEAN],storeAsFile:[!1,Tt.BOOLEAN],forceRevert:[!1,Tt.BOOLEAN],maxFiles:[null,Tt.INT],checkValidity:[!1,Tt.BOOLEAN],itemInsertLocationFreedom:[!0,Tt.BOOLEAN],itemInsertLocation:["before",Tt.STRING],itemInsertInterval:[75,Tt.INT],dropOnPage:[!1,Tt.BOOLEAN],dropOnElement:[!0,Tt.BOOLEAN],dropValidation:[!1,Tt.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],Tt.ARRAY],instantUpload:[!0,Tt.BOOLEAN],maxParallelUploads:[2,Tt.INT],allowMinimumUploadDuration:[!0,Tt.BOOLEAN],chunkUploads:[!1,Tt.BOOLEAN],chunkForce:[!1,Tt.BOOLEAN],chunkSize:[5e6,Tt.INT],chunkRetryDelays:[[500,1e3,3e3],Tt.ARRAY],server:[null,Tt.SERVER_API],fileSizeBase:[1e3,Tt.INT],labelFileSizeBytes:["bytes",Tt.STRING],labelFileSizeKilobytes:["KB",Tt.STRING],labelFileSizeMegabytes:["MB",Tt.STRING],labelFileSizeGigabytes:["GB",Tt.STRING],labelDecimalSeparator:[It(),Tt.STRING],labelThousandsSeparator:[(ft=It(),gt=1e3.toLocaleString(),gt!==1e3.toString()?kt(gt)[0]:"."===ft?",":"."),Tt.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',Tt.STRING],labelInvalidField:["Field contains invalid files",Tt.STRING],labelFileWaitingForSize:["Waiting for size",Tt.STRING],labelFileSizeNotAvailable:["Size not available",Tt.STRING],labelFileCountSingular:["file in list",Tt.STRING],labelFileCountPlural:["files in list",Tt.STRING],labelFileLoading:["Loading",Tt.STRING],labelFileAdded:["Added",Tt.STRING],labelFileLoadError:["Error during load",Tt.STRING],labelFileRemoved:["Removed",Tt.STRING],labelFileRemoveError:["Error during remove",Tt.STRING],labelFileProcessing:["Uploading",Tt.STRING],labelFileProcessingComplete:["Upload complete",Tt.STRING],labelFileProcessingAborted:["Upload cancelled",Tt.STRING],labelFileProcessingError:["Error during upload",Tt.STRING],labelFileProcessingRevertError:["Error during revert",Tt.STRING],labelTapToCancel:["tap to cancel",Tt.STRING],labelTapToRetry:["tap to retry",Tt.STRING],labelTapToUndo:["tap to undo",Tt.STRING],labelButtonRemoveItem:["Remove",Tt.STRING],labelButtonAbortItemLoad:["Abort",Tt.STRING],labelButtonRetryItemLoad:["Retry",Tt.STRING],labelButtonAbortItemProcessing:["Cancel",Tt.STRING],labelButtonUndoItemProcessing:["Undo",Tt.STRING],labelButtonRetryItemProcessing:["Retry",Tt.STRING],labelButtonProcessItem:["Upload",Tt.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',Tt.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',Tt.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',Tt.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',Tt.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',Tt.STRING],oninit:[null,Tt.FUNCTION],onwarning:[null,Tt.FUNCTION],onerror:[null,Tt.FUNCTION],onactivatefile:[null,Tt.FUNCTION],oninitfile:[null,Tt.FUNCTION],onaddfilestart:[null,Tt.FUNCTION],onaddfileprogress:[null,Tt.FUNCTION],onaddfile:[null,Tt.FUNCTION],onprocessfilestart:[null,Tt.FUNCTION],onprocessfileprogress:[null,Tt.FUNCTION],onprocessfileabort:[null,Tt.FUNCTION],onprocessfilerevert:[null,Tt.FUNCTION],onprocessfile:[null,Tt.FUNCTION],onprocessfiles:[null,Tt.FUNCTION],onremovefile:[null,Tt.FUNCTION],onpreparefile:[null,Tt.FUNCTION],onupdatefiles:[null,Tt.FUNCTION],onreorderfiles:[null,Tt.FUNCTION],beforeDropFile:[null,Tt.FUNCTION],beforeAddFile:[null,Tt.FUNCTION],beforeRemoveFile:[null,Tt.FUNCTION],beforePrepareFile:[null,Tt.FUNCTION],stylePanelLayout:[null,Tt.STRING],stylePanelAspectRatio:[null,Tt.STRING],styleItemPanelAspectRatio:[null,Tt.STRING],styleButtonRemoveItemPosition:["left",Tt.STRING],styleButtonProcessItemPosition:["right",Tt.STRING],styleLoadIndicatorPosition:["right",Tt.STRING],styleProgressIndicatorPosition:["right",Tt.STRING],styleButtonRemoveItemAlign:[!1,Tt.BOOLEAN],files:[[],Tt.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],Tt.ARRAY]},Lt=function(t,i){return G(i)?t[0]||null:W(i)?t[i]||null:("object"==typeof i&&(i=i.id),t.find((function(t){return t.id===i}))||null)},Ct=function(t){if(G(t))return t;if(/:/.test(t)){var i=t.split(":");return i[1]/i[0]}return parseFloat(t)},Pt=function(t){return t.filter((function(t){return!t.archived}))},Gt={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},zt=null,Nt=[yt.LOAD_ERROR,yt.PROCESSING_ERROR,yt.PROCESSING_REVERT_ERROR],Bt=[yt.LOADING,yt.PROCESSING,yt.PROCESSING_QUEUED,yt.INIT],Ft=[yt.PROCESSING_COMPLETE],Ut=function(t){return Nt.includes(t.status)},jt=function(t){return Bt.includes(t.status)},Ht=function(t){return Ft.includes(t.status)},Vt=function(t){return X(t.options.server)&&(X(t.options.server.process)||q(t.options.server.process))},Wt=function(t){return{GET_STATUS:function(){var i=Pt(t.items),e=Gt.ERROR,n=Gt.BUSY,o=Gt.IDLE,a=Gt.READY;return 0===i.length?Gt.EMPTY:i.some(Ut)?e:i.some(jt)?n:i.some(Ht)?a:o},GET_ITEM:function(i){return Lt(t.items,i)},GET_ACTIVE_ITEM:function(i){return Lt(Pt(t.items),i)},GET_ACTIVE_ITEMS:function(){return Pt(t.items)},GET_ITEMS:function(){return t.items},GET_ITEM_NAME:function(i){var e=Lt(t.items,i);return e?e.filename:null},GET_ITEM_SIZE:function(i){var e=Lt(t.items,i);return e?e.fileSize:null},GET_STYLES:function(){return Object.keys(t.options).filter((function(t){return/^style/.test(t)})).map((function(i){return{name:i,value:t.options[i]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(t.options.stylePanelLayout)?1:Ct(t.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return t.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(i){return Pt(t.items).filter((function(t){return t.status===i}))},GET_TOTAL_ITEMS:function(){return Pt(t.items).length},SHOULD_UPDATE_FILE_INPUT:function(){return t.options.storeAsFile&&function(){if(null===zt)try{var t=new DataTransfer;t.items.add(new File(["hello world"],"This_Works.txt"));var i=document.createElement("input");i.setAttribute("type","file"),i.files=t.files,zt=1===i.files.length}catch(t){zt=!1}return zt}()&&!Vt(t)},IS_ASYNC:function(){return Vt(t)},GET_FILE_SIZE_LABELS:function(t){return{labelBytes:t("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:t("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:t("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:t("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0}}}},Yt=function(t,i,e){return Math.max(Math.min(e,t),i)},qt=function(t){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(t)},$t=function(t){return t.split("/").pop().split("?").shift()},Zt=function(t){return t.split(".").pop()},Xt=function(t){if("string"!=typeof t)return"";var i=t.split("/").pop();return/svg/.test(i)?"svg":/zip|compressed/.test(i)?"zip":/plain/.test(i)?"txt":/msword/.test(i)?"doc":/[a-z]+/.test(i)?"jpeg"===i?"jpg":i:""},Kt=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(i+t).slice(-i.length)},Qt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return t.getFullYear()+"-"+Kt(t.getMonth()+1,"00")+"-"+Kt(t.getDate(),"00")+"_"+Kt(t.getHours(),"00")+"-"+Kt(t.getMinutes(),"00")+"-"+Kt(t.getSeconds(),"00")},Jt=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=t.slice(0,t.size,"string"==typeof e?e:t.type);return o.lastModifiedDate=new Date,t._relativePath&&(o._relativePath=t._relativePath),U(i)||(i=Qt()),i&&null===n&&Zt(i)?o.name=i:(n=n||Xt(o.type),o.name=i+(n?"."+n:"")),o},ti=function(t,i){var e=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(e){var n=new e;return n.append(t),n.getBlob(i)}return new Blob([t],{type:i})},ii=function(t){return(/^data:(.+);/.exec(t)||[])[1]||null},ei=function(t){var i=ii(t);return function(t,i){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return ti(e,i)}(function(t){return atob(function(t){return t.split(",")[1].replace(/\s/g,"")}(t))}(t),i)},ni=function(t){if(!/^content-disposition:/i.test(t))return null;var i=t.split(/filename=|filename\*=.+''/).splice(1).map((function(t){return t.trim().replace(/^["']|[;"']{0,2}$/g,"")})).filter((function(t){return t.length}));return i.length?decodeURI(i[i.length-1]):null},oi=function(t){if(/content-length:/i.test(t)){var i=t.match(/[0-9]+/)[0];return i?parseInt(i,10):null}return null},ai=function(t){return/x-content-transfer-id:/i.test(t)&&(t.split(":")[1]||"").trim()||null},ri=function(t){var i={source:null,name:null,size:null},e=t.split("\n"),n=!0,o=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var l=r.value,c=ni(l);if(c)i.name=c;else{var u=oi(l);if(u)i.size=u;else{var p=ai(l);p&&(i.source=p)}}}}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return i},si=function(t){var i={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},e=function(e){t?(i.timestamp=Date.now(),i.request=t(e,(function(t){i.duration=Date.now()-i.timestamp,i.complete=!0,t instanceof Blob&&(t=Jt(t,t.name||$t(e))),n.fire("load",t instanceof Blob?t:t?t.body:null)}),(function(t){n.fire("error","string"==typeof t?{type:"error",code:0,body:t}:t)}),(function(t,e,o){o&&(i.size=o),i.duration=Date.now()-i.timestamp,t?(i.progress=e/o,n.fire("progress",i.progress)):i.progress=null}),(function(){n.fire("abort")}),(function(t){var e=ri("string"==typeof t?t:t.headers);n.fire("meta",{size:i.size||e.size,filename:e.name,source:e.source})}))):n.fire("error",{type:"error",body:"Can't load URL",code:400})},n=Object.assign({},mt(),{setSource:function(t){return i.source=t},getProgress:function(){return i.progress},abort:function(){i.request&&i.request.abort&&i.request.abort()},load:function(){var t,o,a=i.source;n.fire("init",a),a instanceof File?n.fire("load",a):a instanceof Blob?n.fire("load",Jt(a,a.name)):qt(a)?n.fire("load",Jt(ei(a),t,null,o)):e(a)}});return n},li=function(t){return/GET|HEAD/.test(t)},ci=function(t,i,e){var n={onheaders:function(){},onprogress:function(){},onload:function(){},ontimeout:function(){},onerror:function(){},onabort:function(){},abort:function(){o=!0,r.abort()}},o=!1,a=!1;e=Object.assign({method:"POST",headers:{},withCredentials:!1},e),i=encodeURI(i),li(e.method)&&t&&(i=""+i+encodeURIComponent("string"==typeof t?t:JSON.stringify(t)));var r=new XMLHttpRequest;return(li(e.method)?r:r.upload).onprogress=function(t){o||n.onprogress(t.lengthComputable,t.loaded,t.total)},r.onreadystatechange=function(){r.readyState<2||4===r.readyState&&0===r.status||a||(a=!0,n.onheaders(r))},r.onload=function(){r.status>=200&&r.status<300?n.onload(r):n.onerror(r)},r.onerror=function(){return n.onerror(r)},r.onabort=function(){o=!0,n.onabort()},r.ontimeout=function(){return n.ontimeout(r)},r.open(e.method,i,!0),W(e.timeout)&&(r.timeout=e.timeout),Object.keys(e.headers).forEach((function(t){var i=unescape(encodeURIComponent(e.headers[t]));r.setRequestHeader(t,i)})),e.responseType&&(r.responseType=e.responseType),e.withCredentials&&(r.withCredentials=!0),r.send(t),n},ui=function(t,i,e,n){return{type:t,code:i,body:e,headers:n}},pi=function(t){return function(i){t(ui("error",0,"Timeout",i.getAllResponseHeaders()))}},di=function(t){return/\?/.test(t)},hi=function(){for(var t="",i=arguments.length,e=new Array(i),n=0;n<i;n++)e[n]=arguments[n];return e.forEach((function(i){t+=di(t)&&di(i)?i.replace(/\?/,"&"):i})),t},fi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0;if("function"==typeof i)return i;if(!i||!U(i.url))return null;var e=i.onload||function(t){return t},n=i.onerror||function(){return null};return function(o,a,r,s,l,c){var u=ci(o,hi(t,i.url),Object.assign({},i,{responseType:"blob"}));return u.onload=function(t){var n=t.getAllResponseHeaders(),r=ri(n).name||$t(o);a(ui("load",t.status,"HEAD"===i.method?null:Jt(e(t.response),r),n))},u.onerror=function(t){r(ui("error",t.status,n(t.response)||t.statusText,t.getAllResponseHeaders()))},u.onheaders=function(t){c(ui("headers",t.status,null,t.getAllResponseHeaders()))},u.ontimeout=pi(r),u.onprogress=s,u.onabort=l,u}},gi=0,_i=1,mi=2,vi=3,xi=4,bi=function(t,i,e,n,o,a,r,s,l,c,u){for(var p=[],d=u.chunkServer,h=u.chunkSize,f=u.chunkRetryDelays,g={serverId:u.chunkTransferId,aborted:!1},_=i.ondata||function(t){return t},m=i.onload||function(t,i){return"HEAD"===i?t.getResponseHeader("Upload-Offset"):t.response},v=i.onerror||function(){return null},x=Math.floor(n.size/h),b=0;b<=x;b++){var w=b*h,y=n.slice(w,w+h,"application/offset+octet-stream");p[b]={index:b,size:y.size,offset:w,data:y,file:n,progress:0,retries:ht(f),status:gi,error:null,request:null,timeout:null}}var E,k,I,T,A=function(t){return t.status===gi||t.status===vi},M=function(i){if(!g.aborted)if(i=i||p.find(A)){i.status=mi,i.progress=null;var e=d.ondata||function(t){return t},o=d.onerror||function(){return null},s=hi(t,d.url,g.serverId),c="function"==typeof d.headers?d.headers(i):Object.assign({},d.headers,{"Content-Type":"application/offset+octet-stream","Upload-Offset":i.offset,"Upload-Length":n.size,"Upload-Name":n.name}),u=i.request=ci(e(i.data),s,Object.assign({},d,{headers:c}));u.onload=function(){i.status=_i,i.request=null,O()},u.onprogress=function(t,e){i.progress=t?e:null,R()},u.onerror=function(t){i.status=vi,i.request=null,i.error=o(t.response)||t.statusText,D(i)||r(ui("error",t.status,o(t.response)||t.statusText,t.getAllResponseHeaders()))},u.ontimeout=function(t){i.status=vi,i.request=null,D(i)||pi(r)(t)},u.onabort=function(){i.status=gi,i.request=null,l()}}else p.every((function(t){return t.status===_i}))&&a(g.serverId)},D=function(t){return 0!==t.retries.length&&(t.status=xi,clearTimeout(t.timeout),t.timeout=setTimeout((function(){M(t)}),t.retries.shift()),!0)},R=function(){var t=p.reduce((function(t,i){return null===t||null===i.progress?null:t+i.progress}),0);if(null===t)return s(!1,0,0);var i=p.reduce((function(t,i){return t+i.size}),0);s(!0,t,i)},O=function(){p.filter((function(t){return t.status===mi})).length>=1||M()};return g.serverId?(E=function(t){g.aborted||(p.filter((function(i){return i.offset<t})).forEach((function(t){t.status=_i,t.progress=t.size})),O())},k=hi(t,d.url,g.serverId),I={headers:"function"==typeof i.headers?i.headers(g.serverId):Object.assign({},i.headers),method:"HEAD"},(T=ci(null,k,I)).onload=function(t){return E(m(t,I.method))},T.onerror=function(t){return r(ui("error",t.status,v(t.response)||t.statusText,t.getAllResponseHeaders()))},T.ontimeout=pi(r)):function(a){var s=new FormData;X(o)&&s.append(e,JSON.stringify(o));var l="function"==typeof i.headers?i.headers(n,o):Object.assign({},i.headers,{"Upload-Length":n.size}),c=Object.assign({},i,{headers:l}),u=ci(_(s),hi(t,i.url),c);u.onload=function(t){return a(m(t,c.method))},u.onerror=function(t){return r(ui("error",t.status,v(t.response)||t.statusText,t.getAllResponseHeaders()))},u.ontimeout=pi(r)}((function(t){g.aborted||(c(t),g.serverId=t,O())})),{abort:function(){g.aborted=!0,p.forEach((function(t){clearTimeout(t.timeout),t.request&&t.request.abort()}))}}},wi=function(t,i,e,n){return function(o,a,r,s,l,c,u){if(o){var p=n.chunkUploads;if(o instanceof Blob&&p&&(p&&o.size>n.chunkSize||n.chunkForce))return bi(t,i,e,o,a,r,s,l,c,u,n);var d=i.ondata||function(t){return t},h=i.onload||function(t){return t},f=i.onerror||function(){return null},g="function"==typeof i.headers?i.headers(o,a)||{}:Object.assign({},i.headers),_=Object.assign({},i,{headers:g}),m=new FormData;X(a)&&m.append(e,JSON.stringify(a)),(o instanceof Blob?[{name:null,file:o}]:o).forEach((function(t){m.append(e,t.file,null===t.name?t.file.name:""+t.name+t.file.name)}));var v=ci(d(m),hi(t,i.url),_);return v.onload=function(t){r(ui("load",t.status,h(t.response),t.getAllResponseHeaders()))},v.onerror=function(t){s(ui("error",t.status,f(t.response)||t.statusText,t.getAllResponseHeaders()))},v.ontimeout=pi(s),v.onprogress=l,v.onabort=c,v}}},yi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0;if("function"==typeof i)return i;if(!i||!U(i.url))return function(t,i){return i()};var e=i.onload||function(t){return t},n=i.onerror||function(){return null};return function(o,a,r){var s=ci(o,t+i.url,i);return s.onload=function(t){a(ui("load",t.status,e(t.response),t.getAllResponseHeaders()))},s.onerror=function(t){r(ui("error",t.status,n(t.response)||t.statusText,t.getAllResponseHeaders()))},s.ontimeout=pi(r),s}},Ei=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t+Math.random()*(i-t)},ki=function(t,i){var e={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=i.allowMinimumUploadDuration,o=function(){e.request&&(e.perceivedPerformanceUpdater.clear(),e.request.abort&&e.request.abort(),e.complete=!0)},a=n?function(){return e.progress?Math.min(e.progress,e.perceivedProgress):null}:function(){return e.progress||null},r=n?function(){return Math.min(e.duration,e.perceivedDuration)}:function(){return e.duration},s=Object.assign({},mt(),{process:function(i,o){var a=function(){0!==e.duration&&null!==e.progress&&s.fire("progress",s.getProgress())},r=function(){e.complete=!0,s.fire("load-perceived",e.response.body)};s.fire("start"),e.timestamp=Date.now(),e.perceivedPerformanceUpdater=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=null,a=Date.now();return i>0&&function r(){var s=Date.now()-a,l=Ei(e,n);s+l>i&&(l=s+l-i);var c=s/i;c>=1||document.hidden?t(1):(t(c),o=setTimeout(r,l))}(),{clear:function(){clearTimeout(o)}}}((function(t){e.perceivedProgress=t,e.perceivedDuration=Date.now()-e.timestamp,a(),e.response&&1===e.perceivedProgress&&!e.complete&&r()}),n?Ei(750,1500):0),e.request=t(i,o,(function(t){e.response=X(t)?t:{type:"load",code:200,body:""+t,headers:{}},e.duration=Date.now()-e.timestamp,e.progress=1,s.fire("load",e.response.body),(!n||n&&1===e.perceivedProgress)&&r()}),(function(t){e.perceivedPerformanceUpdater.clear(),s.fire("error",X(t)?t:{type:"error",code:0,body:""+t})}),(function(t,i,n){e.duration=Date.now()-e.timestamp,e.progress=t?i/n:null,a()}),(function(){e.perceivedPerformanceUpdater.clear(),s.fire("abort",e.response?e.response.body:null)}),(function(t){s.fire("transfer",t)}))},abort:o,getProgress:a,getDuration:r,reset:function(){o(),e.complete=!1,e.perceivedProgress=0,e.progress=0,e.timestamp=null,e.perceivedDuration=0,e.duration=0,e.request=null,e.response=null}});return s},Ii=function(t){return t.substring(0,t.lastIndexOf("."))||t},Ti=function(t){var i=[t.name,t.size,t.type];return t instanceof Blob||qt(t)?i[0]=t.name||Qt():qt(t)?(i[1]=t.length,i[2]=ii(t)):U(t)&&(i[0]=$t(t),i[1]=0,i[2]="application/octet-stream"),{name:i[0],size:i[1],type:i[2]}},Ai=function(t){return!!(t instanceof File||t instanceof Blob&&t.name)},Mi=function t(i){if(!X(i))return i;var e=P(i)?[]:{};for(var n in i)if(i.hasOwnProperty(n)){var o=i[n];e[n]=o&&X(o)?t(o):o}return e},Di=function(t,i){var e=function(t,i){return G(i)?0:U(i)?t.findIndex((function(t){return t.id===i})):-1}(t,i);if(!(e<0))return t[e]||null},Ri=function(t,i,e,n,o,a){var r=ci(null,t,{method:"GET",responseType:"blob"});return r.onload=function(e){var n=e.getAllResponseHeaders(),o=ri(n).name||$t(t);i(ui("load",e.status,Jt(e.response,o),n))},r.onerror=function(t){e(ui("error",t.status,t.statusText,t.getAllResponseHeaders()))},r.onheaders=function(t){a(ui("headers",t.status,null,t.getAllResponseHeaders()))},r.ontimeout=pi(e),r.onprogress=n,r.onabort=o,r},Oi=function(t){return 0===t.indexOf("//")&&(t=location.protocol+t),t.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},Si=function(t){return function(){return q(t)?t.apply(void 0,arguments):t}},Li=function(t,i){clearTimeout(i.listUpdateTimeout),i.listUpdateTimeout=setTimeout((function(){t("DID_UPDATE_ITEMS",{items:Pt(i.items)})}),0)},Ci=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];return new Promise((function(i){if(!t)return i(!0);var n=t.apply(void 0,e);return null==n?i(!0):"boolean"==typeof n?i(n):void("function"==typeof n.then&&n.then(i))}))},Pi=function(t,i){t.items.sort((function(t,e){return i(bt(t),bt(e))}))},Gi=function(t,i){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,o=e.success,a=void 0===o?function(){}:o,r=e.failure,s=void 0===r?function(){}:r,l=dt(e,["query","success","failure"]),c=Lt(t.items,n);c?i(c,a,s,l||{}):s({error:ui("error",0,"Item not found"),file:null})}},zi=function(t,i,e){return{ABORT_ALL:function(){Pt(e.items).forEach((function(t){t.freeze(),t.abortLoad(),t.abortProcessing()}))},DID_SET_FILES:function(i){var n=i.value,o=(void 0===n?[]:n).map((function(t){return{source:t.source?t.source:t,options:t.options}})),a=Pt(e.items);a.forEach((function(i){o.find((function(t){return t.source===i.source||t.source===i.file}))||t("REMOVE_ITEM",{query:i,remove:!1})})),a=Pt(e.items),o.forEach((function(i,e){a.find((function(t){return t.source===i.source||t.file===i.source}))||t("ADD_ITEM",Object.assign({},i,{interactionMethod:ut,index:e}))}))},DID_UPDATE_ITEM_METADATA:function(n){var o=n.id,a=n.action,r=n.change;r.silent||(clearTimeout(e.itemUpdateTimeout),e.itemUpdateTimeout=setTimeout((function(){var n,s=Di(e.items,o);if(i("IS_ASYNC")){s.origin===Et.LOCAL&&t("DID_LOAD_ITEM",{id:s.id,error:null,serverFileReference:s.source});var l=function(){setTimeout((function(){t("REQUEST_ITEM_PROCESSING",{query:o})}),32)};return s.status===yt.PROCESSING_COMPLETE?(n=e.options.instantUpload,void s.revert(yi(e.options.server.url,e.options.server.revert),i("GET_FORCE_REVERT")).then(n?l:function(){}).catch((function(){}))):s.status===yt.PROCESSING?function(t){s.abortProcessing().then(t?l:function(){})}(e.options.instantUpload):void(e.options.instantUpload&&l())}Mt("SHOULD_PREPARE_OUTPUT",!1,{item:s,query:i,action:a,change:r}).then((function(e){var n=i("GET_BEFORE_PREPARE_FILE");n&&(e=n(s,e)),e&&t("REQUEST_PREPARE_OUTPUT",{query:o,item:s,success:function(i){t("DID_PREPARE_OUTPUT",{id:o,file:i})}},!0)}))}),0))},MOVE_ITEM:function(t){var i=t.index,n=Lt(e.items,t.query);if(n){var o=e.items.indexOf(n);o!==(i=Yt(i,0,e.items.length-1))&&e.items.splice(i,0,e.items.splice(o,1)[0])}},SORT:function(n){Pi(e,n.compare),t("DID_SORT_ITEMS",{items:i("GET_ACTIVE_ITEMS")})},ADD_ITEMS:function(e){var n=e.items,o=e.index,a=e.interactionMethod,r=e.success,s=void 0===r?function(){}:r,l=e.failure,c=void 0===l?function(){}:l,u=o;if(-1===o||void 0===o){var p=i("GET_ITEM_INSERT_LOCATION"),d=i("GET_TOTAL_ITEMS");u="before"===p?0:d}var h=i("GET_IGNORED_FILES"),f=n.filter((function(t){return Ai(t)?!h.includes(t.name.toLowerCase()):!G(t)})).map((function(i){return new Promise((function(e,n){t("ADD_ITEM",{interactionMethod:a,source:i.source||i,success:e,failure:n,index:u++,options:i.options||{}})}))}));Promise.all(f).then(s).catch(c)},ADD_ITEM:function(n){var a=n.source,r=n.index,s=void 0===r?-1:r,l=n.interactionMethod,c=n.success,u=void 0===c?function(){}:c,p=n.failure,d=void 0===p?function(){}:p,h=n.options,f=void 0===h?{}:h;if(G(a))d({error:ui("error",0,"No source"),file:null});else if(!Ai(a)||!e.options.ignoredFiles.includes(a.name.toLowerCase())){if(!function(t){var i=Pt(t.items).length;if(!t.options.allowMultiple)return 0===i;var e=t.options.maxFiles;return null===e||i<e}(e)){if(e.options.allowMultiple||!e.options.allowMultiple&&!e.options.allowReplace){var g=ui("warning",0,"Max files");return t("DID_THROW_MAX_FILES",{source:a,error:g}),void d({error:g,file:null})}var _=Pt(e.items)[0];if(_.status===yt.PROCESSING_COMPLETE||_.status===yt.PROCESSING_REVERT_ERROR){var m=i("GET_FORCE_REVERT");if(_.revert(yi(e.options.server.url,e.options.server.revert),m).then((function(){m&&t("ADD_ITEM",{source:a,index:s,interactionMethod:l,success:u,failure:d,options:f})})).catch((function(){})),m)return}t("REMOVE_ITEM",{query:_.id})}var v="local"===f.type?Et.LOCAL:"limbo"===f.type?Et.LIMBO:Et.INPUT,x=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=pt(),a={archived:!1,frozen:!1,released:!1,source:null,file:e,serverFileReference:i,transferId:null,processingAborted:!1,status:i?yt.PROCESSING_COMPLETE:yt.INIT,activeLoader:null,activeProcessor:null},r=null,s={},l=function(t){return a.status=t},c=function(t){if(!a.released&&!a.frozen){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];d.fire.apply(d,[t].concat(e))}},u=function t(i,e){if(a.processingAborted)a.processingAborted=!1;else if(l(yt.PROCESSING),r=null,a.file instanceof Blob){i.on("load",(function(t){a.transferId=null,a.serverFileReference=t})),i.on("transfer",(function(t){a.transferId=t})),i.on("load-perceived",(function(t){a.activeProcessor=null,a.transferId=null,a.serverFileReference=t,l(yt.PROCESSING_COMPLETE),c("process-complete",t)})),i.on("start",(function(){c("process-start")})),i.on("error",(function(t){a.activeProcessor=null,l(yt.PROCESSING_ERROR),c("process-error",t)})),i.on("abort",(function(t){a.activeProcessor=null,a.serverFileReference=t,l(yt.IDLE),c("process-abort"),r&&r()})),i.on("progress",(function(t){c("process-progress",t)}));var n=console.error;e(a.file,(function(t){a.archived||i.process(t,Object.assign({},s))}),n),a.activeProcessor=i}else d.on("load",(function(){t(i,e)}))},p=function(t,i,e){var n=t.split("."),o=n[0],a=n.pop(),r=s;n.forEach((function(t){return r=r[t]})),JSON.stringify(r[a])!==JSON.stringify(i)&&(r[a]=i,c("metadata-update",{key:o,value:s[o],silent:e}))},d=Object.assign({id:{get:function(){return n}},origin:{get:function(){return t},set:function(i){return t=i}},serverId:{get:function(){return a.serverFileReference}},transferId:{get:function(){return a.transferId}},status:{get:function(){return a.status}},filename:{get:function(){return a.file.name}},filenameWithoutExtension:{get:function(){return Ii(a.file.name)}},fileExtension:{get:function(){return Zt(a.file.name)}},fileType:{get:function(){return a.file.type}},fileSize:{get:function(){return a.file.size}},file:{get:function(){return a.file}},relativePath:{get:function(){return a.file._relativePath}},source:{get:function(){return a.source}},getMetadata:function(t){return Mi(t?s[t]:s)},setMetadata:function(t,i,e){if(X(t)){var n=t;return Object.keys(n).forEach((function(t){p(t,n[t],i)})),t}return p(t,i,e),i},extend:function(t,i){return h[t]=i},abortLoad:function(){a.activeLoader?a.activeLoader.abort():(l(yt.INIT),c("load-abort"))},retryLoad:function(){a.activeLoader&&a.activeLoader.load()},requestProcessing:function(){a.processingAborted=!1,l(yt.PROCESSING_QUEUED)},abortProcessing:function(){return new Promise((function(t){if(!a.activeProcessor)return a.processingAborted=!0,l(yt.IDLE),c("process-abort"),void t();r=function(){t()},a.activeProcessor.abort()}))},load:function(i,e,n){a.source=i,d.fireSync("init"),a.file?d.fireSync("load-skip"):(a.file=Ti(i),e.on("init",(function(){c("load-init")})),e.on("meta",(function(i){a.file.size=i.size,a.file.filename=i.filename,i.source&&(t=Et.LIMBO,a.serverFileReference=i.source,a.status=yt.PROCESSING_COMPLETE),c("load-meta")})),e.on("progress",(function(t){l(yt.LOADING),c("load-progress",t)})),e.on("error",(function(t){l(yt.LOAD_ERROR),c("load-request-error",t)})),e.on("abort",(function(){l(yt.INIT),c("load-abort")})),e.on("load",(function(i){a.activeLoader=null;var e=function(i){a.file=Ai(i)?i:a.file,l(t===Et.LIMBO&&a.serverFileReference?yt.PROCESSING_COMPLETE:yt.IDLE),c("load")};a.serverFileReference?e(i):n(i,e,(function(t){a.file=i,c("load-meta"),l(yt.LOAD_ERROR),c("load-file-error",t)}))})),e.setSource(i),a.activeLoader=e,e.load())},process:u,revert:function(t,i){return new Promise((function(e,n){var o=null!==a.serverFileReference?a.serverFileReference:a.transferId;null!==o?(t(o,(function(){a.serverFileReference=null,a.transferId=null,e()}),(function(t){i?(l(yt.PROCESSING_REVERT_ERROR),c("process-revert-error"),n(t)):e()})),l(yt.IDLE),c("process-revert")):e()}))}},mt(),{freeze:function(){return a.frozen=!0},release:function(){return a.released=!0},released:{get:function(){return a.released}},archive:function(){return a.archived=!0},archived:{get:function(){return a.archived}}}),h=o(d);return h}(v,v===Et.INPUT?null:a,f.file);Object.keys(f.metadata||{}).forEach((function(t){x.setMetadata(t,f.metadata[t])})),Dt("DID_CREATE_ITEM",x,{query:i,dispatch:t});var b=i("GET_ITEM_INSERT_LOCATION");e.options.itemInsertLocationFreedom||(s="before"===b?-1:e.items.length),function(t,i,e){G(i)||(void 0===e?t.push(i):function(t,i,e){t.splice(i,0,e)}(t,e=Yt(e,0,t.length),i))}(e.items,x,s),q(b)&&a&&Pi(e,b);var w=x.id;x.on("init",(function(){t("DID_INIT_ITEM",{id:w})})),x.on("load-init",(function(){t("DID_START_ITEM_LOAD",{id:w})})),x.on("load-meta",(function(){t("DID_UPDATE_ITEM_META",{id:w})})),x.on("load-progress",(function(i){t("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:w,progress:i})})),x.on("load-request-error",(function(i){var n=Si(e.options.labelFileLoadError)(i);if(i.code>=400&&i.code<500)return t("DID_THROW_ITEM_INVALID",{id:w,error:i,status:{main:n,sub:i.code+" ("+i.body+")"}}),void d({error:i,file:bt(x)});t("DID_THROW_ITEM_LOAD_ERROR",{id:w,error:i,status:{main:n,sub:e.options.labelTapToRetry}})})),x.on("load-file-error",(function(i){t("DID_THROW_ITEM_INVALID",{id:w,error:i.status,status:i.status}),d({error:i.status,file:bt(x)})})),x.on("load-abort",(function(){t("REMOVE_ITEM",{query:w})})),x.on("load-skip",(function(){t("COMPLETE_LOAD_ITEM",{query:w,item:x,data:{source:a,success:u}})})),x.on("load",(function(){var n=function(n){n?(x.on("metadata-update",(function(i){t("DID_UPDATE_ITEM_METADATA",{id:w,change:i})})),Mt("SHOULD_PREPARE_OUTPUT",!1,{item:x,query:i}).then((function(n){var o=i("GET_BEFORE_PREPARE_FILE");o&&(n=o(x,n));var r=function(){t("COMPLETE_LOAD_ITEM",{query:w,item:x,data:{source:a,success:u}}),Li(t,e)};n?t("REQUEST_PREPARE_OUTPUT",{query:w,item:x,success:function(i){t("DID_PREPARE_OUTPUT",{id:w,file:i}),r()}},!0):r()}))):t("REMOVE_ITEM",{query:w})};Mt("DID_LOAD_ITEM",x,{query:i,dispatch:t}).then((function(){Ci(i("GET_BEFORE_ADD_FILE"),bt(x)).then(n)})).catch((function(i){if(!i||!i.error||!i.status)return n(!1);t("DID_THROW_ITEM_INVALID",{id:w,error:i.error,status:i.status})}))})),x.on("process-start",(function(){t("DID_START_ITEM_PROCESSING",{id:w})})),x.on("process-progress",(function(i){t("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:w,progress:i})})),x.on("process-error",(function(i){t("DID_THROW_ITEM_PROCESSING_ERROR",{id:w,error:i,status:{main:Si(e.options.labelFileProcessingError)(i),sub:e.options.labelTapToRetry}})})),x.on("process-revert-error",(function(i){t("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:w,error:i,status:{main:Si(e.options.labelFileProcessingRevertError)(i),sub:e.options.labelTapToRetry}})})),x.on("process-complete",(function(i){t("DID_COMPLETE_ITEM_PROCESSING",{id:w,error:null,serverFileReference:i}),t("DID_DEFINE_VALUE",{id:w,value:i})})),x.on("process-abort",(function(){t("DID_ABORT_ITEM_PROCESSING",{id:w})})),x.on("process-revert",(function(){t("DID_REVERT_ITEM_PROCESSING",{id:w}),t("DID_DEFINE_VALUE",{id:w,value:null})})),t("DID_ADD_ITEM",{id:w,index:s,interactionMethod:l}),Li(t,e);var y=e.options.server||{},E=y.url,k=y.load,I=y.restore,T=y.fetch;x.load(a,si(v===Et.INPUT?U(a)&&function(t){return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Oi(location.href)!==Oi(t)}(a)&&T?fi(E,T):Ri:fi(E,v===Et.LIMBO?I:k)),(function(t,e,n){Mt("LOAD_FILE",t,{query:i}).then(e).catch(n)}))}},REQUEST_PREPARE_OUTPUT:function(t){var e=t.item,n=t.success,o=t.failure,a=void 0===o?function(){}:o,r={error:ui("error",0,"Item not found"),file:null};if(e.archived)return a(r);Mt("PREPARE_OUTPUT",e.file,{query:i,item:e}).then((function(t){Mt("COMPLETE_PREPARE_OUTPUT",t,{query:i,item:e}).then((function(t){if(e.archived)return a(r);n(t)}))}))},COMPLETE_LOAD_ITEM:function(n){var o=n.item,a=n.data,r=a.success,s=a.source,l=i("GET_ITEM_INSERT_LOCATION");if(q(l)&&s&&Pi(e,l),t("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.origin===Et.INPUT?null:s}),r(bt(o)),o.origin!==Et.LOCAL)return o.origin===Et.LIMBO?(t("DID_COMPLETE_ITEM_PROCESSING",{id:o.id,error:null,serverFileReference:s}),void t("DID_DEFINE_VALUE",{id:o.id,value:o.serverId||s})):void(i("IS_ASYNC")&&e.options.instantUpload&&t("REQUEST_ITEM_PROCESSING",{query:o.id}));t("DID_LOAD_LOCAL_ITEM",{id:o.id})},RETRY_ITEM_LOAD:Gi(e,(function(t){t.retryLoad()})),REQUEST_ITEM_PREPARE:Gi(e,(function(i,e,n){t("REQUEST_PREPARE_OUTPUT",{query:i.id,item:i,success:function(n){t("DID_PREPARE_OUTPUT",{id:i.id,file:n}),e({file:i,output:n})},failure:n},!0)})),REQUEST_ITEM_PROCESSING:Gi(e,(function(n,o,a){if(n.status===yt.IDLE||n.status===yt.PROCESSING_ERROR)n.status!==yt.PROCESSING_QUEUED&&(n.requestProcessing(),t("DID_REQUEST_ITEM_PROCESSING",{id:n.id}),t("PROCESS_ITEM",{query:n,success:o,failure:a},!0));else{var r=function(){return t("REQUEST_ITEM_PROCESSING",{query:n,success:o,failure:a})},s=function(){return document.hidden?r():setTimeout(r,32)};n.status===yt.PROCESSING_COMPLETE||n.status===yt.PROCESSING_REVERT_ERROR?n.revert(yi(e.options.server.url,e.options.server.revert),i("GET_FORCE_REVERT")).then(s).catch((function(){})):n.status===yt.PROCESSING&&n.abortProcessing().then(s)}})),PROCESS_ITEM:Gi(e,(function(n,o,a){var r=i("GET_MAX_PARALLEL_UPLOADS");if(i("GET_ITEMS_BY_STATUS",yt.PROCESSING).length!==r){if(n.status!==yt.PROCESSING){var s=function i(){var n=e.processingQueue.shift();if(n){var o=n.id,a=n.success,r=n.failure,s=Lt(e.items,o);s&&!s.archived?t("PROCESS_ITEM",{query:o,success:a,failure:r},!0):i()}};n.onOnce("process-complete",(function(){if(o(bt(n)),s(),e.options.instantUpload&&n.origin===Et.LOCAL&&q(e.options.server.remove)){var a=function(){};n.origin=Et.LIMBO,e.options.server.remove(n.source,a,a)}i("GET_ITEMS_BY_STATUS",yt.PROCESSING_COMPLETE).length===e.items.length&&t("DID_COMPLETE_ITEM_PROCESSING_ALL")})),n.onOnce("process-error",(function(t){a({error:t,file:bt(n)}),s()}));var l=e.options;n.process(ki(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return"function"==typeof i?function(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return i.apply(void 0,[e].concat(o,[n]))}:i&&U(i.url)?wi(t,i,e,n):null}(l.server.url,l.server.process,l.name,{chunkTransferId:n.transferId,chunkServer:l.server.patch,chunkUploads:l.chunkUploads,chunkForce:l.chunkForce,chunkSize:l.chunkSize,chunkRetryDelays:l.chunkRetryDelays}),{allowMinimumUploadDuration:i("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(function(e,o,a){Mt("PREPARE_OUTPUT",e,{query:i,item:n}).then((function(i){t("DID_PREPARE_OUTPUT",{id:n.id,file:i}),o(i)})).catch(a)}))}}else e.processingQueue.push({id:n.id,success:o,failure:a})})),RETRY_ITEM_PROCESSING:Gi(e,(function(i){t("REQUEST_ITEM_PROCESSING",{query:i})})),REQUEST_REMOVE_ITEM:Gi(e,(function(e){Ci(i("GET_BEFORE_REMOVE_FILE"),bt(e)).then((function(i){i&&t("REMOVE_ITEM",{query:e})}))})),RELEASE_ITEM:Gi(e,(function(t){t.release()})),REMOVE_ITEM:Gi(e,(function(n,o,a,r){var s=function(){var i=n.id;Di(e.items,i).archive(),t("DID_REMOVE_ITEM",{error:null,id:i,item:n}),Li(t,e),o(bt(n))},l=e.options.server;n.origin===Et.LOCAL&&l&&q(l.remove)&&!1!==r.remove?(t("DID_START_ITEM_REMOVE",{id:n.id}),l.remove(n.source,(function(){return s()}),(function(i){t("DID_THROW_ITEM_REMOVE_ERROR",{id:n.id,error:ui("error",0,i,null),status:{main:Si(e.options.labelFileRemoveError)(i),sub:e.options.labelTapToRetry}})}))):((r.revert&&n.origin!==Et.LOCAL&&null!==n.serverId||e.options.chunkUploads&&n.file.size>e.options.chunkSize||e.options.chunkUploads&&e.options.chunkForce)&&n.revert(yi(e.options.server.url,e.options.server.revert),i("GET_FORCE_REVERT")),s())})),ABORT_ITEM_LOAD:Gi(e,(function(t){t.abortLoad()})),ABORT_ITEM_PROCESSING:Gi(e,(function(i){i.serverId?t("REVERT_ITEM_PROCESSING",{id:i.id}):i.abortProcessing().then((function(){e.options.instantUpload&&t("REMOVE_ITEM",{query:i.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:Gi(e,(function(n){if(e.options.instantUpload){var o=function(i){i&&t("REVERT_ITEM_PROCESSING",{query:n})},a=i("GET_BEFORE_REMOVE_FILE");if(!a)return o(!0);var r=a(bt(n));return null==r?o(!0):"boolean"==typeof r?o(r):void("function"==typeof r.then&&r.then(o))}t("REVERT_ITEM_PROCESSING",{query:n})})),REVERT_ITEM_PROCESSING:Gi(e,(function(n){n.revert(yi(e.options.server.url,e.options.server.revert),i("GET_FORCE_REVERT")).then((function(){(e.options.instantUpload||function(t){return!Ai(t.file)}(n))&&t("REMOVE_ITEM",{query:n.id})})).catch((function(){}))})),SET_OPTIONS:function(i){var e=i.options,n=Object.keys(e),o=Ni.filter((function(t){return n.includes(t)}));[].concat(ht(o),ht(Object.keys(e).filter((function(t){return!o.includes(t)})))).forEach((function(i){t("SET_"+et(i,"_").toUpperCase(),{value:e[i]})}))}}},Ni=["server"],Bi=function(t){return document.createElement(t)},Fi=function(t,i){var e=t.childNodes[0];e?i!==e.nodeValue&&(e.nodeValue=i):(e=document.createTextNode(i),t.appendChild(e))},Ui=function(t,i,e,n){var o=(n%360-90)*Math.PI/180;return{x:t+e*Math.cos(o),y:i+e*Math.sin(o)}},ji=function(t,i,e,n,o){var a=1;return o>n&&o-n<=.5&&(a=0),n>o&&n-o>=.5&&(a=0),function(t,i,e,n,o,a){var r=Ui(t,i,e,o),s=Ui(t,i,e,n);return["M",r.x,r.y,"A",e,e,0,a,0,s.x,s.y].join(" ")}(t,i,e,360*Math.min(.9999,n),360*Math.min(.9999,o),a)},Hi=O({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(t){var i=t.root,e=t.props;e.spin=!1,e.progress=0,e.opacity=0;var n=c("svg");i.ref.path=c("path",{"stroke-width":2,"stroke-linecap":"round"}),n.appendChild(i.ref.path),i.ref.svg=n,i.appendChild(n)},write:function(t){var i=t.root,e=t.props;if(0!==e.opacity){e.align&&(i.element.dataset.align=e.align);var n=parseInt(a(i.ref.path,"stroke-width"),10),o=.5*i.rect.element.width,r=0,s=0;e.spin?(r=0,s=.5):(r=0,s=e.progress);var l=ji(o,o,o-n,r,s);a(i.ref.path,"d",l),a(i.ref.path,"stroke-opacity",e.spin||e.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Vi=O({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(t){var i=t.props;t.root.element.innerHTML=(i.icon||"")+"<span>"+i.label+"</span>",i.isDisabled=!1},write:function(t){var i=t.root,e=t.props,n=e.isDisabled,o=i.query("GET_DISABLED")||0===e.opacity;o&&!n?(e.isDisabled=!0,a(i.element,"disabled","disabled")):!o&&n&&(e.isDisabled=!1,i.element.removeAttribute("disabled"))}}),Wi=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.labelBytes,a=void 0===o?"bytes":o,r=n.labelKilobytes,s=void 0===r?"KB":r,l=n.labelMegabytes,c=void 0===l?"MB":l,u=n.labelGigabytes,p=void 0===u?"GB":u,d=e*e,h=e*e*e;return(t=Math.round(Math.abs(t)))<e?t+" "+a:t<d?Math.floor(t/e)+" "+s:t<h?Yi(t/d,1,i)+" "+c:Yi(t/h,2,i)+" "+p},Yi=function(t,i,e){return t.toFixed(i).split(".").filter((function(t){return"0"!==t})).join(e)},qi=function(t){var i=t.root,e=t.props;Fi(i.ref.fileSize,Wi(i.query("GET_ITEM_SIZE",e.id),".",i.query("GET_FILE_SIZE_BASE"),i.query("GET_FILE_SIZE_LABELS",i.query))),Fi(i.ref.fileName,i.query("GET_ITEM_NAME",e.id))},$i=function(t){var i=t.root,e=t.props;W(i.query("GET_ITEM_SIZE",e.id))?qi({root:i,props:e}):Fi(i.ref.fileSize,i.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Zi=O({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:S({DID_LOAD_ITEM:qi,DID_UPDATE_ITEM_META:qi,DID_THROW_ITEM_LOAD_ERROR:$i,DID_THROW_ITEM_INVALID:$i}),didCreateView:function(t){Dt("CREATE_VIEW",Object.assign({},t,{view:t}))},create:function(t){var i=t.root,e=t.props,n=Bi("span");n.className="filepond--file-info-main",a(n,"aria-hidden","true"),i.appendChild(n),i.ref.fileName=n;var o=Bi("span");o.className="filepond--file-info-sub",i.appendChild(o),i.ref.fileSize=o,Fi(o,i.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),Fi(n,i.query("GET_ITEM_NAME",e.id))},mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Xi=function(t){return Math.round(100*t)},Ki=function(t){var i=t.root,e=t.action,n=null===e.progress?i.query("GET_LABEL_FILE_LOADING"):i.query("GET_LABEL_FILE_LOADING")+" "+Xi(e.progress)+"%";Fi(i.ref.main,n),Fi(i.ref.sub,i.query("GET_LABEL_TAP_TO_CANCEL"))},Qi=function(t){var i=t.root;Fi(i.ref.main,""),Fi(i.ref.sub,"")},Ji=function(t){var i=t.root,e=t.action;Fi(i.ref.main,e.status.main),Fi(i.ref.sub,e.status.sub)},te=O({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:S({DID_LOAD_ITEM:Qi,DID_REVERT_ITEM_PROCESSING:Qi,DID_REQUEST_ITEM_PROCESSING:function(t){var i=t.root;Fi(i.ref.main,i.query("GET_LABEL_FILE_PROCESSING")),Fi(i.ref.sub,i.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function(t){var i=t.root;Fi(i.ref.main,i.query("GET_LABEL_FILE_PROCESSING_ABORTED")),Fi(i.ref.sub,i.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function(t){var i=t.root;Fi(i.ref.main,i.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),Fi(i.ref.sub,i.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(t){var i=t.root,e=t.action,n=null===e.progress?i.query("GET_LABEL_FILE_PROCESSING"):i.query("GET_LABEL_FILE_PROCESSING")+" "+Xi(e.progress)+"%";Fi(i.ref.main,n),Fi(i.ref.sub,i.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:Ki,DID_THROW_ITEM_LOAD_ERROR:Ji,DID_THROW_ITEM_INVALID:Ji,DID_THROW_ITEM_PROCESSING_ERROR:Ji,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:Ji,DID_THROW_ITEM_REMOVE_ERROR:Ji}),didCreateView:function(t){Dt("CREATE_VIEW",Object.assign({},t,{view:t}))},create:function(t){var i=t.root,e=Bi("span");e.className="filepond--file-status-main",i.appendChild(e),i.ref.main=e;var n=Bi("span");n.className="filepond--file-status-sub",i.appendChild(n),i.ref.sub=n,Ki({root:i,action:{progress:null}})},mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),ie={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},ee=[];n(ie,(function(t){ee.push(t)}));var ne,oe=function(t){if("right"===le(t))return 0;var i=t.ref.buttonRemoveItem.rect.element;return i.hidden?null:i.width+i.left},ae=function(t){return t.ref.buttonAbortItemLoad.rect.element.width},re=function(t){return Math.floor(t.ref.buttonRemoveItem.rect.element.height/4)},se=function(t){return Math.floor(t.ref.buttonRemoveItem.rect.element.left/2)},le=function(t){return t.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},ce={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function(t){return t.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function(t){return t.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},ue={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:oe},status:{translateX:oe}},pe={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},de={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:oe},status:{translateX:oe,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:oe},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:le},info:{translateX:oe},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:le},buttonRemoveItem:{opacity:1},info:{translateX:oe},status:{opacity:1,translateX:oe}},DID_LOAD_ITEM:ue,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:oe},status:{translateX:oe}},DID_START_ITEM_PROCESSING:pe,DID_REQUEST_ITEM_PROCESSING:pe,DID_UPDATE_ITEM_PROCESS_PROGRESS:pe,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:oe}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:oe},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:ue},he=O({create:function(t){var i=t.root;i.element.innerHTML=i.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),fe=S({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function(t){t.root.ref.buttonAbortItemProcessing.label=t.action.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function(t){t.root.ref.buttonAbortItemLoad.label=t.action.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function(t){t.root.ref.buttonAbortItemRemoval.label=t.action.value},DID_REQUEST_ITEM_PROCESSING:function(t){var i=t.root;i.ref.processProgressIndicator.spin=!0,i.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function(t){var i=t.root;i.ref.loadProgressIndicator.spin=!0,i.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function(t){var i=t.root;i.ref.processProgressIndicator.spin=!0,i.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function(t){var i=t.root,e=t.action;i.ref.loadProgressIndicator.spin=!1,i.ref.loadProgressIndicator.progress=e.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(t){var i=t.root,e=t.action;i.ref.processProgressIndicator.spin=!1,i.ref.processProgressIndicator.progress=e.progress}}),ge=O({create:function(t){var i,e=t.root,o=t.props,a=Object.keys(ie).reduce((function(t,i){return t[i]=Object.assign({},ie[i]),t}),{}),r=o.id,s=e.query("GET_ALLOW_REVERT"),l=e.query("GET_ALLOW_REMOVE"),c=e.query("GET_ALLOW_PROCESS"),u=e.query("GET_INSTANT_UPLOAD"),p=e.query("IS_ASYNC"),d=e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");p?c&&!s?i=function(t){return!/RevertItemProcessing/.test(t)}:!c&&s?i=function(t){return!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(t)}:c||s||(i=function(t){return!/Process/.test(t)}):i=function(t){return!/Process/.test(t)};var h=i?ee.filter(i):ee.concat();if(u&&s&&(a.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",a.RevertItemProcessing.icon="GET_ICON_REMOVE"),p&&!s){var f=de.DID_COMPLETE_ITEM_PROCESSING;f.info.translateX=se,f.info.translateY=re,f.status.translateY=re,f.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(p&&!c&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach((function(t){de[t].status.translateY=re})),de.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=ae),d&&s){a.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";var g=de.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=oe,g.status.translateY=re,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}l||(a.RemoveItem.disabled=!0),n(a,(function(t,i){var n=e.createChildView(Vi,{label:e.query(i.label),icon:e.query(i.icon),opacity:0});h.includes(t)&&e.appendChildView(n),i.disabled&&(n.element.setAttribute("disabled","disabled"),n.element.setAttribute("hidden","hidden")),n.element.dataset.align=e.query("GET_STYLE_"+i.align),n.element.classList.add(i.className),n.on("click",(function(t){t.stopPropagation(),i.disabled||e.dispatch(i.action,{query:r})})),e.ref["button"+t]=n})),e.ref.processingCompleteIndicator=e.appendChildView(e.createChildView(he)),e.ref.processingCompleteIndicator.element.dataset.align=e.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),e.ref.info=e.appendChildView(e.createChildView(Zi,{id:r})),e.ref.status=e.appendChildView(e.createChildView(te,{id:r}));var _=e.appendChildView(e.createChildView(Hi,{opacity:0,align:e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));_.element.classList.add("filepond--load-indicator"),e.ref.loadProgressIndicator=_;var m=e.appendChildView(e.createChildView(Hi,{opacity:0,align:e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));m.element.classList.add("filepond--process-indicator"),e.ref.processProgressIndicator=m,e.ref.activeStyles=[]},write:function(t){var i=t.root,e=t.actions;fe({root:i,actions:e,props:t.props});var o=e.concat().filter((function(t){return/^DID_/.test(t.type)})).reverse().find((function(t){return de[t.type]}));if(o){i.ref.activeStyles=[];var a=de[o.type];n(ce,(function(t,e){var o=i.ref[t];n(e,(function(e,n){i.ref.activeStyles.push({control:o,key:e,value:a[t]&&void 0!==a[t][e]?a[t][e]:n})}))}))}i.ref.activeStyles.forEach((function(t){var e=t.value;t.control[t.key]="function"==typeof e?e(i):e}))},didCreateView:function(t){Dt("CREATE_VIEW",Object.assign({},t,{view:t}))},name:"file"}),_e=O({create:function(t){var i=t.root,e=t.props;i.ref.fileName=Bi("legend"),i.appendChild(i.ref.fileName),i.ref.file=i.appendChildView(i.createChildView(ge,{id:e.id})),i.ref.data=!1},ignoreRect:!0,write:S({DID_LOAD_ITEM:function(t){var i=t.root;Fi(i.ref.fileName,i.query("GET_ITEM_NAME",t.props.id))}}),didCreateView:function(t){Dt("CREATE_VIEW",Object.assign({},t,{view:t}))},tag:"fieldset",name:"file-wrapper"}),me={type:"spring",damping:.6,mass:7},ve=function(t,i,e){var n=O({name:"panel-"+i.name+" filepond--"+e,mixins:i.mixins,ignoreRectUpdate:!0}),o=t.createChildView(n,i.props);t.ref[i.name]=t.appendChildView(o)},xe=O({name:"panel",read:function(t){return t.props.heightCurrent=t.root.ref.bottom.translateY},write:function(t){var i=t.root,e=t.props;if(null!==i.ref.scalable&&e.scalable===i.ref.scalable||(i.ref.scalable=!B(e.scalable)||e.scalable,i.element.dataset.scalable=i.ref.scalable),e.height){var n=i.ref.top.rect.element,o=i.ref.bottom.rect.element,a=Math.max(n.height+o.height,e.height);i.ref.center.translateY=n.height,i.ref.center.scaleY=(a-n.height-o.height)/100,i.ref.bottom.translateY=a-o.height}},create:function(t){var i=t.root,e=t.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:me},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:me},styles:["translateY"]}}].forEach((function(t){ve(i,t,e.name)})),i.element.classList.add("filepond--"+e.name),i.ref.scalable=null},ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),be={type:"spring",stiffness:.75,damping:.45,mass:10},we="spring",ye={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},Ee=S({DID_UPDATE_PANEL_HEIGHT:function(t){t.root.height=t.action.height}}),ke=S({DID_GRAB_ITEM:function(t){var i=t.root;t.props.dragOrigin={x:i.translateX,y:i.translateY}},DID_DRAG_ITEM:function(t){t.root.element.dataset.dragState="drag"},DID_DROP_ITEM:function(t){var i=t.root,e=t.props;e.dragOffset=null,e.dragOrigin=null,i.element.dataset.dragState="drop"}},(function(t){var i=t.root,e=t.actions,n=t.props,o=t.shouldOptimize;"drop"===i.element.dataset.dragState&&i.scaleX<=1&&(i.element.dataset.dragState="idle");var a=e.concat().filter((function(t){return/^DID_/.test(t.type)})).reverse().find((function(t){return ye[t.type]}));a&&a.type!==n.currentState&&(n.currentState=a.type,i.element.dataset.filepondItemState=ye[n.currentState]||"");var r=i.query("GET_ITEM_PANEL_ASPECT_RATIO")||i.query("GET_PANEL_ASPECT_RATIO");r?o||(i.height=i.rect.element.width*r):(Ee({root:i,actions:e,props:n}),!i.height&&i.ref.container.rect.element.height>0&&(i.height=i.ref.container.rect.element.height)),o&&(i.ref.panel.height=null),i.ref.panel.height=i.height})),Ie=O({create:function(t){var i=t.root,e=t.props;if(i.ref.handleClick=function(){return i.dispatch("DID_ACTIVATE_ITEM",{id:e.id})},i.element.id="filepond--item-"+e.id,i.element.addEventListener("click",i.ref.handleClick),i.ref.container=i.appendChildView(i.createChildView(_e,{id:e.id})),i.ref.panel=i.appendChildView(i.createChildView(xe,{name:"item-panel"})),i.ref.panel.height=null,e.markedForRemoval=!1,i.query("GET_ALLOW_REORDER")){i.element.dataset.dragState="idle";i.element.addEventListener("pointerdown",(function(t){if(t.isPrimary){var n=!1,o={x:t.pageX,y:t.pageY};e.dragOrigin={x:i.translateX,y:i.translateY},e.dragCenter={x:t.offsetX,y:t.offsetY};var a=(s=i.query("GET_ACTIVE_ITEMS"),l=s.map((function(t){return t.id})),c=void 0,{setIndex:function(t){c=t},getIndex:function(){return c},getItemIndex:function(t){return l.indexOf(t.id)}});i.dispatch("DID_GRAB_ITEM",{id:e.id,dragState:a});var r=function(t){t.isPrimary&&(t.stopPropagation(),t.preventDefault(),e.dragOffset={x:t.pageX-o.x,y:t.pageY-o.y},e.dragOffset.x*e.dragOffset.x+e.dragOffset.y*e.dragOffset.y>16&&!n&&(n=!0,i.element.removeEventListener("click",i.ref.handleClick)),i.dispatch("DID_DRAG_ITEM",{id:e.id,dragState:a}))};document.addEventListener("pointermove",r),document.addEventListener("pointerup",(function t(s){s.isPrimary&&(document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",t),e.dragOffset={x:s.pageX-o.x,y:s.pageY-o.y},i.dispatch("DID_DROP_ITEM",{id:e.id,dragState:a}),n&&setTimeout((function(){return i.element.addEventListener("click",i.ref.handleClick)}),0))}))}var s,l,c}))}},write:ke,destroy:function(t){var i=t.root,e=t.props;i.element.removeEventListener("click",i.ref.handleClick),i.dispatch("RELEASE_ITEM",{query:e.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:we,scaleY:we,translateX:be,translateY:be,opacity:{type:"tween",duration:150}}}}),Te=function(t,i){return Math.max(1,Math.floor((t+1)/i))},Ae=function(t,i,e){if(e){var n=i.length,o=null;if(0===n||e.top<i[0].rect.element.top)return-1;var a=i[0].rect.element,r=a.width+(a.marginLeft+a.marginRight),s=Te(t.rect.element.width,r);if(1===s){for(var l=0;l<n;l++){var c=i[l];if(e.top<c.rect.outer.top+.5*c.rect.element.height)return l}return n}for(var u=a.height+(a.marginTop+a.marginBottom),p=0;p<n;p++){var d=p%s,h=Math.floor(p/s)*u;if(e.top<h+u+a.marginBottom&&e.top>h-a.marginTop){if(e.left<d*r+r)return p;o=p!==n-1?p:null}}return null!==o?o:n}},Me={height:0,width:0,get getHeight(){return this.height},set setHeight(t){0!==this.height&&0!==t||(this.height=t)},get getWidth(){return this.width},set setWidth(t){0!==this.width&&0!==t||(this.width=t)},setDimensions:function(t,i){0!==this.height&&0!==t||(this.height=t),0!==this.width&&0!==i||(this.width=i)}},De=function(t,i,e){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;t.dragOffset?(t.translateX=null,t.translateY=null,t.translateX=t.dragOrigin.x+t.dragOffset.x,t.translateY=t.dragOrigin.y+t.dragOffset.y,t.scaleX=1.025,t.scaleY=1.025):(t.translateX=i,t.translateY=e,Date.now()>t.spawnDate&&(0===t.opacity&&Re(t,i,e,n,o),t.scaleX=1,t.scaleY=1,t.opacity=1))},Re=function(t,i,e,n,o){t.interactionMethod===ut?(t.translateX=null,t.translateX=i,t.translateY=null,t.translateY=e):t.interactionMethod===st?(t.translateX=null,t.translateX=i-20*n,t.translateY=null,t.translateY=e-10*o,t.scaleX=.8,t.scaleY=.8):t.interactionMethod===lt?(t.translateY=null,t.translateY=e-30):t.interactionMethod===rt&&(t.translateX=null,t.translateX=i-30,t.translateY=null)},Oe=function(t){return t.rect.element.height+.5*t.rect.element.marginBottom+.5*t.rect.element.marginTop},Se=S({DID_ADD_ITEM:function(t){var i=t.root,e=t.action,n=e.id,o=e.index,a=e.interactionMethod;i.ref.addIndex=o;var r=Date.now(),s=r,l=1;if(a!==ut){l=0;var c=i.query("GET_ITEM_INSERT_INTERVAL"),u=r-i.ref.lastItemSpanwDate;s=u<c?r+(c-u):r}i.ref.lastItemSpanwDate=s,i.appendChildView(i.createChildView(Ie,{spawnDate:s,id:n,opacity:l,interactionMethod:a}),o)},DID_REMOVE_ITEM:function(t){var i=t.action.id,e=t.root.childViews.find((function(t){return t.id===i}));e&&(e.scaleX=.9,e.scaleY=.9,e.opacity=0,e.markedForRemoval=!0)},DID_DRAG_ITEM:function(t){var i,e=t.root,n=t.action,o=n.id,a=n.dragState,r=e.query("GET_ITEM",{id:o}),s=e.childViews.find((function(t){return t.id===o})),l=e.childViews.length,c=a.getItemIndex(r);if(s){var u={x:s.dragOrigin.x+s.dragOffset.x+s.dragCenter.x,y:s.dragOrigin.y+s.dragOffset.y+s.dragCenter.y},p=Oe(s),d=(i=s).rect.element.width+.5*i.rect.element.marginLeft+.5*i.rect.element.marginRight,h=Math.floor(e.rect.outer.width/d);h>l&&(h=l);var f=Math.floor(l/h+1);Me.setHeight=p*f,Me.setWidth=d*h;var g={y:Math.floor(u.y/p),x:Math.floor(u.x/d),getGridIndex:function(){return u.y>Me.getHeight||u.y<0||u.x>Me.getWidth||u.x<0?c:this.y*h+this.x},getColIndex:function(){for(var t=e.query("GET_ACTIVE_ITEMS"),i=e.childViews.filter((function(t){return t.rect.element.height})),n=t.map((function(t){return i.find((function(i){return i.id===t.id}))})),o=n.findIndex((function(t){return t===s})),a=Oe(s),r=n.length,l=r,c=0,p=0,d=0,h=0;h<r;h++)if(c=Oe(n[h]),u.y<(p=(d=p)+c)){if(o>h){if(u.y<d+a){l=h;break}continue}l=h;break}return l}},_=h>1?g.getGridIndex():g.getColIndex();e.dispatch("MOVE_ITEM",{query:s,index:_});var m=a.getIndex();if(void 0===m||m!==_){if(a.setIndex(_),void 0===m)return;e.dispatch("DID_REORDER_ITEMS",{items:e.query("GET_ACTIVE_ITEMS"),origin:c,target:_})}}}}),Le=O({create:function(t){var i=t.root;a(i.element,"role","list"),i.ref.lastItemSpanwDate=Date.now()},write:function(t){var i=t.root,e=t.props,n=t.shouldOptimize;Se({root:i,props:e,actions:t.actions});var o=e.dragCoordinates,a=i.rect.element.width,r=i.childViews.filter((function(t){return t.rect.element.height})),s=i.query("GET_ACTIVE_ITEMS").map((function(t){return r.find((function(i){return i.id===t.id}))})).filter((function(t){return t})),l=o?Ae(i,s,o):null,c=i.ref.addIndex||null;i.ref.addIndex=null;var u=0,p=0,d=0;if(0!==s.length){var h=s[0].rect.element,f=h.marginTop+h.marginBottom,g=h.width+(h.marginLeft+h.marginRight),_=h.height+f,m=Te(a,g);if(1===m){var v=0,x=0;s.forEach((function(t,i){if(l){var e=i-l;x=-2===e?.25*-f:-1===e?.75*-f:0===e?.75*f:1===e?.25*f:0}n&&(t.translateX=null,t.translateY=null),t.markedForRemoval||De(t,0,v+x),v+=(t.rect.element.height+f)*(t.markedForRemoval?t.opacity:1)}))}else{var b=0,w=0;s.forEach((function(t,i){i===l&&(u=1),i===c&&(d+=1),t.markedForRemoval&&t.opacity<.5&&(p-=1);var e=i+d+u+p,o=e%m,a=Math.floor(e/m),r=o*g,s=a*_,h=Math.sign(r-b),f=Math.sign(s-w);b=r,w=s,t.markedForRemoval||(n&&(t.translateX=null,t.translateY=null),De(t,r,s,h,f))}))}}},tag:"ul",name:"list",didWriteView:function(t){var i=t.root;i.childViews.filter((function(t){return t.markedForRemoval&&0===t.opacity&&t.resting})).forEach((function(t){t._destroy(),i.removeChildView(t)}))},filterFrameActionsForChild:function(t,i){return i.filter((function(i){return!i.data||!i.data.id||t.id===i.data.id}))},mixins:{apis:["dragCoordinates"]}}),Ce=S({DID_DRAG:function(t){var i=t.root,e=t.props,n=t.action;i.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(e.dragCoordinates={left:n.position.scopeLeft-i.ref.list.rect.element.left,top:n.position.scopeTop-(i.rect.outer.top+i.rect.element.marginTop+i.rect.element.scrollTop)})},DID_END_DRAG:function(t){t.props.dragCoordinates=null}}),Pe=O({create:function(t){var i=t.root,e=t.props;i.ref.list=i.appendChildView(i.createChildView(Le)),e.dragCoordinates=null,e.overflowing=!1},write:function(t){var i=t.root,e=t.props;if(Ce({root:i,props:e,actions:t.actions}),i.ref.list.dragCoordinates=e.dragCoordinates,e.overflowing&&!e.overflow&&(e.overflowing=!1,i.element.dataset.state="",i.height=null),e.overflow){var n=Math.round(e.overflow);n!==i.height&&(e.overflowing=!0,i.element.dataset.state="overflow",i.height=n)}},name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),Ge=function(t,i,e){e?a(t,i,arguments.length>3&&void 0!==arguments[3]?arguments[3]:""):t.removeAttribute(i)},ze=function(t){var i=t.root,e=t.action;i.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&Ge(i.element,"accept",!!e.value,e.value?e.value.join(","):"")},Ne=function(t){Ge(t.root.element,"multiple",t.action.value)},Be=function(t){Ge(t.root.element,"webkitdirectory",t.action.value)},Fe=function(t){var i=t.root,e=i.query("GET_DISABLED"),n=i.query("GET_ALLOW_BROWSE");Ge(i.element,"disabled",e||!n)},Ue=function(t){var i=t.root;t.action.value?0===i.query("GET_TOTAL_ITEMS")&&Ge(i.element,"required",!0):Ge(i.element,"required",!1)},je=function(t){var i=t.action;Ge(t.root.element,"capture",!!i.value,!0===i.value?"":i.value)},He=function(t){var i=t.root,e=i.element;i.query("GET_TOTAL_ITEMS")>0?(Ge(e,"required",!1),Ge(e,"name",!1)):(Ge(e,"name",!0,i.query("GET_NAME")),i.query("GET_CHECK_VALIDITY")&&e.setCustomValidity(""),i.query("GET_REQUIRED")&&Ge(e,"required",!0))},Ve=O({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(t){var i=t.root,e=t.props;i.element.id="filepond--browser-"+e.id,a(i.element,"name",i.query("GET_NAME")),a(i.element,"aria-controls","filepond--assistant-"+e.id),a(i.element,"aria-labelledby","filepond--drop-label-"+e.id),ze({root:i,action:{value:i.query("GET_ACCEPTED_FILE_TYPES")}}),Ne({root:i,action:{value:i.query("GET_ALLOW_MULTIPLE")}}),Be({root:i,action:{value:i.query("GET_ALLOW_DIRECTORIES_ONLY")}}),Fe({root:i}),Ue({root:i,action:{value:i.query("GET_REQUIRED")}}),je({root:i,action:{value:i.query("GET_CAPTURE_METHOD")}}),i.ref.handleChange=function(){if(i.element.value){var t=Array.from(i.element.files).map((function(t){return t._relativePath=t.webkitRelativePath,t}));setTimeout((function(){e.onload(t),function(t){if(t&&""!==t.value){try{t.value=""}catch(t){}if(t.value){var i=Bi("form"),e=t.parentNode,n=t.nextSibling;i.appendChild(t),i.reset(),n?e.insertBefore(t,n):e.appendChild(t)}}}(i.element)}),250)}},i.element.addEventListener("change",i.ref.handleChange)},destroy:function(t){var i=t.root;i.element.removeEventListener("change",i.ref.handleChange)},write:S({DID_LOAD_ITEM:He,DID_REMOVE_ITEM:He,DID_THROW_ITEM_INVALID:function(t){var i=t.root;i.query("GET_CHECK_VALIDITY")&&i.element.setCustomValidity(i.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:Fe,DID_SET_ALLOW_BROWSE:Fe,DID_SET_ALLOW_DIRECTORIES_ONLY:Be,DID_SET_ALLOW_MULTIPLE:Ne,DID_SET_ACCEPTED_FILE_TYPES:ze,DID_SET_CAPTURE_METHOD:je,DID_SET_REQUIRED:Ue})}),We=13,Ye=32,qe=function(t,i){t.innerHTML=i;var e=t.querySelector(".filepond--label-action");return e&&a(e,"tabindex","0"),i},$e=O({name:"drop-label",ignoreRect:!0,create:function(t){var i=t.root,e=t.props,n=Bi("label");a(n,"for","filepond--browser-"+e.id),a(n,"id","filepond--drop-label-"+e.id),a(n,"aria-hidden","true"),i.ref.handleKeyDown=function(t){(t.keyCode===We||t.keyCode===Ye)&&(t.preventDefault(),i.ref.label.click())},i.ref.handleClick=function(t){t.target===n||n.contains(t.target)||i.ref.label.click()},n.addEventListener("keydown",i.ref.handleKeyDown),i.element.addEventListener("click",i.ref.handleClick),qe(n,e.caption),i.appendChild(n),i.ref.label=n},destroy:function(t){var i=t.root;i.ref.label.addEventListener("keydown",i.ref.handleKeyDown),i.element.removeEventListener("click",i.ref.handleClick)},write:S({DID_SET_LABEL_IDLE:function(t){qe(t.root.ref.label,t.action.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Ze=O({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Xe=S({DID_DRAG:function(t){var i=t.root,e=t.action;i.ref.blob?(i.ref.blob.translateX=e.position.scopeLeft,i.ref.blob.translateY=e.position.scopeTop,i.ref.blob.scaleX=1,i.ref.blob.scaleY=1,i.ref.blob.opacity=1):function(t){var i=t.root;i.ref.blob=i.appendChildView(i.createChildView(Ze,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:.5*i.rect.element.width,translateY:.5*i.rect.element.height}))}({root:i})},DID_DROP:function(t){var i=t.root;i.ref.blob&&(i.ref.blob.scaleX=2.5,i.ref.blob.scaleY=2.5,i.ref.blob.opacity=0)},DID_END_DRAG:function(t){var i=t.root;i.ref.blob&&(i.ref.blob.opacity=0)}}),Ke=O({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(t){var i=t.root,e=t.actions;Xe({root:i,props:t.props,actions:e});var n=i.ref.blob;0===e.length&&n&&0===n.opacity&&(i.removeChildView(n),i.ref.blob=null)}}),Qe=function(t,i){try{var e=new DataTransfer;i.forEach((function(t){t instanceof File?e.items.add(t):e.items.add(new File([t],t.name,{type:t.type}))})),t.files=e.files}catch(t){return!1}return!0},Je=function(t,i){return t.ref.fields[i]},tn=function(t){t.query("GET_ACTIVE_ITEMS").forEach((function(i){t.ref.fields[i.id]&&t.element.appendChild(t.ref.fields[i.id])}))},en=function(t){return tn(t.root)},nn=S({DID_SET_DISABLED:function(t){var i=t.root;i.element.disabled=i.query("GET_DISABLED")},DID_ADD_ITEM:function(t){var i=t.root,e=t.action,n=!(i.query("GET_ITEM",e.id).origin===Et.LOCAL)&&i.query("SHOULD_UPDATE_FILE_INPUT"),o=Bi("input");o.type=n?"file":"hidden",o.name=i.query("GET_NAME"),o.disabled=i.query("GET_DISABLED"),i.ref.fields[e.id]=o,tn(i)},DID_LOAD_ITEM:function(t){var i=t.root,e=t.action,n=Je(i,e.id);if(n&&(null!==e.serverFileReference&&(n.value=e.serverFileReference),i.query("SHOULD_UPDATE_FILE_INPUT"))){var o=i.query("GET_ITEM",e.id);Qe(n,[o.file])}},DID_REMOVE_ITEM:function(t){var i=t.root,e=t.action,n=Je(i,e.id);n&&(n.parentNode&&n.parentNode.removeChild(n),delete i.ref.fields[e.id])},DID_DEFINE_VALUE:function(t){var i=t.root,e=t.action,n=Je(i,e.id);n&&(null===e.value?n.removeAttribute("value"):n.value=e.value,tn(i))},DID_PREPARE_OUTPUT:function(t){var i=t.root,e=t.action;i.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout((function(){var t=Je(i,e.id);t&&Qe(t,[e.file])}),0)},DID_REORDER_ITEMS:en,DID_SORT_ITEMS:en}),on=O({tag:"fieldset",name:"data",create:function(t){return t.root.ref.fields={}},write:nn,ignoreRect:!0}),an=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],rn=["css","csv","html","txt"],sn={zip:"zip|compressed",epub:"application/epub+zip"},ln=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t=t.toLowerCase(),an.includes(t)?"image/"+("jpg"===t?"jpeg":"svg"===t?"svg+xml":t):rn.includes(t)?"text/"+t:sn[t]||""},cn=function(t){return new Promise((function(i){var e=xn(t);if(e.length&&!un(t))return i(e);pn(t).then(i)}))},un=function(t){return!!t.files&&t.files.length>0},pn=function(t){return new Promise((function(i){var e=(t.items?Array.from(t.items):[]).filter((function(t){return dn(t)})).map((function(t){return hn(t)}));e.length?Promise.all(e).then((function(t){var e=[];t.forEach((function(t){e.push.apply(e,t)})),i(e.filter((function(t){return t})).map((function(t){return t._relativePath||(t._relativePath=t.webkitRelativePath),t})))})).catch(console.error):i(t.files?Array.from(t.files):[])}))},dn=function(t){if(mn(t)){var i=vn(t);if(i)return i.isFile||i.isDirectory}return"file"===t.kind},hn=function(t){return new Promise((function(i,e){_n(t)?fn(vn(t)).then(i).catch(e):i([t.getAsFile()])}))},fn=function(t){return new Promise((function(i,e){var n=[],o=0,a=0,r=function(){0===a&&0===o&&i(n)};!function t(i){o++;var s=i.createReader();!function i(){s.readEntries((function(e){if(0===e.length)return o--,void r();e.forEach((function(i){i.isDirectory?t(i):(a++,i.file((function(t){var e=gn(t);i.fullPath&&(e._relativePath=i.fullPath),n.push(e),a--,r()})))})),i()}),e)}()}(t)}))},gn=function(t){if(t.type.length)return t;var i=t.lastModifiedDate,e=t.name,n=ln(Zt(t.name));return n.length?((t=t.slice(0,t.size,n)).name=e,t.lastModifiedDate=i,t):t},_n=function(t){return mn(t)&&(vn(t)||{}).isDirectory},mn=function(t){return"webkitGetAsEntry"in t},vn=function(t){return t.webkitGetAsEntry()},xn=function(t){var i=[];try{if((i=wn(t)).length)return i;i=bn(t)}catch(t){}return i},bn=function(t){var i=t.getData("url");return"string"==typeof i&&i.length?[i]:[]},wn=function(t){var i=t.getData("text/html");if("string"==typeof i&&i.length){var e=i.match(/src\s*=\s*"(.+?)"/);if(e)return[e[1]]}return[]},yn=[],En=function(t){return{pageLeft:t.pageX,pageTop:t.pageY,scopeLeft:t.offsetX||t.layerX,scopeTop:t.offsetY||t.layerY}},kn=function(t){var i=yn.find((function(i){return i.element===t}));if(i)return i;var e=In(t);return yn.push(e),e},In=function(t){var i=[],e={dragenter:Dn,dragover:Rn,dragleave:Sn,drop:On},o={};n(e,(function(e,n){o[e]=n(t,i),t.addEventListener(e,o[e],!1)}));var a={element:t,addListener:function(r){return i.push(r),function(){i.splice(i.indexOf(r),1),0===i.length&&(yn.splice(yn.indexOf(a),1),n(e,(function(i){t.removeEventListener(i,o[i],!1)})))}}};return a},Tn=function(t,i){var e,n=function(t,i){return"elementFromPoint"in t||(t=document),t.elementFromPoint(i.x,i.y)}("getRootNode"in(e=i)?e.getRootNode():document,{x:t.pageX-window.pageXOffset,y:t.pageY-window.pageYOffset});return n===i||i.contains(n)},An=null,Mn=function(t,i){try{t.dropEffect=i}catch(t){}},Dn=function(t,i){return function(t){t.preventDefault(),An=t.target,i.forEach((function(i){var e=i.onenter;Tn(t,i.element)&&(i.state="enter",e(En(t)))}))}},Rn=function(t,i){return function(t){t.preventDefault();var e=t.dataTransfer;cn(e).then((function(n){var o=!1;i.some((function(i){var a=i.filterElement,r=i.element,s=i.onenter,l=i.onexit,c=i.ondrag,u=i.allowdrop;Mn(e,"copy");var p=u(n);if(p)if(Tn(t,r)){if(o=!0,null===i.state)return i.state="enter",void s(En(t));if(i.state="over",a&&!p)return void Mn(e,"none");c(En(t))}else a&&!o&&Mn(e,"none"),i.state&&(i.state=null,l(En(t)));else Mn(e,"none")}))}))}},On=function(t,i){return function(t){t.preventDefault(),cn(t.dataTransfer).then((function(e){i.forEach((function(i){var n=i.filterElement,o=i.element,a=i.ondrop,r=i.onexit,s=i.allowdrop;if(i.state=null,!n||Tn(t,o))return s(e)?void a(En(t),e):r(En(t))}))}))}},Sn=function(t,i){return function(t){An===t.target&&i.forEach((function(i){var e=i.onexit;i.state=null,e(En(t))}))}},Ln=function(t,i,e){t.classList.add("filepond--hopper");var n=e.filterItems,o=void 0===n?function(t){return t}:n,a=function(t,i,e){var n=kn(i),o={element:t,filterElement:e,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return o.destroy=n.addListener(o),o}(t,e.catchesDropsOnPage?document.documentElement:t,e.requiresDropOnElement),r="",s="";a.allowdrop=function(t){return i(o(t))},a.ondrop=function(t,e){var n=o(e);i(n)?(s="drag-drop",l.onload(n,t)):l.ondragend(t)},a.ondrag=function(t){l.ondrag(t)},a.onenter=function(t){s="drag-over",l.ondragstart(t)},a.onexit=function(t){s="drag-exit",l.ondragend(t)};var l={updateHopperState:function(){r!==s&&(t.dataset.hopperState=s,r=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){a.destroy()}};return l},Cn=!1,Pn=[],Gn=function(t){var i=document.activeElement;if(i&&/textarea|input/i.test(i.nodeName)){for(var e=!1,n=i;n!==document.body;){if(n.classList.contains("filepond--root")){e=!0;break}n=n.parentNode}if(!e)return}cn(t.clipboardData).then((function(t){t.length&&Pn.forEach((function(i){return i(t)}))}))},zn=function(){var t=function(t){i.onload(t)},i={destroy:function(){_t(Pn,Pn.indexOf(t)),0===Pn.length&&(document.removeEventListener("paste",Gn),Cn=!1)},onload:function(){}};return function(t){Pn.includes(t)||(Pn.push(t),Cn||(Cn=!0,document.addEventListener("paste",Gn)))}(t),i},Nn=null,Bn=null,Fn=[],Un=function(t,i){t.element.textContent=i},jn=function(t,i,e){var n=t.query("GET_TOTAL_ITEMS");Un(t,e+" "+i+", "+n+" "+t.query(1===n?"GET_LABEL_FILE_COUNT_SINGULAR":"GET_LABEL_FILE_COUNT_PLURAL")),clearTimeout(Bn),Bn=setTimeout((function(){!function(t){t.element.textContent=""}(t)}),1500)},Hn=function(t){return t.element.parentNode.contains(document.activeElement)},Vn=function(t){var i=t.root,e=i.query("GET_ITEM",t.action.id).filename,n=i.query("GET_LABEL_FILE_PROCESSING_ABORTED");Un(i,e+" "+n)},Wn=function(t){var i=t.root,e=t.action,n=i.query("GET_ITEM",e.id);Un(i,e.status.main+" "+n.filename+" "+e.status.sub)},Yn=O({create:function(t){var i=t.root;i.element.id="filepond--assistant-"+t.props.id,a(i.element,"role","status"),a(i.element,"aria-live","polite"),a(i.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:S({DID_LOAD_ITEM:function(t){var i=t.root,e=t.action;if(Hn(i)){i.element.textContent="";var n=i.query("GET_ITEM",e.id);Fn.push(n.filename),clearTimeout(Nn),Nn=setTimeout((function(){jn(i,Fn.join(", "),i.query("GET_LABEL_FILE_ADDED")),Fn.length=0}),750)}},DID_REMOVE_ITEM:function(t){var i=t.root,e=t.action;Hn(i)&&jn(i,e.item.filename,i.query("GET_LABEL_FILE_REMOVED"))},DID_COMPLETE_ITEM_PROCESSING:function(t){var i=t.root,e=i.query("GET_ITEM",t.action.id).filename,n=i.query("GET_LABEL_FILE_PROCESSING_COMPLETE");Un(i,e+" "+n)},DID_ABORT_ITEM_PROCESSING:Vn,DID_REVERT_ITEM_PROCESSING:Vn,DID_THROW_ITEM_REMOVE_ERROR:Wn,DID_THROW_ITEM_LOAD_ERROR:Wn,DID_THROW_ITEM_INVALID:Wn,DID_THROW_ITEM_PROCESSING_ERROR:Wn}),tag:"span",name:"assistant"}),qn=function(t){return t.replace(new RegExp((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-")+".","g"),(function(t){return t.charAt(1).toUpperCase()}))},$n=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=Date.now(),o=null;return function(){for(var a=arguments.length,r=new Array(a),s=0;s<a;s++)r[s]=arguments[s];clearTimeout(o);var l=Date.now()-n,c=function(){n=Date.now(),t.apply(void 0,r)};l<i?e||(o=setTimeout(c,i-l)):c()}},Zn=function(t){return t.preventDefault()},Xn=function(t){var i=t.ref.list.childViews[0].childViews[0];return i?{top:i.rect.element.marginTop,bottom:i.rect.element.marginBottom}:{top:0,bottom:0}},Kn=function(t){var i=0,e=0,n=t.ref.list,o=n.childViews[0],a=o.childViews.filter((function(t){return t.rect.element.height})),r=t.query("GET_ACTIVE_ITEMS").map((function(t){return a.find((function(i){return i.id===t.id}))})).filter((function(t){return t}));if(0===r.length)return{visual:i,bounds:e};var s=o.rect.element.width,l=Ae(o,r,n.dragCoordinates),c=r[0].rect.element,u=c.marginTop+c.marginBottom,p=c.width+(c.marginLeft+c.marginRight),d=c.height+u,h=void 0!==l&&l>=0?1:0,f=r.find((function(t){return t.markedForRemoval&&t.opacity<.45}))?-1:0,g=r.length+h+f,_=Te(s,p);return 1===_?r.forEach((function(t){var n=t.rect.element.height+u;e+=n,i+=n*t.opacity})):(e=Math.ceil(g/_)*d,i=e),{visual:i,bounds:e}},Qn=function(t){var i=t.ref.measureHeight||null;return{cappedHeight:parseInt(t.style.maxHeight,10)||null,fixedHeight:0===i?null:i}},Jn=function(t,i){var e=t.query("GET_ALLOW_REPLACE"),n=t.query("GET_ALLOW_MULTIPLE"),o=t.query("GET_TOTAL_ITEMS"),a=t.query("GET_MAX_FILES"),r=i.length;return!n&&r>1?(t.dispatch("DID_THROW_MAX_FILES",{source:i,error:ui("warning",0,"Max files")}),!0):!(!n&&e||!(W(a=n?a:1)&&o+r>a)||(t.dispatch("DID_THROW_MAX_FILES",{source:i,error:ui("warning",0,"Max files")}),0))},to=function(t,i,e){var n=t.childViews[0];return Ae(n,i,{left:e.scopeLeft-n.rect.element.left,top:e.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},io=function(t){var i=t.query("GET_ALLOW_DROP"),e=t.query("GET_DISABLED"),n=i&&!e;if(n&&!t.ref.hopper){var o=Ln(t.element,(function(i){var e=t.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!t.query("GET_DROP_VALIDATION")||i.every((function(i){return Dt("ALLOW_HOPPER_ITEM",i,{query:t.query}).every((function(t){return!0===t}))&&e(i)}))}),{filterItems:function(i){var e=t.query("GET_IGNORED_FILES");return i.filter((function(t){return!Ai(t)||!e.includes(t.name.toLowerCase())}))},catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});o.onload=function(i,e){var n=t.ref.list.childViews[0].childViews.filter((function(t){return t.rect.element.height})),o=t.query("GET_ACTIVE_ITEMS").map((function(t){return n.find((function(i){return i.id===t.id}))})).filter((function(t){return t}));Mt("ADD_ITEMS",i,{dispatch:t.dispatch}).then((function(i){if(Jn(t,i))return!1;t.dispatch("ADD_ITEMS",{items:i,index:to(t.ref.list,o,e),interactionMethod:st})})),t.dispatch("DID_DROP",{position:e}),t.dispatch("DID_END_DRAG",{position:e})},o.ondragstart=function(i){t.dispatch("DID_START_DRAG",{position:i})},o.ondrag=$n((function(i){t.dispatch("DID_DRAG",{position:i})})),o.ondragend=function(i){t.dispatch("DID_END_DRAG",{position:i})},t.ref.hopper=o,t.ref.drip=t.appendChildView(t.createChildView(Ke))}else!n&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},eo=function(t,i){var e=t.query("GET_ALLOW_BROWSE"),n=t.query("GET_DISABLED"),o=e&&!n;o&&!t.ref.browser?t.ref.browser=t.appendChildView(t.createChildView(Ve,Object.assign({},i,{onload:function(i){Mt("ADD_ITEMS",i,{dispatch:t.dispatch}).then((function(i){if(Jn(t,i))return!1;t.dispatch("ADD_ITEMS",{items:i,index:-1,interactionMethod:lt})}))}})),0):!o&&t.ref.browser&&(t.removeChildView(t.ref.browser),t.ref.browser=null)},no=function(t){var i=t.query("GET_ALLOW_PASTE"),e=t.query("GET_DISABLED"),n=i&&!e;n&&!t.ref.paster?(t.ref.paster=zn(),t.ref.paster.onload=function(i){Mt("ADD_ITEMS",i,{dispatch:t.dispatch}).then((function(i){if(Jn(t,i))return!1;t.dispatch("ADD_ITEMS",{items:i,index:-1,interactionMethod:ct})}))}):!n&&t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)},oo=S({DID_SET_ALLOW_BROWSE:function(t){eo(t.root,t.props)},DID_SET_ALLOW_DROP:function(t){io(t.root)},DID_SET_ALLOW_PASTE:function(t){no(t.root)},DID_SET_DISABLED:function(t){var i=t.root,e=t.props;io(i),no(i),eo(i,e),i.query("GET_DISABLED")?i.element.dataset.disabled="disabled":i.element.removeAttribute("data-disabled")}}),ao=O({name:"root",read:function(t){var i=t.root;i.ref.measure&&(i.ref.measureHeight=i.ref.measure.offsetHeight)},create:function(t){var i=t.root,e=t.props,n=i.query("GET_ID");n&&(i.element.id=n);var o=i.query("GET_CLASS_NAME");o&&o.split(" ").filter((function(t){return t.length})).forEach((function(t){i.element.classList.add(t)})),i.ref.label=i.appendChildView(i.createChildView($e,Object.assign({},e,{translateY:null,caption:i.query("GET_LABEL_IDLE")}))),i.ref.list=i.appendChildView(i.createChildView(Pe,{translateY:null})),i.ref.panel=i.appendChildView(i.createChildView(xe,{name:"panel-root"})),i.ref.assistant=i.appendChildView(i.createChildView(Yn,Object.assign({},e))),i.ref.data=i.appendChildView(i.createChildView(on,Object.assign({},e))),i.ref.measure=Bi("div"),i.ref.measure.style.height="100%",i.element.appendChild(i.ref.measure),i.ref.bounds=null,i.query("GET_STYLES").filter((function(t){return!G(t.value)})).map((function(t){i.element.dataset[t.name]=t.value})),i.ref.widthPrevious=null,i.ref.widthUpdated=$n((function(){i.ref.updateHistory=[],i.dispatch("DID_RESIZE_ROOT")}),250),i.ref.previousAspectRatio=null,i.ref.updateHistory=[];var a=window.matchMedia("(pointer: fine) and (hover: hover)").matches,r="PointerEvent"in window;i.query("GET_ALLOW_REORDER")&&r&&!a&&(i.element.addEventListener("touchmove",Zn,{passive:!1}),i.element.addEventListener("gesturestart",Zn));var s=i.query("GET_CREDITS");if(2===s.length){var l=document.createElement("a");l.className="filepond--credits",l.setAttribute("aria-hidden","true"),l.href=s[0],l.tabindex=-1,l.target="_blank",l.rel="noopener noreferrer",l.textContent=s[1],i.element.appendChild(l),i.ref.credits=l}},write:function(t){var i=t.root,e=t.actions;if(oo({root:i,props:t.props,actions:e}),e.filter((function(t){return/^DID_SET_STYLE_/.test(t.type)})).filter((function(t){return!G(t.data.value)})).map((function(t){var e=t.data,n=qn(t.type.substring(8).toLowerCase(),"_");i.element.dataset[n]=e.value,i.invalidateLayout()})),!i.rect.element.hidden){i.rect.element.width!==i.ref.widthPrevious&&(i.ref.widthPrevious=i.rect.element.width,i.ref.widthUpdated());var n=i.ref.bounds;n||(n=i.ref.bounds=Qn(i),i.element.removeChild(i.ref.measure),i.ref.measure=null);var o=i.ref,a=o.hopper,r=o.label,s=o.list,l=o.panel;a&&a.updateHopperState();var c=i.query("GET_PANEL_ASPECT_RATIO"),u=i.query("GET_ALLOW_MULTIPLE"),p=i.query("GET_TOTAL_ITEMS"),d=p===(u?i.query("GET_MAX_FILES")||1e6:1),h=e.find((function(t){return"DID_ADD_ITEM"===t.type}));if(d&&h){var f=h.data.interactionMethod;r.opacity=0,u?r.translateY=-40:f===rt?r.translateX=40:r.translateY=f===lt?40:30}else d||(r.opacity=1,r.translateX=0,r.translateY=0);var g=Xn(i),_=Kn(i),m=r.rect.element.height,v=!u||d?0:m,x=d?s.rect.element.marginTop:0,b=0===p?0:s.rect.element.marginBottom,w=v+x+_.visual+b,y=v+x+_.bounds+b;if(s.translateY=Math.max(0,v-s.rect.element.marginTop)-g.top,c){var E=i.rect.element.width,k=E*c;c!==i.ref.previousAspectRatio&&(i.ref.previousAspectRatio=c,i.ref.updateHistory=[]);var I=i.ref.updateHistory;I.push(E);if(I.length>4)for(var T=I.length,A=T-10,M=0,D=T;D>=A;D--)if(I[D]===I[D-2]&&M++,M>=2)return;l.scalable=!1,l.height=k;var R=k-v-(b-g.bottom)-(d?x:0);s.overflow=_.visual>R?R:null,i.height=k}else if(n.fixedHeight){l.scalable=!1;var O=n.fixedHeight-v-(b-g.bottom)-(d?x:0);s.overflow=_.visual>O?O:null}else if(n.cappedHeight){var S=w>=n.cappedHeight,L=Math.min(n.cappedHeight,w);l.scalable=!0,l.height=S?L:L-g.top-g.bottom;var C=L-v-(b-g.bottom)-(d?x:0);s.overflow=w>n.cappedHeight&&_.visual>C?C:null,i.height=Math.min(n.cappedHeight,y-g.top-g.bottom)}else{var P=p>0?g.top+g.bottom:0;l.scalable=!0,l.height=Math.max(m,w-P),i.height=Math.max(m,y-P)}i.ref.credits&&l.heightCurrent&&(i.ref.credits.style.transform="translateY("+l.heightCurrent+"px)")}},destroy:function(t){var i=t.root;i.ref.paster&&i.ref.paster.destroy(),i.ref.hopper&&i.ref.hopper.destroy(),i.element.removeEventListener("touchmove",Zn),i.element.removeEventListener("gesturestart",Zn)},mixins:{styles:["height"]}}),ro=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=null,n=Ot(),a=e(it(n),[Wt,at(n)],[zi,ot(n)]);a.dispatch("SET_OPTIONS",{options:t});var r=function(){document.hidden||a.dispatch("KICK")};document.addEventListener("visibilitychange",r);var s=null,l=!1,c=!1,u=null,p=null,d=function(){l||(l=!0),clearTimeout(s),s=setTimeout((function(){l=!1,u=null,p=null,c&&(c=!1,a.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",d);var h=ao(a,{id:pt()}),f=!1,g=!1,_={_read:function(){l&&(p=window.innerWidth,u||(u=p),c||p===u||(a.dispatch("DID_START_RESIZE"),c=!0)),g&&f&&(f=null===h.element.offsetParent),f||(h._read(),g=h.rect.element.hidden)},_write:function(t){var i=a.processActionQueue().filter((function(t){return!/^SET_/.test(t.type)}));f&&!i.length||(w(i),f=h._write(t,i,c),wt(a.query("GET_ITEMS")),f&&a.processDispatchQueue())}},m=function(t){return function(i){var e={type:t};if(!i)return e;if(i.hasOwnProperty("error")&&(e.error=i.error?Object.assign({},i.error):null),i.status&&(e.status=Object.assign({},i.status)),i.file&&(e.output=i.file),i.source)e.file=i.source;else if(i.item||i.id){var n=i.item?i.item:a.query("GET_ITEM",i.id);e.file=n?bt(n):null}return i.items&&(e.items=i.items.map(bt)),/progress/.test(t)&&(e.progress=i.progress),i.hasOwnProperty("origin")&&i.hasOwnProperty("target")&&(e.origin=i.origin,e.target=i.target),e}},v={DID_DESTROY:m("destroy"),DID_INIT:m("init"),DID_THROW_MAX_FILES:m("warning"),DID_INIT_ITEM:m("initfile"),DID_START_ITEM_LOAD:m("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:m("addfileprogress"),DID_LOAD_ITEM:m("addfile"),DID_THROW_ITEM_INVALID:[m("error"),m("addfile")],DID_THROW_ITEM_LOAD_ERROR:[m("error"),m("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[m("error"),m("removefile")],DID_PREPARE_OUTPUT:m("preparefile"),DID_START_ITEM_PROCESSING:m("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:m("processfileprogress"),DID_ABORT_ITEM_PROCESSING:m("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:m("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:m("processfiles"),DID_REVERT_ITEM_PROCESSING:m("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[m("error"),m("processfile")],DID_REMOVE_ITEM:m("removefile"),DID_UPDATE_ITEMS:m("updatefiles"),DID_ACTIVATE_ITEM:m("activatefile"),DID_REORDER_ITEMS:m("reorderfiles")},b=function(t){var i=Object.assign({pond:z},t);delete i.type,h.element.dispatchEvent(new CustomEvent("FilePond:"+t.type,{detail:i,bubbles:!0,cancelable:!0,composed:!0}));var e=[];t.hasOwnProperty("error")&&e.push(t.error),t.hasOwnProperty("file")&&e.push(t.file);var n=["type","error","file"];Object.keys(t).filter((function(t){return!n.includes(t)})).forEach((function(i){return e.push(t[i])})),z.fire.apply(z,[t.type].concat(e));var o=a.query("GET_ON"+t.type.toUpperCase());o&&o.apply(void 0,e)},w=function(t){t.length&&t.filter((function(t){return v[t.type]})).forEach((function(t){var i=v[t.type];(Array.isArray(i)?i:[i]).forEach((function(i){"DID_INIT_ITEM"===t.type?b(i(t.data)):setTimeout((function(){b(i(t.data))}),0)}))}))},y=function(t){return a.dispatch("SET_OPTIONS",{options:t})},E=function(t){return a.query("GET_ACTIVE_ITEM",t)},k=function(t){return new Promise((function(i,e){a.dispatch("REQUEST_ITEM_PREPARE",{query:t,success:function(t){i(t)},failure:function(t){e(t)}})}))},I=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(e,n){M([{source:t,options:i}],{index:i.index}).then((function(t){return e(t&&t[0])})).catch(n)}))},T=function(t){return t.file&&t.id},A=function(t,i){return"object"!=typeof t||T(t)||i||(i=t,t=void 0),a.dispatch("REMOVE_ITEM",Object.assign({},i,{query:t})),null===a.query("GET_ACTIVE_ITEM",t)},M=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];return new Promise((function(t,e){var n=[],o={};if(P(i[0]))n.push.apply(n,i[0]),Object.assign(o,i[1]||{});else{var r=i[i.length-1];"object"!=typeof r||r instanceof Blob||Object.assign(o,i.pop()),n.push.apply(n,i)}a.dispatch("ADD_ITEMS",{items:n,index:o.index,interactionMethod:rt,success:t,failure:e})}))},D=function(){return a.query("GET_ACTIVE_ITEMS")},R=function(t){return new Promise((function(i,e){a.dispatch("REQUEST_ITEM_PROCESSING",{query:t,success:function(t){i(t)},failure:function(t){e(t)}})}))},O=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];var n=Array.isArray(i[0])?i[0]:i,o=n.length?n:D();return Promise.all(o.map(k))},S=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];var n=Array.isArray(i[0])?i[0]:i;if(!n.length){var o=D().filter((function(t){return!(t.status===yt.IDLE&&t.origin===Et.LOCAL)&&t.status!==yt.PROCESSING&&t.status!==yt.PROCESSING_COMPLETE&&t.status!==yt.PROCESSING_REVERT_ERROR}));return Promise.all(o.map(R))}return Promise.all(n.map(R))},G=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];var n,o=Array.isArray(i[0])?i[0]:i;"object"==typeof o[o.length-1]?n=o.pop():Array.isArray(i[0])&&(n=i[1]);var a=D();return o.length?o.map((function(t){return x(t)?a[t]?a[t].id:null:t})).filter((function(t){return t})).map((function(t){return A(t,n)})):Promise.all(a.map((function(t){return A(t,n)})))},z=Object.assign({},mt(),{},_,{},nt(a,n),{setOptions:y,addFile:I,addFiles:M,getFile:E,processFile:R,prepareFile:k,removeFile:A,moveFile:function(t,i){return a.dispatch("MOVE_ITEM",{query:t,index:i})},getFiles:D,processFiles:S,removeFiles:G,prepareFiles:O,sort:function(t){return a.dispatch("SORT",{compare:t})},browse:function(){var t=h.element.querySelector("input[type=file]");t&&t.click()},destroy:function(){z.fire("destroy",h.element),a.dispatch("ABORT_ALL"),h._destroy(),window.removeEventListener("resize",d),document.removeEventListener("visibilitychange",r),a.dispatch("DID_DESTROY")},insertBefore:function(t){return L(h.element,t)},insertAfter:function(t){return C(h.element,t)},appendTo:function(t){return t.appendChild(h.element)},replaceElement:function(t){L(h.element,t),t.parentNode.removeChild(t),i=t},restoreElement:function(){i&&(C(i,h.element),h.element.parentNode.removeChild(h.element),i=null)},isAttachedTo:function(t){return h.element===t||i===t},element:{get:function(){return h.element}},status:{get:function(){return a.query("GET_STATUS")}}});return a.dispatch("DID_INIT"),o(z)},so=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={};return n(Ot(),(function(t,e){i[t]=e[0]})),ro(Object.assign({},i,{},t))},lo=function(t){return qn(t.replace(/^data-/,""))},co=function t(i,e){n(e,(function(e,o){n(i,(function(t,n){var a,r=new RegExp(e);if(r.test(t)&&(delete i[t],!1!==o))if(U(o))i[o]=n;else{var s=o.group;X(o)&&!i[s]&&(i[s]={}),i[s][(a=t.replace(r,""),a.charAt(0).toLowerCase()+a.slice(1))]=n}})),o.mapping&&t(i[o.group],o.mapping)}))},uo=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=[];n(t.attributes,(function(i){e.push(t.attributes[i])}));var o=e.filter((function(t){return t.name})).reduce((function(i,e){var n=a(t,e.name);return i[lo(e.name)]=n===e.name||n,i}),{});return co(o,i),o},po=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Dt("SET_ATTRIBUTE_TO_OPTION_MAP",e);var n=Object.assign({},i),o=uo("FIELDSET"===t.nodeName?t.querySelector("input[type=file]"):t,e);Object.keys(o).forEach((function(t){X(o[t])?(X(n[t])||(n[t]={}),Object.assign(n[t],o[t])):n[t]=o[t]})),n.files=(i.files||[]).concat(Array.from(t.querySelectorAll("input:not([type=file])")).map((function(t){return{source:t.value,options:{type:t.dataset.type}}})));var a=so(n);return t.files&&Array.from(t.files).forEach((function(t){a.addFile(t)})),a.replaceElement(t),a},ho=function(){return i(arguments.length<=0?void 0:arguments[0])?po.apply(void 0,arguments):so.apply(void 0,arguments)},fo=["fire","_read","_write"],go=function(t){var i={};return vt(t,i,fo),i},_o=function(t,i){return t.replace(/(?:{([a-zA-Z]+)})/g,(function(t,e){return i[e]}))},mo=function(t){var i=new Blob(["(",t.toString(),")()"],{type:"application/javascript"}),e=URL.createObjectURL(i),n=new Worker(e);return{transfer:function(){},post:function(t,i,e){var o=pt();n.onmessage=function(t){t.data.id===o&&i(t.data.message)},n.postMessage({id:o,message:t},e)},terminate:function(){n.terminate(),URL.revokeObjectURL(e)}}},vo=function(t){return new Promise((function(i,e){var n=new Image;n.onload=function(){i(n)},n.onerror=function(t){e(t)},n.src=t}))},xo=function(t,i){var e=t.slice(0,t.size,t.type);return e.lastModifiedDate=t.lastModifiedDate,e.name=i,e},bo=function(t){return xo(t,t.name)},wo=[],yo=function(t){if(!wo.includes(t)){wo.push(t);var i=t({addFilter:Rt,utils:{Type:Tt,forin:n,isString:U,isFile:Ai,toNaturalFileSize:Wi,replaceInString:_o,getExtensionFromFilename:Zt,getFilenameWithoutExtension:Ii,guesstimateMimeType:ln,getFileFromBlob:Jt,getFilenameFromURL:$t,createRoute:S,createWorker:mo,createView:O,createItemAPI:bt,loadImage:vo,copyFile:bo,renameFile:xo,createBlob:ti,applyFilterChain:Mt,text:Fi,getNumericAspectRatioFromString:Ct},views:{fileActionButton:Vi}});Object.assign(St,i.options)}},Eo=(ne=f()&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window&&("supports"in(window.CSS||{})||/MSIE|Trident/.test(window.navigator.userAgent)),function(){return ne}),ko={apps:[]},Io=function(){};if(t.Status={},t.FileStatus={},t.FileOrigin={},t.OptionTypes={},t.create=Io,t.destroy=Io,t.parse=Io,t.find=Io,t.registerPlugin=Io,t.getOptions=Io,t.setOptions=Io,Eo()){!function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,n="__framePainter";if(window[n])return window[n].readers.push(t),void window[n].writers.push(i);window[n]={readers:[t],writers:[i]};var o=window[n],a=1e3/e,r=null,s=null,l=null,c=null,u=function(){document.hidden?(l=function(){return window.setTimeout((function(){return p(performance.now())}),a)},c=function(){return window.clearTimeout(s)}):(l=function(){return window.requestAnimationFrame(p)},c=function(){return window.cancelAnimationFrame(s)})};document.addEventListener("visibilitychange",(function(){c&&c(),u(),p(performance.now())}));var p=function t(i){s=l(t),r||(r=i);var e=i-r;e<=a||(r=i-e%a,o.readers.forEach((function(t){return t()})),o.writers.forEach((function(t){return t(i)})))};u(),p(performance.now())}((function(){ko.apps.forEach((function(t){return t._read()}))}),(function(t){ko.apps.forEach((function(i){return i._write(t)}))}));var To=function i(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Eo,create:t.create,destroy:t.destroy,parse:t.parse,find:t.find,registerPlugin:t.registerPlugin,setOptions:t.setOptions}})),document.removeEventListener("DOMContentLoaded",i)};"loading"!==document.readyState?setTimeout((function(){return To()}),0):document.addEventListener("DOMContentLoaded",To);var Ao=function(){return n(Ot(),(function(i,e){t.OptionTypes[i]=e[1]}))};t.Status=Object.assign({},Gt),t.FileOrigin=Object.assign({},Et),t.FileStatus=Object.assign({},yt),t.OptionTypes={},Ao(),t.create=function(){var i=ho.apply(void 0,arguments);return i.on("destroy",t.destroy),ko.apps.push(i),go(i)},t.destroy=function(t){var i=ko.apps.findIndex((function(i){return i.isAttachedTo(t)}));return i>=0&&(ko.apps.splice(i,1)[0].restoreElement(),!0)},t.parse=function(i){return Array.from(i.querySelectorAll(".filepond")).filter((function(t){return!ko.apps.find((function(i){return i.isAttachedTo(t)}))})).map((function(i){return t.create(i)}))},t.find=function(t){var i=ko.apps.find((function(i){return i.isAttachedTo(t)}));return i?go(i):null},t.registerPlugin=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];i.forEach(yo),Ao()},t.getOptions=function(){var t={};return n(Ot(),(function(i,e){t[i]=e[0]})),t},t.setOptions=function(i){return X(i)&&(ko.apps.forEach((function(t){t.setOptions(i)})),function(t){n(t,(function(t,i){St[t]&&(St[t][0]=J(i,St[t][0],St[t][1]))}))}(i)),t.getOptions()}}t.supported=Eo,Object.defineProperty(t,"__esModule",{value:!0})}(i)})),U=a((function(t){var i;t.exports=(i=function(t){var i=t.addFilter,e=t.utils,n=e.Type,o=e.replaceInString,a=e.toNaturalFileSize;return i("ALLOW_HOPPER_ITEM",(function(t,i){var e=i.query;if(!e("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var n=e("GET_MAX_FILE_SIZE");if(null!==n&&t.size>n)return!1;var o=e("GET_MIN_FILE_SIZE");return!(null!==o&&t.size<o)})),i("LOAD_FILE",(function(t,i){var e=i.query;return new Promise((function(i,n){if(!e("GET_ALLOW_FILE_SIZE_VALIDATION"))return i(t);var r=e("GET_FILE_VALIDATE_SIZE_FILTER");if(r&&!r(t))return i(t);var s=e("GET_MAX_FILE_SIZE");if(null!==s&&t.size>s)n({status:{main:e("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:o(e("GET_LABEL_MAX_FILE_SIZE"),{filesize:a(s,".",e("GET_FILE_SIZE_BASE"),e("GET_FILE_SIZE_LABELS",e))})}});else{var l=e("GET_MIN_FILE_SIZE");if(null!==l&&t.size<l)n({status:{main:e("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:o(e("GET_LABEL_MIN_FILE_SIZE"),{filesize:a(l,".",e("GET_FILE_SIZE_BASE"),e("GET_FILE_SIZE_LABELS",e))})}});else{var c=e("GET_MAX_TOTAL_FILE_SIZE");if(null!==c&&e("GET_ACTIVE_ITEMS").reduce((function(t,i){return t+i.fileSize}),0)>c)return void n({status:{main:e("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:o(e("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:a(c,".",e("GET_FILE_SIZE_BASE"),e("GET_FILE_SIZE_LABELS",e))})}});i(t)}}}))})),{options:{allowFileSizeValidation:[!0,n.BOOLEAN],maxFileSize:[null,n.INT],minFileSize:[null,n.INT],maxTotalFileSize:[null,n.INT],fileValidateSizeFilter:[null,n.FUNCTION],labelMinFileSizeExceeded:["File is too small",n.STRING],labelMinFileSize:["Minimum file size is {filesize}",n.STRING],labelMaxFileSizeExceeded:["File is too large",n.STRING],labelMaxFileSize:["Maximum file size is {filesize}",n.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",n.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",n.STRING]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:i})),i)})),j=a((function(t){
11
- /*!
12
- * FilePondPluginImageExifOrientation 1.0.11
13
- * Licensed under MIT, https://opensource.org/licenses/MIT/
14
- * Please visit https://pqina.nl/filepond/ for details.
15
- */
16
- t.exports=function(){var t=65496,i=65505,e=1165519206,n=18761,o=274,a=65280,r=function(t,i){return t.getUint16(i,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},s=function(t,i){return t.getUint32(i,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},l="undefined"!=typeof window&&void 0!==window.document,c=void 0,u=l?new Image:{};u.onload=function(){return c=u.naturalWidth>u.naturalHeight},u.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var p=function(l){var u=l.utils,p=u.Type,d=u.isFile;return(0,l.addFilter)("DID_LOAD_ITEM",(function(l,u){var p=u.query;return new Promise((function(u){var h=l.file;if(!(d(h)&&function(t){return/^image\/jpeg/.test(t.type)}(h)&&p("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&c))return u(l);(function(l){return new Promise((function(c){var u=new FileReader;u.onload=function(l){var u=new DataView(l.target.result);if(r(u,0)===t){for(var p=u.byteLength,d=2;d<p;){var h=r(u,d);if(d+=2,h===i){if(s(u,d+=2)!==e)break;var f=r(u,d+=6)===n;d+=s(u,d+4,f);var g=r(u,d,f);d+=2;for(var _=0;_<g;_++)if(r(u,d+12*_,f)===o)return void c(r(u,d+12*_+8,f))}else{if((h&a)!==a)break;d+=r(u,d)}}c(-1)}else c(-1)},u.readAsArrayBuffer(l.slice(0,65536))}))})(h).then((function(t){l.setMetadata("exif",{orientation:t}),u(l)}))}))})),{options:{allowImageExifOrientation:[!0,p.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:p})),p}()}));const H=s(a((function(t){
17
- /*!
18
- * FilePondPluginImagePreview 4.6.11
19
- * Licensed under MIT, https://opensource.org/licenses/MIT/
20
- * Please visit https://pqina.nl/filepond/ for details.
21
- */
22
- t.exports=function(){function t(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var e=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(e.push(r.value),!i||e.length!==i);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return e}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=function(t,i){return o(t.x*i,t.y*i)},e=function(t,i){return o(t.x+i.x,t.y+i.y)},n=function(t,i,e){var n=Math.cos(i),a=Math.sin(i),r=o(t.x-e.x,t.y-e.y);return o(e.x+n*r.x-a*r.y,e.y+a*r.x+n*r.y)},o=function(){return{x:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,y:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},a=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;return"string"==typeof t?parseFloat(t)*e:"number"==typeof t?t*(n?i[n]:Math.min(i.width,i.height)):void 0},r=function(t){return null!=t},s=function(t,i){return Object.keys(i).forEach((function(e){return t.setAttribute(e,i[e])}))},l=function(t,i){var e=document.createElementNS("http://www.w3.org/2000/svg",t);return i&&s(e,i),e},c={contain:"xMidYMid meet",cover:"xMidYMid slice"},u={left:"start",center:"middle",right:"end"},p=function(t){return function(i){return l(t,{id:i.id})}},d={image:function(t){var i=l("image",{id:t.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return i.onload=function(){i.setAttribute("opacity",t.opacity||1)},i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.src),i},rect:p("rect"),ellipse:p("ellipse"),text:p("text"),path:p("path"),line:function(t){var i=l("g",{id:t.id,"stroke-linecap":"round","stroke-linejoin":"round"}),e=l("line");i.appendChild(e);var n=l("path");i.appendChild(n);var o=l("path");return i.appendChild(o),i}},h={rect:function(t){return s(t,Object.assign({},t.rect,t.styles))},ellipse:function(t){return s(t,Object.assign({cx:t.rect.x+.5*t.rect.width,cy:t.rect.y+.5*t.rect.height,rx:.5*t.rect.width,ry:.5*t.rect.height},t.styles))},image:function(t,i){s(t,Object.assign({},t.rect,t.styles,{preserveAspectRatio:c[i.fit]||"none"}))},text:function(t,i,e,n){var o=a(i.fontSize,e,n);s(t,Object.assign({},t.rect,t.styles,{"stroke-width":0,"font-weight":i.fontWeight||"normal","font-size":o,"font-family":i.fontFamily||"sans-serif","text-anchor":u[i.textAlign]||"start"})),t.text!==i.text&&(t.text=i.text,t.textContent=i.text.length?i.text:" ")},path:function(t,i,e,n){var o;s(t,Object.assign({},t.styles,{fill:"none",d:(o=i.points.map((function(t){return{x:a(t.x,e,n,"width"),y:a(t.y,e,n,"height")}})),o.map((function(t,i){return"".concat(0===i?"M":"L"," ").concat(t.x," ").concat(t.y)})).join(" "))}))},line:function(t,r,l,c){s(t,Object.assign({},t.rect,t.styles,{fill:"none"}));var u=t.childNodes[1],p=t.childNodes[2],d=t.rect,h={x:t.rect.x+t.rect.width,y:t.rect.y+t.rect.height};if(s(t.childNodes[0],{x1:d.x,y1:d.y,x2:h.x,y2:h.y}),r.lineDecoration){u.style.display="none",p.style.display="none";var f=function(t){var i=Math.sqrt(t.x*t.x+t.y*t.y);return 0===i?{x:0,y:0}:o(t.x/i,t.y/i)}({x:h.x-d.x,y:h.y-d.y}),g=a(.05,l,c);if(-1!==r.lineDecoration.indexOf("arrow-begin")){var _=i(f,g),m=e(d,_),v=n(d,2,m),x=n(d,-2,m);s(u,{style:"display:block;",d:"M".concat(v.x,",").concat(v.y," L").concat(d.x,",").concat(d.y," L").concat(x.x,",").concat(x.y)})}if(-1!==r.lineDecoration.indexOf("arrow-end")){var b=i(f,-g),w=e(h,b),y=n(h,2,w),E=n(h,-2,w);s(p,{style:"display:block;",d:"M".concat(y.x,",").concat(y.y," L").concat(h.x,",").concat(h.y," L").concat(E.x,",").concat(E.y)})}}}},f=function(t,i,e,n,o){"path"!==i&&(t.rect=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=a(t.x,i,e,"width")||a(t.left,i,e,"width"),o=a(t.y,i,e,"height")||a(t.top,i,e,"height"),s=a(t.width,i,e,"width"),l=a(t.height,i,e,"height"),c=a(t.right,i,e,"width"),u=a(t.bottom,i,e,"height");return r(o)||(o=r(l)&&r(u)?i.height-l-u:u),r(n)||(n=r(s)&&r(c)?i.width-s-c:c),r(s)||(s=r(n)&&r(c)?i.width-n-c:0),r(l)||(l=r(o)&&r(u)?i.height-o-u:0),{x:n||0,y:o||0,width:s||0,height:l||0}}(e,n,o)),t.styles=function(t,i,e){var n=t.borderStyle||t.lineStyle||"solid",o=t.backgroundColor||t.fontColor||"transparent",r=t.borderColor||t.lineColor||"transparent",s=a(t.borderWidth||t.lineWidth,i,e);return{"stroke-linecap":t.lineCap||"round","stroke-linejoin":t.lineJoin||"round","stroke-width":s||0,"stroke-dasharray":"string"==typeof n?"":n.map((function(t){return a(t,i,e)})).join(","),stroke:r,fill:o,opacity:t.opacity||1}}(e,n,o),h[i](t,e,n,o)},g=["x","y","left","top","right","bottom","width","height"],_=function(i){var e=t(i,2),n=e[0],o=e[1],a=o.points?{}:g.reduce((function(t,i){return t[i]="string"==typeof(e=o[i])&&/%/.test(e)?parseFloat(e)/100:e,t;var e}),{});return[n,Object.assign({zIndex:0},o,a)]},m=function(t,i){return t[1].zIndex>i[1].zIndex?1:t[1].zIndex<i[1].zIndex?-1:0},v=function(i){return i.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:function(i){var e=i.root,n=i.props;if(n.dirty){var o=n.crop,a=n.resize,r=n.markup,s=n.width,l=n.height,c=o.width,u=o.height;if(a){var p=a.size,h=p&&p.width,g=p&&p.height,v=a.mode;h&&!g&&(g=h),g&&!h&&(h=g);var x=c<h&&u<g;if(!x||x&&a.upscale){var b,w=h/c,y=g/u;"force"===v?(c=h,u=g):("cover"===v?b=Math.max(w,y):"contain"===v&&(b=Math.min(w,y)),c*=b,u*=b)}}var E={width:s,height:l};e.element.setAttribute("width",E.width),e.element.setAttribute("height",E.height);var k=Math.min(s/c,l/u);e.element.innerHTML="";var I=e.query("GET_IMAGE_PREVIEW_MARKUP_FILTER");r.filter(I).map(_).sort(m).forEach((function(i){var n=t(i,2),o=n[0],a=n[1],r=function(t,i){return d[t](i)}(o,a);f(r,o,a,E,k),e.element.appendChild(r)}))}}})},x=function(t,i){return{x:t,y:i}},b=function(t,i){return x(t.x-i.x,t.y-i.y)},w=function(t,i){return Math.sqrt(function(t,i){return function(t,i){return t.x*i.x+t.y*i.y}(b(t,i),b(t,i))}(t,i))},y=function(t,i){var e=t,n=i,o=1.5707963267948966-i,a=Math.sin(1.5707963267948966),r=Math.sin(n),s=Math.sin(o),l=Math.cos(o),c=e/a;return x(l*(c*r),l*(c*s))},E=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=t.height/t.width,o=1,a=n;a>i&&(o=(a=i)/n);var r=Math.max(1/o,i/a),s=t.width/(e*r*o);return{width:s,height:s*i}},k=function(t,i,e,n){var o=2*(n.x>.5?1-n.x:n.x)*t.width,a=2*(n.y>.5?1-n.y:n.y)*t.height,r=function(t,i){var e=t.height,n=y(t.width,i),o=y(e,i),a=x(t.x+Math.abs(n.x),t.y-Math.abs(n.y)),r=x(t.x+t.width+Math.abs(o.y),t.y+Math.abs(o.x)),s=x(t.x-Math.abs(o.y),t.y+t.height-Math.abs(o.x));return{width:w(a,r),height:w(a,s)}}(i,e);return Math.max(r.width/o,r.height/a)},I=function(t,i){var e=t.width,n=e*i;return n>t.height&&(e=(n=t.height)/i),{x:.5*(t.width-e),y:.5*(t.height-n),width:e,height:n}},T={type:"spring",stiffness:.5,damping:.45,mass:10},A=function(t){return t.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function(t){var i=t.props;i.background&&(t.root.element.style.backgroundColor=i.background)},create:function(i){var e=i.root,n=i.props;e.ref.image=e.appendChildView(e.createChildView(function(t){return t.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:T,originY:T,scaleX:T,scaleY:T,translateX:T,translateY:T,rotateZ:T}},create:function(i){var e=i.root,n=i.props;n.width=n.image.width,n.height=n.image.height,e.ref.bitmap=e.appendChildView(e.createChildView(function(t){return t.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:function(t){t.root.appendChild(t.props.image)}})}(t),{image:n.image}))},write:function(t){var i=t.props.crop.flip,e=t.root.ref.bitmap;e.scaleX=i.horizontal?-1:1,e.scaleY=i.vertical?-1:1}})}(t),Object.assign({},n))),e.ref.createMarkup=function(){e.ref.markup||(e.ref.markup=e.appendChildView(e.createChildView(v(t),Object.assign({},n))))},e.ref.destroyMarkup=function(){e.ref.markup&&(e.removeChildView(e.ref.markup),e.ref.markup=null)};var o=e.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");null!==o&&(e.element.dataset.transparencyIndicator="grid"===o?o:"color")},write:function(t){var i=t.root,e=t.props,n=t.shouldOptimize,o=e.crop,a=e.markup,r=e.resize,s=e.dirty,l=e.width,c=e.height;i.ref.image.crop=o;var u={x:0,y:0,width:l,height:c,center:{x:.5*l,y:.5*c}},p={width:i.ref.image.width,height:i.ref.image.height},d={x:o.center.x*p.width,y:o.center.y*p.height},h={x:u.center.x-p.width*o.center.x,y:u.center.y-p.height*o.center.y},f=2*Math.PI+o.rotation%(2*Math.PI),g=void 0===o.scaleToFit||o.scaleToFit,_=k(p,I(u,o.aspectRatio||p.height/p.width),f,g?o.center:{x:.5,y:.5}),m=o.zoom*_;a&&a.length?(i.ref.createMarkup(),i.ref.markup.width=l,i.ref.markup.height=c,i.ref.markup.resize=r,i.ref.markup.dirty=s,i.ref.markup.markup=a,i.ref.markup.crop=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=i.zoom,n=i.rotation,o=i.center,a=i.aspectRatio;a||(a=t.height/t.width);var r=E(t,a,e),s=void 0===i.scaleToFit||i.scaleToFit,l=e*k(t,I({x:0,y:0,width:r.width,height:r.height,center:{x:.5*r.width,y:.5*r.height}},a),n,s?o:{x:.5,y:.5});return{widthFloat:r.width/l,heightFloat:r.height/l,width:Math.round(r.width/l),height:Math.round(r.height/l)}}(p,o)):i.ref.markup&&i.ref.destroyMarkup();var v=i.ref.image;if(n)return v.originX=null,v.originY=null,v.translateX=null,v.translateY=null,v.rotateZ=null,v.scaleX=null,void(v.scaleY=null);v.originX=d.x,v.originY=d.y,v.translateX=h.x,v.translateY=h.y,v.rotateZ=f,v.scaleX=m,v.scaleY=m}})},M=0,D=function(){self.onmessage=function(t){createImageBitmap(t.data.message.file).then((function(i){self.postMessage({id:t.data.id,message:i},[i])}))}},R=function(){self.onmessage=function(t){for(var i=t.data.message.imageData,e=t.data.message.colorMatrix,n=i.data,o=n.length,a=e[0],r=e[1],s=e[2],l=e[3],c=e[4],u=e[5],p=e[6],d=e[7],h=e[8],f=e[9],g=e[10],_=e[11],m=e[12],v=e[13],x=e[14],b=e[15],w=e[16],y=e[17],E=e[18],k=e[19],I=0,T=0,A=0,M=0,D=0;I<o;I+=4)T=n[I]/255,A=n[I+1]/255,M=n[I+2]/255,D=n[I+3]/255,n[I]=Math.max(0,Math.min(255*(T*a+A*r+M*s+D*l+c),255)),n[I+1]=Math.max(0,Math.min(255*(T*u+A*p+M*d+D*h+f),255)),n[I+2]=Math.max(0,Math.min(255*(T*g+A*_+M*m+D*v+x),255)),n[I+3]=Math.max(0,Math.min(255*(T*b+A*w+M*y+D*E+k),255));self.postMessage({id:t.data.id,message:i},[i.data.buffer])}},O={1:function(){return[1,0,0,1,0,0]},2:function(t){return[-1,0,0,1,t,0]},3:function(t,i){return[-1,0,0,-1,t,i]},4:function(t,i){return[1,0,0,-1,0,i]},5:function(){return[0,1,1,0,0,0]},6:function(t,i){return[0,1,-1,0,i,0]},7:function(t,i){return[0,-1,-1,0,i,t]},8:function(t){return[0,-1,1,0,0,t]}},S=function(t,i,e,n){i=Math.round(i),e=Math.round(e);var o=document.createElement("canvas");o.width=i,o.height=e;var a=o.getContext("2d");if(n>=5&&n<=8){var r=[e,i];i=r[0],e=r[1]}return function(t,i,e,n){-1!==n&&t.transform.apply(t,O[n](i,e))}(a,i,e,n),a.drawImage(t,0,0,i,e),o},L=function(t){return/^image/.test(t.type)&&!/svg/.test(t.type)},C=function(t){var i=Math.min(10/t.width,10/t.height),e=document.createElement("canvas"),n=e.getContext("2d"),o=e.width=Math.ceil(t.width*i),a=e.height=Math.ceil(t.height*i);n.drawImage(t,0,0,o,a);var r=null;try{r=n.getImageData(0,0,o,a).data}catch(t){return null}for(var s=r.length,l=0,c=0,u=0,p=0;p<s;p+=4)l+=r[p]*r[p],c+=r[p+1]*r[p+1],u+=r[p+2]*r[p+2];return{r:l=P(l,s),g:c=P(c,s),b:u=P(u,s)}},P=function(t,i){return Math.floor(Math.sqrt(t/(i/4)))},G=function(t){var i=t.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:function(t){var i=t.root,e=t.props,n='<svg width="500" height="200" viewBox="0 0 500 200" preserveAspectRatio="none">\n <defs>\n <radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">\n <stop offset=\'50%\' stop-color=\'#000000\'/>\n <stop offset=\'56%\' stop-color=\'#0a0a0a\'/>\n <stop offset=\'63%\' stop-color=\'#262626\'/>\n <stop offset=\'69%\' stop-color=\'#4f4f4f\'/>\n <stop offset=\'75%\' stop-color=\'#808080\'/>\n <stop offset=\'81%\' stop-color=\'#b1b1b1\'/>\n <stop offset=\'88%\' stop-color=\'#dadada\'/>\n <stop offset=\'94%\' stop-color=\'#f6f6f6\'/>\n <stop offset=\'100%\' stop-color=\'#ffffff\'/>\n </radialGradient>\n <mask id="mask-__UID__">\n <rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>\n </mask>\n </defs>\n <rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>\n</svg>';if(document.querySelector("base")){var o=new URL(window.location.href.replace(window.location.hash,"")).href;n=n.replace(/url\(\#/g,"url("+o+"#")}M++,i.element.classList.add("filepond--image-preview-overlay-".concat(e.status)),i.element.innerHTML=n.replace(/__UID__/g,M)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),e=function(t){return t.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:T,scaleY:T,translateY:T,opacity:{type:"tween",duration:400}}},create:function(i){var e=i.root,n=i.props;e.ref.clip=e.appendChildView(e.createChildView(A(t),{id:n.id,image:n.image,crop:n.crop,markup:n.markup,resize:n.resize,dirty:n.dirty,background:n.background}))},write:function(t){var i=t.root,e=t.props,n=t.shouldOptimize,o=i.ref.clip,a=e.image,r=e.crop,s=e.markup,l=e.resize,c=e.dirty;if(o.crop=r,o.markup=s,o.resize=l,o.dirty=c,o.opacity=n?0:1,!n&&!i.rect.element.hidden){var u=r.aspectRatio||a.height/a.width,p=i.rect.inner.width,d=i.rect.inner.height,h=i.query("GET_IMAGE_PREVIEW_HEIGHT"),f=i.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),g=i.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),_=i.query("GET_PANEL_ASPECT_RATIO"),m=i.query("GET_ALLOW_MULTIPLE");_&&!m&&(h=p*_,u=_);var v=null!==h?h:Math.max(f,Math.min(p*u,g)),x=v/u;x>p&&(v=(x=p)*u),v>d&&(v=d,x=d/u),o.width=x,o.height=v}}})}(t),n=t.utils.createWorker,o=function(t,i,e){return new Promise((function(o){t.ref.imageData||(t.ref.imageData=e.getContext("2d").getImageData(0,0,e.width,e.height));var a=function(t){var i;try{i=new ImageData(t.width,t.height)}catch(e){i=document.createElement("canvas").getContext("2d").createImageData(t.width,t.height)}return i.data.set(new Uint8ClampedArray(t.data)),i}(t.ref.imageData);if(!i||20!==i.length)return e.getContext("2d").putImageData(a,0,0),o();var r=n(R);r.post({imageData:a,colorMatrix:i},(function(t){e.getContext("2d").putImageData(t,0,0),r.terminate(),o()}),[a.data.buffer])}))},a=function(t){var i=t.root,n=t.image,o=t.props.id,a=i.query("GET_ITEM",{id:o});if(a){var r,s,l=a.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},c=i.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),u=!1;i.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(r=a.getMetadata("markup")||[],s=a.getMetadata("resize"),u=!0);var p=i.appendChildView(i.createChildView(e,{id:o,image:n,crop:l,resize:s,markup:r,dirty:u,background:c,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),i.childViews.length);i.ref.images.push(p),p.opacity=1,p.scaleX=1,p.scaleY=1,p.translateY=0,setTimeout((function(){i.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:o})}),250)}},r=function(t){var i=t.root;i.ref.overlayShadow.opacity=1,i.ref.overlayError.opacity=0,i.ref.overlaySuccess.opacity=0},s=function(t){var i=t.root;i.ref.overlayShadow.opacity=.25,i.ref.overlayError.opacity=1};return t.utils.createView({name:"image-preview-wrapper",create:function(t){var e=t.root;e.ref.images=[],e.ref.imageData=null,e.ref.imageViewBin=[],e.ref.overlayShadow=e.appendChildView(e.createChildView(i,{opacity:0,status:"idle"})),e.ref.overlaySuccess=e.appendChildView(e.createChildView(i,{opacity:0,status:"success"})),e.ref.overlayError=e.appendChildView(e.createChildView(i,{opacity:0,status:"failure"}))},styles:["height"],apis:["height"],destroy:function(t){t.root.ref.images.forEach((function(t){t.image.width=1,t.image.height=1}))},didWriteView:function(t){t.root.ref.images.forEach((function(t){t.dirty=!1}))},write:t.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:function(t){var i=t.root,e=i.ref.images[i.ref.images.length-1];e.translateY=0,e.scaleX=1,e.scaleY=1,e.opacity=1},DID_IMAGE_PREVIEW_CONTAINER_CREATE:function(t){var i,e,n,o=t.root,a=t.props.id,r=o.query("GET_ITEM",a);if(r){var s=URL.createObjectURL(r.file);i=s,e=function(t,i){o.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:a,width:t,height:i})},(n=new Image).onload=function(){var t=n.naturalWidth,i=n.naturalHeight;n=null,e(t,i)},n.src=i}},DID_FINISH_CALCULATE_PREVIEWSIZE:function(t){var i,e,r=t.root,s=t.props,l=r.query("GET_ITEM",s.id);if(l){var c=URL.createObjectURL(l.file),u=function(){var t;(t=c,new Promise((function(i,e){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){i(n)},n.onerror=function(t){e(t)},n.src=t}))).then(p)},p=function(t){URL.revokeObjectURL(c);var i=(l.getMetadata("exif")||{}).orientation||-1,e=t.width,n=t.height;if(e&&n){if(i>=5&&i<=8){var u=[n,e];e=u[0],n=u[1]}var p=Math.max(1,.75*window.devicePixelRatio),d=r.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*p,h=n/e,f=r.rect.element.width,g=r.rect.element.height,_=f,m=_*h;h>1?m=(_=Math.min(e,f*d))*h:_=(m=Math.min(n,g*d))/h;var v=S(t,_,m,i),x=function(){var i=r.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?C(data):null;l.setMetadata("color",i,!0),"close"in t&&t.close(),r.ref.overlayShadow.opacity=1,a({root:r,props:s,image:v})},b=l.getMetadata("filter");b?o(r,b,v).then(x):x()}};if(i=l.file,((e=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./))?parseInt(e[1]):null)<=58||!("createImageBitmap"in window)||!L(i))u();else{var d=n(D);d.post({file:l.file},(function(t){d.terminate(),t?p(t):u()}))}}},DID_UPDATE_ITEM_METADATA:function(t){var i,e,n=t.root,r=t.props,s=t.action;if(/crop|filter|markup|resize/.test(s.change.key)&&n.ref.images.length){var l=n.query("GET_ITEM",{id:r.id});if(l)if(/filter/.test(s.change.key))o(n,s.change.value,n.ref.images[n.ref.images.length-1].image);else if(/crop|markup|resize/.test(s.change.key)){var c=l.getMetadata("crop"),u=n.ref.images[n.ref.images.length-1];if(c&&c.aspectRatio&&u.crop&&u.crop.aspectRatio&&Math.abs(c.aspectRatio-u.crop.aspectRatio)>1e-5){var p=function(t){var i=t.root,e=i.ref.images.shift();return e.opacity=0,e.translateY=-15,i.ref.imageViewBin.push(e),e}({root:n});a({root:n,props:r,image:(i=p.image,(e=e||document.createElement("canvas")).width=i.width,e.height=i.height,e.getContext("2d").drawImage(i,0,0),e)})}else!function(t){var i=t.root,e=i.query("GET_ITEM",{id:t.props.id});if(e){var n=i.ref.images[i.ref.images.length-1];n.crop=e.getMetadata("crop"),n.background=i.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),i.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(n.dirty=!0,n.resize=e.getMetadata("resize"),n.markup=e.getMetadata("markup"))}}({root:n,props:r})}}},DID_THROW_ITEM_LOAD_ERROR:s,DID_THROW_ITEM_PROCESSING_ERROR:s,DID_THROW_ITEM_INVALID:s,DID_COMPLETE_ITEM_PROCESSING:function(t){var i=t.root;i.ref.overlayShadow.opacity=.25,i.ref.overlaySuccess.opacity=1},DID_START_ITEM_PROCESSING:r,DID_REVERT_ITEM_PROCESSING:r},(function(t){var i=t.root,e=i.ref.imageViewBin.filter((function(t){return 0===t.opacity}));i.ref.imageViewBin=i.ref.imageViewBin.filter((function(t){return t.opacity>0})),e.forEach((function(t){return function(t,i){t.removeChildView(i),i.image.width=1,i.image.height=1,i._destroy()}(i,t)})),e.length=0}))})},z=function(t){var i=t.addFilter,e=t.utils,n=e.Type,o=e.createRoute,a=e.isFile,r=G(t);return i("CREATE_VIEW",(function(t){var i=t.view,e=t.query;if((0,t.is)("file")&&e("GET_ALLOW_IMAGE_PREVIEW")){var n=function(t){t.root.ref.shouldRescale=!0};i.registerWriter(o({DID_RESIZE_ROOT:n,DID_STOP_RESIZE:n,DID_LOAD_ITEM:function(t){var n=t.root,o=t.props.id,s=e("GET_ITEM",o);if(s&&a(s.file)&&!s.archived){var l=s.file;if(function(t){return/^image/.test(t.type)}(l)&&e("GET_IMAGE_PREVIEW_FILTER_ITEM")(s)){var c="createImageBitmap"in(window||{}),u=e("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!(!c&&u&&l.size>u)){n.ref.imagePreview=i.appendChildView(i.createChildView(r,{id:o}));var p=n.query("GET_IMAGE_PREVIEW_HEIGHT");p&&n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:s.id,height:p});var d=!c&&l.size>e("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");n.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:o},d)}}}},DID_IMAGE_PREVIEW_CALCULATE_SIZE:function(t){var i=t.root,e=t.action;i.ref.imageWidth=e.width,i.ref.imageHeight=e.height,i.ref.shouldRescale=!0,i.ref.shouldDrawPreview=!0,i.dispatch("KICK")},DID_UPDATE_ITEM_METADATA:function(t){"crop"===t.action.change.key&&(t.root.ref.shouldRescale=!0)}},(function(t){var i=t.root,e=t.props;i.ref.imagePreview&&(i.rect.element.hidden||(i.ref.shouldRescale&&(function(t,i){if(t.ref.imagePreview){var e=t.query("GET_ITEM",{id:i.id});if(e){var n=t.query("GET_PANEL_ASPECT_RATIO"),o=t.query("GET_ITEM_PANEL_ASPECT_RATIO"),a=t.query("GET_IMAGE_PREVIEW_HEIGHT");if(!(n||o||a)){var r=t.ref,s=r.imageWidth,l=r.imageHeight;if(s&&l){var c=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),u=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),p=(e.getMetadata("exif")||{}).orientation||-1;if(p>=5&&p<=8){var d=[l,s];s=d[0],l=d[1]}if(!L(e.file)||t.query("GET_IMAGE_PREVIEW_UPSCALE")){var h=2048/s;s*=h,l*=h}var f=l/s,g=(e.getMetadata("crop")||{}).aspectRatio||f,_=Math.max(c,Math.min(l,u)),m=Math.min(t.rect.element.width*g,_);t.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:e.id,height:m})}}}}}(i,e),i.ref.shouldRescale=!1),i.ref.shouldDrawPreview&&(requestAnimationFrame((function(){requestAnimationFrame((function(){i.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:e.id})}))})),i.ref.shouldDrawPreview=!1)))})))}})),{options:{allowImagePreview:[!0,n.BOOLEAN],imagePreviewFilterItem:[function(){return!0},n.FUNCTION],imagePreviewHeight:[null,n.INT],imagePreviewMinHeight:[44,n.INT],imagePreviewMaxHeight:[256,n.INT],imagePreviewMaxFileSize:[null,n.INT],imagePreviewZoomFactor:[2,n.INT],imagePreviewUpscale:[!1,n.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,n.INT],imagePreviewTransparencyIndicator:[null,n.STRING],imagePreviewCalculateAverageImageColor:[!1,n.BOOLEAN],imagePreviewMarkupShow:[!0,n.BOOLEAN],imagePreviewMarkupFilter:[function(){return!0},n.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:z})),z}()})));var V=a((function(t){var i,e;t.exports=(i=function(t){return/^image/.test(t.type)},e=function(t){var e=t.addFilter,n=t.utils,o=n.Type,a=n.createRoute,r=n.createItemAPI,s=void 0===r?function(t){return t}:r,l=t.views.fileActionButton;e("SHOULD_REMOVE_ON_REVERT",(function(t,e){var n=e.item,o=e.query;return new Promise((function(t){var e=n.file;t(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&i(e)))}))})),e("DID_LOAD_ITEM",(function(t,e){var n=e.query,o=e.dispatch;return new Promise((function(e,a){if(t.origin>1)e(t);else{var r=t.file;if(n("GET_ALLOW_IMAGE_EDIT")&&n("GET_IMAGE_EDIT_INSTANT_EDIT"))if(i(r)){var s=function(t,i,e){return function(n){c.shift(),n?i(t):e(t),o("KICK"),l()}},l=function(){if(c.length){var t=c[0],i=t.item;o("EDIT_ITEM",{id:i.id,handleEditorResponse:s(i,t.resolve,t.reject)})}};u({item:t,resolve:e,reject:a}),1===c.length&&l()}else e(t);else e(t)}}))})),e("DID_CREATE_ITEM",(function(t,i){var e=i.dispatch;t.extend("edit",(function(){e("EDIT_ITEM",{id:t.id})}))}));var c=[],u=function(t){return c.push(t),t};return e("CREATE_VIEW",(function(t){var e=t.is,n=t.view,o=t.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(e("file-info")&&!r||e("file")&&r){var c=o("GET_IMAGE_EDIT_EDITOR");if(c){c.filepondCallbackBridge||(c.outputData=!0,c.outputFile=!1,c.filepondCallbackBridge={onconfirm:c.onconfirm||function(){},oncancel:c.oncancel||function(){}});n.registerDestroyer((function(t){var i=t.root;i.ref.buttonEditItem&&i.ref.buttonEditItem.off("click",i.ref.handleEdit),i.ref.editButton&&i.ref.editButton.removeEventListener("click",i.ref.handleEdit)}));var u={EDIT_ITEM:function(t){var i=t.root,e=t.props.id,n=t.action.handleEditorResponse;c.cropAspectRatio=i.query("GET_IMAGE_CROP_ASPECT_RATIO")||c.cropAspectRatio,c.outputCanvasBackgroundColor=i.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||c.outputCanvasBackgroundColor;var o=i.query("GET_ITEM",e);if(o){var a=o.file,r=o.getMetadata("crop"),l=o.getMetadata("resize"),u=o.getMetadata("filter")||null,p=o.getMetadata("filters")||null,d=o.getMetadata("colors")||null,h=o.getMetadata("markup")||null,f={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:l?{upscale:l.upscale,mode:l.mode,width:l.size.width,height:l.size.height}:null,filter:p?p.id||p.matrix:i.query("GET_ALLOW_IMAGE_FILTER")&&i.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!d?u:null,color:d,markup:h};c.onconfirm=function(t){var i=t.data,e=i.crop,a=i.size,r=i.filter,l=i.color,u=i.colorMatrix,p=i.markup,d={};if(e&&(d.crop=e),a){var h=(o.getMetadata("resize")||{}).size,f={width:a.width,height:a.height};f.width&&f.height||!h||(f.width=h.width,f.height=h.height),(f.width||f.height)&&(d.resize={upscale:a.upscale,mode:a.mode,size:f})}p&&(d.markup=p),d.colors=l,d.filters=r,d.filter=u,o.setMetadata(d),c.filepondCallbackBridge.onconfirm(i,s(o)),n&&(c.onclose=function(){n(!0),c.onclose=null})},c.oncancel=function(){c.filepondCallbackBridge.oncancel(s(o)),n&&(c.onclose=function(){n(!1),c.onclose=null})},c.open(a,f)}},DID_LOAD_ITEM:function(t){var e=t.root,a=t.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var s=a.id,c=o("GET_ITEM",s);if(c&&i(c.file))if(e.ref.handleEdit=function(t){t.stopPropagation(),e.dispatch("EDIT_ITEM",{id:s})},r){var u=n.createChildView(l,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",e.ref.handleEdit),e.ref.buttonEditItem=n.appendChildView(u)}else{var p=n.element.querySelector(".filepond--file-info-main"),d=document.createElement("button");d.className="filepond--action-edit-item-alt",d.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",d.addEventListener("click",e.ref.handleEdit),p.appendChild(d),e.ref.editButton=d}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(t){var i=t.root;i.ref.buttonEditItem&&(i.ref.buttonEditItem.opacity=1)}),n.registerWriter(a(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e)}));const W=class{constructor(i){t(this,i),this.remove=o(this,"remove",7),this.required=!1,this.disabled=!1,this.allowDrop=!0,this.allowBrowse=!0,this.allowPaste=!0,this.allowMultiple=!1,this.allowReplace=!0,this.allowRevert=!0,this.allowRemove=!0,this.allowProcess=!0,this.allowReorder=!1,this.storeAsFile=!1,this.forceRevert=!1,this.maxFilesCount=null,this.maxParallelUploads=2,this.checkValidity=!1,this.itemInsertLocation="after",this.itemInsertInterval=75,this.credits=!1,this.dropOnPage=!1,this.dropOnElement=!0,this.dropValidation=!1,this.ignoredFiles=[".ds_store","thumbs.db","desktop.ini"],this.serverConfig=null,this.instantUpload=!1,this.chunkUploads=!1,this.chunkForce=!1,this.chunkSize=5e6,this.chunkRetryDelays=[500,1e3,3e3],this.labelDecimalSeparator=void 0,this.labelThousandsSeparator=void 0,this.labelIdle=`${salla.lang.get("common.uploader.drag_and_drop")}<span class="filepond--label-action"> ${salla.lang.get("common.uploader.browse")} </span>`,this.labelInvalidField=salla.lang.get("common.uploader.invalid_field"),this.labelFileWaitingForSize=salla.lang.get("common.uploader.waiting_file_info"),this.labelFileSizeNotAvailable=salla.lang.get("common.uploader.size_not_available"),this.labelFileLoading=salla.lang.get("common.elements.loading"),this.labelFileLoadError=salla.lang.get("common.uploader.failed_to_load"),this.labelFileProcessing=salla.lang.get("common.uploader.uploading"),this.labelFileProcessingComplete=salla.lang.get("common.uploader.upload_completed"),this.labelFileProcessingAborted=salla.lang.get("common.uploader.upload_cancelled"),this.labelFileProcessingError=salla.lang.get("common.uploader.error_uploading"),this.labelFileProcessingRevertError=salla.lang.get("common.uploader.error_reverting"),this.labelFileRemoveError=salla.lang.get("common.uploader.error_removing"),this.labelTapToCancel=salla.lang.get("common.elements.cancel"),this.labelTapToRetry=salla.lang.get("common.elements.retry"),this.labelTapToUndo=salla.lang.get("common.uploader.revert"),this.labelButtonRemoveItem=salla.lang.get("common.elements.remove"),this.labelButtonAbortItemLoad=salla.lang.get("common.elements.abort"),this.labelButtonRetryItemLoad=salla.lang.get("common.elements.retry"),this.labelButtonAbortItemProcessing=salla.lang.get("common.uploader.abort_upload"),this.labelButtonUndoItemProcessing=salla.lang.get("common.elements.undo"),this.labelButtonRetryItemProcessing=`${salla.lang.get("common.elements.retry")} ${salla.lang.get("common.uploader.upload")}`,this.labelButtonProcessItem=salla.lang.get("common.uploader.upload"),this.iconRemove="<svg>...</svg>",this.iconProcess="<svg>...</svg>",this.iconRetry="<svg>...</svg>",this.iconUndo="<svg>...</svg>",this.files=[]}async appendFile(t){return this.pond.files=[t]}componentDidLoad(){this.pond=this.intiFilePond()}intiFilePond(){return F.registerPlugin(H,j,U,V),F.create(document.querySelector(".s-file-upload-input"),{files:this.files,required:this.required,disabled:this.disabled,allowDrop:this.allowDrop,allowBrowse:this.allowBrowse,allowPaste:this.allowPaste,allowMultiple:this.allowMultiple,allowReplace:this.allowReplace,allowRevert:this.allowRevert,allowProcess:this.allowProcess,allowReorder:this.allowReorder,storeAsFile:this.storeAsFile,forceRevert:this.forceRevert,maxFiles:this.maxFilesCount,maxParallelUploads:this.maxParallelUploads,checkValidity:this.checkValidity,itemInsertLocation:this.itemInsertLocation,itemInsertInterval:this.itemInsertInterval,credits:this.credits,dropOnPage:this.dropOnPage,dropOnElement:this.dropOnElement,dropValidation:this.dropValidation,ignoredFiles:this.ignoredFiles,server:this.serverConfig,instantUpload:this.instantUpload,chunkUploads:this.chunkUploads,chunkForce:this.chunkForce,chunkSize:this.chunkSize,chunkRetryDelays:this.chunkRetryDelays,labelDecimalSeparator:this.labelDecimalSeparator,labelThousandsSeparator:this.labelThousandsSeparator,labelIdle:this.labelIdle,labelInvalidField:this.labelInvalidField,labelFileWaitingForSize:this.labelFileWaitingForSize,beforeRemoveFile:t=>new Promise((i=>{this.remove.emit(t),i(!0)}))})}render(){return i(e,{class:"s-file-upload"},i("input",{type:"file",class:"s-file-upload-wrapper s-file-upload-input",name:"filepond"}))}};W.style="/*!\n * FilePond 4.30.4\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;-webkit-box-shadow:0 0 0 0 hsla(0,0%,100%,0);box-shadow:0 0 0 0 hsla(0,0%,100%,0);-webkit-transition:-webkit-box-shadow .25s ease-in;transition:-webkit-box-shadow .25s ease-in;transition:box-shadow .25s ease-in;transition:box-shadow .25s ease-in, -webkit-box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{-webkit-box-shadow:0 0 0 .125em hsla(0,0%,100%,.9);box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex:1;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:-ms-flexbox;display:flex;height:100%;-ms-flex-align:start;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{-webkit-box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25);box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{-webkit-transition:opacity .15s ease-out;transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{-webkit-transition:-webkit-box-shadow .125s ease-in-out;transition:-webkit-box-shadow .125s ease-in-out;transition:box-shadow .125s ease-in-out;transition:box-shadow .125s ease-in-out, -webkit-box-shadow .125s ease-in-out;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{-webkit-box-shadow:0 .125em .3125em rgba(0,0,0,.325);box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;-webkit-transition:background-color .25s;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:-webkit-gradient(linear,left top, left bottom,from(#000),to(transparent));-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:-webkit-gradient(linear,left top, left bottom,from(#000),to(transparent));mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (-webkit-min-device-pixel-ratio:0), not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{-webkit-box-sizing:inherit;box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.175;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}/*!\n * FilePondPluginImagePreview 4.6.11\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--image-preview-markup{position:absolute;left:0;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;position:absolute;left:0;top:0;width:100%;min-height:5rem;max-height:7rem;margin:0;opacity:0;z-index:2;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--image-preview-overlay svg{width:100%;height:auto;color:inherit;max-height:inherit}.filepond--image-preview-overlay-idle{mix-blend-mode:multiply;color:rgba(40, 40, 40, 0.85)}.filepond--image-preview-overlay-success{mix-blend-mode:normal;color:rgba(54, 151, 99, 1)}.filepond--image-preview-overlay-failure{mix-blend-mode:normal;color:rgba(196, 78, 71, 1)}@supports (-webkit-marquee-repetition: infinite) and\n ((-o-object-fit: fill) or (object-fit: fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;left:0;top:0;right:0;height:100%;margin:0;border-radius:0.45em;overflow:hidden;background:rgba(0, 0, 0, 0.01)}.filepond--image-preview{position:absolute;left:0;top:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;width:100%;pointer-events:none;background:#222;will-change:transform, opacity}.filepond--image-clip{position:relative;overflow:hidden;margin:0 auto;}.filepond--image-clip[data-transparency-indicator='grid'] img,.filepond--image-clip[data-transparency-indicator='grid'] canvas{background-color:#fff;background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E\");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{position:absolute;left:0;top:0;will-change:transform}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview{height:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-overlay{top:auto;bottom:0;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file .filepond--file-action-button[data-align*='bottom']:not([data-align*='center']){margin-bottom:0.325em}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='left']{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='right']{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='left'],.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='right']{margin-bottom:calc(0.325em + 0.1875em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='center']{margin-top:0;margin-bottom:0.1875em;margin-left:0.1875em}/*!\n * FilePondPluginImageEdit 1.6.3\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='center']{margin-left:-0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='bottom']{margin-bottom:-0.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 0.25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~='circle'] .filepond--action-edit-item{opacity:1 !important;visibility:visible !important}";var Y={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},q={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},$=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Z={CSS:{},springs:{}};function X(t,i,e){return Math.min(Math.max(t,i),e)}function K(t,i){return t.indexOf(i)>-1}function Q(t,i){return t.apply(null,i)}var J={arr:function(t){return Array.isArray(t)},obj:function(t){return K(Object.prototype.toString.call(t),"Object")},pth:function(t){return J.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||J.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return J.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return J.hex(t)||J.rgb(t)||J.hsl(t)},key:function(t){return!Y.hasOwnProperty(t)&&!q.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function tt(t){var i=/\(([^)]+)\)/.exec(t);return i?i[1].split(",").map((function(t){return parseFloat(t)})):[]}function it(t,i){var e=tt(t),n=X(J.und(e[0])?1:e[0],.1,100),o=X(J.und(e[1])?100:e[1],.1,100),a=X(J.und(e[2])?10:e[2],.1,100),r=X(J.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/n),l=a/(2*Math.sqrt(o*n)),c=l<1?s*Math.sqrt(1-l*l):0,u=l<1?(l*s-r)/c:-r+s;function p(t){var e=i?i*t/1e3:t;return e=l<1?Math.exp(-e*l*s)*(1*Math.cos(c*e)+u*Math.sin(c*e)):(1+u*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return i?p:function(){var i=Z.springs[t];if(i)return i;for(var e=1/6,n=0,o=0;;)if(1===p(n+=e)){if(++o>=16)break}else o=0;var a=n*e*1e3;return Z.springs[t]=a,a}}function et(t){return void 0===t&&(t=10),function(i){return Math.ceil(X(i,1e-6,1)*t)*(1/t)}}var nt,ot,at=function(){var t=.1;function i(t,i){return 1-3*i+3*t}function e(t,i){return 3*i-6*t}function n(t){return 3*t}function o(t,o,a){return((i(o,a)*t+e(o,a))*t+n(o))*t}function a(t,o,a){return 3*i(o,a)*t*t+2*e(o,a)*t+n(o)}return function(i,e,n,r){if(0<=i&&i<=1&&0<=n&&n<=1){var s=new Float32Array(11);if(i!==e||n!==r)for(var l=0;l<11;++l)s[l]=o(l*t,i,n);return function(l){return i===e&&n===r||0===l||1===l?l:o(function(e){for(var r=0,l=1;10!==l&&s[l]<=e;++l)r+=t;--l;var c=r+(e-s[l])/(s[l+1]-s[l])*t,u=a(c,i,n);return u>=.001?function(t,i,e,n){for(var r=0;r<4;++r){var s=a(i,e,n);if(0===s)return i;i-=(o(i,e,n)-t)/s}return i}(e,c,i,n):0===u?c:function(t,i,e,n,a){var r,s,l=0;do{(r=o(s=i+(e-i)/2,n,a)-t)>0?e=s:i=s}while(Math.abs(r)>1e-7&&++l<10);return s}(e,r,r+t,i,n)}(l),e,r)}}}}(),rt=(nt={linear:function(){return function(t){return t}}},ot={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var i,e=4;t<((i=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*i-2)/22-t,2)}},Elastic:function(t,i){void 0===t&&(t=1),void 0===i&&(i=.5);var e=X(t,1,10),n=X(i,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-n/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/n)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach((function(t,i){ot[t]=function(){return function(t){return Math.pow(t,i+2)}}})),Object.keys(ot).forEach((function(t){var i=ot[t];nt["easeIn"+t]=i,nt["easeOut"+t]=function(t,e){return function(n){return 1-i(t,e)(1-n)}},nt["easeInOut"+t]=function(t,e){return function(n){return n<.5?i(t,e)(2*n)/2:1-i(t,e)(-2*n+2)/2}},nt["easeOutIn"+t]=function(t,e){return function(n){return n<.5?(1-i(t,e)(1-2*n))/2:(i(t,e)(2*n-1)+1)/2}}})),nt);function st(t,i){if(J.fnc(t))return t;var e=t.split("(")[0],n=rt[e],o=tt(t);switch(e){case"spring":return it(t,i);case"cubicBezier":return Q(at,o);case"steps":return Q(et,o);default:return Q(n,o)}}function lt(t){try{return document.querySelectorAll(t)}catch(t){return}}function ct(t,i){for(var e=t.length,n=arguments.length>=2?arguments[1]:void 0,o=[],a=0;a<e;a++)if(a in t){var r=t[a];i.call(n,r,a,t)&&o.push(r)}return o}function ut(t){return t.reduce((function(t,i){return t.concat(J.arr(i)?ut(i):i)}),[])}function pt(t){return J.arr(t)?t:(J.str(t)&&(t=lt(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function dt(t,i){return t.some((function(t){return t===i}))}function ht(t){var i={};for(var e in t)i[e]=t[e];return i}function ft(t,i){var e=ht(t);for(var n in t)e[n]=i.hasOwnProperty(n)?i[n]:t[n];return e}function gt(t,i){var e=ht(t);for(var n in i)e[n]=J.und(t[n])?i[n]:t[n];return e}function _t(t){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(i)return i[1]}function mt(t,i){return J.fnc(t)?t(i.target,i.id,i.total):t}function vt(t,i){return t.getAttribute(i)}function xt(t,i,e){if(dt([e,"deg","rad","turn"],_t(i)))return i;var n=Z.CSS[i+e];if(!J.und(n))return n;var o=document.createElement(t.tagName),a=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;a.appendChild(o),o.style.position="absolute",o.style.width=100+e;var r=100/o.offsetWidth;a.removeChild(o);var s=r*parseFloat(i);return Z.CSS[i+e]=s,s}function bt(t,i,e){if(i in t.style){var n=i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[i]||getComputedStyle(t).getPropertyValue(n)||"0";return e?xt(t,o,e):o}}function wt(t,i){return J.dom(t)&&!J.inp(t)&&(!J.nil(vt(t,i))||J.svg(t)&&t[i])?"attribute":J.dom(t)&&dt($,i)?"transform":J.dom(t)&&"transform"!==i&&bt(t,i)?"css":null!=t[i]?"object":void 0}function yt(t){if(J.dom(t)){for(var i,e=t.style.transform||"",n=/(\w+)\(([^)]*)\)/g,o=new Map;i=n.exec(e);)o.set(i[1],i[2]);return o}}function Et(t,i,e,n){switch(wt(t,i)){case"transform":return function(t,i,e,n){var o=K(i,"scale")?1:0+function(t){return K(t,"translate")||"perspective"===t?"px":K(t,"rotate")||K(t,"skew")?"deg":void 0}(i),a=yt(t).get(i)||o;return e&&(e.transforms.list.set(i,a),e.transforms.last=i),n?xt(t,a,n):a}(t,i,n,e);case"css":return bt(t,i,e);case"attribute":return vt(t,i);default:return t[i]||0}}function kt(t,i){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var n=_t(t)||0,o=parseFloat(i),a=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+a+n;case"-":return o-a+n;case"*":return o*a+n}}function It(t,i){if(J.col(t))return function(t){return J.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i=t))?"rgba("+e[1]+",1)":i:J.hex(t)?function(t){var i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,i,e,n){return i+i+e+e+n+n})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):J.hsl(t)?function(t){var i,e,n,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),a=parseInt(o[1],10)/360,r=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,l=o[4]||1;function c(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t}if(0==r)i=e=n=s;else{var u=s<.5?s*(1+r):s+r-s*r,p=2*s-u;i=c(p,u,a+1/3),e=c(p,u,a),n=c(p,u,a-1/3)}return"rgba("+255*i+","+255*e+","+255*n+","+l+")"}(t):void 0;var i,e}(t);if(/\s/g.test(t))return t;var e=_t(t),n=e?t.substr(0,t.length-e.length):t;return i?n+i:n}function Tt(t,i){return Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))}function At(t){for(var i,e=t.points,n=0,o=0;o<e.numberOfItems;o++){var a=e.getItem(o);o>0&&(n+=Tt(i,a)),i=a}return n}function Mt(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*vt(t,"r")}(t);case"rect":return function(t){return 2*vt(t,"width")+2*vt(t,"height")}(t);case"line":return function(t){return Tt({x:vt(t,"x1"),y:vt(t,"y1")},{x:vt(t,"x2"),y:vt(t,"y2")})}(t);case"polyline":return At(t);case"polygon":return function(t){var i=t.points;return At(t)+Tt(i.getItem(i.numberOfItems-1),i.getItem(0))}(t)}}function Dt(t,i){var e=i||{},n=e.el||function(t){for(var i=t.parentNode;J.svg(i)&&J.svg(i.parentNode);)i=i.parentNode;return i}(t),o=n.getBoundingClientRect(),a=vt(n,"viewBox"),r=o.width,s=o.height,l=e.viewBox||(a?a.split(" "):[0,0,r,s]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:r,h:s,vW:l[2],vH:l[3]}}function Rt(t,i,e){function n(e){return void 0===e&&(e=0),t.el.getPointAtLength(i+e>=1?i+e:0)}var o=Dt(t.el,t.svg),a=n(),r=n(-1),s=n(1),l=e?1:o.w/o.vW,c=e?1:o.h/o.vH;switch(t.property){case"x":return(a.x-o.x)*l;case"y":return(a.y-o.y)*c;case"angle":return 180*Math.atan2(s.y-r.y,s.x-r.x)/Math.PI}}function Ot(t,i){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=It(J.pth(t)?t.totalLength:t,i)+"";return{original:n,numbers:n.match(e)?n.match(e).map(Number):[0],strings:J.str(t)||i?n.split(e):[]}}function St(t){return ct(t?ut(J.arr(t)?t.map(pt):pt(t)):[],(function(t,i,e){return e.indexOf(t)===i}))}function Lt(t){var i=St(t);return i.map((function(t,e){return{target:t,id:e,total:i.length,transforms:{list:yt(t)}}}))}function Ct(t,i){var e=ht(i);if(/^spring/.test(e.easing)&&(e.duration=it(e.easing)),J.arr(t)){var n=t.length;2!==n||J.obj(t[0])?J.fnc(i.duration)||(e.duration=i.duration/n):t={value:t}}var o=J.arr(t)?t:[t];return o.map((function(t,e){var n=J.obj(t)&&!J.pth(t)?t:{value:t};return J.und(n.delay)&&(n.delay=e?0:i.delay),J.und(n.endDelay)&&(n.endDelay=e===o.length-1?i.endDelay:0),n})).map((function(t){return gt(t,e)}))}var Pt={css:function(t,i,e){return t.style[i]=e},attribute:function(t,i,e){return t.setAttribute(i,e)},object:function(t,i,e){return t[i]=e},transform:function(t,i,e,n,o){if(n.list.set(i,e),i===n.last||o){var a="";n.list.forEach((function(t,i){a+=i+"("+t+") "})),t.style.transform=a}}};function Gt(t,i){Lt(t).forEach((function(t){for(var e in i){var n=mt(i[e],t),o=t.target,a=_t(n),r=Et(o,e,a,t),s=kt(It(n,a||_t(r)),r),l=wt(o,e);Pt[l](o,e,s,t.transforms,!0)}}))}function zt(t,i){return ct(ut(t.map((function(t){return i.map((function(i){return function(t,i){var e=wt(t.target,i.name);if(e){var n=function(t,i){var e;return t.tweens.map((function(n){var o=function(t,i){var e={};for(var n in t){var o=mt(t[n],i);J.arr(o)&&1===(o=o.map((function(t){return mt(t,i)}))).length&&(o=o[0]),e[n]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(n,i),a=o.value,r=J.arr(a)?a[1]:a,s=_t(r),l=Et(i.target,t.name,s,i),c=e?e.to.original:l,u=J.arr(a)?a[0]:c,p=_t(u)||_t(l),d=s||p;return J.und(r)&&(r=c),o.from=Ot(u,d),o.to=Ot(kt(r,u),d),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=st(o.easing,o.duration),o.isPath=J.pth(a),o.isPathTargetInsideSVG=o.isPath&&J.svg(i.target),o.isColor=J.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(i,t),o=n[n.length-1];return{type:e,property:i.name,animatable:t,tweens:n,duration:o.end,delay:n[0].delay,endDelay:o.endDelay}}}(t,i)}))}))),(function(t){return!J.und(t)}))}function Nt(t,i){var e=t.length,n=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return n(t)+t.duration}))):i.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return n(t)+t.delay}))):i.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return n(t)+t.duration-t.endDelay}))):i.endDelay,o}var Bt=0,Ft=[],Ut=function(){var t;function i(e){for(var n=Ft.length,o=0;o<n;){var a=Ft[o];a.paused?(Ft.splice(o,1),n--):(a.tick(e),o++)}t=o>0?requestAnimationFrame(i):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){Ht.suspendWhenDocumentHidden&&(jt()?t=cancelAnimationFrame(t):(Ft.forEach((function(t){return t._onDocumentVisibility()})),Ut()))})),function(){t||jt()&&Ht.suspendWhenDocumentHidden||!(Ft.length>0)||(t=requestAnimationFrame(i))}}();function jt(){return!!document&&document.hidden}function Ht(t){void 0===t&&(t={});var i,e=0,n=0,o=0,a=0,r=null;function s(t){var i=window.Promise&&new Promise((function(t){return r=t}));return t.finished=i,i}var l=function(t){var i=ft(Y,t),e=ft(q,t),n=function(t,i){var e=[],n=i.keyframes;for(var o in n&&(i=gt(function(t){for(var i=ct(ut(t.map((function(t){return Object.keys(t)}))),(function(t){return J.key(t)})).reduce((function(t,i){return t.indexOf(i)<0&&t.push(i),t}),[]),e={},n=function(n){var o=i[n];e[o]=t.map((function(t){var i={};for(var e in t)J.key(e)?e==o&&(i.value=t[e]):i[e]=t[e];return i}))},o=0;o<i.length;o++)n(o);return e}(n),i)),i)J.key(o)&&e.push({name:o,tweens:Ct(i[o],t)});return e}(e,t),o=Lt(t.targets),a=zt(o,n),r=Nt(a,e),s=Bt;return Bt++,gt(i,{id:s,children:[],animatables:o,animations:a,duration:r.duration,delay:r.delay,endDelay:r.endDelay})}(t);function c(){var t=l.direction;"alternate"!==t&&(l.direction="normal"!==t?"normal":"reverse"),l.reversed=!l.reversed,i.forEach((function(t){return t.reversed=l.reversed}))}function u(t){return l.reversed?l.duration-t:t}function p(){e=0,n=u(l.currentTime)*(1/Ht.speed)}function d(t,i){i&&i.seek(t-i.timelineOffset)}function h(t){for(var i=0,e=l.animations,n=e.length;i<n;){var o=e[i],a=o.animatable,r=o.tweens,s=r.length-1,c=r[s];s&&(c=ct(r,(function(i){return t<i.end}))[0]||c);for(var u=X(t-c.start-c.delay,0,c.duration)/c.duration,p=isNaN(u)?1:c.easing(u),d=c.to.strings,h=c.round,f=[],g=c.to.numbers.length,_=void 0,m=0;m<g;m++){var v=void 0,x=c.to.numbers[m],b=c.from.numbers[m]||0;v=c.isPath?Rt(c.value,p*x,c.isPathTargetInsideSVG):b+p*(x-b),h&&(c.isColor&&m>2||(v=Math.round(v*h)/h)),f.push(v)}var w=d.length;if(w){_=d[0];for(var y=0;y<w;y++){var E=d[y+1],k=f[y];isNaN(k)||(_+=E?k+E:k+" ")}}else _=f[0];Pt[o.type](a.target,o.property,_,a.transforms),o.currentValue=_,i++}}function f(t){l[t]&&!l.passThrough&&l[t](l)}function g(t){var p=l.duration,g=l.delay,_=p-l.endDelay,m=u(t);l.progress=X(m/p*100,0,100),l.reversePlayback=m<l.currentTime,i&&function(t){if(l.reversePlayback)for(var e=a;e--;)d(t,i[e]);else for(var n=0;n<a;n++)d(t,i[n])}(m),!l.began&&l.currentTime>0&&(l.began=!0,f("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,f("loopBegin")),m<=g&&0!==l.currentTime&&h(0),(m>=_&&l.currentTime!==p||!p)&&h(p),m>g&&m<_?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,f("changeBegin")),f("change"),h(m)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,f("changeComplete")),l.currentTime=X(m,0,p),l.began&&f("update"),t>=p&&(n=0,l.remaining&&!0!==l.remaining&&l.remaining--,l.remaining?(e=o,f("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,f("loopComplete"),f("complete"),!l.passThrough&&"Promise"in window&&(r(),s(l)))))}return s(l),l.reset=function(){var t=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===t,l.remaining=l.loop;for(var e=a=(i=l.children).length;e--;)l.children[e].reset();(l.reversed&&!0!==l.loop||"alternate"===t&&1===l.loop)&&l.remaining++,h(l.reversed?l.duration:0)},l._onDocumentVisibility=p,l.set=function(t,i){return Gt(t,i),l},l.tick=function(t){o=t,e||(e=o),g((o+(n-e))*Ht.speed)},l.seek=function(t){g(u(t))},l.pause=function(){l.paused=!0,p()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,Ft.push(l),p(),Ut())},l.reverse=function(){c(),l.completed=!l.reversed,p()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){Wt(St(t),l)},l.reset(),l.autoplay&&l.play(),l}function Vt(t,i){for(var e=i.length;e--;)dt(t,i[e].animatable.target)&&i.splice(e,1)}function Wt(t,i){var e=i.animations,n=i.children;Vt(t,e);for(var o=n.length;o--;){var a=n[o],r=a.animations;Vt(t,r),r.length||a.children.length||n.splice(o,1)}e.length||n.length||i.pause()}Ht.version="3.2.1",Ht.speed=1,Ht.suspendWhenDocumentHidden=!0,Ht.running=Ft,Ht.remove=function(t){for(var i=St(t),e=Ft.length;e--;)Wt(i,Ft[e])},Ht.get=Et,Ht.set=Gt,Ht.convertPx=xt,Ht.path=function(t,i){var e=J.str(t)?lt(t)[0]:t,n=i||100;return function(t){return{property:t,el:e,svg:Dt(e),totalLength:Mt(e)*(n/100)}}},Ht.setDashoffset=function(t){var i=Mt(t);return t.setAttribute("stroke-dasharray",i),i},Ht.stagger=function(t,i){void 0===i&&(i={});var e=i.direction||"normal",n=i.easing?st(i.easing):null,o=i.grid,a=i.axis,r=i.from||0,s="first"===r,l="center"===r,c="last"===r,u=J.arr(t),p=u?parseFloat(t[0]):parseFloat(t),d=u?parseFloat(t[1]):0,h=_t(u?t[1]:t)||0,f=i.start||0+(u?p:0),g=[],_=0;return function(t,i,m){if(s&&(r=0),l&&(r=(m-1)/2),c&&(r=m-1),!g.length){for(var v=0;v<m;v++){if(o){var x=l?(o[0]-1)/2:r%o[0],b=l?(o[1]-1)/2:Math.floor(r/o[0]),w=x-v%o[0],y=b-Math.floor(v/o[0]),E=Math.sqrt(w*w+y*y);"x"===a&&(E=-w),"y"===a&&(E=-y),g.push(E)}else g.push(Math.abs(r-v));_=Math.max.apply(Math,g)}n&&(g=g.map((function(t){return n(t/_)*_}))),"reverse"===e&&(g=g.map((function(t){return a?t<0?-1*t:-t:Math.abs(_-t)})))}return f+(u?(d-p)/_:p)*(Math.round(100*g[i])/100)+h}},Ht.timeline=function(t){void 0===t&&(t={});var i=Ht(t);return i.duration=0,i.add=function(e,n){var o=Ft.indexOf(i),a=i.children;function r(t){t.passThrough=!0}o>-1&&Ft.splice(o,1);for(var s=0;s<a.length;s++)r(a[s]);var l=gt(e,ft(q,t));l.targets=l.targets||t.targets;var c=i.duration;l.autoplay=!1,l.direction=i.direction,l.timelineOffset=J.und(n)?c:kt(n,c),r(i),i.seek(l.timelineOffset);var u=Ht(l);r(u),a.push(u);var p=Nt(a,t);return i.delay=p.delay,i.endDelay=p.endDelay,i.duration=p.duration,i.seek(0),i.reset(),i.autoplay&&i.play(),i},i},Ht.easing=st,Ht.penner=rt,Ht.random=function(t,i){return Math.floor(Math.random()*(i-t+1))+t};const Yt='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n',qt='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-left</title>\n<path d="M28 14.667h-20.452l7.996-6.997c0.555-0.485 0.611-1.327 0.125-1.881-0.485-0.553-1.327-0.611-1.881-0.125l-10.667 9.333c-0.011 0.009-0.015 0.024-0.025 0.033-0.096 0.089-0.167 0.199-0.232 0.313-0.025 0.043-0.063 0.076-0.081 0.121-0.073 0.165-0.116 0.345-0.116 0.536s0.043 0.371 0.116 0.535c0.020 0.045 0.057 0.079 0.081 0.121 0.067 0.115 0.136 0.224 0.232 0.313 0.011 0.009 0.015 0.024 0.025 0.033l10.667 9.333c0.253 0.221 0.567 0.331 0.879 0.331 0.371 0 0.74-0.155 1.004-0.455 0.485-0.555 0.429-1.396-0.125-1.881l-7.997-6.997h20.452c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n',$t='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>cancel</title>\n<path d="M17.885 16l7.057-7.057c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-7.057 7.057-7.057-7.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l7.057 7.057-7.057 7.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l7.057-7.057 7.057 7.057c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>\n</svg>\n',Zt='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>gift-sharing</title>\n<path d="M5 32h-4c-0.552 0-1-0.448-1-1v0-14c0-0.552 0.448-1 1-1v0h4c0.552 0 1 0.448 1 1v0 14c0 0.552-0.448 1-1 1v0zM2 30h2v-12h-2zM19.32 30h-14.32v-2h14.32c0.693-0.005 1.329-0.242 1.837-0.637l-0.007 0.005 8.45-6.568c0.216-0.16 0.365-0.402 0.399-0.679l0-0.005c0.005-0.036 0.007-0.077 0.007-0.119 0-0.226-0.078-0.434-0.209-0.599l0.002 0.002c-0.16-0.216-0.401-0.364-0.677-0.399l-0.005-0.001c-0.034-0.004-0.073-0.007-0.113-0.007-0.227 0-0.436 0.078-0.601 0.208l0.002-0.002-7.126 5.526c-1.003 0.793-2.285 1.273-3.68 1.274h-6.6v-2h6.6c0.926-0.001 1.777-0.32 2.45-0.852l-0.008 0.006 7.126-5.526c0.492-0.39 1.122-0.625 1.807-0.625 0.135 0 0.268 0.009 0.398 0.027l-0.015-0.002c0.824 0.102 1.534 0.524 2.011 1.137l0.005 0.007c0.39 0.494 0.625 1.127 0.625 1.814 0 0.136-0.009 0.27-0.027 0.402l0.002-0.015c-0.106 0.819-0.529 1.523-1.141 1.995l-0.007 0.005-8.458 6.578c-0.834 0.649-1.894 1.043-3.047 1.050h-0.002zM11 26c-0.552 0-1-0.448-1-1s0.448-1 1-1v0c2.406-0.004 4.415-1.703 4.894-3.967l0.006-0.033h-10.9c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h12c0.552 0 1 0.448 1 1v0c0 3.866-3.134 7-7 7v0zM24 12h-16c-1.105 0-2-0.895-2-2v0-2c0-1.105 0.895-2 2-2v0h16c1.105 0 2 0.895 2 2v0 2c0 1.105-0.895 2-2 2v0zM24 10v0zM8 8v2h16v-2zM23 18c-0.552 0-1-0.448-1-1v0-6c0-0.552 0.448-1 1-1s1 0.448 1 1v0 6c0 0.552-0.448 1-1 1v0zM9 16c-0.552 0-1-0.448-1-1v0-4c0-0.552 0.448-1 1-1s1 0.448 1 1v0 4c0 0.552-0.448 1-1 1v0zM16 16c-0.552 0-1-0.448-1-1v0-8c0-0.552 0.448-1 1-1s1 0.448 1 1v0 8c0 0.552-0.448 1-1 1v0zM16 8c-0.552-0-1-0.448-1-1 0-0.077 0.009-0.151 0.025-0.223l-0.001 0.007c0.314-1.849 0.963-3.5 1.887-4.961l-0.033 0.055c0.539-0.521 1.274-0.842 2.084-0.842 1.657 0 3 1.343 3 3 0 0.81-0.321 1.545-0.843 2.085l0.001-0.001c-1.405 0.891-3.056 1.541-4.824 1.845l-0.080 0.011c-0.065 0.015-0.139 0.024-0.216 0.024h-0zM19 3c-0.001 0-0.001 0-0.002 0-0.276 0-0.525 0.112-0.706 0.292l0-0c-0.391 0.669-0.703 1.444-0.897 2.264l-0.011 0.058c0.878-0.205 1.653-0.517 2.363-0.93l-0.041 0.022c0.18-0.181 0.292-0.43 0.292-0.706 0-0.551-0.446-0.999-0.998-1h-0zM16 8c-0.077-0-0.151-0.009-0.223-0.025l0.007 0.001c-1.848-0.315-3.499-0.965-4.959-1.888l0.055 0.032c-0.521-0.539-0.842-1.274-0.842-2.084 0-1.657 1.343-3 3-3 0.81 0 1.545 0.321 2.085 0.843l-0.001-0.001c0.891 1.405 1.541 3.056 1.845 4.824l0.011 0.080c0.015 0.066 0.024 0.141 0.024 0.218 0 0.552-0.448 1-1 1-0.001 0-0.001 0-0.002 0h0zM13 3c-0.001 0-0.001 0-0.002 0-0.552 0-1 0.448-1 1 0 0.277 0.112 0.527 0.294 0.708l0 0c0.669 0.391 1.444 0.703 2.264 0.897l0.058 0.011c-0.205-0.878-0.517-1.653-0.93-2.363l0.022 0.041c-0.181-0.181-0.43-0.293-0.706-0.294h-0z"></path>\n</svg>\n',Xt=class{constructor(i){t(this,i),this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.currentStep=1,this.showCalendar=!1,this.showGiftText=!1,this.currentLang="",this.parentClass="is-current-step-1",this.errors={},this.gift=void 0,this.selectedGiftTextOption=void 0,this.showTextArea=!1,this.selectedImage=void 0,this.uploadedImage=void 0,this.selectedText=void 0,this.hasError=!1,this.timeZone=null,salla.lang.onLoaded((()=>{this.selectImageOrUpload=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_for_your_gift"),this.step1Elems=document.querySelectorAll(".gift-step-1 .anime-item"),this.step2Elems=document.querySelectorAll(".gift-step-2 .anime-item"),this.imageCover=document.querySelector(".s-gifting-modal-uploader"),this.stepsWrapper=document.querySelector(".steps-wrapper"),this.textSelect=document.querySelector(".s-gifting-selectText"),this.customTextArea=document.querySelector(".s-gifting-textarea"),this.calendarFormGroup=document.querySelector(".s-gifting-calendar"),this.sectionTitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love"),this.sectionSubtitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love_message"),this.sectionBtnText=salla.lang.get("blocks.buy_as_gift.send_as_a_gift"),this.giftDetails=salla.lang.get("blocks.buy_as_gift.gift_details"),this.selectGiftMessage=salla.lang.get("blocks.buy_as_gift.select_gift_message"),this.giftCustomText=salla.lang.get("blocks.buy_as_gift.gift_custom_text"),this.textId=salla.lang.get("blocks.buy_as_gift.text_id"),this.incorrectGiftText=salla.lang.get("blocks.buy_as_gift.incorrect_gift_text"),this.nextStep=salla.lang.get("blocks.buy_as_gift.next_step"),this.senderNameLabel=salla.lang.get("blocks.buy_as_gift.sender_name"),this.receiverNameFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_name"),this.receiverMobileFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_mobile"),this.receiverEmailFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_email"),this.emailPlaceholder=salla.lang.get("common.elements.email_placeholder"),this.sendLater=salla.lang.get("blocks.buy_as_gift.send_later"),this.selectSendDateAndTime=salla.lang.get("blocks.buy_as_gift.select_send_date_and_time"),this.canNotEditOrderAfterSelectDate=salla.lang.get("blocks.buy_as_gift.can_not_edit_order_after_select_date"),this.sendGift=salla.lang.get("blocks.buy_as_gift.send_gift"),this.donationRequired=salla.lang.get("pages.products.donation_amount_required"),this.currentLang=salla.lang.locale}))}async open(){if(!salla.config.isGuest())return this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getGiftDetails(this.productId))).then((t=>{this.gift=t.data,this.senderName=this.gift.sender_name})).catch((t=>{var i,e,n,o;this.hasError=!0,this.errorMessage=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data)})).finally((()=>this.modal.stopLoading()));salla.event.dispatch("login::open")}async close(){return this.modal.close()}async setWrapperHeight(t=1,i=250,e=0,n=0){let o=document.querySelector(`.gift-step-${t}`);setTimeout((()=>{this.stepsWrapper.style.height=n?`${n}px`:o.offsetHeight+e+"px"}),i)}toggleCalendar(){this.showCalendar=!this.showCalendar,this.setWrapperHeight(2,150,0)}toggleGiftText(t){this.textSelect.classList.remove("s-form-has-error");let i=t.target.children[t.target.selectedIndex].getAttribute("data-id"),e="custom"==i;this.showGiftText=e,i?(this.selectedGiftTextOption=i,this.selectedText=e?void 0:t.target.value,this.setWrapperHeight(1,150,5)):(this.textArea.value="",this.selectedText=void 0,this.selectedGiftTextOption=void 0,this.setWrapperHeight(1,150,-15))}async goToStep2(){return this.selectedGiftTextOption?"custom"!=this.selectedGiftTextOption||this.selectedText?(this.textSelect.classList.remove("s-form-has-error"),this.customTextArea.classList.remove("s-form-has-error"),this.setWrapperHeight(2,600,0),(new Ht.timeline).add({targets:this.step1Elems,opacity:[1,0],translateX:[0,50],delay:Ht.stagger(70),duration:1200}).add({targets:".gift-step-2",translateX:["-110%",0],opacity:[0,1]},"-=1800").add({targets:this.step2Elems,opacity:[0,1],translateX:[-50,0],delay:Ht.stagger(70),duration:1200,complete:()=>{this.step2Elems.forEach((t=>{t.classList.remove("opacity-0"),t.removeAttribute("style")}))}},"-=1200"),this.currentStep=2,this.stepsWrapper.classList.remove("is-current-step-1","is-current-step-2"),void this.stepsWrapper.classList.add(`is-current-step-${this.currentStep}`)):(this.textSelect.classList.remove("s-form-has-error"),void this.customTextArea.classList.add("s-form-has-error")):(this.textSelect.classList.add("s-form-has-error"),void this.customTextArea.classList.remove("s-form-has-error"))}goToStep1(){let t=new Ht.timeline({autoplay:!1});t.add({targets:this.step2Elems,opacity:[1,0],translateX:[0,-50],delay:Ht.stagger(70),duration:1200}).add({targets:".gift-step-1",translateX:["110%",0],opacity:[0,1]},"-=1800").add({targets:this.step1Elems,opacity:[0,1],translateX:[50,0],delay:Ht.stagger(70),duration:1200,complete:()=>{this.step1Elems.forEach((t=>{t.classList.remove("opacity-0"),t.removeAttribute("style")}))}},"-=1200"),t.play(),this.setWrapperHeight(1,600,0),this.currentStep=1,this.stepsWrapper.classList.remove("is-current-step-1","is-current-step-2"),this.stepsWrapper.classList.add(`is-current-step-${this.currentStep}`)}getFilepondPlaceholder(){return`<div class="s-gifting-filepond-placeholder"><span class="s-gifting-filepond-placeholder-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>images</title>\n<path d="M22.667 29.333h-13.333c-3.676 0-6.667-2.991-6.667-6.667v-13.333c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v13.333c0 5.145 4.187 9.333 9.333 9.333h13.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM22.667 5.333c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 10.667c-0.735 0-1.333-0.597-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.599 1.333-1.333 1.333zM25.333 0h-13.333c-3.676 0-6.667 2.991-6.667 6.667v13.333c0 1.055 0.268 2.040 0.707 2.927 0.039 0.099 0.088 0.188 0.151 0.277 1.137 2.053 3.301 3.463 5.809 3.463h13.333c3.676 0 6.667-2.991 6.667-6.667v-13.333c0-3.676-2.991-6.667-6.667-6.667zM12 24c-1.244 0-2.344-0.583-3.077-1.476l5.721-7.047 6.629 8.523zM29.333 20c0 2.205-1.795 4-4 4h-0.68l-8.933-11.485c-0.251-0.32-0.633-0.511-1.039-0.515h-0.015c-0.401 0-0.781 0.181-1.035 0.492l-5.632 6.935v-12.76c0-2.205 1.795-4 4-4h13.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n</span><p class="s-gifting-filepond-placeholder-text">${this.selectImageOrUpload?this.selectImageOrUpload:""}</p></div>`}setPreview(t){this.imageCover.classList.add("has-bg");var i=document.querySelector(".filepond-bg")?document.querySelector(".filepond-bg"):document.createElement("div");i.classList.add("filepond-bg"),i.classList.remove("s-hidden"),i.style.backgroundImage="url('"+t.url+"')",this.imageCover.querySelector(".filepond--root").appendChild(i),this.uploadedImage=t.url,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}removePreview(){this.imageCover.classList.remove("has-bg");let t=document.querySelector(".filepond-bg");t.removeAttribute("style"),t.classList.add("s-hidden"),this.handleRemoveImage()}handleTextAreaChange(t){this.selectedText=t.target.value,this.customTextArea.classList.remove("s-form-has-error")}handleSenderName(t){this.senderName=t.target.value}handleReceiverName(t){this.receiverName=t.target.value}handleRemoveImage(){this.uploadedImage="",this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handlePhoneInputChange(t){let i=t.detail;this.receiverMobile=i.number,this.receiverCountryCode=i.country_code}handleDateTimePicker(t){this.deliveryDate=t.detail}getCalendarClasses(){return{"s-form-group":!0,"anime-item":!0,"s-gifting-calendar":!0,shown:this.showCalendar,hide:!this.showCalendar,"s-form-has-error":!!this.errors&&this.errors.deliver_at}}getServerConfig(){return{process:async(t,i,e,n,o,a,r)=>{const s=new FormData;return s.append("image_url",i,i.name),await salla.product.uploadGiftImage(s).then((t=>{this.uploadedImage=t.data.url,n("success"),i.metadata=`_${(new Date).getTime()}`,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)})).catch((t=>{console.log(t),o("error")})).finally((()=>({abort:()=>{r()}})))}}}async submitForm(){var t;if(this.calendarFormGroup.classList.remove("s-form-has-error"),this.errors&&(this.errors={},this.setWrapperHeight(2,150,0)),this.showCalendar&&!this.deliveryDate)return void this.calendarFormGroup.classList.add("s-form-has-error");let i={text:this.selectedText,sender_name:this.senderName,quantity:1,deliver_at:this.showCalendar?this.deliveryDate:null,image_url:null!==(t=this.uploadedImage)&&void 0!==t?t:this.selectedImage,receiver:{name:this.receiverName,country_code:this.receiverCountryCode,mobile:this.receiverMobile}};return await salla.product.addGiftToCart(this.productId,i,!0).then((t=>{console.log(t),this.modal.close()})).catch((t=>{422==t.response.status?this.errors=t.response.data.error.fields:console.log(t),this.setWrapperHeight(2,150,0)}))}render(){var t,e;return[i("div",null,i("salla-list-tile",{class:"s-gifting-widget"},i("div",{slot:"title"},i("h3",null,this.sectionTitle)),i("div",{slot:"subtitle"},i("div",null,this.sectionSubtitle)),i("div",{slot:"action"},i("salla-button",{class:"s-gifting-widget-action",color:"gray",onClick:()=>this.open()},i("span",{innerHTML:Zt}),"  ",i("span",null,this.sectionBtnText)))),i("salla-modal",{id:"salla-gifting-modal",isLoading:!0,class:"s-gifting-modal",width:"sm",ref:t=>this.modal=t},i("div",{slot:"loading"},i("div",{class:"s-gifting-skeleton"},i("div",{class:"s-gifting-modal-header"},i("salla-skeleton",{type:"circle",height:"5rem",width:"5rem"}),i("h2",{class:"s-gifting-modal-title"},i("div",{class:"s-gifting-modal-badge-wrapper"},i("salla-skeleton",{height:"15px",width:"150px"})))),i("div",{class:"s-gifting-skeleton-content"},i("salla-skeleton",{height:"10px",width:"150px"}),i("salla-skeleton",{height:"230px"}),i("salla-skeleton",{height:"10px",width:"150px"}),i("salla-skeleton",{height:"30px"}),i("salla-skeleton",{height:"40px"})))),i("slot",{name:"header"}),this.hasError?i("salla-placeholder",{alignment:"center"},i("span",{slot:"title"},this.errorMessage||salla.lang.get("common.errors.empty_results")),i("span",{slot:"description"}," ")):[i("div",{class:"s-gifting-modal-header"},i("span",{class:"s-gifting-modal-icon"},i("span",{innerHTML:Zt})),i("h2",{class:"s-gifting-modal-title"},i("div",{class:"s-gifting-modal-badge-wrapper"},i("div",{class:"s-gifting-modal-badge"},i("span",null,i("span",null,this.currentStep),"/2")),i("span",null,this.giftDetails)))),i("div",{class:"s-gifting-steps-wrapper steps-wrapper"},i("div",{class:"s-gifting-step-one gift-step-1"},i("div",{class:"s-gifting-modal-uploader-title anime-item"},this.selectImageForYourGift),i("div",{class:"s-gifting-modal-uploader anime-item"},i("span",{class:"s-gifting-remove-preview",onClick:()=>this.removePreview(),innerHTML:$t}),this.selectImageOrUpload&&i("salla-file-upload",{"instant-upload":!0,labelIdle:this.getFilepondPlaceholder(),serverConfig:this.getServerConfig(),onRemove:()=>this.handleRemoveImage()}," ")),i("div",{class:"anime-item"},!this.uploadedImage&&this.gift&&this.gift.gift_images.length>0?i("salla-swiper",{"space-between-items":"10"},null===(t=this.gift)||void 0===t?void 0:t.gift_images.map((t=>i("img",{class:"s-gifting-image s-gifting-clickable",src:t.url,onClick:()=>this.setPreview(t),alt:`${t.id}`})))):""),i("div",{class:"anime-item"},i("div",{class:"s-form-group s-gifting-selectText"},i("label",{htmlFor:"gift-text-selection",class:"s-form-label"},this.selectGiftMessage),i("select",{id:"gift-text-selection",name:"gift-text-selection",class:"s-form-control s-gifting-select",onChange:t=>this.toggleGiftText(t)},i("option",{"data-id":null,selected:!0},this.selectGiftMessage),null===(e=this.gift)||void 0===e?void 0:e.gift_texts.map((t=>i("option",{"data-id":t.id,value:t.text,key:t.id},t.text))),i("option",{"data-id":"custom"},this.giftCustomText))),i("div",{class:this.showGiftText?"s-form-group s-gifting-textarea shown":"s-form-group s-gifting-textarea hide"},i("label",{htmlFor:"gift-custom-text",class:"s-form-label"},this.giftCustomText),i("div",{class:"mt-1"},i("textarea",{onInput:t=>this.handleTextAreaChange(t),rows:4,ref:t=>this.textArea=t,name:"gift-custom-text",id:"gift-custom-text",class:"s-form-control"})))),i("div",{class:"anime-item"},i("salla-button",{color:"primary",width:"wide",onClick:()=>this.goToStep2()},i("span",null,this.nextStep)))),i("div",{class:"s-gifting-step-two gift-step-2"},i("div",{class:this.errors&&this.errors.sender_name?"s-form-group s-form-has-error anime-item opacity-0":"s-form-group anime-item opacity-0"},i("label",{htmlFor:"sender_name",class:"s-form-label"},this.senderNameLabel),i("input",{type:"text",class:"s-form-control",name:"sender_name",id:"sender_name",value:this.senderName,onInput:t=>this.handleSenderName(t),placeholder:""}),this.errors&&this.errors.sender_name?i("span",{class:"text-danger text-xs"},this.errors.sender_name):""),i("div",{class:this.errors&&this.errors["receiver.name"]?"s-form-group s-form-has-error anime-item opacity-0":"s-form-group anime-item opacity-0"},i("label",{htmlFor:"receiver_name",class:"s-form-label"},this.receiverNameFieldLabel),i("input",{type:"text",class:"s-form-control",name:"receiver_name",id:"receiver_name",value:"",onInput:t=>this.handleReceiverName(t),placeholder:""}),this.errors&&this.errors["receiver.name"]?i("span",{class:"text-danger text-xs"},this.errors["receiver.name"]):""),i("div",{class:this.errors&&this.errors["receiver.mobile"]?"s-form-group s-form-has-error anime-item opacity-0":"s-form-group anime-item opacity-0"},i("label",{class:"s-form-label"},this.receiverMobileFieldLabel),i("salla-tel-input",{class:"s-gifting-tel-input",phone:this.receiverMobile,countryCode:this.receiverCountryCode,onPhoneEntered:t=>this.handlePhoneInputChange(t)}),this.errors&&this.errors["receiver.mobile"]?i("span",{class:"text-danger text-xs"},this.errors["receiver.mobile"]):""),i("div",{class:"anime-item opacity-0"},i("label",{class:"s-gifting-schedule s-gifting-clickable",htmlFor:"schedule"},i("input",{type:"checkbox",name:"schedule",id:"schedule",onChange:()=>this.toggleCalendar(),class:"s-checkbox"}),i("span",{class:"s-form-label"}," ",this.sendLater," "))),i("div",{class:this.getCalendarClasses()},i("label",{class:"s-form-label"},this.selectSendDateAndTime),i("salla-datetime-picker",{value:this.deliveryDate,placeholder:this.selectSendDateAndTime,"enable-time":!0,"date-format":"Y-m-d h:i K",onPicked:t=>this.handleDateTimePicker(t)}),i("span",{class:"s-gifting-calendar-hint"},this.canNotEditOrderAfterSelectDate)),i("div",{class:"s-gifting-step-two-footer anime-item opacity-0"},i("a",{href:"#!",innerHTML:"ar"==this.currentLang?Yt:qt,onClick:()=>this.goToStep1()}),i("salla-button",{onClick:()=>this.submitForm(),color:"primary",width:"wide"},i("span",null,this.sendGift)))))],i("slot",{name:"footer"})))]}};Xt.style=".s-gifting-steps-wrapper{-webkit-transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s;transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;-webkit-appearance:none;-moz-appearance:none;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}",salla.event.setMaxListeners(20);const Kt=new class{toggleElementClassIf(t,i,e,n){i=Array.isArray(i)?i:i.split(" "),e=Array.isArray(e)?e:e.split(" ");let o=n(t);return null==t||t.classList.remove(...o?e:i),null==t||t.classList.add(...o?i:e),this}toggleClassIf(t,i,e,n){return document.querySelectorAll(t).forEach((t=>this.toggleElementClassIf(t,i,e,n))),this}isValidEmail(t){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}debounce(t,...i){return this.debounce_||(this.debounce_=Salla.helpers.debounce(((t,...i)=>t(...i)),500)),this.debounce_(t,...i)}},Qt=class{constructor(i){t(this,i),this.nextPage="",this.autoload=!1,this.container="salla-infinite-scroll",this.item="salla-infinite-scroll > *",this.status=document.createElement("div"),this.status.className="s-infinite-scroll-wrapper",this.status.innerHTML=`<div class="s-infinite-scroll-status" style="display:none">\n <p class="s-infinite-scroll-last infinite-scroll-last"></p>\n <p class="s-infinite-scroll-error infinite-scroll-error"></p>\n </div>\n <a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn s-button-primary">\n <span class="s-button-text s-infinite-scroll-btn-text">${salla.lang.get("common.elements.load_more")}</span>\n <span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>\n </a>`,this.btnLoader=this.status.querySelector(".s-button-loader"),salla.lang.onLoaded((()=>{this.status.querySelector(".s-button-text").innerHTML=salla.lang.get("common.elements.load_more"),this.status.querySelector(".s-infinite-scroll-last").innerHTML=salla.lang.get("common.elements.end_of_content"),this.status.querySelector(".s-infinite-scroll-error").innerHTML=salla.lang.get("common.elements.failed_to_load_more")}))}loading(t=!0){let i=this.status.querySelector(".s-button-text");Kt.toggleElementClassIf(i,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none"}render(){return this.nextPage.length>1?i(e,{class:"s-infinite-scroll-container"},i("slot",null)):""}componentDidLoad(){if(0===this.nextPage.length)return;this.host.insertAdjacentElement("afterend",this.status);let t=this,i=salla.infiniteScroll.initiate(this.container,{history:!!this.autoload&&"push",scrollThreshold:!!this.autoload&&400,nextPage:this.nextPage,checkLastPage:'salla-infinite-scroll[next-page*=":"],salla-infinite-scroll[next-page*="."]',status:".s-infinite-scroll-status",button:this.status.querySelector(".s-button-btn"),append:this.item,path:function(){return t.nextPage.replace(/page\=(\d)/g,"page="+(this.loadCount+2))}}).on("request",(()=>this.loading())).on("load",(()=>{this.loading(!1),2==i.pageIndex&&i.option({loadOnScroll:!1}),3==i.pageIndex&&i.option({loadOnScroll:!0})})).on("error",(()=>this.loading(!1)))}get host(){return n(this)}};Qt.style="";const Jt=class{constructor(i){t(this,i),this.href=void 0,this.target="_self"}generateClass(){return{"s-list-tile-item":!0,"s-list-tile-item-href":!!this.href}}render(){return i(e,null,i("a",{class:this.generateClass(),href:this.href,target:this.target},i("div",{class:"s-list-tile-item-icon"},i("slot",{name:"icon"})),i("div",{class:"s-list-tile-item-content"},i("div",{class:"s-list-tile-item-title"},i("slot",{name:"title"})),i("div",{class:"s-list-tile-item-subtitle"},i("slot",{name:"subtitle"}))),i("div",{class:"s-list-tile-item-action"},i("slot",{name:"action"}))))}};Jt.style="";const ti=class{constructor(i){t(this,i),this.size=32,this.width=2,this.color=void 0,this.bgColor="#e5e7eb"}render(){return i(e,{class:"s-loading-container"},i("svg",{"aria-hidden":"true",style:{width:`${this.size}px`,height:`${this.size}px`,fill:this.color,color:this.bgColor},class:"s-loading",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})))}};ti.style=".s-loading{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;fill:var(--color-primary)}.s-loading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";const ii=class{constructor(i){var e,n;t(this,i),this.translationLoaded=!1,this.languages=[],this.currencies=[],this.hasError=!1,this.language=salla.config.get("user.language_code"),this.currency=salla.config.get("user.currency_code"),salla.event.on("localization::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0})),this.languageSlot=(null===(e=this.host.querySelector('[slot="language"]'))||void 0===e?void 0:e.innerHTML)||'<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span><div class="s-localization-modal-flag flag iti__flag iti__{country_code}"></div></label>',this.currencySlot=(null===(n=this.host.querySelector('[slot="currency"]'))||void 0===n?void 0:n.innerHTML)||'<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{code}</small></label>'}async open(){return this.modal.open(),await salla.api.withoutNotifier((()=>this.getLanguages())).then((()=>this.getCurrencies())).catch((t=>{var i,e,n,o;console.log(t),this.hasError=!0,this.errorMessage=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data)})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}async getLanguages(){return this.language=this.language||salla.config.get("user.language_code"),this.languages.length>1?null:await salla.config.languages().then((t=>this.languages=t))}async getCurrencies(){return this.currency=this.currency||salla.config.get("user.currency_code"),this.currencies.length>1?null:await salla.config.currencies().then((t=>this.currencies=Object.values(t||{})))}onChangeCurrency(t){this.currency=t.target.value}onChangeLanguage(t){this.language=t.target.value}async submit(){let t;this.btn.load().then((()=>{if(this.currency){if(this.currency!==salla.config.get("user.currency_code","SAR"))return t=window.location.href,salla.currency.api.change(this.currency)}else salla.log("There is no currency!")})).then((()=>this.language===salla.config.get("user.language_code","ar")||(t=salla.helpers.addParamToUrl("lang",this.language)))).then((()=>this.btn.stop())).then((()=>this.close())).then((()=>t&&(window.location.href=t)))}render(){return i("salla-modal",{isLoading:!0,class:"s-hidden",ref:t=>this.modal=t,width:"xs"},i("div",{slot:"loading"},i("div",{class:"s-localization-modal-skeleton"},i("salla-skeleton",{width:"25%",height:"15px"}),i("div",{class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>i("div",{class:"s-localization-modal-skeleton-item"},i("div",{class:"s-localization-modal-skeleton-item-flex"},i("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),i("salla-skeleton",{height:"10px",width:"100px"})),i("salla-skeleton",{height:"15px",width:"20px"}))))),i("salla-skeleton",{width:"25%",height:"15px"}),i("div",{class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>i("div",{class:"s-localization-modal-skeleton-item"},i("div",{class:"s-localization-modal-skeleton-item-flex"},i("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),i("salla-skeleton",{height:"10px",width:"100px"})),i("salla-skeleton",{height:"15px",width:"20px"}))))),i("salla-skeleton",{height:"40px",width:"100%"}))),this.hasError?i("salla-placeholder",{alignment:"center"},i("span",{slot:"description"},this.errorMessage)):i("div",{class:"s-localization-modal-inner"},this.languages.length>1?i("div",{class:"s-localization-modal-section"},i("label",{class:"s-localization-modal-title"},salla.lang.get("common.titles.language")),i("div",{class:"s-localization-modal-section-inner"},this.languages.length<6||1==this.currencies.length?this.languages.map((t=>i("div",{class:"s-localization-modal-item"},i("input",{class:"s-localization-modal-input",type:"radio",checked:this.language==t.iso_code,onChange:()=>this.language=t.iso_code,name:"language",id:"lang-"+t.code.toLowerCase(),value:t.code}),i("div",{class:"s-localization-modal-label-slot",id:"language-slot",innerHTML:this.languageSlot.replace(/\{name\}/g,t.name).replace(/\{code\}/g,t.code).replace(/\{country_code\}/g,t.country_code)})))):i("select",{class:"s-localization-modal-select",name:"language",onChange:t=>this.onChangeLanguage(t)},this.languages.map((t=>i("option",{value:t.code,selected:this.language==t.code},t.name)))))):"",this.currencies.length>1?i("div",{class:"s-localization-modal-section"},i("label",{class:"s-localization-modal-title"},salla.lang.get("common.titles.currency")),i("div",{class:"s-localization-modal-section-inner"},this.currencies.length<6||1==this.languages.length?this.currencies.map((t=>i("div",{class:"s-localization-modal-item"},i("input",{class:"s-localization-modal-input",type:"radio",name:"currency",checked:this.currency==t.code,onChange:()=>this.currency=t.code,id:"currency-"+t.code,value:t.code}),i("div",{class:"s-localization-modal-label-slot",id:"currency-slot",innerHTML:this.currencySlot.replace(/\{name\}/g,t.name).replace(/\{code\}/g,t.code).replace(/\{country_code\}/g,t.country_code)})))):i("select",{class:"s-localization-modal-select",name:"currency",onChange:t=>this.onChangeCurrency(t)},this.currencies.map((t=>i("option",{value:t.code,selected:this.currency==t.code},t.name)))))):"",i("salla-button",{width:"wide",ref:t=>this.btn=t,onClick:()=>this.submit()},salla.lang.get("common.elements.ok"))))}componentDidRender(){this.host.querySelectorAll("#currency-slot").forEach((t=>t.replaceWith(t.firstChild))),this.host.querySelectorAll("#language-slot").forEach((t=>t.replaceWith(t.firstChild)))}get host(){return n(this)}};ii.style=".s-localization-modal-select{background-image:url(\"data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.iti__flag{background-size:5652px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:14px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cr{height:12px;background-position:-1115px 0px}.iti__flag.iti__cu{height:10px;background-position:-1137px 0px}.iti__flag.iti__cv{height:12px;background-position:-1159px 0px}.iti__flag.iti__cw{height:14px;background-position:-1181px 0px}.iti__flag.iti__cx{height:10px;background-position:-1203px 0px}.iti__flag.iti__cy{height:14px;background-position:-1225px 0px}.iti__flag.iti__cz{height:14px;background-position:-1247px 0px}.iti__flag.iti__de{height:12px;background-position:-1269px 0px}.iti__flag.iti__dg{height:10px;background-position:-1291px 0px}.iti__flag.iti__dj{height:14px;background-position:-1313px 0px}.iti__flag.iti__dk{height:15px;background-position:-1335px 0px}.iti__flag.iti__dm{height:10px;background-position:-1357px 0px}.iti__flag.iti__do{height:14px;background-position:-1379px 0px}.iti__flag.iti__dz{height:14px;background-position:-1401px 0px}.iti__flag.iti__ea{height:14px;background-position:-1423px 0px}.iti__flag.iti__ec{height:14px;background-position:-1445px 0px}.iti__flag.iti__ee{height:13px;background-position:-1467px 0px}.iti__flag.iti__eg{height:14px;background-position:-1489px 0px}.iti__flag.iti__eh{height:10px;background-position:-1511px 0px}.iti__flag.iti__er{height:10px;background-position:-1533px 0px}.iti__flag.iti__es{height:14px;background-position:-1555px 0px}.iti__flag.iti__et{height:10px;background-position:-1577px 0px}.iti__flag.iti__eu{height:14px;background-position:-1599px 0px}.iti__flag.iti__fi{height:12px;background-position:-1621px 0px}.iti__flag.iti__fj{height:10px;background-position:-1643px 0px}.iti__flag.iti__fk{height:10px;background-position:-1665px 0px}.iti__flag.iti__fm{height:11px;background-position:-1687px 0px}.iti__flag.iti__fo{height:15px;background-position:-1709px 0px}.iti__flag.iti__fr{height:14px;background-position:-1731px 0px}.iti__flag.iti__ga{height:15px;background-position:-1753px 0px}.iti__flag.iti__gb{height:10px;background-position:-1775px 0px}.iti__flag.iti__gd{height:12px;background-position:-1797px 0px}.iti__flag.iti__ge{height:14px;background-position:-1819px 0px}.iti__flag.iti__gf{height:14px;background-position:-1841px 0px}.iti__flag.iti__gg{height:14px;background-position:-1863px 0px}.iti__flag.iti__gh{height:14px;background-position:-1885px 0px}.iti__flag.iti__gi{height:10px;background-position:-1907px 0px}.iti__flag.iti__gl{height:14px;background-position:-1929px 0px}.iti__flag.iti__gm{height:14px;background-position:-1951px 0px}.iti__flag.iti__gn{height:14px;background-position:-1973px 0px}.iti__flag.iti__gp{height:14px;background-position:-1995px 0px}.iti__flag.iti__gq{height:14px;background-position:-2017px 0px}.iti__flag.iti__gr{height:14px;background-position:-2039px 0px}.iti__flag.iti__gs{height:10px;background-position:-2061px 0px}.iti__flag.iti__gt{height:13px;background-position:-2083px 0px}.iti__flag.iti__gu{height:11px;background-position:-2105px 0px}.iti__flag.iti__gw{height:10px;background-position:-2127px 0px}.iti__flag.iti__gy{height:12px;background-position:-2149px 0px}.iti__flag.iti__hk{height:14px;background-position:-2171px 0px}.iti__flag.iti__hm{height:10px;background-position:-2193px 0px}.iti__flag.iti__hn{height:10px;background-position:-2215px 0px}.iti__flag.iti__hr{height:10px;background-position:-2237px 0px}.iti__flag.iti__ht{height:12px;background-position:-2259px 0px}.iti__flag.iti__hu{height:10px;background-position:-2281px 0px}.iti__flag.iti__ic{height:14px;background-position:-2303px 0px}.iti__flag.iti__id{height:14px;background-position:-2325px 0px}.iti__flag.iti__ie{height:10px;background-position:-2347px 0px}.iti__flag.iti__il{height:15px;background-position:-2369px 0px}.iti__flag.iti__im{height:10px;background-position:-2391px 0px}.iti__flag.iti__in{height:14px;background-position:-2413px 0px}.iti__flag.iti__io{height:10px;background-position:-2435px 0px}.iti__flag.iti__iq{height:14px;background-position:-2457px 0px}.iti__flag.iti__ir{height:12px;background-position:-2479px 0px}.iti__flag.iti__is{height:15px;background-position:-2501px 0px}.iti__flag.iti__it{height:14px;background-position:-2523px 0px}.iti__flag.iti__je{height:12px;background-position:-2545px 0px}.iti__flag.iti__jm{height:10px;background-position:-2567px 0px}.iti__flag.iti__jo{height:10px;background-position:-2589px 0px}.iti__flag.iti__jp{height:14px;background-position:-2611px 0px}.iti__flag.iti__ke{height:14px;background-position:-2633px 0px}.iti__flag.iti__kg{height:12px;background-position:-2655px 0px}.iti__flag.iti__kh{height:13px;background-position:-2677px 0px}.iti__flag.iti__ki{height:10px;background-position:-2699px 0px}.iti__flag.iti__km{height:12px;background-position:-2721px 0px}.iti__flag.iti__kn{height:14px;background-position:-2743px 0px}.iti__flag.iti__kp{height:10px;background-position:-2765px 0px}.iti__flag.iti__kr{height:14px;background-position:-2787px 0px}.iti__flag.iti__kw{height:10px;background-position:-2809px 0px}.iti__flag.iti__ky{height:10px;background-position:-2831px 0px}.iti__flag.iti__kz{height:10px;background-position:-2853px 0px}.iti__flag.iti__la{height:14px;background-position:-2875px 0px}.iti__flag.iti__lb{height:14px;background-position:-2897px 0px}.iti__flag.iti__lc{height:10px;background-position:-2919px 0px}.iti__flag.iti__li{height:12px;background-position:-2941px 0px}.iti__flag.iti__lk{height:10px;background-position:-2963px 0px}.iti__flag.iti__lr{height:11px;background-position:-2985px 0px}.iti__flag.iti__ls{height:14px;background-position:-3007px 0px}.iti__flag.iti__lt{height:12px;background-position:-3029px 0px}.iti__flag.iti__lu{height:12px;background-position:-3051px 0px}.iti__flag.iti__lv{height:10px;background-position:-3073px 0px}.iti__flag.iti__ly{height:10px;background-position:-3095px 0px}.iti__flag.iti__ma{height:14px;background-position:-3117px 0px}.iti__flag.iti__mc{height:15px;background-position:-3139px 0px}.iti__flag.iti__md{height:10px;background-position:-3160px 0px}.iti__flag.iti__me{height:10px;background-position:-3182px 0px}.iti__flag.iti__mf{height:14px;background-position:-3204px 0px}.iti__flag.iti__mg{height:14px;background-position:-3226px 0px}.iti__flag.iti__mh{height:11px;background-position:-3248px 0px}.iti__flag.iti__mk{height:10px;background-position:-3270px 0px}.iti__flag.iti__ml{height:14px;background-position:-3292px 0px}.iti__flag.iti__mm{height:14px;background-position:-3314px 0px}.iti__flag.iti__mn{height:10px;background-position:-3336px 0px}.iti__flag.iti__mo{height:14px;background-position:-3358px 0px}.iti__flag.iti__mp{height:10px;background-position:-3380px 0px}.iti__flag.iti__mq{height:14px;background-position:-3402px 0px}.iti__flag.iti__mr{height:14px;background-position:-3424px 0px}.iti__flag.iti__ms{height:10px;background-position:-3446px 0px}.iti__flag.iti__mt{height:14px;background-position:-3468px 0px}.iti__flag.iti__mu{height:14px;background-position:-3490px 0px}.iti__flag.iti__mv{height:14px;background-position:-3512px 0px}.iti__flag.iti__mw{height:14px;background-position:-3534px 0px}.iti__flag.iti__mx{height:12px;background-position:-3556px 0px}.iti__flag.iti__my{height:10px;background-position:-3578px 0px}.iti__flag.iti__mz{height:14px;background-position:-3600px 0px}.iti__flag.iti__na{height:14px;background-position:-3622px 0px}.iti__flag.iti__nc{height:10px;background-position:-3644px 0px}.iti__flag.iti__ne{height:15px;background-position:-3666px 0px}.iti__flag.iti__nf{height:10px;background-position:-3686px 0px}.iti__flag.iti__ng{height:10px;background-position:-3708px 0px}.iti__flag.iti__ni{height:12px;background-position:-3730px 0px}.iti__flag.iti__nl{height:14px;background-position:-3752px 0px}.iti__flag.iti__no{height:15px;background-position:-3774px 0px}.iti__flag.iti__np{height:15px;background-position:-3796px 0px}.iti__flag.iti__nr{height:10px;background-position:-3811px 0px}.iti__flag.iti__nu{height:10px;background-position:-3833px 0px}.iti__flag.iti__nz{height:10px;background-position:-3855px 0px}.iti__flag.iti__om{height:10px;background-position:-3877px 0px}.iti__flag.iti__pa{height:14px;background-position:-3899px 0px}.iti__flag.iti__pe{height:14px;background-position:-3921px 0px}.iti__flag.iti__pf{height:14px;background-position:-3943px 0px}.iti__flag.iti__pg{height:15px;background-position:-3965px 0px}.iti__flag.iti__ph{height:10px;background-position:-3987px 0px}.iti__flag.iti__pk{height:14px;background-position:-4009px 0px}.iti__flag.iti__pl{height:13px;background-position:-4031px 0px}.iti__flag.iti__pm{height:14px;background-position:-4053px 0px}.iti__flag.iti__pn{height:10px;background-position:-4075px 0px}.iti__flag.iti__pr{height:14px;background-position:-4097px 0px}.iti__flag.iti__ps{height:10px;background-position:-4119px 0px}.iti__flag.iti__pt{height:14px;background-position:-4141px 0px}.iti__flag.iti__pw{height:13px;background-position:-4163px 0px}.iti__flag.iti__py{height:11px;background-position:-4185px 0px}.iti__flag.iti__qa{height:8px;background-position:-4207px 0px}.iti__flag.iti__re{height:14px;background-position:-4229px 0px}.iti__flag.iti__ro{height:14px;background-position:-4251px 0px}.iti__flag.iti__rs{height:14px;background-position:-4273px 0px}.iti__flag.iti__ru{height:14px;background-position:-4295px 0px}.iti__flag.iti__rw{height:14px;background-position:-4317px 0px}.iti__flag.iti__sa{height:14px;background-position:-4339px 0px}.iti__flag.iti__sb{height:10px;background-position:-4361px 0px}.iti__flag.iti__sc{height:10px;background-position:-4383px 0px}.iti__flag.iti__sd{height:10px;background-position:-4405px 0px}.iti__flag.iti__se{height:13px;background-position:-4427px 0px}.iti__flag.iti__sg{height:14px;background-position:-4449px 0px}.iti__flag.iti__sh{height:10px;background-position:-4471px 0px}.iti__flag.iti__si{height:10px;background-position:-4493px 0px}.iti__flag.iti__sj{height:15px;background-position:-4515px 0px}.iti__flag.iti__sk{height:14px;background-position:-4537px 0px}.iti__flag.iti__sl{height:14px;background-position:-4559px 0px}.iti__flag.iti__sm{height:15px;background-position:-4581px 0px}.iti__flag.iti__sn{height:14px;background-position:-4603px 0px}.iti__flag.iti__so{height:14px;background-position:-4625px 0px}.iti__flag.iti__sr{height:14px;background-position:-4647px 0px}.iti__flag.iti__ss{height:10px;background-position:-4669px 0px}.iti__flag.iti__st{height:10px;background-position:-4691px 0px}.iti__flag.iti__sv{height:12px;background-position:-4713px 0px}.iti__flag.iti__sx{height:14px;background-position:-4735px 0px}.iti__flag.iti__sy{height:14px;background-position:-4757px 0px}.iti__flag.iti__sz{height:14px;background-position:-4779px 0px}.iti__flag.iti__ta{height:10px;background-position:-4801px 0px}.iti__flag.iti__tc{height:10px;background-position:-4823px 0px}.iti__flag.iti__td{height:14px;background-position:-4845px 0px}.iti__flag.iti__tf{height:14px;background-position:-4867px 0px}.iti__flag.iti__tg{height:13px;background-position:-4889px 0px}.iti__flag.iti__th{height:14px;background-position:-4911px 0px}.iti__flag.iti__tj{height:10px;background-position:-4933px 0px}.iti__flag.iti__tk{height:10px;background-position:-4955px 0px}.iti__flag.iti__tl{height:10px;background-position:-4977px 0px}.iti__flag.iti__tm{height:14px;background-position:-4999px 0px}.iti__flag.iti__tn{height:14px;background-position:-5021px 0px}.iti__flag.iti__to{height:10px;background-position:-5043px 0px}.iti__flag.iti__tr{height:14px;background-position:-5065px 0px}.iti__flag.iti__tt{height:12px;background-position:-5087px 0px}.iti__flag.iti__tv{height:10px;background-position:-5109px 0px}.iti__flag.iti__tw{height:14px;background-position:-5131px 0px}.iti__flag.iti__tz{height:14px;background-position:-5153px 0px}.iti__flag.iti__ua{height:14px;background-position:-5175px 0px}.iti__flag.iti__ug{height:14px;background-position:-5197px 0px}.iti__flag.iti__um{height:11px;background-position:-5219px 0px}.iti__flag.iti__un{height:14px;background-position:-5241px 0px}.iti__flag.iti__us{height:11px;background-position:-5263px 0px}.iti__flag.iti__uy{height:14px;background-position:-5285px 0px}.iti__flag.iti__uz{height:10px;background-position:-5307px 0px}.iti__flag.iti__va{height:15px;background-position:-5329px 0px}.iti__flag.iti__vc{height:14px;background-position:-5346px 0px}.iti__flag.iti__ve{height:14px;background-position:-5368px 0px}.iti__flag.iti__vg{height:10px;background-position:-5390px 0px}.iti__flag.iti__vi{height:14px;background-position:-5412px 0px}.iti__flag.iti__vn{height:14px;background-position:-5434px 0px}.iti__flag.iti__vu{height:12px;background-position:-5456px 0px}.iti__flag.iti__wf{height:14px;background-position:-5478px 0px}.iti__flag.iti__ws{height:10px;background-position:-5500px 0px}.iti__flag.iti__xk{height:15px;background-position:-5522px 0px}.iti__flag.iti__ye{height:14px;background-position:-5544px 0px}.iti__flag.iti__yt{height:14px;background-position:-5566px 0px}.iti__flag.iti__za{height:14px;background-position:-5588px 0px}.iti__flag.iti__zm{height:14px;background-position:-5610px 0px}.iti__flag.iti__zw{height:10px;background-position:-5632px 0px}.iti__flag{height:15px;-webkit-box-shadow:0px 0px 1px 0px #888;box-shadow:0px 0px 1px 0px #888;background-image:url(\"https://cdn.salla.network/images/flags.png\");background-repeat:no-repeat;background-color:#f5f7f9;background-position:20px 0}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.iti__flag{background-image:url(\"https://cdn.salla.network/images/flags@2x.png\")}}.iti__flag.iti__np{background-color:transparent}";const ei='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>mail</title>\n<path d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',ni='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>keyboard_arrow_right</title>\n<path d="M11.438 22.479l6.125-6.125-6.125-6.125 1.875-1.875 8 8-8 8z"></path>\n</svg>\n',oi=class{constructor(i){t(this,i),this.isEmailAllowed=!0,this.isMobileAllowed=!0,this.isEmailRequired=!1,this.supportWebAuth=!0,this.currentTabName="home",this.regType="phone",this.translationLoaded=!1,this.typing=(t,i)=>{const e=t.target.nextElementSibling;t.target.classList.remove("s-has-error"),(null==e?void 0:e.classList.contains("s-login-modal-error-message"))&&(e.innerText=""),"Enter"==t.key&&i()},this.loginBySMS=async(t=null)=>{null==t||t.preventDefault();const{phone:i,countryCode:e}=await this.loginTelInput.getValues();if(await this.loginTelInput.isValid())return this.login(this.smsBtn,{type:"mobile",phone:i,country_code:e}),!1},this.loginByEmail=(t=null)=>{null==t||t.preventDefault(),Kt.isValidEmail(this.loginEmail.value)?this.login(this.emailBtn,{type:"email",email:this.loginEmail.value}):this.validateField(this.loginEmail,this.emailErrorMsg)},this.newUser=async()=>{var t;const{phone:i,countryCode:e}="email"==this.regType?await this.regTelInput.getValues():await this.loginTelInput.getValues(),n=this.regEmail.value||(null===(t=this.loginEmail)||void 0===t?void 0:t.value);await this.newUserValidation(),await this.regBtn.load(),await this.regBtn.disable();let o={first_name:this.firstName.value,last_name:this.lastName.value,phone:i||this.loginTelInput.phone,country_code:e,verified_by:this.regType};n&&(o=Object.assign(Object.assign({},o),{email:n})),this.verifyTab.getCode().then((t=>salla.auth.api.register(Object.assign(Object.assign({},o),{code:t})))).then((()=>salla.auth.canRedirect&&window.location.reload())).catch((t=>{salla.logger.error(t),this.regBtn.stop()&&this.regBtn.enable()}))},this.title=this.host.title||salla.lang.get("blocks.header.login"),this.host.removeAttribute("title"),this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:salla.lang.get("pages.profile.first_name")}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:salla.lang.get("pages.profile.last_name")}),salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("blocks.header.login"),this.updateTranslations()})),salla.event.on("login::open",(t=>this.open(t))),salla.event.on("twilight::initiated",(()=>{this.isEmailAllowed=salla.config.get("store.settings.auth.email_allowed",this.isEmailAllowed),this.isMobileAllowed=salla.config.get("store.settings.auth.mobile_allowed",this.isMobileAllowed),this.isEmailRequired=salla.config.get("store.settings.auth.is_email_required",this.isEmailRequired)}))}onVerified(t){var i,e;salla.log("verified",t);let n=(null===(i=t.detail)||void 0===i?void 0:i.data.case)||(null===(e=t.detail)||void 0===e?void 0:e.error.case);if(n){if("new_customer"===n)return this.showTab(this.registrationTab);if(salla.auth.canRedirect())return t.detail.data.redirect_url?window.location.href=t.detail.data.redirect_url:void(this.supportWebAuth?window.location.reload():this.modal.close());salla.log("Will not auto redirect or reload, due to `salla.auth.canRedirect()`")}else salla.log("verified but without case!")}updateTranslations(){var t;this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:salla.lang.get("pages.profile.first_name")}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:salla.lang.get("pages.profile.last_name")}),null===(t=this.modal)||void 0===t||t.setTitle(this.title)}async open(t=null){return this.isEmailAllowed&&this.isMobileAllowed?this.showTab(this.homeTab):this.isEmailAllowed?this.showTab(this.emailTab):this.isMobileAllowed&&this.showTab(this.mobileTab),this.modal.open()}showTab(t,i){var e;return null==i||i.preventDefault(),this.currentTabName=t.getAttribute("data-name"),[this.mobileTab,this.emailTab].includes(t)&&(this.regType=t===this.mobileTab?"phone":"email"),null===(e=this.modal)||void 0===e||e.setTitle("registration"===this.currentTabName?salla.lang.get("common.titles.registration"):this.title),this}login(t,i){t.load().then((()=>t.disable())).then((()=>salla.auth.api.login(i))).then((()=>this.showTab(this.verifyTab))).then((()=>this.verifyTab.open(i))).finally((()=>t.stop()&&t.enable()))}async newUserValidation(){const t="phone"==this.regType,i=this.regEmail.value||"email"==this.regType&&this.loginEmail.value,e=Kt.isValidEmail(i),n=this.firstName.value.length>0,o=this.lastName.value.length>0,a=await this.regTelInput.isValid()||t&&await this.loginTelInput.isValid();if(!((i&&e||!i&&!this.isEmailRequired)&&a&&n&&o))throw!e&&this.validateField(this.regEmail,this.emailErrorMsg),!n&&this.validateField(this.firstName,this.firstNameErrorMsg),!o&&this.validateField(this.lastName,this.lastNameErrorMsg),"Please insert required fields"}validateField(t,i){t.classList.add("s-has-error"),t.nextElementSibling.innerText="* "+i}generateTabClasses(t){return{"s-login-modal-tab":"registration"!==t&&"otp"!==t,"s-hidden":this.currentTabName!==t,"s-show":this.currentTabName===t,"s-login-modal-unactive":"registration"!==t&&"otp"!==t&&this.currentTabName!==t,"s-login-modal-active":"registration"!==t&&"otp"!==t&&this.currentTabName===t}}generateRegClasses(t){return{"mb-1.5":!0,"s-hidden":this.regType===t}}render(){return i("salla-modal",{class:"s-login-modal","modal-title":this.title,ref:t=>this.modal=t,width:"xs"},i("span",{slot:"icon",class:"s-login-modal-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user</title>\n<path d="M16 16c4.412 0 8-3.588 8-8s-3.588-8-8-8-8 3.588-8 8 3.588 8 8 8zM16 2.667c2.941 0 5.333 2.392 5.333 5.333s-2.392 5.333-5.333 5.333-5.333-2.392-5.333-5.333 2.392-5.333 5.333-5.333zM16 18.667c-7.476 0-13.333 3.66-13.333 8.333v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-3.019 4.984-5.667 10.667-5.667s10.667 2.648 10.667 5.667v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-4.673-5.857-8.333-13.333-8.333z"></path>\n</svg>\n'}),i("div",{class:"s-login-modal-wrapper"},this.isEmailAllowed&&this.isMobileAllowed?i("div",{class:this.generateTabClasses("home"),"data-name":"home",ref:t=>this.homeTab=t},i("p",{class:"s-login-modal-sub-title"},salla.lang.get("blocks.header.select_login_way")),i("slot",{name:"before-login-type"}),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:t=>this.showTab(this.mobileTab,t)},i("span",{class:"s-login-modal-main-btn-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n'}),i("span",{class:"s-login-modal-main-btn-text"},salla.lang.get("blocks.header.sms")),i("span",{class:"s-login-modal-main-btn-arrow",innerHTML:ni})),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:t=>this.showTab(this.emailTab,t)},i("span",{class:"s-login-modal-main-btn-icon",innerHTML:ei}),i("span",{class:"s-login-modal-main-btn-text"},salla.lang.get("common.elements.email")),i("span",{class:"s-login-modal-main-btn-arrow",innerHTML:ni})),i("slot",{name:"after-login-type"})):"",this.isMobileAllowed?i("div",{class:this.generateTabClasses("login-phone"),"data-name":"login-phone",ref:t=>this.mobileTab=t},i("slot",{name:"before-login-mobile"}),i("form",{onSubmit:()=>this.loginBySMS(event),method:"POST"},i("label",{class:"s-login-modal-label"},salla.lang.get("common.elements.mobile")),i("salla-tel-input",{tabindex:"0",ref:t=>this.loginTelInput=t,onKeyDown:t=>this.typing(t,this.loginBySMS)}),i("salla-button",{type:"submit","loader-position":"center",width:"wide",ref:t=>this.smsBtn=t},salla.lang.get("blocks.header.enter"))),this.isEmailAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.emailTab),class:"s-login-modal-link"},salla.lang.get("blocks.header.login_by_email")):"",i("slot",{name:"after-login-mobile"})):"",this.isEmailAllowed?i("div",{class:this.generateTabClasses("login-email"),"data-name":"login-email",ref:t=>this.emailTab=t},i("slot",{name:"before-login-email"}),i("label",{class:"s-login-modal-label"},salla.lang.get("common.elements.email")),i("form",{onSubmit:()=>this.loginByEmail(event),method:"POST"},i("input",{type:"email",ref:t=>this.loginEmail=t,onKeyDown:t=>this.typing(t,this.loginByEmail),placeholder:"your@email.com",enterkeyhint:"next",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"}),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.loginByEmail(),ref:t=>this.emailBtn=t},salla.lang.get("blocks.header.enter"))),this.isMobileAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.mobileTab),class:"s-login-modal-link"},salla.lang.get("blocks.header.login_by_sms")):"",i("slot",{name:"after-login-email"})):"",i("salla-verify",{display:"inline","support-web-auth":this.supportWebAuth?"true":"false",class:this.generateTabClasses("otp"),"data-name":"otp",ref:t=>this.verifyTab=t,autoReload:!1},i("a",{onClick:()=>this.showTab("phone"==this.regType?this.mobileTab:this.emailTab),class:"s-verify-back",innerHTML:Yt,slot:"after-footer",href:"#"})),i("div",{"data-name":"registration",class:this.generateTabClasses("registration"),ref:t=>this.registrationTab=t},i("slot",{name:"before-registration"}),i("div",null,i("label",{class:"s-login-modal-label"},salla.lang.get("blocks.header.your_name")),i("input",{type:"text",class:"s-login-modal-input",ref:t=>this.firstName=t,onKeyDown:t=>this.typing(t,this.newUser),placeholder:salla.lang.get("pages.profile.first_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",null,i("label",{class:"s-login-modal-label"},salla.lang.get("pages.profile.last_name")),i("input",{type:"text",class:"s-login-modal-input",ref:t=>this.lastName=t,onKeyDown:t=>this.typing(t,this.newUser),placeholder:salla.lang.get("pages.profile.last_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",{class:this.generateRegClasses("phone")},i("label",{class:"s-login-modal-label"},salla.lang.get("common.elements.mobile")),i("salla-tel-input",{ref:t=>this.regTelInput=t,onKeyDown:t=>this.typing(t,this.newUser)})),i("div",{class:this.generateRegClasses("email")},i("label",{class:"s-login-modal-label"},salla.lang.get("common.elements.email")),i("input",{type:"email",ref:t=>this.regEmail=t,onKeyDown:t=>this.typing(t,this.newUser),placeholder:"your@email.com",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"})),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.newUser(),ref:t=>this.regBtn=t},salla.lang.get("blocks.header.register")),i("slot",{name:"after-registration"}))))}get host(){return n(this)}};oi.style="";const ai='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">\n<title>star2</title>\n<path d="M29.714 11.839c0 0.321-0.232 0.625-0.464 0.857l-6.482 6.321 1.536 8.929c0.018 0.125 0.018 0.232 0.018 0.357 0 0.464-0.214 0.893-0.732 0.893-0.25 0-0.5-0.089-0.714-0.214l-8.018-4.214-8.018 4.214c-0.232 0.125-0.464 0.214-0.714 0.214-0.518 0-0.75-0.429-0.75-0.893 0-0.125 0.018-0.232 0.036-0.357l1.536-8.929-6.5-6.321c-0.214-0.232-0.446-0.536-0.446-0.857 0-0.536 0.554-0.75 1-0.821l8.964-1.304 4.018-8.125c0.161-0.339 0.464-0.732 0.875-0.732s0.714 0.393 0.875 0.732l4.018 8.125 8.964 1.304c0.429 0.071 1 0.286 1 0.821z"></path>\n</svg>\n',ri=class{constructor(i){t(this,i),this.loyaltyProgram=void 0,this.buttonLoading=!1,this.selectedItem=void 0,this.askConfirmation=!1,this.is_loggedin=!1,this.hasError=!1,this.prizePoints=void 0,this.customerPoints=void 0,this.prizeTitle=void 0,this.allowEmail=!0,this.allowMobile=!0,this.requireEmail=!1,salla.event.on("loyalty::open",(()=>this.open())),salla.auth.event.onLoggedIn((()=>{this.is_loggedin=!0})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}setSelectedPrizeItem(t){var i;this.selectedItem=this.selectedItem&&(null===(i=this.selectedItem)||void 0===i?void 0:i.id)==t.id?void 0:t}handleLongText(t){return t.length>150?t.substring(0,150)+"...":t}prizeItem(t){var e;let n={"s-loyalty-prize-item-selected":!!this.selectedItem&&(null===(e=this.selectedItem)||void 0===e?void 0:e.id)==t.id,"s-loyalty-prize-item":!0};return i("div",{onClick:()=>this.setSelectedPrizeItem(t),class:n},i("img",{class:"s-loyalty-prize-item-image",src:t.image,alt:t.name}),i("div",{class:"s-loyalty-prize-item-title"},t.name),i("div",{class:"s-loyalty-prize-item-subtitle"},this.handleLongText(t.description)),i("div",{class:"s-loyalty-prize-item-points"},t.cost_points," ",salla.lang.get("pages.loyalty_program.point"),i("div",{class:"s-loyalty-prize-item-check"},i("div",null))))}getConfirmationModal(){var t,e;return[i("salla-placeholder",{alignment:"center",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">\n<title>star3</title>\n <defs>\n <style>\n .a {\n fill: none !important;\n }\n\n .b {\n fill: #ff9e01;\n }\n\n .c {\n fill: #fff;\n opacity: 0.1;\n }\n\n </style>\n </defs>\n <g transform="translate(-683 -269)">\n <rect class="a" width="80" height="80" transform="translate(683 269)" />\n <g transform="translate(684.539 261.216)">\n <path class="b"\n d="M110.117,37.062,90.024,35.2,82.043,16.665a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l17.351-10.3,17.351,10.3a1.61,1.61,0,0,0,2.393-1.739L95.871,53.192l15.16-13.318A1.61,1.61,0,0,0,110.117,37.062Z"\n transform="translate(-42.104 -4.011)" />\n <g transform="translate(0 10.971)">\n <path class="b"\n d="M93.54,12.016c1.024,1.423,3.915,7.533,5.568,11.094a.559.559,0,0,1-.891.641c-2.853-2.7-7.73-7.377-8.754-8.8a2.512,2.512,0,0,1,4.077-2.935Z"\n transform="translate(-75.621 -10.971)" />\n <path class="b"\n d="M360.909,12.016c-1.024,1.423-3.915,7.533-5.568,11.094a.559.559,0,0,0,.891.641c2.853-2.7,7.73-7.377,8.754-8.8a2.512,2.512,0,0,0-4.077-2.935Z"\n transform="translate(-301.908 -10.971)" />\n <path class="b"\n d="M427.538,284.659c-1.667-.543-8.366-1.441-12.261-1.934a.559.559,0,0,0-.34,1.044c3.436,1.9,9.377,5.123,11.044,5.666a2.512,2.512,0,0,0,1.558-4.776Z"\n transform="translate(-352.351 -241.894)" />\n <path class="b"\n d="M1.734,284.659c1.667-.543,8.366-1.441,12.261-1.934a.559.559,0,0,1,.34,1.044c-3.436,1.9-9.377,5.123-11.044,5.666a2.512,2.512,0,0,1-1.558-4.776Z"\n transform="translate(0 -241.894)" />\n <path class="b"\n d="M239.794,412.414c0-1.753,1.224-8.4,1.963-12.257a.559.559,0,0,1,1.1,0c.739,3.855,1.963,10.5,1.963,12.257a2.512,2.512,0,0,1-5.023,0Z"\n transform="translate(-203.768 -341.301)" />\n </g>\n <path class="c"\n d="M84.945,23.4l-2.9-6.74a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l2.309-1.371A125,125,0,0,1,84.945,23.4Z"\n transform="translate(-42.104 -4.011)" />\n </g>\n </g>\n</svg>\n',class:"s-loyalty-confirmation-modal-content"},i("div",{slot:"title",class:"s-loyalty-confirmation-title"},salla.lang.get("pages.loyalty_program.exchange_points")),i("div",{slot:"description"},salla.lang.get("pages.loyalty_program.are_you_sure_to_exchange")," ( ",i("strong",null,null===(t=this.selectedItem)||void 0===t?void 0:t.cost_points)," ) ",salla.lang.get("pages.loyalty_program.for")," ( ",i("strong",null,null===(e=this.selectedItem)||void 0===e?void 0:e.name)," )")),i("div",{class:"s-loyalty-confirmation-actions"},i("salla-button",{fill:"outline",width:"wide",onClick:()=>this.cancelProcess()},salla.lang.get("pages.loyalty_program.cancellation")),i("salla-button",{loading:this.buttonLoading,width:"wide",onClick:()=>this.exchangeLoyaltyPoint()},salla.lang.get("pages.loyalty_program.confirm")))]}getAfterExchangeUI(){return i("slot",{name:"points-applied-widget"},i("salla-list-tile",{class:"s-loyalty-after-exchange"},i("div",{slot:"title",class:"s-loyalty-after-exchange-title"},this.prizeTitle,"   -   ",this.prizePoints," ",salla.lang.get("pages.loyalty_program.point")),i("div",{slot:"action",class:"s-loyalty-after-exchange-action"},i("salla-button",{class:"s-loyalty-after-exchange-reset",shape:"icon",fill:"outline",color:"danger",size:"small",onClick:()=>this.resetExchange()},i("span",{innerHTML:$t})))))}async open(){var t;return this.is_loggedin?(null===(t=this.modal)||void 0===t||t.open(),await salla.loyalty.getProgram().then((t=>this.loyaltyProgram=t.data)).catch((t=>{var i,e,n,o;this.hasError=!0,this.errorMessage=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data)})).finally((()=>{var t;return null===(t=this.modal)||void 0===t?void 0:t.stopLoading()}))):salla.event.dispatch("login::open")}async close(){return this.modal.close()}async resetExchange(){return await salla.loyalty.reset().then((t=>{var i;this.customerPoints=this.customerPoints||(null===(i=t.data)||void 0===i?void 0:i.customer_points),this.prizePoints=void 0,this.prizeTitle=void 0})).catch((t=>console.log(t)))}async openConfirmation(){return await this.modal.close().then((()=>{var t;return null===(t=this.confirmationModal)||void 0===t?void 0:t.open()})).catch((t=>console.log(t)))}async cancelProcess(){return await this.confirmationModal.close().then((()=>this.selectedItem=null)).catch((t=>console.log(t)))}async exchangeLoyaltyPoint(){var t;return this.buttonLoading=!0,await salla.loyalty.exchange(null===(t=this.selectedItem)||void 0===t?void 0:t.id).then((t=>{var i,e;this.prizePoints=null===(i=null==t?void 0:t.prize)||void 0===i?void 0:i.points,this.prizeTitle=null===(e=null==t?void 0:t.prize)||void 0===e?void 0:e.title})).catch((t=>console.log(t))).finally((()=>{this.buttonLoading=!1,this.cancelProcess()}))}render(){return this.prizePoints?this.getAfterExchangeUI():[i("slot",{name:"widget"},this.customerPoints?i("salla-list-tile",{class:"s-loyalty-widget"},i("div",{slot:"icon",class:"s-loyalty-widget-icon",innerHTML:ai}),i("div",{slot:"subtitle"},this.is_loggedin?salla.lang.get("pages.loyalty_program.cart_total_point_summary",{balance:this.customerPoints}):this.guestMessage||salla.lang.get("pages.loyalty_program.guest_message"),i("salla-button",{shape:"link",color:"primary",onClick:()=>salla.event.dispatch("loyalty::open")},this.is_loggedin?salla.lang.get("pages.loyalty_program.cart_point_exchange_now"):salla.lang.get("blocks.header.login")))):""),i("salla-modal",{noPadding:!0,width:"sm",ref:t=>this.confirmationModal=t},this.getConfirmationModal()),i("salla-modal",{isLoading:!0,"has-skeleton":!0,width:"md",ref:t=>this.modal=t},i("div",{slot:"loading"},i("div",{class:"s-loyalty-skeleton"},i("salla-list-tile",{class:"s-loyalty-header"},i("div",{slot:"icon",class:"s-loyalty-header-icon"},i("salla-skeleton",{type:"circle",height:"6rem",width:"6rem"})),i("div",{slot:"title",class:"s-loyalty-header-title mb-5"},i("salla-skeleton",{height:"15px",width:"50%"})),i("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},i("salla-skeleton",{height:"10px"}),i("salla-skeleton",{height:"10px",width:"75%"}))),i("div",{class:"s-loyalty-skeleton-cards"},[...Array(3)].map((()=>i("div",{class:"s-loyalty-prize-item"},i("salla-skeleton",{height:"9rem"}),i("div",{class:"s-loyalty-prize-item-title"},i("salla-skeleton",{height:"15px",width:"75%"})),i("div",{class:"s-loyalty-prize-item-subtitle"},i("salla-skeleton",{height:"10px",width:"50%"}),i("salla-skeleton",{height:"10px",width:"25%"})),i("div",{class:"s-loyalty-prize-item-points"},i("salla-skeleton",{height:"15px",width:"100px"}),i("div",{class:"s-loyalty-prize-item-check"},i("salla-skeleton",{height:"1rem",width:"1rem",type:"circle"}))))))))),!this.hasError&&this.loyaltyProgram?[i("salla-list-tile",{id:"s-loyalty-header",class:"s-loyalty-header"},i("div",{slot:"icon",class:"s-loyalty-header-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="54.079" height="53.191" viewBox="0 0 54.079 53.191"><defs><style>.a{fill:#ee9d0d;}.b{fill:#c7830b;}.c{fill:#ea2b2d;}.d{fill:#cb2527;}.e{fill:#6699ce;}.f{fill:#faa6b2;}.g{fill:#a6deff;}.h{fill:#eeb436;}.i{fill:#f72d2f;}</style></defs><path class="a" d="M40,248H77.3v25.88a2.1,2.1,0,0,1-2.1,2.1H42.1a2.1,2.1,0,0,1-2.1-2.1Z" transform="translate(-38.135 -222.787)"/><path class="b" d="M250.632,248.711v12.755L236.2,248h13.67Z" transform="translate(-211.463 -222.787)"/><path class="b" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="c" d="M226.194,32.048l-.5.185a5.035,5.035,0,0,0-3.072,3.292l-.468,1.585-.759.414a5.035,5.035,0,0,0-2.422,3l8.865,8.271,5.09-5.456.262-6.205a5.191,5.191,0,0,0-7-5.083Z" transform="translate(-196.246 -31.722)"/><path class="c" d="M358.628,175.48l-.15.509a5.034,5.034,0,0,1-3.072,3.292l-1.55.577-.359.785a5.034,5.034,0,0,1-2.822,2.624L341.81,175l5.09-5.455,6.172-.69a5.191,5.191,0,0,1,5.555,6.629Z" transform="translate(-304.761 -152.837)"/><path class="d" d="M168,248h7.461v27.978H168Z" transform="translate(-151.213 -222.787)"/><path class="c" d="M40,336H77.3v7.461H40Z" transform="translate(-38.135 -300.528)"/><path class="d" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="a" d="M2.1,0H40.8a2.1,2.1,0,0,1,2.1,2.1V9.326H0V2.1A2.1,2.1,0,0,1,2.1,0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 18.641, 4.976)"/><path class="d" d="M0,0H9.326V9.326H0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 30.912, 16.424)"/><path class="d" d="M286.857,79.389a.931.931,0,0,1-.74-.365l-.615-.8a12.516,12.516,0,0,1-2.528-9,.933.933,0,0,1,1.855.2,10.66,10.66,0,0,0,2.153,7.667l.615.8a.933.933,0,0,1-.739,1.5Z" transform="translate(-252.718 -64.113)"/><path class="c" d="M185.485,178.151l-.039.014a30.78,30.78,0,0,1-12.034,1.906l-2.381-.1,4.092,3.817-1.181,4,3.728-1.206a30.775,30.775,0,0,0,9.833-5.315l.71-.572Z" transform="translate(-153.891 -161.081)"/><path class="d" d="M363.834,194.779a12.51,12.51,0,0,1-6.93-2.1l-.843-.559a.933.933,0,1,1,1.031-1.554l.842.558a10.659,10.659,0,0,0,7.8,1.618.933.933,0,1,1,.328,1.836A12.663,12.663,0,0,1,363.834,194.779Z" transform="translate(-316.982 -171.914)"/><path class="c" d="M275,202.524l-.012.04a30.776,30.776,0,0,0-1.069,12.137l.265,2.369-4.092-3.817-3.909,1.455.945-3.8a30.776,30.776,0,0,1,4.622-10.177l.521-.748Z" transform="translate(-237.949 -180.364)"/><circle class="e" cx="1.865" cy="1.865" r="1.865" transform="translate(10.259 0.032)"/><circle class="f" cx="1.865" cy="1.865" r="1.865" transform="translate(0 21.482)"/><path class="g" d="M36.663,36.663a.933.933,0,0,1-.885-.638l-.048-.143a2.946,2.946,0,0,0-2.8-2.017.933.933,0,1,1,0-1.865A4.808,4.808,0,0,1,37.5,35.292l.048.143a.933.933,0,0,1-.885,1.228Z" transform="translate(-31.067 -31.968)"/><path class="g" d="M79.493,194.438a.929.929,0,0,1-.506-.15l-.185-.12a2.074,2.074,0,0,0-2.192-.047.933.933,0,0,1-.947-1.607,3.929,3.929,0,0,1,4.153.088l.185.12a.933.933,0,0,1-.508,1.716Z" transform="translate(-69.235 -173.283)"/><path class="h" d="M27.751,85.141l2.88,2.644,3.811-.874-1.624,3.556,2.008,3.354-3.884-.446-2.569,2.946L27.6,92.49,24,90.957l3.4-1.922Z" transform="translate(-24 -78.914)"/><path class="h" d="M82.174,227.375l-.959,3.772,2.564,2.928-3.884.254L77.9,237.673l-1.442-3.615-3.8-.862,2.993-2.488-.353-3.876,3.291,2.078Z" transform="translate(-66.992 -204.086)"/><path class="i" d="M300.471,141.9l-5.455-5.09,5.09-5.456a8.342,8.342,0,0,1,5.455,5.09Z" transform="translate(-263.422 -119.737)"/></svg>'}),i("div",{slot:"title",class:"s-loyalty-header-title"},this.loyaltyProgram.prize_promotion_title),i("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},this.loyaltyProgram.prize_promotion_description)),i("salla-tabs",null,this.loyaltyProgram.prizes.map((t=>i("salla-tab-header",{slot:"header",name:t.title},i("span",null,t.title)))),this.loyaltyProgram.prizes.map((t=>i("salla-tab-content",{slot:"content",name:t.title},i("salla-swiper",{"space-between-items":"20"},t.items.map((t=>this.prizeItem(t)))))))),i("salla-button",{disabled:!this.selectedItem,width:"wide",class:"s-loyalty-program-redeem-btn",onClick:()=>this.openConfirmation()},salla.lang.get("pages.loyalty_program.exchange_points"))]:i("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?i("span",{slot:"description"},this.errorMessage):""))]}componentDidLoad(){this.is_loggedin=salla.config.isUser()}};ri.style="";const si='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>check-circle2</title>\n<path d="M29.333 14.133c-0.8 0-1.333 0.533-1.333 1.333v1.2c0 6.667-5.333 12-12 12 0 0 0 0 0 0-6.667 0-12-5.333-12-12s5.333-12 12-12c0 0 0 0 0 0 1.733 0 3.333 0.4 4.933 1.067 0.667 0.267 1.467 0 1.733-0.667s0-1.467-0.667-1.733c-1.867-0.8-3.867-1.333-6-1.333 0 0 0 0 0 0-8.133 0-14.667 6.533-14.667 14.667s6.533 14.667 14.667 14.667c0 0 0 0 0 0 8.133 0 14.667-6.533 14.667-14.667v-1.2c0-0.8-0.533-1.333-1.333-1.333zM12.933 14.4c-0.533-0.533-1.333-0.533-1.867 0s-0.533 1.333 0 1.867l4 4c0.267 0.267 0.533 0.4 0.933 0.4s0.667-0.133 0.933-0.4l13.333-13.333c0.533-0.533 0.533-1.333 0-1.867s-1.333-0.533-1.867 0l-12.4 12.4-3.067-3.067z"></path>\n</svg>\n',li=class{constructor(i){t(this,i),this.modalVisibilityChanged=o(this,"modalVisibilityChanged",7),this.isClosable=!0,this.width="md",this.position="middle",this.visible=!1,this.hasSkeleton=!1,this.isLoading=!1,this.subTitleFirst=!1,this.noPadding=!1,this.subTitle="",this.centered=!1,this.iconStyle=void 0,salla.event.on("modal::open",(t=>t==this.host.id&&this.open())),salla.event.on("modal::close",(t=>t==this.host.id&&this.close())),this.modalTitle=this.host.getAttribute("modal-title")}handleVisible(t){if(!t)return this.modalVisibilityChanged.emit(!1),void this.toggleModal(!1);this.modalVisibilityChanged.emit(!0),this.host.classList.remove("s-hidden"),setTimeout((()=>this.toggleModal(!0)))}handleKeyUp(t){"KeyUp"===t.key&&this.closeModal()}async open(){return this.host.setAttribute("visible",""),this.host}async close(){return this.host.removeAttribute("visible"),this.host}async setTitle(t){return this.modalTitle=t,this.host}async loading(){return this.isLoading=!0,this.host}async stopLoading(){return this.isLoading=!1,this.host}toggleModal(t){const i=this.host.querySelector(".s-modal-body");Kt.toggleElementClassIf(i,"s-modal-entering","s-modal-leaving",(()=>t)).toggleElementClassIf(this.overlay,"s-modal-entering","s-modal-overlay-leaving",(()=>t)).toggleElementClassIf(document.body,"modal-is-open","modal-is-closed",(()=>t)),t||setTimeout((()=>this.host.classList.add("s-hidden")),350)}closeModal(){this.isClosable&&this.host.removeAttribute("visible")}iconBlockClasses(){return{"s-modal-icon":!0,"s-modal-bg-error":"error"==this.iconStyle,"s-modal-bg-success":"success"==this.iconStyle,"s-modal-bg-normal":!this.iconStyle,"s-modal-bg-primary":"primary"==this.iconStyle}}getWidth(){return this.isLoading?this.hasSkeleton?"md":"xs":this.width}render(){return this.host.id=this.host.id||"salla-modal",this.isLoading?i(e,{class:"salla-modal s-modal s-modal-container s-hidden","aria-modal":"true",role:"dialog",onKeyUp:t=>this.handleKeyUp(t)},i("div",{class:"s-modal-overlay",ref:t=>this.overlay=t,onClick:()=>this.closeModal()}),i("div",{class:"s-modal-wrapper"},i("span",{class:"s-modal-spacer s-modal-align-"+this.position},"​"),i("div",{class:"s-modal-body s-modal-align-"+this.position+" s-modal-"+this.getWidth()+(this.noPadding?" s-modal-nopadding":" s-modal-padding")},i("slot",{name:"loading"},i("salla-loading",null)),i("div",{class:"s-hidden"},i("slot",null))))):i(e,{class:"salla-modal s-modal s-modal-container s-hidden","aria-modal":"true",role:"dialog"},i("div",{class:"s-modal-overlay",ref:t=>this.overlay=t,onClick:()=>this.closeModal()}),i("div",{class:"s-modal-wrapper"},i("span",{class:"s-modal-spacer s-modal-align-"+this.position},"​"),i("div",{class:"s-modal-body s-modal-align-"+this.position+" s-modal-"+this.getWidth()+(this.noPadding?" s-modal-nopadding":" s-modal-padding")},i("div",{class:{"s-modal-header":!0,"s-modal-is-center":this.centered}},this.isClosable?i("button",{class:"s-modal-close",onClick:()=>this.closeModal(),type:"button"},i("span",{innerHTML:$t})):"",this.modalTitle||this.subTitle?i("div",{class:"s-modal-header-inner"},i("slot",{name:"icon"},this.iconStyle?i("div",{class:this.iconBlockClasses(),innerHTML:"error"==this.iconStyle?'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>alert-engine</title>\n<path d="M16 18.673c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM2.667 16c0-3.092 1.083-6.105 3.047-8.484 0.469-0.568 0.389-1.408-0.179-1.877-0.568-0.468-1.408-0.388-1.877 0.179-2.359 2.857-3.657 6.473-3.657 10.183s1.299 7.325 3.657 10.183c0.264 0.319 0.645 0.484 1.029 0.484 0.299 0 0.6-0.1 0.848-0.305 0.568-0.469 0.648-1.309 0.179-1.877-1.964-2.379-3.047-5.392-3.047-8.484zM16 10.667c-0.736 0-1.333 0.597-1.333 1.333v4c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-0.736-0.597-1.333-1.333-1.333zM16 5.333c-5.881 0-10.667 4.785-10.667 10.667s4.785 10.667 10.667 10.667 10.667-4.785 10.667-10.667-4.785-10.667-10.667-10.667zM16 24c-4.412 0-8-3.588-8-8s3.588-8 8-8 8 3.588 8 8-3.588 8-8 8zM28.343 5.817c-0.469-0.567-1.307-0.647-1.877-0.179-0.568 0.469-0.648 1.309-0.179 1.877 1.964 2.379 3.047 5.392 3.047 8.484s-1.083 6.105-3.047 8.484c-0.469 0.568-0.389 1.408 0.179 1.877 0.249 0.205 0.549 0.305 0.848 0.305 0.384 0 0.765-0.165 1.028-0.484 2.36-2.857 3.659-6.473 3.659-10.183s-1.299-7.325-3.657-10.183z"></path>\n</svg>\n':si}):""),i("div",{class:"s-modal-header-content"},this.modalTitle?i("div",{class:{"s-modal-title":!0,"s-modal-title-below":this.subTitleFirst},innerHTML:this.modalTitle}):"",this.subTitle?i("p",{class:{"s-modal-sub-title":!0},innerHTML:this.subTitle}):"")):""),i("slot",null),i("slot",{name:"footer"}))))}componentDidLoad(){document.body.append(this.host)}get host(){return n(this)}static get watchers(){return{visible:["handleVisible"]}}};li.style="@media screen and (max-width: 470px){.modal-is-open{position:fixed}}";const ci='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>keyboard_arrow_left</title>\n<path d="M20.563 22.104l-1.875 1.875-8-8 8-8 1.875 1.875-6.125 6.125z"></path>\n</svg>\n',ui=class{constructor(i){var e,n;t(this,i),this.offer=null,this.hasError=!1,this.translationLoaded=!1,this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),salla.event.on("offer-modal::open",(t=>this.open(t))),salla.lang.onLoaded((()=>{this.addToCartLabel=salla.lang.get("pages.cart.add_to_cart"),this.translationLoaded=!0})),this.categorySlot=(null===(e=this.host.querySelector('[slot="category"]'))||void 0===e?void 0:e.innerHTML)||'<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>',this.productSlot=(null===(n=this.host.querySelector('[slot="product"]'))||void 0===n?void 0:n.innerHTML)||this.defaultProductSlot(),salla.event.on("offer-modal::open",(t=>this.open(t))),salla.product.event.onOfferExisted((t=>{salla.storage.get("remember-offer-"+t.id)?salla.log("User selected to don't show this offer again."):this.open(t.product_id)}))}async open(t){return this.productID=t,this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.offers(t))).then((t=>this.showOffer(t.data[0]))).catch((t=>{var i,e,n,o;this.hasError=!0,this.errorMessage=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data)})).finally((()=>setTimeout((()=>this.modal.stopLoading()),1e3)))}async showOffer(t){this.offer=t,this.offer_name=t.name,this.offer_message=t.message,this.modal.setTitle(this.offer_name)}rememberMe(t){salla.storage.set("remember-offer-"+this.offer.id,t.target.checked)}addToCart(t){salla.api.withoutNotifier((()=>salla.cart.quickAdd(this.productID,t))).then((()=>this.modal.close()))}getOfferContent(){var t,e,n,o;return(null===(t=this.offer.get.products)||void 0===t?void 0:t.length)?i("div",{class:"s-offer-modal-scrolled-slider-wrap"},i("div",{class:"s-offer-modal-body s-offer-modal-scrolled-slider"},null===(e=this.offer.get.products)||void 0===e?void 0:e.map((t=>i("div",{class:{"s-offer-modal-product":!0,"s-offer-modal-slider-item":!0,"s-offer-modal-not-available":!t.is_available},id:"product_"+t.id,innerHTML:this.productSlot.replace(/\{name\}/g,t.name).replace(/\{url\}/g,t.url).replace(/\{image\}/g,t.thumbnail).replace(/\{price\}/g,t.has_special_price?salla.money(t.price)+'<span class="s-offer-modal-product-old-price">'+salla.money(t.regular_price)+"</span>":salla.money(t.price))},i("div",{class:"s-offer-modal-btn-wrap"},i("salla-button",{width:"wide",fill:"outline","data-id":t.id,disabled:!t.is_available,"loader-position":"center",onClick:this.addItem},t.is_available?salla.lang.get("pages.cart.add_to_cart"):salla.lang.get("pages.products.out_of_stock"))))))),i("div",{class:"s-offer-modal-slider-nav"},i("button",{class:"s-offer-modal-nav-btn s-offer-modal-prev-btn"},i("span",{class:"s-offer-modal-nav-btn-icon",innerHTML:ci})),i("button",{class:"s-offer-modal-nav-btn s-offer-modal-next-btn"},i("span",{class:"s-offer-modal-nav-btn-icon",innerHTML:ni})))):(null===(n=this.offer.get.categories)||void 0===n?void 0:n.length)?i("div",{class:"s-offer-modal-scrolled-slider-wrap"},i("div",{class:"s-offer-modal-body s-offer-modal-scrolled-slider"},this.offer.get.categories.map((t=>i("a",{href:t.urls.customer,class:"s-offer-modal-badge s-offer-modal-slider-item",innerHTML:this.categorySlot.replace(/\{tagIcon\}/g,'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tag</title>\n<path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n').replace(/\{name\}/g,t.name).replace(/\{url\}/g,t.urls.customer)})))),i("div",{class:"s-offer-modal-slider-nav"},i("button",{class:"s-offer-modal-nav-btn s-offer-modal-prev-btn"},i("span",{class:"s-offer-modal-nav-btn-icon",innerHTML:ci})),i("button",{class:"s-offer-modal-nav-btn s-offer-modal-next-btn"},i("span",{class:"s-offer-modal-nav-btn-icon",innerHTML:ni})))):this.offer.get.discounts_table?i("div",{class:"s-offer-modal-discount-table"},i("table",null,i("tbody",null,null===(o=this.offer.get.discounts_table)||void 0===o?void 0:o.map((t=>i("tr",null,i("td",null,t.text),i("td",{class:"s-offer-modal-discount-table-cell"},i("salla-button",{fill:"outline",shape:"btn",color:"primary",size:"medium",width:"normal",onClick:()=>this.addToCart(t.quantity)},this.addToCartLabel)))))))):void 0}addItem(){return this.load(),salla.cart.api.quickAdd(this.dataset.id).finally((()=>this.stop()))}defaultProductSlot(){return'<a href={url} class="s-offer-modal-product-image-wrap"><img class="s-offer-modal-product-image" src="{image}" /></a><div class="s-offer-modal-product-info"> <a href={url} class="s-offer-modal-product-name">{name}</a> <div class="s-offer-modal-product-price">{price}</div></div>'}render(){return i("salla-modal",{"sub-title-first":!0,"has-skeleton":!0,"sub-title":this.offer_message,ref:t=>this.modal=t,isLoading:!0},i("div",{slot:"loading"},i("div",{class:"s-offer-modal-skeleton"},i("div",{class:"s-offer-modal-skeleton-header"},i("salla-skeleton",{type:"circle",height:"80px",width:"80px"}),i("salla-skeleton",{height:"15px",width:"50%"}),i("salla-skeleton",{height:"10px",width:"30%"})),i("div",{class:"s-offer-modal-skeleton-items"},[...Array(3)].map((()=>i("div",{class:"s-offer-modal-skeleton-item"},i("salla-skeleton",{height:"9rem"}),i("div",{class:"s-offer-modal-skeleton-item-title"},i("salla-skeleton",{height:"15px",width:"100%"})),i("div",{class:"s-offer-modal-skeleton-item-subtitle"},i("salla-skeleton",{height:"9px",width:"50%"}),i("div",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>cart2</title>\n<path d="M6.845 5.333l-1.905-5.333h-3.607c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333v0h1.727l5.72 16.012c0.569 1.56 2.039 2.654 3.765 2.655h12.133c0.001 0 0.002 0 0.003 0 1.825 0 3.364-1.222 3.845-2.892l0.007-0.028 3.161-13.080zM25.96 17.716c-0.167 0.554-0.672 0.951-1.27 0.951-0.002 0-0.005 0-0.007-0h-12.133c-0.575-0-1.065-0.364-1.252-0.875l-0.003-0.009-3.497-9.783h20.508zM13.333 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM13.333 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0zM24 24c-2.209 0-4 1.791-4 4s1.791 4 4 4c2.209 0 4-1.791 4-4v0c0-2.209-1.791-4-4-4v0zM24 29.333c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333c0.736 0 1.333 0.597 1.333 1.333v0c0 0.736-0.597 1.333-1.333 1.333v0z"></path>\n</svg>\n'})))))),i("div",{class:"s-offer-modal-skeleton-footer"},i("salla-skeleton",{height:"15px",width:"50%"}),i("salla-skeleton",{height:"15px",width:"30%"})))),this.hasError||null===this.offer?i("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?i("span",{slot:"description"},this.errorMessage):""):[i("span",{slot:"icon",class:"s-offer-modal-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>special-discount</title>\n<path d="M20.667 19.333c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM11.333 12.673c0.737 0 1.333-0.603 1.333-1.34s-0.596-1.333-1.333-1.333-1.333 0.596-1.333 1.333v0.013c0 0.736 0.596 1.327 1.333 1.327zM30.307 16l0.947-4.244c0.107-0.473-0.055-0.969-0.417-1.291l-3.259-2.876-1.732-3.987c-0.193-0.444-0.612-0.749-1.095-0.796l-4.327-0.417-3.748-2.204c-0.416-0.248-0.933-0.248-1.353 0l-3.744 2.204-4.329 0.417c-0.483 0.047-0.901 0.352-1.095 0.796l-1.732 3.987-3.259 2.877c-0.363 0.321-0.525 0.816-0.417 1.289l0.947 4.244-0.947 4.244c-0.107 0.473 0.055 0.969 0.417 1.291l3.259 2.876 1.732 3.987c0.193 0.444 0.612 0.749 1.095 0.796l4.325 0.416 3.749 2.207c0.208 0.123 0.441 0.184 0.676 0.184s0.468-0.061 0.676-0.185l3.747-2.205 4.328-0.416c0.483-0.045 0.903-0.351 1.095-0.796l1.732-3.985 3.259-2.877c0.363-0.321 0.525-0.816 0.417-1.291zM28.48 20.056l-2.892 2.552c-0.145 0.131-0.261 0.291-0.34 0.469l-1.536 3.536-3.84 0.369c-0.195 0.019-0.381 0.080-0.551 0.179l-3.321 1.959-3.324-1.959c-0.168-0.099-0.356-0.16-0.549-0.179l-3.839-0.369-1.536-3.537c-0.077-0.18-0.195-0.339-0.34-0.469l-2.892-2.551 0.84-3.765c0.043-0.192 0.043-0.389 0-0.581l-0.84-3.765 2.892-2.551c0.145-0.131 0.263-0.289 0.34-0.469l1.536-3.539 3.84-0.369c0.195-0.019 0.381-0.080 0.549-0.179l3.323-1.957 3.325 1.957c0.167 0.099 0.355 0.16 0.548 0.179l3.839 0.369 1.536 3.539c0.077 0.18 0.195 0.339 0.34 0.469l2.892 2.551-0.84 3.765c-0.043 0.192-0.043 0.389 0 0.581zM20.391 9.724l-10.667 10.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0z"></path>\n</svg>\n'}),this.getOfferContent(),i("div",{class:"s-offer-modal-footer",slot:"footer"},this.offer.formatted_date?i("p",{class:"s-offer-modal-expiry"},salla.lang.get("pages.products.offer_expires_in")," ",this.offer.formatted_date):"",i("label",{class:"s-offer-modal-remember-label"},i("input",{type:"checkbox",onChange:t=>this.rememberMe(t),class:"s-offer-modal-remember-input"}),"  ",salla.lang.get("common.elements.remember_my_choice")))])}componentDidRender(){var t,i,e,n,o,a;if(this.offer&&((null===(t=this.offer.get.products)||void 0===t?void 0:t.length)||(null===(i=this.offer.get.categories)||void 0===i?void 0:i.length))&&window.screen.width>639){let t,i,r=this.modal.querySelector(".s-offer-modal-scrolled-slider-wrap"),s=this.modal.querySelector(".s-offer-modal-scrolled-slider"),l=this.modal.querySelectorAll(".s-offer-modal-nav-btn"),c=this.modal.querySelector(".s-offer-modal-next-btn"),u=this.modal.querySelector(".s-offer-modal-prev-btn"),p=this.modal.querySelectorAll(".s-offer-modal-slider-item"),d=20,h=0,f=3,g=p.length,_=!1;s.addEventListener("mousedown",(e=>{_=!0,s.classList.add("scrolling"),t=e.pageX-s.offsetLeft,i=s.scrollLeft})),s.addEventListener("mouseleave",(()=>{_=!1,s.classList.remove("scrolling"),p.forEach((t=>{t.querySelector("a").removeAttribute("disabled")}))})),s.addEventListener("mouseup",(()=>{_=!1,s.classList.remove("scrolling"),p.forEach((t=>{t.querySelector("a").removeAttribute("disabled")}))})),s.addEventListener("mousemove",(e=>{_&&(e.preventDefault(),s.scrollLeft=i-2*(e.pageX-s.offsetLeft-t),p.forEach((t=>{t.querySelector("a").setAttribute("disabled","true")})))})),console.log("items[0]:",p[0]);let m=p[0].offsetWidth,v=g*m,x=r.offsetWidth,b=v-x,w=!!document.body.classList.contains("rtl");b>d&&c.classList.add("s-offer-modal-btn-is-active"),((null===(n=null===(e=this.offer.get)||void 0===e?void 0:e.products)||void 0===n?void 0:n.length)<=2||(null===(a=null===(o=this.offer.get)||void 0===o?void 0:o.categories)||void 0===a?void 0:a.length)<=2)&&s.classList.add("s-offer-modal-slider-centered"),window.onresize=function(){x=r.offsetWidth,b=v-x},s.addEventListener("scroll",(function(){let t=Math.abs(s.scrollLeft),i=b-d;t<=d?(c.classList.add("s-offer-modal-btn-is-active"),u.classList.remove("s-offer-modal-btn-is-active")):t<i?(c.classList.add("s-offer-modal-btn-is-active"),u.classList.add("s-offer-modal-btn-is-active")):t>=i&&(c.classList.remove("s-offer-modal-btn-is-active"),u.classList.add("s-offer-modal-btn-is-active"))})),l.forEach((t=>{t.addEventListener("click",(function(){t.classList.contains("s-offer-modal-next-btn")?h++:h--,s.scrollTo({top:0,left:m*f*h*(w?-1:1),behavior:"smooth"})}))}))}}get host(){return n(this)}};ui.style="";const pi=class{constructor(i){t(this,i),this.translationLoaded=!1,this.icon='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>inbox</title>\n<path d="M31.984 19.797l-2.667-17.333c-0.1-0.651-0.659-1.131-1.317-1.131h-24c-0.659 0-1.217 0.48-1.317 1.131l-2.667 17.333c-0.011 0.067-0.016 0.135-0.016 0.203v6.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-6.667c0-0.068-0.005-0.136-0.016-0.203zM5.144 4h21.712l2.256 14.667h-9.112c-0.736 0-1.333 0.596-1.333 1.333 0 1.471-1.196 2.667-2.667 2.667s-2.667-1.196-2.667-2.667c0-0.737-0.597-1.333-1.333-1.333h-9.112zM29.333 26.667c0 0.736-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.597-1.333-1.333v-5.333h8.168c0.593 2.299 2.684 4 5.165 4s4.571-1.701 5.165-4h8.168z"></path>\n</svg>\n',this.alignment="left",this.iconSize="md",salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}alignmentClass(){return{"s-placeholder-wrapper":!0,"s-placeholder-align-left":"left"==this.alignment,"s-placeholder-align-center":"center"==this.alignment,"s-placeholder-align-right":"right"==this.alignment}}render(){return i(e,{class:this.alignmentClass()},i("div",{class:`s-placeholder-icon s-placeholder-icon-${this.iconSize}`,innerHTML:this.icon}),i("div",{class:"s-placeholder-title"},i("slot",{name:"title"},i("span",null,salla.lang.get("common.elements.no_options")))),i("div",{class:"s-placeholder-description"},i("slot",{name:"description"},i("span",null,salla.lang.get("common.errors.empty_results")))))}};pi.style="";const di='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>bell-ring</title>\n<path d="M2.667 13.333v-4c0-2.592 0.748-5.107 2.161-7.271 0.404-0.616 0.231-1.443-0.387-1.845-0.616-0.401-1.443-0.228-1.845 0.388-1.699 2.599-2.596 5.617-2.596 8.728v4c0 0.736 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333zM25.333 15.647v-6.313c0-5.147-4.188-9.333-9.333-9.333s-9.333 4.187-9.333 9.333v6.312l-5.157 9.027c-0.236 0.413-0.235 0.92 0.004 1.331 0.239 0.412 0.679 0.664 1.153 0.664h8c0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333h8c0.475 0 0.915-0.252 1.153-0.664 0.239-0.411 0.24-0.917 0.004-1.331zM16 29.333c-1.471 0-2.667-1.196-2.667-2.667h5.333c0 1.472-1.196 2.667-2.667 2.667zM4.965 24l4.193-7.339c0.113-0.2 0.175-0.429 0.175-0.661v-6.667c0-3.676 2.991-6.667 6.667-6.667s6.667 2.991 6.667 6.667v6.667c0 0.232 0.061 0.46 0.176 0.661l4.192 7.339zM29.403 0.603c-0.403-0.616-1.232-0.789-1.845-0.387-0.617 0.403-0.791 1.229-0.387 1.845 1.415 2.165 2.163 4.68 2.163 7.272v4c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-3.112-0.899-6.132-2.597-8.731z"></path>\n</svg>\n',hi=class{constructor(i){t(this,i),this.isUser=salla.config.isUser(),this.translationLoaded=!1,this.productId=salla.config.get("page.id"),this.isSubscribed=!1,this.submit=async()=>{if(this.isUser)return salla.api.product.availabilitySubscribe(this.productId).then((()=>this.isSubscribed=!0));let t={id:this.productId};if(this.channels_.includes("sms")){let{phone:i,countryCode:e}=await this.mobileInput.getValues();t.country_code=e,t.phone=i}return this.channels_.includes("email")&&""!==this.email.value&&(t.email=this.email.value),await this.validateform(),this.btn.load().then((()=>this.btn.disable())).then((()=>salla.api.product.availabilitySubscribe(t))).then((()=>{this.isSubscribed=!0,salla.storage.set(`product-${this.productId}-subscribed`,!0)})).then((()=>this.btn.stop())).then((()=>this.modal.close())).catch((()=>this.btn.stop()&&this.btn.enable()))},this.typing=(t,i)=>{const e=t.target.nextElementSibling;t.target.classList.remove("s-has-error"),(null==e?void 0:e.classList.contains("s-product-availability-error-msg"))&&(e.innerText=""),"Enter"==t.key&&i()},salla.lang.onLoaded((()=>{var t;this.translationLoaded=!0,this.title_=this.host.title||salla.lang.get("pages.products.notify_availability_title"),null===(t=this.modal)||void 0===t||t.setTitle(this.title_)})),this.isUser||(this.channelsWatcher(this.channels),this.title_=this.host.title||salla.lang.get("pages.products.notify_availability_title"),this.host.removeAttribute("title"),this.isVisitorSubscribed=salla.storage.get(`product-${this.productId}-subscribed`))}channelsWatcher(t){this.channels_=t?t.split(","):[]}async validateform(){try{if(this.channels_.includes("email")){const t=Kt.isValidEmail(this.email.value);if(t)return;!t&&this.validateField(this.email,salla.lang.get("common.elements.email_is_valid"))}if(this.channels_.includes("sms")&&await this.mobileInput.isValid())return}catch(t){throw"Please insert required fields"}}validateField(t,i){t.classList.add("s-has-error"),t.nextElementSibling.innerText="* "+i}render(){return i(e,{class:"s-product-availability-wrap"},this.isSubscribed||this.isVisitorSubscribed?i("div",{class:"s-product-availability-subscribed"},i("span",{innerHTML:di,class:"s-product-availability-subs-icon"})," ",salla.lang.get("pages.products.notify_availability_success")):i("salla-button",{width:"wide",onClick:()=>this.isUser?this.submit():this.modal.open()},salla.lang.get("pages.products.notify_availability")),this.isUser||this.isSubscribed||this.isVisitorSubscribed?"":this.renderModal())}renderModal(){return i("salla-modal",{ref:t=>this.modal=t,"modal-title":this.title_,subTitle:salla.lang.get("pages.products.notify_availability_subtitle"),width:"sm"},i("span",{slot:"icon",innerHTML:di}),i("div",{class:"s-product-availability-body"},this.channels_.includes("email")?[i("label",{class:"s-product-availability-label"},salla.lang.get("common.elements.email")),i("input",{class:"s-product-availability-input",onKeyDown:t=>this.typing(t,this.submit),placeholder:salla.lang.get("common.elements.email_placeholder")||"your@email.com",ref:t=>this.email=t,type:"email"}),i("span",{class:"s-product-availability-error-msg"})]:"",this.channels_.includes("sms")?[i("label",{class:"s-product-availability-label"},salla.lang.get("common.elements.mobile")),i("salla-tel-input",{ref:t=>this.mobileInput=t,onKeyDown:t=>this.typing(t,this.submit)})]:""),i("div",{slot:"footer",class:"s-product-availability-footer"},i("salla-button",{class:"modal-cancel-btn",width:"wide",color:"light",fill:"outline",onClick:()=>this.modal.close()},salla.lang.get("common.elements.cancel")),i("salla-button",{class:"submit-btn","loader-position":"center",width:"wide",ref:t=>this.btn=t,onClick:()=>this.submit()},salla.lang.get("common.elements.submit"))))}get host(){return n(this)}static get watchers(){return{channels:["channelsWatcher"]}}};hi.style="";const fi=class{constructor(i){t(this,i),this.hasError=!1,salla.event.on("size-guide::open",(t=>this.open(t))),salla.lang.onLoaded((()=>{this.placeholder_title=salla.lang.get("pages.products.size_guide_placeholder"),this.placeholder_description=salla.lang.get("pages.products.size_guide_placeholder_info"),this.modal_title=salla.lang.get("pages.products.size_guides")}))}async open(t){return this.modal.setTitle(this.modal_title),this.modal.open(),await salla.api.withoutNotifier((()=>salla.product.getSizeGuides(t))).then((t=>{this.guides=t.data})).catch((t=>{var i,e,n,o;console.log(t),this.hasError=!0,this.placeholder_description=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data)})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}showPlaceholder(){return i("salla-placeholder",{alignment:"center",iconSize:"xl"},i("div",{slot:"title"},this.placeholder_title),i("div",{slot:"description"},this.placeholder_description))}render(){return i("salla-modal",{class:"s-product-size-guide-wrapper",id:"salla-product-size-guide-modal",isLoading:!0,"has-skeleton":!0,width:"md",ref:t=>this.modal=t},i("span",{slot:"icon",class:"s-product-size-guide-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>pencil-ruler</title>\n<path d="M3.057 11.609c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l6.667-6.667c0.521-0.521 0.521-1.364 0-1.885l-1.285-1.285c-1.143-1.143-2.661-1.772-4.276-1.772-1.616 0-3.135 0.629-4.276 1.772-1.143 1.141-1.772 2.66-1.772 4.276 0 1.615 0.629 3.135 1.772 4.276zM3.657 3.657c1.277-1.277 3.504-1.277 4.781 0l0.343 0.343-4.781 4.781-0.343-0.343c-0.639-0.639-0.991-1.488-0.991-2.391s0.352-1.752 0.991-2.391zM29.317 20.972c-0.2-0.707-0.932-1.119-1.645-0.921-0.709 0.2-1.121 0.937-0.921 1.645l1.987 7.041-7.041-1.987c-0.707-0.195-1.444 0.213-1.645 0.921-0.2 0.708 0.212 1.445 0.921 1.645l9.333 2.633c0.119 0.032 0.24 0.049 0.361 0.049 0.349 0 0.689-0.137 0.943-0.391 0.341-0.341 0.472-0.84 0.34-1.305zM31.609 8.772l-8.381-8.381c-0.5-0.5-1.385-0.5-1.885 0l-8.171 8.171s-0.001 0-0.001 0.001 0 0.001-0.001 0.001l-4.607 4.607s0 0-0.001 0 0 0 0 0.001l-8.171 8.171c-0.251 0.249-0.391 0.588-0.391 0.943 0 0.353 0.14 0.693 0.391 0.943l8.381 8.381c0.249 0.251 0.589 0.391 0.943 0.391s0.693-0.14 0.943-0.391l20.952-20.952c0.521-0.521 0.521-1.365 0-1.885zM9.715 28.781l-6.495-6.496 1.676-1.676 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885l-3.008-3.008 2.724-2.724 1.851 1.851c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.52 0.521-1.364 0-1.885l-1.851-1.851 2.724-2.724 3.008 3.008c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.365 0-1.885l-3.008-3.008 1.677-1.677 6.496 6.496z"></path>\n</svg>\n'}),i("div",{slot:"loading"},i("div",{class:"s-product-size-guide-skeleton"},i("salla-skeleton",{height:"15px",width:"25%"}),i("div",{class:"s-product-size-guide-skeleton-header"},i("salla-skeleton",{height:"40px"}),i("salla-skeleton",{height:"40px"}),i("salla-skeleton",{height:"40px"}),i("salla-skeleton",{height:"40px"})),i("div",{class:"s-product-size-guide-skeleton-content"},i("salla-skeleton",{height:"15px",width:"25%"}),i("salla-skeleton",{height:"10px",width:"75%"}),i("salla-skeleton",{height:"10px",width:"50%"}),i("salla-skeleton",{height:"10px",width:"75%"}),i("salla-skeleton",{height:"10px",width:"100%"}),i("salla-skeleton",{height:"10px",width:"25%"}),i("salla-skeleton",{height:"10px",width:"60%"}),i("salla-skeleton",{height:"10px",width:"45%"}),i("salla-skeleton",{height:"10px",width:"30%"})))),i("slot",{name:"header"}),!this.hasError&&this.guides?[i("salla-tabs",null,this.guides.map((t=>i("salla-tab-header",{slot:"header",name:t.name},i("span",null,t.name)))),this.guides.map((t=>i("salla-tab-content",{slot:"content",name:t.name},i("div",{innerHTML:t.description})))))]:this.showPlaceholder(),i("slot",{name:"footer"}))}get host(){return n(this)}};fi.style="";const gi=class{constructor(i){t(this,i),this.hostAttributes={},this.hasIncrementSlot=!1,this.hasDecrementSlot=!1,this.didLoaded=!1,this.quantity=1}watchPropHandler(){this.didLoaded&&Kt.debounce((()=>salla.document.event.fireEvent(this.textInput,"change",{bubbles:!0})))}componentWillLoad(){this.quantity=parseInt(this.host.getAttribute("value"))||1,this.hasIncrementSlot=!!this.host.querySelector('[slot="increment-button"]'),this.hasDecrementSlot=!!this.host.querySelector('[slot="decrement-button"]')}componentDidLoad(){this.didLoaded=!0,this.textInput.addEventListener("input",(t=>salla.helpers.inputDigitsOnly(t.target)))}getInputAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","value","min","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}async decrease(){return this.setValue(this.quantity-1)}async increase(){return this.setValue(Number(this.quantity)+1)}async setValue(t){let i=parseInt(this.host.getAttribute("max"));return i&&t>i&&(t=i),t<=1&&(t=1),this.quantity=t,this.host}render(){return i(e,{class:"s-quantity-input"},i("div",{class:"s-quantity-input-container"},i("button",{onClick:()=>this.increase(),class:"s-quantity-input-increase-button s-quantity-input-button",type:"button"},this.hasIncrementSlot?"":i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>add</title>\n<path d="M26.667 14.667h-9.333v-9.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v9.333h-9.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h9.333v9.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-9.333h9.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n'}),i("slot",{name:"increment-button"})),i("input",Object.assign({class:"s-quantity-input-input"},this.getInputAttributes(),{ref:t=>this.textInput=t,onInput:t=>this.setValue(t.target.value),min:"1",value:this.quantity})),i("button",{class:"s-quantity-input-decrease-button s-quantity-input-button",onClick:()=>this.decrease(),type:"button"},this.hasDecrementSlot?"":i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>minus</title>\n<path d="M26.667 14.667h-21.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h21.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n'}),i("slot",{name:"decrement-button"}))))}get host(){return n(this)}static get watchers(){return{quantity:["watchPropHandler"]}}};gi.style="";const _i=class{constructor(i){t(this,i),this.hasError=!1,this.stepsCount=0,this.currentIndex=0,this.submitted=[],this.orderId=salla.config.get("page.id"),this.translationLoaded=!1,salla.event.on("rating::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async open(){return this.modal.open().then((()=>this.order||salla.api.withoutNotifier((()=>salla.rating.api.order(this.orderId))).then((t=>this.order=t.data)))).then((()=>this.modal.setTitle(salla.lang.get("pages.rating.rate_order")+' <span class="unicode">(#'+this.order.id+")</span>"))).then((()=>this.modal.stopLoading())).then((()=>this.stepsCount=[this.order.testimonials_enabled,this.order.products_enabled,this.order.shipping_enabled].filter((t=>t)).length)).then((()=>setTimeout((()=>this.handleWizard()),100))).catch((t=>{var i,e,n,o;this.hasError=!0,this.errorMessage=(null===(n=null===(e=null===(i=t.response)||void 0===i?void 0:i.data)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)||(null===(o=t.response)||void 0===o?void 0:o.data),this.modal.stopLoading()}))}async close(){return this.modal.close()}handleWizard(){this.steps=this.modal.querySelectorAll(".s-rating-modal-step"),this.dots=this.modal.querySelectorAll(".s-rating-modal-step-dot"),this.showActiveStep()}showActiveStep(t=null){var i,e;this.currentTab=t||this.steps[this.currentIndex],Kt.toggleClassIf(".s-rating-modal-step-dot","s-rating-modal-bg-gray","s-rating-modal-bg-primary",(t=>t!=this.dots[this.currentIndex])).toggleClassIf(".s-rating-modal-step","s-rating-modal-active","s-rating-modal-hidden",(t=>t==this.currentTab)),0!=this.currentIndex&&(Kt.toggleElementClassIf(this.currentTab,"s-rating-modal-unactive","s-rating-modal-hidden",(()=>!0)),setTimeout((()=>Kt.toggleElementClassIf(this.currentTab,"s-rating-modal-active","s-rating-modal-unactive",(()=>!0))),300));let n=null===(i=this.steps[this.currentIndex+1])||void 0===i?void 0:i.dataset.type;null===(e=this.nextBtn)||void 0===e||e.setText(n?salla.lang.get("pages.rating.rate")+" "+salla.lang.get("pages.rating."+n):salla.lang.get("pages.rating.send_ratings")),setTimeout((()=>{var t,i;return null===(t=this.body)||void 0===t?void 0:t.setAttribute("style","height:"+(null===(i=this.currentTab)||void 0===i?void 0:i.offsetHeight)+"px")}))}previousTab(){this.currentIndex>0&&this.currentIndex--,Kt.toggleElementClassIf(this.backBtn,"s-rating-modal-unvisiable","block",(()=>0==this.currentIndex)),this.showActiveStep()}submit(){this.submittedBefore()||this.validate(),salla.config.canLeave=!1,this.nextBtn.load().then((()=>this.submittedBefore()||this.sendFeedback())).then((()=>this.currentTab.querySelectorAll("[name],.s-rating-modal-btn-star").forEach((t=>t.setAttribute("disabled",""))))).then((()=>this.currentIndex<this.stepsCount&&this.currentIndex++)).then((()=>this.showActiveStep())).then((()=>Kt.toggleClassIf("#prev-btn","block","s-rating-modal-unvisiable",(()=>!0)))).finally((()=>{this.nextBtn.stop(),salla.config.canLeave=!0,this.currentIndex==this.stepsCount&&this.showThankYou(),this.modal.isClosable=!1}))}submittedBefore(){return this.submitted.includes(this.currentIndex)}validate(t=null,i=null){if(!t&&"products"==this.currentTab.dataset.type)return this.currentTab.querySelectorAll(".rating-outer-form").forEach((t=>this.validate(t,"product")));let e=(t=t||this.currentTab).querySelector(".rating_hidden_input").value,n=t.querySelector(".s-rating-modal-comment"),o=t.querySelector(".s-rating-modal-validation-msg");if(e&&n.value&&n.value.length>3)return n.classList.remove("s-has-error"),void(o.innerHTML="");throw i=i||t.dataset.type,Kt.toggleElementClassIf(n,"save","s-has-error",(t=>t.value.length>3)),o.innerHTML=e?salla.lang.get("common.errors.not_less_than_chars",{chars:4})+" "+n.getAttribute("placeholder"):salla.lang.get(`pages.rating.rate_${i}_stars`).replace(" (:item)","")}sendFeedback(){let t={};if(this.currentTab.querySelectorAll("[name]").forEach((i=>{let e=salla.helpers.inputData(i.name,i.value,t);t[e.name]=e.value})),0!=Object.keys(t).length)return t.order_id=this.orderId,t.type=this.currentTab.dataset.type,this.submitted.push(this.currentIndex),salla.rating.api[this.currentTab.dataset.type](t)}showThankYou(){let t=10,i=setInterval((()=>{this.thanksTime.innerHTML="00:0"+t--,t>0||(clearInterval(i),this.thanksTime.remove(),this.close().then((()=>window.location.reload())))}),1e3);this.modal.querySelector(".s-rating-modal-footer").classList.add("s-rating-modal-unvisiable"),this.showActiveStep(this.thanksTab)}render(){var t;return i(e,{class:"s-rating-modal"},i("salla-modal",{isLoading:!0,width:"md",ref:t=>this.modal=t},i("div",{slot:"loading"},i("div",{class:"s-rating-modal-skeleton"},i("salla-skeleton",{type:"circle",height:"80px",width:"80px"}),i("salla-skeleton",{height:"15px",width:"60%"}),i("salla-skeleton",{height:"10px",width:"30%"}),i("div",{class:"s-rating-modal-skeleton-stars"},[...Array(5)].map((()=>i("div",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>star</title>\n<path d="M31.819 12.077c-0.367-0.883-1.209-1.411-2.259-1.411h-8.437l-2.681-8.871c-0.347-1.075-1.329-1.796-2.443-1.796s-2.096 0.721-2.447 1.805l-2.788 8.861h-8.275c-1.076 0-1.939 0.533-2.308 1.427-0.375 0.904-0.159 2.012 0.525 2.693 0.044 0.044 0.092 0.085 0.141 0.124l6.811 5.101-2.773 8.567c-0.344 1.063 0.019 2.228 0.899 2.899 0.459 0.351 1.001 0.527 1.544 0.527 0.528 0 1.056-0.165 1.511-0.499l7.159-5.267 7.161 5.268c0.896 0.659 2.168 0.645 3.051-0.028 0.884-0.671 1.245-1.836 0.901-2.9l-2.773-8.567 6.811-5.101c0.051-0.037 0.099-0.080 0.143-0.124 0.687-0.687 0.904-1.8 0.528-2.709zM21.976 18.448c-0.456 0.343-0.644 0.936-0.469 1.477l3.044 9.293-7.763-5.711c-0.235-0.173-0.513-0.259-0.791-0.259s-0.556 0.085-0.791 0.259l-7.713 5.676 2.997-9.257c0.175-0.541-0.013-1.136-0.469-1.477l-6.829-5.116h8.551c0.583 0 1.097-0.377 1.272-0.933l2.981-9.479 2.861 9.465c0.169 0.561 0.688 0.947 1.276 0.947h8.672z"></path>\n</svg>\n'})))),i("salla-skeleton",{height:"100px",width:"100%"}),i("div",{class:"s-rating-modal-skeleton-footer"},i("salla-skeleton",{height:"40px",width:"30%"})))),!this.hasError&&this.order?[i("div",{class:"s-rating-modal-wrapper",ref:t=>this.body=t},(null===(t=this.order)||void 0===t?void 0:t.testimonials_enabled)?i("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"store"},i("div",{class:"s-rating-modal-rounded-icon"},i("img",{src:salla.config.get("store.logo","https://assets.salla.sa/cp/assets/images/logo-new.png"),alt:"store name",class:"s-rating-modal-store-logo"})),i("h2",{class:"s-rating-modal-title"},salla.lang.get("pages.rating.rate_the_store")),i("div",{class:"s-rating-modal-stars-company"},i("salla-rating-stars",{size:"large"})),i("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_store_rate")}),i("small",{class:"s-rating-modal-validation-msg"})):"",this.order.products_enabled?i("section",{class:"s-rating-modal-step s-rating-modal-hidden","data-type":"products"},this.order.products.map(((t,e)=>i("div",{class:"rating-outer-form s-rating-modal-product","data-stars-error":salla.lang.get("pages.rating.rate_product_stars")},i("div",{class:"s-rating-modal-product-img-wrap"},i("img",{src:t.product.thumbnail,alt:t.product.name,class:"s-rating-modal-product-img"})),i("div",{class:"s-rating-modal-product-details"},i("h3",{class:"s-rating-modal-product-title"}," ",t.product.name),i("div",{class:"s-rating-modal-stars-product"},i("salla-rating-stars",{size:"small",name:`products[${e}][rating]`})),i("input",{type:"hidden",name:`products[${e}][product_id]`,value:t.product.id}),i("textarea",{placeholder:salla.lang.get("pages.rating.write_product_rate"),name:`products[${e}][comment]`,class:"s-rating-modal-comment"}),i("small",{class:"s-rating-modal-validation-msg"})))))):"",this.order.shipping_enabled?i("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"shipping"},i("input",{type:"hidden",name:"shipping_company_id",value:this.order.shipping.company.id}),this.order.shipping.company.logo?i("div",{class:"s-rating-modal-rounded-icon"},i("img",{src:this.order.shipping.company.logo,class:"s-rating-modal-shipping-logo",alt:this.order.shipping.company.name})):i("span",{class:"s-rating-modal-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>shipping-fast</title>\n<path d="M10.667 14.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h8c0.736 0 1.333-0.596 1.333-1.333zM9.333 18.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM9.333 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM1.333 10.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.123 13.103l-3.147-3.935c-1.273-1.589-3.171-2.501-5.205-2.501h-1.437c0-2.205-1.795-4-4-4h-13.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.737 0.597 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.664-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.491 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.736 0 1.333-0.596 1.333-1.333v-8.399c0-0.905-0.311-1.792-0.877-2.499zM21.333 13.333v-4h1.437c1.221 0 2.36 0.547 3.124 1.501l1.997 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n'}),i("div",{class:"s-rating-modal-title"}," ",salla.lang.get("pages.rating.rate_shipping")+" "+this.order.shipping.company.name),i("div",{class:"s-rating-modal-stars-company"},i("salla-rating-stars",{size:"large"})),i("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_shipping_rate")}),i("small",{class:"s-rating-modal-validation-msg"})):"",i("div",{class:"s-rating-modal-thanks s-rating-modal-hidden",ref:t=>this.thanksTab=t},i("span",{class:"s-rating-modal-icon",innerHTML:si}),i("h3",{class:"s-rating-modal-thanks-title"},salla.lang.get("pages.rating.thanks")),i("div",{class:"s-rating-modal-thanks-msg",innerHTML:this.order.thanks_message}),i("time",{class:"s-rating-modal-thanks-time",ref:t=>this.thanksTime=t}))),i("div",{class:"s-rating-modal-footer"},i("button",{ref:t=>this.backBtn=t,onClick:()=>this.previousTab(),class:"s-rating-modal-btn s-rating-modal-unvisiable"},salla.lang.get("common.elements.back")),this.stepsCount>1?i("ul",{class:"s-rating-modal-dots"},[0,1,2].slice(0,this.stepsCount).map((()=>i("li",{class:"s-rating-modal-bg-gray s-rating-modal-step-dot"})))):"",i("salla-button",{"loader-position":"center",ref:t=>this.nextBtn=t,onClick:()=>this.submit()},salla.lang.get("common.elements.next")))]:i("salla-placeholder",{alignment:"center"})))}componentDidLoad(){salla.event.dispatch("rating::ready",this)}get host(){return n(this)}};_i.style="";const mi=class{constructor(i){t(this,i),this.name="rating",this.size="medium"}initiateRating(){this.host.addEventListener("click",(()=>{if(!this.startsElem)return;let t=this.startsElem.querySelectorAll(".s-rating-stars-hovered"),i=t[t.length-1];if(!i)return;let e=i.getAttribute("data-star");this.startsElem.querySelector(".rating_hidden_input").value=e,this.startsElem.querySelectorAll(".s-rating-stars-btn-star").forEach(((t,i)=>Kt.toggleElementClassIf(t,"s-rating-stars-selected","s-rating-stars-unselected",(()=>i<parseInt(e))))),this.startsElem.querySelectorAll("[aria-pressed]").forEach((t=>t.removeAttribute("aria-pressed"))),i.setAttribute("aria-pressed","true")}))}highlightSelectedStars(){var t,i;let e="s-rating-stars-hovered",n=null===(t=this.startsElem)||void 0===t?void 0:t.querySelectorAll(".s-rating-stars-btn-star");null==n||n.forEach(((t,i)=>{t.addEventListener("mouseover",(()=>{for(let t=0;t<=i;t++)n[t].classList.add(e)})),t.addEventListener("mouseout",(()=>t.classList.remove(e)))})),null===(i=this.startsElem)||void 0===i||i.addEventListener("mouseout",(()=>n.forEach((t=>t.classList.remove(e)))))}createStars(t){let e=[];for(let n=0;n<5;n++)e.push(i("span",{class:{"s-rating-stars-btn-star":!0,["s-rating-stars-"+this.size]:!0,"s-rating-stars-selected":n<t},innerHTML:ai}));return e}render(){return i(e,null,this.value?i("div",{class:"s-rating-stars-wrapper"}," ",this.createStars(this.value)," "):i("div",{class:"s-rating-stars-element",ref:t=>this.startsElem=t},i("input",{type:"hidden",class:"rating_hidden_input",name:this.name,value:""}),[1,2,3,4,5].map((t=>i("button",{class:"s-rating-stars-btn-star s-rating-stars-"+this.size,"data-star":t},i("span",{innerHTML:ai}))))))}componentDidLoad(){this.initiateRating(),this.highlightSelectedStars()}get host(){return n(this)}};mi.style="";const vi=class{constructor(i){var e;t(this,i),this.inputValue="",this.translationLoaded=!1,this.loading=!1,this.typing=!1,this.debounce=setTimeout((()=>""),1e3),this.inline=!1,this.oval=!1,this.height=60,this.productSlot=(null===(e=this.host.querySelector('[slot="product"]'))||void 0===e?void 0:e.innerHTML)||this.getDefaultProductSlot(),salla.event.on("search::open",(()=>this.open())),salla.lang.onLoaded((()=>{this.translationLoaded=!0})),salla.event.on("modalClosed",(()=>this.onModalClose()))}async open(){this.inline||await this.modal.open().then((()=>setTimeout((()=>this.searchInput.focus()),300)))}onModalClose(){this.searchInput.value="",this.results=void 0,this.afterSearching(),this.container.classList.remove("s-search-no-results")}handleKeyDown(t){"Enter"===t.key&&(window.location.href=salla.url.get("/search?q="+encodeURI(this.search_term)))}getDefaultProductSlot(){return'<div class="s-search-product-image-container"> <img class="s-search-product-image" src="{image}" alt="{name}"/></div><div class="s-search-product-details"> <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div></div>'}debounceSearch(t){this.typing=!0,clearTimeout(this.debounce),this.debounce=setTimeout((()=>{this.typing=!1,this.search_term=t.target.value}),500)}handelSearch(t){this.inputValue=t,t.length>2?this.search(t):(this.results=void 0,this.afterSearching())}search(t){this.noResults.style.display="none",this.loading=!0,salla.product.search(t).then((t=>this.results=t)).catch((t=>"Query is same as previous one!"!==t?this.results=void 0:null)).finally((()=>this.afterSearching(!1)))}afterSearching(t=!0){var i;this.noResults.style.display=t||(null===(i=this.results)||void 0===i?void 0:i.data.length)>0?"none":"block",Kt.toggleElementClassIf(this.container,"s-search-container-open","s-search-no-results",(()=>{var t;return null===(t=this.results)||void 0===t?void 0:t.data.length})),this.loading=!1,salla.product.api.previousQuery="",this.inputValue.length<3&&this.container.classList.remove("s-search-no-results")}render(){var t;const e=i("div",{class:{"s-search-container":!0,"s-search-inline":this.inline},ref:t=>this.container=t},i("input",{type:"search",enterkeyhint:"search",autocomplete:"off",class:"s-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder"),onInput:t=>this.debounceSearch(t),onKeyDown:t=>this.handleKeyDown(t),ref:t=>this.searchInput=t,style:{height:this.height+"px",borderRadius:this.oval?this.height/2+"px":""}}),i("span",{class:"s-search-icon-wrap"},i("span",{class:"s-search-icon",innerHTML:this.loading?'<i class="s-search-spinner-loader"></i>':l})),i("div",{class:"s-search-results"},null===(t=this.results)||void 0===t?void 0:t.data.map((t=>i("a",{href:t.url,class:{"s-search-product":!0,"s-search-product-not-available":!t.is_available},innerHTML:this.productSlot.replace(/\{name\}/g,t.name).replace(/\{price\}/g,salla.money(t.price)).replace(/\{regular_price\}/g,t.has_special_price?salla.money(t.regular_price):"").replace(/\{image\}/g,t.thumbnail)}))),i("p",{ref:t=>this.noResults=t,class:"s-search-no-results-placeholder"},salla.lang.get("common.elements.no_options"))));return this.inline?i("div",{class:"s-search-modal"},e):i("salla-modal",{position:"top",class:"s-search-modal",ref:t=>this.modal=t},e)}componentDidLoad(){this.afterSearching()}get host(){return n(this)}static get watchers(){return{search_term:["handelSearch"]}}};vi.style="";const xi=class{constructor(i){t(this,i),this.type="normal",this.width="100%",this.height="100%"}render(){return i(e,{class:"s-skeleton-wrapper",style:{width:this.width,height:this.height}},i("div",{class:{"s-skeleton-item":!0,"s-skeleton-item-circular":"circle"==this.type}}," "))}};var bi;xi.style=":host{display:block}",function(t){t.FACEBOOK="facebook",t.TWITTER="twitter",t.WHATSAPP="whatsapp",t.EMAIL="email",t.COPY_LINK="copy_link"}(bi||(bi={}));const wi=class{constructor(i){t(this,i),this.opened=!1,this.allPlatforms=[bi.WHATSAPP,bi.FACEBOOK,bi.TWITTER,bi.EMAIL,bi.COPY_LINK],this.platformIcons=[{icon:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>whatsapp</title>\n<path d="M16 32c-0.008 0-0.018 0-0.028 0-3.1 0-5.993-0.887-8.439-2.421l0.066 0.039-7.2 2.3 2.336-6.964c-1.713-2.492-2.736-5.575-2.736-8.897 0-0.020 0-0.040 0-0.060v0.003c0.009-8.833 7.167-15.991 15.999-16h0.001c8.837 0 16 7.163 16 16s-7.163 16-16 16v0zM7.906 27.424l0.4 0.264c2.169 1.449 4.837 2.312 7.707 2.312 7.732 0 14-6.268 14-14s-6.268-14-14-14c-0.004 0-0.009 0-0.013 0h0.001c-7.729 0.008-13.992 6.271-14 13.999v0.001c-0 0.010-0 0.021-0 0.032 0 3.072 1 5.909 2.693 8.206l-0.027-0.038 0.304 0.416-1.4 4.2zM20.716 24.958c-1.684-0.131-3.237-0.574-4.641-1.271l0.073 0.033c-3.098-1.456-5.634-3.668-7.438-6.405l-0.042-0.067c-1.102-1.357-1.819-3.067-1.962-4.938l-0.002-0.030c-0.001-0.036-0.001-0.078-0.001-0.12 0-1.575 0.66-2.995 1.719-4l0.002-0.002c0.547-0.52 1.289-0.839 2.105-0.839 0.033 0 0.066 0.001 0.099 0.002l-0.005-0c0.2 0 0.378 0 0.542 0.018 0.016-0.001 0.035-0.001 0.054-0.001 0.815 0 1.502 0.549 1.711 1.298l0.003 0.012 0.324 0.782c0.376 0.906 0.858 2.068 0.942 2.244 0.144 0.251 0.23 0.552 0.23 0.873 0 0.286-0.068 0.557-0.188 0.797l0.005-0.010c-0.149 0.307-0.332 0.57-0.55 0.802l0.002-0.002c-0.148 0.168-0.248 0.274-0.346 0.378s-0.172 0.18-0.26 0.284c0.575 0.92 1.237 1.713 1.992 2.406l0.008 0.008c0.829 0.758 1.802 1.373 2.872 1.8l0.064 0.022c0.369-0.266 0.672-0.6 0.896-0.985l0.008-0.015 0.174-0.232c0.328-0.484 0.875-0.798 1.495-0.798 0.249 0 0.487 0.051 0.703 0.142l-0.012-0.004c0.492 0.168 2.922 1.372 2.946 1.384l0.228 0.11c0.415 0.149 0.758 0.417 0.996 0.763l0.004 0.007c0.107 0.349 0.169 0.75 0.169 1.166 0 0.591-0.125 1.153-0.349 1.661l0.010-0.026c-0.702 1.368-1.983 2.353-3.511 2.637l-0.031 0.005c-0.309 0.071-0.663 0.112-1.028 0.112-0.004 0-0.007 0-0.011 0h0.001zM10.632 9.318c-0.028-0.002-0.062-0.004-0.095-0.004-0.245 0-0.472 0.076-0.659 0.206l0.004-0.002c-0.726 0.651-1.18 1.591-1.18 2.638 0 0.044 0.001 0.087 0.002 0.13l-0-0.006c0.122 1.404 0.662 2.662 1.495 3.671l-0.009-0.011 0.12 0.168c1.627 2.491 3.865 4.46 6.504 5.723l0.096 0.041c3.136 1.288 3.916 1.124 4.426 1.014 0.87-0.159 1.601-0.656 2.067-1.347l0.007-0.011c0.12-0.316 0.204-0.682 0.237-1.063l0.001-0.015-0.040-0.018-0.256-0.124c-0.8-0.4-2.46-1.2-2.734-1.292l-0.058 0.184c-0.346 0.501-0.684 0.934-1.045 1.347l0.015-0.017c-0.344 0.349-0.821 0.565-1.349 0.565-0.28 0-0.546-0.061-0.785-0.17l0.012 0.005c-1.403-0.547-2.609-1.301-3.646-2.239l0.010 0.009c-0.975-0.891-1.81-1.912-2.486-3.039l-0.034-0.061c-0.152-0.244-0.242-0.54-0.242-0.857 0-0.463 0.191-0.88 0.499-1.178l0-0c0.13-0.162 0.264-0.302 0.4-0.444l0.236-0.256c0.091-0.096 0.177-0.201 0.254-0.311l0.006-0.009c-0.158-0.36-0.622-1.472-0.988-2.352l-0.322-0.772-0.038-0.086c-0.188-0.010-0.302-0.016-0.426-0.016zM12.462 12.442v0.012z"></path>\n</svg>\n',name:bi.WHATSAPP},{icon:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>facebook</title>\n<path d="M19 32h-6c-0.552 0-1-0.448-1-1v0-13h-3c-0.552 0-1-0.448-1-1v0-5c0-0.552 0.448-1 1-1v0h3v-4c0-3.866 3.134-7 7-7v0h4c0.552 0 1 0.448 1 1v0 5c0 0.552-0.448 1-1 1v0h-2c-0.552 0-1 0.448-1 1v0 3h5c0.552 0 1 0.448 1 1 0 0.134-0.026 0.262-0.074 0.379l0.002-0.007-2 5c-0.152 0.371-0.51 0.628-0.928 0.628h-3v13c0 0.552-0.448 1-1 1v0zM14 30h4v-13c0-0.552 0.448-1 1-1v0h3.324l1.2-3h-4.524c-0.552 0-1-0.448-1-1v0-4c0-1.657 1.343-3 3-3v0h1v-3h-3c-2.761 0-5 2.239-5 5v0 5c0 0.552-0.448 1-1 1v0h-3v3h3c0.552 0 1 0.448 1 1v0z"></path>\n</svg>\n',name:bi.FACEBOOK},{icon:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>twitter</title>\n<path d="M10.436 30c-0.012 0-0.026 0-0.041 0-3.691 0-7.129-1.088-10.009-2.961l0.071 0.043c-0.279-0.181-0.46-0.49-0.46-0.842 0-0.123 0.022-0.24 0.063-0.349l-0.002 0.007c0.148-0.387 0.516-0.657 0.948-0.657 0.042 0 0.083 0.003 0.123 0.007l-0.005-0c0.399 0.049 0.86 0.077 1.328 0.077 1.836 0 3.57-0.432 5.108-1.199l-0.066 0.030c-1.941-0.823-3.42-2.412-4.079-4.377l-0.015-0.051c-0.033-0.095-0.053-0.205-0.053-0.32 0-0.255 0.096-0.488 0.253-0.665l-0.001 0.001 0.062-0.062c-1.511-1.323-2.46-3.254-2.462-5.408v-0c0-0 0-0.001 0-0.001 0-0.374 0.194-0.703 0.488-0.89l0.004-0.003c0.115-0.070 0.25-0.121 0.393-0.145l0.007-0.001c-0.534-0.978-0.848-2.141-0.848-3.379 0-1.329 0.362-2.574 0.994-3.641l-0.018 0.033c0.176-0.301 0.498-0.501 0.866-0.501 0.312 0 0.591 0.143 0.774 0.367l0.001 0.002c2.627 3.213 6.397 5.405 10.682 5.953l0.082 0.009c0-0.098 0-0.2 0-0.302 0-0.001 0-0.002 0-0.002 0-3.949 3.201-7.15 7.15-7.15 1.852 0 3.54 0.704 4.81 1.86l-0.006-0.005c1.165-0.288 2.19-0.719 3.127-1.282l-0.051 0.028c0.146-0.088 0.323-0.141 0.512-0.141 0.552 0 1 0.448 1 1 0 0.109-0.017 0.214-0.050 0.312l0.002-0.007c-0.151 0.464-0.324 0.861-0.531 1.237l0.019-0.037c0.117-0.052 0.253-0.082 0.396-0.082 0.552 0 1 0.448 1 1 0 0.208-0.064 0.401-0.172 0.561l0.002-0.004c-0.812 1.212-1.772 2.247-2.87 3.114l-0.028 0.022c0 0.1 0 0.2 0 0.306 0 0.051 0.001 0.111 0.001 0.171 0 10.12-8.204 18.324-18.324 18.324-0.062 0-0.124-0-0.186-0.001l0.009 0zM5 27.084c1.616 0.58 3.481 0.916 5.424 0.916 0.004 0 0.008 0 0.013 0h-0.001c0.048 0 0.104 0.001 0.161 0.001 9.027 0 16.344-7.317 16.344-16.344 0-0.055-0-0.11-0.001-0.165l0 0.008c0-0.256 0-0.502-0.022-0.746-0.001-0.014-0.001-0.031-0.001-0.049 0-0.335 0.165-0.632 0.418-0.813l0.003-0.002q0.312-0.222 0.6-0.466l-0.364 0.052c-0.038 0.005-0.082 0.008-0.126 0.008-0.552 0-1-0.448-1-1 0-0.363 0.193-0.68 0.482-0.856l0.004-0.003q0.222-0.134 0.428-0.286c-0.3 0.082-0.6 0.154-0.912 0.214-0.059 0.012-0.127 0.020-0.197 0.020-0.286 0-0.544-0.12-0.727-0.313l-0-0c-0.943-1.007-2.28-1.634-3.764-1.634-2.845 0-5.152 2.307-5.152 5.152 0 0.001 0 0.002 0 0.002v-0c-0 0.020-0 0.043-0 0.066 0 0.395 0.043 0.781 0.125 1.151l-0.007-0.035c0.017 0.069 0.027 0.148 0.027 0.23 0 0.242-0.086 0.463-0.228 0.636l0.001-0.002c-0.177 0.219-0.445 0.358-0.746 0.358-0.024 0-0.047-0.001-0.071-0.003l0.003 0c-4.85-0.253-9.167-2.342-12.31-5.577l-0.004-0.005c-0.098 0.376-0.155 0.808-0.155 1.253 0 1.778 0.902 3.345 2.272 4.27l0.018 0.012c0.27 0.182 0.446 0.487 0.446 0.832 0 0.552-0.448 1-1 1-0.008 0-0.015-0-0.023-0l0.001 0c-0.548-0.010-1.074-0.082-1.577-0.21l0.047 0.010c0.554 1.812 2.029 3.181 3.866 3.574l0.034 0.006c0.458 0.097 0.797 0.499 0.797 0.979 0 0.456-0.305 0.841-0.722 0.961l-0.007 0.002c-0.412 0.117-0.89 0.198-1.383 0.225l-0.017 0.001c0.926 1.304 2.415 2.156 4.105 2.2l0.007 0c0.546 0.009 0.984 0.453 0.984 1 0 0.319-0.15 0.603-0.382 0.787l-0.002 0.002c-1.596 1.249-3.522 2.154-5.625 2.568l-0.085 0.014z"></path>\n</svg>\n',name:bi.TWITTER},{icon:ei,name:bi.EMAIL},{icon:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>link</title>\n<path d="M19.247 23.019l-4.189 4.189c-2.831 2.831-7.435 2.831-10.265 0-1.371-1.372-2.125-3.193-2.125-5.132s0.755-3.761 2.125-5.133l4.189-4.191c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-4.189 4.191c-1.875 1.875-2.907 4.367-2.907 7.019s1.032 5.143 2.907 7.017 4.368 2.907 7.019 2.907 5.143-1.032 7.017-2.908l4.189-4.189c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.52-1.885 0.001zM22.276 9.724c-0.521-0.521-1.364-0.521-1.885 0l-10.667 10.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885zM29.093 2.908c-1.875-1.876-4.368-2.908-7.019-2.908s-5.143 1.032-7.017 2.908l-4.189 4.188c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l4.189-4.189c2.831-2.831 7.435-2.831 10.265 0 1.371 1.372 2.125 3.193 2.125 5.132s-0.755 3.761-2.125 5.133l-4.189 4.191c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l4.189-4.191c1.875-1.875 2.907-4.367 2.907-7.019s-1.032-5.143-2.907-7.016z"></path>\n</svg>\n',name:bi.COPY_LINK}],this.url="",this.urlName="",this.platforms=this.allPlatforms}componentWillLoad(){let t=this;if(document.getElementById("a2a-script"))return;const i=document.createElement("script");i.src="https://static.addtoany.com/menu/page.js",i.setAttribute("id","a2a-script"),i.async=!0,i.onload=function(){window.a2a_config=window.a2a_config||{},window.a2a_config.linkurl=t.url?t.url:window.location.href,window.a2a_config.linkname=t.urlName?t.urlName:document.title,window.a2a_config.locale=salla.config.get("user.language_code",salla.lang.getLocale())},document.body.appendChild(i)}async open(){this.opened=!this.opened,this.opened?this.shareMenu.classList.add("opened"):this.shareMenu.classList.remove("opened"),(new Ht.timeline).add({targets:this.shareMenu,translateY:[-50,0],opacity:[0,1],duration:300,podding:"0",easing:"easeInOutSine"}).add({targets:this.platformItem,translateZ:0,translateY:[-30,0],scaleY:[0,1],opacity:[0,1],duration:1200,delay:Ht.stagger(100)},"-=200")}render(){return i("div",{class:"s-social-share-wrapper"},i("slot",{name:"widget"},i("salla-button",{"aria-label":"Share",onClick:()=>this.open(),class:"s-social-share-btn",shape:"icon",fill:"outline",color:"light"},i("span",{innerHTML:this.opened?$t:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>share-alt</title>\n<path d="M26.667 21.333c-1.699 0-3.196 0.812-4.173 2.052l-11.912-5.211c0.044-0.276 0.085-0.553 0.085-0.841 0-0.472-0.081-0.923-0.197-1.359l12.361-6.952c0.971 1.009 2.328 1.644 3.836 1.644 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333-5.333 2.392-5.333 5.333c0 0.472 0.081 0.923 0.197 1.359l-12.361 6.952c-0.971-1.009-2.328-1.644-3.836-1.644-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c1.699 0 3.196-0.812 4.173-2.052l11.912 5.211c-0.044 0.276-0.085 0.553-0.085 0.841 0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM26.667 2.667c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM5.333 20c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM26.667 29.333c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n'}))),i("ul",{ref:t=>this.shareMenu=t,class:"s-social-share-list a2a_kit share"},this.platforms.map((t=>i("li",{ref:t=>this.platformItem=t},i("a",{class:`a2a_button_${t}`,"aria-label":`Share Via ${t}`},this.platformIcons.map((e=>{if(e.name===t)return i("span",{class:"s-social-share-icon",innerHTML:e.icon})}))))))))}};function yi(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function Ei(t={},i={}){Object.keys(i).forEach((e=>{void 0===t[e]?t[e]=i[e]:yi(i[e])&&yi(t[e])&&Object.keys(i[e]).length>0&&Ei(t[e],i[e])}))}wi.style="";const ki={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Ii(){const t="undefined"!=typeof document?document:{};return Ei(t,ki),t}const Ti={document:ki,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:t=>"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0),cancelAnimationFrame(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function Ai(){const t="undefined"!=typeof window?window:{};return Ei(t,Ti),t}class Mi extends Array{constructor(t){"number"==typeof t?super(t):(super(...t||[]),function(t){const i=t.__proto__;Object.defineProperty(t,"__proto__",{get:()=>i,set(t){i.__proto__=t}})}(this))}}function Di(t=[]){const i=[];return t.forEach((t=>{Array.isArray(t)?i.push(...Di(t)):i.push(t)})),i}function Ri(t,i){return Array.prototype.filter.call(t,i)}function Oi(t,i){const e=Ai(),n=Ii();let o=[];if(!i&&t instanceof Mi)return t;if(!t)return new Mi(o);if("string"==typeof t){const e=t.trim();if(e.indexOf("<")>=0&&e.indexOf(">")>=0){let t="div";0===e.indexOf("<li")&&(t="ul"),0===e.indexOf("<tr")&&(t="tbody"),0!==e.indexOf("<td")&&0!==e.indexOf("<th")||(t="tr"),0===e.indexOf("<tbody")&&(t="table"),0===e.indexOf("<option")&&(t="select");const i=n.createElement(t);i.innerHTML=e;for(let t=0;t<i.childNodes.length;t+=1)o.push(i.childNodes[t])}else o=function(t,i){if("string"!=typeof t)return[t];const e=[],n=i.querySelectorAll(t);for(let t=0;t<n.length;t+=1)e.push(n[t]);return e}(t.trim(),i||n)}else if(t.nodeType||t===e||t===n)o.push(t);else if(Array.isArray(t)){if(t instanceof Mi)return t;o=t}return new Mi(function(t){const i=[];for(let e=0;e<t.length;e+=1)-1===i.indexOf(t[e])&&i.push(t[e]);return i}(o))}Oi.fn=Mi.prototype;const Si={addClass:function(...t){const i=Di(t.map((t=>t.split(" "))));return this.forEach((t=>{t.classList.add(...i)})),this},removeClass:function(...t){const i=Di(t.map((t=>t.split(" "))));return this.forEach((t=>{t.classList.remove(...i)})),this},hasClass:function(...t){const i=Di(t.map((t=>t.split(" "))));return Ri(this,(t=>i.filter((i=>t.classList.contains(i))).length>0)).length>0},toggleClass:function(...t){const i=Di(t.map((t=>t.split(" "))));this.forEach((t=>{i.forEach((i=>{t.classList.toggle(i)}))}))},attr:function(t,i){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(let e=0;e<this.length;e+=1)if(2===arguments.length)this[e].setAttribute(t,i);else for(const i in t)this[e][i]=t[i],this[e].setAttribute(i,t[i]);return this},removeAttr:function(t){for(let i=0;i<this.length;i+=1)this[i].removeAttribute(t);return this},transform:function(t){for(let i=0;i<this.length;i+=1)this[i].style.transform=t;return this},transition:function(t){for(let i=0;i<this.length;i+=1)this[i].style.transitionDuration="string"!=typeof t?`${t}ms`:t;return this},on:function(...t){let[i,e,n,o]=t;function a(t){const i=t.target;if(!i)return;const o=t.target.dom7EventData||[];if(o.indexOf(t)<0&&o.unshift(t),Oi(i).is(e))n.apply(i,o);else{const t=Oi(i).parents();for(let i=0;i<t.length;i+=1)Oi(t[i]).is(e)&&n.apply(t[i],o)}}function r(t){const i=t&&t.target&&t.target.dom7EventData||[];i.indexOf(t)<0&&i.unshift(t),n.apply(this,i)}"function"==typeof t[1]&&([i,n,o]=t,e=void 0),o||(o=!1);const s=i.split(" ");let l;for(let t=0;t<this.length;t+=1){const i=this[t];if(e)for(l=0;l<s.length;l+=1){const t=s[l];i.dom7LiveListeners||(i.dom7LiveListeners={}),i.dom7LiveListeners[t]||(i.dom7LiveListeners[t]=[]),i.dom7LiveListeners[t].push({listener:n,proxyListener:a}),i.addEventListener(t,a,o)}else for(l=0;l<s.length;l+=1){const t=s[l];i.dom7Listeners||(i.dom7Listeners={}),i.dom7Listeners[t]||(i.dom7Listeners[t]=[]),i.dom7Listeners[t].push({listener:n,proxyListener:r}),i.addEventListener(t,r,o)}}return this},off:function(...t){let[i,e,n,o]=t;"function"==typeof t[1]&&([i,n,o]=t,e=void 0),o||(o=!1);const a=i.split(" ");for(let t=0;t<a.length;t+=1){const i=a[t];for(let t=0;t<this.length;t+=1){const a=this[t];let r;if(!e&&a.dom7Listeners?r=a.dom7Listeners[i]:e&&a.dom7LiveListeners&&(r=a.dom7LiveListeners[i]),r&&r.length)for(let t=r.length-1;t>=0;t-=1){const e=r[t];n&&e.listener===n||n&&e.listener&&e.listener.dom7proxy&&e.listener.dom7proxy===n?(a.removeEventListener(i,e.proxyListener,o),r.splice(t,1)):n||(a.removeEventListener(i,e.proxyListener,o),r.splice(t,1))}}}return this},trigger:function(...t){const i=Ai(),e=t[0].split(" "),n=t[1];for(let o=0;o<e.length;o+=1){const a=e[o];for(let e=0;e<this.length;e+=1){const o=this[e];if(i.CustomEvent){const e=new i.CustomEvent(a,{detail:n,bubbles:!0,cancelable:!0});o.dom7EventData=t.filter(((t,i)=>i>0)),o.dispatchEvent(e),o.dom7EventData=[],delete o.dom7EventData}}}return this},transitionEnd:function(t){const i=this;return t&&i.on("transitionend",(function e(n){n.target===this&&(t.call(this,n),i.off("transitionend",e))})),this},outerWidth:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const t=Ai();return this[0]?t.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const t=Ai(),i=Ii(),e=this[0],n=e.getBoundingClientRect(),o=i.body;return{top:n.top+(e===t?t.scrollY:e.scrollTop)-(e.clientTop||o.clientTop||0),left:n.left+(e===t?t.scrollX:e.scrollLeft)-(e.clientLeft||o.clientLeft||0)}}return null},css:function(t,i){const e=Ai();let n;if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(const i in t)this[n].style[i]=t[i];return this}if(this[0])return e.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)this[n].style[t]=i;return this}return this},each:function(t){return t?(this.forEach(((i,e)=>{t.apply(i,[i,e])})),this):this},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(let i=0;i<this.length;i+=1)this[i].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(let i=0;i<this.length;i+=1)this[i].textContent=t;return this},is:function(t){const i=Ai(),e=Ii(),n=this[0];let o,a;if(!n||void 0===t)return!1;if("string"==typeof t){if(n.matches)return n.matches(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);for(o=Oi(t),a=0;a<o.length;a+=1)if(o[a]===n)return!0;return!1}if(t===e)return n===e;if(t===i)return n===i;if(t.nodeType||t instanceof Mi){for(o=t.nodeType?[t]:t,a=0;a<o.length;a+=1)if(o[a]===n)return!0;return!1}return!1},index:function(){let t,i=this[0];if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;const i=this.length;if(t>i-1)return Oi([]);if(t<0){const e=i+t;return Oi(e<0?[]:[this[e]])}return Oi([this[t]])},append:function(...t){let i;const e=Ii();for(let n=0;n<t.length;n+=1){i=t[n];for(let t=0;t<this.length;t+=1)if("string"==typeof i){const n=e.createElement("div");for(n.innerHTML=i;n.firstChild;)this[t].appendChild(n.firstChild)}else if(i instanceof Mi)for(let e=0;e<i.length;e+=1)this[t].appendChild(i[e]);else this[t].appendChild(i)}return this},prepend:function(t){const i=Ii();let e,n;for(e=0;e<this.length;e+=1)if("string"==typeof t){const o=i.createElement("div");for(o.innerHTML=t,n=o.childNodes.length-1;n>=0;n-=1)this[e].insertBefore(o.childNodes[n],this[e].childNodes[0])}else if(t instanceof Mi)for(n=0;n<t.length;n+=1)this[e].insertBefore(t[n],this[e].childNodes[0]);else this[e].insertBefore(t,this[e].childNodes[0]);return this},next:function(t){return this.length>0?t?this[0].nextElementSibling&&Oi(this[0].nextElementSibling).is(t)?Oi([this[0].nextElementSibling]):Oi([]):Oi(this[0].nextElementSibling?[this[0].nextElementSibling]:[]):Oi([])},nextAll:function(t){const i=[];let e=this[0];if(!e)return Oi([]);for(;e.nextElementSibling;){const n=e.nextElementSibling;t?Oi(n).is(t)&&i.push(n):i.push(n),e=n}return Oi(i)},prev:function(t){if(this.length>0){const i=this[0];return t?i.previousElementSibling&&Oi(i.previousElementSibling).is(t)?Oi([i.previousElementSibling]):Oi([]):Oi(i.previousElementSibling?[i.previousElementSibling]:[])}return Oi([])},prevAll:function(t){const i=[];let e=this[0];if(!e)return Oi([]);for(;e.previousElementSibling;){const n=e.previousElementSibling;t?Oi(n).is(t)&&i.push(n):i.push(n),e=n}return Oi(i)},parent:function(t){const i=[];for(let e=0;e<this.length;e+=1)null!==this[e].parentNode&&(t?Oi(this[e].parentNode).is(t)&&i.push(this[e].parentNode):i.push(this[e].parentNode));return Oi(i)},parents:function(t){const i=[];for(let e=0;e<this.length;e+=1){let n=this[e].parentNode;for(;n;)t?Oi(n).is(t)&&i.push(n):i.push(n),n=n.parentNode}return Oi(i)},closest:function(t){let i=this;return void 0===t?Oi([]):(i.is(t)||(i=i.parents(t).eq(0)),i)},find:function(t){const i=[];for(let e=0;e<this.length;e+=1){const n=this[e].querySelectorAll(t);for(let t=0;t<n.length;t+=1)i.push(n[t])}return Oi(i)},children:function(t){const i=[];for(let e=0;e<this.length;e+=1){const n=this[e].children;for(let e=0;e<n.length;e+=1)t&&!Oi(n[e]).is(t)||i.push(n[e])}return Oi(i)},filter:function(t){return Oi(Ri(this,t))},remove:function(){for(let t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}};function Li(t,i){return void 0===i&&(i=0),setTimeout(t,i)}function Ci(){return Date.now()}function Pi(t){return"object"==typeof t&&null!==t&&t.constructor&&"Object"===Object.prototype.toString.call(t).slice(8,-1)}function Gi(t){return"undefined"!=typeof window&&void 0!==window.HTMLElement?t instanceof HTMLElement:t&&(1===t.nodeType||11===t.nodeType)}function zi(){const t=Object(arguments.length<=0?void 0:arguments[0]),i=["__proto__","constructor","prototype"];for(let e=1;e<arguments.length;e+=1){const n=e<0||arguments.length<=e?void 0:arguments[e];if(null!=n&&!Gi(n)){const e=Object.keys(Object(n)).filter((t=>i.indexOf(t)<0));for(let i=0,o=e.length;i<o;i+=1){const o=e[i],a=Object.getOwnPropertyDescriptor(n,o);void 0!==a&&a.enumerable&&(Pi(t[o])&&Pi(n[o])?n[o].__swiper__?t[o]=n[o]:zi(t[o],n[o]):!Pi(t[o])&&Pi(n[o])?(t[o]={},n[o].__swiper__?t[o]=n[o]:zi(t[o],n[o])):t[o]=n[o])}}}return t}function Ni(t,i,e){t.style.setProperty(i,e)}function Bi(t){let{swiper:i,targetPosition:e,side:n}=t;const o=Ai(),a=-i.translate;let r,s=null;const l=i.params.speed;i.wrapperEl.style.scrollSnapType="none",o.cancelAnimationFrame(i.cssModeFrameID);const c=e>a?"next":"prev",u=(t,i)=>"next"===c&&t>=i||"prev"===c&&t<=i,p=()=>{r=(new Date).getTime(),null===s&&(s=r);const t=Math.max(Math.min((r-s)/l,1),0),c=.5-Math.cos(t*Math.PI)/2;let d=a+c*(e-a);if(u(d,e)&&(d=e),i.wrapperEl.scrollTo({[n]:d}),u(d,e))return i.wrapperEl.style.overflow="hidden",i.wrapperEl.style.scrollSnapType="",setTimeout((()=>{i.wrapperEl.style.overflow="",i.wrapperEl.scrollTo({[n]:d})})),void o.cancelAnimationFrame(i.cssModeFrameID);i.cssModeFrameID=o.requestAnimationFrame(p)};p()}let Fi,Ui,ji;function Hi(){return Fi||(Fi=function(){const t=Ai(),i=Ii();return{smoothScroll:i.documentElement&&"scrollBehavior"in i.documentElement.style,touch:!!("ontouchstart"in t||t.DocumentTouch&&i instanceof t.DocumentTouch),passiveListener:function(){let i=!1;try{const e=Object.defineProperty({},"passive",{get(){i=!0}});t.addEventListener("testPassiveListener",null,e)}catch(t){}return i}(),gestures:"ongesturestart"in t}}()),Fi}Object.keys(Si).forEach((t=>{Object.defineProperty(Oi.fn,t,{value:Si[t],writable:!0})}));const Vi={on(t,i,e){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof i)return n;const o=e?"unshift":"push";return t.split(" ").forEach((t=>{n.eventsListeners[t]||(n.eventsListeners[t]=[]),n.eventsListeners[t][o](i)})),n},once(t,i,e){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof i)return n;function o(){n.off(t,o),o.__emitterProxy&&delete o.__emitterProxy;for(var e=arguments.length,a=new Array(e),r=0;r<e;r++)a[r]=arguments[r];i.apply(n,a)}return o.__emitterProxy=i,n.on(t,o,e)},onAny(t,i){const e=this;if(!e.eventsListeners||e.destroyed)return e;if("function"!=typeof t)return e;const n=i?"unshift":"push";return e.eventsAnyListeners.indexOf(t)<0&&e.eventsAnyListeners[n](t),e},offAny(t){const i=this;if(!i.eventsListeners||i.destroyed)return i;if(!i.eventsAnyListeners)return i;const e=i.eventsAnyListeners.indexOf(t);return e>=0&&i.eventsAnyListeners.splice(e,1),i},off(t,i){const e=this;return!e.eventsListeners||e.destroyed?e:e.eventsListeners?(t.split(" ").forEach((t=>{void 0===i?e.eventsListeners[t]=[]:e.eventsListeners[t]&&e.eventsListeners[t].forEach(((n,o)=>{(n===i||n.__emitterProxy&&n.__emitterProxy===i)&&e.eventsListeners[t].splice(o,1)}))})),e):e},emit(){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let i,e,n;for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return"string"==typeof a[0]||Array.isArray(a[0])?(i=a[0],e=a.slice(1,a.length),n=t):(i=a[0].events,e=a[0].data,n=a[0].context||t),e.unshift(n),(Array.isArray(i)?i:i.split(" ")).forEach((i=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach((t=>{t.apply(n,[i,...e])})),t.eventsListeners&&t.eventsListeners[i]&&t.eventsListeners[i].forEach((t=>{t.apply(n,e)}))})),t}};function Wi(t){let{swiper:i,runCallbacks:e,direction:n,step:o}=t;const{activeIndex:a,previousIndex:r}=i;let s=n;if(s||(s=a>r?"next":a<r?"prev":"reset"),i.emit(`transition${o}`),e&&a!==r){if("reset"===s)return void i.emit(`slideResetTransition${o}`);i.emit(`slideChangeTransition${o}`),i.emit("next"===s?`slideNextTransition${o}`:`slidePrevTransition${o}`)}}function Yi(t){const i=this,e=Ii(),n=Ai(),o=i.touchEventsData,{params:a,touches:r,enabled:s}=i;if(!s)return;if(i.animating&&a.preventInteractionOnTransition)return;!i.animating&&a.cssMode&&a.loop&&i.loopFix();let l=t;l.originalEvent&&(l=l.originalEvent);let c=Oi(l.target);if("wrapper"===a.touchEventsTarget&&!c.closest(i.wrapperEl).length)return;if(o.isTouchEvent="touchstart"===l.type,!o.isTouchEvent&&"which"in l&&3===l.which)return;if(!o.isTouchEvent&&"button"in l&&l.button>0)return;if(o.isTouched&&o.isMoved)return;a.noSwipingClass&&""!==a.noSwipingClass&&l.target&&l.target.shadowRoot&&t.path&&t.path[0]&&(c=Oi(t.path[0]));const u=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`;if(a.noSwiping&&(l.target&&l.target.shadowRoot?function(t,i){return void 0===i&&(i=this),function i(e){if(!e||e===Ii()||e===Ai())return null;e.assignedSlot&&(e=e.assignedSlot);const n=e.closest(t);return n||e.getRootNode?n||i(e.getRootNode().host):null}(i)}(u,c[0]):c.closest(u)[0]))return void(i.allowClick=!0);if(a.swipeHandler&&!c.closest(a.swipeHandler)[0])return;r.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,r.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;const p=r.currentX,d=r.currentY,h=a.edgeSwipeDetection||a.iOSEdgeSwipeDetection,f=a.edgeSwipeThreshold||a.iOSEdgeSwipeThreshold;if(h&&(p<=f||p>=n.innerWidth-f)){if("prevent"!==h)return;t.preventDefault()}if(Object.assign(o,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),r.startX=p,r.startY=d,o.touchStartTime=Ci(),i.allowClick=!0,i.updateSize(),i.swipeDirection=void 0,a.threshold>0&&(o.allowThresholdMove=!1),"touchstart"!==l.type){let t=!0;c.is(o.focusableElements)&&(t=!1,"SELECT"===c[0].nodeName&&(o.isTouched=!1)),e.activeElement&&Oi(e.activeElement).is(o.focusableElements)&&e.activeElement!==c[0]&&e.activeElement.blur();const n=t&&i.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!n||c[0].isContentEditable||l.preventDefault()}i.params.freeMode&&i.params.freeMode.enabled&&i.freeMode&&i.animating&&!a.cssMode&&i.freeMode.onTouchStart(),i.emit("touchStart",l)}function qi(t){const i=Ii(),e=this,n=e.touchEventsData,{params:o,touches:a,rtlTranslate:r,enabled:s}=e;if(!s)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),!n.isTouched)return void(n.startMoving&&n.isScrolling&&e.emit("touchMoveOpposite",l));if(n.isTouchEvent&&"touchmove"!==l.type)return;const c="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u="touchmove"===l.type?c.pageX:l.pageX,p="touchmove"===l.type?c.pageY:l.pageY;if(l.preventedByNestedSwiper)return a.startX=u,void(a.startY=p);if(!e.allowTouchMove)return Oi(l.target).is(n.focusableElements)||(e.allowClick=!1),void(n.isTouched&&(Object.assign(a,{startX:u,startY:p,currentX:u,currentY:p}),n.touchStartTime=Ci()));if(n.isTouchEvent&&o.touchReleaseOnEdges&&!o.loop)if(e.isVertical()){if(p<a.startY&&e.translate<=e.maxTranslate()||p>a.startY&&e.translate>=e.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else if(u<a.startX&&e.translate<=e.maxTranslate()||u>a.startX&&e.translate>=e.minTranslate())return;if(n.isTouchEvent&&i.activeElement&&l.target===i.activeElement&&Oi(l.target).is(n.focusableElements))return n.isMoved=!0,void(e.allowClick=!1);if(n.allowTouchCallbacks&&e.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;a.currentX=u,a.currentY=p;const d=a.currentX-a.startX,h=a.currentY-a.startY;if(e.params.threshold&&Math.sqrt(d**2+h**2)<e.params.threshold)return;if(void 0===n.isScrolling){let t;e.isHorizontal()&&a.currentY===a.startY||e.isVertical()&&a.currentX===a.startX?n.isScrolling=!1:d*d+h*h>=25&&(t=180*Math.atan2(Math.abs(h),Math.abs(d))/Math.PI,n.isScrolling=e.isHorizontal()?t>o.touchAngle:90-t>o.touchAngle)}if(n.isScrolling&&e.emit("touchMoveOpposite",l),void 0===n.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(n.startMoving=!0)),n.isScrolling)return void(n.isTouched=!1);if(!n.startMoving)return;e.allowClick=!1,!o.cssMode&&l.cancelable&&l.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&l.stopPropagation(),n.isMoved||(o.loop&&!o.cssMode&&e.loopFix(),n.startTranslate=e.getTranslate(),e.setTransition(0),e.animating&&e.$wrapperEl.trigger("webkitTransitionEnd transitionend"),n.allowMomentumBounce=!1,!o.grabCursor||!0!==e.allowSlideNext&&!0!==e.allowSlidePrev||e.setGrabCursor(!0),e.emit("sliderFirstMove",l)),e.emit("sliderMove",l),n.isMoved=!0;let f=e.isHorizontal()?d:h;a.diff=f,f*=o.touchRatio,r&&(f=-f),e.swipeDirection=f>0?"prev":"next",n.currentTranslate=f+n.startTranslate;let g=!0,_=o.resistanceRatio;if(o.touchReleaseOnEdges&&(_=0),f>0&&n.currentTranslate>e.minTranslate()?(g=!1,o.resistance&&(n.currentTranslate=e.minTranslate()-1+(-e.minTranslate()+n.startTranslate+f)**_)):f<0&&n.currentTranslate<e.maxTranslate()&&(g=!1,o.resistance&&(n.currentTranslate=e.maxTranslate()+1-(e.maxTranslate()-n.startTranslate-f)**_)),g&&(l.preventedByNestedSwiper=!0),!e.allowSlideNext&&"next"===e.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!e.allowSlidePrev&&"prev"===e.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),e.allowSlidePrev||e.allowSlideNext||(n.currentTranslate=n.startTranslate),o.threshold>0){if(!(Math.abs(f)>o.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,n.currentTranslate=n.startTranslate,void(a.diff=e.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}o.followFinger&&!o.cssMode&&((o.freeMode&&o.freeMode.enabled&&e.freeMode||o.watchSlidesProgress)&&(e.updateActiveIndex(),e.updateSlidesClasses()),e.params.freeMode&&o.freeMode.enabled&&e.freeMode&&e.freeMode.onTouchMove(),e.updateProgress(n.currentTranslate),e.setTranslate(n.currentTranslate))}function $i(t){const i=this,e=i.touchEventsData,{params:n,touches:o,rtlTranslate:a,slidesGrid:r,enabled:s}=i;if(!s)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),e.allowTouchCallbacks&&i.emit("touchEnd",l),e.allowTouchCallbacks=!1,!e.isTouched)return e.isMoved&&n.grabCursor&&i.setGrabCursor(!1),e.isMoved=!1,void(e.startMoving=!1);n.grabCursor&&e.isMoved&&e.isTouched&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!1);const c=Ci(),u=c-e.touchStartTime;if(i.allowClick){const t=l.path||l.composedPath&&l.composedPath();i.updateClickedSlide(t&&t[0]||l.target),i.emit("tap click",l),u<300&&c-e.lastClickTime<300&&i.emit("doubleTap doubleClick",l)}if(e.lastClickTime=Ci(),Li((()=>{i.destroyed||(i.allowClick=!0)})),!e.isTouched||!e.isMoved||!i.swipeDirection||0===o.diff||e.currentTranslate===e.startTranslate)return e.isTouched=!1,e.isMoved=!1,void(e.startMoving=!1);let p;if(e.isTouched=!1,e.isMoved=!1,e.startMoving=!1,p=n.followFinger?a?i.translate:-i.translate:-e.currentTranslate,n.cssMode)return;if(i.params.freeMode&&n.freeMode.enabled)return void i.freeMode.onTouchEnd({currentPos:p});let d=0,h=i.slidesSizesGrid[0];for(let t=0;t<r.length;t+=t<n.slidesPerGroupSkip?1:n.slidesPerGroup){const i=t<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;void 0!==r[t+i]?p>=r[t]&&p<r[t+i]&&(d=t,h=r[t+i]-r[t]):p>=r[t]&&(d=t,h=r[r.length-1]-r[r.length-2])}let f=null,g=null;n.rewind&&(i.isBeginning?g=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1:i.isEnd&&(f=0));const _=(p-r[d])/h,m=d<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;if(u>n.longSwipesMs){if(!n.longSwipes)return void i.slideTo(i.activeIndex);"next"===i.swipeDirection&&i.slideTo(_>=n.longSwipesRatio?n.rewind&&i.isEnd?f:d+m:d),"prev"===i.swipeDirection&&(_>1-n.longSwipesRatio?i.slideTo(d+m):null!==g&&_<0&&Math.abs(_)>n.longSwipesRatio?i.slideTo(g):i.slideTo(d))}else{if(!n.shortSwipes)return void i.slideTo(i.activeIndex);!i.navigation||l.target!==i.navigation.nextEl&&l.target!==i.navigation.prevEl?("next"===i.swipeDirection&&i.slideTo(null!==f?f:d+m),"prev"===i.swipeDirection&&i.slideTo(null!==g?g:d)):i.slideTo(l.target===i.navigation.nextEl?d+m:d)}}function Zi(){const t=this,{params:i,el:e}=t;if(e&&0===e.offsetWidth)return;i.breakpoints&&t.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:o,snapGrid:a}=t;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses(),t.slideTo(("auto"===i.slidesPerView||i.slidesPerView>1)&&t.isEnd&&!t.isBeginning&&!t.params.centeredSlides?t.slides.length-1:t.activeIndex,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.run(),t.allowSlidePrev=o,t.allowSlideNext=n,t.params.watchOverflow&&a!==t.snapGrid&&t.checkOverflow()}function Xi(t){const i=this;i.enabled&&(i.allowClick||(i.params.preventClicks&&t.preventDefault(),i.params.preventClicksPropagation&&i.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function Ki(){const t=this,{wrapperEl:i,rtlTranslate:e,enabled:n}=t;if(!n)return;let o;t.previousTranslate=t.translate,t.translate=t.isHorizontal()?-i.scrollLeft:-i.scrollTop,0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();const a=t.maxTranslate()-t.minTranslate();o=0===a?0:(t.translate-t.minTranslate())/a,o!==t.progress&&t.updateProgress(e?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}let Qi=!1;function Ji(){}const te=(t,i)=>{const e=Ii(),{params:n,touchEvents:o,el:a,wrapperEl:r,device:s,support:l}=t,c=!!n.nested,u="on"===i?"addEventListener":"removeEventListener",p=i;if(l.touch){const i=!("touchstart"!==o.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};a[u](o.start,t.onTouchStart,i),a[u](o.move,t.onTouchMove,l.passiveListener?{passive:!1,capture:c}:c),a[u](o.end,t.onTouchEnd,i),o.cancel&&a[u](o.cancel,t.onTouchEnd,i)}else a[u](o.start,t.onTouchStart,!1),e[u](o.move,t.onTouchMove,c),e[u](o.end,t.onTouchEnd,!1);(n.preventClicks||n.preventClicksPropagation)&&a[u]("click",t.onClick,!0),n.cssMode&&r[u]("scroll",t.onScroll),t[p](n.updateOnWindowResize?s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate":"observerUpdate",Zi,!0)},ie=(t,i)=>t.grid&&i.grid&&i.grid.rows>1,ee={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:!0,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function ne(t,i){return function(e){void 0===e&&(e={});const n=Object.keys(e)[0],o=e[n];"object"==typeof o&&null!==o?(["navigation","pagination","scrollbar"].indexOf(n)>=0&&!0===t[n]&&(t[n]={auto:!0}),n in t&&"enabled"in o?(!0===t[n]&&(t[n]={enabled:!0}),"object"!=typeof t[n]||"enabled"in t[n]||(t[n].enabled=!0),t[n]||(t[n]={enabled:!1}),zi(i,e)):zi(i,e)):zi(i,e)}}const oe={eventsEmitter:Vi,update:{updateSize:function(){const t=this;let i,e;const n=t.$el;i=null!=t.params.width?t.params.width:n[0].clientWidth,e=null!=t.params.height?t.params.height:n[0].clientHeight,0===i&&t.isHorizontal()||0===e&&t.isVertical()||(i=i-parseInt(n.css("padding-left")||0,10)-parseInt(n.css("padding-right")||0,10),e=e-parseInt(n.css("padding-top")||0,10)-parseInt(n.css("padding-bottom")||0,10),Number.isNaN(i)&&(i=0),Number.isNaN(e)&&(e=0),Object.assign(t,{width:i,height:e,size:t.isHorizontal()?i:e}))},updateSlides:function(){const t=this;function i(i){return t.isHorizontal()?i:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[i]}function e(t,e){return parseFloat(t.getPropertyValue(i(e))||0)}const n=t.params,{$wrapperEl:o,size:a,rtlTranslate:r,wrongRTL:s}=t,l=t.virtual&&n.virtual.enabled,c=l?t.virtual.slides.length:t.slides.length,u=o.children(`.${t.params.slideClass}`),p=l?t.virtual.slides.length:u.length;let d=[];const h=[],f=[];let g=n.slidesOffsetBefore;"function"==typeof g&&(g=n.slidesOffsetBefore.call(t));let _=n.slidesOffsetAfter;"function"==typeof _&&(_=n.slidesOffsetAfter.call(t));const m=t.snapGrid.length,v=t.slidesGrid.length;let x=n.spaceBetween,b=-g,w=0,y=0;if(void 0===a)return;"string"==typeof x&&x.indexOf("%")>=0&&(x=parseFloat(x.replace("%",""))/100*a),t.virtualSize=-x,u.css(r?{marginLeft:"",marginBottom:"",marginTop:""}:{marginRight:"",marginBottom:"",marginTop:""}),n.centeredSlides&&n.cssMode&&(Ni(t.wrapperEl,"--swiper-centered-offset-before",""),Ni(t.wrapperEl,"--swiper-centered-offset-after",""));const E=n.grid&&n.grid.rows>1&&t.grid;let k;E&&t.grid.initSlides(p);const I="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((t=>void 0!==n.breakpoints[t].slidesPerView)).length>0;for(let o=0;o<p;o+=1){k=0;const r=u.eq(o);if(E&&t.grid.updateSlide(o,r,p,i),"none"!==r.css("display")){if("auto"===n.slidesPerView){I&&(u[o].style[i("width")]="");const a=getComputedStyle(r[0]),s=r[0].style.transform,l=r[0].style.webkitTransform;if(s&&(r[0].style.transform="none"),l&&(r[0].style.webkitTransform="none"),n.roundLengths)k=t.isHorizontal()?r.outerWidth(!0):r.outerHeight(!0);else{const t=e(a,"width"),i=e(a,"padding-left"),n=e(a,"padding-right"),o=e(a,"margin-left"),s=e(a,"margin-right"),l=a.getPropertyValue("box-sizing");if(l&&"border-box"===l)k=t+o+s;else{const{clientWidth:e,offsetWidth:a}=r[0];k=t+i+n+o+s+(a-e)}}s&&(r[0].style.transform=s),l&&(r[0].style.webkitTransform=l),n.roundLengths&&(k=Math.floor(k))}else k=(a-(n.slidesPerView-1)*x)/n.slidesPerView,n.roundLengths&&(k=Math.floor(k)),u[o]&&(u[o].style[i("width")]=`${k}px`);u[o]&&(u[o].swiperSlideSize=k),f.push(k),n.centeredSlides?(b=b+k/2+w/2+x,0===w&&0!==o&&(b=b-a/2-x),0===o&&(b=b-a/2-x),Math.abs(b)<.001&&(b=0),n.roundLengths&&(b=Math.floor(b)),y%n.slidesPerGroup==0&&d.push(b),h.push(b)):(n.roundLengths&&(b=Math.floor(b)),(y-Math.min(t.params.slidesPerGroupSkip,y))%t.params.slidesPerGroup==0&&d.push(b),h.push(b),b=b+k+x),t.virtualSize+=k+x,w=k,y+=1}}if(t.virtualSize=Math.max(t.virtualSize,a)+_,r&&s&&("slide"===n.effect||"coverflow"===n.effect)&&o.css({width:`${t.virtualSize+n.spaceBetween}px`}),n.setWrapperSize&&o.css({[i("width")]:`${t.virtualSize+n.spaceBetween}px`}),E&&t.grid.updateWrapperSize(k,d,i),!n.centeredSlides){const i=[];for(let e=0;e<d.length;e+=1){let o=d[e];n.roundLengths&&(o=Math.floor(o)),d[e]<=t.virtualSize-a&&i.push(o)}d=i,Math.floor(t.virtualSize-a)-Math.floor(d[d.length-1])>1&&d.push(t.virtualSize-a)}if(0===d.length&&(d=[0]),0!==n.spaceBetween){const e=t.isHorizontal()&&r?"marginLeft":i("marginRight");u.filter(((t,i)=>!n.cssMode||i!==u.length-1)).css({[e]:`${x}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let t=0;f.forEach((i=>{t+=i+(n.spaceBetween?n.spaceBetween:0)})),t-=n.spaceBetween;const i=t-a;d=d.map((t=>t<0?-g:t>i?i+_:t))}if(n.centerInsufficientSlides){let t=0;if(f.forEach((i=>{t+=i+(n.spaceBetween?n.spaceBetween:0)})),t-=n.spaceBetween,t<a){const i=(a-t)/2;d.forEach(((t,e)=>{d[e]=t-i})),h.forEach(((t,e)=>{h[e]=t+i}))}}if(Object.assign(t,{slides:u,snapGrid:d,slidesGrid:h,slidesSizesGrid:f}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Ni(t.wrapperEl,"--swiper-centered-offset-before",-d[0]+"px"),Ni(t.wrapperEl,"--swiper-centered-offset-after",t.size/2-f[f.length-1]/2+"px");const i=-t.snapGrid[0],e=-t.slidesGrid[0];t.snapGrid=t.snapGrid.map((t=>t+i)),t.slidesGrid=t.slidesGrid.map((t=>t+e))}if(p!==c&&t.emit("slidesLengthChange"),d.length!==m&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),h.length!==v&&t.emit("slidesGridLengthChange"),n.watchSlidesProgress&&t.updateSlidesOffset(),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const i=`${n.containerModifierClass}backface-hidden`,e=t.$el.hasClass(i);p<=n.maxBackfaceHiddenSlides?e||t.$el.addClass(i):e&&t.$el.removeClass(i)}},updateAutoHeight:function(t){const i=this,e=[],n=i.virtual&&i.params.virtual.enabled;let o,a=0;"number"==typeof t?i.setTransition(t):!0===t&&i.setTransition(i.params.speed);const r=t=>n?i.slides.filter((i=>parseInt(i.getAttribute("data-swiper-slide-index"),10)===t))[0]:i.slides.eq(t)[0];if("auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)(i.visibleSlides||Oi([])).each((t=>{e.push(t)}));else for(o=0;o<Math.ceil(i.params.slidesPerView);o+=1){const t=i.activeIndex+o;if(t>i.slides.length&&!n)break;e.push(r(t))}else e.push(r(i.activeIndex));for(o=0;o<e.length;o+=1)if(void 0!==e[o]){const t=e[o].offsetHeight;a=t>a?t:a}(a||0===a)&&i.$wrapperEl.css("height",`${a}px`)},updateSlidesOffset:function(){const t=this,i=t.slides;for(let e=0;e<i.length;e+=1)i[e].swiperSlideOffset=t.isHorizontal()?i[e].offsetLeft:i[e].offsetTop},updateSlidesProgress:function(t){void 0===t&&(t=this&&this.translate||0);const i=this,e=i.params,{slides:n,rtlTranslate:o,snapGrid:a}=i;if(0===n.length)return;void 0===n[0].swiperSlideOffset&&i.updateSlidesOffset();let r=-t;o&&(r=t),n.removeClass(e.slideVisibleClass),i.visibleSlidesIndexes=[],i.visibleSlides=[];for(let t=0;t<n.length;t+=1){const s=n[t];let l=s.swiperSlideOffset;e.cssMode&&e.centeredSlides&&(l-=n[0].swiperSlideOffset);const c=(r+(e.centeredSlides?i.minTranslate():0)-l)/(s.swiperSlideSize+e.spaceBetween),u=(r-a[0]+(e.centeredSlides?i.minTranslate():0)-l)/(s.swiperSlideSize+e.spaceBetween),p=-(r-l),d=p+i.slidesSizesGrid[t];(p>=0&&p<i.size-1||d>1&&d<=i.size||p<=0&&d>=i.size)&&(i.visibleSlides.push(s),i.visibleSlidesIndexes.push(t),n.eq(t).addClass(e.slideVisibleClass)),s.progress=o?-c:c,s.originalProgress=o?-u:u}i.visibleSlides=Oi(i.visibleSlides)},updateProgress:function(t){const i=this;if(void 0===t){const e=i.rtlTranslate?-1:1;t=i&&i.translate&&i.translate*e||0}const e=i.params,n=i.maxTranslate()-i.minTranslate();let{progress:o,isBeginning:a,isEnd:r}=i;const s=a,l=r;0===n?(o=0,a=!0,r=!0):(o=(t-i.minTranslate())/n,a=o<=0,r=o>=1),Object.assign(i,{progress:o,isBeginning:a,isEnd:r}),(e.watchSlidesProgress||e.centeredSlides&&e.autoHeight)&&i.updateSlidesProgress(t),a&&!s&&i.emit("reachBeginning toEdge"),r&&!l&&i.emit("reachEnd toEdge"),(s&&!a||l&&!r)&&i.emit("fromEdge"),i.emit("progress",o)},updateSlidesClasses:function(){const t=this,{slides:i,params:e,$wrapperEl:n,activeIndex:o,realIndex:a}=t,r=t.virtual&&e.virtual.enabled;let s;i.removeClass(`${e.slideActiveClass} ${e.slideNextClass} ${e.slidePrevClass} ${e.slideDuplicateActiveClass} ${e.slideDuplicateNextClass} ${e.slideDuplicatePrevClass}`),s=r?t.$wrapperEl.find(`.${e.slideClass}[data-swiper-slide-index="${o}"]`):i.eq(o),s.addClass(e.slideActiveClass),e.loop&&(s.hasClass(e.slideDuplicateClass)?n.children(`.${e.slideClass}:not(.${e.slideDuplicateClass})[data-swiper-slide-index="${a}"]`).addClass(e.slideDuplicateActiveClass):n.children(`.${e.slideClass}.${e.slideDuplicateClass}[data-swiper-slide-index="${a}"]`).addClass(e.slideDuplicateActiveClass));let l=s.nextAll(`.${e.slideClass}`).eq(0).addClass(e.slideNextClass);e.loop&&0===l.length&&(l=i.eq(0),l.addClass(e.slideNextClass));let c=s.prevAll(`.${e.slideClass}`).eq(0).addClass(e.slidePrevClass);e.loop&&0===c.length&&(c=i.eq(-1),c.addClass(e.slidePrevClass)),e.loop&&(l.hasClass(e.slideDuplicateClass)?n.children(`.${e.slideClass}:not(.${e.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(e.slideDuplicateNextClass):n.children(`.${e.slideClass}.${e.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(e.slideDuplicateNextClass),c.hasClass(e.slideDuplicateClass)?n.children(`.${e.slideClass}:not(.${e.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(e.slideDuplicatePrevClass):n.children(`.${e.slideClass}.${e.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(e.slideDuplicatePrevClass)),t.emitSlidesClasses()},updateActiveIndex:function(t){const i=this,e=i.rtlTranslate?i.translate:-i.translate,{slidesGrid:n,snapGrid:o,params:a,activeIndex:r,realIndex:s,snapIndex:l}=i;let c,u=t;if(void 0===u){for(let t=0;t<n.length;t+=1)void 0!==n[t+1]?e>=n[t]&&e<n[t+1]-(n[t+1]-n[t])/2?u=t:e>=n[t]&&e<n[t+1]&&(u=t+1):e>=n[t]&&(u=t);a.normalizeSlideIndex&&(u<0||void 0===u)&&(u=0)}if(o.indexOf(e)>=0)c=o.indexOf(e);else{const t=Math.min(a.slidesPerGroupSkip,u);c=t+Math.floor((u-t)/a.slidesPerGroup)}if(c>=o.length&&(c=o.length-1),u===r)return void(c!==l&&(i.snapIndex=c,i.emit("snapIndexChange")));const p=parseInt(i.slides.eq(u).attr("data-swiper-slide-index")||u,10);Object.assign(i,{snapIndex:c,realIndex:p,previousIndex:r,activeIndex:u}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),s!==p&&i.emit("realIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&i.emit("slideChange")},updateClickedSlide:function(t){const i=this,e=i.params,n=Oi(t).closest(`.${e.slideClass}`)[0];let o,a=!1;if(n)for(let t=0;t<i.slides.length;t+=1)if(i.slides[t]===n){a=!0,o=t;break}if(!n||!a)return i.clickedSlide=void 0,void(i.clickedIndex=void 0);i.clickedSlide=n,i.clickedIndex=i.virtual&&i.params.virtual.enabled?parseInt(Oi(n).attr("data-swiper-slide-index"),10):o,e.slideToClickedSlide&&void 0!==i.clickedIndex&&i.clickedIndex!==i.activeIndex&&i.slideToClickedSlide()}},translate:{getTranslate:function(t){void 0===t&&(t=this.isHorizontal()?"x":"y");const{params:i,rtlTranslate:e,translate:n,$wrapperEl:o}=this;if(i.virtualTranslate)return e?-n:n;if(i.cssMode)return n;let a=function(t,i){void 0===i&&(i="x");const e=Ai();let n,o,a;const r=function(t){const i=Ai();let e;return i.getComputedStyle&&(e=i.getComputedStyle(t,null)),!e&&t.currentStyle&&(e=t.currentStyle),e||(e=t.style),e}(t);return e.WebKitCSSMatrix?(o=r.transform||r.webkitTransform,o.split(",").length>6&&(o=o.split(", ").map((t=>t.replace(",","."))).join(", ")),a=new e.WebKitCSSMatrix("none"===o?"":o)):(a=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=a.toString().split(",")),"x"===i&&(o=e.WebKitCSSMatrix?a.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===i&&(o=e.WebKitCSSMatrix?a.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),o||0}(o[0],t);return e&&(a=-a),a||0},setTranslate:function(t,i){const e=this,{rtlTranslate:n,params:o,$wrapperEl:a,wrapperEl:r,progress:s}=e;let l,c=0,u=0;e.isHorizontal()?c=n?-t:t:u=t,o.roundLengths&&(c=Math.floor(c),u=Math.floor(u)),o.cssMode?r[e.isHorizontal()?"scrollLeft":"scrollTop"]=e.isHorizontal()?-c:-u:o.virtualTranslate||a.transform(`translate3d(${c}px, ${u}px, 0px)`),e.previousTranslate=e.translate,e.translate=e.isHorizontal()?c:u;const p=e.maxTranslate()-e.minTranslate();l=0===p?0:(t-e.minTranslate())/p,l!==s&&e.updateProgress(t),e.emit("setTranslate",e.translate,i)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(t,i,e,n,o){void 0===t&&(t=0),void 0===i&&(i=this.params.speed),void 0===e&&(e=!0),void 0===n&&(n=!0);const a=this,{params:r,wrapperEl:s}=a;if(a.animating&&r.preventInteractionOnTransition)return!1;const l=a.minTranslate(),c=a.maxTranslate();let u;if(u=n&&t>l?l:n&&t<c?c:t,a.updateProgress(u),r.cssMode){const t=a.isHorizontal();if(0===i)s[t?"scrollLeft":"scrollTop"]=-u;else{if(!a.support.smoothScroll)return Bi({swiper:a,targetPosition:-u,side:t?"left":"top"}),!0;s.scrollTo({[t?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===i?(a.setTransition(0),a.setTranslate(u),e&&(a.emit("beforeTransitionStart",i,o),a.emit("transitionEnd"))):(a.setTransition(i),a.setTranslate(u),e&&(a.emit("beforeTransitionStart",i,o),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(t){a&&!a.destroyed&&t.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,e&&a.emit("transitionEnd"))}),a.$wrapperEl[0].addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(t,i){const e=this;e.params.cssMode||e.$wrapperEl.transition(t),e.emit("setTransition",t,i)},transitionStart:function(t,i){void 0===t&&(t=!0);const e=this,{params:n}=e;n.cssMode||(n.autoHeight&&e.updateAutoHeight(),Wi({swiper:e,runCallbacks:t,direction:i,step:"Start"}))},transitionEnd:function(t,i){void 0===t&&(t=!0);const e=this,{params:n}=e;e.animating=!1,n.cssMode||(e.setTransition(0),Wi({swiper:e,runCallbacks:t,direction:i,step:"End"}))}},slide:{slideTo:function(t,i,e,n,o){if(void 0===t&&(t=0),void 0===i&&(i=this.params.speed),void 0===e&&(e=!0),"number"!=typeof t&&"string"!=typeof t)throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof t}] given.`);if("string"==typeof t){const i=parseInt(t,10);if(!isFinite(i))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);t=i}const a=this;let r=t;r<0&&(r=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:p,rtlTranslate:d,wrapperEl:h,enabled:f}=a;if(a.animating&&s.preventInteractionOnTransition||!f&&!n&&!o)return!1;const g=Math.min(a.params.slidesPerGroupSkip,r);let _=g+Math.floor((r-g)/a.params.slidesPerGroup);_>=l.length&&(_=l.length-1),(p||s.initialSlide||0)===(u||0)&&e&&a.emit("beforeSlideChangeStart");const m=-l[_];if(a.updateProgress(m),s.normalizeSlideIndex)for(let t=0;t<c.length;t+=1){const i=-Math.floor(100*m),e=Math.floor(100*c[t]),n=Math.floor(100*c[t+1]);void 0!==c[t+1]?i>=e&&i<n-(n-e)/2?r=t:i>=e&&i<n&&(r=t+1):i>=e&&(r=t)}if(a.initialized&&r!==p){if(!a.allowSlideNext&&m<a.translate&&m<a.minTranslate())return!1;if(!a.allowSlidePrev&&m>a.translate&&m>a.maxTranslate()&&(p||0)!==r)return!1}let v;if(v=r>p?"next":r<p?"prev":"reset",d&&-m===a.translate||!d&&m===a.translate)return a.updateActiveIndex(r),s.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==s.effect&&a.setTranslate(m),"reset"!==v&&(a.transitionStart(e,v),a.transitionEnd(e,v)),!1;if(s.cssMode){const t=a.isHorizontal(),e=d?m:-m;if(0===i){const i=a.virtual&&a.params.virtual.enabled;i&&(a.wrapperEl.style.scrollSnapType="none",a._immediateVirtual=!0),h[t?"scrollLeft":"scrollTop"]=e,i&&requestAnimationFrame((()=>{a.wrapperEl.style.scrollSnapType="",a._swiperImmediateVirtual=!1}))}else{if(!a.support.smoothScroll)return Bi({swiper:a,targetPosition:e,side:t?"left":"top"}),!0;h.scrollTo({[t?"left":"top"]:e,behavior:"smooth"})}return!0}return a.setTransition(i),a.setTranslate(m),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",i,n),a.transitionStart(e,v),0===i?a.transitionEnd(e,v):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(t){a&&!a.destroyed&&t.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(e,v))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(t,i,e,n){if(void 0===t&&(t=0),void 0===i&&(i=this.params.speed),void 0===e&&(e=!0),"string"==typeof t){const i=parseInt(t,10);if(!isFinite(i))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);t=i}const o=this;let a=t;return o.params.loop&&(a+=o.loopedSlides),o.slideTo(a,i,e,n)},slideNext:function(t,i,e){void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);const n=this,{animating:o,enabled:a,params:r}=n;if(!a)return n;let s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex<r.slidesPerGroupSkip?1:s;if(r.loop){if(o&&r.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}return n.slideTo(r.rewind&&n.isEnd?0:n.activeIndex+l,t,i,e)},slidePrev:function(t,i,e){void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);const n=this,{params:o,animating:a,snapGrid:r,slidesGrid:s,rtlTranslate:l,enabled:c}=n;if(!c)return n;if(o.loop){if(a&&o.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}function u(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}const p=u(l?n.translate:-n.translate),d=r.map((t=>u(t)));let h=r[d.indexOf(p)-1];if(void 0===h&&o.cssMode){let t;r.forEach(((i,e)=>{p>=i&&(t=e)})),void 0!==t&&(h=r[t>0?t-1:t])}let f=0;return void 0!==h&&(f=s.indexOf(h),f<0&&(f=n.activeIndex-1),"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(f=f-n.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),n.slideTo(o.rewind&&n.isBeginning?n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1:f,t,i,e)},slideReset:function(t,i,e){return void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),this.slideTo(this.activeIndex,t,i,e)},slideToClosest:function(t,i,e,n){void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===n&&(n=.5);const o=this;let a=o.activeIndex;const r=Math.min(o.params.slidesPerGroupSkip,a),s=r+Math.floor((a-r)/o.params.slidesPerGroup),l=o.rtlTranslate?o.translate:-o.translate;if(l>=o.snapGrid[s]){const t=o.snapGrid[s];l-t>(o.snapGrid[s+1]-t)*n&&(a+=o.params.slidesPerGroup)}else{const t=o.snapGrid[s-1];l-t<=(o.snapGrid[s]-t)*n&&(a-=o.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,o.slidesGrid.length-1),o.slideTo(a,t,i,e)},slideToClickedSlide:function(){const t=this,{params:i,$wrapperEl:e}=t,n="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView;let o,a=t.clickedIndex;if(i.loop){if(t.animating)return;o=parseInt(Oi(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?a<t.loopedSlides-n/2||a>t.slides.length-t.loopedSlides+n/2?(t.loopFix(),a=e.children(`.${i.slideClass}[data-swiper-slide-index="${o}"]:not(.${i.slideDuplicateClass})`).eq(0).index(),Li((()=>{t.slideTo(a)}))):t.slideTo(a):a>t.slides.length-n?(t.loopFix(),a=e.children(`.${i.slideClass}[data-swiper-slide-index="${o}"]:not(.${i.slideDuplicateClass})`).eq(0).index(),Li((()=>{t.slideTo(a)}))):t.slideTo(a)}else t.slideTo(a)}},loop:{loopCreate:function(){const t=this,i=Ii(),{params:e,$wrapperEl:n}=t,o=n.children().length>0?Oi(n.children()[0].parentNode):n;o.children(`.${e.slideClass}.${e.slideDuplicateClass}`).remove();let a=o.children(`.${e.slideClass}`);if(e.loopFillGroupWithBlank){const t=e.slidesPerGroup-a.length%e.slidesPerGroup;if(t!==e.slidesPerGroup){for(let n=0;n<t;n+=1){const t=Oi(i.createElement("div")).addClass(`${e.slideClass} ${e.slideBlankClass}`);o.append(t)}a=o.children(`.${e.slideClass}`)}}"auto"!==e.slidesPerView||e.loopedSlides||(e.loopedSlides=a.length),t.loopedSlides=Math.ceil(parseFloat(e.loopedSlides||e.slidesPerView,10)),t.loopedSlides+=e.loopAdditionalSlides,t.loopedSlides>a.length&&t.params.loopedSlidesLimit&&(t.loopedSlides=a.length);const r=[],s=[];a.each(((t,i)=>{Oi(t).attr("data-swiper-slide-index",i)}));for(let i=0;i<t.loopedSlides;i+=1){const t=i-Math.floor(i/a.length)*a.length;s.push(a.eq(t)[0]),r.unshift(a.eq(a.length-t-1)[0])}for(let t=0;t<s.length;t+=1)o.append(Oi(s[t].cloneNode(!0)).addClass(e.slideDuplicateClass));for(let t=r.length-1;t>=0;t-=1)o.prepend(Oi(r[t].cloneNode(!0)).addClass(e.slideDuplicateClass))},loopFix:function(){const t=this;t.emit("beforeLoopFix");const{activeIndex:i,slides:e,loopedSlides:n,allowSlidePrev:o,allowSlideNext:a,snapGrid:r,rtlTranslate:s}=t;let l;t.allowSlidePrev=!0,t.allowSlideNext=!0;const c=-r[i]-t.getTranslate();i<n?(l=e.length-3*n+i,l+=n,t.slideTo(l,0,!1,!0)&&0!==c&&t.setTranslate((s?-t.translate:t.translate)-c)):i>=e.length-n&&(l=-e.length+i+n,l+=n,t.slideTo(l,0,!1,!0)&&0!==c&&t.setTranslate((s?-t.translate:t.translate)-c)),t.allowSlidePrev=o,t.allowSlideNext=a,t.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:t,params:i,slides:e}=this;t.children(`.${i.slideClass}.${i.slideDuplicateClass},.${i.slideClass}.${i.slideBlankClass}`).remove(),e.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(t){const i=this;if(i.support.touch||!i.params.simulateTouch||i.params.watchOverflow&&i.isLocked||i.params.cssMode)return;const e="container"===i.params.touchEventsTarget?i.el:i.wrapperEl;e.style.cursor="move",e.style.cursor=t?"grabbing":"grab"},unsetGrabCursor:function(){const t=this;t.support.touch||t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t["container"===t.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const t=this,i=Ii(),{params:e,support:n}=t;t.onTouchStart=Yi.bind(t),t.onTouchMove=qi.bind(t),t.onTouchEnd=$i.bind(t),e.cssMode&&(t.onScroll=Ki.bind(t)),t.onClick=Xi.bind(t),n.touch&&!Qi&&(i.addEventListener("touchstart",Ji),Qi=!0),te(t,"on")},detachEvents:function(){te(this,"off")}},breakpoints:{setBreakpoint:function(){const t=this,{activeIndex:i,initialized:e,loopedSlides:n=0,params:o,$el:a}=t,r=o.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const s=t.getBreakpoint(r,t.params.breakpointsBase,t.el);if(!s||t.currentBreakpoint===s)return;const l=(s in r?r[s]:void 0)||t.originalParams,c=ie(t,o),u=ie(t,l),p=o.enabled;c&&!u?(a.removeClass(`${o.containerModifierClass}grid ${o.containerModifierClass}grid-column`),t.emitContainerClasses()):!c&&u&&(a.addClass(`${o.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===o.grid.fill)&&a.addClass(`${o.containerModifierClass}grid-column`),t.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((i=>{const e=o[i]&&o[i].enabled,n=l[i]&&l[i].enabled;e&&!n&&t[i].disable(),!e&&n&&t[i].enable()}));const d=l.direction&&l.direction!==o.direction,h=o.loop&&(l.slidesPerView!==o.slidesPerView||d);d&&e&&t.changeDirection(),zi(t.params,l);const f=t.params.enabled;Object.assign(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),p&&!f?t.disable():!p&&f&&t.enable(),t.currentBreakpoint=s,t.emit("_beforeBreakpoint",l),h&&e&&(t.loopDestroy(),t.loopCreate(),t.updateSlides(),t.slideTo(i-n+t.loopedSlides,0,!1)),t.emit("breakpoint",l)},getBreakpoint:function(t,i,e){if(void 0===i&&(i="window"),!t||"container"===i&&!e)return;let n=!1;const o=Ai(),a="window"===i?o.innerHeight:e.clientHeight,r=Object.keys(t).map((t=>{if("string"==typeof t&&0===t.indexOf("@")){const i=parseFloat(t.substr(1));return{value:a*i,point:t}}return{value:t,point:t}}));r.sort(((t,i)=>parseInt(t.value,10)-parseInt(i.value,10)));for(let t=0;t<r.length;t+=1){const{point:a,value:s}=r[t];"window"===i?o.matchMedia(`(min-width: ${s}px)`).matches&&(n=a):s<=e.clientWidth&&(n=a)}return n||"max"}},checkOverflow:{checkOverflow:function(){const t=this,{isLocked:i,params:e}=t,{slidesOffsetBefore:n}=e;if(n){const i=t.slides.length-1;t.isLocked=t.size>t.slidesGrid[i]+t.slidesSizesGrid[i]+2*n}else t.isLocked=1===t.snapGrid.length;!0===e.allowSlideNext&&(t.allowSlideNext=!t.isLocked),!0===e.allowSlidePrev&&(t.allowSlidePrev=!t.isLocked),i&&i!==t.isLocked&&(t.isEnd=!1),i!==t.isLocked&&t.emit(t.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const t=this,{classNames:i,params:e,rtl:n,$el:o,device:a,support:r}=t,s=function(t,i){const e=[];return t.forEach((t=>{"object"==typeof t?Object.keys(t).forEach((n=>{t[n]&&e.push(i+n)})):"string"==typeof t&&e.push(i+t)})),e}(["initialized",e.direction,{"pointer-events":!r.touch},{"free-mode":t.params.freeMode&&e.freeMode.enabled},{autoheight:e.autoHeight},{rtl:n},{grid:e.grid&&e.grid.rows>1},{"grid-column":e.grid&&e.grid.rows>1&&"column"===e.grid.fill},{android:a.android},{ios:a.ios},{"css-mode":e.cssMode},{centered:e.cssMode&&e.centeredSlides},{"watch-progress":e.watchSlidesProgress}],e.containerModifierClass);i.push(...s),o.addClass([...i].join(" ")),t.emitContainerClasses()},removeClasses:function(){const{$el:t,classNames:i}=this;t.removeClass(i.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(t,i,e,n,o,a){const r=Ai();let s;function l(){a&&a()}Oi(t).parent("picture")[0]||t.complete&&o?l():i?(s=new r.Image,s.onload=l,s.onerror=l,n&&(s.sizes=n),e&&(s.srcset=e),i&&(s.src=i)):l()},preloadImages:function(){const t=this;function i(){null!=t&&t&&!t.destroyed&&(void 0!==t.imagesLoaded&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}t.imagesToLoad=t.$el.find("img");for(let e=0;e<t.imagesToLoad.length;e+=1){const n=t.imagesToLoad[e];t.loadImage(n,n.currentSrc||n.getAttribute("src"),n.srcset||n.getAttribute("srcset"),n.sizes||n.getAttribute("sizes"),!0,i)}}}},ae={};class re{constructor(){let t,i;for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(1===n.length&&n[0].constructor&&"Object"===Object.prototype.toString.call(n[0]).slice(8,-1)?i=n[0]:[t,i]=n,i||(i={}),i=zi({},i),t&&!i.el&&(i.el=t),i.el&&Oi(i.el).length>1){const t=[];return Oi(i.el).each((e=>{const n=zi({},i,{el:e});t.push(new re(n))})),t}const a=this;var r;a.__swiper__=!0,a.support=Hi(),a.device=(void 0===(r={userAgent:i.userAgent})&&(r={}),Ui||(Ui=function(t){let{userAgent:i}=void 0===t?{}:t;const e=Hi(),n=Ai(),o=n.navigator.platform,a=i||n.navigator.userAgent,r={ios:!1,android:!1},s=n.screen.width,l=n.screen.height,c=a.match(/(Android);?[\s\/]+([\d.]+)?/);let u=a.match(/(iPad).*OS\s([\d_]+)/);const p=a.match(/(iPod)(.*OS\s([\d_]+))?/),d=!u&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===o;let f="MacIntel"===o;return!u&&f&&e.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(u=a.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),f=!1),c&&!h&&(r.os="android",r.android=!0),(u||d||p)&&(r.os="ios",r.ios=!0),r}(r)),Ui),a.browser=(ji||(ji=function(){const t=Ai();return{isSafari:function(){const i=t.navigator.userAgent.toLowerCase();return i.indexOf("safari")>=0&&i.indexOf("chrome")<0&&i.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),ji),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],i.modules&&Array.isArray(i.modules)&&a.modules.push(...i.modules);const s={};a.modules.forEach((t=>{t({swiper:a,extendParams:ne(i,s),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})}));const l=zi({},ee,s);return a.params=zi({},l,ae,i),a.originalParams=zi({},a.params),a.passedParams=zi({},i),a.params&&a.params.on&&Object.keys(a.params.on).forEach((t=>{a.on(t,a.params.on[t])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),a.$=Oi,Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:Oi(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===a.params.direction,isVertical:()=>"vertical"===a.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEvents:function(){const t=["touchstart","touchmove","touchend","touchcancel"],i=["pointerdown","pointermove","pointerup"];return a.touchEventsTouch={start:t[0],move:t[1],end:t[2],cancel:t[3]},a.touchEventsDesktop={start:i[0],move:i[1],end:i[2]},a.support.touch||!a.params.simulateTouch?a.touchEventsTouch:a.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:Ci(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,i){const e=this;t=Math.min(Math.max(t,0),1);const n=e.minTranslate(),o=e.maxTranslate();e.translateTo((o-n)*t+n,void 0===i?0:i),e.updateActiveIndex(),e.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const i=t.el.className.split(" ").filter((i=>0===i.indexOf("swiper")||0===i.indexOf(t.params.containerModifierClass)));t.emit("_containerClasses",i.join(" "))}getSlideClasses(t){const i=this;return i.destroyed?"":t.className.split(" ").filter((t=>0===t.indexOf("swiper-slide")||0===t.indexOf(i.params.slideClass))).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const i=[];t.slides.each((e=>{const n=t.getSlideClasses(e);i.push({slideEl:e,classNames:n}),t.emit("_slideClass",e,n)})),t.emit("_slideClasses",i)}slidesPerViewDynamic(t,i){void 0===t&&(t="current"),void 0===i&&(i=!1);const{params:e,slides:n,slidesGrid:o,slidesSizesGrid:a,size:r,activeIndex:s}=this;let l=1;if(e.centeredSlides){let t,i=n[s].swiperSlideSize;for(let e=s+1;e<n.length;e+=1)n[e]&&!t&&(i+=n[e].swiperSlideSize,l+=1,i>r&&(t=!0));for(let e=s-1;e>=0;e-=1)n[e]&&!t&&(i+=n[e].swiperSlideSize,l+=1,i>r&&(t=!0))}else if("current"===t)for(let t=s+1;t<n.length;t+=1)(i?o[t]+a[t]-o[s]<r:o[t]-o[s]<r)&&(l+=1);else for(let t=s-1;t>=0;t-=1)o[s]-o[t]<r&&(l+=1);return l}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:i,params:e}=t;function n(){const i=Math.min(Math.max(t.rtlTranslate?-1*t.translate:t.translate,t.maxTranslate()),t.minTranslate());t.setTranslate(i),t.updateActiveIndex(),t.updateSlidesClasses()}let o;e.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.params.freeMode&&t.params.freeMode.enabled?(n(),t.params.autoHeight&&t.updateAutoHeight()):(o=t.slideTo(("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slides.length-1:t.activeIndex,0,!1,!0),o||n()),e.watchOverflow&&i!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,i){void 0===i&&(i=!0);const e=this,n=e.params.direction;return t||(t="horizontal"===n?"vertical":"horizontal"),t===n||"horizontal"!==t&&"vertical"!==t||(e.$el.removeClass(`${e.params.containerModifierClass}${n}`).addClass(`${e.params.containerModifierClass}${t}`),e.emitContainerClasses(),e.params.direction=t,e.slides.each((i=>{"vertical"===t?i.style.width="":i.style.height=""})),e.emit("changeDirection"),i&&e.update()),e}changeLanguageDirection(t){const i=this;i.rtl&&"rtl"===t||!i.rtl&&"ltr"===t||(i.rtl="rtl"===t,i.rtlTranslate="horizontal"===i.params.direction&&i.rtl,i.rtl?(i.$el.addClass(`${i.params.containerModifierClass}rtl`),i.el.dir="rtl"):(i.$el.removeClass(`${i.params.containerModifierClass}rtl`),i.el.dir="ltr"),i.update())}mount(t){const i=this;if(i.mounted)return!0;const e=Oi(t||i.params.el);if(!(t=e[0]))return!1;t.swiper=i;const n=()=>`.${(i.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=(()=>{if(t&&t.shadowRoot&&t.shadowRoot.querySelector){const i=Oi(t.shadowRoot.querySelector(n()));return i.children=t=>e.children(t),i}return e.children?e.children(n()):Oi(e).children(n())})();if(0===o.length&&i.params.createElements){const t=Ii().createElement("div");o=Oi(t),t.className=i.params.wrapperClass,e.append(t),e.children(`.${i.params.slideClass}`).each((t=>{o.append(t)}))}return Object.assign(i,{$el:e,el:t,$wrapperEl:o,wrapperEl:o[0],mounted:!0,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===e.css("direction"),rtlTranslate:"horizontal"===i.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===e.css("direction")),wrongRTL:"-webkit-box"===o.css("display")}),!0}init(t){const i=this;return i.initialized||!1===i.mount(t)||(i.emit("beforeInit"),i.params.breakpoints&&i.setBreakpoint(),i.addClasses(),i.params.loop&&i.loopCreate(),i.updateSize(),i.updateSlides(),i.params.watchOverflow&&i.checkOverflow(),i.params.grabCursor&&i.enabled&&i.setGrabCursor(),i.params.preloadImages&&i.preloadImages(),i.slideTo(i.params.loop?i.params.initialSlide+i.loopedSlides:i.params.initialSlide,0,i.params.runCallbacksOnInit,!1,!0),i.attachEvents(),i.initialized=!0,i.emit("init"),i.emit("afterInit")),i}destroy(t,i){void 0===t&&(t=!0),void 0===i&&(i=!0);const e=this,{params:n,$el:o,$wrapperEl:a,slides:r}=e;return void 0===e.params||e.destroyed||(e.emit("beforeDestroy"),e.initialized=!1,e.detachEvents(),n.loop&&e.loopDestroy(),i&&(e.removeClasses(),o.removeAttr("style"),a.removeAttr("style"),r&&r.length&&r.removeClass([n.slideVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),e.emit("destroy"),Object.keys(e.eventsListeners).forEach((t=>{e.off(t)})),!1!==t&&(e.$el[0].swiper=null,function(t){const i=t;Object.keys(i).forEach((t=>{try{i[t]=null}catch(t){}try{delete i[t]}catch(t){}}))}(e)),e.destroyed=!0),null}static extendDefaults(t){zi(ae,t)}static get extendedDefaults(){return ae}static get defaults(){return ee}static installModule(t){re.prototype.__modules__||(re.prototype.__modules__=[]);const i=re.prototype.__modules__;"function"==typeof t&&i.indexOf(t)<0&&i.push(t)}static use(t){return Array.isArray(t)?(t.forEach((t=>re.installModule(t))),re):(re.installModule(t),re)}}Object.keys(oe).forEach((t=>{Object.keys(oe[t]).forEach((i=>{re.prototype[i]=oe[t][i]}))})),re.use([function(t){let{swiper:i,on:e,emit:n}=t;const o=Ai();let a=null,r=null;const s=()=>{i&&!i.destroyed&&i.initialized&&(n("beforeResize"),n("resize"))},l=()=>{i&&!i.destroyed&&i.initialized&&n("orientationchange")};e("init",(()=>{i.params.resizeObserver&&void 0!==o.ResizeObserver?i&&!i.destroyed&&i.initialized&&(a=new ResizeObserver((t=>{r=o.requestAnimationFrame((()=>{const{width:e,height:n}=i;let o=e,a=n;t.forEach((t=>{let{contentBoxSize:e,contentRect:n,target:r}=t;r&&r!==i.el||(o=n?n.width:(e[0]||e).inlineSize,a=n?n.height:(e[0]||e).blockSize)})),o===e&&a===n||s()}))})),a.observe(i.el)):(o.addEventListener("resize",s),o.addEventListener("orientationchange",l))})),e("destroy",(()=>{r&&o.cancelAnimationFrame(r),a&&a.unobserve&&i.el&&(a.unobserve(i.el),a=null),o.removeEventListener("resize",s),o.removeEventListener("orientationchange",l)}))},function(t){let{swiper:i,extendParams:e,on:n,emit:o}=t;const a=[],r=Ai(),s=function(t,i){void 0===i&&(i={});const e=new(r.MutationObserver||r.WebkitMutationObserver)((t=>{if(1===t.length)return void o("observerUpdate",t[0]);const i=function(){o("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(i):r.setTimeout(i,0)}));e.observe(t,{attributes:void 0===i.attributes||i.attributes,childList:void 0===i.childList||i.childList,characterData:void 0===i.characterData||i.characterData}),a.push(e)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",(()=>{if(i.params.observer){if(i.params.observeParents){const t=i.$el.parents();for(let i=0;i<t.length;i+=1)s(t[i])}s(i.$el[0],{childList:i.params.observeSlideChildren}),s(i.$wrapperEl[0],{attributes:!1})}})),n("destroy",(()=>{a.forEach((t=>{t.disconnect()})),a.splice(0,a.length)}))}]);const se=class{constructor(i){t(this,i),this.loop=!1,this.speed=300,this.itemPerView="auto",this.spaceBetweenItems=8,this.currentIndex=void 0,this.isLastSlideItem=!1,this.isFirstSlideItem=!0}componentDidLoad(){this.initSwiper()}initSwiper(){for(const t of this.swiperWrapper.children)t.classList.add("swiper-slide");this.swiper=new re(this.swiperContainer,{loop:this.loop,speed:this.speed,slidesPerView:this.itemPerView,spaceBetween:this.spaceBetweenItems})}update(){this.swiper.update()}render(){var t,e;return i("div",{class:"s-swiper"},i("div",{class:"s-swiper-button-prev"},i("salla-button",{disabled:null===(t=this.swiper)||void 0===t?void 0:t.isBeginning,shape:"icon",color:"light",onClick:()=>this.swiper.slidePrev()},i("span",{class:"s-swiper-button-icon",innerHTML:qt}))),i("div",{class:"s-swiper-button-next"},i("salla-button",{disabled:null===(e=this.swiper)||void 0===e?void 0:e.isEnd,shape:"icon",color:"light",onClick:()=>this.swiper.slideNext()},i("span",{class:"s-swiper-button-icon",innerHTML:Yt}))),i("div",{class:"swiper"},i("div",{class:"swiper-container s-swiper-container",ref:t=>this.swiperContainer=t},i("div",{class:"swiper-wrapper s-swiper-wrapper",ref:t=>this.swiperWrapper=t},i("slot",null)))))}};se.style='@font-face{font-family:"swiper-icons";src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-pointer-events{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-pointer-events.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:"";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}.s-swiper{position:relative}';const le=class{constructor(i){t(this,i),this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}render(){return i("div",{class:{"s-tabs-content":!0,"s-tabs-content-selected":this.isSelected}},i("slot",null))}};le.style="";const ce=class{constructor(i){t(this,i),this.tabSelected=o(this,"tabSelected",7),this.id=Math.random().toString(36).slice(2,10),this.activeClass=void 0,this.height=void 0,this.centered=!1,this.isSelected=!1}async getChild(){return{selected:this.selected.bind(this),unselect:this.unselect.bind(this),name:this.name,id:this.id}}unselect(){this.isSelected=!1}selected(){this.isSelected=!0}onClick(){this.getChild().then((t=>{this.tabSelected.emit(t)}))}render(){return[i("div",{class:{"s-tabs-header-item":!0,"s-tabs-bg-normal":!0,"s-tabs-active":this.isSelected},onClick:this.onClick.bind(this)},i("slot",null))]}};ce.style="";const ue=class{constructor(i){t(this,i),this.backgroundColor=void 0,this.vertical=!1}componentWillLoad(){this.createGroup().then((()=>{const[t]=this.tabGroup;this.selectGroup(t)}))}onSelectedTab(t){const i=this.tabGroup.find((i=>i.header.id===t.detail.id));this.selectGroup(i)}async createGroup(){const t=Array.from(this.host.querySelectorAll("salla-tab-header"));this.tabsHeader=await Promise.all(t.map((t=>t.getChild())));const i=Array.from(this.host.querySelectorAll("salla-tab-content"));this.tabsContent=await Promise.all(i.map((t=>t.getChild()))),this.tabGroup=this.tabsHeader.map((t=>{const i=this.tabsContent.find((i=>i.name===t.name));return{header:t,content:i}}))}selectGroup(t){this.tabGroup.map((t=>{t.header.unselect(),t.content.unselect()})),t.header.selected(),t.content.selected()}render(){return[i("div",{class:"s-tabs"},i("div",{class:"s-tabs-header"},i("slot",{name:"header"})),i("div",{class:"s-tabs-content-wrapper"},i("slot",{name:"content"})))]}get host(){return n(this)}};ue.style=".s-tabs-header{-ms-overflow-style:none;scrollbar-width:none;}.s-tabs-header::-webkit-scrollbar{display:none}";var pe=a((function(t){var i;i=function(t){return function(){for(var i=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["North Macedonia (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1,["5288","5289"]],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],e=0;e<i.length;e++){var n=i[e];i[e]={name:n[0],iso2:n[1],dialCode:n[2],priority:n[3]||0,areaCodes:n[4]||null}}function o(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a={getInstance:function(t){var i=t.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[i]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=a);var r=0,s={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},l=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],c=function(t,i){for(var e=Object.keys(t),n=0;n<e.length;n++)i(e[n],t[e[n]])},u=function(t){c(window.intlTelInputGlobals.instances,(function(i){window.intlTelInputGlobals.instances[i][t]()}))},p=function(){function e(t,i){var n=this;!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=r++,this.telInput=t,this.activeItem=null,this.highlightedItem=null;var o=i||{};this.options={},c(s,(function(t,i){n.options[t]=o.hasOwnProperty(t)?o[t]:i})),this.hadInitialPlaceholder=Boolean(t.getAttribute("placeholder"))}var n,a;return n=e,(a=[{key:"_init",value:function(){var t=this;if(this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(document.body.classList.add("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer=document.body)),"undefined"!=typeof Promise){var i=new Promise((function(i,e){t.resolveAutoCountryPromise=i,t.rejectAutoCountryPromise=e})),e=new Promise((function(i,e){t.resolveUtilsScriptPromise=i,t.rejectUtilsScriptPromise=e}));this.promise=Promise.all([i,e])}else this.resolveAutoCountryPromise=this.rejectAutoCountryPromise=function(){},this.resolveUtilsScriptPromise=this.rejectUtilsScriptPromise=function(){};this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}},{key:"_processCountryData",value:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries(),this.options.localizedCountries&&this._translateCountriesByLocale(),(this.options.onlyCountries.length||this.options.localizedCountries)&&this.countries.sort(this._countryNameSort)}},{key:"_addCountryCode",value:function(i,e,n){e.length>this.countryCodeMaxLen&&(this.countryCodeMaxLen=e.length),this.countryCodes.hasOwnProperty(e)||(this.countryCodes[e]=[]);for(var o=0;o<this.countryCodes[e].length;o++)if(this.countryCodes[e][o]===i)return;this.countryCodes[e][n!==t?n:this.countryCodes[e].length]=i}},{key:"_processAllCountries",value:function(){if(this.options.onlyCountries.length){var t=this.options.onlyCountries.map((function(t){return t.toLowerCase()}));this.countries=i.filter((function(i){return t.indexOf(i.iso2)>-1}))}else if(this.options.excludeCountries.length){var e=this.options.excludeCountries.map((function(t){return t.toLowerCase()}));this.countries=i.filter((function(t){return-1===e.indexOf(t.iso2)}))}else this.countries=i}},{key:"_translateCountriesByLocale",value:function(){for(var t=0;t<this.countries.length;t++){var i=this.countries[t].iso2.toLowerCase();this.options.localizedCountries.hasOwnProperty(i)&&(this.countries[t].name=this.options.localizedCountries[i])}}},{key:"_countryNameSort",value:function(t,i){return t.name.localeCompare(i.name)}},{key:"_processCountryCodes",value:function(){this.countryCodeMaxLen=0,this.dialCodes={},this.countryCodes={};for(var t=0;t<this.countries.length;t++){var i=this.countries[t];this.dialCodes[i.dialCode]||(this.dialCodes[i.dialCode]=!0),this._addCountryCode(i.iso2,i.dialCode,i.priority)}for(var e=0;e<this.countries.length;e++){var n=this.countries[e];if(n.areaCodes)for(var o=this.countryCodes[n.dialCode][0],a=0;a<n.areaCodes.length;a++){for(var r=n.areaCodes[a],s=1;s<r.length;s++){var l=n.dialCode+r.substr(0,s);this._addCountryCode(o,l),this._addCountryCode(n.iso2,l)}this._addCountryCode(n.iso2,n.dialCode+r)}}}},{key:"_processPreferredCountries",value:function(){this.preferredCountries=[];for(var t=0;t<this.options.preferredCountries.length;t++){var i=this.options.preferredCountries[t].toLowerCase(),e=this._getCountryData(i,!1,!0);e&&this.preferredCountries.push(e)}}},{key:"_createEl",value:function(t,i,e){var n=document.createElement(t);return i&&c(i,(function(t,i){return n.setAttribute(t,i)})),e&&e.appendChild(n),n}},{key:"_generateMarkup",value:function(){this.telInput.hasAttribute("autocomplete")||this.telInput.form&&this.telInput.form.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off");var t="iti";this.options.allowDropdown&&(t+=" iti--allow-dropdown"),this.options.separateDialCode&&(t+=" iti--separate-dial-code"),this.options.customContainer&&(t+=" ",t+=this.options.customContainer);var i=this._createEl("div",{class:t});if(this.telInput.parentNode.insertBefore(i,this.telInput),this.flagsContainer=this._createEl("div",{class:"iti__flag-container"},i),i.appendChild(this.telInput),this.selectedFlag=this._createEl("div",{class:"iti__selected-flag",role:"combobox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-owns":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false"},this.flagsContainer),this.selectedFlagInner=this._createEl("div",{class:"iti__flag"},this.selectedFlag),this.options.separateDialCode&&(this.selectedDialCode=this._createEl("div",{class:"iti__selected-dial-code"},this.selectedFlag)),this.options.allowDropdown&&(this.selectedFlag.setAttribute("tabindex","0"),this.dropdownArrow=this._createEl("div",{class:"iti__arrow"},this.selectedFlag),this.countryList=this._createEl("ul",{class:"iti__country-list iti__hide",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":"List of countries"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"iti__preferred",!0),this._createEl("li",{class:"iti__divider",role:"separator","aria-disabled":"true"},this.countryList)),this._appendListItems(this.countries,"iti__standard"),this.options.dropdownContainer?(this.dropdown=this._createEl("div",{class:"iti iti--container"}),this.dropdown.appendChild(this.countryList)):this.flagsContainer.appendChild(this.countryList)),this.options.hiddenInput){var e=this.options.hiddenInput,n=this.telInput.getAttribute("name");if(n){var o=n.lastIndexOf("[");-1!==o&&(e="".concat(n.substr(0,o),"[").concat(e,"]"))}this.hiddenInput=this._createEl("input",{type:"hidden",name:e}),i.appendChild(this.hiddenInput)}}},{key:"_appendListItems",value:function(t,i,e){for(var n="",o=0;o<t.length;o++){var a=t[o],r=e?"-preferred":"";n+="<li class='iti__country ".concat(i,"' tabIndex='-1' id='iti-").concat(this.id,"__item-").concat(a.iso2).concat(r,"' role='option' data-dial-code='").concat(a.dialCode,"' data-country-code='").concat(a.iso2,"' aria-selected='false'>"),n+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(a.iso2,"'></div></div>"),n+="<span class='iti__country-name'>".concat(a.name,"</span>"),n+="<span class='iti__dial-code'>+".concat(a.dialCode,"</span>"),n+="</li>"}this.countryList.insertAdjacentHTML("beforeend",n)}},{key:"_setInitialState",value:function(){var t=this.telInput.getAttribute("value"),i=this.telInput.value,e=!t||"+"!==t.charAt(0)||i&&"+"===i.charAt(0)?i:t,n=this._getDialCode(e),o=this._isRegionlessNanp(e),a=this.options,r=a.initialCountry,s=a.nationalMode,l=a.autoHideDialCode,c=a.separateDialCode;n&&!o?this._updateFlagFromNumber(e):"auto"!==r&&(r?this._setFlag(r.toLowerCase()):n&&o?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||s||l||c||(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),e&&this._updateValFromNumber(e)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var t=this;this._handleHiddenInputSubmit=function(){t.hiddenInput.value=t.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var t=this.telInput;t&&"LABEL"!==t.tagName;)t=t.parentNode;return t}},{key:"_initDropdownListeners",value:function(){var t=this;this._handleLabelClick=function(i){t.countryList.classList.contains("iti__hide")?t.telInput.focus():i.preventDefault()};var i=this._getClosestLabel();i&&i.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!t.countryList.classList.contains("iti__hide")||t.telInput.disabled||t.telInput.readOnly||t._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(i){t.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(i.key)&&(i.preventDefault(),i.stopPropagation(),t._showDropdown()),"Tab"===i.key&&t._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var t=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(t.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(t){window.intlTelInputGlobals.autoCountry=t.toLowerCase(),setTimeout((function(){return u("handleAutoCountry")}))}),(function(){return u("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var t=this;this._handleKeyupEvent=function(){t._updateFlagFromNumber(t.telInput.value)&&t._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(t._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(t){var i=this.telInput.getAttribute("maxlength");return i&&t.length>i?t.substr(0,i):t}},{key:"_initBlurListeners",value:function(){var t=this;this._handleSubmitOrBlurEvent=function(){t._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var t=this._getNumeric(this.telInput.value);t&&this.selectedCountryData.dialCode!==t||(this.telInput.value="")}}},{key:"_getNumeric",value:function(t){return t.replace(/\D/g,"")}},{key:"_trigger",value:function(t){var i=document.createEvent("Event");i.initEvent(t,!0,!0),this.telInput.dispatchEvent(i)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(t,i,e){e&&!t.classList.contains(i)?t.classList.add(i):!e&&t.classList.contains(i)&&t.classList.remove(i)}},{key:"_setDropdownPosition",value:function(){var t=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var i=this.telInput.getBoundingClientRect(),e=window.pageYOffset||document.documentElement.scrollTop,n=i.top+e,o=this.countryList.offsetHeight,a=n+this.telInput.offsetHeight+o<e+window.innerHeight,r=n-o>e;this._toggleClass(this.countryList,"iti__country-list--dropup",!a&&r),this.options.dropdownContainer&&(this.dropdown.style.top="".concat(n+(!a&&r?0:this.telInput.offsetHeight),"px"),this.dropdown.style.left="".concat(i.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return t._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll))}}},{key:"_getClosestListItem",value:function(t){for(var i=t;i&&i!==this.countryList&&!i.classList.contains("iti__country");)i=i.parentNode;return i===this.countryList?null:i}},{key:"_bindDropdownListeners",value:function(){var t=this;this._handleMouseoverCountryList=function(i){var e=t._getClosestListItem(i.target);e&&t._highlightListItem(e,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(i){var e=t._getClosestListItem(i.target);e&&t._selectListItem(e)},this.countryList.addEventListener("click",this._handleClickCountryList);var i=!0;this._handleClickOffToClose=function(){i||t._closeDropdown(),i=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var e="",n=null;this._handleKeydownOnDropdown=function(i){i.preventDefault(),"ArrowUp"===i.key||"Up"===i.key||"ArrowDown"===i.key||"Down"===i.key?t._handleUpDownKey(i.key):"Enter"===i.key?t._handleEnterKey():"Escape"===i.key?t._closeDropdown():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key)&&(n&&clearTimeout(n),e+=i.key.toLowerCase(),t._searchForCountry(e),n=setTimeout((function(){e=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(t){var i="ArrowUp"===t||"Up"===t?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;i&&(i.classList.contains("iti__divider")&&(i="ArrowUp"===t||"Up"===t?i.previousElementSibling:i.nextElementSibling),this._highlightListItem(i,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(t){for(var i=0;i<this.countries.length;i++)if(this._startsWith(this.countries[i].name,t)){var e=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(this.countries[i].iso2));this._highlightListItem(e,!1),this._scrollTo(e,!0);break}}},{key:"_startsWith",value:function(t,i){return t.substr(0,i.length).toLowerCase()===i}},{key:"_updateValFromNumber",value:function(t){var i=t;if(this.options.formatOnDisplay&&window.intlTelInputUtils&&this.selectedCountryData){var e=!this.options.separateDialCode&&(this.options.nationalMode||"+"!==i.charAt(0)),n=intlTelInputUtils.numberFormat;i=intlTelInputUtils.formatNumber(i,this.selectedCountryData.iso2,e?n.NATIONAL:n.INTERNATIONAL)}i=this._beforeSetNumber(i),this.telInput.value=i}},{key:"_updateFlagFromNumber",value:function(t){var i=t,e=this.selectedCountryData.dialCode;i&&this.options.nationalMode&&"1"===e&&"+"!==i.charAt(0)&&("1"!==i.charAt(0)&&(i="1".concat(i)),i="+".concat(i)),this.options.separateDialCode&&e&&"+"!==i.charAt(0)&&(i="+".concat(e).concat(i));var n=this._getDialCode(i,!0),o=this._getNumeric(i),a=null;if(n){var r=this.countryCodes[this._getNumeric(n)],s=-1!==r.indexOf(this.selectedCountryData.iso2)&&o.length<=n.length-1;if(!("1"===e&&this._isRegionlessNanp(o)||s))for(var l=0;l<r.length;l++)if(r[l]){a=r[l];break}}else"+"===i.charAt(0)&&o.length?a="":i&&"+"!==i||(a=this.defaultCountry);return null!==a&&this._setFlag(a)}},{key:"_isRegionlessNanp",value:function(t){var i=this._getNumeric(t);if("1"===i.charAt(0)){var e=i.substr(1,3);return-1!==l.indexOf(e)}return!1}},{key:"_highlightListItem",value:function(t,i){var e=this.highlightedItem;e&&e.classList.remove("iti__highlight"),this.highlightedItem=t,this.highlightedItem.classList.add("iti__highlight"),i&&this.highlightedItem.focus()}},{key:"_getCountryData",value:function(t,e,n){for(var o=e?i:this.countries,a=0;a<o.length;a++)if(o[a].iso2===t)return o[a];if(n)return null;throw new Error("No country data for '".concat(t,"'"))}},{key:"_setFlag",value:function(t){var i=this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=t?this._getCountryData(t,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.setAttribute("class","iti__flag iti__".concat(t));var e=t?"".concat(this.selectedCountryData.name,": +").concat(this.selectedCountryData.dialCode):"Unknown";if(this.selectedFlag.setAttribute("title",e),this.options.separateDialCode){var n=this.selectedCountryData.dialCode?"+".concat(this.selectedCountryData.dialCode):"";this.selectedDialCode.innerHTML=n;var o=this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth();this.telInput.style.paddingLeft="".concat(o+6,"px")}if(this._updatePlaceholder(),this.options.allowDropdown){var a=this.activeItem;if(a&&(a.classList.remove("iti__active"),a.setAttribute("aria-selected","false")),t){var r=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(t,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(t));r.setAttribute("aria-selected","true"),r.classList.add("iti__active"),this.activeItem=r,this.selectedFlag.setAttribute("aria-activedescendant",r.getAttribute("id"))}}return i.iso2!==t}},{key:"_getHiddenSelectedFlagWidth",value:function(){var t=this.telInput.parentNode.cloneNode();t.style.visibility="hidden",document.body.appendChild(t);var i=this.flagsContainer.cloneNode();t.appendChild(i);var e=this.selectedFlag.cloneNode(!0);i.appendChild(e);var n=e.offsetWidth;return t.parentNode.removeChild(t),n}},{key:"_updatePlaceholder",value:function(){if(window.intlTelInputUtils&&("aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&"polite"===this.options.autoPlaceholder)){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],i=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";i=this._beforeSetNumber(i),"function"==typeof this.options.customPlaceholder&&(i=this.options.customPlaceholder(i,this.selectedCountryData)),this.telInput.setAttribute("placeholder",i)}}},{key:"_selectListItem",value:function(t){var i=this._setFlag(t.getAttribute("data-country-code"));this._closeDropdown(),this._updateDialCode(t.getAttribute("data-dial-code"),!0),this.telInput.focus();var e=this.telInput.value.length;this.telInput.setSelectionRange(e,e),i&&this._triggerCountryChange()}},{key:"_closeDropdown",value:function(){this.countryList.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.dropdownArrow.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._handleKeydownOnDropdown),document.documentElement.removeEventListener("click",this._handleClickOffToClose),this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList),this.countryList.removeEventListener("click",this._handleClickCountryList),this.options.dropdownContainer&&(this.isMobile||window.removeEventListener("scroll",this._handleWindowScroll),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._trigger("close:countrydropdown")}},{key:"_scrollTo",value:function(t,i){var e=this.countryList,n=window.pageYOffset||document.documentElement.scrollTop,o=e.offsetHeight,a=e.getBoundingClientRect().top+n,r=a+o,s=t.offsetHeight,l=t.getBoundingClientRect().top+n,c=l+s,u=l-a+e.scrollTop,p=o/2-s/2;l<a?(i&&(u-=p),e.scrollTop=u):c>r&&(i&&(u+=p),e.scrollTop=u-(o-s))}},{key:"_updateDialCode",value:function(t,i){var e,n=this.telInput.value,o="+".concat(t);if("+"===n.charAt(0)){var a=this._getDialCode(n);e=a?n.replace(a,o):o}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(n)e=o+n;else{if(!i&&this.options.autoHideDialCode)return;e=o}}this.telInput.value=e}},{key:"_getDialCode",value:function(t,i){var e="";if("+"===t.charAt(0))for(var n="",o=0;o<t.length;o++){var a=t.charAt(o);if(!isNaN(parseInt(a,10))){if(n+=a,i)this.countryCodes[n]&&(e=t.substr(0,o+1));else if(this.dialCodes[n]){e=t.substr(0,o+1);break}if(n.length===this.countryCodeMaxLen)break}}return e}},{key:"_getFullNumber",value:function(){var t=this.telInput.value.trim(),i=this.selectedCountryData.dialCode,e=this._getNumeric(t);return(this.options.separateDialCode&&"+"!==t.charAt(0)&&i&&e?"+".concat(i):"")+t}},{key:"_beforeSetNumber",value:function(t){var i=t;if(this.options.separateDialCode){var e=this._getDialCode(i);e&&(e="+".concat(this.selectedCountryData.dialCode),i=i.substr(" "===i[e.length]||"-"===i[e.length]?e.length+1:e.length))}return this._cap(i)}},{key:"_triggerCountryChange",value:function(){this._trigger("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=window.intlTelInputGlobals.autoCountry,this.telInput.value||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this._updatePlaceholder()),this.resolveUtilsScriptPromise()}},{key:"destroy",value:function(){var t=this.telInput.form;if(this.options.allowDropdown){this._closeDropdown(),this.selectedFlag.removeEventListener("click",this._handleClickSelectedFlag),this.flagsContainer.removeEventListener("keydown",this._handleFlagsContainerKeydown);var i=this._getClosestLabel();i&&i.removeEventListener("click",this._handleLabelClick)}this.hiddenInput&&t&&t.removeEventListener("submit",this._handleHiddenInputSubmit),this.options.autoHideDialCode&&(t&&t.removeEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.removeEventListener("blur",this._handleSubmitOrBlurEvent)),this.telInput.removeEventListener("keyup",this._handleKeyupEvent),this.telInput.removeEventListener("cut",this._handleClipboardEvent),this.telInput.removeEventListener("paste",this._handleClipboardEvent),this.telInput.removeAttribute("data-intl-tel-input-id");var e=this.telInput.parentNode;e.parentNode.insertBefore(this.telInput,e),e.parentNode.removeChild(e),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}},{key:"getNumber",value:function(t){if(window.intlTelInputUtils){var i=this.selectedCountryData.iso2;return intlTelInputUtils.formatNumber(this._getFullNumber(),i,t)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.selectedCountryData}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var t=this.selectedCountryData.iso2;return intlTelInputUtils.getValidationError(this._getFullNumber(),t)}return-99}},{key:"isValidNumber",value:function(){var t=this._getFullNumber().trim();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(t,this.options.nationalMode?this.selectedCountryData.iso2:""):null}},{key:"setCountry",value:function(t){var i=t.toLowerCase();this.selectedFlagInner.classList.contains("iti__".concat(i))||(this._setFlag(i),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())}},{key:"setNumber",value:function(t){var i=this._updateFlagFromNumber(t);this._updateValFromNumber(t),i&&this._triggerCountryChange()}},{key:"setPlaceholderNumberType",value:function(t){this.options.placeholderNumberType=t,this._updatePlaceholder()}}])&&o(n.prototype,a),e}();a.getCountryData=function(){return i};var d=function(t,i,e){var n=document.createElement("script");n.onload=function(){u("handleUtils"),i&&i()},n.onerror=function(){u("rejectUtilsScriptPromise"),e&&e()},n.className="iti-load-utils",n.async=!0,n.src=t,document.body.appendChild(n)};return a.loadUtils=function(t){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise((function(i,e){return d(t,i,e)}));d(t)}return null},a.defaults=s,a.version="17.0.18",function(t,i){var e=new p(t,i);return e._init(),t.setAttribute("data-intl-tel-input-id",e.id),window.intlTelInputGlobals.instances[e.id]=e,e}}()},t.exports?t.exports=i():window.intlTelInput=i()}));const de=class{constructor(i){t(this,i),this.enterClicked=o(this,"enterClicked",7),this.phoneEntered=o(this,"phoneEntered",7),this.name="phone",this.countryCode=salla.config.get("user.country_code","SA")||"SA",this.countryCodeLabel=salla.lang.get("common.country_code"),this.mobileLabel=salla.lang.get("common.elements.mobile"),this.tooShort=salla.lang.get("common.errors.too_short",{attribute:this.mobileLabel}),this.tooLong=salla.lang.get("common.errors.too_long",{attribute:this.mobileLabel}),this.invalidCountryCode=salla.lang.get("common.errors.invalid_value",{attribute:this.countryCodeLabel}),this.invalidNumber=salla.lang.get("common.errors.invalid_value",{attribute:this.mobileLabel}),this.errorMap=[this.invalidNumber,this.invalidCountryCode,this.tooShort,this.tooLong,this.invalidNumber],salla.lang.onLoaded((()=>{this.mobileLabel=salla.lang.get("common.elements.mobile"),this.countryCodeLabel=salla.lang.get("common.elements.country_code"),this.invalidNumber=salla.lang.get("common.errors.invalid_value",{attribute:this.mobileLabel}),this.invalidCountryCode=salla.lang.get("common.errors.invalid_value",{attribute:this.countryCodeLabel}),this.tooShort=salla.lang.get("common.errors.too_short",{attribute:this.mobileLabel}),this.tooLong=salla.lang.get("common.errors.too_long",{attribute:this.mobileLabel}),this.mobileRequired=salla.lang.get("common.errors.field_required",{attribute:this.mobileLabel}),this.errorMap=[this.invalidNumber,this.invalidCountryCode,this.tooShort,this.tooLong,this.invalidNumber]}))}async getValues(){return{[this.name]:this.phone=this.phoneInput.value,countryCode:this.countryCode=this.countryCodeInput.value}}async isValid(){if(this.reset(),this.iti.isValidNumber())return!0;if(!this.phoneInput.value.trim())return this.phoneInput.classList.add("s-has-error"),void(this.errorMsg.innerText=this.mobileRequired||"The mobile is required");this.phoneInput.classList.add("s-has-error");let t=this.iti.getValidationError();return this.errorMsg.innerText=this.errorMap[t]||"",salla.logger.info("Phone number ("+this.countryCode+" - "+this.phone+") is not valid, error code "+t),!1}initTelInput(){salla.helpers.inputDigitsOnly(this.phoneInput),this.iti=pe(this.phoneInput,{initialCountry:this.countryCode||"sa",preferredCountries:["sa","ae","kw","bh","qa","iq","om","ye","eg","jo","sy","ps","sd","lb","dz","tn","ma","ly"],formatOnDisplay:!1,separateDialCode:!0,autoPlaceholder:"aggressive",utilsScript:"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/utils.min.js"}),this.phoneInput.addEventListener("countrychange",(()=>{let t=this.iti.getSelectedCountryData().iso2.toUpperCase();this.countryCodeInput.value=t,this.countryCode=t,this.phoneEntered.emit({number:this.phone,country_code:t})})),this.phoneInput.addEventListener("input",(t=>{salla.helpers.inputDigitsOnly(t.target),this.reset(),this.phoneEntered.emit({number:t.target.value,country_code:this.countryCode})}))}reset(){this.phoneInput.classList.remove("s-has-error"),this.errorMsg.innerHTML=""}handleCountryInput(t){this.phone&&this.phoneEntered.emit({number:t.target.value,country_code:this.countryCode})}render(){return i(e,{class:"s-tel-input"},i("input",{type:"tel",name:this.name,value:this.phone,onChange:t=>this.handleCountryInput(t),ref:t=>this.phoneInput=t,enterkeyhint:"next",autocomplete:"tel",class:"s-tel-input-control tel-input s-ltr"}),i("span",{class:"s-tel-input-error-msg",ref:t=>this.errorMsg=t}),i("input",{type:"hidden",name:"country_code",value:this.countryCode,ref:t=>this.countryCodeInput=t,class:"country_code"}))}componentDidLoad(){this.initTelInput()}get host(){return n(this)}};de.style='.iti{width:100%;position:relative;display:inline-block}.iti *{-webkit-box-sizing:border-box;box-sizing:border-box;-moz-box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti input,.iti input[type=text],.iti input[type=tel]{position:relative;z-index:0;direction:ltr !important;margin-top:0 !important;margin-bottom:0 !important;padding-left:95px !important;padding-right:15px !important;margin-left:0 !important}.iti__flag-container{width:100%;position:absolute;top:0;bottom:0;left:0;padding:1px}.iti__selected-flag{width:80px;z-index:1;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;float:left;padding:0 15px;-webkit-box-shadow:none !important;box-shadow:none !important;outline:none !important}.ltr .iti__selected-flag{-ms-flex-pack:end;justify-content:flex-end}.iti__selected-flag:before{content:"";display:block;width:1px;height:70%;background:#eee;position:absolute;top:15%;right:0}.iti__selected-flag .iti__flag{display:none}.iti__arrow{width:15px;height:15px;line-height:15px;position:absolute;left:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.iti__arrow:after{content:url("data:image/svg+xml,<svg version=\'1.1\' xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 32 32\'><title>keyboard_arrow_down</title><path d=\'M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z\'></path></svg>");font-size:16px;color:#999;opacity:0.65}.iti__arrow--up:after{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.iti__country-list{width:100%;max-height:160px;position:absolute;top:100%;left:0;z-index:2;list-style:none;margin:0;padding:0;margin:5px 0 0 0;border-radius:5px;-webkit-box-shadow:0px 2px 4px 2px rgba(0, 0, 0, 0.05);box-shadow:0px 2px 4px 2px rgba(0, 0, 0, 0.05);border:1px solid #f5f7f9;background-color:white;white-space:nowrap;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.iti__country-list::-webkit-scrollbar{width:4px}.dark .iti__country-list{background-color:#52525b;border-color:#52525b}.iti__country-list li{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-direction:row;flex-direction:row;padding:8px 10px;-webkit-transition:background-color 0.3s;transition:background-color 0.3s}.iti__country-list li span{font-size:12px}.iti__country-list li:hover,.iti__country-list li.highlighted{background-color:rgba(0, 0, 0, 0.05)}.iti__country-list--dropup{bottom:100%;top:unset;margin:0 0 5px 0}@media (max-width: 500px){.iti__country-list{white-space:normal}}.iti__flag-box{display:inline-block;width:20px;margin:0 0 0 5px}.iti__divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #eee}.iti__country{padding:5px 10px;outline:none}.iti__dial-code{font-family:Arial;color:#999;unicode-bidi:-moz-plaintext;unicode-bidi:plaintext;letter-spacing:1px}.iti__country.iti__highlight{background-color:rgba(0, 0, 0, 0.05)}.iti__flag-box,.iti__country-name,.iti__dial-code{vertical-align:middle}.iti__country-name{-ms-flex:auto;flex:auto;margin:0;padding:0 10px;white-space:normal;line-height:1.3}.iti--allow-dropdown .iti__flag-container,.iti--separate-dial-code .iti__flag-container{left:0}.iti--allow-dropdown .iti__flag-container:hover{cursor:pointer}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover{cursor:default}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover .iti__selected-flag,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover .iti__selected-flag{background-color:transparent}.iti--separate-dial-code .iti__selected-dial-code{unicode-bidi:-moz-plaintext;unicode-bidi:plaintext;direction:ltr;letter-spacing:1px;font-family:"Arial", serif;font-size:13px}.iti--container{position:absolute;top:-1000px;z-index:1060;padding:1px}.iti--container:hover{cursor:pointer}.iti-mobile .iti--container{inset:0;margin:20px;width:calc(100% - 40px);position:fixed;z-index:9999}.iti-mobile .iti__country-list{max-height:100%;width:100%;inset:0}.iti-mobile .iti__country{padding:10px 10px;line-height:1.5em}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.iti__flag{background-size:5652px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:14px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cr{height:12px;background-position:-1115px 0px}.iti__flag.iti__cu{height:10px;background-position:-1137px 0px}.iti__flag.iti__cv{height:12px;background-position:-1159px 0px}.iti__flag.iti__cw{height:14px;background-position:-1181px 0px}.iti__flag.iti__cx{height:10px;background-position:-1203px 0px}.iti__flag.iti__cy{height:14px;background-position:-1225px 0px}.iti__flag.iti__cz{height:14px;background-position:-1247px 0px}.iti__flag.iti__de{height:12px;background-position:-1269px 0px}.iti__flag.iti__dg{height:10px;background-position:-1291px 0px}.iti__flag.iti__dj{height:14px;background-position:-1313px 0px}.iti__flag.iti__dk{height:15px;background-position:-1335px 0px}.iti__flag.iti__dm{height:10px;background-position:-1357px 0px}.iti__flag.iti__do{height:14px;background-position:-1379px 0px}.iti__flag.iti__dz{height:14px;background-position:-1401px 0px}.iti__flag.iti__ea{height:14px;background-position:-1423px 0px}.iti__flag.iti__ec{height:14px;background-position:-1445px 0px}.iti__flag.iti__ee{height:13px;background-position:-1467px 0px}.iti__flag.iti__eg{height:14px;background-position:-1489px 0px}.iti__flag.iti__eh{height:10px;background-position:-1511px 0px}.iti__flag.iti__er{height:10px;background-position:-1533px 0px}.iti__flag.iti__es{height:14px;background-position:-1555px 0px}.iti__flag.iti__et{height:10px;background-position:-1577px 0px}.iti__flag.iti__eu{height:14px;background-position:-1599px 0px}.iti__flag.iti__fi{height:12px;background-position:-1621px 0px}.iti__flag.iti__fj{height:10px;background-position:-1643px 0px}.iti__flag.iti__fk{height:10px;background-position:-1665px 0px}.iti__flag.iti__fm{height:11px;background-position:-1687px 0px}.iti__flag.iti__fo{height:15px;background-position:-1709px 0px}.iti__flag.iti__fr{height:14px;background-position:-1731px 0px}.iti__flag.iti__ga{height:15px;background-position:-1753px 0px}.iti__flag.iti__gb{height:10px;background-position:-1775px 0px}.iti__flag.iti__gd{height:12px;background-position:-1797px 0px}.iti__flag.iti__ge{height:14px;background-position:-1819px 0px}.iti__flag.iti__gf{height:14px;background-position:-1841px 0px}.iti__flag.iti__gg{height:14px;background-position:-1863px 0px}.iti__flag.iti__gh{height:14px;background-position:-1885px 0px}.iti__flag.iti__gi{height:10px;background-position:-1907px 0px}.iti__flag.iti__gl{height:14px;background-position:-1929px 0px}.iti__flag.iti__gm{height:14px;background-position:-1951px 0px}.iti__flag.iti__gn{height:14px;background-position:-1973px 0px}.iti__flag.iti__gp{height:14px;background-position:-1995px 0px}.iti__flag.iti__gq{height:14px;background-position:-2017px 0px}.iti__flag.iti__gr{height:14px;background-position:-2039px 0px}.iti__flag.iti__gs{height:10px;background-position:-2061px 0px}.iti__flag.iti__gt{height:13px;background-position:-2083px 0px}.iti__flag.iti__gu{height:11px;background-position:-2105px 0px}.iti__flag.iti__gw{height:10px;background-position:-2127px 0px}.iti__flag.iti__gy{height:12px;background-position:-2149px 0px}.iti__flag.iti__hk{height:14px;background-position:-2171px 0px}.iti__flag.iti__hm{height:10px;background-position:-2193px 0px}.iti__flag.iti__hn{height:10px;background-position:-2215px 0px}.iti__flag.iti__hr{height:10px;background-position:-2237px 0px}.iti__flag.iti__ht{height:12px;background-position:-2259px 0px}.iti__flag.iti__hu{height:10px;background-position:-2281px 0px}.iti__flag.iti__ic{height:14px;background-position:-2303px 0px}.iti__flag.iti__id{height:14px;background-position:-2325px 0px}.iti__flag.iti__ie{height:10px;background-position:-2347px 0px}.iti__flag.iti__il{height:15px;background-position:-2369px 0px}.iti__flag.iti__im{height:10px;background-position:-2391px 0px}.iti__flag.iti__in{height:14px;background-position:-2413px 0px}.iti__flag.iti__io{height:10px;background-position:-2435px 0px}.iti__flag.iti__iq{height:14px;background-position:-2457px 0px}.iti__flag.iti__ir{height:12px;background-position:-2479px 0px}.iti__flag.iti__is{height:15px;background-position:-2501px 0px}.iti__flag.iti__it{height:14px;background-position:-2523px 0px}.iti__flag.iti__je{height:12px;background-position:-2545px 0px}.iti__flag.iti__jm{height:10px;background-position:-2567px 0px}.iti__flag.iti__jo{height:10px;background-position:-2589px 0px}.iti__flag.iti__jp{height:14px;background-position:-2611px 0px}.iti__flag.iti__ke{height:14px;background-position:-2633px 0px}.iti__flag.iti__kg{height:12px;background-position:-2655px 0px}.iti__flag.iti__kh{height:13px;background-position:-2677px 0px}.iti__flag.iti__ki{height:10px;background-position:-2699px 0px}.iti__flag.iti__km{height:12px;background-position:-2721px 0px}.iti__flag.iti__kn{height:14px;background-position:-2743px 0px}.iti__flag.iti__kp{height:10px;background-position:-2765px 0px}.iti__flag.iti__kr{height:14px;background-position:-2787px 0px}.iti__flag.iti__kw{height:10px;background-position:-2809px 0px}.iti__flag.iti__ky{height:10px;background-position:-2831px 0px}.iti__flag.iti__kz{height:10px;background-position:-2853px 0px}.iti__flag.iti__la{height:14px;background-position:-2875px 0px}.iti__flag.iti__lb{height:14px;background-position:-2897px 0px}.iti__flag.iti__lc{height:10px;background-position:-2919px 0px}.iti__flag.iti__li{height:12px;background-position:-2941px 0px}.iti__flag.iti__lk{height:10px;background-position:-2963px 0px}.iti__flag.iti__lr{height:11px;background-position:-2985px 0px}.iti__flag.iti__ls{height:14px;background-position:-3007px 0px}.iti__flag.iti__lt{height:12px;background-position:-3029px 0px}.iti__flag.iti__lu{height:12px;background-position:-3051px 0px}.iti__flag.iti__lv{height:10px;background-position:-3073px 0px}.iti__flag.iti__ly{height:10px;background-position:-3095px 0px}.iti__flag.iti__ma{height:14px;background-position:-3117px 0px}.iti__flag.iti__mc{height:15px;background-position:-3139px 0px}.iti__flag.iti__md{height:10px;background-position:-3160px 0px}.iti__flag.iti__me{height:10px;background-position:-3182px 0px}.iti__flag.iti__mf{height:14px;background-position:-3204px 0px}.iti__flag.iti__mg{height:14px;background-position:-3226px 0px}.iti__flag.iti__mh{height:11px;background-position:-3248px 0px}.iti__flag.iti__mk{height:10px;background-position:-3270px 0px}.iti__flag.iti__ml{height:14px;background-position:-3292px 0px}.iti__flag.iti__mm{height:14px;background-position:-3314px 0px}.iti__flag.iti__mn{height:10px;background-position:-3336px 0px}.iti__flag.iti__mo{height:14px;background-position:-3358px 0px}.iti__flag.iti__mp{height:10px;background-position:-3380px 0px}.iti__flag.iti__mq{height:14px;background-position:-3402px 0px}.iti__flag.iti__mr{height:14px;background-position:-3424px 0px}.iti__flag.iti__ms{height:10px;background-position:-3446px 0px}.iti__flag.iti__mt{height:14px;background-position:-3468px 0px}.iti__flag.iti__mu{height:14px;background-position:-3490px 0px}.iti__flag.iti__mv{height:14px;background-position:-3512px 0px}.iti__flag.iti__mw{height:14px;background-position:-3534px 0px}.iti__flag.iti__mx{height:12px;background-position:-3556px 0px}.iti__flag.iti__my{height:10px;background-position:-3578px 0px}.iti__flag.iti__mz{height:14px;background-position:-3600px 0px}.iti__flag.iti__na{height:14px;background-position:-3622px 0px}.iti__flag.iti__nc{height:10px;background-position:-3644px 0px}.iti__flag.iti__ne{height:15px;background-position:-3666px 0px}.iti__flag.iti__nf{height:10px;background-position:-3686px 0px}.iti__flag.iti__ng{height:10px;background-position:-3708px 0px}.iti__flag.iti__ni{height:12px;background-position:-3730px 0px}.iti__flag.iti__nl{height:14px;background-position:-3752px 0px}.iti__flag.iti__no{height:15px;background-position:-3774px 0px}.iti__flag.iti__np{height:15px;background-position:-3796px 0px}.iti__flag.iti__nr{height:10px;background-position:-3811px 0px}.iti__flag.iti__nu{height:10px;background-position:-3833px 0px}.iti__flag.iti__nz{height:10px;background-position:-3855px 0px}.iti__flag.iti__om{height:10px;background-position:-3877px 0px}.iti__flag.iti__pa{height:14px;background-position:-3899px 0px}.iti__flag.iti__pe{height:14px;background-position:-3921px 0px}.iti__flag.iti__pf{height:14px;background-position:-3943px 0px}.iti__flag.iti__pg{height:15px;background-position:-3965px 0px}.iti__flag.iti__ph{height:10px;background-position:-3987px 0px}.iti__flag.iti__pk{height:14px;background-position:-4009px 0px}.iti__flag.iti__pl{height:13px;background-position:-4031px 0px}.iti__flag.iti__pm{height:14px;background-position:-4053px 0px}.iti__flag.iti__pn{height:10px;background-position:-4075px 0px}.iti__flag.iti__pr{height:14px;background-position:-4097px 0px}.iti__flag.iti__ps{height:10px;background-position:-4119px 0px}.iti__flag.iti__pt{height:14px;background-position:-4141px 0px}.iti__flag.iti__pw{height:13px;background-position:-4163px 0px}.iti__flag.iti__py{height:11px;background-position:-4185px 0px}.iti__flag.iti__qa{height:8px;background-position:-4207px 0px}.iti__flag.iti__re{height:14px;background-position:-4229px 0px}.iti__flag.iti__ro{height:14px;background-position:-4251px 0px}.iti__flag.iti__rs{height:14px;background-position:-4273px 0px}.iti__flag.iti__ru{height:14px;background-position:-4295px 0px}.iti__flag.iti__rw{height:14px;background-position:-4317px 0px}.iti__flag.iti__sa{height:14px;background-position:-4339px 0px}.iti__flag.iti__sb{height:10px;background-position:-4361px 0px}.iti__flag.iti__sc{height:10px;background-position:-4383px 0px}.iti__flag.iti__sd{height:10px;background-position:-4405px 0px}.iti__flag.iti__se{height:13px;background-position:-4427px 0px}.iti__flag.iti__sg{height:14px;background-position:-4449px 0px}.iti__flag.iti__sh{height:10px;background-position:-4471px 0px}.iti__flag.iti__si{height:10px;background-position:-4493px 0px}.iti__flag.iti__sj{height:15px;background-position:-4515px 0px}.iti__flag.iti__sk{height:14px;background-position:-4537px 0px}.iti__flag.iti__sl{height:14px;background-position:-4559px 0px}.iti__flag.iti__sm{height:15px;background-position:-4581px 0px}.iti__flag.iti__sn{height:14px;background-position:-4603px 0px}.iti__flag.iti__so{height:14px;background-position:-4625px 0px}.iti__flag.iti__sr{height:14px;background-position:-4647px 0px}.iti__flag.iti__ss{height:10px;background-position:-4669px 0px}.iti__flag.iti__st{height:10px;background-position:-4691px 0px}.iti__flag.iti__sv{height:12px;background-position:-4713px 0px}.iti__flag.iti__sx{height:14px;background-position:-4735px 0px}.iti__flag.iti__sy{height:14px;background-position:-4757px 0px}.iti__flag.iti__sz{height:14px;background-position:-4779px 0px}.iti__flag.iti__ta{height:10px;background-position:-4801px 0px}.iti__flag.iti__tc{height:10px;background-position:-4823px 0px}.iti__flag.iti__td{height:14px;background-position:-4845px 0px}.iti__flag.iti__tf{height:14px;background-position:-4867px 0px}.iti__flag.iti__tg{height:13px;background-position:-4889px 0px}.iti__flag.iti__th{height:14px;background-position:-4911px 0px}.iti__flag.iti__tj{height:10px;background-position:-4933px 0px}.iti__flag.iti__tk{height:10px;background-position:-4955px 0px}.iti__flag.iti__tl{height:10px;background-position:-4977px 0px}.iti__flag.iti__tm{height:14px;background-position:-4999px 0px}.iti__flag.iti__tn{height:14px;background-position:-5021px 0px}.iti__flag.iti__to{height:10px;background-position:-5043px 0px}.iti__flag.iti__tr{height:14px;background-position:-5065px 0px}.iti__flag.iti__tt{height:12px;background-position:-5087px 0px}.iti__flag.iti__tv{height:10px;background-position:-5109px 0px}.iti__flag.iti__tw{height:14px;background-position:-5131px 0px}.iti__flag.iti__tz{height:14px;background-position:-5153px 0px}.iti__flag.iti__ua{height:14px;background-position:-5175px 0px}.iti__flag.iti__ug{height:14px;background-position:-5197px 0px}.iti__flag.iti__um{height:11px;background-position:-5219px 0px}.iti__flag.iti__un{height:14px;background-position:-5241px 0px}.iti__flag.iti__us{height:11px;background-position:-5263px 0px}.iti__flag.iti__uy{height:14px;background-position:-5285px 0px}.iti__flag.iti__uz{height:10px;background-position:-5307px 0px}.iti__flag.iti__va{height:15px;background-position:-5329px 0px}.iti__flag.iti__vc{height:14px;background-position:-5346px 0px}.iti__flag.iti__ve{height:14px;background-position:-5368px 0px}.iti__flag.iti__vg{height:10px;background-position:-5390px 0px}.iti__flag.iti__vi{height:14px;background-position:-5412px 0px}.iti__flag.iti__vn{height:14px;background-position:-5434px 0px}.iti__flag.iti__vu{height:12px;background-position:-5456px 0px}.iti__flag.iti__wf{height:14px;background-position:-5478px 0px}.iti__flag.iti__ws{height:10px;background-position:-5500px 0px}.iti__flag.iti__xk{height:15px;background-position:-5522px 0px}.iti__flag.iti__ye{height:14px;background-position:-5544px 0px}.iti__flag.iti__yt{height:14px;background-position:-5566px 0px}.iti__flag.iti__za{height:14px;background-position:-5588px 0px}.iti__flag.iti__zm{height:14px;background-position:-5610px 0px}.iti__flag.iti__zw{height:10px;background-position:-5632px 0px}.iti__flag{height:15px;-webkit-box-shadow:0px 0px 1px 0px #888;box-shadow:0px 0px 1px 0px #888;background-image:url("https://cdn.salla.network/images/flags.png");background-repeat:no-repeat;background-color:#f5f7f9;background-position:20px 0}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.iti__flag{background-image:url("https://cdn.salla.network/images/flags@2x.png")}}.iti__flag.iti__np{background-color:transparent}';const he='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-off</title>\n<path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>\n</svg>\n',fe=class{constructor(i){t(this,i),this.deactivateAccount=salla.lang.get("pages.profile.deactivate_account"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.deactivateDesc=salla.lang.get("pages.profile.deactivate_account_description"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description"),this.sorryForLeavingText=salla.lang.get("pages.profile.warning_for_deactivate"),this.warningText=salla.lang.get("pages.profile.sorry_for_leaving"),this.keepAccount=salla.lang.get("pages.profile.keep_account"),this.buttonLoading=!1,this.isNotifiable=!1,salla.lang.onLoaded((()=>{this.deactivateAccount=salla.lang.get("pages.profile.deactivate_account"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.deactivateDesc=salla.lang.get("pages.profile.deactivate_account_description"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description"),this.warningText=salla.lang.get("pages.profile.warning_for_deactivate"),this.sorryForLeavingText=salla.lang.get("pages.profile.sorry_for_leaving"),this.keepAccount=salla.lang.get("pages.profile.keep_account")}))}toggleNotification(t){salla.profile.updateSettings({is_notifiable:t.target.checked})}capitalizeText(t){return t.charAt(0).toUpperCase()+t.slice(1)}openDeactivateModal(){this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount)),this.confirmationModal.open()}async deleteAccount(){await salla.profile.delete().finally((()=>this.confirmationModal.close()))}render(){return i(e,{class:"s-user-settings-wrapper"},i("div",{class:"s-user-settings-section"},i("salla-list-tile",null,i("div",{slot:"icon",class:"s-user-settings-section-icon"},i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),i("div",{slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),i("div",{slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),i("div",{slot:"action",class:"s-user-settings-section-action"},i("label",{class:"s-toggle"},i("input",{class:"s-toggle-input",checked:this.isNotifiable,onChange:t=>this.toggleNotification(t),type:"checkbox"}),i("div",{class:"s-toggle-switcher"}))))),i("div",{class:"s-user-settings-section s-user-settings-section-deactivate-user"},i("salla-list-tile",null,i("div",{slot:"icon",class:"s-user-settings-section-icon"},i("span",{innerHTML:he})),i("div",{slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deactivateAccount)),i("div",{slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.deactivateDesc)),i("div",{slot:"action",class:"s-user-settings-section-action"},i("salla-button",{fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeactivateModal()},this.capitalizeText(this.deactivateAccount))))),i("salla-modal",{width:"sm",subTitle:this.capitalizeText(this.sorryForLeavingText),ref:t=>this.confirmationModal=t},i("span",{slot:"icon",class:"s-user-settings-confirmation-icon",innerHTML:he}),i("div",{class:"s-user-settings-confirmation"},i("div",{class:"s-user-settings-confirmation-warning"},this.capitalizeText(this.warningText)),i("div",{class:"s-user-settings-confirmation-actions"},i("salla-button",{width:"wide",onClick:()=>this.confirmationModal.close()},this.capitalizeText(this.keepAccount)),i("salla-button",{fill:"outline",loading:this.buttonLoading,width:"wide",onClick:()=>this.deleteAccount()},this.capitalizeText(this.deactivateAccount))))))}};fe.style="";const ge=class{constructor(i){t(this,i),this.verified=o(this,"verified",7),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{var t;this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),null===(t=this.modal)||void 0===t||t.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(t=>{var i;this.isProfileVerify=!0,this.open(t),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type),null===(i=this.modal)||void 0===i||i.setTitle(this.title)})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}handleKeyUp(t){var i,e,n,o;if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key))return;let a=t.keyCode||t.charCode;t.target.value?(null===(i=t.target.nextElementSibling)||void 0===i||i.focus(),null===(e=t.target.nextElementSibling)||void 0===e||e.select()):[8,46].includes(a)&&(null===(n=t.target.previousElementSibling)||void 0===n||n.focus(),null===(o=t.target.previousElementSibling)||void 0===o||o.select()),this.toggleOTPSubmit()}handlePaste(t){let i=salla.helpers.number(t.clipboardData.getData("text")).replace(/[^0-9.]/g,"").replace("..",".");this.otpInputs.forEach(((t,e)=>t.value=i[e]||"")),this.toggleOTPSubmit(),setTimeout((()=>this.otpInputs[3].focus()),100)}async getCode(){return this.code.value}async open(t){var i;this.data=t,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.reset(),"modal"==this.display&&(null===(i=this.modal)||void 0===i||i.setTitle(this.title)),this.modal.open(),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let t=[];if(this.otpInputs.forEach((i=>i.value&&t.push(i.value))),this.code.value=t.join(""),4===t.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((t=>t.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let t=setInterval((()=>{this.resendAfter<=0?(clearInterval(t),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((t=>t.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let t=Object.assign({code:this.code.value},this.data);return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(t):salla.auth.verify(t,this.supportWebAuth))).then((t=>this.verified.emit(t))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((t=>{salla.logger.error(t),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:t=>this.modal=t,"modal-title":this.title},i("span",{slot:"icon",innerHTML:"mobile"==this.type?'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':ei}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:t=>this.body=t},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:t=>this.code=t}),i("div",{class:"s-verify-codes",dir:"ltr"},[1,2,3,4].map((()=>i("input",{type:"tel",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",class:"s-verify-input",onInput:t=>salla.helpers.inputDigitsOnly(t.target),onPaste:t=>this.handlePaste(t),onKeyUp:t=>this.handleKeyUp(t),required:!0})))),i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:t=>this.btn=t},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:t=>this.resendMessage=t},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:t=>this.timer=t})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:t=>this.resend=t},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return n(this)}};ge.style="salla-verify{display:block}";export{c as salla_button,u as salla_cart_summary,B as salla_datetime_picker,W as salla_file_upload,Xt as salla_gifting,Qt as salla_infinite_scroll,Jt as salla_list_tile,ti as salla_loading,ii as salla_localization_modal,oi as salla_login_modal,ri as salla_loyalty,li as salla_modal,ui as salla_offer_modal,pi as salla_placeholder,hi as salla_product_availability,fi as salla_product_size_guide,gi as salla_quantity_input,_i as salla_rating_modal,mi as salla_rating_stars,vi as salla_search,xi as salla_skeleton,wi as salla_social_share,se as salla_swiper,le as salla_tab_content,ce as salla_tab_header,ue as salla_tabs,de as salla_tel_input,fe as salla_user_settings,ge as salla_verify}