/*! For license information please see loader.template.js.LICENSE.txt */ (()=>{var t={228:t=>{t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,i="DOMContentLoaded",s=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!s&&r&&r.addEventListener(i,e=function(){for(r.removeEventListener(i,e),s=1;e=n.shift();)e()}),function(t){s?setTimeout(t,0):n.push(t)}}()},412:(t,e,n)=>{"use strict";n.r(e);const r=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},o=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function i(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(e){i(t,e)}),(function(n){r[t]={status:"rejected",reason:n},0==--o&&e(r)}))}r[t]={status:"fulfilled",value:n},0==--o&&e(r)}for(var s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmartsuppLoader=void 0;var r=n(521),o=n(416),i=n(35),s=function(){function t(t){this.options=t,this.widgets={},this.chats=this.widgets}return t.prototype.setDefaults=function(t){return this.options=(0,o.mergeDeep)(this.options,t),this},t.prototype.getChat=function(t){return this.widgets[t]},t.prototype.getWidget=function(t){return this.widgets[t]},t.prototype.create=function(t,e,n,s){var c=(0,o.mergeDeep)(this.options,e);a(c);var u=this.widgets[t]=new i.SmartsuppWidget(t,c,n);return u._initPromise=(0,o.request)("".concat(c.bootstrapUrl,"/widget/").concat(c.key,".json")).then((function(t){var n=(0,o.parseJSON)(t);return delete e.features,u.init((0,o.mergeDeep)(n,e),n.features),e&&e.widgetTrackerEnabled&&(0,r.trackOptions)(u.options,Object.keys(e)),window.smartsupp.getAssetUrl=u.getAssetUrl.bind(u),s&&s(void 0,u),u.options.renderTo&&u.render(u.options.renderTo),null})).catch((function(t){s&&s(t)})),u},t.prototype.createWidget=function(t,e,n){var s=this,c=(0,o.mergeDeep)(this.options,e);return a(c),(0,o.request)("".concat(c.bootstrapUrl,"/widget/").concat(c.key,".json")).then((function(a){var u=(0,o.parseJSON)(a),l=s.widgets[t]=new i.SmartsuppWidget(t,c,n);return delete e.features,l.init((0,o.mergeDeep)(u,e),u.features),e&&e.widgetTrackerEnabled&&(0,r.trackOptions)(l.options,Object.keys(e)),window.smartsupp.getAssetUrl=l.getAssetUrl.bind(l),l}))},t}();e.SmartsuppLoader=s;var a=function(t){if(!t.bootstrapUrl)throw new Error("Missing option bootstrapUrl");if(!t.key)throw new Error("Missing option key")}},521:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0||a.indexOf(window.location.hostname)>=0)return[2,!1];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,i.request)(t.widgetTrackerUrl+"/track/operation?key=".concat(t.key,"&operation=").concat(e,"&domain=").concat(window.location.hostname))];case 2:return n.sent(),[2,!0];case 3:return n.sent(),[2,!1];case 4:return[2]}}))}))},e.trackOptions=function(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:if(!t.widgetTrackerUrl||a.indexOf(window.location.hostname)>=0)return[2,!1];if(0===(n=e.filter((function(t){return c.indexOf(t)<0}))).length)return[2,!1];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,i.request)(t.widgetTrackerUrl+"/track/options?key=".concat(t.key,"&options=").concat(n.join(","),"&domain=").concat(window.location.hostname))];case 2:return r.sent(),[2,!0];case 3:return r.sent(),[2,!1];case 4:return[2]}}))}))}},416:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseJSON=e.request=e.createLink=e.createScript=e.resolveTargetElement=e.mergeDeep=void 0;var n=function(t){return t&&"object"==typeof t};e.mergeDeep=function(){for(var t=[],r=0;r=200&&e.status<300?n(e.response):r(new Error("Request failed with status ".concat(e.status))))},e.open("GET",t,!0),e.setRequestHeader("Content-Type","text/plain"),e.send()}))},e.parseJSON=function(t){if(JSON.parse)return JSON.parse(t);if(JSON.decode)return JSON.decode(t);throw new Error("Unable to parse json.")}},35:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]';var l="src/main.ts",p=function(t){var n=(0,s.createScript)(a,e.getBaseUrl()+"/".concat(t));n.type="module",c.appendChild(n)},f=function(t){var n=(0,s.createLink)(a,"".concat(e.getBaseUrl(),"/").concat(t));n.rel="stylesheet",n.crossOrigin="anonymous",c.appendChild(n)};e.options.widgetV3DevMode?["@vite/client",l].forEach(p):r(e,void 0,void 0,(function(){var t,n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,(0,s.request)("".concat(this.getBaseUrl(),"/manifest.json")).then((function(t){return(0,s.parseJSON)(t)}))];case 1:return t=o.sent(),n=t[l],p(n.file),null===(r=n.imports)||void 0===r||r.forEach((function(n){var r,o;r=t[n].file,(o=(0,s.createLink)(a,"".concat(e.getBaseUrl(),"/").concat(r))).rel="modulepreload",c.appendChild(o)})),null===(i=n.css)||void 0===i||i.forEach(f),f(t["style.css"].file),[2]}}))}))})),t.appendChild(n)},t.prototype.destroy=function(){this.el&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null)},t.prototype.getOption=function(t,e){return void 0!==this.options[t]?this.options[t]:e},t.prototype.getBaseUrl=function(){return this.options.widgetV3Url},t.prototype.getAssetUrl=function(t){return"".concat(this.getBaseUrl(),"/").concat(t)},t.prototype.getInternalApiUrl=function(){return"".concat(this.options.bootstrapUrl,"/widget/").concat(this.options.key,"/code.js")},t.prototype.exec=function(){for(var t=[],e=0;e{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";n(412);var t=n(228),e=n(42);if(window.smartsupp||(window.smartsupp=function(){window.smartsupp._.push(arguments)},window.smartsupp._=[]),!window.SMARTSUPP_LOADED){window.SMARTSUPP_LOADED=!0;var r=new e.SmartsuppLoader({widgetVersion:3,bootstrapUrl:"https://bootstrap.smartsuppchat.com",filesUrl:"https://files.smartsuppcdn.com",widgetV3Url:"https://widget-v3.smartsuppcdn.com",storageUrl:"https://{key}.storage.smartsuppchat.com",widgetApiUrl:"https://api.smartsuppchat.com",zIndex:1e7,position:"auto",orientation:"right",autoInlineMode:!0,widgetV3DevMode:!1});window.$smartsupp=r,window.smartsupp=Object.assign(window.smartsupp,{chats:r.widgets,create:r.create.bind(r),createWidget:r.createWidget.bind(r),getChat:r.getChat.bind(r),getWidget:r.getWidget.bind(r),setDefaults:r.setDefaults.bind(r)}),!1!==window.SMARTSUPP_AUTOCREATE&&t((function(){window.smartsupp("html:apply",document),r.createWidget("chat",window._smartsupp,window.smartsupp._).then((function(t){return t.render()})).catch((function(t){console.warn(t)}))}))}})()})();