/*! For license information please see project.js.LICENSE.txt */ !function(){"use strict";var t={}.toString,e=function(e){return t.call(e).slice(8,-1)},r=Array.isArray||function(t){return"Array"==e(t)},n=function(t){return"object"==typeof t?null!==t:"function"==typeof t},i=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},o=function(t){return Object(i(t))},s=Math.ceil,a=Math.floor,u=function(t){return isNaN(t=+t)?0:(t>0?a:s)(t)},c=Math.min,l=function(t){return t>0?c(u(t),9007199254740991):0},f=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")},d=function(t){try{return!!t()}catch(t){return!0}},h=!d((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),p="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),m=p.document,b=n(m)&&n(m.createElement),g=function(t){return b?m.createElement(t):{}},y=!h&&!d((function(){return 7!=Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a})),v=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t},w=Object.defineProperty,S={f:h?w:function(t,e,r){v(t);e=f(e,!0);v(r);if(y)try{return w(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");"value"in r&&(t[e]=r.value);return t}},E=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=function(t,e,r){var n=f(e);n in t?S.f(t,n,E(0,r)):t[n]=r};"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function A(t,e){return t(e={exports:{}},e.exports),e.exports}var F,O,x,C=h?function(t,e,r){return S.f(t,e,E(1,r))}:function(t,e,r){t[e]=r;return t},j=function(t,e){try{C(p,t,e)}catch(r){p[t]=e}return e},L=!1,N=A((function(t){var e="__core-js_shared__",r=p[e]||j(e,{});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.0.1",mode:L?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),I=0,R=Math.random(),k=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++I+R).toString(36))},P=!d((function(){return!String(Symbol())})),_=N("wks"),$=p.Symbol,U=function(t){return _[t]||(_[t]=P&&$[t]||(P?$:k)("Symbol."+t))},B=U("species"),M=function(t,e){var i;r(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[B])&&(i=void 0):i=void 0);return new(void 0===i?Array:i)(0===e?0:e)},D=U("species"),q=function(t){return!d((function(){var e=[];(e.constructor={})[D]=function(){return{foo:1}};return 1!==e[t](Boolean).foo}))},V={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,Q={f:z&&!V.call({1:2},1)?function(t){var e=z(this,t);return!!e&&e.enumerable}:V},H="".split,G=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==e(t)?H.call(t,""):Object(t)}:Object,W=function(t){return G(i(t))},K={}.hasOwnProperty,J=function(t,e){return K.call(t,e)},Y=Object.getOwnPropertyDescriptor,X={f:h?Y:function(t,e){t=W(t);e=f(e,!0);if(y)try{return Y(t,e)}catch(t){}if(J(t,e))return E(!Q.f.call(t,e),t[e])}},Z=N("native-function-to-string",Function.toString),tt=p.WeakMap,et="function"==typeof tt&&/native code/.test(Z.call(tt)),rt=N("keys"),nt=function(t){return rt[t]||(rt[t]=k(t))},it={},ot=p.WeakMap,st=function(t){return x(t)?O(t):F(t,{})},at=function(t){return function(e){var r;if(!n(e)||(r=O(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}};if(et){var ut=new ot,ct=ut.get,lt=ut.has,ft=ut.set;F=function(t,e){ft.call(ut,t,e);return e};O=function(t){return ct.call(ut,t)||{}};x=function(t){return lt.call(ut,t)}}else{var dt=nt("state");it[dt]=!0;F=function(t,e){C(t,dt,e);return e};O=function(t){return J(t,dt)?t[dt]:{}};x=function(t){return J(t,dt)}}var ht={set:F,get:O,has:x,enforce:st,getterFor:at},pt=(ht.set,ht.get,ht.has,ht.enforce,ht.getterFor,A((function(t){var e=ht.get,r=ht.enforce,n=String(Z).split("toString");N("inspectSource",(function(t){return Z.call(t)}));(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet;if("function"==typeof i){"string"!=typeof e||J(i,"name")||C(i,"name",e);r(i).source=n.join("string"==typeof e?e:"")}if(t!==p){s?!u&&t[e]&&(a=!0):delete t[e];a?t[e]=i:C(t,e,i)}else a?t[e]=i:j(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||Z.call(this)}))}))),mt=Math.max,bt=Math.min,gt=function(t,e){var r=u(t);return r<0?mt(r+e,0):bt(r,e)},yt=function(t){return function(e,r,n){var i,o=W(e),s=l(o.length),a=gt(n,s);if(t&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}}(!1),vt=function(t,e){var r,n=W(t),i=0,o=[];for(r in n)!J(it,r)&&J(n,r)&&o.push(r);for(;e.length>i;)J(n,r=e[i++])&&(~yt(o,r)||o.push(r));return o},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],St=wt.concat("length","prototype"),Et={f:Object.getOwnPropertyNames||function(t){return vt(t,St)}},Tt={f:Object.getOwnPropertySymbols},At=p.Reflect,Ft=At&&At.ownKeys||function(t){var e=Et.f(v(t)),r=Tt.f;return r?e.concat(r(t)):e},Ot=function(t,e){for(var r=Ft(e),n=S.f,i=X.f,o=0;o$t)throw TypeError(Ut);for(r=0;r=$t)throw TypeError(Ut);T(u,c++,s)}u.length=c;return u}});var qt=U("toStringTag"),Vt="Arguments"==e(function(){return arguments}()),zt=function(t,e){try{return t[e]}catch(t){}},Qt=function(t){var r,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=zt(r=Object(t),qt))?n:Vt?e(r):"Object"==(i=e(r))&&"function"==typeof r.callee?"Arguments":i},Ht={};Ht[U("toStringTag")]="z";var Gt="[object z]"!==String(Ht)?function(){return"[object "+Qt(this)+"]"}:Ht.toString,Wt=Object.prototype;Gt!==Wt.toString&&pt(Wt,"toString",Gt,{unsafe:!0});var Kt=S.f,Jt=U("toStringTag"),Yt=function(t,e,r){t&&!J(t=r?t:t.prototype,Jt)&&Kt(t,Jt,{configurable:!0,value:e})},Xt={f:U},Zt=p,te=S.f,ee=function(t){var e=Zt.Symbol||(Zt.Symbol={});J(e,t)||te(e,t,{value:Xt.f(t)})},re=Object.keys||function(t){return vt(t,wt)},ne=function(t){var e=re(t),r=Tt.f;if(r)for(var n,i=r(t),o=Q.f,s=0;i.length>s;)o.call(t,n=i[s++])&&e.push(n);return e},ie=h?Object.defineProperties:function(t,e){v(t);for(var r,n=re(e),i=n.length,o=0;i>o;)S.f(t,r=n[o++],e[r]);return t},oe=p.document,se=oe&&oe.documentElement,ae=nt("IE_PROTO"),ue="prototype",ce=function(){},le=function(){var t,e=g("iframe"),r=wt.length,n="<",i="script",o=">",s="java"+i+":";e.style.display="none";se.appendChild(e);e.src=String(s);(t=e.contentWindow.document).open();t.write(n+i+o+"document.F=Object"+n+"/"+i+o);t.close();le=t.F;for(;r--;)delete le[ue][wt[r]];return le()},fe=Object.create||function(t,e){var r;if(null!==t){ce[ue]=v(t);r=new ce;ce[ue]=null;r[ae]=t}else r=le();return void 0===e?r:ie(r,e)};it[ae]=!0;var de=Et.f,he={}.toString,pe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],me=function(t){try{return de(t)}catch(t){return pe.slice()}},be={f:function(t){return pe&&"[object Window]"==he.call(t)?me(t):de(W(t))}},ge=nt("hidden"),ye="Symbol",ve=ht.set,we=ht.getterFor(ye),Se=X.f,Ee=S.f,Te=be.f,Ae=p.Symbol,Fe=p.JSON,Oe=Fe&&Fe.stringify,xe="prototype",Ce=U("toPrimitive"),je=Q.f,Le=N("symbol-registry"),Ne=N("symbols"),Ie=N("op-symbols"),Re=N("wks"),ke=Object[xe],Pe=p.QObject,_e=!Pe||!Pe[xe]||!Pe[xe].findChild,$e=h&&d((function(){return 7!=fe(Ee({},"a",{get:function(){return Ee(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Se(ke,e);n&&delete ke[e];Ee(t,e,r);n&&t!==ke&&Ee(ke,e,n)}:Ee,Ue=function(t,e){var r=Ne[t]=fe(Ae[xe]);ve(r,{type:ye,tag:t,description:e});h||(r.description=e);return r},Be=P&&"symbol"==typeof Ae.iterator?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Ae},Me=function(t,e,r){t===ke&&Me(Ie,e,r);v(t);e=f(e,!0);v(r);if(J(Ne,e)){if(r.enumerable){J(t,ge)&&t[ge][e]&&(t[ge][e]=!1);r=fe(r,{enumerable:E(0,!1)})}else{J(t,ge)||Ee(t,ge,E(1,{}));t[ge][e]=!0}return $e(t,e,r)}return Ee(t,e,r)},De=function(t,e){v(t);for(var r,n=ne(e=W(e)),i=0,o=n.length;o>i;)Me(t,r=n[i++],e[r]);return t},qe=function(t,e){return void 0===e?fe(t):De(fe(t),e)},Ve=function(t){var e=je.call(this,t=f(t,!0));return!(this===ke&&J(Ne,t)&&!J(Ie,t))&&(!(e||!J(this,t)||!J(Ne,t)||J(this,ge)&&this[ge][t])||e)},ze=function(t,e){t=W(t);e=f(e,!0);if(t!==ke||!J(Ne,e)||J(Ie,e)){var r=Se(t,e);!r||!J(Ne,e)||J(t,ge)&&t[ge][e]||(r.enumerable=!0);return r}},Qe=function(t){for(var e,r=Te(W(t)),n=[],i=0;r.length>i;)J(Ne,e=r[i++])||J(it,e)||n.push(e);return n},He=function(t){for(var e,r=t===ke,n=Te(r?Ie:W(t)),i=[],o=0;n.length>o;)!J(Ne,e=n[o++])||r&&!J(ke,e)||i.push(Ne[e]);return i};if(!P){Ae=function(){if(this instanceof Ae)throw TypeError("Symbol is not a constructor");var t=void 0===arguments[0]?void 0:String(arguments[0]),e=k(t),r=function(t){this===ke&&r.call(Ie,t);J(this,ge)&&J(this[ge],e)&&(this[ge][e]=!1);$e(this,e,E(1,t))};h&&_e&&$e(ke,e,{configurable:!0,set:r});return Ue(e,t)};pt(Ae[xe],"toString",(function(){return we(this).tag}));Q.f=Ve;S.f=Me;X.f=ze;Et.f=be.f=Qe;Tt.f=He;if(h){Ee(Ae[xe],"description",{configurable:!0,get:function(){return we(this).description}});L||pt(ke,"propertyIsEnumerable",Ve,{unsafe:!0})}Xt.f=function(t){return Ue(U(t),t)}}Pt({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ae});for(var Ge=re(Re),We=0;Ge.length>We;)ee(Ge[We++]);Pt({target:ye,stat:!0,forced:!P},{for:function(t){return J(Le,t+="")?Le[t]:Le[t]=Ae(t)},keyFor:function(t){if(!Be(t))throw TypeError(t+" is not a symbol");for(var e in Le)if(Le[e]===t)return e},useSetter:function(){_e=!0},useSimple:function(){_e=!1}});Pt({target:"Object",stat:!0,forced:!P,sham:!h},{create:qe,defineProperty:Me,defineProperties:De,getOwnPropertyDescriptor:ze});Pt({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:Qe,getOwnPropertySymbols:He});Fe&&Pt({target:"JSON",stat:!0,forced:!P||d((function(){var t=Ae();return"[null]"!=Oe([t])||"{}"!=Oe({a:t})||"{}"!=Oe(Object(t))}))},{stringify:function(t){for(var e,i,o=[t],s=1;arguments.length>s;)o.push(arguments[s++]);i=e=o[1];if((n(e)||void 0!==t)&&!Be(t)){r(e)||(e=function(t,e){"function"==typeof i&&(e=i.call(this,t,e));if(!Be(e))return e});o[1]=e;return Oe.apply(Fe,o)}}});Ae[xe][Ce]||C(Ae[xe],Ce,Ae[xe].valueOf);Yt(Ae,ye);it[ge]=!0;ee("asyncIterator");var Ke=S.f,Je=p.Symbol;if(h&&"function"==typeof Je&&(!("description"in Je.prototype)||void 0!==Je().description)){var Ye={},Xe=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Xe?new Je(t):void 0===t?Je():Je(t);""===t&&(Ye[e]=!0);return e};Ot(Xe,Je);var Ze=Xe.prototype=Je.prototype;Ze.constructor=Xe;var tr=Ze.toString,er="Symbol(test)"==String(Je("test")),rr=/^Symbol\((.*)\)[^)]+$/;Ke(Ze,"description",{configurable:!0,get:function(){var t=n(this)?this.valueOf():this,e=tr.call(t);if(J(Ye,t))return"";var r=er?e.slice(7,-1):e.replace(rr,"$1");return""===r?void 0:r}});Pt({global:!0,forced:!0},{Symbol:Xe})}ee("hasInstance");ee("isConcatSpreadable");ee("iterator");ee("match");ee("replace");ee("search");ee("species");ee("split");ee("toPrimitive");ee("toStringTag");ee("unscopables");Yt(Math,"Math",!0);Yt(p.JSON,"JSON",!0);Zt.Symbol;var nr=Object.assign,ir=!nr||d((function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";t[r]=7;n.split("").forEach((function(t){e[t]=t}));return 7!=nr({},t)[r]||re(nr({},e)).join("")!=n}))?function(t,e){for(var r=o(t),n=arguments.length,i=1,s=Tt.f,a=Q.f;n>i;)for(var u,c=G(arguments[i++]),l=s?re(c).concat(s(c)):re(c),f=l.length,d=0;f>d;)a.call(c,u=l[d++])&&(r[u]=c[u]);return r}:nr;Pt({target:"Object",stat:!0,forced:Object.assign!==ir},{assign:ir});var or=U("species"),sr=[].slice,ar=Math.max;Pt({target:"Array",proto:!0,forced:!q("slice")},{slice:function(t,e){var i,o,s,a=W(this),u=l(a.length),c=gt(t,u),f=gt(void 0===e?u:e,u);if(r(a)){"function"!=typeof(i=a.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[or])&&(i=void 0):i=void 0;if(i===Array||void 0===i)return sr.call(a,c,f)}o=new(void 0===i?Array:i)(ar(f-c,0));for(s=0;c1)for(var r=1;r=0?["interactive","complete"].indexOf(document.readyState)>=0&&e():e()}function n(t){if(r())t();else{var e=function e(r){t();document.removeEventListener("DOMContentLoaded",e,!1)};document.addEventListener("DOMContentLoaded",e,!1)}}t.onReady=function(e){n((function(){setTimeout((function(){e(t)}),1)}))};n((function(){var e=function(){var t=document.createElement("iframe");t.style.display="none";t.style.visibility="hidden";t.setAttribute("owner","archetype");t.setAttribute("title","archetype");document.body.appendChild(t);return t}().contentWindow,r=e.Function.prototype.toString,n=e.Object.prototype.toString,i=/^\[object .+?Constructor\]$/,o=new RegExp("^"+String(n).replace(/[.*+?^${}()|[\]\/\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),s=/__archetype_bound_method__/,a={top:{window:window,document:window.document},safe:{window:e,document:e.document}};function u(t,e){return function(){return t.apply(e,arguments)}}function c(t,e,r){e=e||a.top;var n,i=t.split("."),o=i.shift();if(!0!==e.hasOwnProperty(o))throw new Error("Invalid path: "+t);i.unshift(e[o]);var s=i.reduce((function(t,e){if(t&&t[e]){n=t;return t[e]}}));r=r||n;return s&&r?{method:s,context:r}:void 0}function l(t){var e=typeof t,a="function"===e?r.call(t):null;return a?s.test(a)||o.test(a):t&&"object"==e&&i.test(n.call(t))||!1}function f(t,e){var r=c(t,e);return!!r&&l(r.method)}function d(t,e){var r,n,i=t.split("."),o=i.shift();if(!0!==a.top.hasOwnProperty(o))throw new Error("Invalid path: "+t);if(i.length<1)throw new Error("Invalid path - not specific enough: "+t);r=a.top[o];for(;i.length>1;){if(!r[n=i.shift()])throw new Error("Unknown method: "+t);r=r[n]}r[i.shift()]=e}t.getNativeMethod=function(e,r){var n=c(e);r=r||n.context;if(!n)throw new Error("Unknown method (top window): "+e);if(n&&!t.isNative(n.method)){if(!(n=c(e,a.safe,n.context)))throw new Error("Unknown method (safe window): "+e);if(n&&!t.isNative(n.method))throw new Error("Failed finding a native method for: "+e)}return u(n.method,r)};t.isNative=function(t){return"string"==typeof t?f(t):l(t)};t.patchMethod=function(e){d(e,t.getNativeMethod(e))};t.getWindow=function(){return a.safe.window}}));return t},void 0!==(i="function"==typeof(n=o)?n.call(e,r,e,t):n)&&(t.exports=i)},"3eCO":function(t,e,r){var n,i=r("5CtL");n=function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){"use strict";function n(t){var e=new s(t),r=o(s.prototype.request,e);return i.extend(r,s.prototype,e),i.extend(r,e),r}var i=r(2),o=r(3),s=r(5),a=r(22),u=n(r(11));u.Axios=s,u.create=function(t){return n(a(u.defaults,t))},u.Cancel=r(23),u.CancelToken=r(24),u.isCancel=r(10),u.all=function(t){return Promise.all(t)},u.spread=r(25),t.exports=u,t.exports.default=u},function(t,e,r){"use strict";function n(t){return"[object Array]"===F.call(t)}function i(t){return"[object ArrayBuffer]"===F.call(t)}function o(t){return"undefined"!=typeof FormData&&t instanceof FormData}function s(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function a(t){return"string"==typeof t}function u(t){return"number"==typeof t}function c(t){return void 0===t}function l(t){return null!==t&&"object"==typeof t}function f(t){return"[object Date]"===F.call(t)}function d(t){return"[object File]"===F.call(t)}function h(t){return"[object Blob]"===F.call(t)}function p(t){return"[object Function]"===F.call(t)}function m(t){return l(t)&&p(t.pipe)}function b(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function g(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function v(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),n(t))for(var r=0,i=t.length;r=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),s.forEach(["post","put","patch"],(function(t){c.headers[t]=s.merge(u)})),t.exports=c},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},function(t,e,r){"use strict";var n=r(2),i=r(14),o=r(6),s=r(17),a=r(18),u=r(15);t.exports=function(t){return new Promise((function(e,c){var l=t.data,f=t.headers;n.isFormData(l)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",p=t.auth.password||"";f.Authorization="Basic "+btoa(h+":"+p)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:t,request:d};i(e,c,n),d=null}},d.onabort=function(){d&&(c(u("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",t,null,d)),d=null},d.ontimeout=function(){c(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var m=r(19),b=(t.withCredentials||a(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;b&&(f[t.xsrfHeaderName]=b)}if("setRequestHeader"in d&&n.forEach(f,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)})),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),c(t),d=null)})),void 0===l&&(l=null),d.send(l)}))}},function(t,e,r){"use strict";var n=r(15);t.exports=function(t,e,r){var i=r.config.validateStatus;!i||i(r.status)?t(r):e(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(t,e,r){"use strict";var n=r(16);t.exports=function(t,e,r,i,o){var s=new Error(t);return n(s,e,r,i,o)}},function(t,e){"use strict";t.exports=function(t,e,r,n,i){return t.config=e,r&&(t.code=r),t.request=n,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,r){"use strict";var n=r(2),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,o,s={};return t?(n.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=n.trim(t.substr(0,o)).toLowerCase(),r=n.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}})),s):s}},function(t,e,r){"use strict";var n=r(2);t.exports=n.isStandardBrowserEnv()?function(){function t(t){var e=t;return r&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(r){var i=n.isString(r)?t(r):r;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(2);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(2);t.exports=function(t,e){e=e||{};var r={};return n.forEach(["url","method","params","data"],(function(t){void 0!==e[t]&&(r[t]=e[t])})),n.forEach(["headers","auth","proxy"],(function(i){n.isObject(e[i])?r[i]=n.deepMerge(t[i],e[i]):void 0!==e[i]?r[i]=e[i]:n.isObject(t[i])?r[i]=n.deepMerge(t[i]):void 0!==t[i]&&(r[i]=t[i])})),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(n){void 0!==e[n]?r[n]=e[n]:void 0!==t[n]&&(r[n]=t[n])})),r}},function(t,e){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,r){"use strict";function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new i(t),e(r.reason))}))}var i=r(23);n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}}])},t.exports=n()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};t[n].call(o.exports,o,o.exports,r);return o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};r.d(e,{a:e});return e};r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};!function(){"use strict";const t="COLLECTED_FORMS_DEBUG",e="LEADIN_DEBUG",n="[collected-forms-embed-js]",i="EmbedError: ",o="KeyedError: ",s="StepError: ",a="ClientError: ",u=t=>{try{return localStorage.getItem(t)}catch(t){return null}},c=(t,e)=>{try{localStorage.setItem(t,e);return!0}catch(t){return!1}},l=t=>{try{return localStorage.removeItem(t)}catch(t){return null}},f=()=>{try{return"true"===u(t)||"true"===u(e)}catch(t){return!1}},d=(...t)=>f()&&console.debug(n,...t),h=(...t)=>f()&&console.warn(n,...t),p=(...t)=>d(o,...t),m=(...t)=>d(s,...t),b=(...t)=>d(a,...t),g=(...t)=>console.debug(n,i,...t);var y=t=>{let e=null;const r=()=>{if(null!==e)return e;e=t();return e};r.cache={clear:()=>{e=null}};return r},v={mode:"compressed",staticDomainPrefix:"//static.hsappstatic.net",bender:{depVersions:{"collected-forms-embed-js":"static-1.885","browserslist-config-hubspot":"static-1.115",csstype:"static-1.8","forms-embed-utils-lib":"static-1.632","hs-test-utils":"static-1.3420",jasmine:"static-4.509","jasmine-runner":"static-1.1958",outpost:"static-1.661",quartz:"static-1.2441",react:"static-7.123","react-dom":"static-7.85",sinon:"static-1.9",StyleGuideUI:"static-3.402","testing-library":"static-1.100"},depPathPrefixes:{"collected-forms-embed-js":"/collected-forms-embed-js/static-1.885","browserslist-config-hubspot":"/browserslist-config-hubspot/static-1.115",csstype:"/csstype/static-1.8","forms-embed-utils-lib":"/forms-embed-utils-lib/static-1.632","hs-test-utils":"/hs-test-utils/static-1.3420",jasmine:"/jasmine/static-4.509","jasmine-runner":"/jasmine-runner/static-1.1958",outpost:"/outpost/static-1.661",quartz:"/quartz/static-1.2441",react:"/react/static-7.123","react-dom":"/react-dom/static-7.85",sinon:"/sinon/static-1.9",StyleGuideUI:"/StyleGuideUI/static-3.402","testing-library":"/testing-library/static-1.100"},project:"collected-forms-embed-js",staticDomain:"//static.hsappstatic.net",staticDomainPrefix:"//static.hsappstatic.net"}};const w="data-hsjs-portal",S="data-hsjs-env",E="data-hsjs-hublet",T="Cannot identify portalId of loaded script. No elements matching `script[data-hsjs-portal]` found on page.",A="Cannot fetch config response",F="There was an error parsing the stored submission",O="Form capture is not enabled",x="Form submission with GET failed",C="There was an error building the submission",j="Browser is not supported.",L="Invalid portalId",N=["Multiple collected forms scripts are trying to run on the current page.","Only the first one will be executed. The rest are ignored.","Read more at http://hubs.ly/H03mDPb0"].join("\n");class I{constructor(t,e,r={}){this.key=t;this.err=e;this.extra=r}}var R=I,k=r("3fnM"),P=r.n(k);const _=(t,...e)=>{try{return P().getNativeMethod(`document.${t}`,document)(...e)}catch(r){return document[t].apply(document,e)}};class ${constructor(){this._bindMethod("getElementsByTagName");this._bindMethod("querySelector");this._bindMethod("querySelectorAll");this._bindMethod("getElementsByClassName");this._bindMethod("elementQuerySelectorAll");this._bindMethod("elementQuerySelectorAll",((t,...e)=>{try{return P().getWindow().Element.prototype.querySelectorAll.apply(t,e)}catch(r){try{return window.Element.prototype.querySelectorAll.apply(t,e)}catch(r){return t.querySelectorAll(...e)}}}))}_bindMethod(t,e=((...e)=>_(t,...e))){this[t]=e}setup(){return new Promise(((t,e)=>{setTimeout(t,50);return Promise.resolve(this.onReady()).then(t,e)}))}onReady(){return new Promise((t=>{P().onReady(t)}))}}var U=new $;const B=t=>0===t.getAttribute("id").indexOf("CollectedForms-"),M=t=>{let e;const r=U.querySelectorAll(`script[${t}]`);try{e=Array.prototype.slice.call(r).filter(B)[0]}catch(t){e=r[0]}return e?e.getAttribute(t):null},D=y((()=>{const t=M(w),e=parseInt(t,10);if(!e)throw new R(T);return e})),q=()=>M(S),V=()=>M(E),z=(y((()=>"prod"===q()||!1)),y((()=>"qa"===q()||!1))),Q=()=>v.bender.project,H=()=>`${v.bender.project}-${v.bender.depVersions[v.bender.project]}`,G=t=>{t=t||navigator.userAgent;const e=/\b(MSIE |Trident.*?rv:|Edge\/)(\d+)/.exec(t);return e?parseInt(e[2],10):null},W=()=>{const t=G();return!t||t>=11},K=()=>{try{window.localStorage.getItem("");return!0}catch(t){return!1}},J=()=>void 0!==Function.prototype.bind,Y=function(){return!W()||!K()||!J()},X="hubspotutk",Z=t=>{const e=document.cookie.match(`(^|[^;]+)\\s*${t}\\s*=\\s*([^;]+)`);return e?e.pop():""},tt=y((()=>Z(X))),et={utk:null},rt=()=>{window._hsq=window._hsq||[];window._hsq.push(["addUserTokenListener",function(t){et.utk=t;return d(`Got utk from analytics: ${t}`)}])},nt=()=>et.utk||tt(),it="na1";function ot(t=""){return t&&t!==it?`-${t}`:""}const st={qa:"hsformsqa.com",prod:"hsforms.com"},at={qa:"hscollectedformsqa.net",prod:"hscollectedforms.net"},ut=t=>`forms${ot(t)}`,ct=t=>`js${ot(t)}`,lt=t=>t?st.qa:st.prod,ft=t=>t?at.qa:at.prod,dt=(t=!1,e="")=>`https://${ut(e)}.${lt(t)}`,ht=(t=!1,e="")=>`https://${ut(e)}.${ft(t)}`,pt=(t=!1,e="")=>`https://${ut(e)}.${ft(t)}`,mt=(t=!1,e="")=>`https://${ct(e)}.${ft(t)}`,bt=t=>e=>e.stack.split("\n")[1].indexOf(t)>-1,gt=t=>bt("webpack://")(t),yt=t=>bt(mt(z(),V()))(t),vt=t=>gt(t)||yt(t);class wt{constructor(t){this.error=t}}var St=wt;const Et="form-bind",Tt="submit-event",At="submit-schedule-event",Ft="error-caught";var Ot=r("3eCO"),xt=r.n(Ot);const Ct="collected-forms/v1/config/json";class jt{constructor(t,{isQa:e=!1,hublet:r=""}={}){this.portalId=t;this.url=`${ht(e,r)}/${Ct}`}getDefaultConfig(){return{formCaptureEnabled:!1}}fetch(){return xt().get(this.url,{params:{portalId:this.portalId,utk:nt()}}).then((t=>{if("object"!=typeof t.data)throw t;return t})).then((({data:{formCaptureEnabled:t=!1,token:e}})=>Object.assign({formCaptureEnabled:t},e?{token:e}:{})))}}var Lt=jt;const Nt=1500,It="li_submission";function Rt(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r])}return i}const kt=["uuid"],Pt={CONTACT_FIELDS:"contactFields",FORM_SELECTOR_CLASSES:"formSelectorClasses",FORM_SELECTOR_ID:"formSelectorId",FORM_ATTRIBUTES:"formAttributes",FORM_VALUES:"formValues",FIELDS:"fields",LABEL_TO_NAME_MAP:"labelToNameMap",PAGE_ID:"pageId",PAGE_TITLE:"pageTitle",PAGE_URL:"pageUrl",PORTAL_ID:"portalId",TOKEN:"token",TYPE:"type",UTK:"utk",UUID:"uuid",VERSION:"version"};class _t{static fromJson(t){const e=JSON.parse(t);if(null==e||"object"!=typeof e)return null;const r=new _t;Object.keys(e).forEach((t=>r.set(t,e[t])));return r}get(t){return this[t]}set(t,e){this[t]=e;return this}serialize(){return Object.assign({contactFields:Object.keys(this.get(Pt.CONTACT_FIELDS)||{}).reduce(((t,e)=>Object.assign({},t,{[e]:this.get(Pt.CONTACT_FIELDS)[e].value})),{}),formSelectorClasses:this.get(Pt.FORM_SELECTOR_CLASSES),formSelectorId:this.get(Pt.FORM_SELECTOR_ID),formValues:(this.get(Pt.FIELDS)||[]).reduce(((t,e)=>Object.assign({},t,{[e.label]:e.value})),{}),labelToNameMap:(this.get(Pt.FIELDS)||[]).reduce(((t,e)=>Object.assign({},t,{[e.label]:e.name})),{}),pageId:this.get(Pt.PAGE_ID),pageTitle:this.get(Pt.PAGE_TITLE),pageUrl:this.get(Pt.PAGE_URL),portalId:this.get(Pt.PORTAL_ID),token:this.get(Pt.TOKEN),type:this.get(Pt.TYPE),utk:this.get(Pt.UTK),uuid:this.get(Pt.UUID),version:this.get(Pt.VERSION)},(r=(this.get(Pt.FORM_ATTRIBUTES)||{}).id)&&{collectedFormId:r},(e=(this.get(Pt.FORM_ATTRIBUTES)||{}).class)&&{collectedFormClasses:e},(t=(this.get(Pt.FORM_ATTRIBUTES)||{}).action)&&{collectedFormAction:t});var t,e,r}getHash(){const t=Rt(this,kt);return JSON.stringify(t)}}var $t=_t;class Ut{get(){const t=u(It);if(!t)return null;try{return $t.fromJson(t)}catch(t){throw new R(F,t)}}clear(){l(It)}add(t){c(It,JSON.stringify(t))}}var Bt=new Ut;class Mt{constructor(t){this.request=t}getStatus(){return this.request.status}isDone(){return this.request.readyState===XMLHttpRequest.DONE}isSuccessful(){return this.isDone()&&this.request.status>=200&&this.request.status<300}isFailed(){return this.isDone()&&!this.isSuccessful()}}var Dt=Mt;const qt="collected-forms/submit/form";class Vt{constructor({isQa:t=!1,hublet:e=""}={}){this.url=`${pt(t,e)}/${qt}`}handleSubmitSuccess(){d("Successfully submitted form submission");return Promise.resolve()}handleSubmitExpectedFailure(){d("Deleting saved submission because we got a 400 response from the server");return Promise.resolve()}submitWithGet(t){return new Promise(((e,r)=>{const n=encodeURIComponent(JSON.stringify(t)),i=new Image;i.src=`${this.url}/submit.gif?formSubmission=${n}`;i.onload=()=>e(this.handleSubmitSuccess());i.onerror=t=>r(new R(x,t))}))}submitWithXHR(t){return new Promise(((e,r)=>{const n=new XMLHttpRequest,i=new Dt(n);n.onreadystatechange=()=>{const t=i.getStatus()>=400&&i.getStatus()<500;if(!i.isDone())return null;if(i.isSuccessful())return e(this.handleSubmitSuccess());if(t)return e(this.handleSubmitExpectedFailure());d(`Failed to submit form via XHR. Got HTTP ${i.getStatus()} for submission`);return r()};n.open("POST",this.url,!0);n.setRequestHeader("Content-type","application/json");n.send(JSON.stringify(t))}))}submit(t){const e=t.serialize();d(`Submitting form submission to ${this.url}`,e);return this.submitWithXHR(e).catch((()=>{d("Falling back to submission with GET");return this.submitWithGet(e)}))}}var zt=Vt;class Qt{constructor({isQa:t=!1,hublet:e=""}={}){this.seenMap={};this.isSubmitting=!1;this.timeoutToSubmit=null;this.submitter=new zt({isQa:t,hublet:e})}flushScheduledSubmission(){const t=Bt.get();if(!t||this.isSubmitting)return Promise.resolve();this.isSubmitting=!0;return this.submitter.submit(t).then((()=>{this.isSubmitting=!1;Bt.clear()}))}setTimeoutToSubmit(){return new Promise(((t,e)=>{this.timeoutToSubmit&&clearTimeout(this.timeoutToSubmit);this.timeoutToSubmit=setTimeout((()=>{this.flushScheduledSubmission().then(t).catch(e)}),Nt)}))}scheduleSubmit(t){if(this.seenMap[t.getHash()])return Promise.resolve();Bt.add(t);this.seenMap[t.getHash()]=!0;return this.setTimeoutToSubmit()}}var Ht=Qt;function Gt(){const t=U.getElementsByTagName("form"),e=U.getElementsByClassName("nf-form-cont");return[].concat(Array.prototype.slice.call(t),Array.prototype.slice.call(e))}const Wt="nf-form-cont",Kt="/fsg?pageId",Jt="a.lp-pom-button",Yt='button[type="submit"]',Xt="data-drupal-form-fields",Zt='input[type="submit"].webform-button--submit';function te(t){try{const e=t.getAttribute("data-portal-id");return e?parseInt(e,10):void 0}catch(t){return}}function ee(t){try{return t.getAttribute("action").indexOf("/hs-search-results")>-1}catch(t){return!1}}function re(t){try{return"email-prefs-form"===t.getAttribute("id")}catch(t){return!1}}const ne=[{test:t=>{try{return t.getAttribute("action").indexOf(Kt)>-1}catch(t){return!1}},bind:(t,e)=>{const r=U.querySelector(Jt)||U.querySelector(Yt);if(r){d("Bound to submit button click event for Unbounce form:",{formEl:t});r.addEventListener("click",(()=>e(t)),!1)}else h("Cannot find matching submit button for Unbounce form")}},{test:t=>{try{return t.getAttribute("class").indexOf(Wt)>-1}catch(t){return!1}},bind:(t,e)=>{const r=t.querySelector("div.submit-container");if(!r){h("Cannot find matching submit button for Ninja Forms V3 form");return}const n=r.querySelector("input.ninja-forms-field");if(n){d("Bound to submit button click event for Ninja forms v3 form:",{formEl:t});n.addEventListener("click",(()=>e(t)),!1)}else h("Cannot find matching submit button for Ninja Forms V3 form")}},{test:t=>{try{return t.getAttribute("action").indexOf("weebly.com")>-1}catch(t){return!1}},bind:(t,e)=>{const r=t.querySelector("a");if(r){d("Bound to submit button click event for Weebly form",{formEl:t});r.addEventListener("click",(()=>e(t)),!1)}else h("Cannot find matching submit button for Weebly form")}},{test:t=>{const e=D();return te(t)===e||ee(t)||re(t)},bind:()=>{}},{test:t=>{try{return t.hasAttribute(Xt)}catch(t){return!1}},bind:(t,e)=>{const r=t.querySelector(Zt);if(r){d("Bound to submit button click event for Drupal form:",{formEl:t});r.addEventListener("click",(()=>e(t)),!1)}else h("Cannot find matching submit button for Drupal form")}},{test:t=>{try{return"function"==typeof t.addEventListener}catch(t){return!1}},bind:(t,e)=>{d("Bound to submit event on form:",{formEl:t});t.addEventListener("submit",(()=>e(t)),!1)}}],ie="hs-cf-bound",oe="hs-do-not-collect";var se=t=>{let e=!1,r=!1,n=!1;try{e=t.hasAttribute(oe)||t.hasAttribute(`data-${oe}`);r=t.className.indexOf(oe)>-1;n=t.hasAttribute(ie)||t.hasAttribute(`data-${ie}`)}catch(t){return!0}return!e&&!r&&!n};function ae(t,e){for(let r=0;rwindow.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,16);let ce;var le=t=>{if(!window.MutationObserver)return;const e=e=>{d("New form found",e);t(e)};ce=new MutationObserver((t=>{t.forEach((({addedNodes:t})=>{Array.prototype.slice.call(t).forEach((t=>{"FORM"===t.tagName?e(t):t.getElementsByTagName&&[...t.getElementsByTagName("form")].forEach((t=>{e(t)}))}))}))}));ue((()=>{try{ce.observe(document.body,{attributes:!1,characterData:!1,childList:!0,subtree:!0})}catch(t){d("Unable to add mutation observer")}}))};let fe=null;class de{constructor(){if(!fe){fe=this;fe._submissionCallbacks=[];fe._bindCallback=null;fe._forms=[];this.handleSubmission=this.handleSubmission.bind(this);this.handleBind=this.handleBind.bind(this)}return fe}bind(){Gt().forEach(this.handleBind);le(this.handleBind)}getNumFormsBound(){return fe._forms.length}onSubmission(t){this._submissionCallbacks.push(t)}onBind(t){this._bindCallback=t}handleSubmission(t){this._submissionCallbacks.forEach((e=>e(t)))}handleBind(t){if(ae(t,this.handleSubmission)){t.setAttribute(`data-${ie}`,!0);this._forms.push(t);this._bindCallback&&this._bindCallback(t)}}}const he="outpost",pe="na1";function me(t=""){return t&&t!==pe?`-${t}`:""}const be=(t="")=>`forms${me(t)}`,ge=(t="")=>`exceptions${me(t)}`,ye=(t=!1)=>t?"hubspotqa.com":"hubspot.com",ve=(t=!1)=>t?"hs-embed-reportingqa.com":"hs-embed-reporting.com",we=({hublet:t="",isQa:e=!1}={})=>`https://${be(t)}.${ye(e)}/${he}`,Se=({hublet:t="",isQa:e=!1}={})=>`https://${ge(t)}.${ve(e)}/${he}`;function Ee(t,...e){let r,n=0;t=t||{};for(;n-1)return!0;return!1}function Ae(t){let e="";for(const r in t)t.hasOwnProperty(r)&&(e+=`${r}=${t[r]};`);return e}const Fe=({isEmbedApp:t=!1,env:e="PROD",hublet:r=""})=>{const n="PROD"!==e;return t?Se({isQa:n,hublet:r}):we({isQa:n,hublet:r})};class Oe{constructor(t,e){e=e||{};t||console.warn("The projectName parameter is required");this.projectName=t;this.env=(e.env||"PROD").toUpperCase();this.hublet=e.hublet||"";this.isEmbedApp=e.isEmbedApp||!1;this.level=(e.level||"ERROR").toUpperCase();this.disabled=e.disabled||!1;this.baseUrl=e.baseUrl||Fe({isEmbedApp:this.isEmbedApp,env:this.env,hublet:this.hublet});this.tags=e.tags||{};this.cookies=e.cookies||{};this.user=e.user||{}}bindToWindow(t=[],e=[]){t.length<1?console.warn("You need to specify allowlisted domains when binding to window errors or you will catch all page errors"):window.onerror=(r,n,i,o,s)=>{n&&Te(t,n)&&!Te(e,s.message)&&"script error"!==r.toLowerCase()&&this.sendReport("error",r,n,s)}}report(t,e,r={}){if(t){r.silent&&console.error(t);this.sendReport("error",t.message,t.fileName,t,e)}}reportMessage(t,e,r={}){if(t){r.silent&&console.error(t);this.sendReport("info",t,window.location.href,void 0,e)}}debug(t,e){if(t&&"DEBUG"===this.level){console.debug(t);this.sendReport("debug",t.message,t.fileName,t,e)}}addTags(t){Ee(this.tags,t)}addCookies(t){Ee(this.cookies,t)}addUserContext(t){Ee(this.user,t)}sendReport(t,e,r,n,i){if(this.disabled){console.warn("Not reporting error to Outpost because logging is disabled");return}r=r||(window.document.currentScript?window.document.currentScript.src:null)||window.location.href;const o=this.buildReport(t,e,r,n,i),s=new Image,a=encodeURIComponent(JSON.stringify(o));s.src=`${this.baseUrl}/${this.projectName}/error.gif?report=${a}`;s.onload=()=>{console.log(`Completed reporting error to ${this.projectName}`)}}buildReport(t,e,r,n,i={}){const o=n?n.name:"Message";let s;s=n&&n.message?n.message.substring(0,999):e.substring(0,999);return{culprit:o,message:s,level:t,exception:[{type:o,value:n&&n.stack&&n.stack.substring(0,999)||s,url:r}],request:{url:`${window.location.protocol}//${window.location.host+window.location.pathname}`,queryString:window.location.search.replace(/(^\?)/,""),cookies:Ae(this.cookies)},environment:this.env,tags:Ee(this.tags),user:this.user,extra:i}}}var xe=Oe;class Ce{constructor(t,e,{hublet:r="",isQa:n=!1,portalId:i=0,utk:o}={}){this.env=n?"qa":"prod";this.utk=o;this.hublet=r;this.portalId=i;this.bundle=e;this.project=t;this.reporter=void 0;this.config=void 0}buildConfig(){return{isEmbedApp:!0,env:this.env,hublet:this.hublet,tags:{portalId:this.portalId,bundle:this.bundle},cookies:{utk:this.utk}}}report(t,e={},r="report"){if(!this.reporter||!this.config)throw new Error("report() called before setup()");if(!this.reporter[r])throw new Error(`Level "${r}" is not supported`);t instanceof R?this.reporter[r](t.err||new Error(t.key),Object.assign({key:t.key},e,t.extra)):this.reporter[r](t,e)}setup(){this.config=this.buildConfig();this.reporter=new xe(this.project,this.config);return this}}var je=Ce;const Le=()=>{let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const r=(t+16*Math.random())%16|0;t=Math.floor(t/16);return("x"===e?r:3&r|8).toString(16)}))},Ne=t=>e=>{t(e);return e},Ie="squarespace.com",Re=/^[^_]+_([\d_]+)/;const ke=[{test:t=>{try{return t.getAttribute("action").indexOf(Ie)>-1}catch(t){return!1}},getId:t=>{try{const e=t.elements[0].id,r=e.match(Re)[1];d(`Swapping Squarespace form ID ${t.id} to field ${e} and cleaning to ${r}`);return`#squarespace_${r}`}catch(t){return"#SquarespaceForm"}}},{test:t=>{try{return 0===t.getAttribute("action").indexOf("/fsg?")}catch(t){return!1}},getId:()=>`${location.hostname}${location.pathname}`},{test:t=>{try{return 0===t.id.indexOf("hsForm")}catch(t){return!1}},getId:t=>`#${t.id.split("_").slice(0,2).join("_")}`},{test:t=>{try{return 0===t.id.indexOf("iphorm")}catch(t){return!1}},getId:()=>""},{test:()=>!0,getId:t=>{try{return t.id?`#${t.id}`:""===t.attributes.id.value?"#":""}catch(t){return""}}}];function Pe(t){for(let e=0;e-1?`.${t.className}`.split(" ").filter((t=>t.length)).filter((t=>-1===$e.indexOf(t))).join(", ."):`.${t.className}`.split(" ").join(", ."):""}const Be=["TEXTAREA","SELECT","OPTION","STYLE","SCRIPT"],Me=3;function De(t,e,r){let n=e;for(;n&&n!==t;){if(n.tagName===r.toUpperCase())return n;n=n.parentNode}}function qe(t){return t?`${t}`.replace(/\(.*\)|required|:|\*|\n|\r/gi,"").replace(/ +/g," ").trim():""}function Ve(t,e,r){const n=De(t,e,r);if(!n)return"";const i=Array.prototype.slice.call(n.childNodes).filter((({nodeType:t})=>t===Node.TEXT_NODE))[0];return i?i.nodeValue:""}function ze(t){if(!t)return"";if(t.nodeType===Node.TEXT_NODE)return t.nodeValue;let e="";for(let r=0;rt&&qe(ze(t)||"")||"";for(;e||r;){const t=n(e);if(t.length)return t;e=e&&e.previousSibling;const i=n(r);if(i.length)return i;r=r&&r.nextSibling}return""}function He(t,e){let r,n=e.parentNode,i=1;for(;n&&n!==t&&i<=Me;){r=Qe(n);if(r.length)return r;n=n.parentNode;i++}}function Ge(t){return/\[\]$/.test(t)}function We({name:t,value:e,id:r,type:n,parentNode:i}){return Ge(t)?"checkbox"===n.toLowerCase&&e.length?e:i.textContent:t.length?t:r.length?`#${r}`:`${n}-${Math.floor(100*Math.random()+1)}`}function Ke(t,e,r){let n;try{const i=e.getAttribute(r);if(i){n=t.querySelector(`label[for="${i}"]`);n=n&&n.textContent}}catch(t){n=""}return n}function Je(t){const e=t.match(/[^[\]]+(?=])/);return e&&e[0]?e[0]:Ge(t)?t.slice(0,-2):t}let Ye={};const Xe=t=>{if(Ye[t])return!0;Ye[t]=!0;return!1},Ze=()=>{Ye={}},tr=t=>{const e=qe(t);return Xe(e)?"":e};function er(t,e){let r="";r=tr(Ke(t,e,"id"));if(r.length)return r;r=tr(Ve(t,e,"label"));if(r.length)return r;r=tr(Ke(t,e,"name"));if(r.length&&"radio"!==e.type)return r;r=tr(Qe(e));if(r.length)return r;r=tr(Ve(t,e,"p"));if(r.length)return r;const n=e.getAttribute("placeholder")&&tr(e.getAttribute("placeholder"));if(n)return n;r=tr(He(t,e));if(r.length)return r;if(e.getAttribute("name")){return Je(e.getAttribute("name"))}if(e.id)return e.id;d("Cannot find anything that could even be a proxy for a label",t,e);return""}function rr(t){return Object.keys(Object.assign({},t.attributes)).reduce(((e,r)=>{const{name:n,value:i}=t.attributes[r];return/^(autocomplete|placeholder|data-leadin|data-hs-cf)/i.test(n)?Object.assign({},e,{[n]:i}):e}),{})}function nr(t){return Array.prototype.slice.call(U.elementQuerySelectorAll(t,"option")).reduce(((e,r)=>{const n=r.selected?r.textContent:"";return n.length?!t.multiple&&e.length?e:[].concat(e,[n]):e}),[]).join(", ")}function ir(t){return Array.prototype.slice.call(U.elementQuerySelectorAll(t,"select")).reduce(((e,r)=>{const n=nr(r);return n?Object.assign({},e,{[We(r)]:{type:"select",name:Je(r.name),value:n,label:er(t,r),attributes:rr(r)}}):e}),{})}const or=["submit","button","hidden","radio","password","reset","image"];function sr({type:t,value:e,checked:r}){return"checkbox"===t?r?"Checked":"Not Checked":"file"===t?e.replace("C:\\fakepath\\",""):"string"!=typeof e?String(e):e}function ar(t){return-1===or.indexOf(t.type)&&"none"!==t.style.display}function ur(t){return Array.prototype.slice.call(U.elementQuerySelectorAll(t,"input, textarea")).filter(ar).reduce(((e,r)=>Object.assign({},e,{[We(r)]:{type:r.type,name:r.name,id:r.id,value:sr(r),label:er(t,r),attributes:rr(r)}})),{})}function cr(t,e){const r=De(t,e,"fieldset"),n=r&&r.querySelector("legend");if(n)return qe(n.textContent);const i=qe(Ke(t,e,"name"));return i||er(t,e)}function lr(t){return Array.prototype.slice.call(U.elementQuerySelectorAll(t,'input[type="radio"]')).reduce(((e,r)=>{if(r.checked){const n=Ge(r.name)?r.name.slice(0,-2):r.name;return Object.assign({},e,{[n]:{type:r.type,name:r.name,value:er(t,r),label:cr(t,r),attributes:rr(r)}})}return e}),{})}function fr(t){return Object.assign({},ur(t),ir(t),lr(t))}var dr=t=>{try{return{id:t.getAttribute("id"),class:t.getAttribute("class"),action:t.getAttribute("action")}}catch(t){return{}}};class hr{static scrape(t){const e={id:Pe(t),classes:Ue(t),fields:fr(t),attributes:dr(t)};Ze();return e}}const pr=t=>Object.keys(t).map((e=>t[e])),mr=(t,e)=>0===Object.keys(t).filter((r=>t[r]!==e[r])).length,br=(t,e)=>{const r=Array.isArray(t)?t:pr(t);for(let t=0;t{t.hasOwnProperty(vr[e])&&(this[vr[e]]=t[vr[e]])}))}get(t){return this[t]||(t===vr.ATTRIBUTES?{}:"")}getLowerCased(t){return t===vr.ATTRIBUTES?null:this.get(t).toLowerCase()}isLabelSensitive(){return void 0!==br(wr,(t=>{if(this.getLowerCased(vr.LABEL).indexOf(t)>-1){d(`Form field contains sensitive label ${this.getLowerCased(vr.LABEL)}=${t}`);return!0}return!1}))}isNameSensitive(){return void 0!==br(Sr,(t=>{if(this.getLowerCased(vr.NAME).indexOf(t)>-1){d(`Form field contains sensitive label ${this.getLowerCased(vr.NAME)}=${t}`);return!0}return!1}))}isAttributesSensitive(){const t=this.get(vr.ATTRIBUTES);return void 0!==br(Object.keys(t),(e=>{if(Er.hasOwnProperty(e)&&t[e]===Er[e]){d(`Form field contains sensitive attribute ${e}`);return!0}return!1}))}isSecurityCode(){if(this.getLowerCased(vr.LABEL).indexOf(Tr)>-1&&/^\d{3,4}$/.test(this.get(vr.VALUE))){d(`Form field contains sensitive label security code ${this.get(vr.VALUE)} and value is number of length 3/4`);return!0}return!1}isCardNumber(){const t=this.get(vr.VALUE).replace(/[ -]/g,"");return void 0!==br(Ar,(e=>{if(e.test(t)){d(`Form field contains card number ${this.get(vr.VALUE)}`);return!0}return!1}))}usesPasswordKeyword(t){return yr.includes(t)}isUnWanted(){return this.usesPasswordKeyword(this.getLowerCased(vr.LABEL))||this.usesPasswordKeyword(this.getLowerCased(vr.NAME))||Fr.indexOf(this.getLowerCased(vr.NAME))>-1}isSensitive(){return this.isLabelSensitive()||this.isNameSensitive()||this.isAttributesSensitive()||this.isSecurityCode()||this.isCardNumber()}isNameEqual(t){const e=this.getLowerCased(vr.NAME);return(/\[(.*)\]/.exec(e)||[])[1]===t||e===t}}const xr={EMAIL:"email",FIRST_NAME:"firstName",LAST_NAME:"lastName",PHONE_NUMBER:"phone"},Cr=[xr.EMAIL];class jr{setEmailField(t){t&&(this[xr.EMAIL]=t);return this}setFirstNameField(t){t&&(this[xr.FIRST_NAME]=t);return this}setLastNameField(t){t&&(this[xr.LAST_NAME]=t);return this}setPhoneNumberField(t){t&&(this[xr.PHONE_NUMBER]=t);return this}getFields(){return[this[xr.EMAIL],this[xr.FIRST_NAME],this[xr.LAST_NAME],this[xr.PHONE_NUMBER]].filter((t=>t))}hasRequiredFields(){return!br(Cr,(t=>void 0===this[t]))}}var Lr=jr;const Nr=/^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i,Ir=/[^@\s]+@[^@\s]+\.[^@\s]+/,Rr=/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+[a-zA-Z0-9])/i,kr="data-leadin-email",Pr=["your email"],_r="email";class $r{isStrictlyValidEmailField(t){return Nr.test(t.get(vr.VALUE))}isValidEmailValueField(t){return Ir.test(t.get(vr.VALUE))}isMarkedField(t){return t.get(vr.ATTRIBUTES)[kr]>-1}isLabeledField(t){return t.getLowerCased(vr.LABEL)===_r||Pr.filter((e=>t.getLowerCased(vr.LABEL).indexOf(e)>-1)).length>0}extractFirstEmail(t){const e=t.get(vr.VALUE).match(Rr);return e?e[0]:null}findBest(t){const e=t.filter(this.isStrictlyValidEmailField);if(1===e.length)return e[0];if(0===e.length){const e=br(t,this.isValidEmailValueField);if(!e){d("No email field found in form fields");return null}return this.extractFirstEmail(e)}return br(e,this.isMarkedField)||br(e,this.isLabeledField)||e[0]}}var Ur=new $r;const Br="data-leadin-fname",Mr=["first name","your name","full name","your full name"],Dr=["name","first"],qr=["fname","name","firstname","first-name","first_name","full_name","yourname","your-name"];class Vr{isMarkedField(t){return t.get(vr.ATTRIBUTES)[Br]>-1}isContainingLabeledField(t){return Mr.filter((e=>t.getLowerCased(vr.LABEL).indexOf(e)>-1)).length>0}isMatchingLabeledField(t){return Dr.filter((e=>t.getLowerCased(vr.LABEL)===e)).length>0}isNamedField(t){return qr.filter((e=>t.isNameEqual(e))).length>0}findBest(t){return br(t,this.isMarkedField)||br(t,this.isContainingLabeledField)||br(t,this.isMatchingLabeledField)||br(t,this.isNamedField)||void 0}}var zr=new Vr;const Qr="data-leadin-lname",Hr=["last name","surname","your last name","family name"],Gr=["last"],Wr=["lname","lastname","last-name","last_name"];class Kr{isMarkedField(t){return t.get(vr.ATTRIBUTES)[Qr]>-1}isContainingLabeledField(t){return Hr.filter((e=>t.getLowerCased(vr.LABEL).indexOf(e)>-1)).length>0}isMatchingLabeledField(t){return Gr.filter((e=>t.getLowerCased(vr.LABEL)===e)).length>0}isNamedField(t){return Wr.filter((e=>t.isNameEqual(e))).length>0}findBest(t){return br(t,this.isMarkedField)||br(t,this.isContainingLabeledField)||br(t,this.isMatchingLabeledField)||br(t,this.isNamedField)||void 0}}var Jr=new Kr;const Yr="data-leadin-telephone",Xr=/\+| |\(|\)|\.|-|x/g,Zr="tel",tn=["telephone","phone","your number","contact number"],en=["tel","tele","phone","telephone","your-phone","phone-number","phonenumber"];class rn{stripExtraCharacters(t){return t.get(vr.VALUE).replace(Xr,"")}isMarkeField(t){return t.get(vr.ATTRIBUTES)[Yr]}isValidPhoneValue(t){const e=this.stripExtraCharacters(t);return!isNaN(e)&&e.length>5}isTelTypeField(t){return t.get(vr.TYPE)===Zr}isContainingLabeledField(t){return tn.filter((e=>t.getLowerCased(vr.LABEL).indexOf(e)>-1)).length>0}isNamedField(t){return en.filter((e=>t.isNameEqual(e))).length>0}findBest(t){const e=t.filter(this.isValidPhoneValue.bind(this));return br(t,this.isMarkeField)||br(e,this.isTelTypeField)||br(e,this.isContainingLabeledField)||br(e,this.isNamedField)||void 0}}var nn=new rn;const on=/[dmy]+[-\s/.]?[dm]+[-\s/.]?[dmy]+/i,sn=/(^(\d{2,4})[-\s./]?)(\d{2})[-\s./]?(\d{2,4})/,an=/[^-\d\s./]/g,un="data-hs-cf-date-format",cn={INPUT_TYPE_DATE:"date",INPUT_TYPE_DATETIME:"datetime-local"};class ln{isBuiltInDateInputField(t){return t.get(vr.TYPE)===cn.INPUT_TYPE_DATE||t.get(vr.TYPE)===cn.INPUT_TYPE_DATETIME}isConfiguredCustomDateInputField(t){return!!t.get(vr.ATTRIBUTES)&&t.get(vr.ATTRIBUTES)[un]}indicatesADateFormatInPlaceholder(t){return!!t.get(vr.ATTRIBUTES)&&on.test(t.get(vr.ATTRIBUTES).placeholder||"")}indicatesADateFormatInLabel(t){return on.test(t.get(vr.LABEL)||"")}isCustomDateInputField(t){return"text"===t.get(vr.TYPE)&&(this.indicatesADateFormatInPlaceholder(t)||this.indicatesADateFormatInLabel(t))}isDateInputField(t){return this.isBuiltInDateInputField(t)||this.isConfiguredCustomDateInputField(t)||this.isCustomDateInputField(t)}extractFormat(t){return on.exec(t.trim().toUpperCase())[0]||""}getCustomDateInputFieldFormat(t){return this.indicatesADateFormatInPlaceholder(t)?this.extractFormat(t.get(vr.ATTRIBUTES).placeholder):this.extractFormat(t.get(vr.LABEL))}hasEmptyValue(t){return!t.get(vr.VALUE)}getDateComponentsUsingIndex(t,e,r){return[t.substring(0,e),t.substring(e,r),t.substring(r,t.length)]}getStandardDateString(t,e){const r=t.trim();if(sn.test(r)&&!an.test(r)&&e){const[t,n,i]=[/y{2,4}/i,/mm/i,/dd/i].map((t=>e.match(t))),o=t?r.substring(t.index,t.index+t[0].length):null,s=n?r.substring(n.index,n.index+2):null,a=i?r.substring(i.index,i.index+2):null,u=`${o}-${s}-${a}`;if(a&&s&&o&&"Invalid Date"!==new Date(u).toString())return u}return null}parseWithFormat(t,e){return this.getStandardDateString(t,e)}performBestParse(t,e){let r;try{r=this.parseWithFormat(t,e)}catch(r){d(`Could not parse value ${t} with format ${e}, returning it instead.`)}finally{r=r||t}return r}parseDateInputFieldValue(t){return this.isBuiltInDateInputField(t)?t.get(vr.VALUE):this.isConfiguredCustomDateInputField(t)?this.performBestParse(t.get(vr.VALUE),t.get(vr.ATTRIBUTES)[un].trim()):this.isCustomDateInputField(t)?this.performBestParse(t.get(vr.VALUE),this.getCustomDateInputFieldFormat(t)):t.get(vr.VALUE)}}var fn=new ln;const dn=["fields"];class hn{getState(t,e){let{fields:r}=t,n=Rt(t,dn);return Promise.resolve({form:n,formFields:pr(r),submissionFields:[],submissionContactFields:new Lr,submission:new _t,config:e})}createSubmissionFieldsFromFormFields(t){const{formFields:e}=t;return Object.assign({},t,{submissionFields:e.map((t=>new Or(t)))})}filterUnWantedSubmissionFields(t){const{submissionFields:e}=t;return Object.assign({},t,{submissionFields:e.filter((t=>!t.isUnWanted()))})}rejectIfAnyFieldSensitive(t){const{submissionFields:e}=t,r=br(e,(t=>t.isSensitive()));return r?Promise.reject(new St(`Found sensitive submission field [${r.get(vr.LABEL)}]`)):t}createSubmissionContactFieldsFromSubmissionFields(t){const{submissionFields:e,submissionContactFields:r}=t;return Object.assign({},t,{submissionContactFields:r.setEmailField(Ur.findBest(e)).setFirstNameField(zr.findBest(e)).setLastNameField(Jr.findBest(e)).setPhoneNumberField(nn.findBest(e))})}rejectIfMissingRequiredFields(t){const{submissionContactFields:e}=t;return e.hasRequiredFields()?t:Promise.reject(new St("Submission contact fields missing required fields"))}filterSubmissionContactFieldsFromSubmissionFields(t){const{submissionFields:e,submissionContactFields:r}=t,n=r.getFields();return Object.assign({},t,{submissionFields:e.filter((t=>!br(n,(e=>mr(t,e)))))})}standardiseDateValuesFromSubmissionFields(t){const{submissionFields:e}=t;return Object.assign({},t,{submissionFields:e.map((t=>!fn.hasEmptyValue(t)&&fn.isDateInputField(t)?new Or(Object.assign({},t,{[vr.VALUE]:fn.parseDateInputFieldValue(t)})):t))})}createSubmissionFromState(t){const{form:e,submission:r,submissionFields:n,submissionContactFields:i,config:o}=t;return Object.assign({},t,{submission:r.set(Pt.FORM_SELECTOR_ID,e.id).set(Pt.FORM_SELECTOR_CLASSES,e.classes).set(Pt.FORM_ATTRIBUTES,e.attributes).set(Pt.CONTACT_FIELDS,i).set(Pt.FIELDS,n).set(Pt.PAGE_ID,(window.hsVars||{}).page_id).set(Pt.PAGE_TITLE,document.title).set(Pt.PAGE_URL,window.location.href).set(Pt.PORTAL_ID,D()).set(Pt.TOKEN,(o||{}).token).set(Pt.TYPE,"SCRAPED").set(Pt.UTK,nt()).set(Pt.UUID,Le()).set(Pt.VERSION,H())})}build(t,e){return this.getState(t,e).then(this.createSubmissionFieldsFromFormFields).then(this.filterUnWantedSubmissionFields).then(this.rejectIfAnyFieldSensitive).then(this.createSubmissionContactFieldsFromSubmissionFields).then(this.standardiseDateValuesFromSubmissionFields).then(this.rejectIfMissingRequiredFields).then(this.filterSubmissionContactFieldsFromSubmissionFields).then(this.createSubmissionFromState).then((({submission:t})=>t)).catch((t=>{if(t instanceof St){d("Submission Build Error: ",t);return null}return Promise.reject(t)}))}}var pn=new hn;class mn{getState(t,e){return Promise.resolve({formEl:t,config:e})}scrapeForm(t){const{formEl:e}=t;return Object.assign({},t,{formData:hr.scrape(e)})}buildSubmission(t){const{formData:e,config:r}=t;return pn.build(e,r).then((e=>Object.assign({},t,{submission:e})))}buildSubmissionFromForm(t,e){d("Submission event on: ",t);return this.getState(t,e).then(this.scrapeForm).then(Ne((({formData:t})=>d("Scraped form: ",t)))).then(this.buildSubmission).then(Ne((({submission:t})=>d("Built submission: ",t)))).then((({submission:t})=>t))}}var bn=new mn;const gn="embed/v3";class yn{constructor(t,{isQa:e=!1,hublet:r=""}={}){this.url=`${dt(e,r)}/${gn}`;this.project=t}buildKey(t){return`${this.project}-${t}`}buildTimingUrl(t,e){return`${this.url}/timings.gif?key=${this.buildKey(t)}&valueInMs=${e}`}buildCountersUrl(t,e){return`${this.url}/counters.gif?key=${this.buildKey(t)}&count=${e}`}makeRequest(t){(new Image).src=t}reportCount(t,e=1){this.makeRequest(this.buildCountersUrl(t,e))}reportTiming(t,e){this.makeRequest(this.buildTimingUrl(t,e))}}var vn=yn;const wn="collected-forms-embed-js",Sn={initialized:!1,formSubmissionHandler:bn,analyticsReporter:{reportCount:()=>{}},errorReporter:{report:()=>{},debug:()=>{}}};var En={initialState:{initialized:!1,env:null,portalId:null,utk:null,browserIsSupported:!1,config:{formCaptureEnabled:!1,token:null}},init(){return this.getState().then(this.initRuntime).then(this.setupSafeDomMethods).then(this.attatchInstance).then(this.checkIfRunning).then(this.setEnvironment).then(this.setupErrorReporting).then(this.setupAnalyticsReporting).then(this.checkBrowserSupport).then(this.fetchConfig).then(this.submitStoredFormSubmission).then(this.checkFormCaptureEnabled).then(this.bindToForms).then(this.reportBindingToAnalytics).then(this.logState).catch(this.handleErrors)},getState(){return Promise.resolve(this.initialState)},initRuntime(t){rt();return Object.assign({},t)},checkIfRunning(t){if(Sn.initialized)return Promise.reject(new St(N));Sn.initialized=!0;return t},setupErrorReporting(t){const{utk:e,portalId:r,isQa:n,hublet:i}=t,o=H(),s=new je(wn,o,{utk:e,portalId:r,isQa:n,hublet:i});Sn.errorReporter=s.setup();return Object.assign({},t)},setupAnalyticsReporting(t){const{isQa:e,hublet:r}=t,n={isQa:e,hublet:r};Sn.analyticsReporter=new vn(Q(),n);return t},setupSafeDomMethods(t){return U.setup().then(t)},checkBrowserSupport(t){return Y()?Promise.reject(new St(j)):Object.assign({},t,{browserIsSupported:!0})},setEnvironment(t){const e=q(),r=z(),n=nt(),i=D(),o=V();return isNaN(i)?Promise.reject(new St(`${L} - ${i}`)):Object.assign({},t,{env:e,isQa:r,hublet:o,utk:n,portalId:i})},fetchConfig(t){const{isQa:e,hublet:r}=t,n={isQa:e,hublet:r};return new Lt(t.portalId,n).fetch().catch((t=>{if(t&&t.request&&t.request.status){const e=`${A} - Status Code: ${t.request.status}`;return Promise.reject(new St(e))}return Promise.reject(new St(t))})).then((e=>Object.assign({},t,{config:e,configFetched:!0})))},submitStoredFormSubmission(t){const{isQa:e,hublet:r}=t,n=new Ht({isQa:e,hublet:r});return n.flushScheduledSubmission().then((()=>Object.assign({},t,{submitedStoredFormSubmissions:!0,scheduler:n})))},checkFormCaptureEnabled(t){return t.config.formCaptureEnabled?Object.assign({},t):Promise.reject(new St(O))},bindToForms(t){const e=new de;e.bind();e.onBind((()=>{t.instance().analyticsReporter.reportCount(Et,1)}));e.onSubmission((e=>{t.instance().analyticsReporter.reportCount(Tt);t.instance().formSubmissionHandler.buildSubmissionFromForm(e,t.config).then((e=>{if(e){t.instance().analyticsReporter.reportCount(At);return t.scheduler.scheduleSubmit(e)}return null})).catch((e=>t.instance().errorReporter.report(new R(C,e))))}));return Object.assign({},t,{formBinder:e})},reportBindingToAnalytics(t){const{formBinder:e}=t;e.getNumFormsBound()>0&&t.instance().analyticsReporter.reportCount(Et,e.getNumFormsBound());return t},handleErrors(t){Sn.analyticsReporter.reportCount(Ft);if(t instanceof St)m(t);else if(t instanceof R){p(t);Sn.errorReporter.report(t,{errorSource:"embed",errorKey:t.key})}else if(vt(t)){g("An error is preventing collected-forms from executing.");Sn.errorReporter.report(t,{errorSource:"embed"},"report",{silent:!0})}else{b(t);Sn.errorReporter.debug(t,{errorSource:"client"})}return t},attatchInstance(t){return Object.assign({},t,{instance:()=>Sn})},logState(t){d(`${H()} initialized: `,t);return t},reset(){Sn.initialized=!1}};En.init();window.__hsCollectedFormsDebug={};window.__hsCollectedFormsDebug.manualStart=En.init.bind(En)}()}();