@flarehr/apollo-super-selection 3.4.49088 → 3.8.50722

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 (31) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
  3. package/dist/lib/apollo-super-selection/{p-29c96447.entry.js → p-1ef5a92a.entry.js} +4 -4
  4. package/dist/lib/apollo-super-selection/p-381262c1.system.js +1 -0
  5. package/dist/lib/apollo-super-selection/p-38f24f69.js +1 -0
  6. package/dist/lib/apollo-super-selection/{p-21d04cf8.system.js → p-48e99aba.system.js} +1 -1
  7. package/dist/lib/apollo-super-selection/p-d0cca942.system.entry.js +69 -0
  8. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  9. package/dist/lib/cjs/{app-globals-fa04630f.js → app-globals-45007120.js} +4 -0
  10. package/dist/lib/cjs/fl-button_43.cjs.entry.js +46 -5
  11. package/dist/lib/cjs/loader.cjs.js +1 -1
  12. package/dist/lib/collection/components/super-selection-app/funds/constants.js +3 -0
  13. package/dist/lib/collection/components/super-selection-app/funds/qsuper/qsuper-insurance-opt-in.js +24 -4
  14. package/dist/lib/collection/components/super-selection-app/funds/qsuper/qsuper-layout.js +26 -2
  15. package/dist/lib/collection/global/stencil-router-workaround.js +4 -0
  16. package/dist/lib/esm/apollo-super-selection.js +1 -1
  17. package/dist/lib/esm/{app-globals-9d2ea729.js → app-globals-7ac1ffba.js} +4 -0
  18. package/dist/lib/esm/fl-button_43.entry.js +46 -5
  19. package/dist/lib/esm/loader.js +1 -1
  20. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  21. package/dist/lib/esm-es5/{app-globals-9d2ea729.js → app-globals-7ac1ffba.js} +1 -1
  22. package/dist/lib/esm-es5/fl-button_43.entry.js +1 -1
  23. package/dist/lib/esm-es5/loader.js +1 -1
  24. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -0
  25. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
  26. package/dist/lib/types/components/super-selection-app/funds/qsuper/qsuper-insurance-opt-in.d.ts +3 -0
  27. package/dist/lib/types/components/super-selection-app/funds/qsuper/qsuper-layout.d.ts +4 -0
  28. package/package.json +1 -1
  29. package/dist/lib/apollo-super-selection/p-515d8895.js +0 -1
  30. package/dist/lib/apollo-super-selection/p-8db57bf5.system.js +0 -1
  31. package/dist/lib/apollo-super-selection/p-92b9af0f.system.entry.js +0 -69
@@ -1,14 +1,14 @@
1
- import{r as t,h as n,c as e,g as i,f as r,H as o,a as s,d as a,e as c,s as u}from"./p-cbe37145.js";import{f as l,m as f,S as d,a as h,i as p,d as v,b as m,c as b,g,Q as w}from"./p-df9ce4b7.js";import{g as y,O as x,j as k,k as S,a as C}from"./p-342cee5a.js";import{A}from"./p-59a986b0.js";function _(){}function q(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(q(((e,i)=>l(t(e,i)).pipe(f(((t,r)=>n(e,t,i,r))))),e)):("number"==typeof n&&(e=n),n=>n.lift(new B(t,e)))}class B{constructor(t,n=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=n}call(t,n){return n.subscribe(new E(t,this.project,this.concurrent))}}class E extends d{constructor(t,n,e=Number.POSITIVE_INFINITY){super(t),this.project=n,this.concurrent=e,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let n;const e=this.index++;try{n=this.project(t,e)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(n)}_innerSub(t){const n=new h(this),e=this.destination;e.add(n);const i=p(t,n);i!==n&&e.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function j(t,n,e,i){return k(e)&&(i=e,e=void 0),i?j(t,n,e).pipe(f((t=>y(t)?i(...t):i(t)))):new x((i=>{I(t,n,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,e)}))}function I(t,n,e,i,r){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(n,e,r),o=()=>i.removeEventListener(n,e,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(n,e),o=()=>i.off(n,e)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(n,e),o=()=>i.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,s=t.length;o<s;o++)I(t[o],n,e,i,r)}i.add(o)}class F{constructor(t,n){this.dueTime=t,this.scheduler=n}call(t,n){return n.subscribe(new P(t,this.dueTime,this.scheduler))}}class P extends C{constructor(t,n,e){super(t),this.dueTime=n,this.scheduler=e,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(R,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function R(t){t.debouncedNext()}function M(t,n,e){return function(i){return i.lift(new T(t,n,e))}}class T{constructor(t,n,e){this.nextOrObserver=t,this.error=n,this.complete=e}call(t,n){return n.subscribe(new N(t,this.nextOrObserver,this.error,this.complete))}}class N extends C{constructor(t,n,e,i){super(t),this._tapNext=_,this._tapError=_,this._tapComplete=_,this._tapError=e||_,this._tapComplete=i||_,k(n)?(this._context=this,this._tapNext=n):n&&(this._context=n,this._tapNext=n.next||_,this._tapError=n.error||_,this._tapComplete=n.complete||_)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var D=function(t){return"Some"===t._tag},O=function(t){return"None"===t._tag},U={_tag:"None"},L=function(t){return{_tag:"Some",value:t}};function z(t){return null==t?U:L(t)}class V{constructor(t){this.factory=t,this._value=U}get value(){if(D(this._value))return this._value.value;const t=this.factory();return this._value=L(t),t}}function H(t){A.injectProps(t,["history","location"])}const Q=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),W=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),$=t=>t.replace(/([=!:$/()])/g,"\\$1"),J=t=>t&&t.sensitive?"":"i",X=(t,n,e)=>{for(var i=(e=e||{}).strict,r=!1!==e.end,o=W(e.delimiter||"/"),s=e.delimiters||"./",a=[].concat(e.endsWith||[]).map(W).concat("$").join("|"),c="",u=!1,l=0;l<t.length;l++){var f=t[l];if("string"==typeof f)c+=W(f),u=l===t.length-1&&s.indexOf(f[f.length-1])>-1;else{var d=W(f.prefix||""),h=f.repeat?"(?:"+f.pattern+")(?:"+d+"(?:"+f.pattern+"))*":f.pattern;n&&n.push(f),c+=f.optional?f.partial?d+"("+h+")?":"(?:"+d+"("+h+"))?":d+"("+h+")"}}return r?(i||(c+="(?:"+o+")?"),c+="$"===a?"$":"(?="+a+")"):(i||(c+="(?:"+o+"(?="+a+"))?"),u||(c+="(?="+o+"|"+a+")")),new RegExp("^"+c,J(e))},G=(t,n,e)=>t instanceof RegExp?((t,n)=>{if(!n)return t;var e=t.source.match(/\((?!\?)/g);if(e)for(var i=0;i<e.length;i++)n.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,n):Array.isArray(t)?((t,n,e)=>{for(var i=[],r=0;r<t.length;r++)i.push(G(t[r],n,e).source);return new RegExp("(?:"+i.join("|")+")",J(e))})(t,n,e):((t,n,e)=>X(((t,n)=>{for(var e,i=[],r=0,o=0,s="",a=n&&n.delimiter||"/",c=n&&n.delimiters||"./",u=!1;null!==(e=Q.exec(t));){var l=e[0],f=e[1],d=e.index;if(s+=t.slice(o,d),o=d+l.length,f)s+=f[1],u=!0;else{var h="",p=t[o],v=e[2],m=e[3],b=e[4],g=e[5];if(!u&&s.length){var w=s.length-1;c.indexOf(s[w])>-1&&(h=s[w],s=s.slice(0,w))}s&&(i.push(s),s="",u=!1);var y=h||a,x=m||b;i.push({name:v||r++,prefix:h,delimiter:y,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==h&&void 0!==p&&p!==h,pattern:x?$(x):"[^"+W(y)+"]+?"})}}return(s||o<t.length)&&i.push(s+t.substr(o)),i})(t,e),n,e))(t,n,e),K=(t,n)=>new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(t),Y=(t,n)=>K(t,n)?t.substr(n.length):t,Z=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,tt=t=>"/"===t.charAt(0)?t:"/"+t,nt=t=>"/"===t.charAt(0)?t.substr(1):t,et=t=>{const{pathname:n,search:e,hash:i}=t;let r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},it=t=>"/"===t.charAt(0),rt=t=>Math.random().toString(36).substr(2,t),ot=(t,n)=>{for(let e=n,i=e+1,r=t.length;i<r;e+=1,i+=1)t[e]=t[i];t.pop()},st=(t,n)=>{if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(((t,e)=>st(t,n[e])));const e=typeof t;if(e!==typeof n)return!1;if("object"===e){const e=t.valueOf(),i=n.valueOf();if(e!==t||i!==n)return st(e,i);const r=Object.keys(t),o=Object.keys(n);return r.length===o.length&&r.every((e=>st(t[e],n[e])))}return!1},at=(t,n,e,i)=>{let r;"string"==typeof t?(r=(t=>{let n=t||"/",e="",i="";const r=n.indexOf("#");-1!==r&&(i=n.substr(r),n=n.substr(0,r));const o=n.indexOf("?");return-1!==o&&(e=n.substr(o),n=n.substr(0,o)),{pathname:n,search:"?"===e?"":e,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==n&&(r.state=n)):(r=Object.assign({pathname:""},t),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==n&&void 0===r.state&&(r.state=n));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var o;return r.key=e,i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=((t,n="")=>{let e,i=n&&n.split("/")||[],r=0;const o=t&&t.split("/")||[],s=t&&it(t),a=n&&it(n),c=s||a;if(t&&it(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";if(i.length){const t=i[i.length-1];e="."===t||".."===t||""===t}else e=!1;for(let t=i.length;t>=0;t--){const n=i[t];"."===n?ot(i,t):".."===n?(ot(i,t),r++):r&&(ot(i,t),r--)}if(!c)for(;r--;r)i.unshift("..");!c||""===i[0]||i[0]&&it(i[0])||i.unshift("");let u=i.join("/");return e&&"/"!==u.substr(-1)&&(u+="/"),u})(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r.query=(o=r.search||"")?(/^[?#]/.test(o)?o.slice(1):o).split("&").reduce(((t,n)=>{let[e,i]=n.split("=");return t[e]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},r};let ct=0;const ut={},lt=(t,n={})=>{"string"==typeof n&&(n={path:n});const{path:e="/",exact:i=!1,strict:r=!1}=n,{re:o,keys:s}=((t,n)=>{const e=`${n.end}${n.strict}`,i=ut[e]||(ut[e]={}),r=JSON.stringify(t);if(i[r])return i[r];const o=[],s={re:G(t,o,n),keys:o};return ct<1e4&&(i[r]=s,ct+=1),s})(e,{end:i,strict:r}),a=o.exec(t);if(!a)return null;const[c,...u]=a,l=t===c;return i&&!l?null:{path:e,url:"/"===e&&""===c?"/":c,isExact:l,params:s.reduce(((t,n,e)=>(t[n.name]=u[e],t)),{})}},ft=class{constructor(n){t(this,n),this.isBlockElement=!1,this.disabled=!1,this.variant="primary"}render(){return n("button",{class:{"btn position-relative px-3 py-2":!0,"is-primary":"primary"===this.variant,"is-secondary":"secondary"===this.variant,"btn-block":this.isBlockElement,disabled:this.disabled},style:{"pointer-events":this.disabled?"none":"auto"},disabled:this.disabled},n("span",{class:"label"},n("slot",null)))}};ft.style=":host button,:host button:focus,:host button:active,:host button.focus,:host button.active{-webkit-box-shadow:none;box-shadow:none;border-radius:var(--fl-rounding-button) !important}:host button.disabled,:host button:disabled{opacity:1 !important;cursor:not-allowed !important;color:var(--fl-color-disabled)}:host button .label{font-weight:600 !important}:host button.is-primary{color:var(--fl-color-primary-text);background-color:var(--fl-color-primary);border:none}:host button.is-primary.disabled,:host button.is-primary:disabled{background-color:var(--fl-color-primary-disabled)}:host button.is-primary:hover:not(.disabled),:host button.is-primary:hover:not(:disabled){background-color:var(--fl-color-primary-hover)}:host button.is-primary:active:not(.disabled),:host button.is-primary:active:not(:disabled){background-color:var(--fl-color-primary-focus)}:host button.is-secondary{color:var(--fl-color-secondary-text);background-color:var(--fl-color-secondary)}:host button.is-secondary.disabled,:host button.is-secondary:disabled{background-color:var(--fl-color-secondary-disabled)}:host button.is-secondary:hover:not(.disabled),:host button.is-secondary:hover:not(:disabled){background-color:var(--fl-color-secondary-hover)}:host button.is-secondary:active:not(.disabled),:host button.is-secondary:active:not(:disabled){background-color:var(--fl-color-secondary-focus)}:host button.is-block{display:block}:host button:disabled,:host button.disabled{pointer-events:none}";var dt={compareTwoStrings:ht,findBestMatch:function(t,n){if(!function(t,n){return"string"==typeof t&&!!Array.isArray(n)&&!!n.length&&!n.find((t=>"string"!=typeof t))}(t,n))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");const e=[];let i=0;for(let r=0;r<n.length;r++){const o=n[r],s=ht(t,o);e.push({target:o,rating:s}),s>e[i].rating&&(i=r)}return{ratings:e,bestMatch:e[i],bestMatchIndex:i}}};function ht(t,n){if(t=t.replace(/\s+/g,""),n=n.replace(/\s+/g,""),!t.length&&!n.length)return 1;if(!t.length||!n.length)return 0;if(t===n)return 1;if(1===t.length&&1===n.length)return 0;if(t.length<2||n.length<2)return 0;let e=new Map;for(let n=0;n<t.length-1;n++){const i=t.substring(n,n+2),r=e.has(i)?e.get(i)+1:1;e.set(i,r)}let i=0;for(let t=0;t<n.length-1;t++){const r=n.substring(t,t+2),o=e.has(r)?e.get(r):0;o>0&&(e.set(r,o-1),i++)}return 2*i/(t.length+n.length-2)}const pt=class{constructor(i){t(this,i),this.valueChanged=e(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.isMouseOver=!1,this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.renderFilteredResults=()=>0===this.filteredOptions.length?n("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,e)=>n("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===e},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},n("span",null,t.label)))),this.filterResults=t=>{this.filteredOptions=this.sortOptionsByRelevancy(this._options.filter((n=>n.label.toLowerCase().includes(t.toLowerCase()))),t),this.highlightedOptionIndex=void 0},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:"",this.filteredOptions=this._options},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))}}get _options(){if(void 0===this.options)throw new Error("Can't render <fl-dropdown /> component with no options");return this.options}componentWillLoad(){var t,n;this.filteredOptions=this._options,this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}onOptionsChanged(){this.filteredOptions=this._options}onValueChanged(){var t,n;this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""}render(){var t;return[n("div",{class:"dropdown"},n("input",{type:"text",class:"form-control custom-select",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,onInput:t=>{const n=t.target.value;this.inputValue=n,this.filterResults(n),this.toggleDropdown(!0)},ref:t=>this.inputElement=t}),n("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}sortOptionsByRelevancy(t,n){return t.map((t=>Object.assign(Object.assign({},t),{relevancyScore:dt.compareTwoStrings(t.label.toLowerCase(),n.toLowerCase())}))).sort(((t,n)=>n.relevancyScore-t.relevancyScore)).map((t=>({label:t.label,value:t.value})))}static get watchers(){return{options:["onOptionsChanged"],value:["onValueChanged"]}}};pt.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}";const vt=class{constructor(i){t(this,i),this.valueChanged=e(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.minSearchStringLength=3,this.isMouseOver=!1,this.searchState="pristine",this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.shouldExecuteSearch=t=>{var n;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(n=this.selectedOption)||void 0===n?void 0:n.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{this.filteredOptions=t,this.highlightedOptionIndex=void 0,this.searchState="done"},this.renderFilteredResults=()=>"pristine"===this.searchState?n("span",{class:"dropdown-item disabled"},"Start typing to find the results"):"in progress"===this.searchState?n("div",{class:"d-flex justify-content-end align-items-center pr-4"},n("span",{class:"dropdown-item disabled"},"Searching..."),n("i",{class:"dot-falling"})):0===this.filteredOptions.length?n("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,e)=>n("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===e},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=j(this.inputElement,"keyup").pipe(function(t,n=S){return e=>e.lift(new F(t,n))}(500),f((()=>this.inputElement.value)),v(),m(this.shouldExecuteSearch),M(this.onBeginSearch),q(this._searchFunction),M(this.onCompleteSearch)).subscribe()}componentDidUnload(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.highlightedOptionIndex=void 0,this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return[n("div",{class:"dropdown"},n("input",{type:"text",class:"form-control",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,ref:t=>this.inputElement=t}),n("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}get _searchFunction(){if(void 0===this.searchFunction)throw new Error("Can't render <fl-dropdown-async/> component with no searchFunction");return this.searchFunction}};vt.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}";const mt=class{constructor(n){t(this,n),this.theme="default"}render(){return n("span",{class:{"dots-container d-inline-flex justify-content-center":!0}},n("span",{class:{"dot-flashing":!0,"theme-default":"default"===this.theme,"theme-dark":"dark"===this.theme}}))}};var bt;mt.style='fl-loading-indicator .dots-container{width:36px}fl-loading-indicator .dot-flashing.theme-default{position:relative;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:0.5s;animation-delay:0.5s}@-webkit-keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::before,fl-loading-indicator .dot-flashing.theme-default::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-default::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:0s;animation-delay:0s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:1s;animation-delay:1s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-dark{position:relative;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:0.5s;animation-delay:0.5s}@-webkit-keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::before,fl-loading-indicator .dot-flashing.theme-dark::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-dark::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:0s;animation-delay:0s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:1s;animation-delay:1s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}',function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(bt||(bt={}));const gt=class{constructor(n){t(this,n),this.isBlockElement=!1,this.isRounded=!1,this.disabled=!1,this.variant="primary",this.promiseFn=()=>Promise.resolve(),this.state=bt.Available}render(){return this.state===bt.Pending?this.renderLoadingButton():this.renderActiveButton()}renderActiveButton(){return n("fl-button",{disabled:this.disabled,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,variant:this.variant},n("div",null,n("slot",null)))}renderLoadingButton(){return n("fl-button",{disabled:!0,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,class:"position-relative",variant:this.variant},n("fl-loading-indicator",{class:"position-absolute",theme:"dark"}),n("div",{class:"invisible"},n("slot",null)))}async clicked(){this.state=bt.Pending;try{await this.promiseFn(),this.state=bt.Available}catch(t){throw this.state=bt.Error,t}}};function wt(t,n){void 0===n&&(n="*"),t.sender="flare",window.parent.postMessage(t,n)}gt.style="fl-promise-button fl-loading-indicator{left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}";const yt=function(){wt({type:"appReady"})},xt=function(t,n){wt({type:"contentResized",height:t,width:n})},kt=function(t){wt({type:"pageNavigated",url:t})},St=function(){wt({type:"complete"})},Ct=function(){wt({type:"submitSuccess"})},At=t=>!("isConnected"in t)||t.isConnected,_t=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(At))})(...n)}),2e3)}})(),qt=(t,n)=>{const e=((t,n=((t,n)=>t!==n))=>{let e=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},r=()=>{e=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},o=t=>(i.get.forEach((n=>n(t))),e.get(t)),s=(t,r)=>{const o=e.get(t);n(r,o,t)&&(e.set(t,r),i.set.forEach((n=>n(t,r,o))))},a="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,n)=>o(n),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>e.has(n),set:(t,n,e)=>(s(n,e),!0)}),c=(t,n)=>(i[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(i[t],n)});return{state:a,get:o,set:s,on:c,onChange:(n,e)=>{const i=c("set",((t,i)=>{t===n&&e(i)})),r=c("reset",(()=>e(t[n])));return()=>{i(),r()}},use:(...t)=>t.forEach((t=>{t.set&&c("set",t.set),t.get&&c("get",t.get),t.reset&&c("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),r()},reset:r}})(t,n);return(({on:t})=>{const n=new Map;"function"==typeof i&&(t("dispose",(()=>{n.clear()})),t("get",(t=>{const e=i();e&&((t,n,e)=>{const i=t.get(n);i?i.includes(e)||i.push(e):t.set(n,[e])})(n,t,e)})),t("set",(t=>{const e=n.get(t);e&&n.set(t,e.filter(r)),_t(n)})),t("reset",(()=>{n.forEach((t=>t.forEach(r))),_t(n)})))})(e),e};function Bt(t,n,e){return t(e={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var Et=Bt((function(t,n){function e(t){return t}function i(t){return function(){return t}}function r(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.bindTo_=n.bind_=n.hole=n.pipe=n.untupled=n.tupled=n.absurd=n.decrement=n.increment=n.tuple=n.flow=n.flip=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.constant=n.not=n.unsafeCoerce=n.identity=void 0,n.identity=e,n.unsafeCoerce=e,n.not=function(t){return function(n){return!t(n)}},n.constant=i,n.constTrue=i(!0),n.constFalse=i(!1),n.constNull=i(null),n.constUndefined=i(void 0),n.constVoid=n.constUndefined,n.flip=function(t){return function(n,e){return t(e,n)}},n.flow=function(t,n,e,i,r,o,s,a,c){switch(arguments.length){case 1:return t;case 2:return function(){return n(t.apply(this,arguments))};case 3:return function(){return e(n(t.apply(this,arguments)))};case 4:return function(){return i(e(n(t.apply(this,arguments))))};case 5:return function(){return r(i(e(n(t.apply(this,arguments)))))};case 6:return function(){return o(r(i(e(n(t.apply(this,arguments))))))};case 7:return function(){return s(o(r(i(e(n(t.apply(this,arguments)))))))};case 8:return function(){return a(s(o(r(i(e(n(t.apply(this,arguments))))))))};case 9:return function(){return c(a(s(o(r(i(e(n(t.apply(this,arguments)))))))))}}},n.tuple=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t},n.increment=function(t){return t+1},n.decrement=function(t){return t-1},n.absurd=r,n.tupled=function(t){return function(n){return t.apply(void 0,n)}},n.untupled=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(n)}},n.pipe=function(t,n,e,i,r,o,s,a,c,u,l,f,d,h,p,v,m,b,g,w){switch(arguments.length){case 1:return t;case 2:return n(t);case 3:return e(n(t));case 4:return i(e(n(t)));case 5:return r(i(e(n(t))));case 6:return o(r(i(e(n(t)))));case 7:return s(o(r(i(e(n(t))))));case 8:return a(s(o(r(i(e(n(t)))))));case 9:return c(a(s(o(r(i(e(n(t))))))));case 10:return u(c(a(s(o(r(i(e(n(t)))))))));case 11:return l(u(c(a(s(o(r(i(e(n(t))))))))));case 12:return f(l(u(c(a(s(o(r(i(e(n(t)))))))))));case 13:return d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))));case 14:return h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))));case 15:return p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))));case 16:return v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))));case 17:return m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))))));case 18:return b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))))));case 19:return g(b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))))))));case 20:return w(g(b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))))))))}},n.hole=r,n.bind_=function(t,n,e){var i;return Object.assign({},t,((i={})[n]=e,i))},n.bindTo_=function(t){return function(n){var e;return(e={})[t]=n,e}}})),jt=Bt((function(t,n){function e(t){return null==t?n.none:n.some(t)}function i(t){return"Right"===t._tag?n.none:n.some(t.left)}function r(t){return"Left"===t._tag?n.none:n.some(t.right)}function o(t){return function(i){return n.isNone(i)?n.none:e(t(i.value))}}Object.defineProperty(n,"__esModule",{value:!0}),n.getApplySemigroup=n.getOrd=n.getEq=n.getShow=n.URI=n.wilt=n.wither=n.sequence=n.traverse=n.partitionMap=n.partition=n.filterMap=n.filter=n.separate=n.compact=n.reduceRight=n.foldMap=n.reduce=n.duplicate=n.extend=n.throwError=n.zero=n.alt=n.altW=n.flatten=n.chainFirst=n.chain=n.of=n.apSecond=n.apFirst=n.ap=n.map=n.chainNullableK=n.mapNullable=n.fromNullableK=n.getOrElse=n.getOrElseW=n.toUndefined=n.toNullable=n.fold=n.fromEither=n.getRight=n.getLeft=n.tryCatch=n.fromPredicate=n.fromNullable=n.some=n.none=n.isNone=n.isSome=void 0,n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.apS=n.bind=n.bindTo=n.Do=n.getRefinement=n.exists=n.elem=n.option=n.MonadThrow=n.Witherable=n.Traversable=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.Alt=n.Foldable=n.Monad=n.Applicative=n.Functor=n.getMonoid=n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=void 0,n.isSome=function(t){return"Some"===t._tag},n.isNone=function(t){return"None"===t._tag},n.none={_tag:"None"},n.some=function(t){return{_tag:"Some",value:t}},n.fromNullable=e,n.fromPredicate=function(t){return function(e){return t(e)?n.some(e):n.none}},n.tryCatch=function(t){try{return n.some(t())}catch(t){return n.none}},n.getLeft=i,n.getRight=r,n.fromEither=r,n.fold=function(t,e){return function(i){return n.isNone(i)?t():e(i.value)}},n.toNullable=function(t){return n.isNone(t)?null:t.value},n.toUndefined=function(t){return n.isNone(t)?void 0:t.value},n.getOrElseW=function(t){return function(e){return n.isNone(e)?t():e.value}},n.getOrElse=n.getOrElseW,n.fromNullableK=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t.apply(void 0,n))}},n.mapNullable=o,n.chainNullableK=o;var s=function(t,e){return Et.pipe(t,n.map(e))},a=function(t,e){return Et.pipe(t,n.ap(e))},c=function(t,e){return Et.pipe(t,n.chain(e))},u=function(t,e,i){return Et.pipe(t,n.reduce(e,i))},l=function(t){var e=n.foldMap(t);return function(t,n){return Et.pipe(t,e(n))}},f=function(t,e,i){return Et.pipe(t,n.reduceRight(e,i))},d=function(t){var e=n.traverse(t);return function(t,n){return Et.pipe(t,e(n))}},h=function(t,e){return Et.pipe(t,n.alt(e))},p=function(t,e){return Et.pipe(t,n.filter(e))},v=function(t,e){return Et.pipe(t,n.filterMap(e))},m=function(t,e){return Et.pipe(t,n.extend(e))},b=function(t,e){return Et.pipe(t,n.partition(e))},g=function(t,e){return Et.pipe(t,n.partitionMap(e))},w=function(t){var e=n.wither(t);return function(t,n){return Et.pipe(t,e(n))}},y=function(t){var e=n.wilt(t);return function(t,n){return Et.pipe(t,e(n))}};n.map=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e.value))}},n.ap=function(t){return function(e){return n.isNone(e)||n.isNone(t)?n.none:n.some(e.value(t.value))}},n.apFirst=function(t){return Et.flow(n.map((function(t){return function(){return t}})),n.ap(t))},n.apSecond=function(t){return Et.flow(n.map((function(){return function(t){return t}})),n.ap(t))},n.of=n.some,n.chain=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.chainFirst=function(t){return n.chain((function(e){return Et.pipe(t(e),n.map((function(){return e})))}))},n.flatten=n.chain(Et.identity),n.altW=function(t){return function(e){return n.isNone(e)?t():e}},n.alt=n.altW,n.zero=function(){return n.none},n.throwError=function(){return n.none},n.extend=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e))}},n.duplicate=n.extend(Et.identity),n.reduce=function(t,e){return function(i){return n.isNone(i)?t:e(t,i.value)}},n.foldMap=function(t){return function(e){return function(i){return n.isNone(i)?t.empty:e(i.value)}}},n.reduceRight=function(t,e){return function(i){return n.isNone(i)?t:e(i.value,t)}},n.compact=n.flatten;var x={left:n.none,right:n.none};function k(t){return{equals:function(e,i){return e===i||(n.isNone(e)?n.isNone(i):!n.isNone(i)&&t.equals(e.value,i.value))}}}function S(t){return{concat:function(e,i){return n.isSome(e)&&n.isSome(i)?n.some(t.concat(e.value,i.value)):n.none}}}n.separate=function(t){var e=Et.pipe(t,n.map((function(t){return{left:i(t),right:r(t)}})));return n.isNone(e)?x:e.value},n.filter=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)?e:n.none}},n.filterMap=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.partition=function(t){return function(n){return{left:p(n,(function(n){return!t(n)})),right:p(n,t)}}},n.partitionMap=function(t){return Et.flow(n.map(t),n.separate)},n.traverse=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):t.map(e(i.value),n.some)}}},n.sequence=function(t){return function(e){return n.isNone(e)?t.of(n.none):t.map(e.value,n.some)}},n.wither=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):e(i.value)}}},n.wilt=function(t){return function(e){return function(o){return n.isNone(o)?t.of({left:n.none,right:n.none}):t.map(e(o.value),(function(t){return{left:i(t),right:r(t)}}))}}},n.URI="Option",n.getShow=function(t){return{show:function(e){return n.isNone(e)?"none":"some("+t.show(e.value)+")"}}},n.getEq=k,n.getOrd=function(t){return{equals:k(t).equals,compare:function(e,i){return e===i?0:n.isSome(e)?n.isSome(i)?t.compare(e.value,i.value):1:-1}}},n.getApplySemigroup=S,n.getApplyMonoid=function(t){return{concat:S(t).concat,empty:n.some(t.empty)}},n.getFirstMonoid=function(){return{concat:function(t,e){return n.isNone(t)?e:t},empty:n.none}},n.getLastMonoid=function(){return{concat:function(t,e){return n.isNone(e)?t:e},empty:n.none}},n.getMonoid=function(t){return{concat:function(e,i){return n.isNone(e)?i:n.isNone(i)?e:n.some(t.concat(e.value,i.value))},empty:n.none}},n.Functor={URI:n.URI,map:s},n.Applicative={URI:n.URI,map:s,ap:a,of:n.of},n.Monad={URI:n.URI,map:s,ap:a,of:n.of,chain:c},n.Foldable={URI:n.URI,reduce:u,foldMap:l,reduceRight:f},n.Alt={URI:n.URI,map:s,alt:h},n.Alternative={URI:n.URI,map:s,ap:a,of:n.of,alt:h,zero:n.zero},n.Extend={URI:n.URI,map:s,extend:m},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:s,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g},n.Traversable={URI:n.URI,map:s,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence},n.Witherable={URI:n.URI,map:s,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g,wither:w,wilt:y},n.MonadThrow={URI:n.URI,map:s,ap:a,of:n.of,chain:c,throwError:n.throwError},n.option={URI:n.URI,map:s,of:n.of,ap:a,chain:c,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence,zero:n.zero,alt:h,extend:m,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g,wither:w,wilt:y,throwError:n.throwError},n.elem=function(t){return function(e,i){return!n.isNone(i)&&t.equals(e,i.value)}},n.exists=function(t){return function(e){return!n.isNone(e)&&t(e.value)}},n.getRefinement=function(t){return function(e){return n.isSome(t(e))}},n.Do=n.of({}),n.bindTo=function(t){return n.map(Et.bindTo_(t))},n.bind=function(t,e){return n.chain((function(i){return Et.pipe(e(i),n.map((function(n){return Et.bind_(i,t,n)})))}))},n.apS=function(t,e){return Et.flow(n.map((function(n){return function(e){return Et.bind_(n,t,e)}})),n.ap(e))},n.traverseArrayWithIndex=function(t){return function(e){for(var i=[],r=0;r<e.length;r++){var o=t(r,e[r]);if(n.isNone(o))return n.none;i.push(o.value)}return n.some(i)}},n.traverseArray=function(t){return n.traverseArrayWithIndex((function(n,e){return t(e)}))},n.sequenceArray=n.traverseArray(Et.identity)}));function It(t){this.message=t}(It.prototype=new Error).name="InvalidCharacterError";var Ft="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new It("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,o=0,s="";i=n.charAt(o++);~i&&(e=r%4?64*e+i:i,r++%4)?s+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function Pt(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(Ft(t).replace(/(.)/g,(function(t,n){var e=n.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(n)}catch(t){return Ft(n)}}function Rt(t){this.message=t}(Rt.prototype=new Error).name="InvalidTokenError";var Mt=function(){return(Mt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},Tt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Nt=function(t,n,e){if(void 0===e&&(e=!1),!t||!n||"object"!=typeof t||"object"!=typeof n)return t;var i=Mt({},t);for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]instanceof Array&&t[r]instanceof Array?e?Tt(t[r],n[r]):n[r]:"object"==typeof n[r]&&"object"==typeof t[r]?Nt(t[r],n[r],e):n[r]);return i},Dt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Ot={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(t,n){for(var e=void 0===n?{}:n,i=e.doThrow,r=void 0===i||i,o=e.instance,s=void 0!==o&&o,a=[],c=2;c<arguments.length;c++)a[c-2]=arguments[c];var u=this.polyfills[t]||("undefined"!=typeof self?self[t]:null)||("undefined"!=typeof global?global[t]:null);if(r&&!u)throw new Error(t+" is not defined");return s&&u?new(u.bind.apply(u,Dt([void 0],a))):u}},Ut=function(t,n,e,i){if(!t.getEntriesByName)return!1;var r=t.getEntriesByName(n);return!!(r&&r.length>0)&&(e(r.reverse()[0]),i.clearMeasures&&i.clearMeasures(n),Lt.callbacks.delete(n),Lt.callbacks.size<1&&(Lt.observer.disconnect(),i.clearResourceTimings&&i.clearResourceTimings()),!0)},Lt={callbacks:new Map,observer:null,observe:function(t,n){if(t&&n){var e=Ot.polyfill("performance",{doThrow:!1});(function(t,n){return!Lt.observer&&t&&n&&(Lt.observer=new n((function(n){Lt.callbacks.forEach((function(e,i){Ut(n,i,e,t)}))})),t.clearResourceTimings&&t.clearResourceTimings()),Lt.observer})(e,Ot.polyfill("PerformanceObserver",{doThrow:!1}))&&(Ut(e,t,n,e)||(Lt.callbacks.size<1&&Lt.observer.observe({entryTypes:["resource","measure"]}),Lt.callbacks.set(t,n)))}}},zt=function(t){this.error=t},Vt=function(){return(Vt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},Ht=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Qt=function(){function t(t,n,e,i,r,o){void 0===e&&(e=new Map),void 0===i&&(i=[]),void 0===r&&(r=[]),void 0===o&&(o=[]),this._url=t,this._options=n,this._catchers=e,this._resolvers=i,this._middlewares=r,this._deferredChain=o}return t.factory=function(n,e){return void 0===n&&(n=""),void 0===e&&(e={}),new t(n,e)},t.prototype.selfFactory=function(n){var e=void 0===n?{}:n,i=e.url,r=e.options,o=e.catchers,s=void 0===o?this._catchers:o,a=e.resolvers,c=void 0===a?this._resolvers:a,u=e.middlewares,l=void 0===u?this._middlewares:u,f=e.deferredChain,d=void 0===f?this._deferredChain:f;return new t(void 0===i?this._url:i,Vt({},void 0===r?this._options:r),new Map(s),Ht(c),Ht(l),Ht(d))},t.prototype.defaults=function(t,n){return void 0===n&&(n=!1),Ot.defaults=n?Nt(Ot.defaults,t):t,this},t.prototype.errorType=function(t){return Ot.errorType=t,this},t.prototype.polyfills=function(t){return Ot.polyfills=Vt(Vt({},Ot.polyfills),t),this},t.prototype.url=function(t,n){if(void 0===n&&(n=!1),n)return this.selfFactory({url:t});var e=this._url.split("?");return this.selfFactory({url:e.length>1?e[0]+t+"?"+e[1]:this._url+t})},t.prototype.options=function(t,n){return void 0===n&&(n=!0),this.selfFactory({options:n?Nt(this._options,t):t})},t.prototype.query=function(t,n){return void 0===n&&(n=!1),this.selfFactory({url:Wt(this._url,t,n)})},t.prototype.headers=function(t){return this.selfFactory({options:Nt(this._options,{headers:t||{}})})},t.prototype.accept=function(t){return this.headers({Accept:t})},t.prototype.content=function(t){var n;return this.headers(((n={})["Content-Type"]=t,n))},t.prototype.auth=function(t){return this.headers({Authorization:t})},t.prototype.catcher=function(t,n){var e=new Map(this._catchers);return e.set(t,n),this.selfFactory({catchers:e})},t.prototype.signal=function(t){return this.selfFactory({options:Vt(Vt({},this._options),{signal:t.signal})})},t.prototype.resolve=function(t,n){return void 0===n&&(n=!1),this.selfFactory({resolvers:n?[t]:Ht(this._resolvers,[t])})},t.prototype.defer=function(t,n){return void 0===n&&(n=!1),this.selfFactory({deferredChain:n?[t]:Ht(this._deferredChain,[t])})},t.prototype.middlewares=function(t,n){return void 0===n&&(n=!1),this.selfFactory({middlewares:n?t:Ht(this._middlewares,t)})},t.prototype.method=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=null);var i=this._options.headers,r=e?"object"!=typeof e||i&&!Object.entries(i).every((function(t){var n=t[1];return t[0].toLowerCase()!=="Content-Type".toLowerCase()||n.startsWith("application/json")}))?this.body(e):this.json(e):this;return function(t){var n=t._url,e=t._resolvers,i=t._middlewares,r=t._options,o=new Map(t._catchers),s=Nt(Ot.defaults,r),a=Ot.polyfill("AbortController",{doThrow:!1,instance:!0});!s.signal&&a&&(s.signal=a.signal);var c={ref:null,clear:function(){c.ref&&(clearTimeout(c.ref),c.ref=null)}},u=function(t){return function(n){return 0===t.length?n:1===t.length?t[0](n):t.reduceRight((function(e,i,r){return i(r===t.length-2?e(n):e)}))}}(i)(Ot.polyfill("fetch"))(n,s),l=u.catch((function(t){throw new zt(t)})).then((function(t){return c.clear(),t.ok?t:t[Ot.errorType||"text"]().then((function(n){var e=new Error(n);throw e[Ot.errorType||"text"]=n,e.status=t.status,e.response=t,e}))})),f=function(n){return function(e){return(n?l.then((function(t){return t&&t[n]()})).then((function(t){return e?e(t):t})):l.then((function(t){return e?e(t):t}))).catch((function(n){c.clear();var e=n instanceof zt?n.error:n;if(n instanceof zt&&o.has("__fromFetch"))return o.get("__fromFetch")(e,t);if(o.has(e.status))return o.get(e.status)(e,t);if(o.has(e.name))return o.get(e.name)(e,t);throw e}))}},d={res:f(null),json:f("json"),blob:f("blob"),formData:f("formData"),arrayBuffer:f("arrayBuffer"),text:f("text"),perfs:function(t){return u.then((function(n){return Lt.observe(n.url,t)})),d},setTimeout:function(t,n){return void 0===n&&(n=a),c.clear(),c.ref=setTimeout((function(){return n.abort()}),t),d},controller:function(){return[a,d]},error:function(t,n){return o.set(t,n),d},badRequest:function(t){return d.error(400,t)},unauthorized:function(t){return d.error(401,t)},forbidden:function(t){return d.error(403,t)},notFound:function(t){return d.error(404,t)},timeout:function(t){return d.error(408,t)},internalError:function(t){return d.error(500,t)},fetchError:function(t){return d.error("__fromFetch",t)},onAbort:function(t){return d.error("AbortError",t)}};return e.reduce((function(n,e){return e(n,t)}),d)}((r=r.options(Vt(Vt({},n),{method:t})))._deferredChain.reduce((function(t,n){return n(t,t._url,t._options)}),r))},t.prototype.get=function(t){return this.method("GET",t)},t.prototype.delete=function(t){return this.method("DELETE",t)},t.prototype.put=function(t,n){return this.method("PUT",n,t)},t.prototype.post=function(t,n){return this.method("POST",n,t)},t.prototype.patch=function(t,n){return this.method("PATCH",n,t)},t.prototype.head=function(t){return this.method("HEAD",t)},t.prototype.opts=function(t){return this.method("OPTIONS",t)},t.prototype.replay=function(t){return this.method(this._options.method,t)},t.prototype.body=function(t){return this.selfFactory({options:Vt(Vt({},this._options),{body:t})})},t.prototype.json=function(t){var n,e=null===(n=Object.entries(this._options.headers||{}).find((function(t){var n=t[1];return t[0].toLowerCase()==="Content-Type".toLowerCase()&&n.startsWith("application/json")})))||void 0===n?void 0:n[1];return this.content(e||"application/json").body(JSON.stringify(t))},t.prototype.formData=function(t,n){return void 0===n&&(n=!1),this.body($t(t,n))},t.prototype.formUrl=function(t){return this.body("string"==typeof t?t:(n=t,Object.keys(n).map((function(t){var e=n[t];return e instanceof Array?e.map((function(n){return Jt(t,n)})).join("&"):Jt(t,e)})).join("&"))).content("application/x-www-form-urlencoded");var n},t}(),Wt=function(t,n,e){var i;if("string"==typeof n)i=n;else{var r=Ot.polyfill("URLSearchParams",{instance:!0});for(var o in n)if(n[o]instanceof Array)for(var s=0,a=n[o];s<a.length;s++)r.append(o,a[s]);else r.append(o,n[o]);i=r.toString()}var c=t.split("?");return e||c.length<2?c[0]+"?"+i:t+"&"+i};function $t(t,n,e,i){return void 0===n&&(n=!1),void 0===e&&(e=Ot.polyfill("FormData",{instance:!0})),void 0===i&&(i=[]),Object.entries(t).forEach((function(t){var r=t[0],o=t[1],s=i.reduce((function(t,n){return t?t+"["+n+"]":n}),null);if(s=s?s+"["+r+"]":r,o instanceof Array)for(var a=0,c=o;a<c.length;a++)e.append(s+"[]",c[a]);else!n||"object"!=typeof o||n instanceof Array&&n.includes(r)?e.append(s,o):null!==o&&$t(o,n,e,Ht(i,[r]))})),e}function Jt(t,n){return encodeURIComponent(t)+"="+encodeURIComponent("object"==typeof n?JSON.stringify(n):""+n)}var Xt=Qt.factory;function Gt(){const t=Zt.jwt,n=Zt.profileId,e=Zt.accountIdOrDefault,i=Zt.partnerIdOrDefault;return Xt(Zt.apiBaseUrl).headers({Authorization:"Bearer "+t,"X-PROFILE-ID":n,"X-PARTNER-ID":i,"X-ACCOUNT-ID":e})}Xt.default=Qt.factory;const Kt=new class{async getAustralianFundsAsync(t){return Gt().url("super-choice/australian-funds?"+this.toQueryString(t)).get().notFound((()=>{throw new Error("Failed to fetch the list of australian super funds.")})).json()}async getAppStateAsync(){return Gt().url("client-app-state").get().notFound((()=>{throw new Error("Failed to fetch application configuration.")})).json()}toQueryString(t){switch(t.type){case"partialMatch":return`search=${t.searchString}&maxRecordCount=${t.maxRecordCount}`;case"usiMatch":return"usi="+t.usi}}},Yt={apiBaseUrl:jt.none,appBaseUrl:jt.none,profileId:jt.none,jwt:jt.none,superBuyer:jt.none,accountConfiguration:jt.none,slateJoinAppPostUrl:jt.none,hasSuccessPageBeenAcknowledged:!1,hasSuperSelectionBeenSubmitted:!1},Zt=new class{constructor(){const{state:t,onChange:n}=qt(Yt);this._state=t,this._onChange=n,n("jwt",(t=>{this._state.profileId=Et.pipe(t,jt.chain((t=>jt.fromNullable(function(t,n){if("string"!=typeof t)throw new Rt("Invalid token specified");var e=!0===(n=n||{}).header?0:1;try{return JSON.parse(Pt(t.split(".")[e]))}catch(t){throw new Rt("Invalid token specified: "+t.message)}}(t).sub))))}))}get state(){return this._state}get onChange(){return this._onChange}get superBuyer(){if(jt.isNone(this._state.superBuyer))throw Error("User information is not set");return this._state.superBuyer.value}get apiBaseUrl(){if(jt.isNone(this._state.apiBaseUrl))throw Error("API base URL is not set");return this._state.apiBaseUrl.value}get appBaseUrl(){if(jt.isNone(this._state.appBaseUrl))throw Error("App base URL is not set");return this._state.appBaseUrl.value}get slateJoinAppPostUrl(){if(jt.isNone(this._state.slateJoinAppPostUrl))throw Error("Slate Join App Post Url is not set");return this._state.slateJoinAppPostUrl.value}get profileId(){if(jt.isNone(this._state.profileId))throw Error("Failed to get Profile ID from JWT");return this._state.profileId.value}get defaultFundUsi(){return Et.pipe(this._state.accountConfiguration,jt.map((t=>jt.fromNullable(t.defaultFundUsi))),jt.flatten)}get accountIdOrDefault(){return Et.pipe(this._state.accountConfiguration,jt.map((t=>t.accountId)),jt.getOrElse((()=>"")))}get partnerIdOrDefault(){return Et.pipe(this._state.superBuyer,jt.map((t=>t.partnerId)),jt.getOrElse((()=>"")))}get jwt(){if(jt.isNone(this._state.jwt))throw Error("No authentication information was found");return this._state.jwt.value}completeSuperSelectionFlow(){this._state.hasSuccessPageBeenAcknowledged=!0}markSuperSelectionAsSubmitted(){this._state.hasSuperSelectionBeenSubmitted=!0}async loadAppStateAsync(){const t=await Kt.getAppStateAsync();this._state.accountConfiguration=jt.fromNullable(t.accountConfiguration),this._state.superBuyer=jt.fromNullable(t.superBuyer)}},tn=new class{navigateInternally(t,n){const e=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(n)}`;kt(e),t.push(e)}toExternalUrl(t){const n=new URL(t);return n.searchParams.append("_extnav","true"),n.href}get appBaseUrl(){return Zt.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(t){return t.length>0&&"/"===t[0]?t:"/"+t}};var nn;!function(t){t.ChoicePage="/",t.SlateJoin="/slate/join/",t.SlateStandardChoice="/slate/standard-choice/",t.QSuperOptIn="/qsuper/insurance/opt-in/",t.QSuperQuestion1="/qsuper/insurance/question1/",t.QSuperQuestion2="/qsuper/insurance/question2/",t.QSuperQuestion3="/qsuper/insurance/question3/",t.QSuperQuestion4="/qsuper/insurance/question4/",t.QSuperQuestion5="/qsuper/insurance/question5/",t.QSuperQuestion6="/qsuper/insurance/question6/",t.QSuperQuestion7="/qsuper/insurance/question7/",t.QSuperQuestion8="/qsuper/insurance/question8/",t.QSuperConsent="/qsuper/consent/",t.QSuperJoin="/qsuper/join/",t.MyOwnFund="/super-choice/my-own-fund/",t.SelfManagedFund="/super-choice/smsf/",t.DefaultFund="/super-choice/default/",t.Success="/success/"}(nn||(nn={}));const en=[n("stencil-route",{exact:!0,url:nn.ChoicePage,component:"sss-super-choice-page"}),n("stencil-route",{url:nn.SlateJoin,component:"sss-slate-join-page"}),n("stencil-route",{url:nn.SlateStandardChoice,component:"sss-slate-standard-choice-page"}),n("stencil-route",{url:nn.QSuperOptIn,component:"sss-qsuper-insurance-opt-in"}),n("stencil-route",{url:nn.QSuperQuestion1,component:"sss-qsuper-question-1"}),n("stencil-route",{url:nn.QSuperQuestion2,component:"sss-qsuper-question-2"}),n("stencil-route",{url:nn.QSuperQuestion3,component:"sss-qsuper-question-3"}),n("stencil-route",{url:nn.QSuperQuestion4,component:"sss-qsuper-question-4"}),n("stencil-route",{url:nn.QSuperQuestion5,component:"sss-qsuper-question-5"}),n("stencil-route",{url:nn.QSuperQuestion6,component:"sss-qsuper-question-6"}),n("stencil-route",{url:nn.QSuperQuestion7,component:"sss-qsuper-question-7"}),n("stencil-route",{url:nn.QSuperQuestion8,component:"sss-qsuper-question-8"}),n("stencil-route",{url:nn.QSuperConsent,component:"sss-qsuper-consent"}),n("stencil-route",{url:nn.QSuperJoin,component:"sss-qsuper-join"}),n("stencil-route",{url:nn.MyOwnFund,component:"sss-my-own-fund"}),n("stencil-route",{url:nn.SelfManagedFund,component:"sss-self-managed-fund"}),n("stencil-route",{url:nn.DefaultFund,component:"sss-default-fund"}),n("stencil-route",{url:nn.Success,component:"sss-success"})];var rn;!function(t){t.MyOwnFund="My Own Fund",t.DefaultFund="Default Fund",t.SelfManagedFund="Self Managed Fund"}(rn||(rn={}));const on={continueAllowed:!1,nextRoute:"/",myOwnFundForm:{fundUsi:U,memberNumber:U,standardChoiceFormSignature:U},defaultFundForm:{standardChoiceFormSignature:""},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:"",standardChoiceFormSignature:""},currentCustomFundType:rn.MyOwnFund,customFunds:[{label:rn.MyOwnFund,value:nn.MyOwnFund},{label:rn.DefaultFund,value:nn.DefaultFund},{label:rn.SelfManagedFund,value:nn.SelfManagedFund}]},{state:sn}=qt(on),an=sn.customFunds,cn=class{constructor(n){t(this,n),this.currentCustomFund=an[0],this.fundOptionsList=an}componentWillLoad(){let t="";window.location.pathname.includes(nn.MyOwnFund)&&(t=nn.MyOwnFund),window.location.pathname.includes(nn.DefaultFund)&&(t=nn.DefaultFund),window.location.pathname.includes(nn.SelfManagedFund)&&(t=nn.SelfManagedFund),this.currentCustomFund=an.find((n=>n.value===t))||an[0],tn.navigateInternally(this.history,t)}render(){return n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("p",{class:"font-weight-bold text-center"},"Choose your Super"),n("div",{class:"mb-4"},n("fl-dropdown",{options:this.fundOptionsList,required:!0,requiredValidationMessage:"Select an option",placeholder:"Select...",value:this.currentCustomFund.value,onValueChanged:t=>this.handleChange(t.detail.value.trim())})),n("slot",null))))}handleChange(t){const n=an.find((n=>n.value===t))||{value:nn.MyOwnFund};tn.navigateInternally(this.history,n.value)}static get assetsDirs(){return["assets"]}};H(cn);const un=new class{searchFundsAsync(t,n){return Kt.getAustralianFundsAsync({type:"partialMatch",searchString:t,maxRecordCount:n})}async getFundByUsiAsync(t){const n=await Kt.getAustralianFundsAsync({type:"usiMatch",usi:t});return 1===n.length?jt.some(n[0]):jt.none}};class ln{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(t){return Gt().url("analytics-events").post(t).res()}}class fn{constructor(){this.eventTrackingApi=ln.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackFinancialProductViewedAsync(t){return this.trackEventAsync({FinancialProductViewed:t})}async TrackSuperFundPdsViewedAsync(t){return this.trackEventAsync({SuperFundPdsViewed:t})}async TrackFinancialProductAcceptedAsync(t){return this.trackEventAsync({FinancialProductAccepted:t})}async TrackFinancialProductRejectedAsync(t){return this.trackEventAsync({FinancialProductRejected:t})}async TrackSuperFundPrivacyConfirmationAcceptedAsync(t){return this.trackEventAsync({SuperFundPrivacyConfirmationAccepted:t})}async TrackPromotedSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:t}})}async TrackMyOwnSuperFundDetailViewedAsync(){return this.trackEventAsync({SuperFundDetailViewed:"MyOwnFund"})}async TrackSmsfSuperFundDetailViewedAsync(){return this.trackEventAsync({SuperFundDetailViewed:"Smsf"})}async TrackDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:t}})}async TrackSuperFundPanelViewedAsync(t){return this.trackEventAsync({SuperFundPanelViewed:t})}async trackEventAsync(t){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:t})}catch(t){return}}}const dn={items:[]},hn=new class{constructor(){const{state:t}=qt(dn);this._state=t}get state(){return this._state}closeCurrent(){const t=[...this._state.items];t.shift(),this._state.items=t}clearNotifications(){this._state.items=[]}showErrorNotification(t,n){this.pushNotification(t,null!=n?n:0,"danger")}showInfoNotification(t,n){this.pushNotification(t,null!=n?n:0,"info")}showWarningNotification(t,n){this.pushNotification(t,null!=n?n:0,"warning")}showSuccessNotification(t,n){this.pushNotification(t,null!=n?n:0,"success")}pushNotification(t,n,e){const i=[...this._state.items];i.push({details:t,type:e,priority:n}),this._state.items=i.sort(((t,n)=>n.priority-t.priority))}},pn=new class{async submitDefaultFundChoiceAsync(t){return Gt().url("super-choice/default").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(t){return Gt().url("super-choice/custom-fund").post(t).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(t){return Gt().url("super-choice/smsf").post(t).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}},vn=class{constructor(n){t(this,n),this.defaultFundProductName="Loading fund...",this.eventTrackingService=fn.Instance}async componentWillLoad(){const t=Zt.defaultFundUsi;if(jt.isNone(t))return;this.isDefaultFundExists=!0;const n=await un.getFundByUsiAsync(t.value);if(jt.isNone(n))return this.isInvalidDefaultFund=!0,void hn.showErrorNotification({title:"Something is not right",description:`Couldn't find information about the configured default fund (USI ${t.value})`});this.defaultFund=n.value,this.defaultFundProductName=n.value.productName}componentDidLoad(){return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:this.defaultFund.usi,fundName:this.defaultFund.productName})}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},this.isDefaultFundExists?n((t=>[n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Default Fund"),n("p",{class:"mb-4 small"},"Almost there... all you have to do now is review the fund below, complete and sign the super choice form and submit. Your application to join the fund is subject to Trustee approval."),n("p",{class:"font-weight-bold mt-3"},"Default Fund Name"),n("p",null,t.defaultFundName)),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.defaultFundForm=Object.assign(Object.assign({},sn.defaultFundForm),t.detail)}})]),{defaultFundName:this.defaultFundProductName}):n((()=>n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"No Default Fund"),n("p",{class:"mb-4 small"},"It looks like your employer has not yet defined a default fund. Please contact them if you wish to choose your company's default fund."))),null)),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},this.isDefaultFundExists&&n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,disabled:this.isInvalidDefaultFund,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||(this.formState="validated",this.formElement.checkValidity()&&(await pn.submitDefaultFundChoiceAsync(sn.defaultFundForm),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)))}},mn=class{constructor(n){t(this,n)}render(){return n("div",{class:"container mb-sm-0"},n("div",{class:"row justify-content-center mt-5 mb-3"},n("a",{class:"text-decoration-none",href:tn.toExternalUrl("https://slatesuper.com.au/product-disclosure-statement-pdf"),target:"_blank"},n("p",{class:"mt-3 small text-center mb-1 text-dark"},"Powered by"),n("h5",{class:"font-weight-bold text-center mb-4"},n("span",{class:"text-dark mr-1"},"Simple Financial"),n("span",{class:"simple-choices-text"},"Choices")))),n("div",{class:"row justify-content-center pb-sm-0 px-3 px-sm-0"},n("p",{class:"text-muted small"},"Financial product content on this page is provided by Simple Financial Choices Pty Ltd, a wholly owned entity of Flare HR. Simple Financial Choices Pty Ltd (ABN 58 629 890 900; AFS Representative No. 001269407), is a Corporate Authorised Representative of True Oak Investments Ltd (ABN 81 002 558 956; AFS Licence No. 238184). Flare HR does not endorse or accept responsibility for any financial product advice or services provided by Simple Financial Choices Pty Ltd.")),n("div",{class:"row justify-content-end my-1 px-3 px-sm-0"},this.appVersionBadge()))}appVersionBadge(){return n("small",{style:{opacity:"0.5"},class:"text-muted"},"Powered by Flare, v","3.4.49088")}};mn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.ss-footer-logo{max-width:7rem}";const bn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-column justify-content-center align-items-center flex-grow-1"},n("h5",null,"Loading your superannuation step"),n("fl-loading-indicator",null))}},gn=class{constructor(n){t(this,n),this.isNotAllInformationProvidedMessageVisible=!1,this.eventTrackingService=fn.Instance}componentDidLoad(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Fund details"),n("p",{class:"text-warning mb-4 small"},"Make sure you are already a member of the fund before completing this step."),n("sss-my-own-fund-inputs",{myOwnFundForm:sn.myOwnFundForm,onFormChanged:t=>{sn.myOwnFundForm=Object.assign(Object.assign({},sn.myOwnFundForm),t.detail),this.isNotAllInformationProvidedMessageVisible=!1}})),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.myOwnFundForm=Object.assign(Object.assign({},sn.myOwnFundForm),{standardChoiceFormSignature:z(t.detail.standardChoiceFormSignature)})}})),n("div",{class:"mt-4"},n("sss-notifications-section",null)),this.isNotAllInformationProvidedMessageVisible&&n("div",{class:"mt-4 alert alert-danger",role:"alert"},"All fields are required to complete submission. Make sure you have selected a fund."),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){if(this.formState="validated",!this.formElement.checkValidity())return;if(!(D(sn.myOwnFundForm.fundUsi)&&D(sn.myOwnFundForm.memberNumber)&&D(sn.myOwnFundForm.standardChoiceFormSignature)))return void(this.isNotAllInformationProvidedMessageVisible=!0);const t={fundUsi:this.getOrError(sn.myOwnFundForm.fundUsi),memberNumber:this.getOrError(sn.myOwnFundForm.memberNumber),standardChoiceFormSignature:this.getOrError(sn.myOwnFundForm.standardChoiceFormSignature)};await pn.submitCustomFundChoiceAsync(t),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)}getOrError(t){return Et.pipe(t,(n=()=>{throw new Error("Option value is none.")},function(t){return O(t)?n():t.value}));var n}static get assetsDirs(){return["assets"]}};H(gn);const wn=class{constructor(n){t(this,n),this.formChanged=e(this,"formChanged",7),this.MIN_SEARCH_STRING_LENGTH=3,this.MAX_RECORD_COUNT=10,this.searchFundsAsync=async t=>(await un.searchFundsAsync(t,this.MAX_RECORD_COUNT)).sort(((t,n)=>t.productName.localeCompare(n.productName))).map((t=>({label:`${t.productName} (${t.usi})`,value:t.usi})))}render(){return n("div",null,n("div",{class:""},n("label",{class:"mb-2 font-weight-bold"},"Superannuation Fund Name"),n("fl-dropdown-async",{searchFunction:this.searchFundsAsync,minSearchStringLength:this.MIN_SEARCH_STRING_LENGTH,required:!0,requiredValidationMessage:"Select a fund",placeholder:`Search by name or USI (type at least ${this.MIN_SEARCH_STRING_LENGTH} characters)`,value:this.selectedOption,onValueChanged:t=>{this.selectedOption=t.detail,this.updateFundUsi(t.detail.value.toString())}}),n("div",{class:"invalid-feedback"},"Select a fund"),D(this.myOwnFundForm.fundUsi)&&n("div",null,n("label",{class:"mb-2 mt-3 font-weight-bold"},"Superannuation Fund USI"),n("p",{class:"mb-0"},this.myOwnFundForm.fundUsi.value),n("p",{class:"small mt-1"},"Please ensure this is the correct fund USI as some funds have similar names"))),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Member Number"),n("input",{placeholder:"Enter your member number",type:"text",class:"form-control",required:!0,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:(t=sn.myOwnFundForm.memberNumber,O(t)?void 0:t.value),onChange:t=>this.updateMemberNumber(t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid member number (only numbers and / or letters)")));var t}updateFundUsi(t){this.formChanged.emit({fundUsi:L(t)})}updateMemberNumber(t){this.formChanged.emit({memberNumber:L(t)})}},yn=class{constructor(n){t(this,n)}disconnectedCallback(){hn.clearNotifications()}render(){const{items:t}=hn.state;return t.length<=0?n(o,null):n("div",{class:"alert alert-"+t[0].type,role:"alert"},n("div",{class:"d-flex"},n("p",{class:"mb-0 flex-grow-1"},n("strong",null,t[0].details.title)),n("button",{onClick:this.handleClose,type:"button",class:"close pb-1","aria-label":"Close"},n("span",{"aria-hidden":"true"},"×"))),n("p",{class:"mb-0 mt-1"},t[0].details.description))}handleClose(){hn.closeCurrent()}},xn=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}render(){return n("div",{class:"d-flex align-items-center justify-content-center"},n("p",{class:"confirm-title font-weight-bold text-center"},"You are now applying for a"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds1.pdf")},"QSuper Accumulation Account"),". Read the"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds11.pdf")},"PDS")," ","here."))}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Insurance Opt In"})}static get assetsDirs(){return["assets"]}};var kn,Sn;xn.style="",function(t){t[t.InsuranceConfirm=0]="InsuranceConfirm",t[t.InsuranceQuestions=1]="InsuranceQuestions",t[t.AccumulationAccount=2]="AccumulationAccount",t[t.ConfirmSelection=3]="ConfirmSelection"}(kn||(kn={})),function(t){t[t.question1=0]="question1",t[t.question2=1]="question2",t[t.question3=2]="question3",t[t.question4=3]="question4",t[t.question5=4]="question5",t[t.question6=5]="question6",t[t.question7=6]="question7",t[t.question8=7]="question8"}(Sn||(Sn={}));const Cn={currentQSuperInsuranceQuestion:Sn.question1,currentQSuperFormPage:kn.InsuranceConfirm,qSuperFormValid:!1,nextRoute:"/",continueAllowed:!1,qSuperOptInPageCheckbox:!1,qSuperJoinPageCheckbox:!1,qSuperInsuranceQuestions:{question1:{answered:!1},question2:{answered:!1},question3:{answered:!1},question4:{answered:!1},question5:{answered:!1},question6:{answered:!1},question7:{answered:!1},question8:{answered:!1}},qSuperQuestionnaire:{reviewedApplication:!1,acceptedDeclaration:!1,readDutyOfDisclosure:!1,insuranceChosen:!1},standardChoiceFormSignature:""},{state:An,reset:_n}=qt(Cn),qn=_n;function Bn(){var t,n,e,i;const r=window.location.pathname.split(Zt.appBaseUrl)[1],o={[nn.QSuperOptIn]:nn.QSuperQuestion1,[nn.QSuperQuestion1]:An.qSuperInsuranceQuestions.question1.answered?!0===(null===(t=An.qSuperQuestionnaire.questions)||void 0===t?void 0:t.question1)?nn.QSuperQuestion4:nn.QSuperQuestion2:nn.QSuperQuestion1,[nn.QSuperQuestion2]:An.qSuperInsuranceQuestions.question2.answered?!0===(null===(n=An.qSuperQuestionnaire.questions)||void 0===n?void 0:n.question2)?nn.QSuperQuestion4:nn.QSuperQuestion3:nn.QSuperQuestion2,[nn.QSuperQuestion3]:An.qSuperInsuranceQuestions.question3.answered?nn.QSuperQuestion4:nn.QSuperQuestion3,[nn.QSuperQuestion4]:An.qSuperInsuranceQuestions.question4.answered?nn.QSuperQuestion5:nn.QSuperQuestion4,[nn.QSuperQuestion5]:An.qSuperInsuranceQuestions.question5.answered?nn.QSuperQuestion6:nn.QSuperQuestion5,[nn.QSuperQuestion6]:An.qSuperInsuranceQuestions.question6.answered?nn.QSuperQuestion7:nn.QSuperQuestion6,[nn.QSuperQuestion7]:An.qSuperInsuranceQuestions.question7.answered?nn.QSuperQuestion8:nn.QSuperQuestion7,[nn.QSuperQuestion8]:An.qSuperInsuranceQuestions.question8.answered?nn.QSuperConsent:nn.QSuperQuestion8,[nn.QSuperConsent]:An.qSuperQuestionnaire.readDutyOfDisclosure&&An.qSuperQuestionnaire.reviewedApplication?nn.QSuperJoin:nn.QSuperConsent,[nn.QSuperJoin]:An.qSuperJoinPageCheckbox?nn.Success:nn.QSuperJoin};return r===nn.QSuperQuestion5?An.qSuperInsuranceQuestions.question1.answered&&An.qSuperInsuranceQuestions.question2.answered&&An.qSuperInsuranceQuestions.question3.answered&&An.qSuperInsuranceQuestions.question4.answered&&An.qSuperInsuranceQuestions.question5.answered&&(!0===(null===(e=An.qSuperQuestionnaire.questions)||void 0===e?void 0:e.question3)||!0===(null===(i=An.qSuperQuestionnaire.questions)||void 0===i?void 0:i.question5))?nn.QSuperQuestion6:nn.QSuperConsent:r===nn.QSuperOptIn?An.qSuperOptInPageCheckbox?An.qSuperQuestionnaire.insuranceChosen?nn.QSuperQuestion1:nn.QSuperConsent:r:o[r]}const En=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}async componentDidLoad(){window.scroll(0,0),An.currentQSuperFormPage=kn.AccumulationAccount}render(){return n("sss-qsuper-layout",null,n("div",{class:"d-flex align-items-center justify-content-center"},n("p",{class:"confirm-title font-weight-bold text-center"},"Your QSuper Accumulation Account")),n("div",{class:"p-3 d-flex mt-4 checkbox-container"},n("p",null,"Just finally, we need you to confirm that you understand the declarations below and the product you've applied for by ticking the box below.",n("br",null),n("br",null),"This form and all products are issued by the QSuper Board (ABN 32 125 059 006 AFSL 489650) as trustee for QSuper (ABN 60 905 115 063).",n("br",null),n("br",null),"I have read and agree to the terms and conditions in the QSuper"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds11.pdf")},"Product Disclosure Statement for Accumulation and Income Accounts"),", QSuper's"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/fs15.pdf")},"Your Privacy factsheet"),", and the"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/qiib09.pdf")},"Financial Services Guide"),".",n("br",null),n("br",null),"I understand that any insurance cover I might have as a result of this application, commences when the first contribution is received into my account. Once I am a member I can cancel, or, subject to eligibility conditions, vary, my cover at any time. Premiums are deducted in accordance with the PDS.",n("br",null),n("br",null),"I also agree to be bound by the Trust Deed and the governing rules of QSuper in relation to the operation of my Accumulation account.",n("br",null),n("br",null),"I confirm that the information I have given is true and correct.",n("br",null),n("br",null),"I confirm that I am the person identified as the applicant in this form.",n("br",null),n("br",null),"I consent to the QSuper Board paying Simple Financial Choices Pty Ltd, a wholly owned subsidiary of Flare, a fee of $300 on receipt of the first contribution into my account, for the provision of technology services.",n("br",null),n("br",null),"I understand that I will be placed into the default investment option QSuper Lifetime.",n("br",null),n("br",null),"I understand that my Tax File Number will be provided to QSuper. NB - if you have your Tax File Number available, this will help speed up the processing of this application and we may be able to Find your Super.",n("br",null),n("br",null),"I have read and accept the"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/misc/tfn")},"Privacy and Contact Information Statement"))),n("div",null,n("label",{class:"d-flex mt-3 p-3 checkbox-container",htmlFor:"ackAllCheckBox"},n("div",{class:"w-auto px-2 fl-checkbox-container"},n("input",{id:"ackAllCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0 mt-1"},"I acknowledge all of the above. ",n("i",null,"(required)"))))))}handleCheckboxToggle(){An.qSuperQuestionnaire.readDutyOfDisclosure=!An.qSuperQuestionnaire.readDutyOfDisclosure,An.qSuperQuestionnaire.reviewedApplication=!An.qSuperQuestionnaire.reviewedApplication,An.continueAllowed=!An.continueAllowed,An.nextRoute=Bn()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Accumulation Page"})}};function jn(){const t=window.location.pathname.split(Zt.appBaseUrl)[1];An.continueAllowed={[nn.QSuperOptIn]:An.qSuperOptInPageCheckbox,[nn.QSuperJoin]:An.qSuperJoinPageCheckbox&&An.standardChoiceFormSignature}[t]}function In(){qn(),An.qSuperQuestionnaire=Object.assign(Object.assign({},An.qSuperQuestionnaire),{acceptedDeclaration:!1,insuranceChosen:!1,readDutyOfDisclosure:!1,reviewedApplication:!1}),An.qSuperInsuranceQuestions={question1:{answered:!1},question2:{answered:!1},question3:{answered:!1},question4:{answered:!1},question5:{answered:!1},question6:{answered:!1},question7:{answered:!1},question8:{answered:!1}}}En.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Fn=class{constructor(n){t(this,n),this.insuranceChosen=!1,this.eventTrackingService=fn.Instance}componentDidLoad(){return this.eventTrackingService.TrackFinancialProductViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",financialProduct:"QSuper Insurance"})}componentWillLoad(){In()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-layout",{class:"d-flex flex-fill"},n("sss-qsuper-confirm-header",null),n("div",{class:"mt-4 p-3 checkbox-container"},n("p",null,"As part of becoming a QSuper member, you will receive death cover and total and permanent disability cover when you become eligible. ",n("br",null),n("br",null),"You will receive this cover when: ",n("br",null),n("br",null),"You are 25 years or older; ",n("br",null),"and You have had at least $6,000 in your accumulation account; ",n("br",null),"and At that time, we have received money into your account within the previous 13 months ",n("br",null),n("br",null),"Please see the Accumulation Account Insurance Guide, available on the QSuper website, for further information ",n("br",null),n("br",null),"Do you want this insurance cover?"),n("div",{class:"d-flex justify-content-between mt-4"},n("div",{class:"button-holder flex-grow-1 mr-2"},n("fl-button",{isBlockElement:!0,variant:this.insuranceChosen?"primary":"secondary",onClick:()=>this.handleInsuranceToggle(!0)},"Yes")),n("div",{class:"button-holder flex-grow-1 ml-2"},n("fl-button",{isBlockElement:!0,variant:this.insuranceChosen?"secondary":"primary",onClick:()=>this.handleInsuranceToggle(!1)},"No")))),n("div",null,n("label",{class:"d-flex mt-3 p-3 checkbox-container",htmlFor:"ackCheckBox"},n("div",{class:"w-auto px-2 fl-checkbox-container"},n("input",{id:"ackCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0"},"I acknowledge that my personal information will be shared with QSuper as part of their application process."))))))}handleInsuranceToggle(t){An.qSuperQuestionnaire.insuranceChosen=t,this.insuranceChosen=An.qSuperQuestionnaire.insuranceChosen,An.nextRoute=Bn()}handleCheckboxToggle(){An.qSuperOptInPageCheckbox=!An.qSuperOptInPageCheckbox,jn(),An.nextRoute=Bn()}};Fn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Pn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-layout",{class:"d-flex flex-fill"},n("sss-qsuper-confirm-header",null),n("div",{class:"p-3 mt-4 checkbox-container"},n("slot",null),n("sss-qsuper-question-yes-no-buttons",null))))}};Pn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Rn=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}render(){return n("sss-qsuper-layout",null,n("img",{class:"ss-choice-logo mx-auto",alt:"Simple Financial Choices Pty Ltd",src:s("assets/logo-qsuper.png")}),n("div",{class:"row"},n("div",{class:"col text-center"},n("p",{class:"confirm-title font-weight-bold mb-0"},"You have chosen to join QSuper"))),n("div",{class:"my-3 card p-3"},n("p",{class:"confirm-text"},"We are almost there... All you have to do now is sign the super choice form. We'll prefill it for you. Make sure the info is correct. Your application to join the fund is subject to Trustee approval."),n("p",{class:"confirm-text mb-0"},"You've chosen to stay with your existing fund. Review the details below and click continue to confirm your choice")),n("div",{class:"card p-3"},n("p",{class:"text-center"},"100 years strong"),n("p",{class:"text-center"},"One of Australia's largest funds"),n("p",{class:"text-center mb-0"},"Awarded SuperRatings highest performance rating")),n("div",{class:"mt-3"},n("p",{class:"text-center confirm-text"},"Your application to join the fund is subject to Trustee approval.")),n("div",null,n("label",{class:"d-flex mt-4 p-3 checkbox-container",htmlFor:"confirmCheckBox"},n("div",{class:"w-auto px-2 py-2 fl-checkbox-container"},n("input",{id:"confirmCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0 mt-1"},"I've read and understood the"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/calculators-and-forms/publications/product-disclosure-statements/")},"PDS")," ","and confirm all information I have provided is true and correct. I understand that my information will be sent to the trustee of this fund to process my request to join and I consent to my TFN, as currently held on the Flare HR Platform, being given to the trustee in order to open and administer my account.")))),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{An.standardChoiceFormSignature=t.detail.standardChoiceFormSignature,jn()}}))}handleCheckboxToggle(){An.qSuperJoinPageCheckbox=!An.qSuperJoinPageCheckbox,jn(),An.nextRoute=Bn()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Confirm Page"})}};Rn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const Mn=new class{async submitQSuperChoiceAsync(t){return Gt().url("super-choice/qsuper").post(t).badRequest((()=>{throw new Error("Failed to process QSuper join request")})).text()}},Tn=class{constructor(n){t(this,n)}async componentWillLoad(){An.nextRoute=Bn()}render(){return n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("slot",null),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,disabled:!An.continueAllowed,promiseFn:()=>this.tryAsync()},n("span",null,"Continue"))))))))}async tryAsync(){try{if(!An.continueAllowed)return;await async function(){if(An.continueAllowed)if(An.continueAllowed=!1,An.currentQSuperFormPage===kn.InsuranceConfirm&&An.qSuperQuestionnaire.insuranceChosen)An.currentQSuperFormPage=kn.InsuranceQuestions;else if(An.currentQSuperFormPage!==kn.InsuranceConfirm||An.qSuperQuestionnaire.insuranceChosen)if(An.currentQSuperFormPage!==kn.InsuranceQuestions){if(An.currentQSuperFormPage===kn.AccumulationAccount)return An.qSuperFormValid=!1,void(An.currentQSuperFormPage=kn.ConfirmSelection);if(An.currentQSuperFormPage===kn.ConfirmSelection){An.qSuperQuestionnaire.acceptedDeclaration=!0;const t={questionnaire:An.qSuperQuestionnaire,standardChoiceFormSignature:An.standardChoiceFormSignature};await Mn.submitQSuperChoiceAsync(t),Zt.markSuperSelectionAsSubmitted()}}else An.currentQSuperFormPage=kn.AccumulationAccount;else An.currentQSuperFormPage=kn.AccumulationAccount}(),tn.navigateInternally(this.history,An.nextRoute)}catch(t){hn.showErrorNotification({title:"Couldn't process your request",description:"We had an issue processing your request to join QSuper. Please try again shortly."}),An.continueAllowed=!0}}static get assetsDirs(){return["assets"]}};H(Tn);const Nn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 1"),n("p",{class:" mb-0"},"Are you currently a registered or enrolled nurse or assistant in nursing who is qualified and currently practicing, or working in the retail sector, or food and beverage service?")))}},Dn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 2"),n("p",{class:" mb-0"},"Are you currently a qualified tradesperson currently working within your area of expertise (e.g. hairdresser, chef, plumber, electrician, plasterer, carpenter or concreter), or a skilled worker with light manual duties (e.g. jeweller, building inspector, laboratory technician, foreman or office equipment technician)?")))}},On=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 3"),n("p",{class:" mb-0"},"Are you currently a police officer, firefighter, paramedic, or other emergency or protective services worker, including security guard or corrections officer, or a professional sportsperson, or working in a manual occupation which does not require trade specific qualifications and may be subject to accident or environment hazards (e.g. earthmover, driver, cleaner, labourer, factory worker or agricultural worker)?")))}},Un=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 4"),n("p",{class:" mb-0"},"Are the usual work activities of your job considered office based or school teaching ( meaning you spend at least 80% of your work time doing clerical, call centre, administrative or other office or classroom based activities), or are you a medical practitioner, lawyer or engineer who spends at least 80% of your work hours in an office or clinical environment?")))}},Ln=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 5"),n("p",{class:" mb-0"},"Do you currently perform, or intend to work in a job within the next three months that includes, any of the following risky activities: handling firearms (other than as a police officer, correctional officer or licensed security guard), dangerous chemicals or explosives, or offshore work – oil and gas platforms, ships at sea, or being underground (in construction and mining environments) or underwater for more than 20% of total at work time, or working at heights over 20 metres in any environment requiring hard hat and harness for safety by law, or crop dusting, aerial mustering or any low level flying activity (defined as below 150 metres or 500 feet), or flying more than 200 hours per annum as a passenger other than on a commercial airline, or as a pilot (fixed wing or helicopter)?")))}},zn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 6"),n("p",{class:" mb-0"},"Are you earning more than $120,000 a year, (before tax and employer paid superannuation), from your job?")))}},Vn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 7"),n("p",{class:" mb-0"},"Do you have a university qualification which you are using/is required in your current role?")))}},Hn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 8"),n("p",{class:" mb-0"},"Do you have a senior/executive level management role in your company (your direct reports would be mid-level managers or skilled specialists in a sedentary setting), or is your role considered professional (e.g. doctor, solicitor, accountant – requiring membership of a professional or government body to practice in your occupation)?")))}},Qn=class{constructor(n){t(this,n)}render(){return n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>this.handleQuestionClick(!0),isBlockElement:!0,variant:"secondary"},n("span",null,"Yes")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,variant:"secondary",onClick:()=>this.handleQuestionClick(!1)},n("span",null,"No")))))}handleQuestionClick(t){const n=window.location.pathname.split(Zt.appBaseUrl+"/qsuper/insurance/")[1].replace(/\/+$/,"");void 0===An.qSuperQuestionnaire.questions&&(An.qSuperQuestionnaire.questions={question1:!1,question2:!1,question3:!1,question4:!1,question5:!1,question6:!1,question7:!1,question8:!1}),An.qSuperQuestionnaire.questions[n]=t,An.qSuperInsuranceQuestions[n].answered=!0,An.nextRoute=Bn(),tn.navigateInternally(this.history,An.nextRoute)}};H(Qn);const Wn=class{constructor(n){t(this,n)}render(){return n(o,{class:"bg-white rounded-sm picked-box-border p-3"},n("div",{class:"d-flex"},n("div",{class:"flex-grow-1 font-weight-bold"},this.fundType),n("div",{class:"px-3 py-2 text-white picked-block position-absolute"},"You picked")),n("div",null,this.fundName))}};Wn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.picked-block{background-color:var(--fl-color-primary);border-top-right-radius:3px;right:0;top:0}.picked-box-border{border:2px solid var(--fl-color-primary)}";const $n=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}componentDidLoad(){return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Fund details"),n("p",{class:"text-warning mb-4 small"},"Make sure you are already a member of the fund before completing this step."),n("sss-self-managed-fund-inputs",{fundForm:sn.selfManagedFundForm,onFormChanged:t=>{sn.selfManagedFundForm=Object.assign(Object.assign({},sn.selfManagedFundForm),t.detail)}})),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.selfManagedFundForm=Object.assign(Object.assign({},sn.selfManagedFundForm),t.detail)}})),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){if(this.formState="validated",this.formElement.checkValidity()){const t={smsfChoice:{abn:sn.selfManagedFundForm.fundAbn,fundName:sn.selfManagedFundForm.fundName,fundAddress:{addressLine1:sn.selfManagedFundForm.addressLine1,addressLine2:sn.selfManagedFundForm.addressLine2,city:sn.selfManagedFundForm.city,state:sn.selfManagedFundForm.state,postcode:sn.selfManagedFundForm.postcode},bsb:sn.selfManagedFundForm.bsb,bankAccountName:sn.selfManagedFundForm.bankAccountName,bankAccountNumber:sn.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:sn.selfManagedFundForm.fundEsa},standardChoiceFormSignature:sn.selfManagedFundForm.standardChoiceFormSignature};await pn.submitSelfManagedFundChoiceAsync(t),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)}}};H($n);const Jn={"01":"Australia and New Zealand Banking Group","03":"Westpac Banking Corporation",73:"Westpac Banking Corporation","06":"Commonwealth Bank of Australia",76:"Commonwealth Bank of Australia","08":"National Australia Bank",78:"National Australia Bank","09":"Reserve Bank of Australia",10:"BankSA (division of Westpac Bank)",11:"St George Bank (division of Westpac Bank)",33:"St George Bank (division of Westpac Bank)",12:"Bank of Queensland",14:"Rabobank",15:"Town & Country Bank",18:"Macquarie Bank",19:"Bank of Melbourne (division of Westpac Bank)",55:"Bank of Melbourne (division of Westpac Bank)",21:"JP Morgan Chase Bank",22:"BNP Paribas",23:"Bank of America",24:"Citibank & Citibank NA",510:"Citibank & Citibank NA",25:"BNP Paribas Securities",26:"Bankers Trust Australia (division of Westpac Bank)",29:"MUFG Bank",30:"Bankwest (division of Commonwealth Bank)",31:"Bank Australia",325:"Beyond Bank",34:"HSBC Bank Australia",985:"HSBC Bank Australia",35:"Bank of China",980:"Bank of China",40:"Commonwealth Bank of Australia",41:"Deutsche Bank",42:"Commonwealth Bank of Australia",52:"Commonwealth Bank of Australia",45:"OCBC Bank",46:"Advance Bank (division of Westpac Bank)",47:"Challenge Bank (division of Westpac Bank)",48:"Suncorp-Metway",664:"Suncorp-Metway",512:"Community First Credit Union",514:"RACQ Bank",517:"Volt Bank",533:"Bananacoast Community Credit Union",57:"Australian Settlements",61:"Adelaide Bank (division of Bendigo and Adelaide Bank)",611:"Endeavour Mutual Bank",823:"Endeavour Mutual Bank",630:"Greater Bank",637:"Greater Bank",632:"B&E",633:"Bendigo Bank",634:"Uniting Financial Services",638:"Heritage Bank",880:"Heritage Bank",639:"Home Building Society (division of Bank of Queensland)",640:"Hume Bank",641:"IMB",647:"IMB",642:"Australian Military Bank",645:"Auswide Bank",656:"Auswide Bank",646:"Maitland Mutual Building Society",650:"Newcastle Permanent Building Society",653:"Pioneer Permanent Building Society (division of Bank of Queensland)",654:"Queensland Country Credit Union",655:"The Rock",659:"G&C Mutual Bank",676:"Gateway Bank",70:"Indue",721:"Holiday Coast Credit Union",722:"Southern Cross Credit Union",723:"Bank of Heritage Isle",724:"MOVE",728:"Summerland Credit Union",777:"Police & Nurse",80:"Cuscal",670:"Cuscal",812:"Teachers Mutual Bank",813:"Capricornian",814:"Credit Union Australia",815:"Police Bank",817:"Warwick Credit Union",818:"Bank of Communications",819:"Industrial & Commercial Bank of China",824:"Sutherland Credit Union",825:"Big Sky Building Society",833:"Defence Bank",882:"Unity Bank",888:"China Construction Bank",90:"Australia Post",911:"Sumitomo Mitsui Banking Corporation",913:"State Street Bank & Trust Company",917:"Arab Bank Australia",918:"Mizuho Bank",922:"United Overseas Bank",923:"ING Bank",936:"ING Bank",931:"Mega International Commercial Bank",932:"Regional Australia Bank",939:"AMP Bank",941:"Delphi Bank (division of Bendigo and Adelaide Bank)",942:"Bank of Sydney",943:"Taiwan Business Bank",944:"Members Equity Bank",946:"UBS AG",951:"BOQ Specialist",969:"Tyro Payments"},Xn=class{constructor(n){t(this,n),this.formChanged=e(this,"formChanged",7),this.currentBank=U,this.stateOptions=[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}],this.bsbRegex=new RegExp(/^[0-9]{3}[0-9]{3}$/),this.bankAccountNumberRegex=new RegExp(/^[0-9]{2,10}$/)}render(){return n("div",null,n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Fund name *"),n("input",{placeholder:"Enter your fund name",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundName",id:"fundName",value:sn.selfManagedFundForm.fundName,onChange:t=>this.updateFormField("fundName",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund name")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Fund ABN *"),n("input",{placeholder:"Enter your fund ABN",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundAbn",id:"fundAbn",value:sn.selfManagedFundForm.fundAbn,onChange:t=>this.updateFormField("fundAbn",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund ABN")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Electronic service address alias (ESA) *"),n("input",{placeholder:"Enter your ESA",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundEsa",id:"fundEsa",value:sn.selfManagedFundForm.fundEsa,onChange:t=>this.updateFormField("fundEsa",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund ESA")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Address line 1 *"),n("input",{placeholder:"Enter your address",type:"text",class:"form-control",required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:sn.selfManagedFundForm.addressLine1,onChange:t=>this.updateFormField("addressLine1",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid address")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Address line 2 (optional)"),n("input",{placeholder:"Enter your address",type:"text",class:"form-control",name:"addressLine2",id:"addressLine2",value:sn.selfManagedFundForm.addressLine2,onChange:t=>this.updateFormField("addressLine2",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid address")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"City/suburb *"),n("input",{placeholder:"Enter your city",type:"text",class:"form-control",name:"city",required:!0,id:"city",value:sn.selfManagedFundForm.city,onChange:t=>this.updateFormField("city",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid city/suburb *")),n("div",{class:"mt-3"},n("label",{class:"mb-2 font-weight-bold"},"State *"),n("fl-dropdown",{options:this.stateOptions,required:!0,requiredValidationMessage:"Select a state",placeholder:"Select a state",value:this.fundForm.state,onValueChanged:t=>{this.updateFormField("state",t.detail.value.toString())}}),n("div",{class:"invalid-feedback"},"Select a state")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Post code *"),n("input",{placeholder:"Enter your post code",type:"text",required:!0,class:"form-control",name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:sn.selfManagedFundForm.postcode,onChange:t=>this.updateFormField("postcode",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid post code")),n("div",null,n("i",{class:"fas fa-check-circle"})),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"BSB *"),n("input",{placeholder:"Enter your BSB",type:"text",required:!0,class:"form-control",name:"bsb",id:"bsb",minlength:"6",maxlength:"7",onKeyUp:t=>this.updateCurrentBank(t),pattern:this.bsbRegex.source,value:sn.selfManagedFundForm.bsb}),D(this.currentBank)&&n("p",{class:"mt-3"},n("strong",null,"Bank name"),n("br",null),n("span",{class:"ml-2"},this.currentBank.value)),n("div",{class:"invalid-feedback"},"Enter a valid BSB")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Bank account name *"),n("input",{placeholder:"Enter your bank account name",type:"text",required:!0,class:"form-control",name:"bankAccountName",minlength:"2",id:"bankAccountName",value:sn.selfManagedFundForm.bankAccountName,onChange:t=>this.updateFormField("bankAccountName",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid bank account name")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Bank account number *"),n("input",{placeholder:"Enter your bank account number",type:"text",required:!0,class:"form-control",name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,value:sn.selfManagedFundForm.bankAccountNumber,onKeyUp:t=>this.updateCurrentBankAccountNumber(t),onChange:t=>this.updateFormField("bankAccountNumber",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid bank account number")))}updateFormField(t,n){this.formChanged.emit({[t]:n})}filterDigits(t){return t.replace(/[^0-9]/g,"")}updateCurrentBank(t){const n=this.filterDigits(t.target.value),e=n.substring(0,2),i=n.substring(0,3),r=Jn[e],o=Jn[i];r&&(this.currentBank=L(r)),o&&(this.currentBank=L(o)),""===n&&(this.currentBank=U),this.updateFormField("bsb",n)}updateCurrentBankAccountNumber(t){const n=this.filterDigits(t.target.value);this.updateFormField("bankAccountNumber",n)}};var Gn;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(Gn||(Gn={}));class Kn{}let Yn=class extends g{constructor(){super({authenticationState:Gn.Unauthorized,jwt:U,reactNativeInterop:U,iframeInterop:U,appConfiguration:U})}};Yn=function(t,n,e,i){var r,o=arguments.length,s=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(n,e,s):r(n,e))||s);return o>3&&s&&Object.defineProperty(n,e,s),s}([b({name:"sss-session",resettable:!0})],Yn);const Zn=new Yn,te=new class extends w{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return D(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return D(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(O(t))throw Error("Failed to get iframe interop information: no data in store");if(!this.isIframeInteropEnabled())throw Error("Failed to get iframe interop information: iframe mode is disabled");return t.value}}(Zn),{state:ne}=qt({slateFundForm:{memberNumber:"",standardChoiceFormSignature:""}}),ee=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"==window.location.origin,this.hostIsDeployed=()=>window.location.origin.endsWith("partner.flarehr.com"),this.skipConsolidation=()=>te.isReactNativeInteropEnabled()?"true":"false"}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=(this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app")+"/slate-redirect.html",i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:e,cancelRedirectUrl:e,skipConsolidation:this.skipConsolidation()});this.includeJwt()&&(i.authToken=Zt.jwt);const r=e=>{const{data:i,origin:o}=e;if(i)if("slate-redirect"!==i.sender){if("flare"===i.sender&&o.endsWith("join.slatesuper.com.au"))switch(i.type){case"contentResized":t.height=i.height>0?i.height:t.height,t.width=i.width>0?i.width:t.width}}else switch(window.removeEventListener("message",r),i.type){case"success":if(i.memberNumber){ne.slateFundForm.memberNumber=i.memberNumber,tn.navigateInternally(n,nn.SlateStandardChoice);break}default:tn.navigateInternally(n,nn.ChoicePage)}};window.addEventListener("message",r);const o=t.contentDocument;o.open();const s=o.createElement("form");let a;for(a in s.method="POST",s.target="_self",s.action=Zt.slateJoinAppPostUrl,i){const t=i[a];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=a,n.value=t,s.append(n)}}o.appendChild(s),o.close(),s.submit()}getSlateJoinMemberData(){var t,n;const e=Zt.superBuyer;return{firstName:e.userProfile.firstName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:(t=>{switch(t){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}})(e.userProfile.gender),email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}includeJwt(){return!Zt.slateJoinAppPostUrl.match(/autodev|preprod/)}},ie=class{constructor(n){t(this,n)}componentDidLoad(){ee.build(this.iframeElement,this.history)}render(){return n(o,{class:"d-flex flex-fill"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:t=>this.iframeElement=t}))}},re=new class{async submitSlateChoiceAsync(t){return Gt().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},oe=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("sss-slatesuper-header",null),n("div",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{ne.slateFundForm=Object.assign(Object.assign({},ne.slateFundForm),t.detail)}})),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("stencil-route-link",{url:"/"},n("fl-button",{isBlockElement:!0,variant:"secondary"},n("span",null,"Back"))))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit"))))))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await re.submitSlateChoiceAsync(ne.slateFundForm),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success))}},se=class{constructor(n){t(this,n)}render(){return n("div",{class:"d-flex"},n("div",null,n("img",{class:"ss-choice-logo img-thumbnail",alt:"Simple Financial Choices Pty Ltd",src:s("assets/logo-slate.png")})),n("div",{class:"d-flex flex-column ml-3 align-items-left"},n("p",{class:"confirm-title font-weight-bold mb-0"},"You’re almost there!"),n("p",{class:"confirm-text mb-0"},"To proceed type your name below which authorises the signing of the Standard Choice form confirming your super selection.")))}static get assetsDirs(){return["assets"]}};se.style="";const ae=class{constructor(n){t(this,n),this.standardChoiceFormSignatureUpdated=e(this,"standardChoiceFormSignatureUpdated",7),this.standardChoiceFormUrl=tn.toExternalUrl("https://www.ato.gov.au/uploadedFiles/Content/SPR/downloads/SUPER17983Superannuation_standard_choice_form.pdf"),this.standardChoiceFormSignature=""}render(){return n("div",{class:"card p-4 mt-4 bg-light"},n("h4",{class:"small font-weight-bold"},"Superannuation Standard Choice Form"),n("p",{class:"small mt-2"},"The superannuation"," ",n("a",{target:"_blank",href:this.standardChoiceFormUrl},"standard choice form")," ","informs your employer of your choice of fund."),n("h4",{class:"small font-weight-bold"},"Type your full name below (required)"),n("input",{placeholder:"Type your full name",type:"text",class:"form-control",required:!0,minlength:"2",name:"standardChoiceFormSignature",id:"standardChoiceFormSignature",value:this.standardChoiceFormSignature,onKeyUp:t=>this.updateFormField(t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Type your full name"),n("p",{class:"small mt-3 mb-0"},"Your authorisation is required for signing this form. Applying your full name in the text field above is the same as applying your written signature and is legally binding."))}updateFormField(t){this.standardChoiceFormSignatureUpdated.emit({standardChoiceFormSignature:t})}},ce=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("div",{class:"container mt-5"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-9 col-md-6"},n("div",{class:"bg-light rounded p-4"},n("div",{class:"d-flex justify-content-center"},n("div",null,n("svg",{width:"3em",height:"3em",viewBox:"0 0 16 16",class:"bi bi-check-circle-fill text-success",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},n("path",{"fill-rule":"evenodd",d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})))),n("div",{class:"d-flex justify-content-center"},n("p",{class:"mt-3 confirm-title text-center font-weight-bold px-5"},"Successfully updated superannuation details")),n("div",{class:"mt-2 text-center"},n("p",{class:"confirm-text mb-0"},"Your superannuation details have been updated successfully."),n("br",null),n("p",{class:"confirm-text mb-0"},"To continue with your onboarding, press ",n("strong",null,"Continue")," below."))),n("div",{class:"flex-grow-1 mt-4"},n("fl-promise-button",{isBlockElement:!0,onClick:this.handleContinueButtonClick},n("span",null,"Continue")))))))}handleContinueButtonClick(t){Zt.completeSuperSelectionFlow()}},ue=class{constructor(n){t(this,n),this.joinFundClicked=e(this,"joinFundClicked",7),this.eventTrackingService=fn.Instance}render(){return n(o,{class:{"d-flex p-3":!0,"ss-picked-fund":this.isSelected}},n("div",{class:"card-body pb-0 px-0 px-xl-3"},this.isSelected&&n("div",{class:"px-3 py-2 text-white picked-block position-absolute"},"You picked"),n("div",{class:"d-flex flex-fill flex-column align-items-center"},n("img",{class:"ss-choice-logo",alt:"Simple Financial Choices Pty Ltd",src:s("assets/"+this.logo)}),n("p",{class:"font-weight-bold text-center mt-3 mb-0"},this.heading),n("div",{class:"mt-3"},JSON.parse(this.features).map((t=>n("p",{class:"text-center"},t.value)))))),n("div",{class:"text-center"},n("div",{class:"p-3"},n("fl-button",{class:"uuid-button-continue",isBlockElement:!0,onClick:()=>this.handleFundClick()},this.callToAction)),n("a",{target:"_blank",href:this.pdsLink,onClick:()=>this.pdsViewedAsync()},"View PDS")))}handleFundClick(){return this.joinFundClicked.emit()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:this.usi,fundName:this.name,fundNameAlt:this.heading,pageName:"Panel Fund Page"})}static get assetsDirs(){return["assets"]}};ue.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const le=new class{async GetChosenFundAsync(){var t;const n=null===(t=Zt.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!n)return U;if("promoted"in n)return L({isPromoted:!0,promotedId:"qsuper"in n.promoted?"qsuper":"slate"in n.promoted?"slate":""});if("smsf"in n)return L({isPromoted:!1,name:n.smsf.fundName,type:"Self Managed Fund"});if("myOwnFund"in n){const t=n.myOwnFund.usi,e=await this.getFundByUsiAsync(t);return L({isPromoted:!1,name:D(e)?e.value.productName:t,type:"My Own Fund"})}if("default"in n){const t=n.default.usi,e=await this.getFundByUsiAsync(t);return L({isPromoted:!1,name:D(e)?e.value.productName:t,type:"Default Fund"})}return U}getFundByUsiAsync(t){return un.getFundByUsiAsync(t)}},fe=class{constructor(n){t(this,n),this.promotedFunds=this.getPromotedFunds(),this.chosenFund=U,this.eventTrackingService=fn.Instance,this.isPromotedFundSelected=t=>D(this.chosenFund)&&this.chosenFund.value.isPromoted&&this.chosenFund.value.promotedId===t}componentDidLoad(){yt();const t=this.promotedFunds.map((t=>t.usi));this.eventTrackingService.TrackSuperFundPanelViewedAsync({enabledFundIds:t})}async componentWillLoad(){In(),this.chosenFund=await le.GetChosenFundAsync()}render(){return n(o,null,n("div",{class:"container mt-0 mb-0"},n("div",{class:"row justify-content-center"},n("div",{class:"col"},n("a",{class:"text-decoration-none",href:tn.toExternalUrl("https://slatesuper.com.au/product-disclosure-statement-pdf"),target:"_blank"},n("p",{class:"mt-3 small text-center mb-1 text-dark"},"Powered by"),n("h5",{class:"font-weight-bold text-center mb-4"},n("span",{class:"text-dark mr-1"},"Simple Financial"),n("span",{class:"simple-choices-text"},"Choices"))))),n("div",{class:"row justify-content-center"},n("div",{class:"col"},n("p",{class:"text-center"},"Selecting the right super fund is very important. Simple Financial Choices have provided you with easy access to the below funds to make your choice an easy one, if you think that one of them might suit your needs."),n("p",{class:"text-center small"},"The content on this page and on the following pages relating to superannuation is provided by Simple Financial Choices. The superannuation funds presented below are neither selected nor recommended by your employer nor by Flare HR."),n("p",{class:"text-center small"},"We aren't recommending these funds as being suitable for you because there are many super funds out there and you will need to choose what is best for you. If you are unsure, obtain your own advice. You should be aware that, if you do choose one of these funds, Flare and its associated entities will normally receive a fee for you doing so."))),n("div",{class:"row"},n("div",{class:"col"},n("sss-notifications-section",null))),n("div",{class:"row justify-content-center mt-4"},n("div",{class:"col col-sm-10 col-md-8 col-xl-7"},n("div",{class:"row"},n("div",{class:"col"},n("div",{class:"d-flex flex-fill"},D(this.chosenFund)&&!this.chosenFund.value.isPromoted&&n("sss-selected-super-choice-section",{fundType:this.chosenFund.value.type,fundName:this.chosenFund.value.name,class:"flex-fill position-relative"})))),n("div",{class:"row mt-3"},this.promotedFunds.map((t=>n("div",{class:"col-12 col-lg-6 d-flex"},n("sss-super-choice-item",{class:"card mb-3 mb-lg-0 mx-0 flex-grow-1",logo:t.logo,isSelected:this.isPromotedFundSelected(t.fundId),usi:t.usi,name:t.name,heading:t.heading,pdsLink:tn.toExternalUrl(t.pdsLink),features:JSON.stringify(t.features),callToAction:t.callToAction,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)}))))),n("div",{class:"row mt-3"},n("div",{class:"col"},n("stencil-route-link",{url:nn.MyOwnFund},n("fl-button",{isBlockElement:!0,variant:"secondary"},"I prefer to select another fund"))))))))}getPromotedFunds(){return[{fundId:"slate",usi:"32367272075001",name:"Slate Super",heading:"Modern Digital Fund",logo:"logo-slate.png",route:nn.SlateJoin,callToAction:"Join Slate Super",pdsLink:"https://slatesuper.com.au/pds/?utm_source=flare&utm_medium=superselection",features:[{order:1,value:"Personalised lifestages investment strategy that evolves with you"},{order:2,value:"Advanced mobile app with retirement forecast and smart features"},{order:3,value:"Your own personal concierge at Slate to assist with your account"}]},{fundId:"qsuper",usi:"60905115063001",name:"QSuper",heading:"Recognised performer",logo:"logo-qsuper-square.png",route:nn.QSuperOptIn,callToAction:"Join QSuper",pdsLink:"https://qsuper.qld.gov.au/calculators-and-forms/publications/product-disclosure-statements",features:[{order:1,value:"100 years strong"},{order:2,value:"One of Australia's largest funds"},{order:3,value:"Awarded SuperRatings highest performance rating"}]}]}async handleJoinSuperClickAsync(t){return"slate"===t.fundId?await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:"32367272075001",fundName:"Slate Super",fundNameAlt:"Modern Digital Fund"}):"qsuper"===t.fundId&&await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer"}),tn.navigateInternally(this.history,t.route)}static get assetsDirs(){return["assets"]}};fe.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const de=class{constructor(n){t(this,n),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const n=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!n)return this.previousMatch=this.match,this.match=lt(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};var n,e;this.history&&this.history.location.hash?t={scrollToId:this.history.location.hash.substr(1)}:this.scrollTopOffset&&(t={scrollTopOffset:this.scrollTopOffset}),"function"==typeof this.componentUpdated?this.componentUpdated(t):!this.match||(e=this.previousMatch,null==(n=this.match)&&null==e||null!=e&&n&&e&&n.path===e.path&&n.url===e.url&&st(n.params,e.params))||!this.routeViewsUpdated||this.routeViewsUpdated(t)}async componentDidUpdate(){await this.loadCompleted()}async componentDidLoad(){await this.loadCompleted()}render(){if(!this.match||!this.history)return null;const t=Object.assign({},this.componentProps,{history:this.history,match:this.match});return this.routeRender?this.routeRender(Object.assign({},t,{component:this.component})):this.component?n(this.component,Object.assign({},t)):void 0}get el(){return a(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(de,["location","history","historyType","routeViewsUpdated"]),de.style="stencil-route.inactive{display:none}";const he=(t,n,e)=>e(t.confirm(n)),pe=(t,n)=>{const e=t[n],i="__storage_test__";try{return e.setItem(i,i),e.removeItem(i),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}},ve=class{constructor(n){t(this,n),this.unsubscribe=()=>{},this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}componentWillLoad(){this.computeMatch()}computeMatch(){this.location&&(this.match=lt(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var n,e,i;if(!((n=t).metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push((i=this.root,"/"==(e=this.url).charAt(0)&&"/"==i.charAt(i.length-1)?i.slice(0,i.length-1)+e:i+e))}render(){let t={class:{[this.activeClass]:null!==this.match},onClick:this.handleClick.bind(this)};return this.anchorClass&&(t.class[this.anchorClass]=!0),"a"===this.custom&&(t=Object.assign({},t,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex,"aria-haspopup":this.ariaHaspopup,id:this.anchorId,"aria-posinset":this.ariaPosinset,"aria-setsize":this.ariaSetsize,"aria-label":this.ariaLabel})),n(this.custom,Object.assign({},t),n("slot",null))}get el(){return a(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(ve,["history","location","root"]);const me=t=>"STENCIL-ROUTE"===t.tagName,be=class{constructor(n){t(this,n),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=c(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let n=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(me).map(((e,i)=>{const r=lt(t.pathname,{path:e.url,exact:e.exact,strict:!0});return r&&-1===n&&(n=i),{el:e,match:r}})),-1===n)return;if(this.activeIndex===n)return void(this.subscribers[n].el.match=this.subscribers[n].match);this.activeIndex=n;const e=this.subscribers[this.activeIndex];this.scrollTopOffset&&(e.el.scrollTopOffset=this.scrollTopOffset),e.el.group=this.group,e.el.match=e.match,e.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,n)=>{if(t.el.componentUpdated=void 0,n===this.activeIndex)return t.el.style.display="";this.scrollTopOffset&&(t.el.scrollTopOffset=this.scrollTopOffset),t.el.group=this.group,t.el.match=null,t.el.style.display="none"}))})),this.routeViewsUpdated&&this.routeViewsUpdated(Object.assign({scrollTopOffset:this.scrollTopOffset},t))}}render(){return n("slot",null)}get el(){return a(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};A.injectProps(be,["location","routeViewsUpdated"]);const ge=(t,...n)=>{t||console.warn(...n)},we=()=>{let t,n=[];return{setPrompt:n=>(ge(null==t,"A history supports only one prompt at a time"),t=n,()=>{t===n&&(t=null)}),confirmTransitionTo:(n,e,i,r)=>{if(null!=t){const o="function"==typeof t?t(n,e):t;"string"==typeof o?"function"==typeof i?i(o,r):(ge(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==o)}else r(!0)},appendListener:t=>{let e=!0;const i=(...n)=>{e&&t(...n)};return n.push(i),()=>{e=!1,n=n.filter((t=>t!==i))}},notifyListeners:(...t)=>{n.forEach((n=>n(...t)))}}},ye=(t,n="scrollPositions")=>{let e=new Map;const i=(n,i)=>{if(e.set(n,i),pe(t,"sessionStorage")){const n=[];e.forEach(((t,e)=>{n.push([e,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(n))}};if(pe(t,"sessionStorage")){const i=t.sessionStorage.getItem(n);e=i?new Map(JSON.parse(i)):e}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:i,get:t=>e.get(t),has:t=>e.has(t),capture:n=>{i(n,[t.scrollX,t.scrollY])}}},xe={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+nt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:nt,decodePath:tt},slash:{encodePath:tt,decodePath:tt}},ke=(t,n)=>{const e=0==t.pathname.indexOf(n)?"/"+t.pathname.slice(n.length):t.pathname;return Object.assign({},t,{pathname:e})},Se={browser:(t,n={})=>{let e=!1;const i=t.history,r=t.location,o=t.navigator,s=(t=>{const n=t.navigator.userAgent;return(-1===n.indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&t.history&&"pushState"in t.history})(t),a=!(-1===o.userAgent.indexOf("Trident")),c=ye(t),u=null!=n.forceRefresh&&n.forceRefresh,l=null!=n.getUserConfirmation?n.getUserConfirmation:he,f=null!=n.keyLength?n.keyLength:6,d=n.basename?Z(tt(n.basename)):"",h=()=>{try{return t.history.state||{}}catch(t){return{}}},p=t=>{t=t||{};const{key:n,state:e}=t,{pathname:i,search:o,hash:s}=r;let a=i+o+s;return ge(!d||K(a,d),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+d+'".'),d&&(a=Y(a,d)),at(a,e,n||rt(f))},v=we(),m=t=>{c.capture(B.location.key),Object.assign(B,t),B.location.scrollPosition=c.get(B.location.key),B.length=i.length,v.notifyListeners(B.location,B.action)},b=t=>{((t,n)=>void 0===n.state&&-1===t.userAgent.indexOf("CriOS"))(o,t)||w(p(t.state))},g=()=>{w(p(h()))},w=t=>{if(e)e=!1,m();else{const n="POP";v.confirmTransitionTo(t,n,l,(e=>{e?m({action:n,location:t}):y(t)}))}},y=t=>{let n=k.indexOf(B.location.key),i=k.indexOf(t.key);-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,_(r))},x=p(h());let k=[x.key],S=0,C=!1;const A=t=>d+et(t),_=t=>{i.go(t)},q=n=>{S+=n,1===S?(t.addEventListener("popstate",b),a&&t.addEventListener("hashchange",g)):0===S&&(t.removeEventListener("popstate",b),a&&t.removeEventListener("hashchange",g))},B={length:i.length,action:"POP",location:x,createHref:A,push:(t,n)=>{ge(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");const e="PUSH",o=at(t,n,rt(f),B.location);v.confirmTransitionTo(o,e,l,(t=>{if(!t)return;const n=A(o),{key:a,state:c}=o;if(s)if(i.pushState({key:a,state:c},"",n),u)r.href=n;else{const t=k.indexOf(B.location.key),n=k.slice(0,-1===t?0:t+1);n.push(o.key),k=n,m({action:e,location:o})}else ge(void 0===c,"Browser history cannot push state in browsers that do not support HTML5 history"),r.href=n}))},replace:(t,n)=>{ge(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");const e="REPLACE",o=at(t,n,rt(f),B.location);v.confirmTransitionTo(o,e,l,(t=>{if(!t)return;const n=A(o),{key:a,state:c}=o;if(s)if(i.replaceState({key:a,state:c},"",n),u)r.replace(n);else{const t=k.indexOf(B.location.key);-1!==t&&(k[t]=o.key),m({action:e,location:o})}else ge(void 0===c,"Browser history cannot replace state in browsers that do not support HTML5 history"),r.replace(n)}))},go:_,goBack:()=>_(-1),goForward:()=>_(1),block:(t="")=>{const n=v.setPrompt(t);return C||(q(1),C=!0),()=>(C&&(C=!1,q(-1)),n())},listen:t=>{const n=v.appendListener(t);return q(1),()=>{q(-1),n()}},win:t};return B},hash:(t,n={})=>{let e=!1,i=null,r=0,o=!1;const s=t.location,a=t.history,c=-1===t.navigator.userAgent.indexOf("Firefox"),u=null!=n.keyLength?n.keyLength:6,{getUserConfirmation:l=he,hashType:f="slash"}=n,d=n.basename?Z(tt(n.basename)):"",{encodePath:h,decodePath:p}=xe[f],v=()=>{const t=s.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)},m=t=>{const n=s.href.indexOf("#");s.replace(s.href.slice(0,n>=0?n:0)+"#"+t)},b=()=>{let t=p(v());return ge(!d||K(t,d),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+d+'".'),d&&(t=Y(t,d)),at(t,void 0,rt(u))},g=we(),w=t=>{Object.assign(E,t),E.length=a.length,g.notifyListeners(E.location,E.action)},y=()=>{const t=v(),n=h(t);if(t!==n)m(n);else{const t=b(),n=E.location;if(!e&&(r=n).pathname===(o=t).pathname&&r.search===o.search&&r.hash===o.hash&&r.key===o.key&&st(r.state,o.state))return;if(i===et(t))return;i=null,x(t)}var r,o},x=t=>{if(e)e=!1,w();else{const n="POP";g.confirmTransitionTo(t,n,l,(e=>{e?w({action:n,location:t}):k(t)}))}},k=t=>{let n=_.lastIndexOf(et(E.location)),i=_.lastIndexOf(et(t));-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,q(r))},S=v(),C=h(S);S!==C&&m(C);const A=b();let _=[et(A)];const q=t=>{ge(c,"Hash history go(n) causes a full page reload in this browser"),a.go(t)},B=(t,n)=>{r+=n,1===r?t.addEventListener("hashchange",y):0===r&&t.removeEventListener("hashchange",y)},E={length:a.length,action:"POP",location:A,createHref:t=>"#"+h(d+et(t)),push:(t,n)=>{ge(void 0===n,"Hash history cannot push state; it is ignored");const e="PUSH",r=at(t,void 0,rt(u),E.location);g.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),o=h(d+n);if(v()!==o){i=n,(t=>{s.hash=t})(o);const t=_.lastIndexOf(et(E.location)),a=_.slice(0,-1===t?0:t+1);a.push(n),_=a,w({action:e,location:r})}else ge(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),w()}))},replace:(t,n)=>{ge(void 0===n,"Hash history cannot replace state; it is ignored");const e="REPLACE",r=at(t,void 0,rt(u),E.location);g.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),o=h(d+n);v()!==o&&(i=n,m(o));const s=_.indexOf(et(E.location));-1!==s&&(_[s]=n),w({action:e,location:r})}))},go:q,goBack:()=>q(-1),goForward:()=>q(1),block:(n="")=>{const e=g.setPrompt(n);return o||(B(t,1),o=!0),()=>(o&&(o=!1,B(t,-1)),e())},listen:n=>{const e=g.appendListener(n);return B(t,1),()=>{B(t,-1),e()}},win:t};return E}},Ce=class{constructor(n){t(this,n),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const n=this.history.win.document.getElementById(t.scrollToId);if(n)return n.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=c(this,"isServer"),this.queue=c(this,"queue")}componentWillLoad(){this.history=Se[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=ke(t,this.root),this.location=t})),this.location=ke(this.history.location,this.root)}scrollTo(t){const n=this.history;if(null!=t&&!this.isServer&&n)return"POP"===n.action&&Array.isArray(n.location.scrollPosition)?this.queue.write((()=>{n&&n.location&&Array.isArray(n.location.scrollPosition)&&n.win.scrollTo(n.location.scrollPosition[0],n.location.scrollPosition[1])})):this.queue.write((()=>{n.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return n(A.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},n("slot",null))}get el(){return a(this)}},Ae=class{constructor(n){t(this,n),this.stepSubmitSuccess=e(this,"step-completion",7),this.successPageAcknowledged=e(this,"successPageAcknowledged",5),this.initialised=e(this,"initialised",7),this.isAppInitialised=!1}async componentWillLoad(){const t=jt.fromNullable(this.accessToken);if(jt.isNone(t))throw Error("jwt property is missing.");Zt.state.jwt=t;const n=jt.fromNullable(this.backendUrl);if(jt.isNone(n))throw Error("apiBaseUrl property is missing.");Zt.state.apiBaseUrl=jt.some(n.value.replace(/\/$/,"")+"/");const e=jt.fromNullable(this.appBaseUrl);if(jt.isNone(e))throw Error("appBaseUrl property is missing.");Zt.state.appBaseUrl=jt.some(e.value.replace(/\/$/,""));const i=jt.fromNullable(this.slateJoinAppUrl);if(jt.isNone(i))throw Error("Slate join app url property is missing.");Zt.state.slateJoinAppPostUrl=i,Zt.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),Zt.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),Zt.state.hasSuperSelectionBeenSubmitted=!1)}))}async componentDidLoad(){In(),await Zt.loadAppStateAsync(),this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:Zt.accountIdOrDefault,partnerIdOrDefault:Zt.partnerIdOrDefault,profileId:Zt.profileId})}authTokenChanged(t){Zt.state.jwt=jt.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return n(o,{class:"d-flex justify-content-center flex-grow-1"},n("div",{class:"d-flex flex-column justify-content-between"},this.renderAppContent()))}routerBaseUrl(){var t;return(null===(t=this.appBaseUrl)||void 0===t?void 0:t.replace(/\/$/,""))+"/"}renderAppContent(){return n("stencil-router",{root:this.routerBaseUrl()},n("stencil-route-switch",{scrollTopOffset:0},n("div",{class:"d-flex flex-column"},n("div",{class:"d-flex justify-content-center"},this.isAppInitialised?en:n("fl-loading-indicator",{class:"mt-5"})),n("div",{class:"d-flex justify-content-center"},n("sss-footer-section",null)))))}static get watchers(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}}};H(Ae),Ae.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}stencil-route{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto}stencil-route:empty{display:none}";var _e,qe=[],Be="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(_e||(_e={}));var Ee,je=function(t){return Object.freeze(t)},Ie=function(t,n){this.inlineSize=t,this.blockSize=n,je(this)},Fe=function(){function t(t,n,e,i){return this.x=t,this.y=n,this.width=e,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,je(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(n){return new t(n.x,n.y,n.width,n.height)},t}(),Pe=function(t){return t instanceof SVGElement&&"getBBox"in t},Re=function(t){if(Pe(t)){var n=t.getBBox();return!n.width&&!n.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},Me=function(t){var n,e,i=null===(e=null===(n=t)||void 0===n?void 0:n.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(i&&t instanceof i.Element)},Te="undefined"!=typeof window?window:{},Ne=new WeakMap,De=/auto|scroll/,Oe=/^tb|vertical/,Ue=/msie|trident/i.test(Te.navigator&&Te.navigator.userAgent),Le=function(t){return parseFloat(t||"0")},ze=function(t,n,e){return void 0===t&&(t=0),void 0===n&&(n=0),void 0===e&&(e=!1),new Ie((e?n:t)||0,(e?t:n)||0)},Ve=je({devicePixelContentBoxSize:ze(),borderBoxSize:ze(),contentBoxSize:ze(),contentRect:new Fe(0,0,0,0)}),He=function(t,n){if(void 0===n&&(n=!1),Ne.has(t)&&!n)return Ne.get(t);if(Re(t))return Ne.set(t,Ve),Ve;var e=getComputedStyle(t),i=Pe(t)&&t.ownerSVGElement&&t.getBBox(),r=!Ue&&"border-box"===e.boxSizing,o=Oe.test(e.writingMode||""),s=!i&&De.test(e.overflowY||""),a=!i&&De.test(e.overflowX||""),c=i?0:Le(e.paddingTop),u=i?0:Le(e.paddingRight),l=i?0:Le(e.paddingBottom),f=i?0:Le(e.paddingLeft),d=i?0:Le(e.borderTopWidth),h=i?0:Le(e.borderRightWidth),p=i?0:Le(e.borderBottomWidth),v=f+u,m=c+l,b=(i?0:Le(e.borderLeftWidth))+h,g=d+p,w=a?t.offsetHeight-g-t.clientHeight:0,y=s?t.offsetWidth-b-t.clientWidth:0,x=r?v+b:0,k=r?m+g:0,S=i?i.width:Le(e.width)-x-y,C=i?i.height:Le(e.height)-k-w,A=S+v+y+b,_=C+m+w+g,q=je({devicePixelContentBoxSize:ze(Math.round(S*devicePixelRatio),Math.round(C*devicePixelRatio),o),borderBoxSize:ze(A,_,o),contentBoxSize:ze(S,C,o),contentRect:new Fe(f,c,S,C)});return Ne.set(t,q),q},Qe=function(t,n,e){var i=He(t,e),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(n){case _e.DEVICE_PIXEL_CONTENT_BOX:return s;case _e.BORDER_BOX:return r;default:return o}},We=function(t){var n=He(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=je([n.borderBoxSize]),this.contentBoxSize=je([n.contentBoxSize]),this.devicePixelContentBoxSize=je([n.devicePixelContentBoxSize])},$e=function(t){if(Re(t))return 1/0;for(var n=0,e=t.parentNode;e;)n+=1,e=e.parentNode;return n},Je=function(){var t=1/0,n=[];qe.forEach((function(e){if(0!==e.activeTargets.length){var i=[];e.activeTargets.forEach((function(n){var e=new We(n.target),r=$e(n.target);i.push(e),n.lastReportedSize=Qe(n.target,n.observedBox),r<t&&(t=r)})),n.push((function(){e.callback.call(e.observer,i,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,i=n;e<i.length;e++)(0,i[e])();return t},Xe=function(t){qe.forEach((function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach((function(e){e.isActive()&&($e(e.target)>t?n.activeTargets.push(e):n.skippedTargets.push(e))}))}))},Ge=[],Ke=0,Ye={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ze=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ti=function(t){return void 0===t&&(t=0),Date.now()+t},ni=!1,ei=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var n=this;if(void 0===t&&(t=250),!ni){ni=!0;var e,i=ti(t);e=function(){var e=!1;try{e=function(){var t,n=0;for(Xe(n);qe.some((function(t){return t.activeTargets.length>0}));)n=Je(),Xe(n);return qe.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Be}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Be),window.dispatchEvent(t)),n>0}()}finally{if(ni=!1,t=i-ti(),!Ke)return;e?n.run(1e3):t>0?n.run(t):n.start()}},function(t){if(!Ee){var n=0,e=document.createTextNode("");new MutationObserver((function(){return Ge.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),Ee=function(){e.textContent=""+(n?n--:n++)}}Ge.push(t),Ee()}((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ye)};document.body?n():Te.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ze.forEach((function(n){return Te.addEventListener(n,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ze.forEach((function(n){return Te.removeEventListener(n,t.listener,!0)})),this.stopped=!0)},t}()),ii=function(t){!Ke&&t>0&&ei.start(),!(Ke+=t)&&ei.stop()},ri=function(){function t(t,n){this.target=t,this.observedBox=n||_e.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,n=Qe(this.target,this.observedBox,!0);return Pe(t=this.target)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},t}(),oi=function(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n},si=new WeakMap,ai=function(t,n){for(var e=0;e<t.length;e+=1)if(t[e].target===n)return e;return-1},ci=function(){function t(){}return t.connect=function(t,n){var e=new oi(t,n);si.set(t,e)},t.observe=function(t,n,e){var i=si.get(t),r=0===i.observationTargets.length;ai(i.observationTargets,n)<0&&(r&&qe.push(i),i.observationTargets.push(new ri(n,e&&e.box)),ii(1),ei.schedule())},t.unobserve=function(t,n){var e=si.get(t),i=ai(e.observationTargets,n);i>=0&&(1===e.observationTargets.length&&qe.splice(qe.indexOf(e),1),e.observationTargets.splice(i,1),ii(-1))},t.disconnect=function(t){var n=this,e=si.get(t);e.observationTargets.slice().forEach((function(e){return n.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),ui=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ci.connect(this,t)}return t.prototype.observe=function(t,n){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Me(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ci.observe(this,t,n)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Me(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ci.unobserve(this,t)},t.prototype.disconnect=function(){ci.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const li=new class{constructor(){this._appRootUrl=new V((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await Xt(this.getAppRootUrl()+"config.json").get().json();Zn.update({appConfiguration:jt.fromNullable(t)})}resolveRootUrl(){const t=jt.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(jt.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}};function fi(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function di(t){var n=Object.create;if(n)return n(t);if(null==t)return{};var e=typeof t;if("object"!==e&&"function"!==e)throw new TypeError("Object prototype may only be an Object:"+t);function i(){}return i.prototype=t,new i}var hi,pi,vi=function(t,n){return(vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},mi=fi()||{};pi=function(t,n){function e(){this.constructor=t}vi(t,n),t.prototype=null===n?di(n):(e.prototype=n.prototype,new e)},(hi=mi).__assign||(hi.__assign=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}),hi.__extends||(hi.__extends=pi),__assign||(__assign=mi.__assign),__extends||(__extends=mi.__extends);var bi=fi;function gi(t){var n=bi();return n&&n[t]?n[t]:"window"===t&&wi()?window:null}function wi(){return Boolean("object"==typeof window&&window)}function yi(){return wi()?window:gi("window")}function xi(){return Boolean("object"==typeof document&&document)}function ki(){return xi()?document:gi("document")}function Si(){return Boolean("object"==typeof navigator&&navigator)?navigator:gi("navigator")}function Ci(){return"object"==typeof location&&location?location:gi("location")}function Ai(){return gi("performance")}function _i(){return Boolean("object"==typeof JSON&&JSON||null!==gi("JSON"))}function qi(){return _i()?JSON||gi("JSON"):null}var Bi=null,Ei=!1,ji=123456789,Ii=987654321;function Fi(t){t<0&&(t>>>=0),ji=123456789+t&4294967295,Ii=987654321-t&4294967295,Ei=!0}function Pi(){Fi(4294967296*Math.random()^(new Date).getTime())}function Ri(t,n){return typeof t===n}function Mi(t){return Ri(t,"undefined")||void 0===t}function Ti(t){return Mi(t)||null===t}function Ni(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function Di(t){return Ri(t,"object")}function Oi(t){return Ri(t,"function")}function Ui(t,n,e,i){void 0===i&&(i=!1);var r=!1;if(!Ti(t))try{Ti(t.addEventListener)?Ti(t.attachEvent)||(t.attachEvent("on"+n,e),r=!0):(t.addEventListener(n,e,i),r=!0)}catch(t){}return r}function Li(t,n,e,i){if(void 0===i&&(i=!1),!Ti(t))try{Ti(t.removeEventListener)?Ti(t.detachEvent)||t.detachEvent("on"+n,e):t.removeEventListener(n,e,i)}catch(t){}}function zi(t,n){if(t&&Di(t))for(var e in t)Ni(t,e)&&n.call(t,e,t[e])}var Vi,Hi=function(){function t(){}return t.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},t.isError=function(t){return"[object Error]"===Object.prototype.toString.call(t)},t.isString=function(t){return Ri(t,"string")},t.isNumber=function(t){return Ri(t,"number")},t.isBoolean=function(t){return Ri(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Qi,(function(n){var e=0|t.randomValue(15);return("x"===n?e:3&e|8).toString(16)}))},t.toISOString=function(n){if(t.isDate(n)){var e=function(t){var n=String(t);return 1===n.length&&(n="0"+n),n};return n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},t.arrForEach=function(t,n,e){for(var i=t.length,r=0;r<i;r++)r in t&&n.call(e||t,t[r],r,t)},t.arrIndexOf=function(t,n,e){for(var i=t.length,r=e||0,o=Math.max(r>=0?r:i-Math.abs(r),0);o<i;o++)if(o in t&&t[o]===n)return o;return-1},t.arrMap=function(t,n,e){for(var i=t.length,r=e||t,o=new Array(i),s=0;s<i;s++)s in t&&(o[s]=n.call(r,t[s],t));return o},t.arrReduce=function(t,n,e){var i,r=t.length,o=0;if(arguments.length>=3)i=arguments[2];else{for(;o<r&&!(o in t);)o++;i=t[o++]}for(;o<r;)o in t&&(i=n(i,t[o],o,t)),o++;return i},t.strTrim=function(n){return t.isString(n)?n.replace(/^\s+|\s+$/g,""):n},t.objKeys=function(t){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(Oi(t)||Di(t)&&null!==t))throw new TypeError("objKeys called on non-object");var e=[];for(var i in t)Ni(t,i)&&e.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,s=0;s<o;s++)Ni(t,r[s])&&e.push(r[s]);return e},t.objDefineAccessors=function(t,n,e,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return e&&(o.get=e),i&&(o.set=i),r(t,n,o),!0}catch(t){}return!1},t.addEventHandler=function(t,n){var e=!1,i=yi();i&&(e=Ui(i,t,n),e=Ui(i.body,t,n)||e);var r=ki();return r&&(e=Wi.Attach(r,t,n)||e),e},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var n=Ai();return n&&n.now?n.now():t.dateNow()},t.newId=function(n){void 0===n&&(n=22);for(var e=t.random32()>>>0,i=0,r="";r.length<n;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&e),e>>>=6,5===i&&(e=(t.random32()<<2&4294967295|3&e)>>>0,i=0);return r},t.isIE=function(){if(null===Bi){var t=((Si()||{}).userAgent||"").toLowerCase();Bi=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return Bi},t.randomValue=function(n){return n>0?Math.floor(t.random32()/4294967295*(n+1))>>>0:0},t.random32=function(n){var e,i=gi("crypto")||gi("msCrypto");return i&&i.getRandomValues?e=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(Ei||Pi(),e=4294967295&t.mwcRandom32()):e=Math.floor(4294967296*Math.random()|0),n||(e>>>=0),e},t.mwcRandomSeed=function(t){t?Fi(t):Pi()},t.mwcRandom32=function(t){var n=((Ii=36969*(65535&Ii)+(Ii>>16)&4294967295)<<16)+(65535&(ji=18e3*(65535&ji)+(ji>>16)&4294967295))>>>0&4294967295|0;return t||(n>>>=0),n},t.generateW3CId=function(){for(var n,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(n=t.random32())]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var o=e[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+o+i.substr(16,3)+i.substr(19,12)},t.isTypeof=Ri,t.isUndefined=Mi,t.isNullOrUndefined=Ti,t.hasOwnProperty=Ni,t.isFunction=Oi,t.isObject=Di,t.objCreate=di,t}(),Qi=/[xy]/g,Wi=function(){function t(){}return t.Attach=Ui,t.AttachEvent=Ui,t.Detach=Li,t.DetachEvent=Li,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(Vi||(Vi={}));var $i=Object.getPrototypeOf,Ji=0;
1
+ import{r as t,h as n,c as e,g as i,f as r,H as o,a as s,d as a,e as c,s as u}from"./p-cbe37145.js";import{f as l,m as f,S as d,a as h,i as p,d as v,b as m,c as b,g,Q as w}from"./p-df9ce4b7.js";import{g as y,O as x,j as k,k as S,a as C}from"./p-342cee5a.js";import{A}from"./p-59a986b0.js";function _(){}function q(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(q(((e,i)=>l(t(e,i)).pipe(f(((t,r)=>n(e,t,i,r))))),e)):("number"==typeof n&&(e=n),n=>n.lift(new B(t,e)))}class B{constructor(t,n=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=n}call(t,n){return n.subscribe(new E(t,this.project,this.concurrent))}}class E extends d{constructor(t,n,e=Number.POSITIVE_INFINITY){super(t),this.project=n,this.concurrent=e,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let n;const e=this.index++;try{n=this.project(t,e)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(n)}_innerSub(t){const n=new h(this),e=this.destination;e.add(n);const i=p(t,n);i!==n&&e.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function j(t,n,e,i){return k(e)&&(i=e,e=void 0),i?j(t,n,e).pipe(f((t=>y(t)?i(...t):i(t)))):new x((i=>{I(t,n,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,e)}))}function I(t,n,e,i,r){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(n,e,r),o=()=>i.removeEventListener(n,e,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(n,e),o=()=>i.off(n,e)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(n,e),o=()=>i.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,s=t.length;o<s;o++)I(t[o],n,e,i,r)}i.add(o)}class F{constructor(t,n){this.dueTime=t,this.scheduler=n}call(t,n){return n.subscribe(new P(t,this.dueTime,this.scheduler))}}class P extends C{constructor(t,n,e){super(t),this.dueTime=n,this.scheduler=e,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(R,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function R(t){t.debouncedNext()}function M(t,n,e){return function(i){return i.lift(new T(t,n,e))}}class T{constructor(t,n,e){this.nextOrObserver=t,this.error=n,this.complete=e}call(t,n){return n.subscribe(new N(t,this.nextOrObserver,this.error,this.complete))}}class N extends C{constructor(t,n,e,i){super(t),this._tapNext=_,this._tapError=_,this._tapComplete=_,this._tapError=e||_,this._tapComplete=i||_,k(n)?(this._context=this,this._tapNext=n):n&&(this._context=n,this._tapNext=n.next||_,this._tapError=n.error||_,this._tapComplete=n.complete||_)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var D=function(t){return"Some"===t._tag},O=function(t){return"None"===t._tag},U={_tag:"None"},L=function(t){return{_tag:"Some",value:t}};function z(t){return null==t?U:L(t)}class V{constructor(t){this.factory=t,this._value=U}get value(){if(D(this._value))return this._value.value;const t=this.factory();return this._value=L(t),t}}function H(t){A.injectProps(t,["history","location"])}const Q=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),W=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),$=t=>t.replace(/([=!:$/()])/g,"\\$1"),J=t=>t&&t.sensitive?"":"i",X=(t,n,e)=>{for(var i=(e=e||{}).strict,r=!1!==e.end,o=W(e.delimiter||"/"),s=e.delimiters||"./",a=[].concat(e.endsWith||[]).map(W).concat("$").join("|"),c="",u=!1,l=0;l<t.length;l++){var f=t[l];if("string"==typeof f)c+=W(f),u=l===t.length-1&&s.indexOf(f[f.length-1])>-1;else{var d=W(f.prefix||""),h=f.repeat?"(?:"+f.pattern+")(?:"+d+"(?:"+f.pattern+"))*":f.pattern;n&&n.push(f),c+=f.optional?f.partial?d+"("+h+")?":"(?:"+d+"("+h+"))?":d+"("+h+")"}}return r?(i||(c+="(?:"+o+")?"),c+="$"===a?"$":"(?="+a+")"):(i||(c+="(?:"+o+"(?="+a+"))?"),u||(c+="(?="+o+"|"+a+")")),new RegExp("^"+c,J(e))},G=(t,n,e)=>t instanceof RegExp?((t,n)=>{if(!n)return t;var e=t.source.match(/\((?!\?)/g);if(e)for(var i=0;i<e.length;i++)n.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,n):Array.isArray(t)?((t,n,e)=>{for(var i=[],r=0;r<t.length;r++)i.push(G(t[r],n,e).source);return new RegExp("(?:"+i.join("|")+")",J(e))})(t,n,e):((t,n,e)=>X(((t,n)=>{for(var e,i=[],r=0,o=0,s="",a=n&&n.delimiter||"/",c=n&&n.delimiters||"./",u=!1;null!==(e=Q.exec(t));){var l=e[0],f=e[1],d=e.index;if(s+=t.slice(o,d),o=d+l.length,f)s+=f[1],u=!0;else{var h="",p=t[o],v=e[2],m=e[3],b=e[4],g=e[5];if(!u&&s.length){var w=s.length-1;c.indexOf(s[w])>-1&&(h=s[w],s=s.slice(0,w))}s&&(i.push(s),s="",u=!1);var y=h||a,x=m||b;i.push({name:v||r++,prefix:h,delimiter:y,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==h&&void 0!==p&&p!==h,pattern:x?$(x):"[^"+W(y)+"]+?"})}}return(s||o<t.length)&&i.push(s+t.substr(o)),i})(t,e),n,e))(t,n,e),Y=(t,n)=>new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(t),K=(t,n)=>Y(t,n)?t.substr(n.length):t,Z=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,tt=t=>"/"===t.charAt(0)?t:"/"+t,nt=t=>"/"===t.charAt(0)?t.substr(1):t,et=t=>{const{pathname:n,search:e,hash:i}=t;let r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},it=t=>"/"===t.charAt(0),rt=t=>Math.random().toString(36).substr(2,t),ot=(t,n)=>{for(let e=n,i=e+1,r=t.length;i<r;e+=1,i+=1)t[e]=t[i];t.pop()},st=(t,n)=>{if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(((t,e)=>st(t,n[e])));const e=typeof t;if(e!==typeof n)return!1;if("object"===e){const e=t.valueOf(),i=n.valueOf();if(e!==t||i!==n)return st(e,i);const r=Object.keys(t),o=Object.keys(n);return r.length===o.length&&r.every((e=>st(t[e],n[e])))}return!1},at=(t,n,e,i)=>{let r;"string"==typeof t?(r=(t=>{let n=t||"/",e="",i="";const r=n.indexOf("#");-1!==r&&(i=n.substr(r),n=n.substr(0,r));const o=n.indexOf("?");return-1!==o&&(e=n.substr(o),n=n.substr(0,o)),{pathname:n,search:"?"===e?"":e,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==n&&(r.state=n)):(r=Object.assign({pathname:""},t),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==n&&void 0===r.state&&(r.state=n));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var o;return r.key=e,i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=((t,n="")=>{let e,i=n&&n.split("/")||[],r=0;const o=t&&t.split("/")||[],s=t&&it(t),a=n&&it(n),c=s||a;if(t&&it(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";if(i.length){const t=i[i.length-1];e="."===t||".."===t||""===t}else e=!1;for(let t=i.length;t>=0;t--){const n=i[t];"."===n?ot(i,t):".."===n?(ot(i,t),r++):r&&(ot(i,t),r--)}if(!c)for(;r--;r)i.unshift("..");!c||""===i[0]||i[0]&&it(i[0])||i.unshift("");let u=i.join("/");return e&&"/"!==u.substr(-1)&&(u+="/"),u})(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r.query=(o=r.search||"")?(/^[?#]/.test(o)?o.slice(1):o).split("&").reduce(((t,n)=>{let[e,i]=n.split("=");return t[e]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},r};let ct=0;const ut={},lt=(t,n={})=>{"string"==typeof n&&(n={path:n});const{path:e="/",exact:i=!1,strict:r=!1}=n,{re:o,keys:s}=((t,n)=>{const e=`${n.end}${n.strict}`,i=ut[e]||(ut[e]={}),r=JSON.stringify(t);if(i[r])return i[r];const o=[],s={re:G(t,o,n),keys:o};return ct<1e4&&(i[r]=s,ct+=1),s})(e,{end:i,strict:r}),a=o.exec(t);if(!a)return null;const[c,...u]=a,l=t===c;return i&&!l?null:{path:e,url:"/"===e&&""===c?"/":c,isExact:l,params:s.reduce(((t,n,e)=>(t[n.name]=u[e],t)),{})}},ft=class{constructor(n){t(this,n),this.isBlockElement=!1,this.disabled=!1,this.variant="primary"}render(){return n("button",{class:{"btn position-relative px-3 py-2":!0,"is-primary":"primary"===this.variant,"is-secondary":"secondary"===this.variant,"btn-block":this.isBlockElement,disabled:this.disabled},style:{"pointer-events":this.disabled?"none":"auto"},disabled:this.disabled},n("span",{class:"label"},n("slot",null)))}};ft.style=":host button,:host button:focus,:host button:active,:host button.focus,:host button.active{-webkit-box-shadow:none;box-shadow:none;border-radius:var(--fl-rounding-button) !important}:host button.disabled,:host button:disabled{opacity:1 !important;cursor:not-allowed !important;color:var(--fl-color-disabled)}:host button .label{font-weight:600 !important}:host button.is-primary{color:var(--fl-color-primary-text);background-color:var(--fl-color-primary);border:none}:host button.is-primary.disabled,:host button.is-primary:disabled{background-color:var(--fl-color-primary-disabled)}:host button.is-primary:hover:not(.disabled),:host button.is-primary:hover:not(:disabled){background-color:var(--fl-color-primary-hover)}:host button.is-primary:active:not(.disabled),:host button.is-primary:active:not(:disabled){background-color:var(--fl-color-primary-focus)}:host button.is-secondary{color:var(--fl-color-secondary-text);background-color:var(--fl-color-secondary)}:host button.is-secondary.disabled,:host button.is-secondary:disabled{background-color:var(--fl-color-secondary-disabled)}:host button.is-secondary:hover:not(.disabled),:host button.is-secondary:hover:not(:disabled){background-color:var(--fl-color-secondary-hover)}:host button.is-secondary:active:not(.disabled),:host button.is-secondary:active:not(:disabled){background-color:var(--fl-color-secondary-focus)}:host button.is-block{display:block}:host button:disabled,:host button.disabled{pointer-events:none}";var dt={compareTwoStrings:ht,findBestMatch:function(t,n){if(!function(t,n){return"string"==typeof t&&!!Array.isArray(n)&&!!n.length&&!n.find((t=>"string"!=typeof t))}(t,n))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");const e=[];let i=0;for(let r=0;r<n.length;r++){const o=n[r],s=ht(t,o);e.push({target:o,rating:s}),s>e[i].rating&&(i=r)}return{ratings:e,bestMatch:e[i],bestMatchIndex:i}}};function ht(t,n){if(t=t.replace(/\s+/g,""),n=n.replace(/\s+/g,""),!t.length&&!n.length)return 1;if(!t.length||!n.length)return 0;if(t===n)return 1;if(1===t.length&&1===n.length)return 0;if(t.length<2||n.length<2)return 0;let e=new Map;for(let n=0;n<t.length-1;n++){const i=t.substring(n,n+2),r=e.has(i)?e.get(i)+1:1;e.set(i,r)}let i=0;for(let t=0;t<n.length-1;t++){const r=n.substring(t,t+2),o=e.has(r)?e.get(r):0;o>0&&(e.set(r,o-1),i++)}return 2*i/(t.length+n.length-2)}const pt=class{constructor(i){t(this,i),this.valueChanged=e(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.isMouseOver=!1,this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.renderFilteredResults=()=>0===this.filteredOptions.length?n("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,e)=>n("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===e},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},n("span",null,t.label)))),this.filterResults=t=>{this.filteredOptions=this.sortOptionsByRelevancy(this._options.filter((n=>n.label.toLowerCase().includes(t.toLowerCase()))),t),this.highlightedOptionIndex=void 0},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:"",this.filteredOptions=this._options},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))}}get _options(){if(void 0===this.options)throw new Error("Can't render <fl-dropdown /> component with no options");return this.options}componentWillLoad(){var t,n;this.filteredOptions=this._options,this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}onOptionsChanged(){this.filteredOptions=this._options}onValueChanged(){var t,n;this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""}render(){var t;return[n("div",{class:"dropdown"},n("input",{type:"text",class:"form-control custom-select",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,onInput:t=>{const n=t.target.value;this.inputValue=n,this.filterResults(n),this.toggleDropdown(!0)},ref:t=>this.inputElement=t}),n("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}sortOptionsByRelevancy(t,n){return t.map((t=>Object.assign(Object.assign({},t),{relevancyScore:dt.compareTwoStrings(t.label.toLowerCase(),n.toLowerCase())}))).sort(((t,n)=>n.relevancyScore-t.relevancyScore)).map((t=>({label:t.label,value:t.value})))}static get watchers(){return{options:["onOptionsChanged"],value:["onValueChanged"]}}};pt.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}";const vt=class{constructor(i){t(this,i),this.valueChanged=e(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.minSearchStringLength=3,this.isMouseOver=!1,this.searchState="pristine",this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.shouldExecuteSearch=t=>{var n;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(n=this.selectedOption)||void 0===n?void 0:n.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{this.filteredOptions=t,this.highlightedOptionIndex=void 0,this.searchState="done"},this.renderFilteredResults=()=>"pristine"===this.searchState?n("span",{class:"dropdown-item disabled"},"Start typing to find the results"):"in progress"===this.searchState?n("div",{class:"d-flex justify-content-end align-items-center pr-4"},n("span",{class:"dropdown-item disabled"},"Searching..."),n("i",{class:"dot-falling"})):0===this.filteredOptions.length?n("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,e)=>n("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===e},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=j(this.inputElement,"keyup").pipe(function(t,n=S){return e=>e.lift(new F(t,n))}(500),f((()=>this.inputElement.value)),v(),m(this.shouldExecuteSearch),M(this.onBeginSearch),q(this._searchFunction),M(this.onCompleteSearch)).subscribe()}componentDidUnload(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.highlightedOptionIndex=void 0,this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return[n("div",{class:"dropdown"},n("input",{type:"text",class:"form-control",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,ref:t=>this.inputElement=t}),n("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}get _searchFunction(){if(void 0===this.searchFunction)throw new Error("Can't render <fl-dropdown-async/> component with no searchFunction");return this.searchFunction}};vt.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}";const mt=class{constructor(n){t(this,n),this.theme="default"}render(){return n("span",{class:{"dots-container d-inline-flex justify-content-center":!0}},n("span",{class:{"dot-flashing":!0,"theme-default":"default"===this.theme,"theme-dark":"dark"===this.theme}}))}};var bt;mt.style='fl-loading-indicator .dots-container{width:36px}fl-loading-indicator .dot-flashing.theme-default{position:relative;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:0.5s;animation-delay:0.5s}@-webkit-keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::before,fl-loading-indicator .dot-flashing.theme-default::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-default::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:0s;animation-delay:0s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;-webkit-animation:dot-flashing-default 2s infinite linear;animation:dot-flashing-default 2s infinite linear;-webkit-animation-delay:1s;animation-delay:1s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-dark{position:relative;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:0.5s;animation-delay:0.5s}@-webkit-keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::before,fl-loading-indicator .dot-flashing.theme-dark::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-dark::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:0s;animation-delay:0s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;-webkit-animation:dot-flashing-dark 2s infinite linear;animation:dot-flashing-dark 2s infinite linear;-webkit-animation-delay:1s;animation-delay:1s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}',function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(bt||(bt={}));const gt=class{constructor(n){t(this,n),this.isBlockElement=!1,this.isRounded=!1,this.disabled=!1,this.variant="primary",this.promiseFn=()=>Promise.resolve(),this.state=bt.Available}render(){return this.state===bt.Pending?this.renderLoadingButton():this.renderActiveButton()}renderActiveButton(){return n("fl-button",{disabled:this.disabled,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,variant:this.variant},n("div",null,n("slot",null)))}renderLoadingButton(){return n("fl-button",{disabled:!0,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,class:"position-relative",variant:this.variant},n("fl-loading-indicator",{class:"position-absolute",theme:"dark"}),n("div",{class:"invisible"},n("slot",null)))}async clicked(){this.state=bt.Pending;try{await this.promiseFn(),this.state=bt.Available}catch(t){throw this.state=bt.Error,t}}};function wt(t,n){void 0===n&&(n="*"),t.sender="flare",window.parent.postMessage(t,n)}gt.style="fl-promise-button fl-loading-indicator{left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}";const yt=function(){wt({type:"appReady"})},xt=function(t,n){wt({type:"contentResized",height:t,width:n})},kt=function(t){wt({type:"pageNavigated",url:t})},St=function(){wt({type:"complete"})},Ct=function(){wt({type:"submitSuccess"})},At=t=>!("isConnected"in t)||t.isConnected,_t=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(At))})(...n)}),2e3)}})(),qt=(t,n)=>{const e=((t,n=((t,n)=>t!==n))=>{let e=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},r=()=>{e=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},o=t=>(i.get.forEach((n=>n(t))),e.get(t)),s=(t,r)=>{const o=e.get(t);n(r,o,t)&&(e.set(t,r),i.set.forEach((n=>n(t,r,o))))},a="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,n)=>o(n),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>e.has(n),set:(t,n,e)=>(s(n,e),!0)}),c=(t,n)=>(i[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(i[t],n)});return{state:a,get:o,set:s,on:c,onChange:(n,e)=>{const i=c("set",((t,i)=>{t===n&&e(i)})),r=c("reset",(()=>e(t[n])));return()=>{i(),r()}},use:(...t)=>t.forEach((t=>{t.set&&c("set",t.set),t.get&&c("get",t.get),t.reset&&c("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),r()},reset:r}})(t,n);return(({on:t})=>{const n=new Map;"function"==typeof i&&(t("dispose",(()=>{n.clear()})),t("get",(t=>{const e=i();e&&((t,n,e)=>{const i=t.get(n);i?i.includes(e)||i.push(e):t.set(n,[e])})(n,t,e)})),t("set",(t=>{const e=n.get(t);e&&n.set(t,e.filter(r)),_t(n)})),t("reset",(()=>{n.forEach((t=>t.forEach(r))),_t(n)})))})(e),e};function Bt(t,n,e){return t(e={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var Et=Bt((function(t,n){function e(t){return t}function i(t){return function(){return t}}function r(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.bindTo_=n.bind_=n.hole=n.pipe=n.untupled=n.tupled=n.absurd=n.decrement=n.increment=n.tuple=n.flow=n.flip=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.constant=n.not=n.unsafeCoerce=n.identity=void 0,n.identity=e,n.unsafeCoerce=e,n.not=function(t){return function(n){return!t(n)}},n.constant=i,n.constTrue=i(!0),n.constFalse=i(!1),n.constNull=i(null),n.constUndefined=i(void 0),n.constVoid=n.constUndefined,n.flip=function(t){return function(n,e){return t(e,n)}},n.flow=function(t,n,e,i,r,o,s,a,c){switch(arguments.length){case 1:return t;case 2:return function(){return n(t.apply(this,arguments))};case 3:return function(){return e(n(t.apply(this,arguments)))};case 4:return function(){return i(e(n(t.apply(this,arguments))))};case 5:return function(){return r(i(e(n(t.apply(this,arguments)))))};case 6:return function(){return o(r(i(e(n(t.apply(this,arguments))))))};case 7:return function(){return s(o(r(i(e(n(t.apply(this,arguments)))))))};case 8:return function(){return a(s(o(r(i(e(n(t.apply(this,arguments))))))))};case 9:return function(){return c(a(s(o(r(i(e(n(t.apply(this,arguments)))))))))}}},n.tuple=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t},n.increment=function(t){return t+1},n.decrement=function(t){return t-1},n.absurd=r,n.tupled=function(t){return function(n){return t.apply(void 0,n)}},n.untupled=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(n)}},n.pipe=function(t,n,e,i,r,o,s,a,c,u,l,f,d,h,p,v,m,b,g,w){switch(arguments.length){case 1:return t;case 2:return n(t);case 3:return e(n(t));case 4:return i(e(n(t)));case 5:return r(i(e(n(t))));case 6:return o(r(i(e(n(t)))));case 7:return s(o(r(i(e(n(t))))));case 8:return a(s(o(r(i(e(n(t)))))));case 9:return c(a(s(o(r(i(e(n(t))))))));case 10:return u(c(a(s(o(r(i(e(n(t)))))))));case 11:return l(u(c(a(s(o(r(i(e(n(t))))))))));case 12:return f(l(u(c(a(s(o(r(i(e(n(t)))))))))));case 13:return d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))));case 14:return h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))));case 15:return p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))));case 16:return v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))));case 17:return m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))))));case 18:return b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))))));case 19:return g(b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t))))))))))))))))));case 20:return w(g(b(m(v(p(h(d(f(l(u(c(a(s(o(r(i(e(n(t)))))))))))))))))))}},n.hole=r,n.bind_=function(t,n,e){var i;return Object.assign({},t,((i={})[n]=e,i))},n.bindTo_=function(t){return function(n){var e;return(e={})[t]=n,e}}})),jt=Bt((function(t,n){function e(t){return null==t?n.none:n.some(t)}function i(t){return"Right"===t._tag?n.none:n.some(t.left)}function r(t){return"Left"===t._tag?n.none:n.some(t.right)}function o(t){return function(i){return n.isNone(i)?n.none:e(t(i.value))}}Object.defineProperty(n,"__esModule",{value:!0}),n.getApplySemigroup=n.getOrd=n.getEq=n.getShow=n.URI=n.wilt=n.wither=n.sequence=n.traverse=n.partitionMap=n.partition=n.filterMap=n.filter=n.separate=n.compact=n.reduceRight=n.foldMap=n.reduce=n.duplicate=n.extend=n.throwError=n.zero=n.alt=n.altW=n.flatten=n.chainFirst=n.chain=n.of=n.apSecond=n.apFirst=n.ap=n.map=n.chainNullableK=n.mapNullable=n.fromNullableK=n.getOrElse=n.getOrElseW=n.toUndefined=n.toNullable=n.fold=n.fromEither=n.getRight=n.getLeft=n.tryCatch=n.fromPredicate=n.fromNullable=n.some=n.none=n.isNone=n.isSome=void 0,n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.apS=n.bind=n.bindTo=n.Do=n.getRefinement=n.exists=n.elem=n.option=n.MonadThrow=n.Witherable=n.Traversable=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.Alt=n.Foldable=n.Monad=n.Applicative=n.Functor=n.getMonoid=n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=void 0,n.isSome=function(t){return"Some"===t._tag},n.isNone=function(t){return"None"===t._tag},n.none={_tag:"None"},n.some=function(t){return{_tag:"Some",value:t}},n.fromNullable=e,n.fromPredicate=function(t){return function(e){return t(e)?n.some(e):n.none}},n.tryCatch=function(t){try{return n.some(t())}catch(t){return n.none}},n.getLeft=i,n.getRight=r,n.fromEither=r,n.fold=function(t,e){return function(i){return n.isNone(i)?t():e(i.value)}},n.toNullable=function(t){return n.isNone(t)?null:t.value},n.toUndefined=function(t){return n.isNone(t)?void 0:t.value},n.getOrElseW=function(t){return function(e){return n.isNone(e)?t():e.value}},n.getOrElse=n.getOrElseW,n.fromNullableK=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t.apply(void 0,n))}},n.mapNullable=o,n.chainNullableK=o;var s=function(t,e){return Et.pipe(t,n.map(e))},a=function(t,e){return Et.pipe(t,n.ap(e))},c=function(t,e){return Et.pipe(t,n.chain(e))},u=function(t,e,i){return Et.pipe(t,n.reduce(e,i))},l=function(t){var e=n.foldMap(t);return function(t,n){return Et.pipe(t,e(n))}},f=function(t,e,i){return Et.pipe(t,n.reduceRight(e,i))},d=function(t){var e=n.traverse(t);return function(t,n){return Et.pipe(t,e(n))}},h=function(t,e){return Et.pipe(t,n.alt(e))},p=function(t,e){return Et.pipe(t,n.filter(e))},v=function(t,e){return Et.pipe(t,n.filterMap(e))},m=function(t,e){return Et.pipe(t,n.extend(e))},b=function(t,e){return Et.pipe(t,n.partition(e))},g=function(t,e){return Et.pipe(t,n.partitionMap(e))},w=function(t){var e=n.wither(t);return function(t,n){return Et.pipe(t,e(n))}},y=function(t){var e=n.wilt(t);return function(t,n){return Et.pipe(t,e(n))}};n.map=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e.value))}},n.ap=function(t){return function(e){return n.isNone(e)||n.isNone(t)?n.none:n.some(e.value(t.value))}},n.apFirst=function(t){return Et.flow(n.map((function(t){return function(){return t}})),n.ap(t))},n.apSecond=function(t){return Et.flow(n.map((function(){return function(t){return t}})),n.ap(t))},n.of=n.some,n.chain=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.chainFirst=function(t){return n.chain((function(e){return Et.pipe(t(e),n.map((function(){return e})))}))},n.flatten=n.chain(Et.identity),n.altW=function(t){return function(e){return n.isNone(e)?t():e}},n.alt=n.altW,n.zero=function(){return n.none},n.throwError=function(){return n.none},n.extend=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e))}},n.duplicate=n.extend(Et.identity),n.reduce=function(t,e){return function(i){return n.isNone(i)?t:e(t,i.value)}},n.foldMap=function(t){return function(e){return function(i){return n.isNone(i)?t.empty:e(i.value)}}},n.reduceRight=function(t,e){return function(i){return n.isNone(i)?t:e(i.value,t)}},n.compact=n.flatten;var x={left:n.none,right:n.none};function k(t){return{equals:function(e,i){return e===i||(n.isNone(e)?n.isNone(i):!n.isNone(i)&&t.equals(e.value,i.value))}}}function S(t){return{concat:function(e,i){return n.isSome(e)&&n.isSome(i)?n.some(t.concat(e.value,i.value)):n.none}}}n.separate=function(t){var e=Et.pipe(t,n.map((function(t){return{left:i(t),right:r(t)}})));return n.isNone(e)?x:e.value},n.filter=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)?e:n.none}},n.filterMap=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.partition=function(t){return function(n){return{left:p(n,(function(n){return!t(n)})),right:p(n,t)}}},n.partitionMap=function(t){return Et.flow(n.map(t),n.separate)},n.traverse=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):t.map(e(i.value),n.some)}}},n.sequence=function(t){return function(e){return n.isNone(e)?t.of(n.none):t.map(e.value,n.some)}},n.wither=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):e(i.value)}}},n.wilt=function(t){return function(e){return function(o){return n.isNone(o)?t.of({left:n.none,right:n.none}):t.map(e(o.value),(function(t){return{left:i(t),right:r(t)}}))}}},n.URI="Option",n.getShow=function(t){return{show:function(e){return n.isNone(e)?"none":"some("+t.show(e.value)+")"}}},n.getEq=k,n.getOrd=function(t){return{equals:k(t).equals,compare:function(e,i){return e===i?0:n.isSome(e)?n.isSome(i)?t.compare(e.value,i.value):1:-1}}},n.getApplySemigroup=S,n.getApplyMonoid=function(t){return{concat:S(t).concat,empty:n.some(t.empty)}},n.getFirstMonoid=function(){return{concat:function(t,e){return n.isNone(t)?e:t},empty:n.none}},n.getLastMonoid=function(){return{concat:function(t,e){return n.isNone(e)?t:e},empty:n.none}},n.getMonoid=function(t){return{concat:function(e,i){return n.isNone(e)?i:n.isNone(i)?e:n.some(t.concat(e.value,i.value))},empty:n.none}},n.Functor={URI:n.URI,map:s},n.Applicative={URI:n.URI,map:s,ap:a,of:n.of},n.Monad={URI:n.URI,map:s,ap:a,of:n.of,chain:c},n.Foldable={URI:n.URI,reduce:u,foldMap:l,reduceRight:f},n.Alt={URI:n.URI,map:s,alt:h},n.Alternative={URI:n.URI,map:s,ap:a,of:n.of,alt:h,zero:n.zero},n.Extend={URI:n.URI,map:s,extend:m},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:s,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g},n.Traversable={URI:n.URI,map:s,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence},n.Witherable={URI:n.URI,map:s,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g,wither:w,wilt:y},n.MonadThrow={URI:n.URI,map:s,ap:a,of:n.of,chain:c,throwError:n.throwError},n.option={URI:n.URI,map:s,of:n.of,ap:a,chain:c,reduce:u,foldMap:l,reduceRight:f,traverse:d,sequence:n.sequence,zero:n.zero,alt:h,extend:m,compact:n.compact,separate:n.separate,filter:p,filterMap:v,partition:b,partitionMap:g,wither:w,wilt:y,throwError:n.throwError},n.elem=function(t){return function(e,i){return!n.isNone(i)&&t.equals(e,i.value)}},n.exists=function(t){return function(e){return!n.isNone(e)&&t(e.value)}},n.getRefinement=function(t){return function(e){return n.isSome(t(e))}},n.Do=n.of({}),n.bindTo=function(t){return n.map(Et.bindTo_(t))},n.bind=function(t,e){return n.chain((function(i){return Et.pipe(e(i),n.map((function(n){return Et.bind_(i,t,n)})))}))},n.apS=function(t,e){return Et.flow(n.map((function(n){return function(e){return Et.bind_(n,t,e)}})),n.ap(e))},n.traverseArrayWithIndex=function(t){return function(e){for(var i=[],r=0;r<e.length;r++){var o=t(r,e[r]);if(n.isNone(o))return n.none;i.push(o.value)}return n.some(i)}},n.traverseArray=function(t){return n.traverseArrayWithIndex((function(n,e){return t(e)}))},n.sequenceArray=n.traverseArray(Et.identity)}));function It(t){this.message=t}(It.prototype=new Error).name="InvalidCharacterError";var Ft="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new It("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,o=0,s="";i=n.charAt(o++);~i&&(e=r%4?64*e+i:i,r++%4)?s+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function Pt(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(Ft(t).replace(/(.)/g,(function(t,n){var e=n.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(n)}catch(t){return Ft(n)}}function Rt(t){this.message=t}(Rt.prototype=new Error).name="InvalidTokenError";var Mt=function(){return(Mt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},Tt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Nt=function(t,n,e){if(void 0===e&&(e=!1),!t||!n||"object"!=typeof t||"object"!=typeof n)return t;var i=Mt({},t);for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]instanceof Array&&t[r]instanceof Array?e?Tt(t[r],n[r]):n[r]:"object"==typeof n[r]&&"object"==typeof t[r]?Nt(t[r],n[r],e):n[r]);return i},Dt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Ot={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(t,n){for(var e=void 0===n?{}:n,i=e.doThrow,r=void 0===i||i,o=e.instance,s=void 0!==o&&o,a=[],c=2;c<arguments.length;c++)a[c-2]=arguments[c];var u=this.polyfills[t]||("undefined"!=typeof self?self[t]:null)||("undefined"!=typeof global?global[t]:null);if(r&&!u)throw new Error(t+" is not defined");return s&&u?new(u.bind.apply(u,Dt([void 0],a))):u}},Ut=function(t,n,e,i){if(!t.getEntriesByName)return!1;var r=t.getEntriesByName(n);return!!(r&&r.length>0)&&(e(r.reverse()[0]),i.clearMeasures&&i.clearMeasures(n),Lt.callbacks.delete(n),Lt.callbacks.size<1&&(Lt.observer.disconnect(),i.clearResourceTimings&&i.clearResourceTimings()),!0)},Lt={callbacks:new Map,observer:null,observe:function(t,n){if(t&&n){var e=Ot.polyfill("performance",{doThrow:!1});(function(t,n){return!Lt.observer&&t&&n&&(Lt.observer=new n((function(n){Lt.callbacks.forEach((function(e,i){Ut(n,i,e,t)}))})),t.clearResourceTimings&&t.clearResourceTimings()),Lt.observer})(e,Ot.polyfill("PerformanceObserver",{doThrow:!1}))&&(Ut(e,t,n,e)||(Lt.callbacks.size<1&&Lt.observer.observe({entryTypes:["resource","measure"]}),Lt.callbacks.set(t,n)))}}},zt=function(t){this.error=t},Vt=function(){return(Vt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},Ht=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var o=arguments[n],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},Qt=function(){function t(t,n,e,i,r,o){void 0===e&&(e=new Map),void 0===i&&(i=[]),void 0===r&&(r=[]),void 0===o&&(o=[]),this._url=t,this._options=n,this._catchers=e,this._resolvers=i,this._middlewares=r,this._deferredChain=o}return t.factory=function(n,e){return void 0===n&&(n=""),void 0===e&&(e={}),new t(n,e)},t.prototype.selfFactory=function(n){var e=void 0===n?{}:n,i=e.url,r=e.options,o=e.catchers,s=void 0===o?this._catchers:o,a=e.resolvers,c=void 0===a?this._resolvers:a,u=e.middlewares,l=void 0===u?this._middlewares:u,f=e.deferredChain,d=void 0===f?this._deferredChain:f;return new t(void 0===i?this._url:i,Vt({},void 0===r?this._options:r),new Map(s),Ht(c),Ht(l),Ht(d))},t.prototype.defaults=function(t,n){return void 0===n&&(n=!1),Ot.defaults=n?Nt(Ot.defaults,t):t,this},t.prototype.errorType=function(t){return Ot.errorType=t,this},t.prototype.polyfills=function(t){return Ot.polyfills=Vt(Vt({},Ot.polyfills),t),this},t.prototype.url=function(t,n){if(void 0===n&&(n=!1),n)return this.selfFactory({url:t});var e=this._url.split("?");return this.selfFactory({url:e.length>1?e[0]+t+"?"+e[1]:this._url+t})},t.prototype.options=function(t,n){return void 0===n&&(n=!0),this.selfFactory({options:n?Nt(this._options,t):t})},t.prototype.query=function(t,n){return void 0===n&&(n=!1),this.selfFactory({url:Wt(this._url,t,n)})},t.prototype.headers=function(t){return this.selfFactory({options:Nt(this._options,{headers:t||{}})})},t.prototype.accept=function(t){return this.headers({Accept:t})},t.prototype.content=function(t){var n;return this.headers(((n={})["Content-Type"]=t,n))},t.prototype.auth=function(t){return this.headers({Authorization:t})},t.prototype.catcher=function(t,n){var e=new Map(this._catchers);return e.set(t,n),this.selfFactory({catchers:e})},t.prototype.signal=function(t){return this.selfFactory({options:Vt(Vt({},this._options),{signal:t.signal})})},t.prototype.resolve=function(t,n){return void 0===n&&(n=!1),this.selfFactory({resolvers:n?[t]:Ht(this._resolvers,[t])})},t.prototype.defer=function(t,n){return void 0===n&&(n=!1),this.selfFactory({deferredChain:n?[t]:Ht(this._deferredChain,[t])})},t.prototype.middlewares=function(t,n){return void 0===n&&(n=!1),this.selfFactory({middlewares:n?t:Ht(this._middlewares,t)})},t.prototype.method=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=null);var i=this._options.headers,r=e?"object"!=typeof e||i&&!Object.entries(i).every((function(t){var n=t[1];return t[0].toLowerCase()!=="Content-Type".toLowerCase()||n.startsWith("application/json")}))?this.body(e):this.json(e):this;return function(t){var n=t._url,e=t._resolvers,i=t._middlewares,r=t._options,o=new Map(t._catchers),s=Nt(Ot.defaults,r),a=Ot.polyfill("AbortController",{doThrow:!1,instance:!0});!s.signal&&a&&(s.signal=a.signal);var c={ref:null,clear:function(){c.ref&&(clearTimeout(c.ref),c.ref=null)}},u=function(t){return function(n){return 0===t.length?n:1===t.length?t[0](n):t.reduceRight((function(e,i,r){return i(r===t.length-2?e(n):e)}))}}(i)(Ot.polyfill("fetch"))(n,s),l=u.catch((function(t){throw new zt(t)})).then((function(t){return c.clear(),t.ok?t:t[Ot.errorType||"text"]().then((function(n){var e=new Error(n);throw e[Ot.errorType||"text"]=n,e.status=t.status,e.response=t,e}))})),f=function(n){return function(e){return(n?l.then((function(t){return t&&t[n]()})).then((function(t){return e?e(t):t})):l.then((function(t){return e?e(t):t}))).catch((function(n){c.clear();var e=n instanceof zt?n.error:n;if(n instanceof zt&&o.has("__fromFetch"))return o.get("__fromFetch")(e,t);if(o.has(e.status))return o.get(e.status)(e,t);if(o.has(e.name))return o.get(e.name)(e,t);throw e}))}},d={res:f(null),json:f("json"),blob:f("blob"),formData:f("formData"),arrayBuffer:f("arrayBuffer"),text:f("text"),perfs:function(t){return u.then((function(n){return Lt.observe(n.url,t)})),d},setTimeout:function(t,n){return void 0===n&&(n=a),c.clear(),c.ref=setTimeout((function(){return n.abort()}),t),d},controller:function(){return[a,d]},error:function(t,n){return o.set(t,n),d},badRequest:function(t){return d.error(400,t)},unauthorized:function(t){return d.error(401,t)},forbidden:function(t){return d.error(403,t)},notFound:function(t){return d.error(404,t)},timeout:function(t){return d.error(408,t)},internalError:function(t){return d.error(500,t)},fetchError:function(t){return d.error("__fromFetch",t)},onAbort:function(t){return d.error("AbortError",t)}};return e.reduce((function(n,e){return e(n,t)}),d)}((r=r.options(Vt(Vt({},n),{method:t})))._deferredChain.reduce((function(t,n){return n(t,t._url,t._options)}),r))},t.prototype.get=function(t){return this.method("GET",t)},t.prototype.delete=function(t){return this.method("DELETE",t)},t.prototype.put=function(t,n){return this.method("PUT",n,t)},t.prototype.post=function(t,n){return this.method("POST",n,t)},t.prototype.patch=function(t,n){return this.method("PATCH",n,t)},t.prototype.head=function(t){return this.method("HEAD",t)},t.prototype.opts=function(t){return this.method("OPTIONS",t)},t.prototype.replay=function(t){return this.method(this._options.method,t)},t.prototype.body=function(t){return this.selfFactory({options:Vt(Vt({},this._options),{body:t})})},t.prototype.json=function(t){var n,e=null===(n=Object.entries(this._options.headers||{}).find((function(t){var n=t[1];return t[0].toLowerCase()==="Content-Type".toLowerCase()&&n.startsWith("application/json")})))||void 0===n?void 0:n[1];return this.content(e||"application/json").body(JSON.stringify(t))},t.prototype.formData=function(t,n){return void 0===n&&(n=!1),this.body($t(t,n))},t.prototype.formUrl=function(t){return this.body("string"==typeof t?t:(n=t,Object.keys(n).map((function(t){var e=n[t];return e instanceof Array?e.map((function(n){return Jt(t,n)})).join("&"):Jt(t,e)})).join("&"))).content("application/x-www-form-urlencoded");var n},t}(),Wt=function(t,n,e){var i;if("string"==typeof n)i=n;else{var r=Ot.polyfill("URLSearchParams",{instance:!0});for(var o in n)if(n[o]instanceof Array)for(var s=0,a=n[o];s<a.length;s++)r.append(o,a[s]);else r.append(o,n[o]);i=r.toString()}var c=t.split("?");return e||c.length<2?c[0]+"?"+i:t+"&"+i};function $t(t,n,e,i){return void 0===n&&(n=!1),void 0===e&&(e=Ot.polyfill("FormData",{instance:!0})),void 0===i&&(i=[]),Object.entries(t).forEach((function(t){var r=t[0],o=t[1],s=i.reduce((function(t,n){return t?t+"["+n+"]":n}),null);if(s=s?s+"["+r+"]":r,o instanceof Array)for(var a=0,c=o;a<c.length;a++)e.append(s+"[]",c[a]);else!n||"object"!=typeof o||n instanceof Array&&n.includes(r)?e.append(s,o):null!==o&&$t(o,n,e,Ht(i,[r]))})),e}function Jt(t,n){return encodeURIComponent(t)+"="+encodeURIComponent("object"==typeof n?JSON.stringify(n):""+n)}var Xt=Qt.factory;function Gt(){const t=Zt.jwt,n=Zt.profileId,e=Zt.accountIdOrDefault,i=Zt.partnerIdOrDefault;return Xt(Zt.apiBaseUrl).headers({Authorization:"Bearer "+t,"X-PROFILE-ID":n,"X-PARTNER-ID":i,"X-ACCOUNT-ID":e})}Xt.default=Qt.factory;const Yt=new class{async getAustralianFundsAsync(t){return Gt().url("super-choice/australian-funds?"+this.toQueryString(t)).get().notFound((()=>{throw new Error("Failed to fetch the list of australian super funds.")})).json()}async getAppStateAsync(){return Gt().url("client-app-state").get().notFound((()=>{throw new Error("Failed to fetch application configuration.")})).json()}toQueryString(t){switch(t.type){case"partialMatch":return`search=${t.searchString}&maxRecordCount=${t.maxRecordCount}`;case"usiMatch":return"usi="+t.usi}}},Kt={apiBaseUrl:jt.none,appBaseUrl:jt.none,profileId:jt.none,jwt:jt.none,superBuyer:jt.none,accountConfiguration:jt.none,slateJoinAppPostUrl:jt.none,hasSuccessPageBeenAcknowledged:!1,hasSuperSelectionBeenSubmitted:!1},Zt=new class{constructor(){const{state:t,onChange:n}=qt(Kt);this._state=t,this._onChange=n,n("jwt",(t=>{this._state.profileId=Et.pipe(t,jt.chain((t=>jt.fromNullable(function(t,n){if("string"!=typeof t)throw new Rt("Invalid token specified");var e=!0===(n=n||{}).header?0:1;try{return JSON.parse(Pt(t.split(".")[e]))}catch(t){throw new Rt("Invalid token specified: "+t.message)}}(t).sub))))}))}get state(){return this._state}get onChange(){return this._onChange}get superBuyer(){if(jt.isNone(this._state.superBuyer))throw Error("User information is not set");return this._state.superBuyer.value}get apiBaseUrl(){if(jt.isNone(this._state.apiBaseUrl))throw Error("API base URL is not set");return this._state.apiBaseUrl.value}get appBaseUrl(){if(jt.isNone(this._state.appBaseUrl))throw Error("App base URL is not set");return this._state.appBaseUrl.value}get slateJoinAppPostUrl(){if(jt.isNone(this._state.slateJoinAppPostUrl))throw Error("Slate Join App Post Url is not set");return this._state.slateJoinAppPostUrl.value}get profileId(){if(jt.isNone(this._state.profileId))throw Error("Failed to get Profile ID from JWT");return this._state.profileId.value}get defaultFundUsi(){return Et.pipe(this._state.accountConfiguration,jt.map((t=>jt.fromNullable(t.defaultFundUsi))),jt.flatten)}get accountIdOrDefault(){return Et.pipe(this._state.accountConfiguration,jt.map((t=>t.accountId)),jt.getOrElse((()=>"")))}get partnerIdOrDefault(){return Et.pipe(this._state.superBuyer,jt.map((t=>t.partnerId)),jt.getOrElse((()=>"")))}get jwt(){if(jt.isNone(this._state.jwt))throw Error("No authentication information was found");return this._state.jwt.value}completeSuperSelectionFlow(){this._state.hasSuccessPageBeenAcknowledged=!0}markSuperSelectionAsSubmitted(){this._state.hasSuperSelectionBeenSubmitted=!0}async loadAppStateAsync(){const t=await Yt.getAppStateAsync();this._state.accountConfiguration=jt.fromNullable(t.accountConfiguration),this._state.superBuyer=jt.fromNullable(t.superBuyer)}},tn=new class{navigateInternally(t,n){const e=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(n)}`;kt(e),t.push(e)}toExternalUrl(t){const n=new URL(t);return n.searchParams.append("_extnav","true"),n.href}get appBaseUrl(){return Zt.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(t){return t.length>0&&"/"===t[0]?t:"/"+t}};var nn;!function(t){t.ChoicePage="/",t.SlateJoin="/slate/join/",t.SlateStandardChoice="/slate/standard-choice/",t.QSuperOptIn="/qsuper/insurance/opt-in/",t.QSuperQuestion1="/qsuper/insurance/question1/",t.QSuperQuestion2="/qsuper/insurance/question2/",t.QSuperQuestion3="/qsuper/insurance/question3/",t.QSuperQuestion4="/qsuper/insurance/question4/",t.QSuperQuestion5="/qsuper/insurance/question5/",t.QSuperQuestion6="/qsuper/insurance/question6/",t.QSuperQuestion7="/qsuper/insurance/question7/",t.QSuperQuestion8="/qsuper/insurance/question8/",t.QSuperConsent="/qsuper/consent/",t.QSuperJoin="/qsuper/join/",t.MyOwnFund="/super-choice/my-own-fund/",t.SelfManagedFund="/super-choice/smsf/",t.DefaultFund="/super-choice/default/",t.Success="/success/"}(nn||(nn={}));const en=[n("stencil-route",{exact:!0,url:nn.ChoicePage,component:"sss-super-choice-page"}),n("stencil-route",{url:nn.SlateJoin,component:"sss-slate-join-page"}),n("stencil-route",{url:nn.SlateStandardChoice,component:"sss-slate-standard-choice-page"}),n("stencil-route",{url:nn.QSuperOptIn,component:"sss-qsuper-insurance-opt-in"}),n("stencil-route",{url:nn.QSuperQuestion1,component:"sss-qsuper-question-1"}),n("stencil-route",{url:nn.QSuperQuestion2,component:"sss-qsuper-question-2"}),n("stencil-route",{url:nn.QSuperQuestion3,component:"sss-qsuper-question-3"}),n("stencil-route",{url:nn.QSuperQuestion4,component:"sss-qsuper-question-4"}),n("stencil-route",{url:nn.QSuperQuestion5,component:"sss-qsuper-question-5"}),n("stencil-route",{url:nn.QSuperQuestion6,component:"sss-qsuper-question-6"}),n("stencil-route",{url:nn.QSuperQuestion7,component:"sss-qsuper-question-7"}),n("stencil-route",{url:nn.QSuperQuestion8,component:"sss-qsuper-question-8"}),n("stencil-route",{url:nn.QSuperConsent,component:"sss-qsuper-consent"}),n("stencil-route",{url:nn.QSuperJoin,component:"sss-qsuper-join"}),n("stencil-route",{url:nn.MyOwnFund,component:"sss-my-own-fund"}),n("stencil-route",{url:nn.SelfManagedFund,component:"sss-self-managed-fund"}),n("stencil-route",{url:nn.DefaultFund,component:"sss-default-fund"}),n("stencil-route",{url:nn.Success,component:"sss-success"})];var rn;!function(t){t.MyOwnFund="My Own Fund",t.DefaultFund="Default Fund",t.SelfManagedFund="Self Managed Fund"}(rn||(rn={}));const on={continueAllowed:!1,nextRoute:"/",myOwnFundForm:{fundUsi:U,memberNumber:U,standardChoiceFormSignature:U},defaultFundForm:{standardChoiceFormSignature:""},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:"",standardChoiceFormSignature:""},currentCustomFundType:rn.MyOwnFund,customFunds:[{label:rn.MyOwnFund,value:nn.MyOwnFund},{label:rn.DefaultFund,value:nn.DefaultFund},{label:rn.SelfManagedFund,value:nn.SelfManagedFund}]},{state:sn}=qt(on),an=sn.customFunds,cn=class{constructor(n){t(this,n),this.currentCustomFund=an[0],this.fundOptionsList=an}componentWillLoad(){let t="";window.location.pathname.includes(nn.MyOwnFund)&&(t=nn.MyOwnFund),window.location.pathname.includes(nn.DefaultFund)&&(t=nn.DefaultFund),window.location.pathname.includes(nn.SelfManagedFund)&&(t=nn.SelfManagedFund),this.currentCustomFund=an.find((n=>n.value===t))||an[0],tn.navigateInternally(this.history,t)}render(){return n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("p",{class:"font-weight-bold text-center"},"Choose your Super"),n("div",{class:"mb-4"},n("fl-dropdown",{options:this.fundOptionsList,required:!0,requiredValidationMessage:"Select an option",placeholder:"Select...",value:this.currentCustomFund.value,onValueChanged:t=>this.handleChange(t.detail.value.trim())})),n("slot",null))))}handleChange(t){const n=an.find((n=>n.value===t))||{value:nn.MyOwnFund};tn.navigateInternally(this.history,n.value)}static get assetsDirs(){return["assets"]}};H(cn);const un=new class{searchFundsAsync(t,n){return Yt.getAustralianFundsAsync({type:"partialMatch",searchString:t,maxRecordCount:n})}async getFundByUsiAsync(t){const n=await Yt.getAustralianFundsAsync({type:"usiMatch",usi:t});return 1===n.length?jt.some(n[0]):jt.none}};class ln{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(t){return Gt().url("analytics-events").post(t).res()}}class fn{constructor(){this.eventTrackingApi=ln.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackFinancialProductViewedAsync(t){return this.trackEventAsync({FinancialProductViewed:t})}async TrackSuperFundPdsViewedAsync(t){return this.trackEventAsync({SuperFundPdsViewed:t})}async TrackFinancialProductAcceptedAsync(t){return this.trackEventAsync({FinancialProductAccepted:t})}async TrackFinancialProductRejectedAsync(t){return this.trackEventAsync({FinancialProductRejected:t})}async TrackSuperFundPrivacyConfirmationAcceptedAsync(t){return this.trackEventAsync({SuperFundPrivacyConfirmationAccepted:t})}async TrackPromotedSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:t}})}async TrackMyOwnSuperFundDetailViewedAsync(){return this.trackEventAsync({SuperFundDetailViewed:"MyOwnFund"})}async TrackSmsfSuperFundDetailViewedAsync(){return this.trackEventAsync({SuperFundDetailViewed:"Smsf"})}async TrackDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:t}})}async TrackSuperFundPanelViewedAsync(t){return this.trackEventAsync({SuperFundPanelViewed:t})}async trackEventAsync(t){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:t})}catch(t){return}}}const dn={items:[]},hn=new class{constructor(){const{state:t}=qt(dn);this._state=t}get state(){return this._state}closeCurrent(){const t=[...this._state.items];t.shift(),this._state.items=t}clearNotifications(){this._state.items=[]}showErrorNotification(t,n){this.pushNotification(t,null!=n?n:0,"danger")}showInfoNotification(t,n){this.pushNotification(t,null!=n?n:0,"info")}showWarningNotification(t,n){this.pushNotification(t,null!=n?n:0,"warning")}showSuccessNotification(t,n){this.pushNotification(t,null!=n?n:0,"success")}pushNotification(t,n,e){const i=[...this._state.items];i.push({details:t,type:e,priority:n}),this._state.items=i.sort(((t,n)=>n.priority-t.priority))}},pn=new class{async submitDefaultFundChoiceAsync(t){return Gt().url("super-choice/default").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(t){return Gt().url("super-choice/custom-fund").post(t).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(t){return Gt().url("super-choice/smsf").post(t).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}},vn=class{constructor(n){t(this,n),this.defaultFundProductName="Loading fund...",this.eventTrackingService=fn.Instance}async componentWillLoad(){const t=Zt.defaultFundUsi;if(jt.isNone(t))return;this.isDefaultFundExists=!0;const n=await un.getFundByUsiAsync(t.value);if(jt.isNone(n))return this.isInvalidDefaultFund=!0,void hn.showErrorNotification({title:"Something is not right",description:`Couldn't find information about the configured default fund (USI ${t.value})`});this.defaultFund=n.value,this.defaultFundProductName=n.value.productName}componentDidLoad(){return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:this.defaultFund.usi,fundName:this.defaultFund.productName})}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},this.isDefaultFundExists?n((t=>[n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Default Fund"),n("p",{class:"mb-4 small"},"Almost there... all you have to do now is review the fund below, complete and sign the super choice form and submit. Your application to join the fund is subject to Trustee approval."),n("p",{class:"font-weight-bold mt-3"},"Default Fund Name"),n("p",null,t.defaultFundName)),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.defaultFundForm=Object.assign(Object.assign({},sn.defaultFundForm),t.detail)}})]),{defaultFundName:this.defaultFundProductName}):n((()=>n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"No Default Fund"),n("p",{class:"mb-4 small"},"It looks like your employer has not yet defined a default fund. Please contact them if you wish to choose your company's default fund."))),null)),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},this.isDefaultFundExists&&n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,disabled:this.isInvalidDefaultFund,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||(this.formState="validated",this.formElement.checkValidity()&&(await pn.submitDefaultFundChoiceAsync(sn.defaultFundForm),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)))}},mn=class{constructor(n){t(this,n)}render(){return n("div",{class:"container mb-sm-0"},n("div",{class:"row justify-content-center mt-5 mb-3"},n("a",{class:"text-decoration-none",href:tn.toExternalUrl("https://slatesuper.com.au/product-disclosure-statement-pdf"),target:"_blank"},n("p",{class:"mt-3 small text-center mb-1 text-dark"},"Powered by"),n("h5",{class:"font-weight-bold text-center mb-4"},n("span",{class:"text-dark mr-1"},"Simple Financial"),n("span",{class:"simple-choices-text"},"Choices")))),n("div",{class:"row justify-content-center pb-sm-0 px-3 px-sm-0"},n("p",{class:"text-muted small"},"Financial product content on this page is provided by Simple Financial Choices Pty Ltd, a wholly owned entity of Flare HR. Simple Financial Choices Pty Ltd (ABN 58 629 890 900; AFS Representative No. 001269407), is a Corporate Authorised Representative of True Oak Investments Ltd (ABN 81 002 558 956; AFS Licence No. 238184). Flare HR does not endorse or accept responsibility for any financial product advice or services provided by Simple Financial Choices Pty Ltd.")),n("div",{class:"row justify-content-end my-1 px-3 px-sm-0"},this.appVersionBadge()))}appVersionBadge(){return n("small",{style:{opacity:"0.5"},class:"text-muted"},"Powered by Flare, v","3.8.50722")}};mn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.ss-footer-logo{max-width:7rem}";const bn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-column justify-content-center align-items-center flex-grow-1"},n("h5",null,"Loading your superannuation step"),n("fl-loading-indicator",null))}},gn=class{constructor(n){t(this,n),this.isNotAllInformationProvidedMessageVisible=!1,this.eventTrackingService=fn.Instance}componentDidLoad(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Fund details"),n("p",{class:"text-warning mb-4 small"},"Make sure you are already a member of the fund before completing this step."),n("sss-my-own-fund-inputs",{myOwnFundForm:sn.myOwnFundForm,onFormChanged:t=>{sn.myOwnFundForm=Object.assign(Object.assign({},sn.myOwnFundForm),t.detail),this.isNotAllInformationProvidedMessageVisible=!1}})),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.myOwnFundForm=Object.assign(Object.assign({},sn.myOwnFundForm),{standardChoiceFormSignature:z(t.detail.standardChoiceFormSignature)})}})),n("div",{class:"mt-4"},n("sss-notifications-section",null)),this.isNotAllInformationProvidedMessageVisible&&n("div",{class:"mt-4 alert alert-danger",role:"alert"},"All fields are required to complete submission. Make sure you have selected a fund."),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){if(this.formState="validated",!this.formElement.checkValidity())return;if(!(D(sn.myOwnFundForm.fundUsi)&&D(sn.myOwnFundForm.memberNumber)&&D(sn.myOwnFundForm.standardChoiceFormSignature)))return void(this.isNotAllInformationProvidedMessageVisible=!0);const t={fundUsi:this.getOrError(sn.myOwnFundForm.fundUsi),memberNumber:this.getOrError(sn.myOwnFundForm.memberNumber),standardChoiceFormSignature:this.getOrError(sn.myOwnFundForm.standardChoiceFormSignature)};await pn.submitCustomFundChoiceAsync(t),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)}getOrError(t){return Et.pipe(t,(n=()=>{throw new Error("Option value is none.")},function(t){return O(t)?n():t.value}));var n}static get assetsDirs(){return["assets"]}};H(gn);const wn=class{constructor(n){t(this,n),this.formChanged=e(this,"formChanged",7),this.MIN_SEARCH_STRING_LENGTH=3,this.MAX_RECORD_COUNT=10,this.searchFundsAsync=async t=>(await un.searchFundsAsync(t,this.MAX_RECORD_COUNT)).sort(((t,n)=>t.productName.localeCompare(n.productName))).map((t=>({label:`${t.productName} (${t.usi})`,value:t.usi})))}render(){return n("div",null,n("div",{class:""},n("label",{class:"mb-2 font-weight-bold"},"Superannuation Fund Name"),n("fl-dropdown-async",{searchFunction:this.searchFundsAsync,minSearchStringLength:this.MIN_SEARCH_STRING_LENGTH,required:!0,requiredValidationMessage:"Select a fund",placeholder:`Search by name or USI (type at least ${this.MIN_SEARCH_STRING_LENGTH} characters)`,value:this.selectedOption,onValueChanged:t=>{this.selectedOption=t.detail,this.updateFundUsi(t.detail.value.toString())}}),n("div",{class:"invalid-feedback"},"Select a fund"),D(this.myOwnFundForm.fundUsi)&&n("div",null,n("label",{class:"mb-2 mt-3 font-weight-bold"},"Superannuation Fund USI"),n("p",{class:"mb-0"},this.myOwnFundForm.fundUsi.value),n("p",{class:"small mt-1"},"Please ensure this is the correct fund USI as some funds have similar names"))),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Member Number"),n("input",{placeholder:"Enter your member number",type:"text",class:"form-control",required:!0,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:(t=sn.myOwnFundForm.memberNumber,O(t)?void 0:t.value),onChange:t=>this.updateMemberNumber(t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid member number (only numbers and / or letters)")));var t}updateFundUsi(t){this.formChanged.emit({fundUsi:L(t)})}updateMemberNumber(t){this.formChanged.emit({memberNumber:L(t)})}},yn=class{constructor(n){t(this,n)}disconnectedCallback(){hn.clearNotifications()}render(){const{items:t}=hn.state;return t.length<=0?n(o,null):n("div",{class:"alert alert-"+t[0].type,role:"alert"},n("div",{class:"d-flex"},n("p",{class:"mb-0 flex-grow-1"},n("strong",null,t[0].details.title)),n("button",{onClick:this.handleClose,type:"button",class:"close pb-1","aria-label":"Close"},n("span",{"aria-hidden":"true"},"×"))),n("p",{class:"mb-0 mt-1"},t[0].details.description))}handleClose(){hn.closeCurrent()}},xn=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}render(){return n("div",{class:"d-flex align-items-center justify-content-center"},n("p",{class:"confirm-title font-weight-bold text-center"},"You are now applying for a"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds1.pdf")},"QSuper Accumulation Account"),". Read the"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds11.pdf")},"PDS")," ","here."))}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Insurance Opt In"})}static get assetsDirs(){return["assets"]}};var kn,Sn;xn.style="",function(t){t[t.InsuranceConfirm=0]="InsuranceConfirm",t[t.InsuranceQuestions=1]="InsuranceQuestions",t[t.AccumulationAccount=2]="AccumulationAccount",t[t.ConfirmSelection=3]="ConfirmSelection"}(kn||(kn={})),function(t){t[t.question1=0]="question1",t[t.question2=1]="question2",t[t.question3=2]="question3",t[t.question4=3]="question4",t[t.question5=4]="question5",t[t.question6=5]="question6",t[t.question7=6]="question7",t[t.question8=7]="question8"}(Sn||(Sn={}));const Cn={currentQSuperInsuranceQuestion:Sn.question1,currentQSuperFormPage:kn.InsuranceConfirm,qSuperFormValid:!1,nextRoute:"/",continueAllowed:!1,qSuperOptInPageCheckbox:!1,qSuperJoinPageCheckbox:!1,qSuperInsuranceQuestions:{question1:{answered:!1},question2:{answered:!1},question3:{answered:!1},question4:{answered:!1},question5:{answered:!1},question6:{answered:!1},question7:{answered:!1},question8:{answered:!1}},qSuperQuestionnaire:{reviewedApplication:!1,acceptedDeclaration:!1,readDutyOfDisclosure:!1,insuranceChosen:!1},standardChoiceFormSignature:""},{state:An,reset:_n}=qt(Cn),qn=_n;function Bn(){var t,n,e,i;const r=window.location.pathname.split(Zt.appBaseUrl)[1],o={[nn.QSuperOptIn]:nn.QSuperQuestion1,[nn.QSuperQuestion1]:An.qSuperInsuranceQuestions.question1.answered?!0===(null===(t=An.qSuperQuestionnaire.questions)||void 0===t?void 0:t.question1)?nn.QSuperQuestion4:nn.QSuperQuestion2:nn.QSuperQuestion1,[nn.QSuperQuestion2]:An.qSuperInsuranceQuestions.question2.answered?!0===(null===(n=An.qSuperQuestionnaire.questions)||void 0===n?void 0:n.question2)?nn.QSuperQuestion4:nn.QSuperQuestion3:nn.QSuperQuestion2,[nn.QSuperQuestion3]:An.qSuperInsuranceQuestions.question3.answered?nn.QSuperQuestion4:nn.QSuperQuestion3,[nn.QSuperQuestion4]:An.qSuperInsuranceQuestions.question4.answered?nn.QSuperQuestion5:nn.QSuperQuestion4,[nn.QSuperQuestion5]:An.qSuperInsuranceQuestions.question5.answered?nn.QSuperQuestion6:nn.QSuperQuestion5,[nn.QSuperQuestion6]:An.qSuperInsuranceQuestions.question6.answered?nn.QSuperQuestion7:nn.QSuperQuestion6,[nn.QSuperQuestion7]:An.qSuperInsuranceQuestions.question7.answered?nn.QSuperQuestion8:nn.QSuperQuestion7,[nn.QSuperQuestion8]:An.qSuperInsuranceQuestions.question8.answered?nn.QSuperConsent:nn.QSuperQuestion8,[nn.QSuperConsent]:An.qSuperQuestionnaire.readDutyOfDisclosure&&An.qSuperQuestionnaire.reviewedApplication?nn.QSuperJoin:nn.QSuperConsent,[nn.QSuperJoin]:An.qSuperJoinPageCheckbox?nn.Success:nn.QSuperJoin};return r===nn.QSuperQuestion5?An.qSuperInsuranceQuestions.question1.answered&&An.qSuperInsuranceQuestions.question2.answered&&An.qSuperInsuranceQuestions.question3.answered&&An.qSuperInsuranceQuestions.question4.answered&&An.qSuperInsuranceQuestions.question5.answered&&(!0===(null===(e=An.qSuperQuestionnaire.questions)||void 0===e?void 0:e.question3)||!0===(null===(i=An.qSuperQuestionnaire.questions)||void 0===i?void 0:i.question5))?nn.QSuperQuestion6:nn.QSuperConsent:r===nn.QSuperOptIn?An.qSuperOptInPageCheckbox?An.qSuperQuestionnaire.insuranceChosen?nn.QSuperQuestion1:nn.QSuperConsent:r:o[r]}const En=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}async componentDidLoad(){window.scroll(0,0),An.currentQSuperFormPage=kn.AccumulationAccount}render(){return n("sss-qsuper-layout",null,n("div",{class:"d-flex align-items-center justify-content-center"},n("p",{class:"confirm-title font-weight-bold text-center"},"Your QSuper Accumulation Account")),n("div",{class:"p-3 d-flex mt-4 checkbox-container"},n("p",null,"Just finally, we need you to confirm that you understand the declarations below and the product you've applied for by ticking the box below.",n("br",null),n("br",null),"This form and all products are issued by the QSuper Board (ABN 32 125 059 006 AFSL 489650) as trustee for QSuper (ABN 60 905 115 063).",n("br",null),n("br",null),"I have read and agree to the terms and conditions in the QSuper"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/pds11.pdf")},"Product Disclosure Statement for Accumulation and Income Accounts"),", QSuper's"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/fs15.pdf")},"Your Privacy factsheet"),", and the"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/-/media/pdfs/qsuper-public/publications/qiib09.pdf")},"Financial Services Guide"),".",n("br",null),n("br",null),"I understand that any insurance cover I might have as a result of this application, commences when the first contribution is received into my account. Once I am a member I can cancel, or, subject to eligibility conditions, vary, my cover at any time. Premiums are deducted in accordance with the PDS.",n("br",null),n("br",null),"I also agree to be bound by the Trust Deed and the governing rules of QSuper in relation to the operation of my Accumulation account.",n("br",null),n("br",null),"I confirm that the information I have given is true and correct.",n("br",null),n("br",null),"I confirm that I am the person identified as the applicant in this form.",n("br",null),n("br",null),"I consent to the QSuper Board paying Simple Financial Choices Pty Ltd, a wholly owned subsidiary of Flare, a fee of $300 on receipt of the first contribution into my account, for the provision of technology services.",n("br",null),n("br",null),"I understand that I will be placed into the default investment option QSuper Lifetime.",n("br",null),n("br",null),"I understand that my Tax File Number will be provided to QSuper. NB - if you have your Tax File Number available, this will help speed up the processing of this application and we may be able to Find your Super.",n("br",null),n("br",null),"I have read and accept the"," ",n("a",{target:"_blank",href:tn.toExternalUrl("https://qsuper.qld.gov.au/misc/tfn")},"Privacy and Contact Information Statement"))),n("div",null,n("label",{class:"d-flex mt-3 p-3 checkbox-container",htmlFor:"ackAllCheckBox"},n("div",{class:"w-auto px-2 fl-checkbox-container"},n("input",{id:"ackAllCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0 mt-1"},"I acknowledge all of the above. ",n("i",null,"(required)"))))))}handleCheckboxToggle(){An.qSuperQuestionnaire.readDutyOfDisclosure=!An.qSuperQuestionnaire.readDutyOfDisclosure,An.qSuperQuestionnaire.reviewedApplication=!An.qSuperQuestionnaire.reviewedApplication,An.continueAllowed=!An.continueAllowed,An.nextRoute=Bn()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Accumulation Page"})}};function jn(){const t=window.location.pathname.split(Zt.appBaseUrl)[1];An.continueAllowed={[nn.QSuperOptIn]:An.qSuperOptInPageCheckbox,[nn.QSuperJoin]:An.qSuperJoinPageCheckbox&&An.standardChoiceFormSignature}[t]}function In(){qn(),An.qSuperQuestionnaire=Object.assign(Object.assign({},An.qSuperQuestionnaire),{acceptedDeclaration:!1,insuranceChosen:!1,readDutyOfDisclosure:!1,reviewedApplication:!1}),An.qSuperInsuranceQuestions={question1:{answered:!1},question2:{answered:!1},question3:{answered:!1},question4:{answered:!1},question5:{answered:!1},question6:{answered:!1},question7:{answered:!1},question8:{answered:!1}}}En.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Fn=class{constructor(n){t(this,n),this.insuranceChosen=!1,this.eventTrackingService=fn.Instance,this.isEligibleForInsurance=!1,this.ensureInsuranceEligibility=()=>{Zt.superBuyer.userProfile.yearsOfAge<14||(Zt.superBuyer.userProfile.yearsOfAge<16?this.showIneligibleNotification("You may still apply for QSuper, however people under the age of 16 are not able to apply for insurance."):this.isEligibleForInsurance=!0)},this.showIneligibleNotification=t=>{hn.showInfoNotification({title:"Unable to apply for Insurance",description:t})}}componentDidLoad(){return this.eventTrackingService.TrackFinancialProductViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",financialProduct:"QSuper Insurance"})}componentWillLoad(){In(),this.ensureInsuranceEligibility()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-layout",{class:"d-flex flex-fill"},n("sss-qsuper-confirm-header",null),n("div",{class:"mt-4 p-3 checkbox-container"},n("p",null,"As part of becoming a QSuper member, you will receive death cover and total and permanent disability cover when you become eligible. ",n("br",null),n("br",null),"You will receive this cover when: ",n("br",null),n("br",null),"You are 25 years or older; ",n("br",null),"and You have had at least $6,000 in your accumulation account; ",n("br",null),"and At that time, we have received money into your account within the previous 13 months ",n("br",null),n("br",null),"Please see the Accumulation Account Insurance Guide, available on the QSuper website, for further information ",n("br",null),n("br",null),"Do you want this insurance cover?"),n("div",{class:"d-flex justify-content-between mt-4"},n("div",{class:"button-holder flex-grow-1 mr-2"},n("fl-button",{disabled:!this.isEligibleForInsurance,isBlockElement:!0,variant:this.insuranceChosen?"primary":"secondary",onClick:()=>this.handleInsuranceToggle(!0)},"Yes")),n("div",{class:"button-holder flex-grow-1 ml-2"},n("fl-button",{disabled:!this.isEligibleForInsurance,isBlockElement:!0,variant:this.insuranceChosen?"secondary":"primary",onClick:()=>this.handleInsuranceToggle(!1)},"No")))),n("div",null,n("label",{class:"d-flex mt-3 p-3 checkbox-container",htmlFor:"ackCheckBox"},n("div",{class:"w-auto px-2 fl-checkbox-container"},n("input",{id:"ackCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0"},"I acknowledge that my personal information will be shared with QSuper as part of their application process."))))))}handleInsuranceToggle(t){An.qSuperQuestionnaire.insuranceChosen=t&&this.isEligibleForInsurance,this.insuranceChosen=An.qSuperQuestionnaire.insuranceChosen,An.nextRoute=Bn()}handleCheckboxToggle(){An.qSuperOptInPageCheckbox=!An.qSuperOptInPageCheckbox,jn(),An.nextRoute=Bn()}};Fn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Pn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-layout",{class:"d-flex flex-fill"},n("sss-qsuper-confirm-header",null),n("div",{class:"p-3 mt-4 checkbox-container"},n("slot",null),n("sss-qsuper-question-yes-no-buttons",null))))}};Pn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.choice-container{margin-top:0 !important;margin-bottom:0 !important}.confirm-title{font-size:20px;margin-bottom:0}.confirm-text{font-size:14px}.edit-toggle{cursor:pointer}.form-value-text{overflow-wrap:anywhere}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-item-text{font-size:13px}.button-holder{min-width:8rem}.confirm-form-view-only-holder *{font-size:14px}";const Rn=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}render(){return n("sss-qsuper-layout",null,n("img",{class:"ss-choice-logo mx-auto",alt:"Simple Financial Choices Pty Ltd",src:s("assets/logo-qsuper.png")}),n("div",{class:"row"},n("div",{class:"col text-center"},n("p",{class:"confirm-title font-weight-bold mb-0"},"You have chosen to join QSuper"))),n("div",{class:"my-3 card p-3"},n("p",{class:"confirm-text"},"We are almost there... All you have to do now is sign the super choice form. We'll prefill it for you. Make sure the info is correct. Your application to join the fund is subject to Trustee approval."),n("p",{class:"confirm-text mb-0"},"You've chosen to stay with your existing fund. Review the details below and click continue to confirm your choice")),n("div",{class:"card p-3"},n("p",{class:"text-center"},"100 years strong"),n("p",{class:"text-center"},"One of Australia's largest funds"),n("p",{class:"text-center mb-0"},"Awarded SuperRatings highest performance rating")),n("div",{class:"mt-3"},n("p",{class:"text-center confirm-text"},"Your application to join the fund is subject to Trustee approval.")),n("div",null,n("label",{class:"d-flex mt-4 p-3 checkbox-container",htmlFor:"confirmCheckBox"},n("div",{class:"w-auto px-2 py-2 fl-checkbox-container"},n("input",{id:"confirmCheckBox",class:"confirm-checkbox-item",type:"checkbox",onChange:()=>this.handleCheckboxToggle()})),n("div",{class:"pl-3"},n("p",{class:"confirm-item-text mb-0 mt-1"},"I've read and understood the"," ",n("a",{target:"_blank",onClick:()=>this.pdsViewedAsync(),href:tn.toExternalUrl("https://qsuper.qld.gov.au/calculators-and-forms/publications/product-disclosure-statements/")},"PDS")," ","and confirm all information I have provided is true and correct. I understand that my information will be sent to the trustee of this fund to process my request to join and I consent to my TFN, as currently held on the Flare HR Platform, being given to the trustee in order to open and administer my account.")))),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{An.standardChoiceFormSignature=t.detail.standardChoiceFormSignature,jn()}}))}handleCheckboxToggle(){An.qSuperJoinPageCheckbox=!An.qSuperJoinPageCheckbox,jn(),An.nextRoute=Bn()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer",pageName:"Confirm Page"})}};Rn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const Mn=new class{async submitQSuperChoiceAsync(t){return Gt().url("super-choice/qsuper").post(t).badRequest((()=>{throw new Error("Failed to process QSuper join request")})).text()}},Tn=class{constructor(n){t(this,n),this.isEligible=!1,this.canContinue=()=>this.isEligible&&An.continueAllowed,this.ensureEligibility=()=>{Zt.superBuyer.userProfile.yearsOfAge<14?this.showIneligibleNotification("People under the age of 14 are not able to open accounts."):Zt.superBuyer.userProfile.yearsOfAge>70?this.showIneligibleNotification("People over the age of 70 are not able to open accounts."):this.isEligible=!0},this.showIneligibleNotification=t=>{hn.showInfoNotification({title:"Unable to apply for QSuper",description:t})}}async componentWillLoad(){this.ensureEligibility(),An.nextRoute=Bn()}render(){return n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("slot",null),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,disabled:!this.canContinue(),promiseFn:()=>this.tryAsync()},n("span",null,"Continue"))))))))}async tryAsync(){try{if(!this.canContinue())return;await async function(){if(An.continueAllowed)if(An.continueAllowed=!1,An.currentQSuperFormPage===kn.InsuranceConfirm&&An.qSuperQuestionnaire.insuranceChosen)An.currentQSuperFormPage=kn.InsuranceQuestions;else if(An.currentQSuperFormPage!==kn.InsuranceConfirm||An.qSuperQuestionnaire.insuranceChosen)if(An.currentQSuperFormPage!==kn.InsuranceQuestions){if(An.currentQSuperFormPage===kn.AccumulationAccount)return An.qSuperFormValid=!1,void(An.currentQSuperFormPage=kn.ConfirmSelection);if(An.currentQSuperFormPage===kn.ConfirmSelection){An.qSuperQuestionnaire.acceptedDeclaration=!0;const t={questionnaire:An.qSuperQuestionnaire,standardChoiceFormSignature:An.standardChoiceFormSignature};await Mn.submitQSuperChoiceAsync(t),Zt.markSuperSelectionAsSubmitted()}}else An.currentQSuperFormPage=kn.AccumulationAccount;else An.currentQSuperFormPage=kn.AccumulationAccount}(),tn.navigateInternally(this.history,An.nextRoute)}catch(t){hn.showErrorNotification({title:"Couldn't process your request",description:"We had an issue processing your request to join QSuper. Please try again shortly."}),An.continueAllowed=!0}}static get assetsDirs(){return["assets"]}};H(Tn);const Nn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 1"),n("p",{class:" mb-0"},"Are you currently a registered or enrolled nurse or assistant in nursing who is qualified and currently practicing, or working in the retail sector, or food and beverage service?")))}},Dn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 2"),n("p",{class:" mb-0"},"Are you currently a qualified tradesperson currently working within your area of expertise (e.g. hairdresser, chef, plumber, electrician, plasterer, carpenter or concreter), or a skilled worker with light manual duties (e.g. jeweller, building inspector, laboratory technician, foreman or office equipment technician)?")))}},On=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 3"),n("p",{class:" mb-0"},"Are you currently a police officer, firefighter, paramedic, or other emergency or protective services worker, including security guard or corrections officer, or a professional sportsperson, or working in a manual occupation which does not require trade specific qualifications and may be subject to accident or environment hazards (e.g. earthmover, driver, cleaner, labourer, factory worker or agricultural worker)?")))}},Un=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 4"),n("p",{class:" mb-0"},"Are the usual work activities of your job considered office based or school teaching ( meaning you spend at least 80% of your work time doing clerical, call centre, administrative or other office or classroom based activities), or are you a medical practitioner, lawyer or engineer who spends at least 80% of your work hours in an office or clinical environment?")))}},Ln=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 5"),n("p",{class:" mb-0"},"Do you currently perform, or intend to work in a job within the next three months that includes, any of the following risky activities: handling firearms (other than as a police officer, correctional officer or licensed security guard), dangerous chemicals or explosives, or offshore work – oil and gas platforms, ships at sea, or being underground (in construction and mining environments) or underwater for more than 20% of total at work time, or working at heights over 20 metres in any environment requiring hard hat and harness for safety by law, or crop dusting, aerial mustering or any low level flying activity (defined as below 150 metres or 500 feet), or flying more than 200 hours per annum as a passenger other than on a commercial airline, or as a pilot (fixed wing or helicopter)?")))}},zn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 6"),n("p",{class:" mb-0"},"Are you earning more than $120,000 a year, (before tax and employer paid superannuation), from your job?")))}},Vn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 7"),n("p",{class:" mb-0"},"Do you have a university qualification which you are using/is required in your current role?")))}},Hn=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("sss-qsuper-insurance-questions",null,n("p",{class:"font-weight-bold"},"Question 8"),n("p",{class:" mb-0"},"Do you have a senior/executive level management role in your company (your direct reports would be mid-level managers or skilled specialists in a sedentary setting), or is your role considered professional (e.g. doctor, solicitor, accountant – requiring membership of a professional or government body to practice in your occupation)?")))}},Qn=class{constructor(n){t(this,n)}render(){return n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>this.handleQuestionClick(!0),isBlockElement:!0,variant:"secondary"},n("span",null,"Yes")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,variant:"secondary",onClick:()=>this.handleQuestionClick(!1)},n("span",null,"No")))))}handleQuestionClick(t){const n=window.location.pathname.split(Zt.appBaseUrl+"/qsuper/insurance/")[1].replace(/\/+$/,"");void 0===An.qSuperQuestionnaire.questions&&(An.qSuperQuestionnaire.questions={question1:!1,question2:!1,question3:!1,question4:!1,question5:!1,question6:!1,question7:!1,question8:!1}),An.qSuperQuestionnaire.questions[n]=t,An.qSuperInsuranceQuestions[n].answered=!0,An.nextRoute=Bn(),tn.navigateInternally(this.history,An.nextRoute)}};H(Qn);const Wn=class{constructor(n){t(this,n)}render(){return n(o,{class:"bg-white rounded-sm picked-box-border p-3"},n("div",{class:"d-flex"},n("div",{class:"flex-grow-1 font-weight-bold"},this.fundType),n("div",{class:"px-3 py-2 text-white picked-block position-absolute"},"You picked")),n("div",null,this.fundName))}};Wn.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.picked-block{background-color:var(--fl-color-primary);border-top-right-radius:3px;right:0;top:0}.picked-box-border{border:2px solid var(--fl-color-primary)}";const $n=class{constructor(n){t(this,n),this.eventTrackingService=fn.Instance}componentDidLoad(){return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync()}render(){return n(o,{class:"d-flex flex-fill"},n("sss-custom-fund",{class:"flex-fill"},n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("div",{class:"card p-4"},n("p",{class:"font-weight-bold"},"Fund details"),n("p",{class:"text-warning mb-4 small"},"Make sure you are already a member of the fund before completing this step."),n("sss-self-managed-fund-inputs",{fundForm:sn.selfManagedFundForm,onFormChanged:t=>{sn.selfManagedFundForm=Object.assign(Object.assign({},sn.selfManagedFundForm),t.detail)}})),n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{sn.selfManagedFundForm=Object.assign(Object.assign({},sn.selfManagedFundForm),t.detail)}})),n("div",{class:"mt-4"},n("sss-notifications-section",null)),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("fl-button",{onClick:()=>tn.navigateInternally(this.history,nn.ChoicePage),isBlockElement:!0,variant:"secondary"},n("span",null,"Back")))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit")))))))}async handleSubmitForm(){if(this.formState="validated",this.formElement.checkValidity()){const t={smsfChoice:{abn:sn.selfManagedFundForm.fundAbn,fundName:sn.selfManagedFundForm.fundName,fundAddress:{addressLine1:sn.selfManagedFundForm.addressLine1,addressLine2:sn.selfManagedFundForm.addressLine2,city:sn.selfManagedFundForm.city,state:sn.selfManagedFundForm.state,postcode:sn.selfManagedFundForm.postcode},bsb:sn.selfManagedFundForm.bsb,bankAccountName:sn.selfManagedFundForm.bankAccountName,bankAccountNumber:sn.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:sn.selfManagedFundForm.fundEsa},standardChoiceFormSignature:sn.selfManagedFundForm.standardChoiceFormSignature};await pn.submitSelfManagedFundChoiceAsync(t),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success)}}};H($n);const Jn={"01":"Australia and New Zealand Banking Group","03":"Westpac Banking Corporation",73:"Westpac Banking Corporation","06":"Commonwealth Bank of Australia",76:"Commonwealth Bank of Australia","08":"National Australia Bank",78:"National Australia Bank","09":"Reserve Bank of Australia",10:"BankSA (division of Westpac Bank)",11:"St George Bank (division of Westpac Bank)",33:"St George Bank (division of Westpac Bank)",12:"Bank of Queensland",14:"Rabobank",15:"Town & Country Bank",18:"Macquarie Bank",19:"Bank of Melbourne (division of Westpac Bank)",55:"Bank of Melbourne (division of Westpac Bank)",21:"JP Morgan Chase Bank",22:"BNP Paribas",23:"Bank of America",24:"Citibank & Citibank NA",510:"Citibank & Citibank NA",25:"BNP Paribas Securities",26:"Bankers Trust Australia (division of Westpac Bank)",29:"MUFG Bank",30:"Bankwest (division of Commonwealth Bank)",31:"Bank Australia",325:"Beyond Bank",34:"HSBC Bank Australia",985:"HSBC Bank Australia",35:"Bank of China",980:"Bank of China",40:"Commonwealth Bank of Australia",41:"Deutsche Bank",42:"Commonwealth Bank of Australia",52:"Commonwealth Bank of Australia",45:"OCBC Bank",46:"Advance Bank (division of Westpac Bank)",47:"Challenge Bank (division of Westpac Bank)",48:"Suncorp-Metway",664:"Suncorp-Metway",512:"Community First Credit Union",514:"RACQ Bank",517:"Volt Bank",533:"Bananacoast Community Credit Union",57:"Australian Settlements",61:"Adelaide Bank (division of Bendigo and Adelaide Bank)",611:"Endeavour Mutual Bank",823:"Endeavour Mutual Bank",630:"Greater Bank",637:"Greater Bank",632:"B&E",633:"Bendigo Bank",634:"Uniting Financial Services",638:"Heritage Bank",880:"Heritage Bank",639:"Home Building Society (division of Bank of Queensland)",640:"Hume Bank",641:"IMB",647:"IMB",642:"Australian Military Bank",645:"Auswide Bank",656:"Auswide Bank",646:"Maitland Mutual Building Society",650:"Newcastle Permanent Building Society",653:"Pioneer Permanent Building Society (division of Bank of Queensland)",654:"Queensland Country Credit Union",655:"The Rock",659:"G&C Mutual Bank",676:"Gateway Bank",70:"Indue",721:"Holiday Coast Credit Union",722:"Southern Cross Credit Union",723:"Bank of Heritage Isle",724:"MOVE",728:"Summerland Credit Union",777:"Police & Nurse",80:"Cuscal",670:"Cuscal",812:"Teachers Mutual Bank",813:"Capricornian",814:"Credit Union Australia",815:"Police Bank",817:"Warwick Credit Union",818:"Bank of Communications",819:"Industrial & Commercial Bank of China",824:"Sutherland Credit Union",825:"Big Sky Building Society",833:"Defence Bank",882:"Unity Bank",888:"China Construction Bank",90:"Australia Post",911:"Sumitomo Mitsui Banking Corporation",913:"State Street Bank & Trust Company",917:"Arab Bank Australia",918:"Mizuho Bank",922:"United Overseas Bank",923:"ING Bank",936:"ING Bank",931:"Mega International Commercial Bank",932:"Regional Australia Bank",939:"AMP Bank",941:"Delphi Bank (division of Bendigo and Adelaide Bank)",942:"Bank of Sydney",943:"Taiwan Business Bank",944:"Members Equity Bank",946:"UBS AG",951:"BOQ Specialist",969:"Tyro Payments"},Xn=class{constructor(n){t(this,n),this.formChanged=e(this,"formChanged",7),this.currentBank=U,this.stateOptions=[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}],this.bsbRegex=new RegExp(/^[0-9]{3}[0-9]{3}$/),this.bankAccountNumberRegex=new RegExp(/^[0-9]{2,10}$/)}render(){return n("div",null,n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Fund name *"),n("input",{placeholder:"Enter your fund name",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundName",id:"fundName",value:sn.selfManagedFundForm.fundName,onChange:t=>this.updateFormField("fundName",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund name")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Fund ABN *"),n("input",{placeholder:"Enter your fund ABN",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundAbn",id:"fundAbn",value:sn.selfManagedFundForm.fundAbn,onChange:t=>this.updateFormField("fundAbn",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund ABN")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Electronic service address alias (ESA) *"),n("input",{placeholder:"Enter your ESA",type:"text",class:"form-control",required:!0,minlength:"2",name:"fundEsa",id:"fundEsa",value:sn.selfManagedFundForm.fundEsa,onChange:t=>this.updateFormField("fundEsa",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid fund ESA")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Address line 1 *"),n("input",{placeholder:"Enter your address",type:"text",class:"form-control",required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:sn.selfManagedFundForm.addressLine1,onChange:t=>this.updateFormField("addressLine1",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid address")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Address line 2 (optional)"),n("input",{placeholder:"Enter your address",type:"text",class:"form-control",name:"addressLine2",id:"addressLine2",value:sn.selfManagedFundForm.addressLine2,onChange:t=>this.updateFormField("addressLine2",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid address")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"City/suburb *"),n("input",{placeholder:"Enter your city",type:"text",class:"form-control",name:"city",required:!0,id:"city",value:sn.selfManagedFundForm.city,onChange:t=>this.updateFormField("city",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid city/suburb *")),n("div",{class:"mt-3"},n("label",{class:"mb-2 font-weight-bold"},"State *"),n("fl-dropdown",{options:this.stateOptions,required:!0,requiredValidationMessage:"Select a state",placeholder:"Select a state",value:this.fundForm.state,onValueChanged:t=>{this.updateFormField("state",t.detail.value.toString())}}),n("div",{class:"invalid-feedback"},"Select a state")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Post code *"),n("input",{placeholder:"Enter your post code",type:"text",required:!0,class:"form-control",name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:sn.selfManagedFundForm.postcode,onChange:t=>this.updateFormField("postcode",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid post code")),n("div",null,n("i",{class:"fas fa-check-circle"})),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"BSB *"),n("input",{placeholder:"Enter your BSB",type:"text",required:!0,class:"form-control",name:"bsb",id:"bsb",minlength:"6",maxlength:"7",onKeyUp:t=>this.updateCurrentBank(t),pattern:this.bsbRegex.source,value:sn.selfManagedFundForm.bsb}),D(this.currentBank)&&n("p",{class:"mt-3"},n("strong",null,"Bank name"),n("br",null),n("span",{class:"ml-2"},this.currentBank.value)),n("div",{class:"invalid-feedback"},"Enter a valid BSB")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Bank account name *"),n("input",{placeholder:"Enter your bank account name",type:"text",required:!0,class:"form-control",name:"bankAccountName",minlength:"2",id:"bankAccountName",value:sn.selfManagedFundForm.bankAccountName,onChange:t=>this.updateFormField("bankAccountName",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid bank account name")),n("div",{class:"mt-4"},n("label",{class:"mb-2 font-weight-bold"},"Bank account number *"),n("input",{placeholder:"Enter your bank account number",type:"text",required:!0,class:"form-control",name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,value:sn.selfManagedFundForm.bankAccountNumber,onKeyUp:t=>this.updateCurrentBankAccountNumber(t),onChange:t=>this.updateFormField("bankAccountNumber",t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Enter a valid bank account number")))}updateFormField(t,n){this.formChanged.emit({[t]:n})}filterDigits(t){return t.replace(/[^0-9]/g,"")}updateCurrentBank(t){const n=this.filterDigits(t.target.value),e=n.substring(0,2),i=n.substring(0,3),r=Jn[e],o=Jn[i];r&&(this.currentBank=L(r)),o&&(this.currentBank=L(o)),""===n&&(this.currentBank=U),this.updateFormField("bsb",n)}updateCurrentBankAccountNumber(t){const n=this.filterDigits(t.target.value);this.updateFormField("bankAccountNumber",n)}};var Gn;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(Gn||(Gn={}));class Yn{}let Kn=class extends g{constructor(){super({authenticationState:Gn.Unauthorized,jwt:U,reactNativeInterop:U,iframeInterop:U,appConfiguration:U})}};Kn=function(t,n,e,i){var r,o=arguments.length,s=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(n,e,s):r(n,e))||s);return o>3&&s&&Object.defineProperty(n,e,s),s}([b({name:"sss-session",resettable:!0})],Kn);const Zn=new Kn,te=new class extends w{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return D(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return D(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(O(t))throw Error("Failed to get iframe interop information: no data in store");if(!this.isIframeInteropEnabled())throw Error("Failed to get iframe interop information: iframe mode is disabled");return t.value}}(Zn),{state:ne}=qt({slateFundForm:{memberNumber:"",standardChoiceFormSignature:""}}),ee=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"==window.location.origin,this.hostIsDeployed=()=>window.location.origin.endsWith("partner.flarehr.com"),this.skipConsolidation=()=>te.isReactNativeInteropEnabled()?"true":"false"}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=(this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app")+"/slate-redirect.html",i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:e,cancelRedirectUrl:e,skipConsolidation:this.skipConsolidation()});this.includeJwt()&&(i.authToken=Zt.jwt);const r=e=>{const{data:i,origin:o}=e;if(i)if("slate-redirect"!==i.sender){if("flare"===i.sender&&o.endsWith("join.slatesuper.com.au"))switch(i.type){case"contentResized":t.height=i.height>0?i.height:t.height,t.width=i.width>0?i.width:t.width}}else switch(window.removeEventListener("message",r),i.type){case"success":if(i.memberNumber){ne.slateFundForm.memberNumber=i.memberNumber,tn.navigateInternally(n,nn.SlateStandardChoice);break}default:tn.navigateInternally(n,nn.ChoicePage)}};window.addEventListener("message",r);const o=t.contentDocument;o.open();const s=o.createElement("form");let a;for(a in s.method="POST",s.target="_self",s.action=Zt.slateJoinAppPostUrl,i){const t=i[a];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=a,n.value=t,s.append(n)}}o.appendChild(s),o.close(),s.submit()}getSlateJoinMemberData(){var t,n;const e=Zt.superBuyer;return{firstName:e.userProfile.firstName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:(t=>{switch(t){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}})(e.userProfile.gender),email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}includeJwt(){return!Zt.slateJoinAppPostUrl.match(/autodev|preprod/)}},ie=class{constructor(n){t(this,n)}componentDidLoad(){ee.build(this.iframeElement,this.history)}render(){return n(o,{class:"d-flex flex-fill"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:t=>this.iframeElement=t}))}},re=new class{async submitSlateChoiceAsync(t){return Gt().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},oe=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("div",{class:"container"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-10 col-md-7"},n("sss-slatesuper-header",null),n("div",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("sss-standard-choice-form",{onStandardChoiceFormSignatureUpdated:t=>{ne.slateFundForm=Object.assign(Object.assign({},ne.slateFundForm),t.detail)}})),n("div",{class:"d-flex mt-4"},n("div",{class:"flex-grow-1 w-50"},n("div",{class:"mr-2"},n("stencil-route-link",{url:"/"},n("fl-button",{isBlockElement:!0,variant:"secondary"},n("span",null,"Back"))))),n("div",{class:"flex-grow-1 w-50"},n("div",{class:"ml-2"},n("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.handleSubmitForm()},n("span",null,"Submit"))))))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await re.submitSlateChoiceAsync(ne.slateFundForm),Zt.markSuperSelectionAsSubmitted(),tn.navigateInternally(this.history,nn.Success))}},se=class{constructor(n){t(this,n)}render(){return n("div",{class:"d-flex"},n("div",null,n("img",{class:"ss-choice-logo img-thumbnail",alt:"Simple Financial Choices Pty Ltd",src:s("assets/logo-slate.png")})),n("div",{class:"d-flex flex-column ml-3 align-items-left"},n("p",{class:"confirm-title font-weight-bold mb-0"},"You’re almost there!"),n("p",{class:"confirm-text mb-0"},"To proceed type your name below which authorises the signing of the Standard Choice form confirming your super selection.")))}static get assetsDirs(){return["assets"]}};se.style="";const ae=class{constructor(n){t(this,n),this.standardChoiceFormSignatureUpdated=e(this,"standardChoiceFormSignatureUpdated",7),this.standardChoiceFormUrl=tn.toExternalUrl("https://www.ato.gov.au/uploadedFiles/Content/SPR/downloads/SUPER17983Superannuation_standard_choice_form.pdf"),this.standardChoiceFormSignature=""}render(){return n("div",{class:"card p-4 mt-4 bg-light"},n("h4",{class:"small font-weight-bold"},"Superannuation Standard Choice Form"),n("p",{class:"small mt-2"},"The superannuation"," ",n("a",{target:"_blank",href:this.standardChoiceFormUrl},"standard choice form")," ","informs your employer of your choice of fund."),n("h4",{class:"small font-weight-bold"},"Type your full name below (required)"),n("input",{placeholder:"Type your full name",type:"text",class:"form-control",required:!0,minlength:"2",name:"standardChoiceFormSignature",id:"standardChoiceFormSignature",value:this.standardChoiceFormSignature,onKeyUp:t=>this.updateFormField(t.target.value.trim())}),n("div",{class:"invalid-feedback"},"Type your full name"),n("p",{class:"small mt-3 mb-0"},"Your authorisation is required for signing this form. Applying your full name in the text field above is the same as applying your written signature and is legally binding."))}updateFormField(t){this.standardChoiceFormSignatureUpdated.emit({standardChoiceFormSignature:t})}},ce=class{constructor(n){t(this,n)}render(){return n(o,{class:"d-flex flex-fill"},n("div",{class:"container mt-5"},n("div",{class:"row justify-content-center"},n("div",{class:"col col-sm-9 col-md-6"},n("div",{class:"bg-light rounded p-4"},n("div",{class:"d-flex justify-content-center"},n("div",null,n("svg",{width:"3em",height:"3em",viewBox:"0 0 16 16",class:"bi bi-check-circle-fill text-success",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},n("path",{"fill-rule":"evenodd",d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})))),n("div",{class:"d-flex justify-content-center"},n("p",{class:"mt-3 confirm-title text-center font-weight-bold px-5"},"Successfully updated superannuation details")),n("div",{class:"mt-2 text-center"},n("p",{class:"confirm-text mb-0"},"Your superannuation details have been updated successfully."),n("br",null),n("p",{class:"confirm-text mb-0"},"To continue with your onboarding, press ",n("strong",null,"Continue")," below."))),n("div",{class:"flex-grow-1 mt-4"},n("fl-promise-button",{isBlockElement:!0,onClick:this.handleContinueButtonClick},n("span",null,"Continue")))))))}handleContinueButtonClick(t){Zt.completeSuperSelectionFlow()}},ue=class{constructor(n){t(this,n),this.joinFundClicked=e(this,"joinFundClicked",7),this.eventTrackingService=fn.Instance}render(){return n(o,{class:{"d-flex p-3":!0,"ss-picked-fund":this.isSelected}},n("div",{class:"card-body pb-0 px-0 px-xl-3"},this.isSelected&&n("div",{class:"px-3 py-2 text-white picked-block position-absolute"},"You picked"),n("div",{class:"d-flex flex-fill flex-column align-items-center"},n("img",{class:"ss-choice-logo",alt:"Simple Financial Choices Pty Ltd",src:s("assets/"+this.logo)}),n("p",{class:"font-weight-bold text-center mt-3 mb-0"},this.heading),n("div",{class:"mt-3"},JSON.parse(this.features).map((t=>n("p",{class:"text-center"},t.value)))))),n("div",{class:"text-center"},n("div",{class:"p-3"},n("fl-button",{class:"uuid-button-continue",isBlockElement:!0,onClick:()=>this.handleFundClick()},this.callToAction)),n("a",{target:"_blank",href:this.pdsLink,onClick:()=>this.pdsViewedAsync()},"View PDS")))}handleFundClick(){return this.joinFundClicked.emit()}pdsViewedAsync(){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:this.usi,fundName:this.name,fundNameAlt:this.heading,pageName:"Panel Fund Page"})}static get assetsDirs(){return["assets"]}};ue.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const le=new class{async GetChosenFundAsync(){var t;const n=null===(t=Zt.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!n)return U;if("promoted"in n)return L({isPromoted:!0,promotedId:"qsuper"in n.promoted?"qsuper":"slate"in n.promoted?"slate":""});if("smsf"in n)return L({isPromoted:!1,name:n.smsf.fundName,type:"Self Managed Fund"});if("myOwnFund"in n){const t=n.myOwnFund.usi,e=await this.getFundByUsiAsync(t);return L({isPromoted:!1,name:D(e)?e.value.productName:t,type:"My Own Fund"})}if("default"in n){const t=n.default.usi,e=await this.getFundByUsiAsync(t);return L({isPromoted:!1,name:D(e)?e.value.productName:t,type:"Default Fund"})}return U}getFundByUsiAsync(t){return un.getFundByUsiAsync(t)}},fe=class{constructor(n){t(this,n),this.promotedFunds=this.getPromotedFunds(),this.chosenFund=U,this.eventTrackingService=fn.Instance,this.isPromotedFundSelected=t=>D(this.chosenFund)&&this.chosenFund.value.isPromoted&&this.chosenFund.value.promotedId===t}componentDidLoad(){yt();const t=this.promotedFunds.map((t=>t.usi));this.eventTrackingService.TrackSuperFundPanelViewedAsync({enabledFundIds:t})}async componentWillLoad(){In(),this.chosenFund=await le.GetChosenFundAsync()}render(){return n(o,null,n("div",{class:"container mt-0 mb-0"},n("div",{class:"row justify-content-center"},n("div",{class:"col"},n("a",{class:"text-decoration-none",href:tn.toExternalUrl("https://slatesuper.com.au/product-disclosure-statement-pdf"),target:"_blank"},n("p",{class:"mt-3 small text-center mb-1 text-dark"},"Powered by"),n("h5",{class:"font-weight-bold text-center mb-4"},n("span",{class:"text-dark mr-1"},"Simple Financial"),n("span",{class:"simple-choices-text"},"Choices"))))),n("div",{class:"row justify-content-center"},n("div",{class:"col"},n("p",{class:"text-center"},"Selecting the right super fund is very important. Simple Financial Choices have provided you with easy access to the below funds to make your choice an easy one, if you think that one of them might suit your needs."),n("p",{class:"text-center small"},"The content on this page and on the following pages relating to superannuation is provided by Simple Financial Choices. The superannuation funds presented below are neither selected nor recommended by your employer nor by Flare HR."),n("p",{class:"text-center small"},"We aren't recommending these funds as being suitable for you because there are many super funds out there and you will need to choose what is best for you. If you are unsure, obtain your own advice. You should be aware that, if you do choose one of these funds, Flare and its associated entities will normally receive a fee for you doing so."))),n("div",{class:"row"},n("div",{class:"col"},n("sss-notifications-section",null))),n("div",{class:"row justify-content-center mt-4"},n("div",{class:"col col-sm-10 col-md-8 col-xl-7"},n("div",{class:"row"},n("div",{class:"col"},n("div",{class:"d-flex flex-fill"},D(this.chosenFund)&&!this.chosenFund.value.isPromoted&&n("sss-selected-super-choice-section",{fundType:this.chosenFund.value.type,fundName:this.chosenFund.value.name,class:"flex-fill position-relative"})))),n("div",{class:"row mt-3"},this.promotedFunds.map((t=>n("div",{class:"col-12 col-lg-6 d-flex"},n("sss-super-choice-item",{class:"card mb-3 mb-lg-0 mx-0 flex-grow-1",logo:t.logo,isSelected:this.isPromotedFundSelected(t.fundId),usi:t.usi,name:t.name,heading:t.heading,pdsLink:tn.toExternalUrl(t.pdsLink),features:JSON.stringify(t.features),callToAction:t.callToAction,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)}))))),n("div",{class:"row mt-3"},n("div",{class:"col"},n("stencil-route-link",{url:nn.MyOwnFund},n("fl-button",{isBlockElement:!0,variant:"secondary"},"I prefer to select another fund"))))))))}getPromotedFunds(){return[{fundId:"slate",usi:"32367272075001",name:"Slate Super",heading:"Modern Digital Fund",logo:"logo-slate.png",route:nn.SlateJoin,callToAction:"Join Slate Super",pdsLink:"https://slatesuper.com.au/pds/?utm_source=flare&utm_medium=superselection",features:[{order:1,value:"Personalised lifestages investment strategy that evolves with you"},{order:2,value:"Advanced mobile app with retirement forecast and smart features"},{order:3,value:"Your own personal concierge at Slate to assist with your account"}]},{fundId:"qsuper",usi:"60905115063001",name:"QSuper",heading:"Recognised performer",logo:"logo-qsuper-square.png",route:nn.QSuperOptIn,callToAction:"Join QSuper",pdsLink:"https://qsuper.qld.gov.au/calculators-and-forms/publications/product-disclosure-statements",features:[{order:1,value:"100 years strong"},{order:2,value:"One of Australia's largest funds"},{order:3,value:"Awarded SuperRatings highest performance rating"}]}]}async handleJoinSuperClickAsync(t){return"slate"===t.fundId?await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:"32367272075001",fundName:"Slate Super",fundNameAlt:"Modern Digital Fund"}):"qsuper"===t.fundId&&await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:"60905115063001",fundName:"QSuper",fundNameAlt:"Recognised performer"}),tn.navigateInternally(this.history,t.route)}static get assetsDirs(){return["assets"]}};fe.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.checkbox-container{border-radius:4px;background-color:#f5f4f2}.confirm-checkbox-item{-webkit-transform:scale(1.7);transform:scale(1.7)}.simple-choices-text{color:#489882}.choice-card{background:#ffffff;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);box-shadow:0 1px 4px rgba(0, 0, 0, 0.25);border-radius:3px}.choice-card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.card.ss-picked-fund{border:2px solid var(--fl-color-primary)}.ss-choice-logo{height:70px;width:70px;-o-object-fit:contain;object-fit:contain}img{width:100%;display:block}.choice-component{width:100%;position:relative}.flexible{-ms-flex-positive:1;flex-grow:1}";const de=class{constructor(n){t(this,n),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const n=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!n)return this.previousMatch=this.match,this.match=lt(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};var n,e;this.history&&this.history.location.hash?t={scrollToId:this.history.location.hash.substr(1)}:this.scrollTopOffset&&(t={scrollTopOffset:this.scrollTopOffset}),"function"==typeof this.componentUpdated?this.componentUpdated(t):!this.match||(e=this.previousMatch,null==(n=this.match)&&null==e||null!=e&&n&&e&&n.path===e.path&&n.url===e.url&&st(n.params,e.params))||!this.routeViewsUpdated||this.routeViewsUpdated(t)}async componentDidUpdate(){await this.loadCompleted()}async componentDidLoad(){await this.loadCompleted()}render(){if(!this.match||!this.history)return null;const t=Object.assign({},this.componentProps,{history:this.history,match:this.match});return this.routeRender?this.routeRender(Object.assign({},t,{component:this.component})):this.component?n(this.component,Object.assign({},t)):void 0}get el(){return a(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(de,["location","history","historyType","routeViewsUpdated"]),de.style="stencil-route.inactive{display:none}";const he=(t,n,e)=>e(t.confirm(n)),pe=(t,n)=>{const e=t[n],i="__storage_test__";try{return e.setItem(i,i),e.removeItem(i),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}},ve=class{constructor(n){t(this,n),this.unsubscribe=()=>{},this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}componentWillLoad(){this.computeMatch()}computeMatch(){this.location&&(this.match=lt(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var n,e,i;if(!((n=t).metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push((i=this.root,"/"==(e=this.url).charAt(0)&&"/"==i.charAt(i.length-1)?i.slice(0,i.length-1)+e:i+e))}render(){let t={class:{[this.activeClass]:null!==this.match},onClick:this.handleClick.bind(this)};return this.anchorClass&&(t.class[this.anchorClass]=!0),"a"===this.custom&&(t=Object.assign({},t,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex,"aria-haspopup":this.ariaHaspopup,id:this.anchorId,"aria-posinset":this.ariaPosinset,"aria-setsize":this.ariaSetsize,"aria-label":this.ariaLabel})),n(this.custom,Object.assign({},t),n("slot",null))}get el(){return a(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(ve,["history","location","root"]);const me=t=>"STENCIL-ROUTE"===t.tagName,be=class{constructor(n){t(this,n),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=c(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let n=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(me).map(((e,i)=>{const r=lt(t.pathname,{path:e.url,exact:e.exact,strict:!0});return r&&-1===n&&(n=i),{el:e,match:r}})),-1===n)return;if(this.activeIndex===n)return void(this.subscribers[n].el.match=this.subscribers[n].match);this.activeIndex=n;const e=this.subscribers[this.activeIndex];this.scrollTopOffset&&(e.el.scrollTopOffset=this.scrollTopOffset),e.el.group=this.group,e.el.match=e.match,e.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,n)=>{if(t.el.componentUpdated=void 0,n===this.activeIndex)return t.el.style.display="";this.scrollTopOffset&&(t.el.scrollTopOffset=this.scrollTopOffset),t.el.group=this.group,t.el.match=null,t.el.style.display="none"}))})),this.routeViewsUpdated&&this.routeViewsUpdated(Object.assign({scrollTopOffset:this.scrollTopOffset},t))}}render(){return n("slot",null)}get el(){return a(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};A.injectProps(be,["location","routeViewsUpdated"]);const ge=(t,...n)=>{t||console.warn(...n)},we=()=>{let t,n=[];return{setPrompt:n=>(ge(null==t,"A history supports only one prompt at a time"),t=n,()=>{t===n&&(t=null)}),confirmTransitionTo:(n,e,i,r)=>{if(null!=t){const o="function"==typeof t?t(n,e):t;"string"==typeof o?"function"==typeof i?i(o,r):(ge(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==o)}else r(!0)},appendListener:t=>{let e=!0;const i=(...n)=>{e&&t(...n)};return n.push(i),()=>{e=!1,n=n.filter((t=>t!==i))}},notifyListeners:(...t)=>{n.forEach((n=>n(...t)))}}},ye=(t,n="scrollPositions")=>{let e=new Map;const i=(n,i)=>{if(e.set(n,i),pe(t,"sessionStorage")){const n=[];e.forEach(((t,e)=>{n.push([e,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(n))}};if(pe(t,"sessionStorage")){const i=t.sessionStorage.getItem(n);e=i?new Map(JSON.parse(i)):e}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:i,get:t=>e.get(t),has:t=>e.has(t),capture:n=>{i(n,[t.scrollX,t.scrollY])}}},xe={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+nt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:nt,decodePath:tt},slash:{encodePath:tt,decodePath:tt}},ke=(t,n)=>{const e=0==t.pathname.indexOf(n)?"/"+t.pathname.slice(n.length):t.pathname;return Object.assign({},t,{pathname:e})},Se={browser:(t,n={})=>{let e=!1;const i=t.history,r=t.location,o=t.navigator,s=(t=>{const n=t.navigator.userAgent;return(-1===n.indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&t.history&&"pushState"in t.history})(t),a=!(-1===o.userAgent.indexOf("Trident")),c=ye(t),u=null!=n.forceRefresh&&n.forceRefresh,l=null!=n.getUserConfirmation?n.getUserConfirmation:he,f=null!=n.keyLength?n.keyLength:6,d=n.basename?Z(tt(n.basename)):"",h=()=>{try{return t.history.state||{}}catch(t){return{}}},p=t=>{t=t||{};const{key:n,state:e}=t,{pathname:i,search:o,hash:s}=r;let a=i+o+s;return ge(!d||Y(a,d),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+d+'".'),d&&(a=K(a,d)),at(a,e,n||rt(f))},v=we(),m=t=>{c.capture(B.location.key),Object.assign(B,t),B.location.scrollPosition=c.get(B.location.key),B.length=i.length,v.notifyListeners(B.location,B.action)},b=t=>{((t,n)=>void 0===n.state&&-1===t.userAgent.indexOf("CriOS"))(o,t)||w(p(t.state))},g=()=>{w(p(h()))},w=t=>{if(e)e=!1,m();else{const n="POP";v.confirmTransitionTo(t,n,l,(e=>{e?m({action:n,location:t}):y(t)}))}},y=t=>{let n=k.indexOf(B.location.key),i=k.indexOf(t.key);-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,_(r))},x=p(h());let k=[x.key],S=0,C=!1;const A=t=>d+et(t),_=t=>{i.go(t)},q=n=>{S+=n,1===S?(t.addEventListener("popstate",b),a&&t.addEventListener("hashchange",g)):0===S&&(t.removeEventListener("popstate",b),a&&t.removeEventListener("hashchange",g))},B={length:i.length,action:"POP",location:x,createHref:A,push:(t,n)=>{ge(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");const e="PUSH",o=at(t,n,rt(f),B.location);v.confirmTransitionTo(o,e,l,(t=>{if(!t)return;const n=A(o),{key:a,state:c}=o;if(s)if(i.pushState({key:a,state:c},"",n),u)r.href=n;else{const t=k.indexOf(B.location.key),n=k.slice(0,-1===t?0:t+1);n.push(o.key),k=n,m({action:e,location:o})}else ge(void 0===c,"Browser history cannot push state in browsers that do not support HTML5 history"),r.href=n}))},replace:(t,n)=>{ge(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");const e="REPLACE",o=at(t,n,rt(f),B.location);v.confirmTransitionTo(o,e,l,(t=>{if(!t)return;const n=A(o),{key:a,state:c}=o;if(s)if(i.replaceState({key:a,state:c},"",n),u)r.replace(n);else{const t=k.indexOf(B.location.key);-1!==t&&(k[t]=o.key),m({action:e,location:o})}else ge(void 0===c,"Browser history cannot replace state in browsers that do not support HTML5 history"),r.replace(n)}))},go:_,goBack:()=>_(-1),goForward:()=>_(1),block:(t="")=>{const n=v.setPrompt(t);return C||(q(1),C=!0),()=>(C&&(C=!1,q(-1)),n())},listen:t=>{const n=v.appendListener(t);return q(1),()=>{q(-1),n()}},win:t};return B},hash:(t,n={})=>{let e=!1,i=null,r=0,o=!1;const s=t.location,a=t.history,c=-1===t.navigator.userAgent.indexOf("Firefox"),u=null!=n.keyLength?n.keyLength:6,{getUserConfirmation:l=he,hashType:f="slash"}=n,d=n.basename?Z(tt(n.basename)):"",{encodePath:h,decodePath:p}=xe[f],v=()=>{const t=s.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)},m=t=>{const n=s.href.indexOf("#");s.replace(s.href.slice(0,n>=0?n:0)+"#"+t)},b=()=>{let t=p(v());return ge(!d||Y(t,d),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+d+'".'),d&&(t=K(t,d)),at(t,void 0,rt(u))},g=we(),w=t=>{Object.assign(E,t),E.length=a.length,g.notifyListeners(E.location,E.action)},y=()=>{const t=v(),n=h(t);if(t!==n)m(n);else{const t=b(),n=E.location;if(!e&&(r=n).pathname===(o=t).pathname&&r.search===o.search&&r.hash===o.hash&&r.key===o.key&&st(r.state,o.state))return;if(i===et(t))return;i=null,x(t)}var r,o},x=t=>{if(e)e=!1,w();else{const n="POP";g.confirmTransitionTo(t,n,l,(e=>{e?w({action:n,location:t}):k(t)}))}},k=t=>{let n=_.lastIndexOf(et(E.location)),i=_.lastIndexOf(et(t));-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,q(r))},S=v(),C=h(S);S!==C&&m(C);const A=b();let _=[et(A)];const q=t=>{ge(c,"Hash history go(n) causes a full page reload in this browser"),a.go(t)},B=(t,n)=>{r+=n,1===r?t.addEventListener("hashchange",y):0===r&&t.removeEventListener("hashchange",y)},E={length:a.length,action:"POP",location:A,createHref:t=>"#"+h(d+et(t)),push:(t,n)=>{ge(void 0===n,"Hash history cannot push state; it is ignored");const e="PUSH",r=at(t,void 0,rt(u),E.location);g.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),o=h(d+n);if(v()!==o){i=n,(t=>{s.hash=t})(o);const t=_.lastIndexOf(et(E.location)),a=_.slice(0,-1===t?0:t+1);a.push(n),_=a,w({action:e,location:r})}else ge(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),w()}))},replace:(t,n)=>{ge(void 0===n,"Hash history cannot replace state; it is ignored");const e="REPLACE",r=at(t,void 0,rt(u),E.location);g.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),o=h(d+n);v()!==o&&(i=n,m(o));const s=_.indexOf(et(E.location));-1!==s&&(_[s]=n),w({action:e,location:r})}))},go:q,goBack:()=>q(-1),goForward:()=>q(1),block:(n="")=>{const e=g.setPrompt(n);return o||(B(t,1),o=!0),()=>(o&&(o=!1,B(t,-1)),e())},listen:n=>{const e=g.appendListener(n);return B(t,1),()=>{B(t,-1),e()}},win:t};return E}},Ce=class{constructor(n){t(this,n),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const n=this.history.win.document.getElementById(t.scrollToId);if(n)return n.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=c(this,"isServer"),this.queue=c(this,"queue")}componentWillLoad(){this.history=Se[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=ke(t,this.root),this.location=t})),this.location=ke(this.history.location,this.root)}scrollTo(t){const n=this.history;if(null!=t&&!this.isServer&&n)return"POP"===n.action&&Array.isArray(n.location.scrollPosition)?this.queue.write((()=>{n&&n.location&&Array.isArray(n.location.scrollPosition)&&n.win.scrollTo(n.location.scrollPosition[0],n.location.scrollPosition[1])})):this.queue.write((()=>{n.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return n(A.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},n("slot",null))}get el(){return a(this)}},Ae=class{constructor(n){t(this,n),this.stepSubmitSuccess=e(this,"step-completion",7),this.successPageAcknowledged=e(this,"successPageAcknowledged",5),this.initialised=e(this,"initialised",7),this.isAppInitialised=!1}async componentWillLoad(){const t=jt.fromNullable(this.accessToken);if(jt.isNone(t))throw Error("jwt property is missing.");Zt.state.jwt=t;const n=jt.fromNullable(this.backendUrl);if(jt.isNone(n))throw Error("apiBaseUrl property is missing.");Zt.state.apiBaseUrl=jt.some(n.value.replace(/\/$/,"")+"/");const e=jt.fromNullable(this.appBaseUrl);if(jt.isNone(e))throw Error("appBaseUrl property is missing.");Zt.state.appBaseUrl=jt.some(e.value.replace(/\/$/,""));const i=jt.fromNullable(this.slateJoinAppUrl);if(jt.isNone(i))throw Error("Slate join app url property is missing.");Zt.state.slateJoinAppPostUrl=i,Zt.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),Zt.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),Zt.state.hasSuperSelectionBeenSubmitted=!1)}))}async componentDidLoad(){In(),await Zt.loadAppStateAsync(),this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:Zt.accountIdOrDefault,partnerIdOrDefault:Zt.partnerIdOrDefault,profileId:Zt.profileId})}authTokenChanged(t){Zt.state.jwt=jt.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return n(o,{class:"d-flex justify-content-center flex-grow-1"},n("div",{class:"d-flex flex-column justify-content-between"},this.renderAppContent()))}routerBaseUrl(){var t;return(null===(t=this.appBaseUrl)||void 0===t?void 0:t.replace(/\/$/,""))+"/"}renderAppContent(){return n("stencil-router",{root:this.routerBaseUrl()},n("stencil-route-switch",{scrollTopOffset:0},n("div",{class:"d-flex flex-column"},n("div",{class:"d-flex justify-content-center"},this.isAppInitialised?en:n("fl-loading-indicator",{class:"mt-5"})),n("div",{class:"d-flex justify-content-center"},n("sss-footer-section",null)))))}static get watchers(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}}};H(Ae),Ae.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}stencil-route{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto}stencil-route:empty{display:none}";var _e,qe=[],Be="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(_e||(_e={}));var Ee,je=function(t){return Object.freeze(t)},Ie=function(t,n){this.inlineSize=t,this.blockSize=n,je(this)},Fe=function(){function t(t,n,e,i){return this.x=t,this.y=n,this.width=e,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,je(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(n){return new t(n.x,n.y,n.width,n.height)},t}(),Pe=function(t){return t instanceof SVGElement&&"getBBox"in t},Re=function(t){if(Pe(t)){var n=t.getBBox();return!n.width&&!n.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},Me=function(t){var n,e,i=null===(e=null===(n=t)||void 0===n?void 0:n.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(i&&t instanceof i.Element)},Te="undefined"!=typeof window?window:{},Ne=new WeakMap,De=/auto|scroll/,Oe=/^tb|vertical/,Ue=/msie|trident/i.test(Te.navigator&&Te.navigator.userAgent),Le=function(t){return parseFloat(t||"0")},ze=function(t,n,e){return void 0===t&&(t=0),void 0===n&&(n=0),void 0===e&&(e=!1),new Ie((e?n:t)||0,(e?t:n)||0)},Ve=je({devicePixelContentBoxSize:ze(),borderBoxSize:ze(),contentBoxSize:ze(),contentRect:new Fe(0,0,0,0)}),He=function(t,n){if(void 0===n&&(n=!1),Ne.has(t)&&!n)return Ne.get(t);if(Re(t))return Ne.set(t,Ve),Ve;var e=getComputedStyle(t),i=Pe(t)&&t.ownerSVGElement&&t.getBBox(),r=!Ue&&"border-box"===e.boxSizing,o=Oe.test(e.writingMode||""),s=!i&&De.test(e.overflowY||""),a=!i&&De.test(e.overflowX||""),c=i?0:Le(e.paddingTop),u=i?0:Le(e.paddingRight),l=i?0:Le(e.paddingBottom),f=i?0:Le(e.paddingLeft),d=i?0:Le(e.borderTopWidth),h=i?0:Le(e.borderRightWidth),p=i?0:Le(e.borderBottomWidth),v=f+u,m=c+l,b=(i?0:Le(e.borderLeftWidth))+h,g=d+p,w=a?t.offsetHeight-g-t.clientHeight:0,y=s?t.offsetWidth-b-t.clientWidth:0,x=r?v+b:0,k=r?m+g:0,S=i?i.width:Le(e.width)-x-y,C=i?i.height:Le(e.height)-k-w,A=S+v+y+b,_=C+m+w+g,q=je({devicePixelContentBoxSize:ze(Math.round(S*devicePixelRatio),Math.round(C*devicePixelRatio),o),borderBoxSize:ze(A,_,o),contentBoxSize:ze(S,C,o),contentRect:new Fe(f,c,S,C)});return Ne.set(t,q),q},Qe=function(t,n,e){var i=He(t,e),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(n){case _e.DEVICE_PIXEL_CONTENT_BOX:return s;case _e.BORDER_BOX:return r;default:return o}},We=function(t){var n=He(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=je([n.borderBoxSize]),this.contentBoxSize=je([n.contentBoxSize]),this.devicePixelContentBoxSize=je([n.devicePixelContentBoxSize])},$e=function(t){if(Re(t))return 1/0;for(var n=0,e=t.parentNode;e;)n+=1,e=e.parentNode;return n},Je=function(){var t=1/0,n=[];qe.forEach((function(e){if(0!==e.activeTargets.length){var i=[];e.activeTargets.forEach((function(n){var e=new We(n.target),r=$e(n.target);i.push(e),n.lastReportedSize=Qe(n.target,n.observedBox),r<t&&(t=r)})),n.push((function(){e.callback.call(e.observer,i,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,i=n;e<i.length;e++)(0,i[e])();return t},Xe=function(t){qe.forEach((function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach((function(e){e.isActive()&&($e(e.target)>t?n.activeTargets.push(e):n.skippedTargets.push(e))}))}))},Ge=[],Ye=0,Ke={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ze=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ti=function(t){return void 0===t&&(t=0),Date.now()+t},ni=!1,ei=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var n=this;if(void 0===t&&(t=250),!ni){ni=!0;var e,i=ti(t);e=function(){var e=!1;try{e=function(){var t,n=0;for(Xe(n);qe.some((function(t){return t.activeTargets.length>0}));)n=Je(),Xe(n);return qe.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Be}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Be),window.dispatchEvent(t)),n>0}()}finally{if(ni=!1,t=i-ti(),!Ye)return;e?n.run(1e3):t>0?n.run(t):n.start()}},function(t){if(!Ee){var n=0,e=document.createTextNode("");new MutationObserver((function(){return Ge.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),Ee=function(){e.textContent=""+(n?n--:n++)}}Ge.push(t),Ee()}((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ke)};document.body?n():Te.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ze.forEach((function(n){return Te.addEventListener(n,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ze.forEach((function(n){return Te.removeEventListener(n,t.listener,!0)})),this.stopped=!0)},t}()),ii=function(t){!Ye&&t>0&&ei.start(),!(Ye+=t)&&ei.stop()},ri=function(){function t(t,n){this.target=t,this.observedBox=n||_e.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,n=Qe(this.target,this.observedBox,!0);return Pe(t=this.target)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},t}(),oi=function(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n},si=new WeakMap,ai=function(t,n){for(var e=0;e<t.length;e+=1)if(t[e].target===n)return e;return-1},ci=function(){function t(){}return t.connect=function(t,n){var e=new oi(t,n);si.set(t,e)},t.observe=function(t,n,e){var i=si.get(t),r=0===i.observationTargets.length;ai(i.observationTargets,n)<0&&(r&&qe.push(i),i.observationTargets.push(new ri(n,e&&e.box)),ii(1),ei.schedule())},t.unobserve=function(t,n){var e=si.get(t),i=ai(e.observationTargets,n);i>=0&&(1===e.observationTargets.length&&qe.splice(qe.indexOf(e),1),e.observationTargets.splice(i,1),ii(-1))},t.disconnect=function(t){var n=this,e=si.get(t);e.observationTargets.slice().forEach((function(e){return n.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),ui=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ci.connect(this,t)}return t.prototype.observe=function(t,n){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Me(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ci.observe(this,t,n)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Me(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ci.unobserve(this,t)},t.prototype.disconnect=function(){ci.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const li=new class{constructor(){this._appRootUrl=new V((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await Xt(this.getAppRootUrl()+"config.json").get().json();Zn.update({appConfiguration:jt.fromNullable(t)})}resolveRootUrl(){const t=jt.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(jt.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}};function fi(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function di(t){var n=Object.create;if(n)return n(t);if(null==t)return{};var e=typeof t;if("object"!==e&&"function"!==e)throw new TypeError("Object prototype may only be an Object:"+t);function i(){}return i.prototype=t,new i}var hi,pi,vi=function(t,n){return(vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},mi=fi()||{};pi=function(t,n){function e(){this.constructor=t}vi(t,n),t.prototype=null===n?di(n):(e.prototype=n.prototype,new e)},(hi=mi).__assign||(hi.__assign=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}),hi.__extends||(hi.__extends=pi),__assign||(__assign=mi.__assign),__extends||(__extends=mi.__extends);var bi=fi;function gi(t){var n=bi();return n&&n[t]?n[t]:"window"===t&&wi()?window:null}function wi(){return Boolean("object"==typeof window&&window)}function yi(){return wi()?window:gi("window")}function xi(){return Boolean("object"==typeof document&&document)}function ki(){return xi()?document:gi("document")}function Si(){return Boolean("object"==typeof navigator&&navigator)?navigator:gi("navigator")}function Ci(){return"object"==typeof location&&location?location:gi("location")}function Ai(){return gi("performance")}function _i(){return Boolean("object"==typeof JSON&&JSON||null!==gi("JSON"))}function qi(){return _i()?JSON||gi("JSON"):null}var Bi=null,Ei=!1,ji=123456789,Ii=987654321;function Fi(t){t<0&&(t>>>=0),ji=123456789+t&4294967295,Ii=987654321-t&4294967295,Ei=!0}function Pi(){Fi(4294967296*Math.random()^(new Date).getTime())}function Ri(t,n){return typeof t===n}function Mi(t){return Ri(t,"undefined")||void 0===t}function Ti(t){return Mi(t)||null===t}function Ni(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function Di(t){return Ri(t,"object")}function Oi(t){return Ri(t,"function")}function Ui(t,n,e,i){void 0===i&&(i=!1);var r=!1;if(!Ti(t))try{Ti(t.addEventListener)?Ti(t.attachEvent)||(t.attachEvent("on"+n,e),r=!0):(t.addEventListener(n,e,i),r=!0)}catch(t){}return r}function Li(t,n,e,i){if(void 0===i&&(i=!1),!Ti(t))try{Ti(t.removeEventListener)?Ti(t.detachEvent)||t.detachEvent("on"+n,e):t.removeEventListener(n,e,i)}catch(t){}}function zi(t,n){if(t&&Di(t))for(var e in t)Ni(t,e)&&n.call(t,e,t[e])}var Vi,Hi=function(){function t(){}return t.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},t.isError=function(t){return"[object Error]"===Object.prototype.toString.call(t)},t.isString=function(t){return Ri(t,"string")},t.isNumber=function(t){return Ri(t,"number")},t.isBoolean=function(t){return Ri(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Qi,(function(n){var e=0|t.randomValue(15);return("x"===n?e:3&e|8).toString(16)}))},t.toISOString=function(n){if(t.isDate(n)){var e=function(t){var n=String(t);return 1===n.length&&(n="0"+n),n};return n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},t.arrForEach=function(t,n,e){for(var i=t.length,r=0;r<i;r++)r in t&&n.call(e||t,t[r],r,t)},t.arrIndexOf=function(t,n,e){for(var i=t.length,r=e||0,o=Math.max(r>=0?r:i-Math.abs(r),0);o<i;o++)if(o in t&&t[o]===n)return o;return-1},t.arrMap=function(t,n,e){for(var i=t.length,r=e||t,o=new Array(i),s=0;s<i;s++)s in t&&(o[s]=n.call(r,t[s],t));return o},t.arrReduce=function(t,n,e){var i,r=t.length,o=0;if(arguments.length>=3)i=arguments[2];else{for(;o<r&&!(o in t);)o++;i=t[o++]}for(;o<r;)o in t&&(i=n(i,t[o],o,t)),o++;return i},t.strTrim=function(n){return t.isString(n)?n.replace(/^\s+|\s+$/g,""):n},t.objKeys=function(t){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(Oi(t)||Di(t)&&null!==t))throw new TypeError("objKeys called on non-object");var e=[];for(var i in t)Ni(t,i)&&e.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,s=0;s<o;s++)Ni(t,r[s])&&e.push(r[s]);return e},t.objDefineAccessors=function(t,n,e,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return e&&(o.get=e),i&&(o.set=i),r(t,n,o),!0}catch(t){}return!1},t.addEventHandler=function(t,n){var e=!1,i=yi();i&&(e=Ui(i,t,n),e=Ui(i.body,t,n)||e);var r=ki();return r&&(e=Wi.Attach(r,t,n)||e),e},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var n=Ai();return n&&n.now?n.now():t.dateNow()},t.newId=function(n){void 0===n&&(n=22);for(var e=t.random32()>>>0,i=0,r="";r.length<n;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&e),e>>>=6,5===i&&(e=(t.random32()<<2&4294967295|3&e)>>>0,i=0);return r},t.isIE=function(){if(null===Bi){var t=((Si()||{}).userAgent||"").toLowerCase();Bi=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return Bi},t.randomValue=function(n){return n>0?Math.floor(t.random32()/4294967295*(n+1))>>>0:0},t.random32=function(n){var e,i=gi("crypto")||gi("msCrypto");return i&&i.getRandomValues?e=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(Ei||Pi(),e=4294967295&t.mwcRandom32()):e=Math.floor(4294967296*Math.random()|0),n||(e>>>=0),e},t.mwcRandomSeed=function(t){t?Fi(t):Pi()},t.mwcRandom32=function(t){var n=((Ii=36969*(65535&Ii)+(Ii>>16)&4294967295)<<16)+(65535&(ji=18e3*(65535&ji)+(ji>>16)&4294967295))>>>0&4294967295|0;return t||(n>>>=0),n},t.generateW3CId=function(){for(var n,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(n=t.random32())]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var o=e[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+o+i.substr(16,3)+i.substr(19,12)},t.isTypeof=Ri,t.isUndefined=Mi,t.isNullOrUndefined=Ti,t.hasOwnProperty=Ni,t.isFunction=Oi,t.isObject=Di,t.objCreate=di,t}(),Qi=/[xy]/g,Wi=function(){function t(){}return t.Attach=Ui,t.AttachEvent=Ui,t.Detach=Li,t.DetachEvent=Li,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(Vi||(Vi={}));var $i=Object.getPrototypeOf,Ji=0;
2
2
  /*!
3
3
  * Microsoft Dynamic Proto Utility, 1.1.0
4
4
  * Copyright (c) Microsoft and contributors. All rights reserved.
5
- */function Xi(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function Gi(t){return"function"==typeof t}function Ki(t){return t&&(t===Object.prototype||t===Array.prototype)}function Yi(t){return Ki(t)||t===Function.prototype}function Zi(t){if(t){if($i)return $i(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}function tr(t,n,e){return"constructor"!==n&&Gi(t[n])&&(e||Xi(t,n))}function nr(t){throw new TypeError("DynamicProto: "+t)}function er(t,n){for(var e=t.length-1;e>=0;e--)if(t[e]===n)return!0;return!1}function ir(t,n,e,i){var r=null;if(t&&Xi(e,"_dynClass")){var o=t._dynInstFuncs||{};if((r=(o[e._dynClass]||{})[n])||nr("Missing ["+n+"] function"),!r._dynInstChk&&!1!==o._dynInstChk){for(var s=!Xi(t,n),a=Zi(t),c=[];s&&a&&!Yi(a)&&!er(c,a);){var u=a[n];if(u){s=u===i;break}c.push(a),a=Zi(a)}try{s&&(t[n]=r),r._dynInstChk=1}catch(t){o._dynInstChk=!1}}}return r}function rr(t,n,e){var i=n[t];return i===e&&(i=Zi(n)[t]),Gi(i)||nr("["+t+"] is not a function"),i}function or(t,n){return Xi(t,"prototype")?t.name||n||"_unknown_":((t||{}).constructor||{}).name||n||"_unknown_"}function sr(t,n,e,i){Xi(t,"prototype")||nr("theClass is an invalid class definition.");var r=t.prototype;(function(t,n){for(var e=Zi(n);e&&!Yi(e);){if(e===t)return!0;e=Zi(e)}return!1})(r,n)||nr("["+or(t)+"] is not in class hierarchy of ["+or(n)+"]");var o=null;Xi(r,"_dynClass")?o=r._dynClass:(o="_dynCls$"+or(t,"_")+"$"+Ji,Ji++,r._dynClass=o);var s=sr._dfOpts,a=!!s.useBaseInst;a&&i&&void 0!==i.useBaseInst&&(a=!!i.useBaseInst);var c=function(t){var n={};for(var e in t)!n[e]&&tr(t,e,!1)&&(n[e]=t[e]);return n}(n);e(n,function(t,n,e,i){function r(t,n,e){var r=n[s];if(r._isDynProxy&&i){var o=t._dynInstFuncs||{};!1!==o._dynInstChk&&(r=(o[n._dynClass]||{})[e]||r)}return function(){return r.apply(t,arguments)}}var o={};for(var s in e)o[s]=r(n,e,s);for(var a=Zi(t),c=[];a&&!Yi(a)&&!er(c,a);){for(var s in a)!o[s]&&tr(a,s,!$i)&&(o[s]=r(n,a,s));c.push(a),a=Zi(a)}return o}(r,n,c,a));var u=!!$i&&!!s.setInstFuncs;u&&i&&(u=!!i.setInstFuncs),function(t,n,e,i,r){function o(t,n){var e=function(){return(ir(this,n,t,e)||rr(n,t,e)).apply(this,arguments)};return e._isDynProxy=1,e}if(!Ki(t)){var s=e._dynInstFuncs=e._dynInstFuncs||{},a=s[n]=s[n]||{};for(var c in!1!==s._dynInstChk&&(s._dynInstChk=!!r),e)tr(e,c,!1)&&e[c]!==i[c]&&(a[c]=e[c],delete e[c],(!Xi(t,c)||t[c]&&!t[c]._isDynProxy)&&(t[c]=o(t,c)))}}(r,o,n,c,!1!==u)}function ar(t){return t?'"'+t.replace(/\"/g,"")+'"':""}sr._dfOpts={setInstFuncs:!0,useBaseInst:!0};var cr=function(){function t(t,n,e,i){void 0===e&&(e=!1);var r=this;r.messageId=t,r.message=(e?"AI: ":"AI (Internal): ")+t;var o="";_i()&&(o=qi().stringify(i));var s=(n?" message:"+ar(n):"")+(i?" props:"+ar(o):"");r.message+=s}return t.dataType="MessageData",t}(),ur=function(){function t(n){this.identifier="DiagnosticLogger",this.queue=[];var e=0,i={};sr(t,this,(function(t){var r=Hi.isNullOrUndefined,o=Hi.isUndefined,s=Hi.isFunction;function a(t,e){var i=n[t];return r(i)?e:i}r(n)&&(n={}),t.consoleLoggingLevel=function(){return a("loggingLevelConsole",0)},t.telemetryLoggingLevel=function(){return a("loggingLevelTelemetry",1)},t.maxInternalMessageLimit=function(){return a("maxMessageLimit",25)},t.enableDebugExceptions=function(){return a("enableDebugExceptions",!1)},t.throwInternal=function(n,e,r,s,a){void 0===a&&(a=!1);var c=new cr(e,r,a,s);if(t.enableDebugExceptions())throw c;if(!o(c)&&c&&!o(c.message)){if(a){var u=+c.messageId;!i[u]&&t.consoleLoggingLevel()>=Vi.WARNING&&(t.warnToConsole(c.message),i[u]=!0)}else t.consoleLoggingLevel()>=Vi.WARNING&&t.warnToConsole(c.message);t.logInternalMessage(n,c)}},t.warnToConsole=function(t){var n="undefined"!=typeof console?console:gi("console");if(n){var e="log";n.warn&&(e="warn"),s(n[e])&&n[e](t)}},t.resetInternalMessageCount=function(){e=0,i={}},t.logInternalMessage=function(n,r){if(!(e>=t.maxInternalMessageLimit())){var o=!0,s="AITR_"+r.messageId;if(i[s]?o=!1:i[s]=!0,o&&(n<=t.telemetryLoggingLevel()&&(t.queue.push(r),e++),e===t.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",c=new cr(23,a,!1);t.queue.push(c),t.warnToConsole(a)}}}}))}return t.prototype.enableDebugExceptions=function(){return!1},t.prototype.consoleLoggingLevel=function(){return 0},t.prototype.telemetryLoggingLevel=function(){return 1},t.prototype.maxInternalMessageLimit=function(){return 25},t.prototype.throwInternal=function(){},t.prototype.warnToConsole=function(){},t.prototype.resetInternalMessageCount=function(){},t.prototype.logInternalMessage=function(){},t}(),lr=function(){function t(n,e,i){var r,o=this,s=!1;o.start=Hi.dateNow(),o.name=n,o.isAsync=i,o.isChildEvt=function(){return!1},Hi.isFunction(e)&&(s=Hi.objDefineAccessors(o,"payload",(function(){return!r&&Hi.isFunction(e)&&(r=e(),e=null),r}))),o.getCtx=function(n){return n?n===t.ParentContextKey||n===t.ChildrenContextKey?o[n]:(o.ctx||{})[n]:null},o.setCtx=function(n,e){n&&(n===t.ParentContextKey?(o[n]||(o.isChildEvt=function(){return!0}),o[n]=e):n===t.ChildrenContextKey?o[n]=e:(o.ctx=o.ctx||{})[n]=e)},o.complete=function(){var n=0,i=o.getCtx(t.ChildrenContextKey);if(Hi.isArray(i))for(var r=0;r<i.length;r++){var a=i[r];a&&(n+=a.time)}o.time=Hi.dateNow()-o.start,o.exTime=o.time-n,o.complete=function(){},!s&&Hi.isFunction(e)&&(o.payload=e())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),fr=function(){function t(n){this.ctx={},sr(t,this,(function(t){t.create=function(t,n,e){return new lr(t,n,e)},t.fire=function(t){t&&(t.complete(),n&&n.perfEvent(t))},t.setCtx=function(n,e){n&&((t.ctx=t.ctx||{})[n]=e)},t.getCtx=function(n){return(t.ctx||{})[n]}}))}return t.prototype.create=function(){return null},t.prototype.fire=function(){},t.prototype.setCtx=function(){},t.prototype.getCtx=function(){},t}();function dr(t,n,e,i,r){if(t){var o=t;if(o&&Hi.isFunction(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var s=void 0,a=o.getCtx("CoreUtils.doPerf");try{if(s=o.create(n(),i,r)){if(a&&s.setCtx&&(s.setCtx(lr.ParentContextKey,a),a.getCtx&&a.setCtx)){var c=a.getCtx(lr.ChildrenContextKey);c||a.setCtx(lr.ChildrenContextKey,c=[]),c.push(s)}return o.setCtx("CoreUtils.doPerf",s),e(s)}}catch(t){s&&s.setCtx&&s.setCtx("exception",t)}finally{s&&o.fire(s),o.setCtx("CoreUtils.doPerf",a)}}}return e()}var hr=Hi.isFunction,pr=function(t,n){var e=this,i=null,r=hr(t.processTelemetry),o=hr(t.setNextPlugin);e._hasRun=!1,e.getPlugin=function(){return t},e.getNext=function(){return i},e.setNext=function(t){i=t},e.processTelemetry=function(s,a){a||(a=n);var c=t?t.identifier:"TelemetryPluginChain";dr(a?a.core():null,(function(){return c+":processTelemetry"}),(function(){if(t&&r){e._hasRun=!0;try{a.setNext(i),o&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(s,a)}catch(e){var n=i&&i._hasRun;i&&n||a.diagLog().throwInternal(Vi.CRITICAL,73,"Plugin ["+t.identifier+"] failed during processTelemetry - "+e),i&&!n&&i.processTelemetry(s,a)}}else i&&(e._hasRun=!0,i.processTelemetry(s,a))}),(function(){return{item:s}}),!s.sync)}},vr=Hi.isNullOrUndefined;function mr(t,n){var e=[];if(t&&t.length>0)for(var i=null,r=0;r<t.length;r++){var o=t[r];if(o&&Hi.isFunction(o.processTelemetry)){var s=new pr(o,n);e.push(s),i&&i.setNext(s),i=s}}return e.length>0?e[0]:null}var br=function t(n,e,i,r){var o=this,s=null;null!==r&&(n&&Hi.isFunction(n.getPlugin)?s=function(t,n,e){var i=[],r=!e;if(t)for(;t;){var o=t.getPlugin();(r||o===e)&&(r=!0,i.push(o)),t=t.getNext()}return r||i.push(e),mr(i,n)}(n,o,r||n.getPlugin()):r?s=function(t,n,e){var i=t,r=!1;return e&&t&&(i=[],Hi.arrForEach(t,(function(t){(r||t===e)&&(r=!0,i.push(t))}))),e&&!r&&(i||(i=[]),i.push(e)),mr(i,n)}(n,o,r):Hi.isUndefined(r)&&(s=mr(n,o))),o.core=function(){return i},o.diagLog=function(){var t=(i||{}).logger;return t||(t=new ur(e||{})),t},o.getCfg=function(){return e},o.getExtCfg=function(t,n){var i;if(void 0===n&&(n={}),e){var r=e.extensionConfig;r&&t&&(i=r[t])}return i||n},o.getConfig=function(t,n,i){var r;void 0===i&&(i=!1);var s=o.getExtCfg(t,null);return s&&!vr(s[n])?r=s[n]:e&&!vr(e[n])&&(r=e[n]),vr(r)?i:r},o.hasNext=function(){return null!=s},o.getNext=function(){return s},o.setNext=function(t){s=t},o.processNext=function(t){var n=s;n&&(s=n.getNext(),n.processTelemetry(t,o))},o.createNew=function(n,r){return void 0===n&&(n=null),new t(n||s,e,i,r)}},gr=Hi.isFunction,wr=function(){function t(){var t=this,n=!1,e=null,i=null;t.core=null,t.diagLog=function(n){return t._getTelCtx(n).diagLog()},t.isInitialized=function(){return n},t.setInitialized=function(t){n=t},t.setNextPlugin=function(t){i=t},t.processNext=function(t,n){n?n.processNext(t):i&&gr(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(n){void 0===n&&(n=null);var r=n;r||(r=(e||new br(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return r},t._baseTelInit=function(r,o,s,a){r&&(r.extensionConfig=r.extensionConfig||[]),!a&&o&&(a=o.getProcessTelContext().getNext());var c=i;i&&i.getPlugin&&(c=i.getPlugin()),t.core=o,e=new br(a,r,o,c),n=!0}}return t.prototype.initialize=function(t,n,e,i){this._baseTelInit(t,n,e,i)},t}(),yr=Hi.isFunction;function xr(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&yr(i.setNextPlugin)&&yr(o.processTelemetry)&&i.setNextPlugin(o),yr(o.isInitialized)&&o.isInitialized()||e.push(o),i=o,r=r.getNext())}Hi.arrForEach(e,(function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())}))}function kr(t){return t.sort((function(t,n){var e=0,i=yr(n.processTelemetry);return yr(t.processTelemetry)?e=i?t.priority-n.priority:1:i&&(e=-1),e}))}var Sr=Hi.objDefineAccessors,Cr=function(t){function n(){var e=t.call(this)||this;e.identifier="ChannelControllerPlugin",e.priority=500;var i,r=Hi.arrForEach;function o(t){t&&t.length>0&&(function(t){r(t,(function(t){if(t.priority<500)throw Error("Channel has invalid priority"+t.identifier)}))}(t=t.sort((function(t,n){return t.priority-n.priority}))),i.push(t))}return sr(n,e,(function(t,n){t.setNextPlugin=function(){},t.processTelemetry=function(t,n){i&&r(i,(function(i){i.length>0&&e._getTelCtx(n).createNew(i).processNext(t)}))},t.getChannelControls=function(){return i},t.initialize=function(e,s,a){t.isInitialized()||(n.initialize(e,s,a),e.isCookieUseDisabled&&Hi.disableCookies(),function(t,n){if(i=[],t&&r(t,(function(t){return o(t)})),n){var e=[];r(n,(function(t){t.priority>500&&e.push(t)})),o(e)}}((e||{}).channels,a),r(i,(function(t){return xr(new br(t,e,s),a)})))}})),e}return __extends(n,t),n.prototype.processTelemetry=function(){},n.prototype.getChannelControls=function(){return null},n.prototype.initialize=function(){},n._staticInit=(Sr(n.prototype,"ChannelControls",n.prototype.getChannelControls),void Sr(n.prototype,"channelQueue",n.prototype.getChannelControls)),n}(wr),Ar=Hi.arrForEach,_r=Hi.isNullOrUndefined,qr=function(){function t(){var n,e,i,r,o=!1;sr(t,this,(function(t){t._extensions=new Array,e=new Cr,t.logger=Hi.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),n=[],t.isInitialized=function(){return o},t.initialize=function(n,r,s,a){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!n||_r(n.instrumentationKey))throw Error("Please provide instrumentation key");i=a,t._notificationManager=a,t.config=n||{},n.extensions=_r(n.extensions)?[]:n.extensions,(n.extensionConfig=_r(n.extensionConfig)?{}:n.extensionConfig).NotificationManager=a,s&&(t.logger=s);var c=[];c.push.apply(c,r.concat(n.extensions)),c=kr(c);var u=[],l={};if(Ar(c,(function(t){if(_r(t)||_r(t.initialize))throw Error("Extensions must provide callback to initialize");var n=t.priority,i=t.identifier;t&&n&&(_r(l[n])?l[n]=i:s.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+i)),(!n||n<e.priority)&&u.push(t)})),c.push(e),u.push(e),c=kr(c),t._extensions=c,xr(new br([e],n,t),c),xr(new br(u,n,t),c),t._extensions=u,0===t.getTransmissionControls().length)throw new Error("No channels available");o=!0,t.releaseQueue()},t.getTransmissionControls=function(){return e.getChannelControls()},t.track=function(e){e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=Hi.toISOString(new Date)),_r(e.ver)&&(e.ver="4.0"),t.isInitialized()?t.getProcessTelContext().processNext(e):n.push(e)},t.getProcessTelContext=function(){var n=t._extensions,i=n;return n&&0!==n.length||(i=[e]),new br(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=Hi.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return r||t.config&&t.config.enablePerfMgr&&(r=new fr(t.getNotifyMgr())),r},t.setPerfMgr=function(t){r=t},t.eventCnt=function(){return n.length},t.releaseQueue=function(){n.length>0&&(Ar(n,(function(n){t.getProcessTelContext().processNext(n)})),n=[])}}))}return t.prototype.initialize=function(){},t.prototype.getTransmissionControls=function(){return null},t.prototype.track=function(){},t.prototype.getProcessTelContext=function(){return null},t.prototype.getNotifyMgr=function(){return null},t.prototype.getPerfMgr=function(){return null},t.prototype.setPerfMgr=function(){},t.prototype.eventCnt=function(){return 0},t.prototype.releaseQueue=function(){},t}(),Br=function(){function t(n){this.listeners=[];var e=Hi.arrForEach,i=!!(n||{}).perfEvtsSendAll;sr(t,this,(function(t){t.addNotificationListener=function(n){t.listeners.push(n)},t.removeNotificationListener=function(n){for(var e=Hi.arrIndexOf(t.listeners,n);e>-1;)t.listeners.splice(e,1),e=Hi.arrIndexOf(t.listeners,n)},t.eventsSent=function(n){e(t.listeners,(function(t){t&&t.eventsSent&&setTimeout((function(){return t.eventsSent(n)}),0)}))},t.eventsDiscarded=function(n,i){e(t.listeners,(function(t){t&&t.eventsDiscarded&&setTimeout((function(){return t.eventsDiscarded(n,i)}),0)}))},t.eventsSendRequest=function(n,i){e(t.listeners,(function(t){if(t&&t.eventsSendRequest)if(i)setTimeout((function(){return t.eventsSendRequest(n,i)}),0);else try{t.eventsSendRequest(n,i)}catch(t){}}))},t.perfEvent=function(n){n&&(!i&&n.isChildEvt()||e(t.listeners,(function(t){if(t&&t.perfEvent)if(n.isAsync)setTimeout((function(){return t.perfEvent(n)}),0);else try{t.perfEvent(n)}catch(t){}})))}}))}return t.prototype.addNotificationListener=function(){},t.prototype.removeNotificationListener=function(){},t.prototype.eventsSent=function(){},t.prototype.eventsDiscarded=function(){},t.prototype.eventsSendRequest=function(){},t}(),Er=function(t){function n(){var e=t.call(this)||this;return sr(n,e,(function(t,n){function e(n){var e=t.getNotifyMgr();e&&e.eventsDiscarded([n],2)}t.initialize=function(t,e,i,r){n.initialize(t,e,i||new ur(t),r||new Br(t))},t.track=function(i){dr(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw e(i),Error("Invalid telemetry item");!function(t){if(Hi.isNullOrUndefined(t.name))throw e(t),Error("telemetry name required")}(i),n.track(i)}),(function(){return{item:i}}),!i.sync)},t.addNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.addNotificationListener(n)},t.removeNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.removeNotificationListener(n)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&e>0||(e=1e4),setInterval((function(){var e=t.logger?t.logger.queue:[];Hi.arrForEach(e,(function(e){var i={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:Hi.toISOString(new Date),baseType:cr.dataType,baseData:{message:e.message}};t.track(i)})),e.length=0}),e)}})),e}return __extends(n,t),n.prototype.initialize=function(){},n.prototype.track=function(){},n.prototype.addNotificationListener=function(){},n.prototype.removeNotificationListener=function(){},n.prototype.pollInternalLogs=function(){return 0},n}(qr),jr=["req","rsp","hkErr","fnErr"];function Ir(t,n){if(t)for(var e=0;e<t.length&&!n(t[e],e);e++);}function Fr(t,n,e,i,r){r>=0&&r<=2&&Ir(t,(function(t,o){var s=t.cbks,a=s[jr[r]];if(a){n.ctx=function(){return i[o]=i[o]||{}};try{a.apply(n.inst,e)}catch(t){var c=n.err;try{var u=s[jr[2]];u&&(n.err=t,u.apply(n.inst,e))}catch(t){}finally{n.err=c}}}}))}var Pr,Rr,Mr,Tr=Object.getPrototypeOf;function Nr(t,n,e){var i=null;return t&&(Hi.hasOwnProperty(t,n)?i=t:e&&(i=Nr(function(t){if(t){if(Tr)return Tr(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}(t),n,!1))),i}function Dr(t,n,e,i){if(void 0===i&&(i=!0),t&&n&&e){var r=Nr(t,n,i);if(r){var o=r[n];if("function"==typeof o){var s=o._aiHooks;if(!s){var a=(u=s={i:0,n,f:o,h:[]},function(){var t=this,n=arguments,e=u.h,i={name:u.n,inst:t,ctx:null,set:a},r=[],o=s([i],n);function s(t,n){return Ir(n,(function(n){t.push(n)})),t}function a(t,e){(n=s([],n))[t]=e,o=s([i],n)}Fr(e,i,o,r,0);var c=u.f;try{i.rslt=c.apply(t,n)}catch(t){throw i.err=t,Fr(e,i,o,r,3),t}return Fr(e,i,o,r,1),i.rslt});a._aiHooks=s,r[n]=a}var c={id:s.i,cbks:e,rm:function(){var t=this.id;Ir(s.h,(function(n,e){if(n.id===t)return s.h.splice(e,1),1}))}};return s.i++,s.h.push(c),c}}}var u;return null}!function(t){t[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage"}(Pr||(Pr={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(Rr||(Rr={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(Mr||(Mr={}));var Or,Ur=function(){function t(){}return t.requestContextHeader="Request-Context",t.requestContextTargetKey="appId",t.requestContextAppIdFormat="appId=cid-v1:",t.requestIdHeader="Request-Id",t.traceParentHeader="traceparent",t.sdkContextHeader="Sdk-Context",t.sdkContextHeaderAppIdRequest="appId",t.requestContextHeaderLowerCase="request-context",t}(),Lr=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(n,e,i){var r=e.length,o=t.sanitizeKey(n,e);if(o.length!==r){for(var s=0,a=o;void 0!==i[a];)s++,a=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(s);o=a}return o},t.sanitizeKey=function(n,e){var i;return e&&(e=t.trim(e.toString())).length>t.MAX_NAME_LENGTH&&(i=e.substring(0,t.MAX_NAME_LENGTH),n.throwInternal(Vi.WARNING,57,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},t.sanitizeString=function(n,e,i){var r;return void 0===i&&(i=t.MAX_STRING_LENGTH),e&&(i=i||t.MAX_STRING_LENGTH,(e=t.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),n.throwInternal(Vi.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},t.sanitizeUrl=function(n,e){return t.sanitizeInput(n,e,t.MAX_URL_LENGTH,66)},t.sanitizeMessage=function(n,e){var i;return e&&e.length>t.MAX_MESSAGE_LENGTH&&(i=e.substring(0,t.MAX_MESSAGE_LENGTH),n.throwInternal(Vi.WARNING,56,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},t.sanitizeException=function(n,e){var i;return e&&e.length>t.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,t.MAX_EXCEPTION_LENGTH),n.throwInternal(Vi.WARNING,52,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},t.sanitizeProperties=function(n,e){if(e){var i={};zi(e,(function(e,r){if(Hi.isObject(r)&&_i())try{r=qi().stringify(r)}catch(t){n.throwInternal(Vi.WARNING,49,"custom property is not valid",{exception:t},!0)}r=t.sanitizeString(n,r,t.MAX_PROPERTY_LENGTH),e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeMeasurements=function(n,e){if(e){var i={};zi(e,(function(e,r){e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeId=function(n,e){return e?t.sanitizeInput(n,e,t.MAX_ID_LENGTH,69).toString():e},t.sanitizeInput=function(n,e,i,r){var o;return e&&(e=t.trim(e)).length>i&&(o=e.substring(0,i),n.throwInternal(Vi.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),o||e},t.padNumber=function(t){var n="00"+t;return n.substr(n.length-3)},t.trim=function(t){return Hi.isString(t)?t.replace(/^\s+|\s+$/g,""):t},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}(),zr=Si(),Vr=Hi.isString,Hr=null,Qr=function(){function t(){}return t.createDomEvent=function(t){var n=null;if(Hi.isFunction(Event))n=new Event(t);else{var e=ki();e&&e.createEvent&&(n=e.createEvent("Event")).initEvent(t,!0,!0)}return n},t.disableStorage=function(){t._canUseLocalStorage=!1,t._canUseSessionStorage=!1},t._getLocalStorageObject=function(){return t.canUseLocalStorage()?t._getVerifiedStorageObject(Pr.LocalStorage):null},t._getVerifiedStorageObject=function(t){var n,e,i=null;try{if(Hi.isNullOrUndefined(bi()))return null;e=new Date,(i=gi(t===Pr.LocalStorage?"localStorage":"sessionStorage")).setItem(e.toString(),e.toString()),n=i.getItem(e.toString())!==e.toString(),i.removeItem(e.toString()),n&&(i=null)}catch(t){i=null}return i},t.isInternalApplicationInsightsEndpoint=function(n){return-1!==t._internalEndpoints.indexOf(n.toLowerCase())},t.canUseLocalStorage=function(){return void 0===t._canUseLocalStorage&&(t._canUseLocalStorage=!!t._getVerifiedStorageObject(Pr.LocalStorage)),t._canUseLocalStorage},t.getStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setStorage=function(n,e,i){var r=t._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,3,"Browser failed write to local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,5,"Browser failed removal of local storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t._getSessionStorageObject=function(){return t.canUseSessionStorage()?t._getVerifiedStorageObject(Pr.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(Pr.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var n=[];return t.canUseSessionStorage()&&zi(gi("sessionStorage"),(function(t){n.push(t)})),n},t.getSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setSessionStorage=function(n,e,i){var r=t._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,4,"Browser failed write to session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.disableCookies=function(){Hi.disableCookies()},t.canUseCookies=function(n){if(void 0===Hi._canUseCookies){Hi._canUseCookies=!1;try{Hi._canUseCookies=void 0!==t.document.cookie}catch(e){n.throwInternal(Vi.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(e),{exception:t.dump(e)})}}return Hi._canUseCookies},t.disallowsSameSiteNone=function(t){return!!Vr(t)&&(-1!==t.indexOf("CPU iPhone OS 12")||-1!==t.indexOf("iPad; CPU OS 12")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==t.indexOf("Version/")&&-1!==t.indexOf("Safari")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&"AppleWebKit/605.1.15 (KHTML, like Gecko)"===(n=t).substring((i=(e=n.length)-"AppleWebKit/605.1.15 (KHTML, like Gecko)".length)>=0?i:0,e)||-1!==t.indexOf("Chrome/5")||-1!==t.indexOf("Chrome/6")||-1!==t.indexOf("UnrealEngine")&&-1===t.indexOf("Chrome")||-1!==t.indexOf("UCBrowser/12")||-1!==t.indexOf("UCBrowser/11"));var n,e,i},t.setCookie=function(n,e,i,r){if(t.canUseCookies(n)){var o="",s="";r&&(o=";domain="+r);var a=Ci();a&&"https:"===a.protocol&&(s=";secure",null===Hr&&(Hr=t.disallowsSameSiteNone((Si()||{}).userAgent)),Hr||(i+=";SameSite=None")),t.document.cookie=e+"="+i+o+";path=/"+s}},t.stringToBoolOrDefault=function(t,n){return void 0===n&&(n=!1),null==t?n:"true"===t.toString().toLowerCase()},t.getCookie=function(n,e){if(t.canUseCookies(n)){var i="";if(e&&e.length)for(var r=e+"=",o=t.document.cookie.split(";"),s=0;s<o.length;s++){var a=o[s];if((a=t.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,o[s].length);break}}return i}},t.deleteCookie=function(n,e){t.canUseCookies(n)&&(t.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},t.random32=function(){return Hi.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var n=t?t.toLowerCase():zr?(zr.userAgent||"").toLowerCase():"";if(-1!==n.indexOf("msie"))return parseInt(n.split("msie")[1]);if(n.indexOf("trident/")){var e=parseInt(n.split("trident/")[1]);if(e)return e+4}return null},t.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var n=""+(t=Math.round(t))%1e3,e=""+Math.floor(t/1e3)%60,i=""+Math.floor(t/6e4)%60,r=""+Math.floor(t/36e5)%24,o=Math.floor(t/864e5);return(o>0?o+".":"")+(r=r.length<2?"0"+r:r)+":"+(i=i.length<2?"0"+i:i)+":"+(e=e.length<2?"0"+e:e)+"."+(1===n.length?"00"+n:2===n.length?"0"+n:n)},t.isCrossOriginError=function(t,n,e,i,r){return("Script error."===t||"Script error"===t)&&!r},t.dump=function(t){var n=Object.prototype.toString.call(t),e="";return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":_i()&&(e=qi().stringify(t)),n+e},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,n){return Wi.Attach(yi(),t,n)},t.IsBeaconApiSupported=function(){return"sendBeacon"in zr&&zr.sendBeacon},t.getExtension=function(t,n){for(var e=null,i=0;!e&&i<t.length;)t[i]&&t[i].identifier===n&&(e=t[i]),i++;return e},t.document=ki()||{},t._canUseLocalStorage=void 0,t._canUseSessionStorage=void 0,t._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],t.NotSpecified="not_specified",t.trim=Hi.strTrim,t.newId=Hi.newId,t.generateW3CId=Hi.generateW3CId,t.isArray=Hi.isArray,t.isError=Hi.isError,t.isDate=Hi.isDate,t.toISOStringForIE8=Hi.toISOString,t}(),Wr=function(){function t(){}return t.parseUrl=function(n){var e=t._htmlAnchorIdx,i=t._htmlAnchorElement,r=i[e];return t.document.createElement?i[e]||(r=i[e]=t.document.createElement("a")):r={host:t.parseHost(n,!0)},r.href=n,++e>=i.length&&(e=0),t._htmlAnchorIdx=e,r},t.getAbsoluteUrl=function(n){var e,i=t.parseUrl(n);return i&&(e=i.href),e},t.getPathName=function(n){var e,i=t.parseUrl(n);return i&&(e=i.pathname),e},t.getCompleteUrl=function(t,n){return t?t.toUpperCase()+" "+n:n},t.parseHost=function(n,e){var i=t.parseFullHost(n,e);if(i){var r=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&Vr(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return i},t.parseFullHost=function(t,n){var e=null;if(t){var i=t.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&Vr(i[2])&&i[2].length>0&&(e=i[2]||"",n&&i.length>2)){var r=(i[1]||"").toLowerCase(),o=i[3]||"";("http"===r&&":80"===o||"https"===r&&":443"===o)&&(o=""),e+=o}}return e},t.document=ki()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),$r=function(){function t(){}return t.canIncludeCorrelationHeader=function(t,n,e){if(!n||t&&t.disableCorrelationHeaders)return!1;if(t&&t.correlationHeaderExcludePatterns)for(var i=0;i<t.correlationHeaderExcludePatterns.length;i++)if(t.correlationHeaderExcludePatterns[i].test(n))return!1;var r=Wr.parseUrl(n).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(Wr.parseFullHost(n,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||r===e))return!1;var o,s=t&&t.correlationHeaderDomains;if(s&&(Hi.arrForEach(s,(function(t){var n=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));o=o||n.test(r)})),!o))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(new RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&r.length>0},t.getCorrelationContext=function(n){if(n){var e=t.getCorrelationContextValue(n,Ur.requestContextTargetKey);if(e&&e!==t.correlationIdPrefix)return e}},t.getCorrelationContextValue=function(t,n){if(t)for(var e=t.split(","),i=0;i<e.length;++i){var r=e[i].split("=");if(2===r.length&&r[0]===n)return r[1]}},t.correlationIdPrefix="cid-v1:",t}(),Jr=function(){function t(){}return t.ParseDependencyPath=function(t,n,e,i){var r,o=i,s=i;if(n&&n.length>0){var a=Wr.parseUrl(n);if(r=a.host,!o)if(null!=a.pathname){var c=0===a.pathname.length?"/":a.pathname;"/"!==c.charAt(0)&&(c="/"+c),s=a.pathname,o=Lr.sanitizeString(t,e?e+" "+c:c)}else o=Lr.sanitizeString(t,n)}else r=i,o=i;return{target:r,name:o,data:s}},t}(),Xr=function(){function t(){}return t.Now=function(){var t=Ai();if(t&&t.now&&t.timing){var n=t.now()+t.timing.navigationStart;if(n>0)return n}return(new Date).getTime()},t.GetDuration=function(t,n){var e=null;return 0===t||0===n||Hi.isNullOrUndefined(t)||Hi.isNullOrUndefined(n)||(e=n-t),e},t}(),Gr="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Kr=function(){function t(){}return t.parse=function(n){if(!n)return{};var e=n.split(t._FIELDS_SEPARATOR),i=Hi.arrReduce(e,(function(n,e){var i=e.split(t._FIELD_KEY_VALUE_SEPARATOR);return 2===i.length&&(n[i[0].toLowerCase()]=i[1]),n}),{});return Hi.objKeys(i).length>0&&(i.endpointsuffix&&(i.ingestionendpoint=i.ingestionendpoint||"https://"+(i.location?i.location+".":"")+"dc."+i.endpointsuffix),i.ingestionendpoint=i.ingestionendpoint||"https://dc.services.visualstudio.com"),i},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t}(),Yr=function(t){function n(){return t.call(this)||this}return __extends(n,t),n}((function(){})),Zr=function(t){function n(n,e,i){var r=t.call(this)||this;return r.name=Lr.sanitizeString(n,i)||Qr.NotSpecified,r.data=e,r.time=Hi.toISOString(new Date),r.aiDataContract={time:Rr.Required,iKey:Rr.Required,name:Rr.Required,sampleRate:function(){return 100===r.sampleRate?Rr.Hidden:Rr.Required},tags:Rr.Required,data:Rr.Required},r}return __extends(n,t),n}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),to=function(){},no=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(to),eo=function(t){function n(n,e,i,r){var o=t.call(this)||this;return o.aiDataContract={ver:Rr.Required,name:Rr.Required,properties:Rr.Default,measurements:Rr.Default},o.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,o.properties=Lr.sanitizeProperties(n,i),o.measurements=Lr.sanitizeMeasurements(n,r),o}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(no),io=function(t){function n(n,e,i,r,o,s){var a,c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,exceptions:Rr.Required,severityLevel:Rr.Default,properties:Rr.Default,measurements:Rr.Default},"ver"in(a=e)&&"exceptions"in a&&"properties"in a?(c.exceptions=e.exceptions,c.properties=e.properties,c.measurements=e.measurements,e.severityLevel&&(c.severityLevel=e.severityLevel),e.id&&(c.id=e.id),e.problemGroup&&(c.problemGroup=e.problemGroup),c.ver=2,Hi.isNullOrUndefined(e.isManual)||(c.isManual=e.isManual)):(c.exceptions=[new ro(n,e)],c.properties=Lr.sanitizeProperties(n,i)||{},c.measurements=Lr.sanitizeMeasurements(n,r),o&&(c.severityLevel=o),s&&(c.id=s)),c}return __extends(n,t),n.CreateFromInterface=function(t,e,i,r){var o=e.exceptions&&Hi.arrMap(e.exceptions,(function(n){return ro.CreateFromInterface(t,n)}));return new n(t,__assign({},e,{exceptions:o}),i,r)},n.prototype.toInterface=function(){var t=this,n=t.exceptions,e=t.properties,i=t.measurements,r=t.severityLevel,o=t.problemGroup,s=t.id,a=t.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Hi.arrMap(n,(function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:o,id:s,isManual:a}},n.CreateSimpleException=function(t,n,e,i,r){return{exceptions:[{hasFullStack:!0,message:t,stack:r,typeName:n}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.exceptions=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),ro=function(t){function n(e,i){var r,o=t.call(this)||this;if(o.aiDataContract={id:Rr.Default,outerId:Rr.Default,typeName:Rr.Required,message:Rr.Required,hasFullStack:Rr.Default,stack:Rr.Default,parsedStack:Rr.Array},"hasFullStack"in(r=i)&&"typeName"in r)o.typeName=i.typeName,o.message=i.message,o.stack=i.stack,o.parsedStack=i.parsedStack,o.hasFullStack=i.hasFullStack;else{var s=i;Qr.isError(s)||(s=s.error||s.evt||s),o.typeName=Lr.sanitizeString(e,function(t){var n="";if(t&&!(n=t.typeName||t.name||""))try{var e=/function (.{1,})\(/.exec(t.constructor.toString());n=e&&e.length>1?e[1]:""}catch(t){}return n}(s))||Qr.NotSpecified,o.message=Lr.sanitizeMessage(e,i.message)||Qr.NotSpecified;var a=i.stack;o.parsedStack=n.parseStack(a),o.stack=Lr.sanitizeException(e,a),o.hasFullStack=Qr.isArray(o.parsedStack)&&o.parsedStack.length>0}return o}return __extends(n,t),n.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&Hi.arrMap(this.parsedStack,(function(t){return t.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:t||void 0}},n.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&Hi.arrMap(e.parsedStack,(function(t){return oo.CreateFromInterface(t)}))||e.parsedStack;return new n(t,__assign({},e,{parsedStack:i}))},n.parseStack=function(t){var n;if(Hi.isString(t)){var e=t.split("\n");n=[];for(var i=0,r=0,o=0;o<=e.length;o++)if(oo.regex.test(e[o])){var s=new oo(e[o],i++);r+=s.sizeInBytes,n.push(s)}if(r>32768)for(var a=0,c=n.length-1,u=0,l=a,f=c;a<c;){if((u+=n[a].sizeInBytes+n[c].sizeInBytes)>32768){n.splice(l,f-l+1);break}l=a,f=c,a++,c--}}return n},n}((function(){this.hasFullStack=!0,this.parsedStack=[]})),oo=function(t){function n(e,i){var r=t.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:Rr.Required,method:Rr.Required,assembly:Rr.Default,fileName:Rr.Default,line:Rr.Default},"string"==typeof e){var o=e;r.level=i,r.method="<no_method>",r.assembly=Qr.trim(o),r.fileName="",r.line=0;var s=o.match(n.regex);s&&s.length>=5&&(r.method=Qr.trim(s[2])||r.method,r.fileName=Qr.trim(s[4]),r.line=parseInt(s[5])||0)}else r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=n.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return __extends(n,t),n.CreateFromInterface=function(t){return new n(t,null)},n.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}((function(){})),so=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.metrics=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(to);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(Or||(Or={}));var ao,co=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:Rr.Required,kind:Rr.Default,value:Rr.Required,count:Rr.Default,min:Rr.Default,max:Rr.Default,stdDev:Rr.Default},n}return __extends(n,t),n}((function(){this.kind=Or.Measurement})),uo=function(t){function n(n,e,i,r,o,s,a,c){var u=t.call(this)||this;u.aiDataContract={ver:Rr.Required,metrics:Rr.Required,properties:Rr.Default};var l=new co;return l.count=r>0?r:void 0,l.max=isNaN(s)||null===s?void 0:s,l.min=isNaN(o)||null===o?void 0:o,l.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,l.value=i,u.metrics=[l],u.properties=Lr.sanitizeProperties(n,a),u.measurements=Lr.sanitizeMeasurements(n,c),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",n.dataType="MetricData",n}(so),lo=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(no),fo=function(t){function n(n,e,i,r,o,s,a){var c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,name:Rr.Default,url:Rr.Default,duration:Rr.Default,properties:Rr.Default,measurements:Rr.Default,id:Rr.Default},c.id=Lr.sanitizeId(n,a),c.url=Lr.sanitizeUrl(n,i),c.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,isNaN(r)||(c.duration=Qr.msToTimeSpan(r)),c.properties=Lr.sanitizeProperties(n,o),c.measurements=Lr.sanitizeMeasurements(n,s),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",n.dataType="PageviewData",n}(lo),ho=function(t){function n(n,e,i,r,o,s,a,c,u,l,f,d){void 0===u&&(u="Ajax");var h=t.call(this)||this;h.aiDataContract={id:Rr.Required,ver:Rr.Required,name:Rr.Default,resultCode:Rr.Default,duration:Rr.Default,success:Rr.Default,data:Rr.Default,target:Rr.Default,type:Rr.Default,properties:Rr.Default,measurements:Rr.Default,kind:Rr.Default,value:Rr.Default,count:Rr.Default,min:Rr.Default,max:Rr.Default,stdDev:Rr.Default,dependencyKind:Rr.Default,dependencySource:Rr.Default,commandName:Rr.Default,dependencyTypeName:Rr.Default},h.id=e,h.duration=Qr.msToTimeSpan(o),h.success=s,h.resultCode=a+"",h.type=Lr.sanitizeString(n,u);var p=Jr.ParseDependencyPath(n,i,c,r);return h.data=Lr.sanitizeUrl(n,r)||p.data,h.target=Lr.sanitizeString(n,p.target),l&&(h.target=h.target+" | "+l),h.name=Lr.sanitizeString(n,p.name),h.properties=Lr.sanitizeProperties(n,f),h.measurements=Lr.sanitizeMeasurements(n,d),h}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",n.dataType="RemoteDependencyData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.success=!0,n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),po=function(t){function n(n,e,i,r,o){var s=t.call(this)||this;return s.aiDataContract={ver:Rr.Required,message:Rr.Required,severityLevel:Rr.Default,properties:Rr.Default},s.message=Lr.sanitizeMessage(n,e=e||Qr.NotSpecified),s.properties=Lr.sanitizeProperties(n,r),s.measurements=Lr.sanitizeMeasurements(n,o),i&&(s.severityLevel=i),s}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Message",n.dataType="MessageData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),vo=function(t){function n(n,e,i,r,o,s,a){var c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,name:Rr.Default,url:Rr.Default,duration:Rr.Default,perfTotal:Rr.Default,networkConnect:Rr.Default,sentRequest:Rr.Default,receivedResponse:Rr.Default,domProcessing:Rr.Default,properties:Rr.Default,measurements:Rr.Default},c.url=Lr.sanitizeUrl(n,i),c.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,c.properties=Lr.sanitizeProperties(n,o),c.measurements=Lr.sanitizeMeasurements(n,s),a&&(c.domProcessing=a.domProcessing,c.duration=a.duration,c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",n.dataType="PageviewPerformanceData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(lo)),mo=function(t){function n(n,e){var i=t.call(this)||this;return i.aiDataContract={baseType:Rr.Required,baseData:Rr.Required},i.baseType=n,i.baseData=e,i}return __extends(n,t),n}(Yr);!function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"}(ao||(ao={}));var bo=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},go=function(){function t(){}return t.create=function(t,n,e,i,r,o){if(e=Lr.sanitizeString(i,e)||Qr.NotSpecified,Hi.isNullOrUndefined(t)||Hi.isNullOrUndefined(n)||Hi.isNullOrUndefined(e))throw Error("Input doesn't contain all required fields");var s={name:e,time:Hi.toISOString(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:n,baseData:t};return Hi.isNullOrUndefined(r)||zi(r,(function(t,n){s.data[t]=n})),s},t}(),wo=function(){function t(){}return t.UserExt="user",t.DeviceExt="device",t.TraceExt="trace",t.WebExt="web",t.AppExt="app",t.OSExt="os",t.SessionExt="ses",t.SDKExt="sdk",t}(),yo=new bo,xo=function t(n,e,i,r){sr(t,this,(function(t){var o,s=Hi.arrForEach,a=Hi.isNullOrUndefined,c=null,u=[],l=!1;function f(){i&&s(i.getTransmissionControls(),(function(t){s(t,(function(t){return t.flush(!0)}))}))}i&&(o=i.logger),t.trackPageView=function(t,i){var d=t.name;if(a(d)||"string"!=typeof d){var h=ki();d=t.name=h&&h.title||""}var p=t.uri;if(a(p)||"string"!=typeof p){var v=Ci();p=t.uri=v&&v.href||""}if(!r.isPerformanceTimingSupported())return n.sendPageViewInternal(t,i),f(),void o.throwInternal(Vi.WARNING,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var m,b,g=!1,w=r.getPerformanceTiming().navigationStart;w>0&&(m=Xr.GetDuration(w,+new Date),r.shouldCollectDuration(m)||(m=void 0)),a(i)||a(i.duration)||(b=i.duration),!e&&isNaN(b)||(isNaN(b)&&(i||(i={}),i.duration=m),n.sendPageViewInternal(t,i),f(),g=!0),i||(i={}),u.push((function(){var e=!1;try{if(r.isPerformanceTimingDataReady()){e=!0;var s={name:d,uri:p};r.populatePageViewPerformanceEvent(s),s.isValid||g?(g||(i.duration=s.durationMs,n.sendPageViewInternal(t,i)),l||(n.sendPageViewPerformanceInternal(s,i),l=!0)):(i.duration=m,n.sendPageViewInternal(t,i))}else w>0&&Xr.GetDuration(w,+new Date)>6e4&&(e=!0,g||(i.duration=6e4,n.sendPageViewInternal(t,i)))}catch(t){o.throwInternal(Vi.CRITICAL,38,"trackPageView failed on page load calculation: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}return e})),c||(c=setInterval((function(){var t=u.slice(0),n=!1;u=[],s(t,(function(t){t()?n=!0:u.push(t)})),0===u.length&&(clearInterval(c),c=null),n&&f()}),100))}}))},ko=function(){function t(t,n){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=n,this._logger=t}return t.prototype.trackPreviousPageVisit=function(t,n){try{var e=this.restartPageVisitTimer(t,n);e&&this.pageVisitTimeTrackingHandler(e.pageName,e.pageUrl,e.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Qr.dump(t))}},t.prototype.restartPageVisitTimer=function(t,n){try{var e=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),e}catch(t){return this._logger.warnToConsole("Call to restart failed: "+Qr.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(Qr.canUseSessionStorage()){if(null!=Qr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var e=new So(t,n),i=qi().stringify(e);Qr.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+Qr.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(Qr.canUseSessionStorage()){var t=Hi.dateNow(),n=Qr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(n&&_i()){var e=qi().parse(n);return e.pageVisitTime=t-e.pageVisitStartTime,Qr.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),e}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+Qr.dump(t)),null}},t}(),So=function(t,n){this.pageVisitStartTime=Hi.dateNow(),this.pageName=t,this.pageUrl=n},Co=function(){function t(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}return t.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var n=this.getPerformanceNavigationTiming(),e=this.getPerformanceTiming();if(n||e){if(n)var i=n.duration,r=Xr.GetDuration(n.startTime,n.connectEnd),o=Xr.GetDuration(n.requestStart,n.responseStart),s=Xr.GetDuration(n.responseStart,n.responseEnd),a=Xr.GetDuration(n.responseEnd,n.loadEventEnd);else i=Xr.GetDuration(e.navigationStart,e.loadEventEnd),r=Xr.GetDuration(e.navigationStart,e.connectEnd),o=Xr.GetDuration(e.requestStart,e.responseStart),s=Xr.GetDuration(e.responseStart,e.responseEnd),a=Xr.GetDuration(e.responseEnd,e.loadEventEnd);0===i?this._logger.throwInternal(Vi.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:o,response:s,dom:a}):this.shouldCollectDuration(i,r,o,s,a)?i<Math.floor(r)+Math.floor(o)+Math.floor(s)+Math.floor(a)?this._logger.throwInternal(Vi.WARNING,8,"client performance math error.",{total:i,network:r,request:o,response:s,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=Qr.msToTimeSpan(i),t.networkConnect=Qr.msToTimeSpan(r),t.sentRequest=Qr.msToTimeSpan(o),t.receivedResponse=Qr.msToTimeSpan(s),t.domProcessing=Qr.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(Vi.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:o,response:s,dom:a})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?Ai().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?Ai().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=Ai();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=Ai();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=Ai(),n=t?t.timing:0;return n&&n.domainLookupStart>0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},t.prototype.shouldCollectDuration=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=Si()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=e.userAgent,o=!1;if(r)for(var s=0;s<i.length;s++)o=o||-1!==r.toLowerCase().indexOf(i[s]);if(o)return!1;for(s=0;s<t.length;s++)if(t[s]<0||t[s]>=this.MAX_DURATION_ALLOWED)return!1;return!0},t}();function Ao(t,n){t&&t.dispatchEvent&&n&&t.dispatchEvent(n)}var _o=function(t){function n(){var n=t.call(this)||this;n.identifier="ApplicationInsightsAnalytics",n.priority=180,n.autoRoutePVDelay=500,n._trackAjaxAttempts=0;var e=Ci();return n._prevUri=e&&e.href||"",n}return __extends(n,t),n.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=Qr.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=Qr.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=Qr.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=Qr.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=Qr.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=Qr.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Qr.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Qr.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},n.prototype.processTelemetry=function(t,n){var e=this;dr(this.core,(function(){return e.identifier+":processTelemetry"}),(function(){var i=!1,r=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var o=0;o<r;++o){var s=e._telemetryInitializers[o];if(s)try{if(!1===s.apply(null,[t])){i=!0;break}}catch(t){n.diagLog().throwInternal(Vi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Qr.getExceptionName(t),{exception:Qr.dump(t)},!0)}}i||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},n.prototype.trackEvent=function(t,n){try{var e=go.create(t,eo.dataType,eo.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.WARNING,39,"trackTrace failed, trace will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.stopTrackEvent=function(t,n){try{this._eventTracking.stop(t,void 0,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackTrace=function(t,n){try{var e=go.create(t,po.dataType,po.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.WARNING,39,"trackTrace failed, trace will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackMetric=function(t,n){try{var e=go.create(t,uo.dataType,uo.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,36,"trackMetric failed, metric will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackPageView=function(t,n){try{var e=t||{};this._pageViewManager.trackPageView(e,__assign({},e.properties,e.measurements,n)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,37,"trackPageView failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.sendPageViewInternal=function(t,n,e){var i=ki();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var r=go.create(t,fo.dataType,fo.envelopeType,this.diagLog(),n,e);this.core.track(r),this._trackAjaxAttempts=0},n.prototype.sendPageViewPerformanceInternal=function(t,n,e){var i=go.create(t,vo.dataType,vo.envelopeType,this.diagLog(),n,e);this.core.track(i)},n.prototype.trackPageViewPerformance=function(t,n){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var n=ki();t=n&&n.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.stopTrackPage=function(t,n,e,i){try{if("string"!=typeof t){var r=ki();t=r&&r.title||""}if("string"!=typeof n){var o=Ci();n=o&&o.href||""}this._pageTracking.stop(t,n,e,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.sendExceptionInternal=function(t,n,e){var i=new io(this.diagLog(),t.exception||new Error(Qr.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),r=go.create(i,io.dataType,io.envelopeType,this.diagLog(),n,e);this.core.track(r)},n.prototype.trackException=function(t,n){try{this.sendExceptionInternal(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,35,"trackException failed, exception will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype._onerror=function(t){try{var n={url:t&&t.url||(ki()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(Qr.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(n.url);else{if(!Qr.isError(t.error)){var e="window.onerror@"+n.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=e}this.trackException({exception:t.error,severityLevel:ao.Error},n)}}catch(n){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(Vi.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n),errorString:i})}},n.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype.initialize=function(e,i,r,o){var s=this;if(!this.isInitialized()){if(Hi.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,e,i,r,o),this.setInitialized(!1);var a=this._getTelCtx(),c=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=a.getExtCfg(c);var u=n.getDefaultConfig();void 0!==u&&(zi(u,(function(t,n){s.config[t]=a.getConfig(c,t,n)})),this._globalconfig&&zi(u,(function(t,n){void 0===s._globalconfig[t]&&(s._globalconfig[t]=n)}))),this.config.isCookieUseDisabled&&Qr.disableCookies(),this.config.isStorageUseDisabled&&Qr.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return s.config.accountId||e.accountId},sessionRenewalMs:function(){return s.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return s.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return s.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return s.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return s.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return s.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return s.config.appId||e.appId}};this._pageViewPerformanceManager=new Co(this.core),this._pageViewManager=new xo(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new ko(this.diagLog(),(function(t,n,e){return s.trackPageVisitTime(t,n,e)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new qo(this.diagLog(),"trackEvent"),this._eventTracking.action=function(t,n,e,i){i||(i={}),i.duration=e.toString(),s.trackEvent({name:t,properties:i})},this._pageTracking=new qo(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,n,e,i,r){Hi.isNullOrUndefined(i)&&(i={}),i.duration=e.toString(),s.sendPageViewInternal({name:t,uri:n,properties:i,measurements:r},i)};var f,d=yi(),h=Boolean("object"==typeof history&&history)?history:gi("history"),p=Ci(),v=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&d){var m=d.onerror;d.onerror=function(t,n,e,i,r){var o=m&&m(t,n,e,i,r);return!0!==o&&v._onerror({message:t,url:n,lineNumber:e,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&d){var b=d.onunhandledrejection;d.onunhandledrejection=function(t){var n=b&&b.call(d,t);return!0!==n&&v._onerror({message:t.reason.toString(),error:t.reason instanceof Error?t.reason:new Error(t.reason.toString()),url:p?p.href:"",lineNumber:0,columnNumber:0}),n},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&h&&Hi.isFunction(h.pushState)&&Hi.isFunction(h.replaceState)&&d&&"undefined"!=typeof Event){var g=this;Hi.arrForEach(r,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(s._properties=t)})),h.pushState=(f=h.pushState,function(){var t=f.apply(this,arguments);return Ao(d,Qr.createDomEvent(g.config.namePrefix+"pushState")),Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange")),t}),h.replaceState=function(t){return function(){var n=t.apply(this,arguments);return Ao(d,Qr.createDomEvent(g.config.namePrefix+"replaceState")),Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange")),n}}(h.replaceState),d.addEventListener&&(d.addEventListener(g.config.namePrefix+"popstate",(function(){Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange"))})),d.addEventListener(g.config.namePrefix+"locationchange",(function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=Qr.generateW3CId(),g._properties.context.telemetryTrace.name=p&&p.pathname||"_unknown_"),s._currUri?(s._prevUri=s._currUri,s._currUri=p&&p.href||""):s._currUri=p&&p.href||"",setTimeout(function(t){g.trackPageView({refUri:t,properties:{duration:0}})}.bind(s,s._prevUri),g.autoRoutePVDelay)})))}this.setInitialized(!0)}},n.prototype.trackPageVisitTime=function(t,n,e){this.trackMetric({name:"PageVisitTime",average:e,max:e,min:e,sampleCount:1},{PageName:t,PageUrl:n})},n.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===ho.dataType){var e=t.baseData;if(e)for(var i=0;i<n.length;i++)if(e.target&&e.target.indexOf(n[i])>=0)return!1}return!0}))}},n.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype._sendCORSException=function(t){var n=go.create({message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:t,lineNumber:0,columnNumber:0,error:void 0},io.dataType,io.envelopeType,this.diagLog(),{url:t});this.core.track(n)},n.Version="2.5.10",n}(wr),qo=function(){function t(t,n){this._name=n,this._events={},this._logger=t}return t.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(Vi.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:t},!0),this._events[t]=+new Date},t.prototype.stop=function(t,n,e,i){var r=this._events[t];if(isNaN(r))this._logger.throwInternal(Vi.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var o=+new Date,s=Xr.GetDuration(r,o);this.action(t,n,s,e,i)}delete this._events[t],this._events[t]=void 0},t}(),Bo=function t(n){var e=[];sr(t,this,(function(t){t.enqueue=function(t){e.push(t)},t.count=function(){return e.length},t.clear=function(){e.length=0},t.getItems=function(){return e.slice(0)},t.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},t.markAsSent=function(){t.clear()},t.clearSent=function(){}}))},Eo=function(){function t(n,e){var i,r=!1;sr(t,this,(function(o){var s=u(t.BUFFER_KEY),a=u(t.SENT_BUFFER_KEY);function c(t,n){var e=[];return Hi.arrForEach(n,(function(n){Hi.isFunction(n)||-1!==Hi.arrIndexOf(t,n)||e.push(n)})),e}function u(t){var i=t;try{i=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+i:i;var r=Qr.getSessionStorage(n,i);if(r){var o=qi().parse(r);if(Hi.isString(o)&&(o=qi().parse(o)),o&&Qr.isArray(o))return o}}catch(t){n.throwInternal(Vi.CRITICAL,42," storage key: "+i+", "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}return[]}function l(t,i){var r=t;try{r=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+r:r;var o=JSON.stringify(i);Qr.setSessionStorage(n,r,o)}catch(t){Qr.setSessionStorage(n,r,JSON.stringify([])),n.throwInternal(Vi.WARNING,41," storage key: "+r+", "+Qr.getExceptionName(t)+". Buffer cleared",{exception:Qr.dump(t)})}}(i=s.concat(a)).length>t.MAX_BUFFER_SIZE&&(i.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,[]),l(t.BUFFER_KEY,i),o.enqueue=function(e){i.length>=t.MAX_BUFFER_SIZE?r||(n.throwInternal(Vi.WARNING,67,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(e),l(t.BUFFER_KEY,i))},o.count=function(){return i.length},o.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),r=!1},o.getItems=function(){return i.slice(0)},o.batchPayloads=function(t){return t&&t.length>0?e.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},o.markAsSent=function(e){i=c(e,i),l(t.BUFFER_KEY,i);var r=u(t.SENT_BUFFER_KEY);r instanceof Array&&e instanceof Array&&((r=r.concat(e)).length>t.MAX_BUFFER_SIZE&&(n.throwInternal(Vi.CRITICAL,67,"Sent buffer reached its maximum size: "+r.length,!0),r.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,r))},o.clearSent=function(n){var e=u(t.SENT_BUFFER_KEY);e=c(n,e),l(t.SENT_BUFFER_KEY,e)}}))}return t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}(),jo=Hi.isNullOrUndefined;function Io(t,n,e){return t&&e?(t[n]=e,t[n]):null}var Fo=function(){function t(){}return t.extractPropsAndMeasurements=function(t,n,e){jo(t)||zi(t,(function(t,i){Hi.isNumber(i)?e[t]=i:Hi.isString(i)?n[t]=i:_i()&&(n[t]=qi().stringify(i))}))},t.createEnvelope=function(n,e,i,r){var o=new Zr(n,r,e);Io(o,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(o.time=Hi.toISOString(i.baseData.startTime)),o.iKey=i.iKey;var s=i.iKey.replace(/-/g,"");return o.name=o.name.replace("{0}",s),t.extractPartAExtensions(i,o),i.tags=i.tags||[],o},t.extractPartAExtensions=function(n,e){var i=e.tags=e.tags||{},r=n.ext=n.ext||{},o=n.tags=n.tags||[],s=r.user;s&&(Io(i,yo.userAuthUserId,s.authId),Io(i,yo.userId,s.id||s.localId));var a=r.app;a&&Io(i,yo.sessionId,a.sesId);var c=r.device;c&&(Io(i,yo.deviceId,c.id||c.localId),Io(i,yo.deviceType,c.deviceClass),Io(i,yo.deviceIp,c.ip),Io(i,yo.deviceModel,c.model),Io(i,yo.deviceType,c.deviceType));var u=n.ext.web;if(u){Io(i,yo.deviceLanguage,u.browserLang),Io(i,yo.deviceBrowserVersion,u.browserVer),Io(i,yo.deviceBrowser,u.browser);var l=e.data=e.data||{},f=l.baseData=l.baseData||{},d=f.properties=f.properties||{};Io(d,"domain",u.domain),Io(d,"isManual",u.isManual?"true":null),Io(d,"screenRes",u.screenRes),Io(d,"userConsent",u.userConsent?"true":null)}var h=r.os;h&&Io(i,yo.deviceOS,h.name);var p=r.trace;p&&(Io(i,yo.operationParentId,p.parentID),Io(i,yo.operationName,p.name),Io(i,yo.operationId,p.traceID));for(var v={},m=o.length-1;m>=0;m--)zi(o[m],(function(t,n){v[t]=n})),o.splice(m,1);zi(o,(function(t,n){v[t]=n})),e.tags=__assign({},i,v),e.tags[yo.internalSdkVersion]||(e.tags[yo.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,n){this._logger=t,jo(n.baseData)&&this._logger.throwInternal(Vi.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),Po=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};Fo.extractPropsAndMeasurements(e.data,r,i);var o=e.baseData;if(jo(o))return n.warnToConsole("Invalid input for dependency data"),null;var s=new ho(n,o.id,o.target,o.name,o.duration,o.success,o.responseCode,o.properties&&o.properties["http.method"]?o.properties["http.method"]:"GET",o.type,o.correlationContext,r,i),a=new mo(ho.dataType,s);return Fo.createEnvelope(n,ho.envelopeType,e,a)},n.DependencyEnvelopeCreator=new n,n}(Fo),Ro=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i={},r={};e.baseType!==eo.dataType&&(i.baseTypeSource=e.baseType),e.baseType===eo.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&Fo.extractPropsAndMeasurements(e.baseData,i,r),Fo.extractPropsAndMeasurements(e.data,i,r);var o=new eo(n,e.baseData.name,i,r),s=new mo(eo.dataType,o);return Fo.createEnvelope(n,eo.envelopeType,e,s)},n.EventEnvelopeCreator=new n,n}(Fo),Mo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};Fo.extractPropsAndMeasurements(e.data,r,i);var o=io.CreateFromInterface(n,e.baseData,r,i),s=new mo(io.dataType,o);return Fo.createEnvelope(n,io.envelopeType,e,s)},n.ExceptionEnvelopeCreator=new n,n}(Fo),To=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.properties||{},o=i.measurements||{};Fo.extractPropsAndMeasurements(e.data,r,o);var s=new uo(n,i.name,i.average,i.sampleCount,i.min,i.max,r,o),a=new mo(uo.dataType,s);return Fo.createEnvelope(n,uo.envelopeType,e,a)},n.MetricEnvelopeCreator=new n,n}(Fo),No=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i,r=e.baseData;jo(r)||jo(r.properties)||jo(r.properties.duration)?jo(e.data)||jo(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=r.properties.duration,delete r.properties.duration);var o,s=e.baseData;((e.ext||{}).trace||{}).traceID&&(o=e.ext.trace.traceID);var a=s.id||o,c=s.name,u=s.uri,l=s.properties||{},f=s.measurements||{};jo(s.refUri)||(l.refUri=s.refUri),jo(s.pageType)||(l.pageType=s.pageType),jo(s.isLoggedIn)||(l.isLoggedIn=s.isLoggedIn.toString()),jo(s.properties)||zi(s.properties,(function(t,n){l[t]=n})),Fo.extractPropsAndMeasurements(e.data,l,f);var d=new fo(n,c,u,i,l,f,a),h=new mo(fo.dataType,d);return Fo.createEnvelope(n,fo.envelopeType,e,h)},n.PageViewEnvelopeCreator=new n,n}(Fo),Do=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.name,o=i.uri||i.url,s=i.properties||{},a=i.measurements||{};Fo.extractPropsAndMeasurements(e.data,s,a);var c=new vo(n,r,o,void 0,s,a,i),u=new mo(vo.dataType,c);return Fo.createEnvelope(n,vo.envelopeType,e,u)},n.PageViewPerformanceEnvelopeCreator=new n,n}(Fo),Oo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.message,r=e.baseData.severityLevel,o=e.baseData.properties||{},s=e.baseData.measurements||{};Fo.extractPropsAndMeasurements(e.data,o,s);var a=new po(n,i,r,o,s),c=new mo(po.dataType,a);return Fo.createEnvelope(n,po.envelopeType,e,c)},n.TraceEnvelopeCreator=new n,n}(Fo),Uo=function t(n){sr(t,this,(function(t){function e(t,o){var s={};if(!t)return n.throwInternal(Vi.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:o},!0),s;if(t.__aiCircularRefCheck)return n.throwInternal(Vi.WARNING,50,"Circular reference detected while serializing object",{name:o},!0),s;if(!t.aiDataContract){if("measurements"===o)s=r(t,"number",o);else if("properties"===o)s=r(t,"string",o);else if("tags"===o)s=r(t,"string",o);else if(Qr.isArray(t))s=i(t,o);else{n.throwInternal(Vi.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:o},!0);try{qi().stringify(t),s=t}catch(t){n.throwInternal(Vi.CRITICAL,48,t&&Hi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return s}return t.__aiCircularRefCheck=!0,zi(t.aiDataContract,(function(r,a){var c=Hi.isFunction(a)?a()&Rr.Required:a&Rr.Required,u=Hi.isFunction(a)?a()&Rr.Hidden:a&Rr.Hidden,l=a&Rr.Array,f=void 0!==t[r],d=Hi.isObject(t[r])&&null!==t[r];if(!c||f||l){if(!u){var h;void 0!==(h=d?l?i(t[r],r):e(t[r],r):t[r])&&(s[r]=h)}}else n.throwInternal(Vi.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:r,name:o})})),delete t.__aiCircularRefCheck,s}function i(t,i){var r;if(t)if(Qr.isArray(t)){r=[];for(var o=0;o<t.length;o++){var s=e(t[o],i+"["+o+"]");r.push(s)}}else n.throwInternal(Vi.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(t,e,i){var r;return t&&(r={},zi(t,(function(t,o){if("string"===e)r[t]=void 0===o?"undefined":null===o?"null":o.toString?o.toString():"invalid field: toString() is not defined.";else if("number"===e)if(void 0===o)r[t]="undefined";else if(null===o)r[t]="null";else{var s=parseFloat(o);r[t]=isNaN(s)?"NaN":s}else r[t]="invalid field: "+i+" is of unknown type.",n.throwInternal(Vi.CRITICAL,r[t],null,!0)}))),r}t.serialize=function(t){var i=e(t,"root");try{return qi().stringify(i)}catch(t){n.throwInternal(Vi.CRITICAL,48,t&&Hi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},Lo=function(){function t(){var n=yi(),e=ki(),i=!1,r=!0;sr(t,this,(function(t){try{if(n&&Wi.Attach(n,"online",s)&&(Wi.Attach(n,"offline",a),i=!0),e){var o=e.body||e;Hi.isUndefined(o.ononline)||(o.ononline=s,o.onoffline=a,i=!0)}}catch(t){i=!1}function s(){r=!0}function a(){r=!1}t.isListening=i,t.isOnline=function(){var t=!0,n=Si();return i?t=r:n&&!Hi.isNullOrUndefined(n.onLine)&&(t=n.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,zo=function(){function t(){}return t.prototype.getHashCodeScore=function(n){return this.getHashCode(n)/t.INT_MAX_VALUE*100},t.prototype.getHashCode=function(n){if(""===n)return 0;for(;n.length<t.MIN_INPUT_LENGTH;)n=n.concat(n);for(var e=5381,i=0;i<n.length;++i)e=(e<<5)+e+n.charCodeAt(i),e&=e;return Math.abs(e)},t.INT_MAX_VALUE=2147483647,t.MIN_INPUT_LENGTH=8,t}(),Vo=function(){function t(){this.hashCodeGeneragor=new zo,this.keys=new bo}return t.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},t}(),Ho=function(){function t(t,n){this.INT_MAX_VALUE=2147483647,this._logger=Hi.isNullOrUndefined(n)?new ur:n,(t>100||t<0)&&(this._logger.throwInternal(Vi.WARNING,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new Vo}return t.prototype.isSampledIn=function(t){var n=this.sampleRate;return null==n||n>=100||t.baseType===uo.dataType||this.samplingScoreGenerator.getSamplingScore(t)<n},t}();
5
+ */function Xi(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function Gi(t){return"function"==typeof t}function Yi(t){return t&&(t===Object.prototype||t===Array.prototype)}function Ki(t){return Yi(t)||t===Function.prototype}function Zi(t){if(t){if($i)return $i(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}function tr(t,n,e){return"constructor"!==n&&Gi(t[n])&&(e||Xi(t,n))}function nr(t){throw new TypeError("DynamicProto: "+t)}function er(t,n){for(var e=t.length-1;e>=0;e--)if(t[e]===n)return!0;return!1}function ir(t,n,e,i){var r=null;if(t&&Xi(e,"_dynClass")){var o=t._dynInstFuncs||{};if((r=(o[e._dynClass]||{})[n])||nr("Missing ["+n+"] function"),!r._dynInstChk&&!1!==o._dynInstChk){for(var s=!Xi(t,n),a=Zi(t),c=[];s&&a&&!Ki(a)&&!er(c,a);){var u=a[n];if(u){s=u===i;break}c.push(a),a=Zi(a)}try{s&&(t[n]=r),r._dynInstChk=1}catch(t){o._dynInstChk=!1}}}return r}function rr(t,n,e){var i=n[t];return i===e&&(i=Zi(n)[t]),Gi(i)||nr("["+t+"] is not a function"),i}function or(t,n){return Xi(t,"prototype")?t.name||n||"_unknown_":((t||{}).constructor||{}).name||n||"_unknown_"}function sr(t,n,e,i){Xi(t,"prototype")||nr("theClass is an invalid class definition.");var r=t.prototype;(function(t,n){for(var e=Zi(n);e&&!Ki(e);){if(e===t)return!0;e=Zi(e)}return!1})(r,n)||nr("["+or(t)+"] is not in class hierarchy of ["+or(n)+"]");var o=null;Xi(r,"_dynClass")?o=r._dynClass:(o="_dynCls$"+or(t,"_")+"$"+Ji,Ji++,r._dynClass=o);var s=sr._dfOpts,a=!!s.useBaseInst;a&&i&&void 0!==i.useBaseInst&&(a=!!i.useBaseInst);var c=function(t){var n={};for(var e in t)!n[e]&&tr(t,e,!1)&&(n[e]=t[e]);return n}(n);e(n,function(t,n,e,i){function r(t,n,e){var r=n[s];if(r._isDynProxy&&i){var o=t._dynInstFuncs||{};!1!==o._dynInstChk&&(r=(o[n._dynClass]||{})[e]||r)}return function(){return r.apply(t,arguments)}}var o={};for(var s in e)o[s]=r(n,e,s);for(var a=Zi(t),c=[];a&&!Ki(a)&&!er(c,a);){for(var s in a)!o[s]&&tr(a,s,!$i)&&(o[s]=r(n,a,s));c.push(a),a=Zi(a)}return o}(r,n,c,a));var u=!!$i&&!!s.setInstFuncs;u&&i&&(u=!!i.setInstFuncs),function(t,n,e,i,r){function o(t,n){var e=function(){return(ir(this,n,t,e)||rr(n,t,e)).apply(this,arguments)};return e._isDynProxy=1,e}if(!Yi(t)){var s=e._dynInstFuncs=e._dynInstFuncs||{},a=s[n]=s[n]||{};for(var c in!1!==s._dynInstChk&&(s._dynInstChk=!!r),e)tr(e,c,!1)&&e[c]!==i[c]&&(a[c]=e[c],delete e[c],(!Xi(t,c)||t[c]&&!t[c]._isDynProxy)&&(t[c]=o(t,c)))}}(r,o,n,c,!1!==u)}function ar(t){return t?'"'+t.replace(/\"/g,"")+'"':""}sr._dfOpts={setInstFuncs:!0,useBaseInst:!0};var cr=function(){function t(t,n,e,i){void 0===e&&(e=!1);var r=this;r.messageId=t,r.message=(e?"AI: ":"AI (Internal): ")+t;var o="";_i()&&(o=qi().stringify(i));var s=(n?" message:"+ar(n):"")+(i?" props:"+ar(o):"");r.message+=s}return t.dataType="MessageData",t}(),ur=function(){function t(n){this.identifier="DiagnosticLogger",this.queue=[];var e=0,i={};sr(t,this,(function(t){var r=Hi.isNullOrUndefined,o=Hi.isUndefined,s=Hi.isFunction;function a(t,e){var i=n[t];return r(i)?e:i}r(n)&&(n={}),t.consoleLoggingLevel=function(){return a("loggingLevelConsole",0)},t.telemetryLoggingLevel=function(){return a("loggingLevelTelemetry",1)},t.maxInternalMessageLimit=function(){return a("maxMessageLimit",25)},t.enableDebugExceptions=function(){return a("enableDebugExceptions",!1)},t.throwInternal=function(n,e,r,s,a){void 0===a&&(a=!1);var c=new cr(e,r,a,s);if(t.enableDebugExceptions())throw c;if(!o(c)&&c&&!o(c.message)){if(a){var u=+c.messageId;!i[u]&&t.consoleLoggingLevel()>=Vi.WARNING&&(t.warnToConsole(c.message),i[u]=!0)}else t.consoleLoggingLevel()>=Vi.WARNING&&t.warnToConsole(c.message);t.logInternalMessage(n,c)}},t.warnToConsole=function(t){var n="undefined"!=typeof console?console:gi("console");if(n){var e="log";n.warn&&(e="warn"),s(n[e])&&n[e](t)}},t.resetInternalMessageCount=function(){e=0,i={}},t.logInternalMessage=function(n,r){if(!(e>=t.maxInternalMessageLimit())){var o=!0,s="AITR_"+r.messageId;if(i[s]?o=!1:i[s]=!0,o&&(n<=t.telemetryLoggingLevel()&&(t.queue.push(r),e++),e===t.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",c=new cr(23,a,!1);t.queue.push(c),t.warnToConsole(a)}}}}))}return t.prototype.enableDebugExceptions=function(){return!1},t.prototype.consoleLoggingLevel=function(){return 0},t.prototype.telemetryLoggingLevel=function(){return 1},t.prototype.maxInternalMessageLimit=function(){return 25},t.prototype.throwInternal=function(){},t.prototype.warnToConsole=function(){},t.prototype.resetInternalMessageCount=function(){},t.prototype.logInternalMessage=function(){},t}(),lr=function(){function t(n,e,i){var r,o=this,s=!1;o.start=Hi.dateNow(),o.name=n,o.isAsync=i,o.isChildEvt=function(){return!1},Hi.isFunction(e)&&(s=Hi.objDefineAccessors(o,"payload",(function(){return!r&&Hi.isFunction(e)&&(r=e(),e=null),r}))),o.getCtx=function(n){return n?n===t.ParentContextKey||n===t.ChildrenContextKey?o[n]:(o.ctx||{})[n]:null},o.setCtx=function(n,e){n&&(n===t.ParentContextKey?(o[n]||(o.isChildEvt=function(){return!0}),o[n]=e):n===t.ChildrenContextKey?o[n]=e:(o.ctx=o.ctx||{})[n]=e)},o.complete=function(){var n=0,i=o.getCtx(t.ChildrenContextKey);if(Hi.isArray(i))for(var r=0;r<i.length;r++){var a=i[r];a&&(n+=a.time)}o.time=Hi.dateNow()-o.start,o.exTime=o.time-n,o.complete=function(){},!s&&Hi.isFunction(e)&&(o.payload=e())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),fr=function(){function t(n){this.ctx={},sr(t,this,(function(t){t.create=function(t,n,e){return new lr(t,n,e)},t.fire=function(t){t&&(t.complete(),n&&n.perfEvent(t))},t.setCtx=function(n,e){n&&((t.ctx=t.ctx||{})[n]=e)},t.getCtx=function(n){return(t.ctx||{})[n]}}))}return t.prototype.create=function(){return null},t.prototype.fire=function(){},t.prototype.setCtx=function(){},t.prototype.getCtx=function(){},t}();function dr(t,n,e,i,r){if(t){var o=t;if(o&&Hi.isFunction(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var s=void 0,a=o.getCtx("CoreUtils.doPerf");try{if(s=o.create(n(),i,r)){if(a&&s.setCtx&&(s.setCtx(lr.ParentContextKey,a),a.getCtx&&a.setCtx)){var c=a.getCtx(lr.ChildrenContextKey);c||a.setCtx(lr.ChildrenContextKey,c=[]),c.push(s)}return o.setCtx("CoreUtils.doPerf",s),e(s)}}catch(t){s&&s.setCtx&&s.setCtx("exception",t)}finally{s&&o.fire(s),o.setCtx("CoreUtils.doPerf",a)}}}return e()}var hr=Hi.isFunction,pr=function(t,n){var e=this,i=null,r=hr(t.processTelemetry),o=hr(t.setNextPlugin);e._hasRun=!1,e.getPlugin=function(){return t},e.getNext=function(){return i},e.setNext=function(t){i=t},e.processTelemetry=function(s,a){a||(a=n);var c=t?t.identifier:"TelemetryPluginChain";dr(a?a.core():null,(function(){return c+":processTelemetry"}),(function(){if(t&&r){e._hasRun=!0;try{a.setNext(i),o&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(s,a)}catch(e){var n=i&&i._hasRun;i&&n||a.diagLog().throwInternal(Vi.CRITICAL,73,"Plugin ["+t.identifier+"] failed during processTelemetry - "+e),i&&!n&&i.processTelemetry(s,a)}}else i&&(e._hasRun=!0,i.processTelemetry(s,a))}),(function(){return{item:s}}),!s.sync)}},vr=Hi.isNullOrUndefined;function mr(t,n){var e=[];if(t&&t.length>0)for(var i=null,r=0;r<t.length;r++){var o=t[r];if(o&&Hi.isFunction(o.processTelemetry)){var s=new pr(o,n);e.push(s),i&&i.setNext(s),i=s}}return e.length>0?e[0]:null}var br=function t(n,e,i,r){var o=this,s=null;null!==r&&(n&&Hi.isFunction(n.getPlugin)?s=function(t,n,e){var i=[],r=!e;if(t)for(;t;){var o=t.getPlugin();(r||o===e)&&(r=!0,i.push(o)),t=t.getNext()}return r||i.push(e),mr(i,n)}(n,o,r||n.getPlugin()):r?s=function(t,n,e){var i=t,r=!1;return e&&t&&(i=[],Hi.arrForEach(t,(function(t){(r||t===e)&&(r=!0,i.push(t))}))),e&&!r&&(i||(i=[]),i.push(e)),mr(i,n)}(n,o,r):Hi.isUndefined(r)&&(s=mr(n,o))),o.core=function(){return i},o.diagLog=function(){var t=(i||{}).logger;return t||(t=new ur(e||{})),t},o.getCfg=function(){return e},o.getExtCfg=function(t,n){var i;if(void 0===n&&(n={}),e){var r=e.extensionConfig;r&&t&&(i=r[t])}return i||n},o.getConfig=function(t,n,i){var r;void 0===i&&(i=!1);var s=o.getExtCfg(t,null);return s&&!vr(s[n])?r=s[n]:e&&!vr(e[n])&&(r=e[n]),vr(r)?i:r},o.hasNext=function(){return null!=s},o.getNext=function(){return s},o.setNext=function(t){s=t},o.processNext=function(t){var n=s;n&&(s=n.getNext(),n.processTelemetry(t,o))},o.createNew=function(n,r){return void 0===n&&(n=null),new t(n||s,e,i,r)}},gr=Hi.isFunction,wr=function(){function t(){var t=this,n=!1,e=null,i=null;t.core=null,t.diagLog=function(n){return t._getTelCtx(n).diagLog()},t.isInitialized=function(){return n},t.setInitialized=function(t){n=t},t.setNextPlugin=function(t){i=t},t.processNext=function(t,n){n?n.processNext(t):i&&gr(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(n){void 0===n&&(n=null);var r=n;r||(r=(e||new br(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return r},t._baseTelInit=function(r,o,s,a){r&&(r.extensionConfig=r.extensionConfig||[]),!a&&o&&(a=o.getProcessTelContext().getNext());var c=i;i&&i.getPlugin&&(c=i.getPlugin()),t.core=o,e=new br(a,r,o,c),n=!0}}return t.prototype.initialize=function(t,n,e,i){this._baseTelInit(t,n,e,i)},t}(),yr=Hi.isFunction;function xr(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&yr(i.setNextPlugin)&&yr(o.processTelemetry)&&i.setNextPlugin(o),yr(o.isInitialized)&&o.isInitialized()||e.push(o),i=o,r=r.getNext())}Hi.arrForEach(e,(function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())}))}function kr(t){return t.sort((function(t,n){var e=0,i=yr(n.processTelemetry);return yr(t.processTelemetry)?e=i?t.priority-n.priority:1:i&&(e=-1),e}))}var Sr=Hi.objDefineAccessors,Cr=function(t){function n(){var e=t.call(this)||this;e.identifier="ChannelControllerPlugin",e.priority=500;var i,r=Hi.arrForEach;function o(t){t&&t.length>0&&(function(t){r(t,(function(t){if(t.priority<500)throw Error("Channel has invalid priority"+t.identifier)}))}(t=t.sort((function(t,n){return t.priority-n.priority}))),i.push(t))}return sr(n,e,(function(t,n){t.setNextPlugin=function(){},t.processTelemetry=function(t,n){i&&r(i,(function(i){i.length>0&&e._getTelCtx(n).createNew(i).processNext(t)}))},t.getChannelControls=function(){return i},t.initialize=function(e,s,a){t.isInitialized()||(n.initialize(e,s,a),e.isCookieUseDisabled&&Hi.disableCookies(),function(t,n){if(i=[],t&&r(t,(function(t){return o(t)})),n){var e=[];r(n,(function(t){t.priority>500&&e.push(t)})),o(e)}}((e||{}).channels,a),r(i,(function(t){return xr(new br(t,e,s),a)})))}})),e}return __extends(n,t),n.prototype.processTelemetry=function(){},n.prototype.getChannelControls=function(){return null},n.prototype.initialize=function(){},n._staticInit=(Sr(n.prototype,"ChannelControls",n.prototype.getChannelControls),void Sr(n.prototype,"channelQueue",n.prototype.getChannelControls)),n}(wr),Ar=Hi.arrForEach,_r=Hi.isNullOrUndefined,qr=function(){function t(){var n,e,i,r,o=!1;sr(t,this,(function(t){t._extensions=new Array,e=new Cr,t.logger=Hi.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),n=[],t.isInitialized=function(){return o},t.initialize=function(n,r,s,a){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!n||_r(n.instrumentationKey))throw Error("Please provide instrumentation key");i=a,t._notificationManager=a,t.config=n||{},n.extensions=_r(n.extensions)?[]:n.extensions,(n.extensionConfig=_r(n.extensionConfig)?{}:n.extensionConfig).NotificationManager=a,s&&(t.logger=s);var c=[];c.push.apply(c,r.concat(n.extensions)),c=kr(c);var u=[],l={};if(Ar(c,(function(t){if(_r(t)||_r(t.initialize))throw Error("Extensions must provide callback to initialize");var n=t.priority,i=t.identifier;t&&n&&(_r(l[n])?l[n]=i:s.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+i)),(!n||n<e.priority)&&u.push(t)})),c.push(e),u.push(e),c=kr(c),t._extensions=c,xr(new br([e],n,t),c),xr(new br(u,n,t),c),t._extensions=u,0===t.getTransmissionControls().length)throw new Error("No channels available");o=!0,t.releaseQueue()},t.getTransmissionControls=function(){return e.getChannelControls()},t.track=function(e){e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=Hi.toISOString(new Date)),_r(e.ver)&&(e.ver="4.0"),t.isInitialized()?t.getProcessTelContext().processNext(e):n.push(e)},t.getProcessTelContext=function(){var n=t._extensions,i=n;return n&&0!==n.length||(i=[e]),new br(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=Hi.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return r||t.config&&t.config.enablePerfMgr&&(r=new fr(t.getNotifyMgr())),r},t.setPerfMgr=function(t){r=t},t.eventCnt=function(){return n.length},t.releaseQueue=function(){n.length>0&&(Ar(n,(function(n){t.getProcessTelContext().processNext(n)})),n=[])}}))}return t.prototype.initialize=function(){},t.prototype.getTransmissionControls=function(){return null},t.prototype.track=function(){},t.prototype.getProcessTelContext=function(){return null},t.prototype.getNotifyMgr=function(){return null},t.prototype.getPerfMgr=function(){return null},t.prototype.setPerfMgr=function(){},t.prototype.eventCnt=function(){return 0},t.prototype.releaseQueue=function(){},t}(),Br=function(){function t(n){this.listeners=[];var e=Hi.arrForEach,i=!!(n||{}).perfEvtsSendAll;sr(t,this,(function(t){t.addNotificationListener=function(n){t.listeners.push(n)},t.removeNotificationListener=function(n){for(var e=Hi.arrIndexOf(t.listeners,n);e>-1;)t.listeners.splice(e,1),e=Hi.arrIndexOf(t.listeners,n)},t.eventsSent=function(n){e(t.listeners,(function(t){t&&t.eventsSent&&setTimeout((function(){return t.eventsSent(n)}),0)}))},t.eventsDiscarded=function(n,i){e(t.listeners,(function(t){t&&t.eventsDiscarded&&setTimeout((function(){return t.eventsDiscarded(n,i)}),0)}))},t.eventsSendRequest=function(n,i){e(t.listeners,(function(t){if(t&&t.eventsSendRequest)if(i)setTimeout((function(){return t.eventsSendRequest(n,i)}),0);else try{t.eventsSendRequest(n,i)}catch(t){}}))},t.perfEvent=function(n){n&&(!i&&n.isChildEvt()||e(t.listeners,(function(t){if(t&&t.perfEvent)if(n.isAsync)setTimeout((function(){return t.perfEvent(n)}),0);else try{t.perfEvent(n)}catch(t){}})))}}))}return t.prototype.addNotificationListener=function(){},t.prototype.removeNotificationListener=function(){},t.prototype.eventsSent=function(){},t.prototype.eventsDiscarded=function(){},t.prototype.eventsSendRequest=function(){},t}(),Er=function(t){function n(){var e=t.call(this)||this;return sr(n,e,(function(t,n){function e(n){var e=t.getNotifyMgr();e&&e.eventsDiscarded([n],2)}t.initialize=function(t,e,i,r){n.initialize(t,e,i||new ur(t),r||new Br(t))},t.track=function(i){dr(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw e(i),Error("Invalid telemetry item");!function(t){if(Hi.isNullOrUndefined(t.name))throw e(t),Error("telemetry name required")}(i),n.track(i)}),(function(){return{item:i}}),!i.sync)},t.addNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.addNotificationListener(n)},t.removeNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.removeNotificationListener(n)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&e>0||(e=1e4),setInterval((function(){var e=t.logger?t.logger.queue:[];Hi.arrForEach(e,(function(e){var i={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:Hi.toISOString(new Date),baseType:cr.dataType,baseData:{message:e.message}};t.track(i)})),e.length=0}),e)}})),e}return __extends(n,t),n.prototype.initialize=function(){},n.prototype.track=function(){},n.prototype.addNotificationListener=function(){},n.prototype.removeNotificationListener=function(){},n.prototype.pollInternalLogs=function(){return 0},n}(qr),jr=["req","rsp","hkErr","fnErr"];function Ir(t,n){if(t)for(var e=0;e<t.length&&!n(t[e],e);e++);}function Fr(t,n,e,i,r){r>=0&&r<=2&&Ir(t,(function(t,o){var s=t.cbks,a=s[jr[r]];if(a){n.ctx=function(){return i[o]=i[o]||{}};try{a.apply(n.inst,e)}catch(t){var c=n.err;try{var u=s[jr[2]];u&&(n.err=t,u.apply(n.inst,e))}catch(t){}finally{n.err=c}}}}))}var Pr,Rr,Mr,Tr=Object.getPrototypeOf;function Nr(t,n,e){var i=null;return t&&(Hi.hasOwnProperty(t,n)?i=t:e&&(i=Nr(function(t){if(t){if(Tr)return Tr(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}(t),n,!1))),i}function Dr(t,n,e,i){if(void 0===i&&(i=!0),t&&n&&e){var r=Nr(t,n,i);if(r){var o=r[n];if("function"==typeof o){var s=o._aiHooks;if(!s){var a=(u=s={i:0,n,f:o,h:[]},function(){var t=this,n=arguments,e=u.h,i={name:u.n,inst:t,ctx:null,set:a},r=[],o=s([i],n);function s(t,n){return Ir(n,(function(n){t.push(n)})),t}function a(t,e){(n=s([],n))[t]=e,o=s([i],n)}Fr(e,i,o,r,0);var c=u.f;try{i.rslt=c.apply(t,n)}catch(t){throw i.err=t,Fr(e,i,o,r,3),t}return Fr(e,i,o,r,1),i.rslt});a._aiHooks=s,r[n]=a}var c={id:s.i,cbks:e,rm:function(){var t=this.id;Ir(s.h,(function(n,e){if(n.id===t)return s.h.splice(e,1),1}))}};return s.i++,s.h.push(c),c}}}var u;return null}!function(t){t[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage"}(Pr||(Pr={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(Rr||(Rr={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(Mr||(Mr={}));var Or,Ur=function(){function t(){}return t.requestContextHeader="Request-Context",t.requestContextTargetKey="appId",t.requestContextAppIdFormat="appId=cid-v1:",t.requestIdHeader="Request-Id",t.traceParentHeader="traceparent",t.sdkContextHeader="Sdk-Context",t.sdkContextHeaderAppIdRequest="appId",t.requestContextHeaderLowerCase="request-context",t}(),Lr=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(n,e,i){var r=e.length,o=t.sanitizeKey(n,e);if(o.length!==r){for(var s=0,a=o;void 0!==i[a];)s++,a=o.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(s);o=a}return o},t.sanitizeKey=function(n,e){var i;return e&&(e=t.trim(e.toString())).length>t.MAX_NAME_LENGTH&&(i=e.substring(0,t.MAX_NAME_LENGTH),n.throwInternal(Vi.WARNING,57,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},t.sanitizeString=function(n,e,i){var r;return void 0===i&&(i=t.MAX_STRING_LENGTH),e&&(i=i||t.MAX_STRING_LENGTH,(e=t.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),n.throwInternal(Vi.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},t.sanitizeUrl=function(n,e){return t.sanitizeInput(n,e,t.MAX_URL_LENGTH,66)},t.sanitizeMessage=function(n,e){var i;return e&&e.length>t.MAX_MESSAGE_LENGTH&&(i=e.substring(0,t.MAX_MESSAGE_LENGTH),n.throwInternal(Vi.WARNING,56,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},t.sanitizeException=function(n,e){var i;return e&&e.length>t.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,t.MAX_EXCEPTION_LENGTH),n.throwInternal(Vi.WARNING,52,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},t.sanitizeProperties=function(n,e){if(e){var i={};zi(e,(function(e,r){if(Hi.isObject(r)&&_i())try{r=qi().stringify(r)}catch(t){n.throwInternal(Vi.WARNING,49,"custom property is not valid",{exception:t},!0)}r=t.sanitizeString(n,r,t.MAX_PROPERTY_LENGTH),e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeMeasurements=function(n,e){if(e){var i={};zi(e,(function(e,r){e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeId=function(n,e){return e?t.sanitizeInput(n,e,t.MAX_ID_LENGTH,69).toString():e},t.sanitizeInput=function(n,e,i,r){var o;return e&&(e=t.trim(e)).length>i&&(o=e.substring(0,i),n.throwInternal(Vi.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),o||e},t.padNumber=function(t){var n="00"+t;return n.substr(n.length-3)},t.trim=function(t){return Hi.isString(t)?t.replace(/^\s+|\s+$/g,""):t},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}(),zr=Si(),Vr=Hi.isString,Hr=null,Qr=function(){function t(){}return t.createDomEvent=function(t){var n=null;if(Hi.isFunction(Event))n=new Event(t);else{var e=ki();e&&e.createEvent&&(n=e.createEvent("Event")).initEvent(t,!0,!0)}return n},t.disableStorage=function(){t._canUseLocalStorage=!1,t._canUseSessionStorage=!1},t._getLocalStorageObject=function(){return t.canUseLocalStorage()?t._getVerifiedStorageObject(Pr.LocalStorage):null},t._getVerifiedStorageObject=function(t){var n,e,i=null;try{if(Hi.isNullOrUndefined(bi()))return null;e=new Date,(i=gi(t===Pr.LocalStorage?"localStorage":"sessionStorage")).setItem(e.toString(),e.toString()),n=i.getItem(e.toString())!==e.toString(),i.removeItem(e.toString()),n&&(i=null)}catch(t){i=null}return i},t.isInternalApplicationInsightsEndpoint=function(n){return-1!==t._internalEndpoints.indexOf(n.toLowerCase())},t.canUseLocalStorage=function(){return void 0===t._canUseLocalStorage&&(t._canUseLocalStorage=!!t._getVerifiedStorageObject(Pr.LocalStorage)),t._canUseLocalStorage},t.getStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setStorage=function(n,e,i){var r=t._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,3,"Browser failed write to local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Vi.WARNING,5,"Browser failed removal of local storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t._getSessionStorageObject=function(){return t.canUseSessionStorage()?t._getVerifiedStorageObject(Pr.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(Pr.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var n=[];return t.canUseSessionStorage()&&zi(gi("sessionStorage"),(function(t){n.push(t)})),n},t.getSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setSessionStorage=function(n,e,i){var r=t._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,4,"Browser failed write to session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Vi.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.disableCookies=function(){Hi.disableCookies()},t.canUseCookies=function(n){if(void 0===Hi._canUseCookies){Hi._canUseCookies=!1;try{Hi._canUseCookies=void 0!==t.document.cookie}catch(e){n.throwInternal(Vi.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(e),{exception:t.dump(e)})}}return Hi._canUseCookies},t.disallowsSameSiteNone=function(t){return!!Vr(t)&&(-1!==t.indexOf("CPU iPhone OS 12")||-1!==t.indexOf("iPad; CPU OS 12")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==t.indexOf("Version/")&&-1!==t.indexOf("Safari")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&"AppleWebKit/605.1.15 (KHTML, like Gecko)"===(n=t).substring((i=(e=n.length)-"AppleWebKit/605.1.15 (KHTML, like Gecko)".length)>=0?i:0,e)||-1!==t.indexOf("Chrome/5")||-1!==t.indexOf("Chrome/6")||-1!==t.indexOf("UnrealEngine")&&-1===t.indexOf("Chrome")||-1!==t.indexOf("UCBrowser/12")||-1!==t.indexOf("UCBrowser/11"));var n,e,i},t.setCookie=function(n,e,i,r){if(t.canUseCookies(n)){var o="",s="";r&&(o=";domain="+r);var a=Ci();a&&"https:"===a.protocol&&(s=";secure",null===Hr&&(Hr=t.disallowsSameSiteNone((Si()||{}).userAgent)),Hr||(i+=";SameSite=None")),t.document.cookie=e+"="+i+o+";path=/"+s}},t.stringToBoolOrDefault=function(t,n){return void 0===n&&(n=!1),null==t?n:"true"===t.toString().toLowerCase()},t.getCookie=function(n,e){if(t.canUseCookies(n)){var i="";if(e&&e.length)for(var r=e+"=",o=t.document.cookie.split(";"),s=0;s<o.length;s++){var a=o[s];if((a=t.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,o[s].length);break}}return i}},t.deleteCookie=function(n,e){t.canUseCookies(n)&&(t.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},t.random32=function(){return Hi.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var n=t?t.toLowerCase():zr?(zr.userAgent||"").toLowerCase():"";if(-1!==n.indexOf("msie"))return parseInt(n.split("msie")[1]);if(n.indexOf("trident/")){var e=parseInt(n.split("trident/")[1]);if(e)return e+4}return null},t.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var n=""+(t=Math.round(t))%1e3,e=""+Math.floor(t/1e3)%60,i=""+Math.floor(t/6e4)%60,r=""+Math.floor(t/36e5)%24,o=Math.floor(t/864e5);return(o>0?o+".":"")+(r=r.length<2?"0"+r:r)+":"+(i=i.length<2?"0"+i:i)+":"+(e=e.length<2?"0"+e:e)+"."+(1===n.length?"00"+n:2===n.length?"0"+n:n)},t.isCrossOriginError=function(t,n,e,i,r){return("Script error."===t||"Script error"===t)&&!r},t.dump=function(t){var n=Object.prototype.toString.call(t),e="";return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":_i()&&(e=qi().stringify(t)),n+e},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,n){return Wi.Attach(yi(),t,n)},t.IsBeaconApiSupported=function(){return"sendBeacon"in zr&&zr.sendBeacon},t.getExtension=function(t,n){for(var e=null,i=0;!e&&i<t.length;)t[i]&&t[i].identifier===n&&(e=t[i]),i++;return e},t.document=ki()||{},t._canUseLocalStorage=void 0,t._canUseSessionStorage=void 0,t._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],t.NotSpecified="not_specified",t.trim=Hi.strTrim,t.newId=Hi.newId,t.generateW3CId=Hi.generateW3CId,t.isArray=Hi.isArray,t.isError=Hi.isError,t.isDate=Hi.isDate,t.toISOStringForIE8=Hi.toISOString,t}(),Wr=function(){function t(){}return t.parseUrl=function(n){var e=t._htmlAnchorIdx,i=t._htmlAnchorElement,r=i[e];return t.document.createElement?i[e]||(r=i[e]=t.document.createElement("a")):r={host:t.parseHost(n,!0)},r.href=n,++e>=i.length&&(e=0),t._htmlAnchorIdx=e,r},t.getAbsoluteUrl=function(n){var e,i=t.parseUrl(n);return i&&(e=i.href),e},t.getPathName=function(n){var e,i=t.parseUrl(n);return i&&(e=i.pathname),e},t.getCompleteUrl=function(t,n){return t?t.toUpperCase()+" "+n:n},t.parseHost=function(n,e){var i=t.parseFullHost(n,e);if(i){var r=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&Vr(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return i},t.parseFullHost=function(t,n){var e=null;if(t){var i=t.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&Vr(i[2])&&i[2].length>0&&(e=i[2]||"",n&&i.length>2)){var r=(i[1]||"").toLowerCase(),o=i[3]||"";("http"===r&&":80"===o||"https"===r&&":443"===o)&&(o=""),e+=o}}return e},t.document=ki()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),$r=function(){function t(){}return t.canIncludeCorrelationHeader=function(t,n,e){if(!n||t&&t.disableCorrelationHeaders)return!1;if(t&&t.correlationHeaderExcludePatterns)for(var i=0;i<t.correlationHeaderExcludePatterns.length;i++)if(t.correlationHeaderExcludePatterns[i].test(n))return!1;var r=Wr.parseUrl(n).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(Wr.parseFullHost(n,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||r===e))return!1;var o,s=t&&t.correlationHeaderDomains;if(s&&(Hi.arrForEach(s,(function(t){var n=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));o=o||n.test(r)})),!o))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(new RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&r.length>0},t.getCorrelationContext=function(n){if(n){var e=t.getCorrelationContextValue(n,Ur.requestContextTargetKey);if(e&&e!==t.correlationIdPrefix)return e}},t.getCorrelationContextValue=function(t,n){if(t)for(var e=t.split(","),i=0;i<e.length;++i){var r=e[i].split("=");if(2===r.length&&r[0]===n)return r[1]}},t.correlationIdPrefix="cid-v1:",t}(),Jr=function(){function t(){}return t.ParseDependencyPath=function(t,n,e,i){var r,o=i,s=i;if(n&&n.length>0){var a=Wr.parseUrl(n);if(r=a.host,!o)if(null!=a.pathname){var c=0===a.pathname.length?"/":a.pathname;"/"!==c.charAt(0)&&(c="/"+c),s=a.pathname,o=Lr.sanitizeString(t,e?e+" "+c:c)}else o=Lr.sanitizeString(t,n)}else r=i,o=i;return{target:r,name:o,data:s}},t}(),Xr=function(){function t(){}return t.Now=function(){var t=Ai();if(t&&t.now&&t.timing){var n=t.now()+t.timing.navigationStart;if(n>0)return n}return(new Date).getTime()},t.GetDuration=function(t,n){var e=null;return 0===t||0===n||Hi.isNullOrUndefined(t)||Hi.isNullOrUndefined(n)||(e=n-t),e},t}(),Gr="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Yr=function(){function t(){}return t.parse=function(n){if(!n)return{};var e=n.split(t._FIELDS_SEPARATOR),i=Hi.arrReduce(e,(function(n,e){var i=e.split(t._FIELD_KEY_VALUE_SEPARATOR);return 2===i.length&&(n[i[0].toLowerCase()]=i[1]),n}),{});return Hi.objKeys(i).length>0&&(i.endpointsuffix&&(i.ingestionendpoint=i.ingestionendpoint||"https://"+(i.location?i.location+".":"")+"dc."+i.endpointsuffix),i.ingestionendpoint=i.ingestionendpoint||"https://dc.services.visualstudio.com"),i},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t}(),Kr=function(t){function n(){return t.call(this)||this}return __extends(n,t),n}((function(){})),Zr=function(t){function n(n,e,i){var r=t.call(this)||this;return r.name=Lr.sanitizeString(n,i)||Qr.NotSpecified,r.data=e,r.time=Hi.toISOString(new Date),r.aiDataContract={time:Rr.Required,iKey:Rr.Required,name:Rr.Required,sampleRate:function(){return 100===r.sampleRate?Rr.Hidden:Rr.Required},tags:Rr.Required,data:Rr.Required},r}return __extends(n,t),n}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),to=function(){},no=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(to),eo=function(t){function n(n,e,i,r){var o=t.call(this)||this;return o.aiDataContract={ver:Rr.Required,name:Rr.Required,properties:Rr.Default,measurements:Rr.Default},o.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,o.properties=Lr.sanitizeProperties(n,i),o.measurements=Lr.sanitizeMeasurements(n,r),o}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(no),io=function(t){function n(n,e,i,r,o,s){var a,c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,exceptions:Rr.Required,severityLevel:Rr.Default,properties:Rr.Default,measurements:Rr.Default},"ver"in(a=e)&&"exceptions"in a&&"properties"in a?(c.exceptions=e.exceptions,c.properties=e.properties,c.measurements=e.measurements,e.severityLevel&&(c.severityLevel=e.severityLevel),e.id&&(c.id=e.id),e.problemGroup&&(c.problemGroup=e.problemGroup),c.ver=2,Hi.isNullOrUndefined(e.isManual)||(c.isManual=e.isManual)):(c.exceptions=[new ro(n,e)],c.properties=Lr.sanitizeProperties(n,i)||{},c.measurements=Lr.sanitizeMeasurements(n,r),o&&(c.severityLevel=o),s&&(c.id=s)),c}return __extends(n,t),n.CreateFromInterface=function(t,e,i,r){var o=e.exceptions&&Hi.arrMap(e.exceptions,(function(n){return ro.CreateFromInterface(t,n)}));return new n(t,__assign({},e,{exceptions:o}),i,r)},n.prototype.toInterface=function(){var t=this,n=t.exceptions,e=t.properties,i=t.measurements,r=t.severityLevel,o=t.problemGroup,s=t.id,a=t.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Hi.arrMap(n,(function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:o,id:s,isManual:a}},n.CreateSimpleException=function(t,n,e,i,r){return{exceptions:[{hasFullStack:!0,message:t,stack:r,typeName:n}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.exceptions=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),ro=function(t){function n(e,i){var r,o=t.call(this)||this;if(o.aiDataContract={id:Rr.Default,outerId:Rr.Default,typeName:Rr.Required,message:Rr.Required,hasFullStack:Rr.Default,stack:Rr.Default,parsedStack:Rr.Array},"hasFullStack"in(r=i)&&"typeName"in r)o.typeName=i.typeName,o.message=i.message,o.stack=i.stack,o.parsedStack=i.parsedStack,o.hasFullStack=i.hasFullStack;else{var s=i;Qr.isError(s)||(s=s.error||s.evt||s),o.typeName=Lr.sanitizeString(e,function(t){var n="";if(t&&!(n=t.typeName||t.name||""))try{var e=/function (.{1,})\(/.exec(t.constructor.toString());n=e&&e.length>1?e[1]:""}catch(t){}return n}(s))||Qr.NotSpecified,o.message=Lr.sanitizeMessage(e,i.message)||Qr.NotSpecified;var a=i.stack;o.parsedStack=n.parseStack(a),o.stack=Lr.sanitizeException(e,a),o.hasFullStack=Qr.isArray(o.parsedStack)&&o.parsedStack.length>0}return o}return __extends(n,t),n.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&Hi.arrMap(this.parsedStack,(function(t){return t.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:t||void 0}},n.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&Hi.arrMap(e.parsedStack,(function(t){return oo.CreateFromInterface(t)}))||e.parsedStack;return new n(t,__assign({},e,{parsedStack:i}))},n.parseStack=function(t){var n;if(Hi.isString(t)){var e=t.split("\n");n=[];for(var i=0,r=0,o=0;o<=e.length;o++)if(oo.regex.test(e[o])){var s=new oo(e[o],i++);r+=s.sizeInBytes,n.push(s)}if(r>32768)for(var a=0,c=n.length-1,u=0,l=a,f=c;a<c;){if((u+=n[a].sizeInBytes+n[c].sizeInBytes)>32768){n.splice(l,f-l+1);break}l=a,f=c,a++,c--}}return n},n}((function(){this.hasFullStack=!0,this.parsedStack=[]})),oo=function(t){function n(e,i){var r=t.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:Rr.Required,method:Rr.Required,assembly:Rr.Default,fileName:Rr.Default,line:Rr.Default},"string"==typeof e){var o=e;r.level=i,r.method="<no_method>",r.assembly=Qr.trim(o),r.fileName="",r.line=0;var s=o.match(n.regex);s&&s.length>=5&&(r.method=Qr.trim(s[2])||r.method,r.fileName=Qr.trim(s[4]),r.line=parseInt(s[5])||0)}else r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=n.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return __extends(n,t),n.CreateFromInterface=function(t){return new n(t,null)},n.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}((function(){})),so=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.metrics=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(to);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(Or||(Or={}));var ao,co=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:Rr.Required,kind:Rr.Default,value:Rr.Required,count:Rr.Default,min:Rr.Default,max:Rr.Default,stdDev:Rr.Default},n}return __extends(n,t),n}((function(){this.kind=Or.Measurement})),uo=function(t){function n(n,e,i,r,o,s,a,c){var u=t.call(this)||this;u.aiDataContract={ver:Rr.Required,metrics:Rr.Required,properties:Rr.Default};var l=new co;return l.count=r>0?r:void 0,l.max=isNaN(s)||null===s?void 0:s,l.min=isNaN(o)||null===o?void 0:o,l.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,l.value=i,u.metrics=[l],u.properties=Lr.sanitizeProperties(n,a),u.measurements=Lr.sanitizeMeasurements(n,c),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",n.dataType="MetricData",n}(so),lo=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(no),fo=function(t){function n(n,e,i,r,o,s,a){var c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,name:Rr.Default,url:Rr.Default,duration:Rr.Default,properties:Rr.Default,measurements:Rr.Default,id:Rr.Default},c.id=Lr.sanitizeId(n,a),c.url=Lr.sanitizeUrl(n,i),c.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,isNaN(r)||(c.duration=Qr.msToTimeSpan(r)),c.properties=Lr.sanitizeProperties(n,o),c.measurements=Lr.sanitizeMeasurements(n,s),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",n.dataType="PageviewData",n}(lo),ho=function(t){function n(n,e,i,r,o,s,a,c,u,l,f,d){void 0===u&&(u="Ajax");var h=t.call(this)||this;h.aiDataContract={id:Rr.Required,ver:Rr.Required,name:Rr.Default,resultCode:Rr.Default,duration:Rr.Default,success:Rr.Default,data:Rr.Default,target:Rr.Default,type:Rr.Default,properties:Rr.Default,measurements:Rr.Default,kind:Rr.Default,value:Rr.Default,count:Rr.Default,min:Rr.Default,max:Rr.Default,stdDev:Rr.Default,dependencyKind:Rr.Default,dependencySource:Rr.Default,commandName:Rr.Default,dependencyTypeName:Rr.Default},h.id=e,h.duration=Qr.msToTimeSpan(o),h.success=s,h.resultCode=a+"",h.type=Lr.sanitizeString(n,u);var p=Jr.ParseDependencyPath(n,i,c,r);return h.data=Lr.sanitizeUrl(n,r)||p.data,h.target=Lr.sanitizeString(n,p.target),l&&(h.target=h.target+" | "+l),h.name=Lr.sanitizeString(n,p.name),h.properties=Lr.sanitizeProperties(n,f),h.measurements=Lr.sanitizeMeasurements(n,d),h}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",n.dataType="RemoteDependencyData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.success=!0,n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),po=function(t){function n(n,e,i,r,o){var s=t.call(this)||this;return s.aiDataContract={ver:Rr.Required,message:Rr.Required,severityLevel:Rr.Default,properties:Rr.Default},s.message=Lr.sanitizeMessage(n,e=e||Qr.NotSpecified),s.properties=Lr.sanitizeProperties(n,r),s.measurements=Lr.sanitizeMeasurements(n,o),i&&(s.severityLevel=i),s}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Message",n.dataType="MessageData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(to)),vo=function(t){function n(n,e,i,r,o,s,a){var c=t.call(this)||this;return c.aiDataContract={ver:Rr.Required,name:Rr.Default,url:Rr.Default,duration:Rr.Default,perfTotal:Rr.Default,networkConnect:Rr.Default,sentRequest:Rr.Default,receivedResponse:Rr.Default,domProcessing:Rr.Default,properties:Rr.Default,measurements:Rr.Default},c.url=Lr.sanitizeUrl(n,i),c.name=Lr.sanitizeString(n,e)||Qr.NotSpecified,c.properties=Lr.sanitizeProperties(n,o),c.measurements=Lr.sanitizeMeasurements(n,s),a&&(c.domProcessing=a.domProcessing,c.duration=a.duration,c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",n.dataType="PageviewPerformanceData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(lo)),mo=function(t){function n(n,e){var i=t.call(this)||this;return i.aiDataContract={baseType:Rr.Required,baseData:Rr.Required},i.baseType=n,i.baseData=e,i}return __extends(n,t),n}(Kr);!function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"}(ao||(ao={}));var bo=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},go=function(){function t(){}return t.create=function(t,n,e,i,r,o){if(e=Lr.sanitizeString(i,e)||Qr.NotSpecified,Hi.isNullOrUndefined(t)||Hi.isNullOrUndefined(n)||Hi.isNullOrUndefined(e))throw Error("Input doesn't contain all required fields");var s={name:e,time:Hi.toISOString(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:n,baseData:t};return Hi.isNullOrUndefined(r)||zi(r,(function(t,n){s.data[t]=n})),s},t}(),wo=function(){function t(){}return t.UserExt="user",t.DeviceExt="device",t.TraceExt="trace",t.WebExt="web",t.AppExt="app",t.OSExt="os",t.SessionExt="ses",t.SDKExt="sdk",t}(),yo=new bo,xo=function t(n,e,i,r){sr(t,this,(function(t){var o,s=Hi.arrForEach,a=Hi.isNullOrUndefined,c=null,u=[],l=!1;function f(){i&&s(i.getTransmissionControls(),(function(t){s(t,(function(t){return t.flush(!0)}))}))}i&&(o=i.logger),t.trackPageView=function(t,i){var d=t.name;if(a(d)||"string"!=typeof d){var h=ki();d=t.name=h&&h.title||""}var p=t.uri;if(a(p)||"string"!=typeof p){var v=Ci();p=t.uri=v&&v.href||""}if(!r.isPerformanceTimingSupported())return n.sendPageViewInternal(t,i),f(),void o.throwInternal(Vi.WARNING,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var m,b,g=!1,w=r.getPerformanceTiming().navigationStart;w>0&&(m=Xr.GetDuration(w,+new Date),r.shouldCollectDuration(m)||(m=void 0)),a(i)||a(i.duration)||(b=i.duration),!e&&isNaN(b)||(isNaN(b)&&(i||(i={}),i.duration=m),n.sendPageViewInternal(t,i),f(),g=!0),i||(i={}),u.push((function(){var e=!1;try{if(r.isPerformanceTimingDataReady()){e=!0;var s={name:d,uri:p};r.populatePageViewPerformanceEvent(s),s.isValid||g?(g||(i.duration=s.durationMs,n.sendPageViewInternal(t,i)),l||(n.sendPageViewPerformanceInternal(s,i),l=!0)):(i.duration=m,n.sendPageViewInternal(t,i))}else w>0&&Xr.GetDuration(w,+new Date)>6e4&&(e=!0,g||(i.duration=6e4,n.sendPageViewInternal(t,i)))}catch(t){o.throwInternal(Vi.CRITICAL,38,"trackPageView failed on page load calculation: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}return e})),c||(c=setInterval((function(){var t=u.slice(0),n=!1;u=[],s(t,(function(t){t()?n=!0:u.push(t)})),0===u.length&&(clearInterval(c),c=null),n&&f()}),100))}}))},ko=function(){function t(t,n){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=n,this._logger=t}return t.prototype.trackPreviousPageVisit=function(t,n){try{var e=this.restartPageVisitTimer(t,n);e&&this.pageVisitTimeTrackingHandler(e.pageName,e.pageUrl,e.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Qr.dump(t))}},t.prototype.restartPageVisitTimer=function(t,n){try{var e=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),e}catch(t){return this._logger.warnToConsole("Call to restart failed: "+Qr.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(Qr.canUseSessionStorage()){if(null!=Qr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var e=new So(t,n),i=qi().stringify(e);Qr.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+Qr.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(Qr.canUseSessionStorage()){var t=Hi.dateNow(),n=Qr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(n&&_i()){var e=qi().parse(n);return e.pageVisitTime=t-e.pageVisitStartTime,Qr.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),e}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+Qr.dump(t)),null}},t}(),So=function(t,n){this.pageVisitStartTime=Hi.dateNow(),this.pageName=t,this.pageUrl=n},Co=function(){function t(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}return t.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var n=this.getPerformanceNavigationTiming(),e=this.getPerformanceTiming();if(n||e){if(n)var i=n.duration,r=Xr.GetDuration(n.startTime,n.connectEnd),o=Xr.GetDuration(n.requestStart,n.responseStart),s=Xr.GetDuration(n.responseStart,n.responseEnd),a=Xr.GetDuration(n.responseEnd,n.loadEventEnd);else i=Xr.GetDuration(e.navigationStart,e.loadEventEnd),r=Xr.GetDuration(e.navigationStart,e.connectEnd),o=Xr.GetDuration(e.requestStart,e.responseStart),s=Xr.GetDuration(e.responseStart,e.responseEnd),a=Xr.GetDuration(e.responseEnd,e.loadEventEnd);0===i?this._logger.throwInternal(Vi.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:o,response:s,dom:a}):this.shouldCollectDuration(i,r,o,s,a)?i<Math.floor(r)+Math.floor(o)+Math.floor(s)+Math.floor(a)?this._logger.throwInternal(Vi.WARNING,8,"client performance math error.",{total:i,network:r,request:o,response:s,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=Qr.msToTimeSpan(i),t.networkConnect=Qr.msToTimeSpan(r),t.sentRequest=Qr.msToTimeSpan(o),t.receivedResponse=Qr.msToTimeSpan(s),t.domProcessing=Qr.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(Vi.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:o,response:s,dom:a})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?Ai().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?Ai().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=Ai();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=Ai();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=Ai(),n=t?t.timing:0;return n&&n.domainLookupStart>0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},t.prototype.shouldCollectDuration=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=Si()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=e.userAgent,o=!1;if(r)for(var s=0;s<i.length;s++)o=o||-1!==r.toLowerCase().indexOf(i[s]);if(o)return!1;for(s=0;s<t.length;s++)if(t[s]<0||t[s]>=this.MAX_DURATION_ALLOWED)return!1;return!0},t}();function Ao(t,n){t&&t.dispatchEvent&&n&&t.dispatchEvent(n)}var _o=function(t){function n(){var n=t.call(this)||this;n.identifier="ApplicationInsightsAnalytics",n.priority=180,n.autoRoutePVDelay=500,n._trackAjaxAttempts=0;var e=Ci();return n._prevUri=e&&e.href||"",n}return __extends(n,t),n.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=Qr.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=Qr.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=Qr.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=Qr.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=Qr.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=Qr.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Qr.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Qr.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},n.prototype.processTelemetry=function(t,n){var e=this;dr(this.core,(function(){return e.identifier+":processTelemetry"}),(function(){var i=!1,r=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var o=0;o<r;++o){var s=e._telemetryInitializers[o];if(s)try{if(!1===s.apply(null,[t])){i=!0;break}}catch(t){n.diagLog().throwInternal(Vi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Qr.getExceptionName(t),{exception:Qr.dump(t)},!0)}}i||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},n.prototype.trackEvent=function(t,n){try{var e=go.create(t,eo.dataType,eo.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.WARNING,39,"trackTrace failed, trace will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.stopTrackEvent=function(t,n){try{this._eventTracking.stop(t,void 0,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackTrace=function(t,n){try{var e=go.create(t,po.dataType,po.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.WARNING,39,"trackTrace failed, trace will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackMetric=function(t,n){try{var e=go.create(t,uo.dataType,uo.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,36,"trackMetric failed, metric will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.trackPageView=function(t,n){try{var e=t||{};this._pageViewManager.trackPageView(e,__assign({},e.properties,e.measurements,n)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,37,"trackPageView failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.sendPageViewInternal=function(t,n,e){var i=ki();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var r=go.create(t,fo.dataType,fo.envelopeType,this.diagLog(),n,e);this.core.track(r),this._trackAjaxAttempts=0},n.prototype.sendPageViewPerformanceInternal=function(t,n,e){var i=go.create(t,vo.dataType,vo.envelopeType,this.diagLog(),n,e);this.core.track(i)},n.prototype.trackPageViewPerformance=function(t,n){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var n=ki();t=n&&n.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.stopTrackPage=function(t,n,e,i){try{if("string"!=typeof t){var r=ki();t=r&&r.title||""}if("string"!=typeof n){var o=Ci();n=o&&o.href||""}this._pageTracking.stop(t,n,e,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype.sendExceptionInternal=function(t,n,e){var i=new io(this.diagLog(),t.exception||new Error(Qr.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),r=go.create(i,io.dataType,io.envelopeType,this.diagLog(),n,e);this.core.track(r)},n.prototype.trackException=function(t,n){try{this.sendExceptionInternal(t,n)}catch(t){this.diagLog().throwInternal(Vi.CRITICAL,35,"trackException failed, exception will not be collected: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}},n.prototype._onerror=function(t){try{var n={url:t&&t.url||(ki()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(Qr.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(n.url);else{if(!Qr.isError(t.error)){var e="window.onerror@"+n.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=e}this.trackException({exception:t.error,severityLevel:ao.Error},n)}}catch(n){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(Vi.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n),errorString:i})}},n.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype.initialize=function(e,i,r,o){var s=this;if(!this.isInitialized()){if(Hi.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,e,i,r,o),this.setInitialized(!1);var a=this._getTelCtx(),c=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=a.getExtCfg(c);var u=n.getDefaultConfig();void 0!==u&&(zi(u,(function(t,n){s.config[t]=a.getConfig(c,t,n)})),this._globalconfig&&zi(u,(function(t,n){void 0===s._globalconfig[t]&&(s._globalconfig[t]=n)}))),this.config.isCookieUseDisabled&&Qr.disableCookies(),this.config.isStorageUseDisabled&&Qr.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return s.config.accountId||e.accountId},sessionRenewalMs:function(){return s.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return s.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return s.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return s.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return s.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return s.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return s.config.appId||e.appId}};this._pageViewPerformanceManager=new Co(this.core),this._pageViewManager=new xo(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new ko(this.diagLog(),(function(t,n,e){return s.trackPageVisitTime(t,n,e)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new qo(this.diagLog(),"trackEvent"),this._eventTracking.action=function(t,n,e,i){i||(i={}),i.duration=e.toString(),s.trackEvent({name:t,properties:i})},this._pageTracking=new qo(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,n,e,i,r){Hi.isNullOrUndefined(i)&&(i={}),i.duration=e.toString(),s.sendPageViewInternal({name:t,uri:n,properties:i,measurements:r},i)};var f,d=yi(),h=Boolean("object"==typeof history&&history)?history:gi("history"),p=Ci(),v=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&d){var m=d.onerror;d.onerror=function(t,n,e,i,r){var o=m&&m(t,n,e,i,r);return!0!==o&&v._onerror({message:t,url:n,lineNumber:e,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&d){var b=d.onunhandledrejection;d.onunhandledrejection=function(t){var n=b&&b.call(d,t);return!0!==n&&v._onerror({message:t.reason.toString(),error:t.reason instanceof Error?t.reason:new Error(t.reason.toString()),url:p?p.href:"",lineNumber:0,columnNumber:0}),n},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&h&&Hi.isFunction(h.pushState)&&Hi.isFunction(h.replaceState)&&d&&"undefined"!=typeof Event){var g=this;Hi.arrForEach(r,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(s._properties=t)})),h.pushState=(f=h.pushState,function(){var t=f.apply(this,arguments);return Ao(d,Qr.createDomEvent(g.config.namePrefix+"pushState")),Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange")),t}),h.replaceState=function(t){return function(){var n=t.apply(this,arguments);return Ao(d,Qr.createDomEvent(g.config.namePrefix+"replaceState")),Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange")),n}}(h.replaceState),d.addEventListener&&(d.addEventListener(g.config.namePrefix+"popstate",(function(){Ao(d,Qr.createDomEvent(g.config.namePrefix+"locationchange"))})),d.addEventListener(g.config.namePrefix+"locationchange",(function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=Qr.generateW3CId(),g._properties.context.telemetryTrace.name=p&&p.pathname||"_unknown_"),s._currUri?(s._prevUri=s._currUri,s._currUri=p&&p.href||""):s._currUri=p&&p.href||"",setTimeout(function(t){g.trackPageView({refUri:t,properties:{duration:0}})}.bind(s,s._prevUri),g.autoRoutePVDelay)})))}this.setInitialized(!0)}},n.prototype.trackPageVisitTime=function(t,n,e){this.trackMetric({name:"PageVisitTime",average:e,max:e,min:e,sampleCount:1},{PageName:t,PageUrl:n})},n.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===ho.dataType){var e=t.baseData;if(e)for(var i=0;i<n.length;i++)if(e.target&&e.target.indexOf(n[i])>=0)return!1}return!0}))}},n.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype._sendCORSException=function(t){var n=go.create({message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:t,lineNumber:0,columnNumber:0,error:void 0},io.dataType,io.envelopeType,this.diagLog(),{url:t});this.core.track(n)},n.Version="2.5.10",n}(wr),qo=function(){function t(t,n){this._name=n,this._events={},this._logger=t}return t.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(Vi.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:t},!0),this._events[t]=+new Date},t.prototype.stop=function(t,n,e,i){var r=this._events[t];if(isNaN(r))this._logger.throwInternal(Vi.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var o=+new Date,s=Xr.GetDuration(r,o);this.action(t,n,s,e,i)}delete this._events[t],this._events[t]=void 0},t}(),Bo=function t(n){var e=[];sr(t,this,(function(t){t.enqueue=function(t){e.push(t)},t.count=function(){return e.length},t.clear=function(){e.length=0},t.getItems=function(){return e.slice(0)},t.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},t.markAsSent=function(){t.clear()},t.clearSent=function(){}}))},Eo=function(){function t(n,e){var i,r=!1;sr(t,this,(function(o){var s=u(t.BUFFER_KEY),a=u(t.SENT_BUFFER_KEY);function c(t,n){var e=[];return Hi.arrForEach(n,(function(n){Hi.isFunction(n)||-1!==Hi.arrIndexOf(t,n)||e.push(n)})),e}function u(t){var i=t;try{i=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+i:i;var r=Qr.getSessionStorage(n,i);if(r){var o=qi().parse(r);if(Hi.isString(o)&&(o=qi().parse(o)),o&&Qr.isArray(o))return o}}catch(t){n.throwInternal(Vi.CRITICAL,42," storage key: "+i+", "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}return[]}function l(t,i){var r=t;try{r=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+r:r;var o=JSON.stringify(i);Qr.setSessionStorage(n,r,o)}catch(t){Qr.setSessionStorage(n,r,JSON.stringify([])),n.throwInternal(Vi.WARNING,41," storage key: "+r+", "+Qr.getExceptionName(t)+". Buffer cleared",{exception:Qr.dump(t)})}}(i=s.concat(a)).length>t.MAX_BUFFER_SIZE&&(i.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,[]),l(t.BUFFER_KEY,i),o.enqueue=function(e){i.length>=t.MAX_BUFFER_SIZE?r||(n.throwInternal(Vi.WARNING,67,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(e),l(t.BUFFER_KEY,i))},o.count=function(){return i.length},o.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),r=!1},o.getItems=function(){return i.slice(0)},o.batchPayloads=function(t){return t&&t.length>0?e.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},o.markAsSent=function(e){i=c(e,i),l(t.BUFFER_KEY,i);var r=u(t.SENT_BUFFER_KEY);r instanceof Array&&e instanceof Array&&((r=r.concat(e)).length>t.MAX_BUFFER_SIZE&&(n.throwInternal(Vi.CRITICAL,67,"Sent buffer reached its maximum size: "+r.length,!0),r.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,r))},o.clearSent=function(n){var e=u(t.SENT_BUFFER_KEY);e=c(n,e),l(t.SENT_BUFFER_KEY,e)}}))}return t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}(),jo=Hi.isNullOrUndefined;function Io(t,n,e){return t&&e?(t[n]=e,t[n]):null}var Fo=function(){function t(){}return t.extractPropsAndMeasurements=function(t,n,e){jo(t)||zi(t,(function(t,i){Hi.isNumber(i)?e[t]=i:Hi.isString(i)?n[t]=i:_i()&&(n[t]=qi().stringify(i))}))},t.createEnvelope=function(n,e,i,r){var o=new Zr(n,r,e);Io(o,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(o.time=Hi.toISOString(i.baseData.startTime)),o.iKey=i.iKey;var s=i.iKey.replace(/-/g,"");return o.name=o.name.replace("{0}",s),t.extractPartAExtensions(i,o),i.tags=i.tags||[],o},t.extractPartAExtensions=function(n,e){var i=e.tags=e.tags||{},r=n.ext=n.ext||{},o=n.tags=n.tags||[],s=r.user;s&&(Io(i,yo.userAuthUserId,s.authId),Io(i,yo.userId,s.id||s.localId));var a=r.app;a&&Io(i,yo.sessionId,a.sesId);var c=r.device;c&&(Io(i,yo.deviceId,c.id||c.localId),Io(i,yo.deviceType,c.deviceClass),Io(i,yo.deviceIp,c.ip),Io(i,yo.deviceModel,c.model),Io(i,yo.deviceType,c.deviceType));var u=n.ext.web;if(u){Io(i,yo.deviceLanguage,u.browserLang),Io(i,yo.deviceBrowserVersion,u.browserVer),Io(i,yo.deviceBrowser,u.browser);var l=e.data=e.data||{},f=l.baseData=l.baseData||{},d=f.properties=f.properties||{};Io(d,"domain",u.domain),Io(d,"isManual",u.isManual?"true":null),Io(d,"screenRes",u.screenRes),Io(d,"userConsent",u.userConsent?"true":null)}var h=r.os;h&&Io(i,yo.deviceOS,h.name);var p=r.trace;p&&(Io(i,yo.operationParentId,p.parentID),Io(i,yo.operationName,p.name),Io(i,yo.operationId,p.traceID));for(var v={},m=o.length-1;m>=0;m--)zi(o[m],(function(t,n){v[t]=n})),o.splice(m,1);zi(o,(function(t,n){v[t]=n})),e.tags=__assign({},i,v),e.tags[yo.internalSdkVersion]||(e.tags[yo.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,n){this._logger=t,jo(n.baseData)&&this._logger.throwInternal(Vi.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),Po=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};Fo.extractPropsAndMeasurements(e.data,r,i);var o=e.baseData;if(jo(o))return n.warnToConsole("Invalid input for dependency data"),null;var s=new ho(n,o.id,o.target,o.name,o.duration,o.success,o.responseCode,o.properties&&o.properties["http.method"]?o.properties["http.method"]:"GET",o.type,o.correlationContext,r,i),a=new mo(ho.dataType,s);return Fo.createEnvelope(n,ho.envelopeType,e,a)},n.DependencyEnvelopeCreator=new n,n}(Fo),Ro=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i={},r={};e.baseType!==eo.dataType&&(i.baseTypeSource=e.baseType),e.baseType===eo.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&Fo.extractPropsAndMeasurements(e.baseData,i,r),Fo.extractPropsAndMeasurements(e.data,i,r);var o=new eo(n,e.baseData.name,i,r),s=new mo(eo.dataType,o);return Fo.createEnvelope(n,eo.envelopeType,e,s)},n.EventEnvelopeCreator=new n,n}(Fo),Mo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};Fo.extractPropsAndMeasurements(e.data,r,i);var o=io.CreateFromInterface(n,e.baseData,r,i),s=new mo(io.dataType,o);return Fo.createEnvelope(n,io.envelopeType,e,s)},n.ExceptionEnvelopeCreator=new n,n}(Fo),To=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.properties||{},o=i.measurements||{};Fo.extractPropsAndMeasurements(e.data,r,o);var s=new uo(n,i.name,i.average,i.sampleCount,i.min,i.max,r,o),a=new mo(uo.dataType,s);return Fo.createEnvelope(n,uo.envelopeType,e,a)},n.MetricEnvelopeCreator=new n,n}(Fo),No=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i,r=e.baseData;jo(r)||jo(r.properties)||jo(r.properties.duration)?jo(e.data)||jo(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=r.properties.duration,delete r.properties.duration);var o,s=e.baseData;((e.ext||{}).trace||{}).traceID&&(o=e.ext.trace.traceID);var a=s.id||o,c=s.name,u=s.uri,l=s.properties||{},f=s.measurements||{};jo(s.refUri)||(l.refUri=s.refUri),jo(s.pageType)||(l.pageType=s.pageType),jo(s.isLoggedIn)||(l.isLoggedIn=s.isLoggedIn.toString()),jo(s.properties)||zi(s.properties,(function(t,n){l[t]=n})),Fo.extractPropsAndMeasurements(e.data,l,f);var d=new fo(n,c,u,i,l,f,a),h=new mo(fo.dataType,d);return Fo.createEnvelope(n,fo.envelopeType,e,h)},n.PageViewEnvelopeCreator=new n,n}(Fo),Do=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.name,o=i.uri||i.url,s=i.properties||{},a=i.measurements||{};Fo.extractPropsAndMeasurements(e.data,s,a);var c=new vo(n,r,o,void 0,s,a,i),u=new mo(vo.dataType,c);return Fo.createEnvelope(n,vo.envelopeType,e,u)},n.PageViewPerformanceEnvelopeCreator=new n,n}(Fo),Oo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.message,r=e.baseData.severityLevel,o=e.baseData.properties||{},s=e.baseData.measurements||{};Fo.extractPropsAndMeasurements(e.data,o,s);var a=new po(n,i,r,o,s),c=new mo(po.dataType,a);return Fo.createEnvelope(n,po.envelopeType,e,c)},n.TraceEnvelopeCreator=new n,n}(Fo),Uo=function t(n){sr(t,this,(function(t){function e(t,o){var s={};if(!t)return n.throwInternal(Vi.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:o},!0),s;if(t.__aiCircularRefCheck)return n.throwInternal(Vi.WARNING,50,"Circular reference detected while serializing object",{name:o},!0),s;if(!t.aiDataContract){if("measurements"===o)s=r(t,"number",o);else if("properties"===o)s=r(t,"string",o);else if("tags"===o)s=r(t,"string",o);else if(Qr.isArray(t))s=i(t,o);else{n.throwInternal(Vi.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:o},!0);try{qi().stringify(t),s=t}catch(t){n.throwInternal(Vi.CRITICAL,48,t&&Hi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return s}return t.__aiCircularRefCheck=!0,zi(t.aiDataContract,(function(r,a){var c=Hi.isFunction(a)?a()&Rr.Required:a&Rr.Required,u=Hi.isFunction(a)?a()&Rr.Hidden:a&Rr.Hidden,l=a&Rr.Array,f=void 0!==t[r],d=Hi.isObject(t[r])&&null!==t[r];if(!c||f||l){if(!u){var h;void 0!==(h=d?l?i(t[r],r):e(t[r],r):t[r])&&(s[r]=h)}}else n.throwInternal(Vi.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:r,name:o})})),delete t.__aiCircularRefCheck,s}function i(t,i){var r;if(t)if(Qr.isArray(t)){r=[];for(var o=0;o<t.length;o++){var s=e(t[o],i+"["+o+"]");r.push(s)}}else n.throwInternal(Vi.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(t,e,i){var r;return t&&(r={},zi(t,(function(t,o){if("string"===e)r[t]=void 0===o?"undefined":null===o?"null":o.toString?o.toString():"invalid field: toString() is not defined.";else if("number"===e)if(void 0===o)r[t]="undefined";else if(null===o)r[t]="null";else{var s=parseFloat(o);r[t]=isNaN(s)?"NaN":s}else r[t]="invalid field: "+i+" is of unknown type.",n.throwInternal(Vi.CRITICAL,r[t],null,!0)}))),r}t.serialize=function(t){var i=e(t,"root");try{return qi().stringify(i)}catch(t){n.throwInternal(Vi.CRITICAL,48,t&&Hi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},Lo=function(){function t(){var n=yi(),e=ki(),i=!1,r=!0;sr(t,this,(function(t){try{if(n&&Wi.Attach(n,"online",s)&&(Wi.Attach(n,"offline",a),i=!0),e){var o=e.body||e;Hi.isUndefined(o.ononline)||(o.ononline=s,o.onoffline=a,i=!0)}}catch(t){i=!1}function s(){r=!0}function a(){r=!1}t.isListening=i,t.isOnline=function(){var t=!0,n=Si();return i?t=r:n&&!Hi.isNullOrUndefined(n.onLine)&&(t=n.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,zo=function(){function t(){}return t.prototype.getHashCodeScore=function(n){return this.getHashCode(n)/t.INT_MAX_VALUE*100},t.prototype.getHashCode=function(n){if(""===n)return 0;for(;n.length<t.MIN_INPUT_LENGTH;)n=n.concat(n);for(var e=5381,i=0;i<n.length;++i)e=(e<<5)+e+n.charCodeAt(i),e&=e;return Math.abs(e)},t.INT_MAX_VALUE=2147483647,t.MIN_INPUT_LENGTH=8,t}(),Vo=function(){function t(){this.hashCodeGeneragor=new zo,this.keys=new bo}return t.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},t}(),Ho=function(){function t(t,n){this.INT_MAX_VALUE=2147483647,this._logger=Hi.isNullOrUndefined(n)?new ur:n,(t>100||t<0)&&(this._logger.throwInternal(Vi.WARNING,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new Vo}return t.prototype.isSampledIn=function(t){var n=this.sampleRate;return null==n||n>=100||t.baseType===uo.dataType||this.samplingScoreGenerator.getSamplingScore(t)<n},t}();
6
6
  /*!
7
7
  * Application Insights JavaScript SDK - Channel, 2.5.10
8
8
  * Copyright (c) Microsoft and contributors. All rights reserved.
9
9
  */
10
- function Qo(t){try{return t.responseText}catch(t){}return null}var Wo=function(t){function n(){var e,i,r,o,s=t.call(this)||this;return s.priority=1001,s.identifier="AppInsightsChannelPlugin",s._XMLHttpRequestSupported=!1,sr(n,s,(function(t,a){function c(){throw new Error("Method not implemented.")}function u(n){var e=t._senderConfig.endpointUrl(),i=t._buffer.batchPayloads(n),r=new Blob([i],{type:"text/plain;charset=UTF-8"});Si().sendBeacon(e,r)?(t._buffer.markAsSent(n),t._onSuccess(n,n.length)):(l(n,!0),t.diagLog().throwInternal(Vi.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(n,e){var i=new XMLHttpRequest,r=t._senderConfig.endpointUrl();try{i[Gr]=!0}catch(t){}i.open("POST",r,e),i.setRequestHeader("Content-type","application/json"),Qr.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(Ur.sdkContextHeader,Ur.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,n,n.length)},i.onerror=function(e){return t._onError(n,v(i),e)};var o=t._buffer.batchPayloads(n);i.send(o),t._buffer.markAsSent(n)}function f(n){try{if(n&&""!==n){var e=qi().parse(n);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted===e.errors.length)return e}}catch(e){t.diagLog().throwInternal(Vi.CRITICAL,43,"Cannot parse the response. "+Qr.getExceptionName(e),{response:n})}return null}function d(n,r){if(void 0===r&&(r=1),n&&0!==n.length){t._buffer.clearSent(n),e++;for(var o=0,s=n;o<s.length;o++)t._buffer.enqueue(s[o]);!function(t){var n;if(e<=1)n=10;else{var r=(Math.pow(2,e)-1)/2,o=Math.floor(Math.random()*r*10)+1;n=Math.max(Math.min(o*=t,3600),10)}var s=Hi.dateNow()+1e3*n;i=s}(r),h()}}function h(){if(!r){var n=i?Math.max(0,i-Hi.dateNow()):0,e=Math.max(t._senderConfig.maxBatchInterval(),n);r=setTimeout((function(){t.triggerSend(!0,null,1)}),e)}}function p(t){return 408===t||429===t||500===t||503===t}function v(t,n){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+Qo(t)||t.response||"":n}function m(n){var e=yi(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,n)},i.onerror=function(e){return t._onError(n,b(i),e)};var r=e&&e.location&&e.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(r,0))return t.diagLog().throwInternal(Vi.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var o=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var s=t._buffer.batchPayloads(n);i.send(s),t._buffer.markAsSent(n)}function b(t,n){return t?"XDomainRequest,Response:"+Qo(t)||"":n}t.pause=c,t.resume=c,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,22,"flush failed, telemetry will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!Qr.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,u,2)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t.teardown=c,t.initialize=function(r,s,c,f){a.initialize(r,s,c,f);var d=t._getTelCtx(),h=t.identifier;o=new Uo(s.logger),e=0,i=null,t._sender=null;var p=n._getDefaultAppInsightsChannelConfig();if(t._senderConfig=n._getEmptyAppInsightsChannelConfig(),zi(p,(function(n,e){t._senderConfig[n]=function(){return d.getConfig(h,n,e())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&Qr.canUseSessionStorage()?new Eo(t.diagLog(),t._senderConfig):new Bo(t._senderConfig),t._sample=new Ho(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(Hi.isNullOrUndefined(t.disableInstrumentaionKeyValidation)||!t.disableInstrumentaionKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(t.instrumentationKey)}(r)||t.diagLog().throwInternal(Vi.CRITICAL,100,"Invalid Instrumentation key "+r.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&Qr.IsBeaconApiSupported())t._sender=u;else if(void 0!==typeof XMLHttpRequest){var v=gi("XMLHttpRequest");v&&("withCredentials"in new v?(t._sender=l,t._XMLHttpRequestSupported=!0):void 0!==typeof XDomainRequest&&(t._sender=m))}},t.processTelemetry=function(e,i){i=t._getTelCtx(i);try{if(t._senderConfig.disableTelemetry())return;if(!e)return void i.diagLog().throwInternal(Vi.CRITICAL,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void i.diagLog().throwInternal(Vi.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(Vi.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(e))return void i.diagLog().throwInternal(Vi.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});e.sampleRate=t._sample.sampleRate;var r=n.constructEnvelope(e,t._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(Vi.CRITICAL,47,"Unable to create an AppInsights envelope");var s=!1;if(e.tags&&e.tags.ProcessLegacy&&(Hi.arrForEach(e.tags.ProcessLegacy,(function(t){try{t&&!1===t(r)&&(s=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(Vi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Qr.getExceptionName(t),{exception:Qr.dump(t)},!0)}})),delete e.tags.ProcessLegacy),s)return;var a=o.serialize(r),c=t._buffer.getItems(),u=t._buffer.batchPayloads(c);u&&u.length+a.length>t._senderConfig.maxBatchSizeInBytes()&&t.triggerSend(!0,null,10),t._buffer.enqueue(a),h()}catch(t){i.diagLog().throwInternal(Vi.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}t.processNext(e,i)},t._xhrReadyStateChange=function(n,i,r){if(4===n.readyState){var o=null;t._appId||(o=f(Qo(n)||n.response))&&o.appId&&(t._appId=o.appId),(n.status<200||n.status>=300)&&0!==n.status?!t._senderConfig.isRetryDisabled()&&p(n.status)?(d(i),t.diagLog().throwInternal(Vi.WARNING,40,". Response code "+n.status+". Will retry to send "+i.length+" items.")):t._onError(i,v(n)):Lo.isOffline()?t._senderConfig.isRetryDisabled()||(d(i,10),t.diagLog().throwInternal(Vi.WARNING,40,". Offline - Response Code: "+n.status+". Offline status: "+Lo.isOffline()+". Will retry to send "+i.length+" items.")):206===n.status?(o||(o=f(Qo(n)||n.response)),o&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,o):t._onError(i,v(n))):(e=0,t._onSuccess(i,r))}},t.triggerSend=function(n,e,o){void 0===n&&(n=!0);try{if(t._senderConfig.disableTelemetry())t._buffer.clear();else if(t._buffer.count()>0){var a=t._buffer.getItems();!function(n,e){var i,r=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(r&&r.eventsSendRequest)try{r.eventsSendRequest(n,e)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,74,"send request notification failed: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}}(o||0,n),e?e.call(s,a,n):t._sender(a,n)}clearTimeout(r),r=null,i=null}catch(n){var c=Qr.getIEVersion();(!c||c>9)&&t.diagLog().throwInternal(Vi.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t._onError=function(n,e){t.diagLog().throwInternal(Vi.WARNING,26,"Failed to send telemetry.",{message:e}),t._buffer.clearSent(n)},t._onPartialSuccess=function(n,e){for(var i=[],r=[],o=0,s=e.errors.reverse();o<s.length;o++){var a=s[o],c=n.splice(a.index,1)[0];p(a.statusCode)?r.push(c):i.push(c)}n.length>0&&t._onSuccess(n,e.itemsAccepted),i.length>0&&t._onError(i,v(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),r.length>0&&(d(r),t.diagLog().throwInternal(Vi.WARNING,40,"Partial success. Delivered: "+n.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},t._onSuccess=function(n){t._buffer.clearSent(n)},t._xdrOnLoad=function(n,i){var r=Qo(n);if(!n||r+""!="200"&&""!==r){var o=f(r);o&&o.itemsReceived&&o.itemsReceived>o.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,o):t._onError(i,b(n))}else e=0,t._onSuccess(i,0)}})),s}return __extends(n,t),n.constructEnvelope=function(t,n,e){var i;switch((i=n===t.iKey||Hi.isNullOrUndefined(n)?t:__assign({},t,{iKey:n})).baseType){case eo.dataType:return Ro.EventEnvelopeCreator.Create(e,i);case po.dataType:return Oo.TraceEnvelopeCreator.Create(e,i);case fo.dataType:return No.PageViewEnvelopeCreator.Create(e,i);case vo.dataType:return Do.PageViewPerformanceEnvelopeCreator.Create(e,i);case io.dataType:return Mo.ExceptionEnvelopeCreator.Create(e,i);case uo.dataType:return To.MetricEnvelopeCreator.Create(e,i);case ho.dataType:return Po.DependencyEnvelopeCreator.Create(e,i);default:return Ro.EventEnvelopeCreator.Create(e,i)}},n._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},n._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},n}(wr),$o=function(){},Jo=function(){function t(n,e){var i=this;this._logger=Hi.isNullOrUndefined(e)?new ur:e,n||(n={}),"function"!=typeof n.sessionExpirationMs&&(n.sessionExpirationMs=function(){return t.acquisitionSpan}),"function"!=typeof n.sessionRenewalMs&&(n.sessionRenewalMs=function(){return t.renewalSpan}),this.config=n,this._storageNamePrefix=function(){return i.config.namePrefix&&i.config.namePrefix()?t.cookieNameConst+i.config.namePrefix():t.cookieNameConst},this.automaticSession=new $o}return t.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var n=(new Date).getTime(),e=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=Qr.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=Qr.getStorage(this._logger,this._storageNamePrefix());n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||this.renew()},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{n.length>1&&(this.automaticSession.acquisitionDate=+new Date(+n[1]),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0),n.length>2&&(this.automaticSession.renewalDate=+new Date(+n[2]),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(t){this._logger.throwInternal(Vi.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(Vi.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=Qr.newId(this.config&&this.config.idLength?this.config.idLength():22),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),Qr.canUseLocalStorage()||this._logger.throwInternal(Vi.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,e){var i=n+this.config.sessionExpirationMs(),r=e+this.config.sessionRenewalMs(),o=new Date,s=[t,n,e];o.setTime(i<r?i:r);var a=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();Qr.setCookie(this._logger,this._storageNamePrefix(),s.join("|")+";expires="+c,a),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,n,e){Qr.setStorage(this._logger,this._storageNamePrefix(),[t,n,e].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),Xo=function(){},Go=function(){this.id="browser",this.deviceClass="Browser"},Ko=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},Yo=function(){function t(n,e){this.isNewUser=!1,this._logger=e;var i=Qr.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var r=i.split(t.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=n,!this.id){this.id=Hi.newId(n&&n.idLength?n.idLength():22);var o=new Date,s=Hi.toISOString(o);this.accountAcquisitionDate=s,this.isNewUser=!0,o.setTime(o.getTime()+31536e6);var a=[this.id,s],c=this.config.cookieDomain?this.config.cookieDomain():void 0;Qr.setCookie(this._logger,t.userCookieName,a.join(t.cookieSeparator)+";expires="+o.toUTCString(),c);var u=n.namePrefix&&n.namePrefix()?n.namePrefix()+"ai_session":"ai_session";Qr.removeStorage(this._logger,u)}this.accountId=n.accountId?n.accountId():void 0;var l=Qr.getCookie(this._logger,t.authUserCookieName);if(l){var f=(l=decodeURI(l)).split(t.cookieSeparator);f[0]&&(this.authenticatedId=f[0]),f.length>1&&f[1]&&(this.accountId=f[1])}}return t.prototype.setAuthenticatedUserContext=function(n,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(n)||e&&!this.validateUserInput(e))this._logger.throwInternal(Vi.WARNING,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&Qr.setCookie(this._logger,t.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,Qr.deleteCookie(this._logger,t.authUserCookieName)},t.prototype.validateUserInput=function(t){return!("string"!=typeof t||!t||t.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}(),Zo=function(){},ts=function(t,n,e,i){this.traceID=t||Qr.generateW3CId(),this.parentID=n,this.name=e;var r=Ci();!e&&r&&r.pathname&&(this.name=r.pathname),this.name=Lr.sanitizeString(i,this.name)},ns=function(){function t(t,n){var e=this;e.application=new Xo,e.internal=new Ko(n),wi()&&(e.sessionManager=new Jo(n,t),e.device=new Go,e.location=new Zo,e.user=new Yo(n,t),e.telemetryTrace=new ts(void 0,void 0,void 0,t),e.session=new $o),e.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var n=this.session,e=this.sessionManager,i=n||e&&e.automaticSession;i&&Hi.isString(i.id)&&(t.ext.app.sesId=i.id),n&&(t.ext.app.sesId=Hi.isString(n.id)?n.id:e.automaticSession.id)},t.prototype.applyOperatingSystemContxt=function(t){var n=this.os;n&&n.name&&(t.ext.os=n)},t.prototype.applyApplicationContext=function(t){var n=this.application;n&&(Hi.isString(n.ver)&&(t.tags[yo.applicationVersion]=n.ver),Hi.isString(n.build)&&(t.tags[yo.applicationBuild]=n.build))},t.prototype.applyDeviceContext=function(t){var n=this.device;n&&(Hi.isString(n.id)&&(t.ext.device.localId=n.id),Hi.isString(n.ip)&&(t.ext.device.ip=n.ip),Hi.isString(n.model)&&(t.ext.device.model=n.model),Hi.isString(n.deviceClass)&&(t.ext.device.deviceClass=n.deviceClass))},t.prototype.applyInternalContext=function(t){var n=this.internal;n&&(Hi.isString(n.agentVersion)&&(t.tags[yo.internalAgentVersion]=n.agentVersion),Hi.isString(n.sdkVersion)&&(t.tags[yo.internalSdkVersion]=n.sdkVersion),t.baseType!==cr.dataType&&t.baseType!==fo.dataType||(Hi.isString(n.snippetVer)&&(t.tags[yo.internalSnippet]=n.snippetVer),Hi.isString(n.sdkSrc)&&(t.tags[yo.internalSdkSrc]=n.sdkSrc)))},t.prototype.applyLocationContext=function(t){var n=this.location;n&&Hi.isString(n.ip)&&(t.tags[yo.locationIp]=n.ip)},t.prototype.applyOperationContext=function(t){var n=this.telemetryTrace;if(n){var e=t.ext.trace||{traceID:void 0,parentID:void 0};Hi.isString(n.traceID)&&(e.traceID=n.traceID),Hi.isString(n.name)&&(e.name=n.name),Hi.isString(n.parentID)&&(e.parentID=n.parentID),t.ext.trace=e}},t.prototype.applyWebContext=function(t){var n=this.web;n&&(t.ext.web=t.ext.web||{},t.ext.web=n)},t.prototype.applyUserContext=function(t){var n=this.user;n&&(t.tags||(t.tags=[]),Hi.isString(n.accountId)&&(t.tags[yo.userAccountId]=n.accountId),Hi.isString(n.id)&&(t.ext.user.id=n.id),Hi.isString(n.authenticatedId)&&(t.ext.user.authId=n.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[wo.DeviceExt]&&0===Hi.objKeys(t.ext[wo.DeviceExt]).length&&delete t.ext[wo.DeviceExt],t.ext[wo.UserExt]&&0===Hi.objKeys(t.ext[wo.UserExt]).length&&delete t.ext[wo.UserExt],t.ext[wo.WebExt]&&0===Hi.objKeys(t.ext[wo.WebExt]).length&&delete t.ext[wo.WebExt],t.ext[wo.OSExt]&&0===Hi.objKeys(t.ext[wo.OSExt]).length&&delete t.ext[wo.OSExt],t.ext[wo.AppExt]&&0===Hi.objKeys(t.ext[wo.AppExt]).length&&delete t.ext[wo.AppExt],t.ext[wo.TraceExt]&&0===Hi.objKeys(t.ext[wo.TraceExt]).length&&delete t.ext[wo.TraceExt]},t}(),es=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.priority=110,n.identifier="AppInsightsPropertiesPlugin",n}return __extends(n,t),n.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},idLength:function(){return 22}}},n.prototype.initialize=function(e,i,r,o){var s=this;t.prototype.initialize.call(this,e,i,r,o);var a=this._getTelCtx(),c=this.identifier,u=n.getDefaultConfig();this._extensionConfig=this._extensionConfig||n.getDefaultConfig(),zi(u,(function(t,n){s._extensionConfig[t]=function(){return a.getConfig(c,t,n())}})),this.context=new ns(i.logger,this._extensionConfig),this._breezeChannel=Qr.getExtension(r,"AppInsightsChannelPlugin"),this.context.appId=function(){return s._breezeChannel?s._breezeChannel._appId:null}},n.prototype.processTelemetry=function(t,n){if(Hi.isNullOrUndefined(t));else{if(n=this._getTelCtx(n),t.name===fo.envelopeType&&n.diagLog().resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t,n),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var e=new cr(72,(Si()||{}).userAgent||"");n.diagLog().logInternalMessage(Vi.CRITICAL,e)}this.processNext(t,n)}},n.prototype._processTelemetryInternal=function(t,n){t.tags||(t.tags=[]),t.ext||(t.ext={});var e=t.ext;e[wo.DeviceExt]=e[wo.DeviceExt]||{},e[wo.WebExt]=e[wo.WebExt]||{},e[wo.UserExt]=e[wo.UserExt]||{},e[wo.OSExt]=e[wo.OSExt]||{},e[wo.AppExt]=e[wo.AppExt]||{},e[wo.TraceExt]=e[wo.TraceExt]||{};var i=this.context;i.applySessionContext(t,n),i.applyApplicationContext(t,n),i.applyDeviceContext(t,n),i.applyOperationContext(t,n),i.applyUserContext(t,n),i.applyOperatingSystemContxt(t,n),i.applyWebContext(t,n),i.applyLocationContext(t,n),i.applyInternalContext(t,n),i.cleanUp(t,n)},n}(wr),is=Hi.objKeys,rs=Hi.arrForEach;function os(t,n,e){var i=0,r=t[n],o=t[e];return r&&o&&(i=Xr.GetDuration(r,o)),i}function ss(t,n,e,i,r){var o=0,s=os(e,i,r);return s&&(o=as(t,n,Qr.msToTimeSpan(s))),o}function as(t,n,e){var i=0;return t&&n&&e&&((t.ajaxPerf=t.ajaxPerf||{})[n]=e,i=1),i}var cs=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},us=function t(n,e,i){var r=this,o=i;r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new cs,r.clientFailure=0,r.traceID=n,r.spanID=e,sr(t,r,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?Wr.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?Lr.sanitizeUrl(o,Wr.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(n,e,i){if(t.ajaxTotalDuration=Math.round(1e3*Xr.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var r,o=((r={id:"|"+t.traceID+"."+t.spanID,target:t.getAbsoluteUrl(),name:t.getPathName(),type:n,duration:t.ajaxTotalDuration,success:+t.status>=200&&+t.status<400,responseCode:+t.status,method:t.method}).properties={HttpMethod:t.method},r);if(function(t,n){var e=t.perfTiming,i=n.properties||{},r=0,o=Hi.isString,s="redirect",a="startTime",c="connectEnd",u="requestStart",l="responseEnd",f=s+"Start",d=s="End";if(e){r|=ss(i,s,e,f,d),r|=ss(i,"domainLookup",e,"domainLookupStart","domainLookupEnd"),r|=ss(i,"connect",e,"connectStart",c),r|=ss(i,"request",e,u,"requestEnd"),r|=ss(i,"response",e,"responseStart",l),r|=ss(i,"networkConnect",e,a,c),r|=ss(i,"sentRequest",e,u,l);var h=e.duration;h||(h=os(e,a,l)||0),r|=as(i,"duration",h),r|=as(i,"perfTotal",h);var p=e.serverTiming;if(p){var v={};rs(p,(function(t,n){var e=function(t){var n=t,e=/([^\w\d_$])/g;return e.test(t)&&(n=t.replace(e,"_")),n}(t.name||""+n),i=v[e]||{};zi(t,(function(t,n){("name"!==t&&o(n)||Hi.isNumber(n))&&(i[t]&&(n=i[t]+";"+n),!n&&o(n)||(i[t]=n))})),v[e]=i})),r|=as(i,"serverTiming",v)}r|=as(i,"transferSize",e.transferSize),r|=as(i,"encodedBodySize",e.encodedBodySize),r|=as(i,"decodedBodySize",e.decodedBodySize)}else t.perfMark&&(r|=as(i,"missing",t.perfAttempts));r&&(n.properties=i)}(t,o),e&&is(t.requestHeaders).length>0&&(o.properties=o.properties||{},o.properties.requestHeaders=t.requestHeaders),i){var s=i();if(s){var a=s.correlationContext;if(a&&(o.correlationContext=a),s.headerMap&&is(s.headerMap).length>0&&(o.properties=o.properties||{},o.properties.responseHeaders=s.headerMap),t.status>=400){var c=s.type;o.properties=o.properties||{},""!==c&&"text"!==c||(o.properties.responseText=s.responseText?s.statusText+" - "+s.responseText:s.statusText),"json"===c&&(o.properties.responseText=s.response?s.statusText+" - "+JSON.stringify(s.response):s.statusText)}}}return o}}))},ls=function(){function t(n,e){var i=this;i.traceFlag=t.DEFAULT_TRACE_FLAG,i.version=t.DEFAULT_VERSION,i.traceId=n&&t.isValidTraceId(n)?n:Qr.generateW3CId(),i.spanId=e&&t.isValidSpanId(e)?e:Qr.generateW3CId().substr(0,16)}return t.isValidTraceId=function(t){return t.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==t},t.isValidSpanId=function(t){return t.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==t},t.prototype.toString=function(){var t=this;return t.version+"-"+t.traceId+"-"+t.spanId+"-"+t.traceFlag},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t}(),fs=Hi.isNullOrUndefined,ds=Hi.arrForEach,hs=0;function ps(t){var n="";try{fs(t)||fs(t.ajaxData)||fs(t.ajaxData.requestUrl)||(n+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return n}function vs(t,n,e,i,r){t.diagLog().throwInternal(Vi.CRITICAL,n,e,i,r)}function ms(t,n,e,i,r){t.diagLog().throwInternal(Vi.WARNING,n,e,i,r)}function bs(t,n,e){return function(i){vs(t,n,e,{ajaxDiagnosticsMessage:ps(i.inst),exception:Qr.dump(i.err)})}}function gs(t,n){return t&&n?t.indexOf(n):-1}var ws,ys=function(t){function n(){var e=t.call(this)||this;e.identifier=n.identifier,e.priority=120;var i,r,o,s,a=Ci(),c=!1,u=!1,l=a&&a.host&&a.host.toLowerCase(),f=n.getEmptyConfig(),d=!1,h=0,p=!1,v=0,m=!1,b=[],g={};return sr(n,e,(function(t,e){function a(t,n,e){b.push(function(t,n,e){return t?Dr(t.prototype,n,e,!1):null}(t,n,e))}function w(t,n,e){var i=!1,r=((Hi.isString(n)?n:(n||{}).url||"")||"").toLowerCase(),o=gs(r,"?"),s=gs(r,"#");return(-1===o||-1!==s&&s<o)&&(o=s),-1!==o&&(r=r.substring(0,o)),fs(t)?fs(n)||(i="object"==typeof n&&!0===n[Gr]||!!e&&!0===e[Gr]):i=!0===t[Gr]||!0===r[Gr],i?g[r]||(g[r]=1):g[r]&&(i=!0),i}function y(t,n){var e=!0,i=u;return fs(t)||(e=!0===n||!fs(t.ajaxData)),i&&e}function x(t){try{var n=t.responseType;if(""===n||"text"===n)return t.responseText}catch(t){}return null}function k(n){try{var e=n.getAllResponseHeaders();if(null!==e&&-1!==gs(e.toLowerCase(),Ur.requestContextHeaderLowerCase)){var i=n.getResponseHeader(Ur.requestContextHeader);return $r.getCorrelationContext(i)}}catch(e){ms(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:ps(n),exception:Qr.dump(e)})}}function S(t,n){if(n.requestUrl&&s&&p){var e=Ai();if(e&&Hi.isFunction(e.mark)){hs++;var i=s+t+"#"+hs;e.mark(i);var r=e.getEntriesByName(i);r&&1===r.length&&(n.perfMark=r[0])}}}function C(t,n,e,i){var r=n.perfMark,o=Ai(),s=f.maxAjaxPerfLookupAttempts,a=f.ajaxPerfLookupDelay,c=n.requestUrl,u=0;!function l(){try{if(o&&r){u++;for(var f=null,d=o.getEntries(),h=d.length-1;h>=0;h--){var p=d[h];if(p){if("resource"===p.entryType)p.initiatorType!==t||-1===gs(p.name,c)&&-1===gs(c,p.name)||(f=p);else if("mark"===p.entryType&&p.name===r.name){n.perfTiming=f;break}if(p.startTime<r.startTime-1e3)break}}}!r||n.perfTiming||u>=s||!1===n.async?(r&&Hi.isFunction(o.clearMarks)&&o.clearMarks(r.name),n.perfAttempts=u,e()):setTimeout(l,a)}catch(t){i(t)}}()}function A(n){var e="";try{fs(n)||(e+="string"==typeof n?"(url: '"+n+"')":"(url: '"+n.url+"')")}catch(n){vs(t,15,"Failed to grab failed fetch diagnostics message",{exception:Qr.dump(n)})}return e}function _(n,e,i,r,o){function s(n,e,r){var o=r||{};o.fetchDiagnosticsMessage=A(i),e&&(o.exception=Qr.dump(e)),ms(t,n,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",o)}r&&(r.responseFinishedTime=Xr.Now(),r.status=e,C("fetch",r,(function(){var n=r.CreateTrackItem("Fetch",d,o);n?t.trackDependencyDataInternal(n):s(14,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(t){s(18,t,null)})))}function q(n){if(n&&n.headers)try{var e=n.headers.get(Ur.requestContextHeader);return $r.getCorrelationContext(e)}catch(e){ms(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:A(n),exception:Qr.dump(e)})}}t.initialize=function(l,h,g,A){if(!t.isInitialized()){e.initialize(l,h,g,A);var B=t._getTelCtx();zi(n.getDefaultConfig(),(function(t,e){f[t]=B.getConfig(n.identifier,t,e)}));var E=f.distributedTracingMode;if(d=f.enableRequestHeaderTracking,v=f.maxAjaxCallsPerView,m=f.enableResponseHeaderTracking,o=E===Mr.AI||E===Mr.AI_AND_W3C,r=E===Mr.AI_AND_W3C||E===Mr.W3C,p=f.enableAjaxPerfTracking){var j=l.instrumentationKey||"unkwn";s=j.length>5?"ai.ajxmn."+j.substring(j.length-5)+".":"ai.ajxmn."+j+"."}if(!1===f.disableAjaxTracking&&function(t){var n=!1;if("undefined"!=typeof XMLHttpRequest&&!fs(XMLHttpRequest)){var e=XMLHttpRequest.prototype;n=!(fs(e)||fs(e.open)||fs(e.send)||fs(e.abort))}var i=Qr.getIEVersion();if(i&&i<9&&(n=!1),n)try{(new XMLHttpRequest).ajaxData={};var r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=r}catch(e){n=!1,vs(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Qr.dump(e)})}return n}(t)&&!u&&(a(XMLHttpRequest,"open",{req:function(n,e,r,o){var s=n.inst,a=s.ajaxData;w(s,r)||!y(s,!0)||a&&a.xhrMonitoringState.openDone||function(n,e,r,o){var s=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Qr.generateW3CId(),a=Qr.generateW3CId().substr(0,16),c=new us(s,a,t.diagLog());c.method=e,c.requestUrl=r,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=o,n.ajaxData=c,function(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=Wi.Attach(n,"readystatechange",(function(){try{n&&4===n.readyState&&y(n)&&function(n){var e=n.ajaxData;function i(e,i){var r=i||{};r.ajaxDiagnosticsMessage=ps(n),e&&(r.exception=Qr.dump(e)),ms(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}e.responseFinishedTime=Xr.Now(),e.status=n.status,C("xmlhttprequest",e,(function(){try{var r=e.CreateTrackItem("Ajax",d,(function(){var t={statusText:n.statusText,headerMap:null,correlationContext:k(n),type:n.responseType,responseText:x(n),response:n.response};if(m){var e=n.getAllResponseHeaders();if(e){var i=Hi.strTrim(e).split(/[\r\n]+/),r={};ds(i,(function(t){var n=t.split(": "),e=n.shift(),i=n.join(": ");r[e]=i})),t.headerMap=r}}return t}));r?t.trackDependencyDataInternal(r):i(null,{requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime})}finally{try{n.ajaxData=null}catch(t){}}}),(function(t){i(t,null)}))}(n)}catch(i){var e=Qr.dump(i);e&&-1!==gs(e.toLowerCase(),"c00c023f")||vs(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:ps(n),exception:e})}}))}(n)}(s,e,r,o)},hkErr:bs(t,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"send",{req:function(n){var e=n.inst,i=e.ajaxData;y(e)&&!i.xhrMonitoringState.sendDone&&(S("xhr",i),i.requestSentTime=Xr.Now(),e=t.includeCorrelationHeaders(i,void 0,void 0,e),i.xhrMonitoringState.sendDone=!0)},hkErr:bs(t,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"abort",{req:function(t){var n=t.inst,e=n.ajaxData;y(n)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:bs(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),d&&a(XMLHttpRequest,"setRequestHeader",{req:function(t,n,e){var i=t.inst;y(i)&&(i.ajaxData.requestHeaders[n]=e)},hkErr:bs(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),u=!0),function(){var n,e=!(n=bi())||fs(n.Request)||fs(n.Request.prototype)||fs(n.fetch)?null:n.fetch;if(e){var r=bi(),o=e.polyfill;!1===f.disableFetchTracking?(b.push(Dr(r,"fetch",{req:function(n,e,r){var s;if(c&&!w(null,e,r)&&(!o||!u)){var a=n.ctx();s=function(n,e){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Qr.generateW3CId(),o=Qr.generateW3CId().substr(0,16),s=new us(r,o,t.diagLog());s.requestSentTime=Xr.Now(),s.requestUrl=n instanceof Request?n?n.url:"":n;var a="GET";e&&e.method?a=e.method:n&&n instanceof Request&&(a=n.method),s.method=a;var c={};return d&&new Headers((e?e.headers:0)||n instanceof Request&&n.headers||{}).forEach((function(t,n){c[n]=t})),s.requestHeaders=c,S("fetch",s),s}(e,r);var l=t.includeCorrelationHeaders(s,e,r);l!==r&&n.set(1,l),a.data=s}},rsp:function(t,n){var e=t.ctx().data;e&&(t.rslt=t.rslt.then((function(t){return _(0,(t||{}).status,t,e,(function(){var n={statusText:t.statusText,headerMap:null,correlationContext:q(t)};if(m){var e={};t.headers.forEach((function(t,n){e[n]=t})),n.headerMap=e}return n})),t})).catch((function(t){throw _(0,0,n,e,null),t})))},hkErr:bs(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),c=!0):o&&b.push(Dr(r,"fetch",{req:function(t,n,e){w(null,n,e)}})),o&&(r.fetch.polyfill=o)}}(),g.length>0&&g){for(var I=void 0,F=0;!I&&F<g.length;)g[F]&&"AppInsightsPropertiesPlugin"===g[F].identifier&&(I=g[F]),F++;I&&(i=I.context)}}},t.teardown=function(){ds(b,(function(t){t.rm()})),b=[],c=!1,u=!1,t.setInitialized(!1)},t.trackDependencyData=function(n,e){t.trackDependencyDataInternal(n,e)},t.includeCorrelationHeaders=function(n,e,s,a){var c=t._currentWindowHost||l;if(e){if($r.canIncludeCorrelationHeader(f,n.getAbsoluteUrl(),c)&&(s||(s={}),s.headers=new Headers(s.headers||e instanceof Request&&e.headers||{}),o&&(s.headers.set(Ur.requestIdHeader,h="|"+n.traceID+"."+n.spanID),d&&(n.requestHeaders[Ur.requestIdHeader]=h)),(p=f.appId||i&&i.appId())&&(s.headers.set(Ur.requestContextHeader,Ur.requestContextAppIdFormat+p),d&&(n.requestHeaders[Ur.requestContextHeader]=Ur.requestContextAppIdFormat+p)),r)){var u=new ls(n.traceID,n.spanID);s.headers.set(Ur.traceParentHeader,u.toString()),d&&(n.requestHeaders[Ur.traceParentHeader]=u.toString())}return s}if(a){var h,p;if($r.canIncludeCorrelationHeader(f,n.getAbsoluteUrl(),c))o&&(a.setRequestHeader(Ur.requestIdHeader,h="|"+n.traceID+"."+n.spanID),d&&(n.requestHeaders[Ur.requestIdHeader]=h)),(p=f.appId||i&&i.appId())&&(a.setRequestHeader(Ur.requestContextHeader,Ur.requestContextAppIdFormat+p),d&&(n.requestHeaders[Ur.requestContextHeader]=Ur.requestContextAppIdFormat+p)),r&&(u=new ls(n.traceID,n.spanID),a.setRequestHeader(Ur.traceParentHeader,u.toString()),d&&(n.requestHeaders[Ur.traceParentHeader]=u.toString()));return a}},t.trackDependencyDataInternal=function(n,e,i){if(-1===v||h<v){f.distributedTracingMode!==Mr.W3C&&f.distributedTracingMode!==Mr.AI_AND_W3C||"string"!=typeof n.id||"."===n.id[n.id.length-1]||(n.id+="."),Hi.isNullOrUndefined(n.startTime)&&(n.startTime=new Date);var r=go.create(n,ho.dataType,ho.envelopeType,t.diagLog(),e,i);t.core.track(r)}else h===v&&vs(t,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++h}})),e}return __extends(n,t),n.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:Mr.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},n.getEmptyConfig=function(){var t=this.getDefaultConfig();return zi(t,(function(n){t[n]=void 0})),t},n.prototype.processTelemetry=function(t,n){this.processNext(t,n)},n.identifier="AjaxDependencyPlugin",n}(wr),xs=function(){function t(t){var n=this;n._snippetVersion=""+(t.sv||t.version||""),t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};if(e.connectionString){var i=Kr.parse(e.connectionString),r=i.ingestionendpoint;e.endpointUrl=r?r+"/v2/track":e.endpointUrl,e.instrumentationKey=i.instrumentationkey||e.instrumentationKey}n.appInsights=new _o,n.properties=new es,n.dependencies=new ys,n.core=new Er,n.snippet=t,n.config=e,n.getSKUDefaults()}return t.prototype.trackEvent=function(t,n){this.appInsights.trackEvent(t,n)},t.prototype.trackPageView=function(t){this.appInsights.trackPageView(t||{})},t.prototype.trackPageViewPerformance=function(t){this.appInsights.trackPageViewPerformance(t||{})},t.prototype.trackException=function(t){!t.exception&&t.error&&(t.exception=t.error),this.appInsights.trackException(t)},t.prototype._onerror=function(t){this.appInsights._onerror(t)},t.prototype.trackTrace=function(t,n){this.appInsights.trackTrace(t,n)},t.prototype.trackMetric=function(t,n){this.appInsights.trackMetric(t,n)},t.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},t.prototype.stopTrackPage=function(t,n,e,i){this.appInsights.stopTrackPage(t,n,e,i)},t.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},t.prototype.stopTrackEvent=function(t,n,e){this.appInsights.stopTrackEvent(t,n,e)},t.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},t.prototype.setAuthenticatedUserContext=function(t,n,e){void 0===e&&(e=!1),this.properties.context.user.setAuthenticatedUserContext(t,n,e)},t.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},t.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},t.prototype.flush=function(t){var n=this;void 0===t&&(t=!0),dr(this.core,(function(){return"AISKU.flush"}),(function(){Hi.arrForEach(n.core.getTransmissionControls(),(function(n){Hi.arrForEach(n,(function(n){n.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),Hi.arrForEach(this.core.getTransmissionControls(),(function(n){Hi.arrForEach(n,(function(n){n.onunloadFlush?n.onunloadFlush():n.flush(t)}))}))},t.prototype.loadAppInsights=function(t,n,e){var i=this;void 0===t&&(t=!1);var r=this;if(t&&r.config.extensions&&r.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return dr(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var o=[],s=new Wo;o.push(s),o.push(r.properties),o.push(r.dependencies),o.push(r.appInsights),r.core.initialize(r.config,o,n,e),r.context=r.properties.context,ws&&r.context&&(r.context.internal.sdkSrc=ws),function(n){if(n){var e="";Hi.isNullOrUndefined(r._snippetVersion)||(e+=r._snippetVersion),t&&(e+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=e||"-"),zi(r,(function(t,e){Hi.isString(t)&&!Hi.isFunction(e)&&"_"!==t.substring(0,1)&&(n[t]=e)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},t.prototype.updateSnippetDefinitions=function(t){zi(this,(function(n,e){Hi.isString(n)&&(t[n]=e)}))},t.prototype.emptyQueue=function(){var t=this;try{if(Qr.isArray(t.snippet.queue)){for(var n=t.snippet.queue.length,e=0;e<n;e++)(0,t.snippet.queue[e])();t.snippet.queue=void 0,delete t.snippet.queue}}catch(t){t&&Hi.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(wi()||xi()){var n=function(){t.onunloadFlush(!1);var n=t.appInsights.core._extensions.AppInsightsPropertiesPlugin;n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup()};if(!t.appInsights.config.disableFlushOnBeforeUnload){var e=Hi.addEventHandler("beforeunload",n);(e=Hi.addEventHandler("pagehide",n)||e)||(i=Si())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(Vi.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||Hi.addEventHandler("pagehide",n)}var i},t.prototype.getSKUDefaults=function(){var t=this;t.config.diagnosticLogInterval=t.config.diagnosticLogInterval&&t.config.diagnosticLogInterval>0?t.config.diagnosticLogInterval:1e4},t}();
10
+ function Qo(t){try{return t.responseText}catch(t){}return null}var Wo=function(t){function n(){var e,i,r,o,s=t.call(this)||this;return s.priority=1001,s.identifier="AppInsightsChannelPlugin",s._XMLHttpRequestSupported=!1,sr(n,s,(function(t,a){function c(){throw new Error("Method not implemented.")}function u(n){var e=t._senderConfig.endpointUrl(),i=t._buffer.batchPayloads(n),r=new Blob([i],{type:"text/plain;charset=UTF-8"});Si().sendBeacon(e,r)?(t._buffer.markAsSent(n),t._onSuccess(n,n.length)):(l(n,!0),t.diagLog().throwInternal(Vi.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(n,e){var i=new XMLHttpRequest,r=t._senderConfig.endpointUrl();try{i[Gr]=!0}catch(t){}i.open("POST",r,e),i.setRequestHeader("Content-type","application/json"),Qr.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(Ur.sdkContextHeader,Ur.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,n,n.length)},i.onerror=function(e){return t._onError(n,v(i),e)};var o=t._buffer.batchPayloads(n);i.send(o),t._buffer.markAsSent(n)}function f(n){try{if(n&&""!==n){var e=qi().parse(n);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted===e.errors.length)return e}}catch(e){t.diagLog().throwInternal(Vi.CRITICAL,43,"Cannot parse the response. "+Qr.getExceptionName(e),{response:n})}return null}function d(n,r){if(void 0===r&&(r=1),n&&0!==n.length){t._buffer.clearSent(n),e++;for(var o=0,s=n;o<s.length;o++)t._buffer.enqueue(s[o]);!function(t){var n;if(e<=1)n=10;else{var r=(Math.pow(2,e)-1)/2,o=Math.floor(Math.random()*r*10)+1;n=Math.max(Math.min(o*=t,3600),10)}var s=Hi.dateNow()+1e3*n;i=s}(r),h()}}function h(){if(!r){var n=i?Math.max(0,i-Hi.dateNow()):0,e=Math.max(t._senderConfig.maxBatchInterval(),n);r=setTimeout((function(){t.triggerSend(!0,null,1)}),e)}}function p(t){return 408===t||429===t||500===t||503===t}function v(t,n){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+Qo(t)||t.response||"":n}function m(n){var e=yi(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,n)},i.onerror=function(e){return t._onError(n,b(i),e)};var r=e&&e.location&&e.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(r,0))return t.diagLog().throwInternal(Vi.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var o=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var s=t._buffer.batchPayloads(n);i.send(s),t._buffer.markAsSent(n)}function b(t,n){return t?"XDomainRequest,Response:"+Qo(t)||"":n}t.pause=c,t.resume=c,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,22,"flush failed, telemetry will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!Qr.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,u,2)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t.teardown=c,t.initialize=function(r,s,c,f){a.initialize(r,s,c,f);var d=t._getTelCtx(),h=t.identifier;o=new Uo(s.logger),e=0,i=null,t._sender=null;var p=n._getDefaultAppInsightsChannelConfig();if(t._senderConfig=n._getEmptyAppInsightsChannelConfig(),zi(p,(function(n,e){t._senderConfig[n]=function(){return d.getConfig(h,n,e())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&Qr.canUseSessionStorage()?new Eo(t.diagLog(),t._senderConfig):new Bo(t._senderConfig),t._sample=new Ho(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(Hi.isNullOrUndefined(t.disableInstrumentaionKeyValidation)||!t.disableInstrumentaionKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(t.instrumentationKey)}(r)||t.diagLog().throwInternal(Vi.CRITICAL,100,"Invalid Instrumentation key "+r.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&Qr.IsBeaconApiSupported())t._sender=u;else if(void 0!==typeof XMLHttpRequest){var v=gi("XMLHttpRequest");v&&("withCredentials"in new v?(t._sender=l,t._XMLHttpRequestSupported=!0):void 0!==typeof XDomainRequest&&(t._sender=m))}},t.processTelemetry=function(e,i){i=t._getTelCtx(i);try{if(t._senderConfig.disableTelemetry())return;if(!e)return void i.diagLog().throwInternal(Vi.CRITICAL,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void i.diagLog().throwInternal(Vi.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(Vi.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(e))return void i.diagLog().throwInternal(Vi.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});e.sampleRate=t._sample.sampleRate;var r=n.constructEnvelope(e,t._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(Vi.CRITICAL,47,"Unable to create an AppInsights envelope");var s=!1;if(e.tags&&e.tags.ProcessLegacy&&(Hi.arrForEach(e.tags.ProcessLegacy,(function(t){try{t&&!1===t(r)&&(s=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(Vi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Qr.getExceptionName(t),{exception:Qr.dump(t)},!0)}})),delete e.tags.ProcessLegacy),s)return;var a=o.serialize(r),c=t._buffer.getItems(),u=t._buffer.batchPayloads(c);u&&u.length+a.length>t._senderConfig.maxBatchSizeInBytes()&&t.triggerSend(!0,null,10),t._buffer.enqueue(a),h()}catch(t){i.diagLog().throwInternal(Vi.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}t.processNext(e,i)},t._xhrReadyStateChange=function(n,i,r){if(4===n.readyState){var o=null;t._appId||(o=f(Qo(n)||n.response))&&o.appId&&(t._appId=o.appId),(n.status<200||n.status>=300)&&0!==n.status?!t._senderConfig.isRetryDisabled()&&p(n.status)?(d(i),t.diagLog().throwInternal(Vi.WARNING,40,". Response code "+n.status+". Will retry to send "+i.length+" items.")):t._onError(i,v(n)):Lo.isOffline()?t._senderConfig.isRetryDisabled()||(d(i,10),t.diagLog().throwInternal(Vi.WARNING,40,". Offline - Response Code: "+n.status+". Offline status: "+Lo.isOffline()+". Will retry to send "+i.length+" items.")):206===n.status?(o||(o=f(Qo(n)||n.response)),o&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,o):t._onError(i,v(n))):(e=0,t._onSuccess(i,r))}},t.triggerSend=function(n,e,o){void 0===n&&(n=!0);try{if(t._senderConfig.disableTelemetry())t._buffer.clear();else if(t._buffer.count()>0){var a=t._buffer.getItems();!function(n,e){var i,r=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(r&&r.eventsSendRequest)try{r.eventsSendRequest(n,e)}catch(n){t.diagLog().throwInternal(Vi.CRITICAL,74,"send request notification failed: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}}(o||0,n),e?e.call(s,a,n):t._sender(a,n)}clearTimeout(r),r=null,i=null}catch(n){var c=Qr.getIEVersion();(!c||c>9)&&t.diagLog().throwInternal(Vi.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+Qr.getExceptionName(n),{exception:Qr.dump(n)})}},t._onError=function(n,e){t.diagLog().throwInternal(Vi.WARNING,26,"Failed to send telemetry.",{message:e}),t._buffer.clearSent(n)},t._onPartialSuccess=function(n,e){for(var i=[],r=[],o=0,s=e.errors.reverse();o<s.length;o++){var a=s[o],c=n.splice(a.index,1)[0];p(a.statusCode)?r.push(c):i.push(c)}n.length>0&&t._onSuccess(n,e.itemsAccepted),i.length>0&&t._onError(i,v(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),r.length>0&&(d(r),t.diagLog().throwInternal(Vi.WARNING,40,"Partial success. Delivered: "+n.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},t._onSuccess=function(n){t._buffer.clearSent(n)},t._xdrOnLoad=function(n,i){var r=Qo(n);if(!n||r+""!="200"&&""!==r){var o=f(r);o&&o.itemsReceived&&o.itemsReceived>o.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,o):t._onError(i,b(n))}else e=0,t._onSuccess(i,0)}})),s}return __extends(n,t),n.constructEnvelope=function(t,n,e){var i;switch((i=n===t.iKey||Hi.isNullOrUndefined(n)?t:__assign({},t,{iKey:n})).baseType){case eo.dataType:return Ro.EventEnvelopeCreator.Create(e,i);case po.dataType:return Oo.TraceEnvelopeCreator.Create(e,i);case fo.dataType:return No.PageViewEnvelopeCreator.Create(e,i);case vo.dataType:return Do.PageViewPerformanceEnvelopeCreator.Create(e,i);case io.dataType:return Mo.ExceptionEnvelopeCreator.Create(e,i);case uo.dataType:return To.MetricEnvelopeCreator.Create(e,i);case ho.dataType:return Po.DependencyEnvelopeCreator.Create(e,i);default:return Ro.EventEnvelopeCreator.Create(e,i)}},n._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},n._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},n}(wr),$o=function(){},Jo=function(){function t(n,e){var i=this;this._logger=Hi.isNullOrUndefined(e)?new ur:e,n||(n={}),"function"!=typeof n.sessionExpirationMs&&(n.sessionExpirationMs=function(){return t.acquisitionSpan}),"function"!=typeof n.sessionRenewalMs&&(n.sessionRenewalMs=function(){return t.renewalSpan}),this.config=n,this._storageNamePrefix=function(){return i.config.namePrefix&&i.config.namePrefix()?t.cookieNameConst+i.config.namePrefix():t.cookieNameConst},this.automaticSession=new $o}return t.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var n=(new Date).getTime(),e=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=Qr.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=Qr.getStorage(this._logger,this._storageNamePrefix());n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||this.renew()},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{n.length>1&&(this.automaticSession.acquisitionDate=+new Date(+n[1]),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0),n.length>2&&(this.automaticSession.renewalDate=+new Date(+n[2]),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(t){this._logger.throwInternal(Vi.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+Qr.getExceptionName(t),{exception:Qr.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(Vi.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=Qr.newId(this.config&&this.config.idLength?this.config.idLength():22),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),Qr.canUseLocalStorage()||this._logger.throwInternal(Vi.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,e){var i=n+this.config.sessionExpirationMs(),r=e+this.config.sessionRenewalMs(),o=new Date,s=[t,n,e];o.setTime(i<r?i:r);var a=this.config.cookieDomain?this.config.cookieDomain():null,c=0===this.config.sessionExpirationMs()?"0":o.toUTCString();Qr.setCookie(this._logger,this._storageNamePrefix(),s.join("|")+";expires="+c,a),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,n,e){Qr.setStorage(this._logger,this._storageNamePrefix(),[t,n,e].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),Xo=function(){},Go=function(){this.id="browser",this.deviceClass="Browser"},Yo=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},Ko=function(){function t(n,e){this.isNewUser=!1,this._logger=e;var i=Qr.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var r=i.split(t.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=n,!this.id){this.id=Hi.newId(n&&n.idLength?n.idLength():22);var o=new Date,s=Hi.toISOString(o);this.accountAcquisitionDate=s,this.isNewUser=!0,o.setTime(o.getTime()+31536e6);var a=[this.id,s],c=this.config.cookieDomain?this.config.cookieDomain():void 0;Qr.setCookie(this._logger,t.userCookieName,a.join(t.cookieSeparator)+";expires="+o.toUTCString(),c);var u=n.namePrefix&&n.namePrefix()?n.namePrefix()+"ai_session":"ai_session";Qr.removeStorage(this._logger,u)}this.accountId=n.accountId?n.accountId():void 0;var l=Qr.getCookie(this._logger,t.authUserCookieName);if(l){var f=(l=decodeURI(l)).split(t.cookieSeparator);f[0]&&(this.authenticatedId=f[0]),f.length>1&&f[1]&&(this.accountId=f[1])}}return t.prototype.setAuthenticatedUserContext=function(n,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(n)||e&&!this.validateUserInput(e))this._logger.throwInternal(Vi.WARNING,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=n;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&Qr.setCookie(this._logger,t.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,Qr.deleteCookie(this._logger,t.authUserCookieName)},t.prototype.validateUserInput=function(t){return!("string"!=typeof t||!t||t.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}(),Zo=function(){},ts=function(t,n,e,i){this.traceID=t||Qr.generateW3CId(),this.parentID=n,this.name=e;var r=Ci();!e&&r&&r.pathname&&(this.name=r.pathname),this.name=Lr.sanitizeString(i,this.name)},ns=function(){function t(t,n){var e=this;e.application=new Xo,e.internal=new Yo(n),wi()&&(e.sessionManager=new Jo(n,t),e.device=new Go,e.location=new Zo,e.user=new Ko(n,t),e.telemetryTrace=new ts(void 0,void 0,void 0,t),e.session=new $o),e.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var n=this.session,e=this.sessionManager,i=n||e&&e.automaticSession;i&&Hi.isString(i.id)&&(t.ext.app.sesId=i.id),n&&(t.ext.app.sesId=Hi.isString(n.id)?n.id:e.automaticSession.id)},t.prototype.applyOperatingSystemContxt=function(t){var n=this.os;n&&n.name&&(t.ext.os=n)},t.prototype.applyApplicationContext=function(t){var n=this.application;n&&(Hi.isString(n.ver)&&(t.tags[yo.applicationVersion]=n.ver),Hi.isString(n.build)&&(t.tags[yo.applicationBuild]=n.build))},t.prototype.applyDeviceContext=function(t){var n=this.device;n&&(Hi.isString(n.id)&&(t.ext.device.localId=n.id),Hi.isString(n.ip)&&(t.ext.device.ip=n.ip),Hi.isString(n.model)&&(t.ext.device.model=n.model),Hi.isString(n.deviceClass)&&(t.ext.device.deviceClass=n.deviceClass))},t.prototype.applyInternalContext=function(t){var n=this.internal;n&&(Hi.isString(n.agentVersion)&&(t.tags[yo.internalAgentVersion]=n.agentVersion),Hi.isString(n.sdkVersion)&&(t.tags[yo.internalSdkVersion]=n.sdkVersion),t.baseType!==cr.dataType&&t.baseType!==fo.dataType||(Hi.isString(n.snippetVer)&&(t.tags[yo.internalSnippet]=n.snippetVer),Hi.isString(n.sdkSrc)&&(t.tags[yo.internalSdkSrc]=n.sdkSrc)))},t.prototype.applyLocationContext=function(t){var n=this.location;n&&Hi.isString(n.ip)&&(t.tags[yo.locationIp]=n.ip)},t.prototype.applyOperationContext=function(t){var n=this.telemetryTrace;if(n){var e=t.ext.trace||{traceID:void 0,parentID:void 0};Hi.isString(n.traceID)&&(e.traceID=n.traceID),Hi.isString(n.name)&&(e.name=n.name),Hi.isString(n.parentID)&&(e.parentID=n.parentID),t.ext.trace=e}},t.prototype.applyWebContext=function(t){var n=this.web;n&&(t.ext.web=t.ext.web||{},t.ext.web=n)},t.prototype.applyUserContext=function(t){var n=this.user;n&&(t.tags||(t.tags=[]),Hi.isString(n.accountId)&&(t.tags[yo.userAccountId]=n.accountId),Hi.isString(n.id)&&(t.ext.user.id=n.id),Hi.isString(n.authenticatedId)&&(t.ext.user.authId=n.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[wo.DeviceExt]&&0===Hi.objKeys(t.ext[wo.DeviceExt]).length&&delete t.ext[wo.DeviceExt],t.ext[wo.UserExt]&&0===Hi.objKeys(t.ext[wo.UserExt]).length&&delete t.ext[wo.UserExt],t.ext[wo.WebExt]&&0===Hi.objKeys(t.ext[wo.WebExt]).length&&delete t.ext[wo.WebExt],t.ext[wo.OSExt]&&0===Hi.objKeys(t.ext[wo.OSExt]).length&&delete t.ext[wo.OSExt],t.ext[wo.AppExt]&&0===Hi.objKeys(t.ext[wo.AppExt]).length&&delete t.ext[wo.AppExt],t.ext[wo.TraceExt]&&0===Hi.objKeys(t.ext[wo.TraceExt]).length&&delete t.ext[wo.TraceExt]},t}(),es=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.priority=110,n.identifier="AppInsightsPropertiesPlugin",n}return __extends(n,t),n.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},idLength:function(){return 22}}},n.prototype.initialize=function(e,i,r,o){var s=this;t.prototype.initialize.call(this,e,i,r,o);var a=this._getTelCtx(),c=this.identifier,u=n.getDefaultConfig();this._extensionConfig=this._extensionConfig||n.getDefaultConfig(),zi(u,(function(t,n){s._extensionConfig[t]=function(){return a.getConfig(c,t,n())}})),this.context=new ns(i.logger,this._extensionConfig),this._breezeChannel=Qr.getExtension(r,"AppInsightsChannelPlugin"),this.context.appId=function(){return s._breezeChannel?s._breezeChannel._appId:null}},n.prototype.processTelemetry=function(t,n){if(Hi.isNullOrUndefined(t));else{if(n=this._getTelCtx(n),t.name===fo.envelopeType&&n.diagLog().resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t,n),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var e=new cr(72,(Si()||{}).userAgent||"");n.diagLog().logInternalMessage(Vi.CRITICAL,e)}this.processNext(t,n)}},n.prototype._processTelemetryInternal=function(t,n){t.tags||(t.tags=[]),t.ext||(t.ext={});var e=t.ext;e[wo.DeviceExt]=e[wo.DeviceExt]||{},e[wo.WebExt]=e[wo.WebExt]||{},e[wo.UserExt]=e[wo.UserExt]||{},e[wo.OSExt]=e[wo.OSExt]||{},e[wo.AppExt]=e[wo.AppExt]||{},e[wo.TraceExt]=e[wo.TraceExt]||{};var i=this.context;i.applySessionContext(t,n),i.applyApplicationContext(t,n),i.applyDeviceContext(t,n),i.applyOperationContext(t,n),i.applyUserContext(t,n),i.applyOperatingSystemContxt(t,n),i.applyWebContext(t,n),i.applyLocationContext(t,n),i.applyInternalContext(t,n),i.cleanUp(t,n)},n}(wr),is=Hi.objKeys,rs=Hi.arrForEach;function os(t,n,e){var i=0,r=t[n],o=t[e];return r&&o&&(i=Xr.GetDuration(r,o)),i}function ss(t,n,e,i,r){var o=0,s=os(e,i,r);return s&&(o=as(t,n,Qr.msToTimeSpan(s))),o}function as(t,n,e){var i=0;return t&&n&&e&&((t.ajaxPerf=t.ajaxPerf||{})[n]=e,i=1),i}var cs=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},us=function t(n,e,i){var r=this,o=i;r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new cs,r.clientFailure=0,r.traceID=n,r.spanID=e,sr(t,r,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?Wr.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?Lr.sanitizeUrl(o,Wr.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(n,e,i){if(t.ajaxTotalDuration=Math.round(1e3*Xr.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var r,o=((r={id:"|"+t.traceID+"."+t.spanID,target:t.getAbsoluteUrl(),name:t.getPathName(),type:n,duration:t.ajaxTotalDuration,success:+t.status>=200&&+t.status<400,responseCode:+t.status,method:t.method}).properties={HttpMethod:t.method},r);if(function(t,n){var e=t.perfTiming,i=n.properties||{},r=0,o=Hi.isString,s="redirect",a="startTime",c="connectEnd",u="requestStart",l="responseEnd",f=s+"Start",d=s="End";if(e){r|=ss(i,s,e,f,d),r|=ss(i,"domainLookup",e,"domainLookupStart","domainLookupEnd"),r|=ss(i,"connect",e,"connectStart",c),r|=ss(i,"request",e,u,"requestEnd"),r|=ss(i,"response",e,"responseStart",l),r|=ss(i,"networkConnect",e,a,c),r|=ss(i,"sentRequest",e,u,l);var h=e.duration;h||(h=os(e,a,l)||0),r|=as(i,"duration",h),r|=as(i,"perfTotal",h);var p=e.serverTiming;if(p){var v={};rs(p,(function(t,n){var e=function(t){var n=t,e=/([^\w\d_$])/g;return e.test(t)&&(n=t.replace(e,"_")),n}(t.name||""+n),i=v[e]||{};zi(t,(function(t,n){("name"!==t&&o(n)||Hi.isNumber(n))&&(i[t]&&(n=i[t]+";"+n),!n&&o(n)||(i[t]=n))})),v[e]=i})),r|=as(i,"serverTiming",v)}r|=as(i,"transferSize",e.transferSize),r|=as(i,"encodedBodySize",e.encodedBodySize),r|=as(i,"decodedBodySize",e.decodedBodySize)}else t.perfMark&&(r|=as(i,"missing",t.perfAttempts));r&&(n.properties=i)}(t,o),e&&is(t.requestHeaders).length>0&&(o.properties=o.properties||{},o.properties.requestHeaders=t.requestHeaders),i){var s=i();if(s){var a=s.correlationContext;if(a&&(o.correlationContext=a),s.headerMap&&is(s.headerMap).length>0&&(o.properties=o.properties||{},o.properties.responseHeaders=s.headerMap),t.status>=400){var c=s.type;o.properties=o.properties||{},""!==c&&"text"!==c||(o.properties.responseText=s.responseText?s.statusText+" - "+s.responseText:s.statusText),"json"===c&&(o.properties.responseText=s.response?s.statusText+" - "+JSON.stringify(s.response):s.statusText)}}}return o}}))},ls=function(){function t(n,e){var i=this;i.traceFlag=t.DEFAULT_TRACE_FLAG,i.version=t.DEFAULT_VERSION,i.traceId=n&&t.isValidTraceId(n)?n:Qr.generateW3CId(),i.spanId=e&&t.isValidSpanId(e)?e:Qr.generateW3CId().substr(0,16)}return t.isValidTraceId=function(t){return t.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==t},t.isValidSpanId=function(t){return t.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==t},t.prototype.toString=function(){var t=this;return t.version+"-"+t.traceId+"-"+t.spanId+"-"+t.traceFlag},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t}(),fs=Hi.isNullOrUndefined,ds=Hi.arrForEach,hs=0;function ps(t){var n="";try{fs(t)||fs(t.ajaxData)||fs(t.ajaxData.requestUrl)||(n+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return n}function vs(t,n,e,i,r){t.diagLog().throwInternal(Vi.CRITICAL,n,e,i,r)}function ms(t,n,e,i,r){t.diagLog().throwInternal(Vi.WARNING,n,e,i,r)}function bs(t,n,e){return function(i){vs(t,n,e,{ajaxDiagnosticsMessage:ps(i.inst),exception:Qr.dump(i.err)})}}function gs(t,n){return t&&n?t.indexOf(n):-1}var ws,ys=function(t){function n(){var e=t.call(this)||this;e.identifier=n.identifier,e.priority=120;var i,r,o,s,a=Ci(),c=!1,u=!1,l=a&&a.host&&a.host.toLowerCase(),f=n.getEmptyConfig(),d=!1,h=0,p=!1,v=0,m=!1,b=[],g={};return sr(n,e,(function(t,e){function a(t,n,e){b.push(function(t,n,e){return t?Dr(t.prototype,n,e,!1):null}(t,n,e))}function w(t,n,e){var i=!1,r=((Hi.isString(n)?n:(n||{}).url||"")||"").toLowerCase(),o=gs(r,"?"),s=gs(r,"#");return(-1===o||-1!==s&&s<o)&&(o=s),-1!==o&&(r=r.substring(0,o)),fs(t)?fs(n)||(i="object"==typeof n&&!0===n[Gr]||!!e&&!0===e[Gr]):i=!0===t[Gr]||!0===r[Gr],i?g[r]||(g[r]=1):g[r]&&(i=!0),i}function y(t,n){var e=!0,i=u;return fs(t)||(e=!0===n||!fs(t.ajaxData)),i&&e}function x(t){try{var n=t.responseType;if(""===n||"text"===n)return t.responseText}catch(t){}return null}function k(n){try{var e=n.getAllResponseHeaders();if(null!==e&&-1!==gs(e.toLowerCase(),Ur.requestContextHeaderLowerCase)){var i=n.getResponseHeader(Ur.requestContextHeader);return $r.getCorrelationContext(i)}}catch(e){ms(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:ps(n),exception:Qr.dump(e)})}}function S(t,n){if(n.requestUrl&&s&&p){var e=Ai();if(e&&Hi.isFunction(e.mark)){hs++;var i=s+t+"#"+hs;e.mark(i);var r=e.getEntriesByName(i);r&&1===r.length&&(n.perfMark=r[0])}}}function C(t,n,e,i){var r=n.perfMark,o=Ai(),s=f.maxAjaxPerfLookupAttempts,a=f.ajaxPerfLookupDelay,c=n.requestUrl,u=0;!function l(){try{if(o&&r){u++;for(var f=null,d=o.getEntries(),h=d.length-1;h>=0;h--){var p=d[h];if(p){if("resource"===p.entryType)p.initiatorType!==t||-1===gs(p.name,c)&&-1===gs(c,p.name)||(f=p);else if("mark"===p.entryType&&p.name===r.name){n.perfTiming=f;break}if(p.startTime<r.startTime-1e3)break}}}!r||n.perfTiming||u>=s||!1===n.async?(r&&Hi.isFunction(o.clearMarks)&&o.clearMarks(r.name),n.perfAttempts=u,e()):setTimeout(l,a)}catch(t){i(t)}}()}function A(n){var e="";try{fs(n)||(e+="string"==typeof n?"(url: '"+n+"')":"(url: '"+n.url+"')")}catch(n){vs(t,15,"Failed to grab failed fetch diagnostics message",{exception:Qr.dump(n)})}return e}function _(n,e,i,r,o){function s(n,e,r){var o=r||{};o.fetchDiagnosticsMessage=A(i),e&&(o.exception=Qr.dump(e)),ms(t,n,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",o)}r&&(r.responseFinishedTime=Xr.Now(),r.status=e,C("fetch",r,(function(){var n=r.CreateTrackItem("Fetch",d,o);n?t.trackDependencyDataInternal(n):s(14,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(t){s(18,t,null)})))}function q(n){if(n&&n.headers)try{var e=n.headers.get(Ur.requestContextHeader);return $r.getCorrelationContext(e)}catch(e){ms(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:A(n),exception:Qr.dump(e)})}}t.initialize=function(l,h,g,A){if(!t.isInitialized()){e.initialize(l,h,g,A);var B=t._getTelCtx();zi(n.getDefaultConfig(),(function(t,e){f[t]=B.getConfig(n.identifier,t,e)}));var E=f.distributedTracingMode;if(d=f.enableRequestHeaderTracking,v=f.maxAjaxCallsPerView,m=f.enableResponseHeaderTracking,o=E===Mr.AI||E===Mr.AI_AND_W3C,r=E===Mr.AI_AND_W3C||E===Mr.W3C,p=f.enableAjaxPerfTracking){var j=l.instrumentationKey||"unkwn";s=j.length>5?"ai.ajxmn."+j.substring(j.length-5)+".":"ai.ajxmn."+j+"."}if(!1===f.disableAjaxTracking&&function(t){var n=!1;if("undefined"!=typeof XMLHttpRequest&&!fs(XMLHttpRequest)){var e=XMLHttpRequest.prototype;n=!(fs(e)||fs(e.open)||fs(e.send)||fs(e.abort))}var i=Qr.getIEVersion();if(i&&i<9&&(n=!1),n)try{(new XMLHttpRequest).ajaxData={};var r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=r}catch(e){n=!1,vs(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Qr.dump(e)})}return n}(t)&&!u&&(a(XMLHttpRequest,"open",{req:function(n,e,r,o){var s=n.inst,a=s.ajaxData;w(s,r)||!y(s,!0)||a&&a.xhrMonitoringState.openDone||function(n,e,r,o){var s=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Qr.generateW3CId(),a=Qr.generateW3CId().substr(0,16),c=new us(s,a,t.diagLog());c.method=e,c.requestUrl=r,c.xhrMonitoringState.openDone=!0,c.requestHeaders={},c.async=o,n.ajaxData=c,function(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=Wi.Attach(n,"readystatechange",(function(){try{n&&4===n.readyState&&y(n)&&function(n){var e=n.ajaxData;function i(e,i){var r=i||{};r.ajaxDiagnosticsMessage=ps(n),e&&(r.exception=Qr.dump(e)),ms(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}e.responseFinishedTime=Xr.Now(),e.status=n.status,C("xmlhttprequest",e,(function(){try{var r=e.CreateTrackItem("Ajax",d,(function(){var t={statusText:n.statusText,headerMap:null,correlationContext:k(n),type:n.responseType,responseText:x(n),response:n.response};if(m){var e=n.getAllResponseHeaders();if(e){var i=Hi.strTrim(e).split(/[\r\n]+/),r={};ds(i,(function(t){var n=t.split(": "),e=n.shift(),i=n.join(": ");r[e]=i})),t.headerMap=r}}return t}));r?t.trackDependencyDataInternal(r):i(null,{requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime})}finally{try{n.ajaxData=null}catch(t){}}}),(function(t){i(t,null)}))}(n)}catch(i){var e=Qr.dump(i);e&&-1!==gs(e.toLowerCase(),"c00c023f")||vs(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:ps(n),exception:e})}}))}(n)}(s,e,r,o)},hkErr:bs(t,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"send",{req:function(n){var e=n.inst,i=e.ajaxData;y(e)&&!i.xhrMonitoringState.sendDone&&(S("xhr",i),i.requestSentTime=Xr.Now(),e=t.includeCorrelationHeaders(i,void 0,void 0,e),i.xhrMonitoringState.sendDone=!0)},hkErr:bs(t,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"abort",{req:function(t){var n=t.inst,e=n.ajaxData;y(n)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:bs(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),d&&a(XMLHttpRequest,"setRequestHeader",{req:function(t,n,e){var i=t.inst;y(i)&&(i.ajaxData.requestHeaders[n]=e)},hkErr:bs(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),u=!0),function(){var n,e=!(n=bi())||fs(n.Request)||fs(n.Request.prototype)||fs(n.fetch)?null:n.fetch;if(e){var r=bi(),o=e.polyfill;!1===f.disableFetchTracking?(b.push(Dr(r,"fetch",{req:function(n,e,r){var s;if(c&&!w(null,e,r)&&(!o||!u)){var a=n.ctx();s=function(n,e){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Qr.generateW3CId(),o=Qr.generateW3CId().substr(0,16),s=new us(r,o,t.diagLog());s.requestSentTime=Xr.Now(),s.requestUrl=n instanceof Request?n?n.url:"":n;var a="GET";e&&e.method?a=e.method:n&&n instanceof Request&&(a=n.method),s.method=a;var c={};return d&&new Headers((e?e.headers:0)||n instanceof Request&&n.headers||{}).forEach((function(t,n){c[n]=t})),s.requestHeaders=c,S("fetch",s),s}(e,r);var l=t.includeCorrelationHeaders(s,e,r);l!==r&&n.set(1,l),a.data=s}},rsp:function(t,n){var e=t.ctx().data;e&&(t.rslt=t.rslt.then((function(t){return _(0,(t||{}).status,t,e,(function(){var n={statusText:t.statusText,headerMap:null,correlationContext:q(t)};if(m){var e={};t.headers.forEach((function(t,n){e[n]=t})),n.headerMap=e}return n})),t})).catch((function(t){throw _(0,0,n,e,null),t})))},hkErr:bs(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),c=!0):o&&b.push(Dr(r,"fetch",{req:function(t,n,e){w(null,n,e)}})),o&&(r.fetch.polyfill=o)}}(),g.length>0&&g){for(var I=void 0,F=0;!I&&F<g.length;)g[F]&&"AppInsightsPropertiesPlugin"===g[F].identifier&&(I=g[F]),F++;I&&(i=I.context)}}},t.teardown=function(){ds(b,(function(t){t.rm()})),b=[],c=!1,u=!1,t.setInitialized(!1)},t.trackDependencyData=function(n,e){t.trackDependencyDataInternal(n,e)},t.includeCorrelationHeaders=function(n,e,s,a){var c=t._currentWindowHost||l;if(e){if($r.canIncludeCorrelationHeader(f,n.getAbsoluteUrl(),c)&&(s||(s={}),s.headers=new Headers(s.headers||e instanceof Request&&e.headers||{}),o&&(s.headers.set(Ur.requestIdHeader,h="|"+n.traceID+"."+n.spanID),d&&(n.requestHeaders[Ur.requestIdHeader]=h)),(p=f.appId||i&&i.appId())&&(s.headers.set(Ur.requestContextHeader,Ur.requestContextAppIdFormat+p),d&&(n.requestHeaders[Ur.requestContextHeader]=Ur.requestContextAppIdFormat+p)),r)){var u=new ls(n.traceID,n.spanID);s.headers.set(Ur.traceParentHeader,u.toString()),d&&(n.requestHeaders[Ur.traceParentHeader]=u.toString())}return s}if(a){var h,p;if($r.canIncludeCorrelationHeader(f,n.getAbsoluteUrl(),c))o&&(a.setRequestHeader(Ur.requestIdHeader,h="|"+n.traceID+"."+n.spanID),d&&(n.requestHeaders[Ur.requestIdHeader]=h)),(p=f.appId||i&&i.appId())&&(a.setRequestHeader(Ur.requestContextHeader,Ur.requestContextAppIdFormat+p),d&&(n.requestHeaders[Ur.requestContextHeader]=Ur.requestContextAppIdFormat+p)),r&&(u=new ls(n.traceID,n.spanID),a.setRequestHeader(Ur.traceParentHeader,u.toString()),d&&(n.requestHeaders[Ur.traceParentHeader]=u.toString()));return a}},t.trackDependencyDataInternal=function(n,e,i){if(-1===v||h<v){f.distributedTracingMode!==Mr.W3C&&f.distributedTracingMode!==Mr.AI_AND_W3C||"string"!=typeof n.id||"."===n.id[n.id.length-1]||(n.id+="."),Hi.isNullOrUndefined(n.startTime)&&(n.startTime=new Date);var r=go.create(n,ho.dataType,ho.envelopeType,t.diagLog(),e,i);t.core.track(r)}else h===v&&vs(t,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++h}})),e}return __extends(n,t),n.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:Mr.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},n.getEmptyConfig=function(){var t=this.getDefaultConfig();return zi(t,(function(n){t[n]=void 0})),t},n.prototype.processTelemetry=function(t,n){this.processNext(t,n)},n.identifier="AjaxDependencyPlugin",n}(wr),xs=function(){function t(t){var n=this;n._snippetVersion=""+(t.sv||t.version||""),t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};if(e.connectionString){var i=Yr.parse(e.connectionString),r=i.ingestionendpoint;e.endpointUrl=r?r+"/v2/track":e.endpointUrl,e.instrumentationKey=i.instrumentationkey||e.instrumentationKey}n.appInsights=new _o,n.properties=new es,n.dependencies=new ys,n.core=new Er,n.snippet=t,n.config=e,n.getSKUDefaults()}return t.prototype.trackEvent=function(t,n){this.appInsights.trackEvent(t,n)},t.prototype.trackPageView=function(t){this.appInsights.trackPageView(t||{})},t.prototype.trackPageViewPerformance=function(t){this.appInsights.trackPageViewPerformance(t||{})},t.prototype.trackException=function(t){!t.exception&&t.error&&(t.exception=t.error),this.appInsights.trackException(t)},t.prototype._onerror=function(t){this.appInsights._onerror(t)},t.prototype.trackTrace=function(t,n){this.appInsights.trackTrace(t,n)},t.prototype.trackMetric=function(t,n){this.appInsights.trackMetric(t,n)},t.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},t.prototype.stopTrackPage=function(t,n,e,i){this.appInsights.stopTrackPage(t,n,e,i)},t.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},t.prototype.stopTrackEvent=function(t,n,e){this.appInsights.stopTrackEvent(t,n,e)},t.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},t.prototype.setAuthenticatedUserContext=function(t,n,e){void 0===e&&(e=!1),this.properties.context.user.setAuthenticatedUserContext(t,n,e)},t.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},t.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},t.prototype.flush=function(t){var n=this;void 0===t&&(t=!0),dr(this.core,(function(){return"AISKU.flush"}),(function(){Hi.arrForEach(n.core.getTransmissionControls(),(function(n){Hi.arrForEach(n,(function(n){n.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),Hi.arrForEach(this.core.getTransmissionControls(),(function(n){Hi.arrForEach(n,(function(n){n.onunloadFlush?n.onunloadFlush():n.flush(t)}))}))},t.prototype.loadAppInsights=function(t,n,e){var i=this;void 0===t&&(t=!1);var r=this;if(t&&r.config.extensions&&r.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return dr(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var o=[],s=new Wo;o.push(s),o.push(r.properties),o.push(r.dependencies),o.push(r.appInsights),r.core.initialize(r.config,o,n,e),r.context=r.properties.context,ws&&r.context&&(r.context.internal.sdkSrc=ws),function(n){if(n){var e="";Hi.isNullOrUndefined(r._snippetVersion)||(e+=r._snippetVersion),t&&(e+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=e||"-"),zi(r,(function(t,e){Hi.isString(t)&&!Hi.isFunction(e)&&"_"!==t.substring(0,1)&&(n[t]=e)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},t.prototype.updateSnippetDefinitions=function(t){zi(this,(function(n,e){Hi.isString(n)&&(t[n]=e)}))},t.prototype.emptyQueue=function(){var t=this;try{if(Qr.isArray(t.snippet.queue)){for(var n=t.snippet.queue.length,e=0;e<n;e++)(0,t.snippet.queue[e])();t.snippet.queue=void 0,delete t.snippet.queue}}catch(t){t&&Hi.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(wi()||xi()){var n=function(){t.onunloadFlush(!1);var n=t.appInsights.core._extensions.AppInsightsPropertiesPlugin;n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup()};if(!t.appInsights.config.disableFlushOnBeforeUnload){var e=Hi.addEventHandler("beforeunload",n);(e=Hi.addEventHandler("pagehide",n)||e)||(i=Si())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(Vi.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||Hi.addEventHandler("pagehide",n)}var i},t.prototype.getSKUDefaults=function(){var t=this;t.config.diagnosticLogInterval=t.config.diagnosticLogInterval&&t.config.diagnosticLogInterval>0?t.config.diagnosticLogInterval:1e4},t}();
11
11
  /*!
12
12
  * Application Insights JavaScript SDK - Web, 2.5.10
13
13
  * Copyright (c) Microsoft and contributors. All rights reserved.
14
- */!function(){var t=null,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var e=(document||{}).currentScript;e&&(t=e.src)}catch(t){}if(t)try{var i=t.toLowerCase();if(i)for(var r="",o=0;o<n.length;o++)if(-1!==i.indexOf(n[o])){r="cdn"+(o+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),ws=r+"";break}}catch(t){}}();const ks=new class extends w{constructor(t){super(t),this.store=t,this.appConfiguration$=this.select((t=>t.appConfiguration))}get configuration(){const t=this.getValue().appConfiguration;if(O(t))throw Error("App configuration is not yet loaded");return t.value}}(Zn),Ss=new class{constructor(){this.appInsights=new V((()=>new xs({config:{instrumentationKey:ks.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),u((t=>this.appInsightsErrorHandler(t)))}getAppInsights(){return this.appInsights.value}addCustomProperties(t){this.appInsights.value.addTelemetryInitializer((n=>{n.data=n.data?n.data:{};for(const[e,i]of Object.entries(t))n.data[e]=i}))}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:ao.Error}),(t=>{console.error(t)})(t)}},Cs=new class extends w{constructor(t){super(t),this.store=t,this.sessionState$=this.select((t=>t.authenticationState)),this.jwt$=this.select((t=>t.jwt))}get sessionState(){return this.getValue().authenticationState}get isUnauthorized(){return this.getValue().authenticationState===Gn.Unauthorized||this.getValue().authenticationState===Gn.Error}get isAuthorized(){return this.getValue().authenticationState===Gn.Authenticated}}(Zn),As=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const n=this.getAuthorizationCodeFromRoute(t);return jt.isSome(n)}initFromRoute(t){const n=this.getAuthorizationCodeFromRoute(t);if(jt.isNone(n))throw Zn.update({authenticationState:Gn.Error}),Error(`"${this.authCodeQueryParameter}" URL query parameter missing`);this.authCodeExchangeAsync(n.value)}async authCodeExchangeAsync(t){const n=new URLSearchParams([["grant_type","authorization_code"],["client_id","apollo-super-selection-app"],["code",t],["redirect_uri",""+li.getAppHostUrl()]]),e=await Xt(ks.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(n.toString()).badRequest((()=>{throw Zn.update({authenticationState:Gn.Error}),new Error("Failed to authenticate.")})).json();Zn.update({jwt:jt.fromNullable(e.access_token),authenticationState:Gn.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",li.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const n=new URLSearchParams(t);return jt.fromNullable(n.get(this.authCodeQueryParameter))}};class _s{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=te.getIframeInteropMode();jt.isSome(t)?window.top.location.href=t.value:St()}static initFromRoute(t){const n=new URLSearchParams(t),e=jt.fromNullable(n.get("success-redirection-url")),i={successRedirectionUrl:jt.none};if(jt.isSome(e))try{const t=new URL(e.value);i.successRedirectionUrl=jt.some(t.toString())}catch(t){throw Error(`"${e.value}" is not a valid URL`)}return i}}class qs{static init(){if(void 0===window.ReactNativeWebView)throw Error("React Native WebView messaging is not enabled. Please, refer to https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#the-windowreactnativewebviewpostmessage-method-and-onmessage-prop");return new Kn}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){qs.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}qs.getRnInterop=()=>window.ReactNativeWebView;const Bs=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(te.isIframeInteropEnabled())_s.completeSuperSelectionStep();else{if(!te.isReactNativeInteropEnabled())throw Error("Unknown interop mode");qs.completeSuperSelectionStep()}}init(t){const n=z(new URLSearchParams(t).get(this.interopModeQueryParameter));D(n)&&"react-native"===n.value?Zn.update({reactNativeInterop:L(qs.init())}):Zn.update({iframeInterop:L(_s.initFromRoute(t))})}};const Es=class{constructor(n){t(this,n),this.areStylesLoaded=!1}async componentWillLoad(){await async function(){await li.loadConfigurationAsync(),Ss.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(Cs.isUnauthorized||As.authorizationCodeIsPresent(window.location.search))&&(Bs.init(window.location.search),As.initFromRoute(window.location.search))}(),Cs.sessionState$.subscribe((t=>this.sessionState=t)),Cs.jwt$.subscribe((t=>this.jwt=t)),ks.appConfiguration$.subscribe((t=>this.appConfiguration=t))}render(){return jt.isNone(this.appConfiguration)?n("sss-loading-page",null):n(o,{class:"d-flex flex-fill flex-column justify-content-between"},this.fetchStyles(),this.areStylesLoaded&&this.renderAppContent())}fetchStyles(){return[n("link",{rel:"stylesheet",href:"https://npm-cdn.flarehr.com/@flarehr/beacon@dev/dist/beacon/beacon.css",media:"all",onLoad:()=>this.areStylesLoaded=!0})]}renderAppContent(){return n("stencil-router",{root:li.getAppRootUrl(),class:"sss-app-container"},n("stencil-route-switch",{scrollTopOffset:0},n("stencil-route",{ref:t=>this.observeContentResize(t),url:"/",routeRender:this.renderProtectedRoute((t=>n("super-selection-app",Object.assign({accessToken:jt.toUndefined(this.jwt),backendUrl:ks.configuration.ApiBaseUrl,appBaseUrl:this.getAppBaseUrl(),slateJoinAppUrl:ks.configuration.SlateJoinAppPostUrl,onSuccessPageAcknowledged:this.handleSuccessPageAcknowledged,"onStep-completion":this.handleStepSubmitSuccess,onInitialised:this.handleAppInitialised},t))))})))}getAppBaseUrl(){return window.location.pathname.split("app")[0]+"app/"}handleSuccessPageAcknowledged(){Bs.completeSuperSelectionStep()}handleStepSubmitSuccess(){Ct()}handleAppInitialised(t){Ss.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),Ss.getAppInsights().trackPageView();const n=document.getElementById("sss-external-loading-page-container");n&&document.body.removeChild(n)}observeContentResize(t){new(window.ResizeObserver||ui)((()=>{xt(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case Gn.Authenticated:return t;case Gn.Unauthorized:return()=>n("sss-loading-page",null);case Gn.Error:return()=>n("h1",null,"Authentication Error")}}};Es.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.sss-app-container{--fl-color-primary:#00aa65;--fl-color-primary-light:#66d7a9;--fl-color-primary-dark:#00aa65;--fl-color-primary-disabled:#66d7a9;--fl-color-primary-hover:#00aa65;--fl-color-primary-focus:#00aa65;--fl-color-primary-text:white;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{ft as fl_button,pt as fl_dropdown,vt as fl_dropdown_async,mt as fl_loading_indicator,gt as fl_promise_button,cn as sss_custom_fund,vn as sss_default_fund,mn as sss_footer_section,bn as sss_loading_page,gn as sss_my_own_fund,wn as sss_my_own_fund_inputs,yn as sss_notifications_section,xn as sss_qsuper_confirm_header,En as sss_qsuper_consent,Fn as sss_qsuper_insurance_opt_in,Pn as sss_qsuper_insurance_questions,Rn as sss_qsuper_join,Tn as sss_qsuper_layout,Nn as sss_qsuper_question_1,Dn as sss_qsuper_question_2,On as sss_qsuper_question_3,Un as sss_qsuper_question_4,Ln as sss_qsuper_question_5,zn as sss_qsuper_question_6,Vn as sss_qsuper_question_7,Hn as sss_qsuper_question_8,Qn as sss_qsuper_question_yes_no_buttons,Wn as sss_selected_super_choice_section,$n as sss_self_managed_fund,Xn as sss_self_managed_fund_inputs,ie as sss_slate_join_page,oe as sss_slate_standard_choice_page,se as sss_slatesuper_header,ae as sss_standard_choice_form,ce as sss_success,ue as sss_super_choice_item,fe as sss_super_choice_page,de as stencil_route,ve as stencil_route_link,be as stencil_route_switch,Ce as stencil_router,Ae as super_selection_app,Es as super_selection_app_host}
14
+ */!function(){var t=null,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var e=(document||{}).currentScript;e&&(t=e.src)}catch(t){}if(t)try{var i=t.toLowerCase();if(i)for(var r="",o=0;o<n.length;o++)if(-1!==i.indexOf(n[o])){r="cdn"+(o+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),ws=r+"";break}}catch(t){}}();const ks=new class extends w{constructor(t){super(t),this.store=t,this.appConfiguration$=this.select((t=>t.appConfiguration))}get configuration(){const t=this.getValue().appConfiguration;if(O(t))throw Error("App configuration is not yet loaded");return t.value}}(Zn),Ss=new class{constructor(){this.appInsights=new V((()=>new xs({config:{instrumentationKey:ks.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),u((t=>this.appInsightsErrorHandler(t)))}getAppInsights(){return this.appInsights.value}addCustomProperties(t){this.appInsights.value.addTelemetryInitializer((n=>{n.data=n.data?n.data:{};for(const[e,i]of Object.entries(t))n.data[e]=i}))}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:ao.Error}),(t=>{console.error(t)})(t)}},Cs=new class extends w{constructor(t){super(t),this.store=t,this.sessionState$=this.select((t=>t.authenticationState)),this.jwt$=this.select((t=>t.jwt))}get sessionState(){return this.getValue().authenticationState}get isUnauthorized(){return this.getValue().authenticationState===Gn.Unauthorized||this.getValue().authenticationState===Gn.Error}get isAuthorized(){return this.getValue().authenticationState===Gn.Authenticated}}(Zn),As=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const n=this.getAuthorizationCodeFromRoute(t);return jt.isSome(n)}initFromRoute(t){const n=this.getAuthorizationCodeFromRoute(t);if(jt.isNone(n))throw Zn.update({authenticationState:Gn.Error}),Error(`"${this.authCodeQueryParameter}" URL query parameter missing`);this.authCodeExchangeAsync(n.value)}async authCodeExchangeAsync(t){const n=new URLSearchParams([["grant_type","authorization_code"],["client_id","apollo-super-selection-app"],["code",t],["redirect_uri",""+li.getAppHostUrl()]]),e=await Xt(ks.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(n.toString()).badRequest((()=>{throw Zn.update({authenticationState:Gn.Error}),new Error("Failed to authenticate.")})).json();Zn.update({jwt:jt.fromNullable(e.access_token),authenticationState:Gn.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",li.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const n=new URLSearchParams(t);return jt.fromNullable(n.get(this.authCodeQueryParameter))}};class _s{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=te.getIframeInteropMode();jt.isSome(t)?window.top.location.href=t.value:St()}static initFromRoute(t){const n=new URLSearchParams(t),e=jt.fromNullable(n.get("success-redirection-url")),i={successRedirectionUrl:jt.none};if(jt.isSome(e))try{const t=new URL(e.value);i.successRedirectionUrl=jt.some(t.toString())}catch(t){throw Error(`"${e.value}" is not a valid URL`)}return i}}class qs{static init(){if(void 0===window.ReactNativeWebView)throw Error("React Native WebView messaging is not enabled. Please, refer to https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#the-windowreactnativewebviewpostmessage-method-and-onmessage-prop");return new Yn}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){qs.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}qs.getRnInterop=()=>window.ReactNativeWebView;const Bs=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(te.isIframeInteropEnabled())_s.completeSuperSelectionStep();else{if(!te.isReactNativeInteropEnabled())throw Error("Unknown interop mode");qs.completeSuperSelectionStep()}}init(t){const n=z(new URLSearchParams(t).get(this.interopModeQueryParameter));D(n)&&"react-native"===n.value?Zn.update({reactNativeInterop:L(qs.init())}):Zn.update({iframeInterop:L(_s.initFromRoute(t))})}};const Es=class{constructor(n){t(this,n),this.areStylesLoaded=!1}async componentWillLoad(){await async function(){await li.loadConfigurationAsync(),Ss.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(Cs.isUnauthorized||As.authorizationCodeIsPresent(window.location.search))&&(Bs.init(window.location.search),As.initFromRoute(window.location.search))}(),Cs.sessionState$.subscribe((t=>this.sessionState=t)),Cs.jwt$.subscribe((t=>this.jwt=t)),ks.appConfiguration$.subscribe((t=>this.appConfiguration=t))}render(){return jt.isNone(this.appConfiguration)?n("sss-loading-page",null):n(o,{class:"d-flex flex-fill flex-column justify-content-between"},this.fetchStyles(),this.areStylesLoaded&&this.renderAppContent())}fetchStyles(){return[n("link",{rel:"stylesheet",href:"https://npm-cdn.flarehr.com/@flarehr/beacon@dev/dist/beacon/beacon.css",media:"all",onLoad:()=>this.areStylesLoaded=!0})]}renderAppContent(){return n("stencil-router",{root:li.getAppRootUrl(),class:"sss-app-container"},n("stencil-route-switch",{scrollTopOffset:0},n("stencil-route",{ref:t=>this.observeContentResize(t),url:"/",routeRender:this.renderProtectedRoute((t=>n("super-selection-app",Object.assign({accessToken:jt.toUndefined(this.jwt),backendUrl:ks.configuration.ApiBaseUrl,appBaseUrl:this.getAppBaseUrl(),slateJoinAppUrl:ks.configuration.SlateJoinAppPostUrl,onSuccessPageAcknowledged:this.handleSuccessPageAcknowledged,"onStep-completion":this.handleStepSubmitSuccess,onInitialised:this.handleAppInitialised},t))))})))}getAppBaseUrl(){return window.location.pathname.split("app")[0]+"app/"}handleSuccessPageAcknowledged(){Bs.completeSuperSelectionStep()}handleStepSubmitSuccess(){Ct()}handleAppInitialised(t){Ss.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),Ss.getAppInsights().trackPageView();const n=document.getElementById("sss-external-loading-page-container");n&&document.body.removeChild(n)}observeContentResize(t){new(window.ResizeObserver||ui)((()=>{xt(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case Gn.Authenticated:return t;case Gn.Unauthorized:return()=>n("sss-loading-page",null);case Gn.Error:return()=>n("h1",null,"Authentication Error")}}};Es.style="html{scroll-behavior:smooth}img.fluid-fit{-o-object-fit:cover;object-fit:cover}.sss-app-container{--fl-color-primary:#00aa65;--fl-color-primary-light:#66d7a9;--fl-color-primary-dark:#00aa65;--fl-color-primary-disabled:#66d7a9;--fl-color-primary-hover:#00aa65;--fl-color-primary-focus:#00aa65;--fl-color-primary-text:white;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{ft as fl_button,pt as fl_dropdown,vt as fl_dropdown_async,mt as fl_loading_indicator,gt as fl_promise_button,cn as sss_custom_fund,vn as sss_default_fund,mn as sss_footer_section,bn as sss_loading_page,gn as sss_my_own_fund,wn as sss_my_own_fund_inputs,yn as sss_notifications_section,xn as sss_qsuper_confirm_header,En as sss_qsuper_consent,Fn as sss_qsuper_insurance_opt_in,Pn as sss_qsuper_insurance_questions,Rn as sss_qsuper_join,Tn as sss_qsuper_layout,Nn as sss_qsuper_question_1,Dn as sss_qsuper_question_2,On as sss_qsuper_question_3,Un as sss_qsuper_question_4,Ln as sss_qsuper_question_5,zn as sss_qsuper_question_6,Vn as sss_qsuper_question_7,Hn as sss_qsuper_question_8,Qn as sss_qsuper_question_yes_no_buttons,Wn as sss_selected_super_choice_section,$n as sss_self_managed_fund,Xn as sss_self_managed_fund_inputs,ie as sss_slate_join_page,oe as sss_slate_standard_choice_page,se as sss_slatesuper_header,ae as sss_standard_choice_form,ce as sss_success,ue as sss_super_choice_item,fe as sss_super_choice_page,de as stencil_route,ve as stencil_route_link,be as stencil_route_switch,Ce as stencil_router,Ae as super_selection_app,Es as super_selection_app_host}