\n :\n \n ')))}}var Di=function(){function e(){Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onmessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.timer=null,this.onmessage=null}return Object.defineProperty(e.prototype,"postMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.timer&&clearInterval(this.timer),"stop"===e?this.timer=null:"function"==typeof this.onmessage&&(this.timer=setInterval(this.onmessage,1e3))}}),e}();function Li(){var e=this,t=null;this.onmessage=function(n){var i=n.data;t&&clearInterval(t),"stop"===i?t=null:(e.postMessage(""),t=setInterval((function(){return e.postMessage("")}),1e3))}}var Ri=function(){function e(e){var t=this;Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"set",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closePopup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"worker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.type=e,this.set=[],this.state="stop",this.add=this.add.bind(this),this.delete=this.delete.bind(this),this.checkSizeToRunOrStop=this.checkSizeToRunOrStop.bind(this),this.run=this.run.bind(this),this.stop=this.stop.bind(this),this.update=this.update.bind(this),this.closePopup={},"seconds"===e?(this.worker=function(){try{var e=new Blob(["(".concat(Li.toString(),")()")],{type:"application/javascript"});return new Worker(URL.createObjectURL(e))}catch(e){return new Di}}(),this.worker.onmessage=function(){return t.update()}):this.worker=null}return Object.defineProperty(e.prototype,"add",{enumerable:!1,configurable:!0,writable:!0,value:function(e){e&&(e.dataset.CountDownEnd="false",this.set.push(e),this.checkSizeToRunOrStop())}}),Object.defineProperty(e.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.set=this.set.filter((function(t){return t!==e})),this.checkSizeToRunOrStop()}}),Object.defineProperty(e.prototype,"checkSizeToRunOrStop",{enumerable:!1,configurable:!0,writable:!0,value:function(){"stop"===this.state?this.set.length>0&&this.run():0===this.set.length&&this.stop()}}),Object.defineProperty(e.prototype,"run",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.state="run","milliseconds"===this.type?this.worker=requestAnimationFrame(this.update):this.worker.postMessage("start")}}),Object.defineProperty(e.prototype,"stop",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.set=[],this.state="stop","milliseconds"===this.type?(cancelAnimationFrame(this.worker),this.worker=null):this.worker.postMessage("stop")}}),Object.defineProperty(e.prototype,"update",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.set&&(this.set.forEach((function(t){t.parentNode&&"false"===t.dataset.CountDownEnd?Ni(t,e.type):("true"===t.dataset.CountDownEnd&&"close"===t.dataset.CountDownBehaviorAfter&&"function"==typeof e.closePopup[t.dataset.popupId]&&e.closePopup[t.dataset.popupId](),e.delete(t))})),"milliseconds"===this.type&&"stop"!==this.state&&(this.worker=requestAnimationFrame(this.update)))}}),e}(),Mi=function(){function e(){this.addCountDown=this.addCountDown.bind(this),this.deleteCountDown=this.deleteCountDown.bind(this),this.clear=this.clear.bind(this),this.setClosePopup=this.setClosePopup.bind(this),this.updateSet={seconds:new Ri("seconds"),milliseconds:new Ri("milliseconds")}}return Object.defineProperty(e.prototype,"setClosePopup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.updateSet.seconds.closePopup[e]=t,this.updateSet.milliseconds.closePopup[e]=t}}),Object.defineProperty(e.prototype,"addCountDown",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t;e&&e.dataset.menuAction===_n.DATA_COUNTDOWN&&(-1!==(null===(t=e.dataset.CountDownShowUnit)||void 0===t?void 0:t.indexOf("milliseconds"))?(this.updateSet.seconds.delete(e),this.updateSet.milliseconds.add(e)):(this.updateSet.milliseconds.delete(e),this.updateSet.seconds.add(e)))}}),Object.defineProperty(e.prototype,"deleteCountDown",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.updateSet.seconds.delete(e),this.updateSet.milliseconds.delete(e)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.updateSet.seconds.stop(),this.updateSet.milliseconds.stop()}}),e}(),Fi=new Mi,Bi=function(){function e(e){Object.defineProperty(this,"popup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"countDownWorker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.popup=e,this.countDownWorker=Fi}return Object.defineProperty(e.prototype,"checkCountDownExpired",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this.popup.popupWrap&&[].slice.call(this.popup.popupWrap.querySelectorAll('[data-menu-action="'.concat(_n.DATA_COUNTDOWN,'"]'))).some((function(e){if("true"===e.dataset.CountDownEnd&&"close"===e.dataset.CountDownBehaviorAfter)return!0}))}}),Object.defineProperty(e.prototype,"init",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(this.popup.popupWrap){var t=[].slice.call(this.popup.popupWrap.querySelectorAll('[data-menu-action="'.concat(_n.DATA_COUNTDOWN,'"]')));t instanceof Array&&!t.length||t.forEach((function(t){"CountDown"===t.dataset.CountDownMode&&t.dataset.silexId&&(t.dataset.CountDownStartTime=Ui(e.popup.popup.popupId,t.dataset.silexId,e.popup.isPreview)),t.dataset.popupId=e.popup.popup.popupId,Ni(t)}))}}}),Object.defineProperty(e.prototype,"startCountDown",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(this.popup.popupWrap){var t=[].slice.call(this.popup.popupWrap.querySelectorAll('[data-menu-action="'.concat(_n.DATA_COUNTDOWN,'"]')));t instanceof Array&&!t.length||t.forEach((function(t){("CountDown"!==t.dataset.CountDownMode||t.dataset.CountDownTime&&Number(t.dataset.CountDownTime)>0)&&("CountDown"===t.dataset.CountDownMode&&t.dataset.silexId&&(t.dataset.CountDownStartTime=Ui(e.popup.popup.popupId,t.dataset.silexId,e.popup.isPreview)),Fi.addCountDown(t))}))}}}),Object.defineProperty(e.prototype,"clearCountDownFromPop",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.popup.popupWrap){var e=[].slice.call(this.popup.popupWrap.querySelectorAll('[data-menu-action="'.concat(_n.DATA_COUNTDOWN,'"]')));e instanceof Array&&!e.length||e.forEach((function(e){Fi.deleteCountDown(e)}))}}}),e}();function Ui(e,t,n){var i="pt_countdown_".concat(e,"_").concat(t),r=n?Dn(i):bt(i);return r||(r=new Date+"",n?Nn(i,r):mt(i,r,1e3,"/",it.domain)),r}function Hi(e){return/\S+@\S+\.\S+/.test(e)}function $i(e){return e&&/^[0-9_-]+$/.test(e)}var Vi=function(){function e(e){Object.defineProperty(this,"popup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hasError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"needCheckDuplicate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formFieldDomList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldIdList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldValueList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"submitLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clickTarget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"submitResoluteCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldNameLabel",{enumerable:!0,configurable:!0,writable:!0,value:"data-field-name"}),this.popup=e,this.hasError=!1,this.needCheckDuplicate=!1,this.formFieldDomList=[],this.fieldIdList=[],this.fieldValueList=[],this.submitLoading=!1,this.clickTarget=void 0,this.submitResoluteCallback=void 0}return Object.defineProperty(e.prototype,"_resetStates",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.hasError=!1,this.needCheckDuplicate=!1,this.formFieldDomList=[],this.fieldIdList=[],this.fieldValueList=[]}}),Object.defineProperty(e.prototype,"_setFieldDomList",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.formFieldDomList=[].slice.call(this.popup.popupWrap.querySelectorAll('[data-menu-action="insert.field"]'))}}),Object.defineProperty(e.prototype,"_checkField",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e,t,n,i=0;i
-1&&(r=ai("form_error_tips_name_duplicate")),n.indexOf("email")>-1&&(r=ai("form_error_tips_email_duplicate")),n.indexOf("phone")>-1&&(r=ai("form_error_tips_phone_duplicate")),e.error=r,null===(t=e.errorDom)||void 0===t||t.setAttribute("class","error allow-duplicate"),i.hasError=!0}})),void(this.hasError?this._handleSubmitReject(t):(function(e,t){var n=Dn(e);if(n){var i=(n=JSON.parse(n)).previewFormContent;i?i.concat(t):i=t,n.previewFormContent=i,Nn(e,JSON.stringify(n))}else n={seenTimes:1,hasClosed:0,hasClicked:0,formSubmitted:0,session:{},previewFormContent:null}}(this.popup.popup.popupId,this.fieldValueList),null===(n=this.submitResoluteCallback)||void 0===n||n.call(this)))}this.submitLoading=!0,ii.form(r,this.popup.experience.engageId,this.popup.version.versionId,this.popup.popup.popupId,(function(n){setTimeout((function(){i.submitLoading=!1})),i._handleSubmitCallback(n,e,t)}),(function(){setTimeout((function(){i.submitLoading=!1}))}))}}),Object.defineProperty(e.prototype,"_handleSubmitCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i;if(e){var r=JSON.parse(e),o=this;if("success"!==(null==r?void 0:r.status))Pt({module:"form",message:"Form Submit field: Error info: ".concat(r)});else{var a=r.data;if(this.fieldIdList.forEach((function(e){if(void 0!==a[e.fieldID])if(e.error||1!=!a[e.fieldID])e.errorDom&&(e.errorDom.style.display="none");else{var t=e.fieldID,n=ai("form_error_tips_duplicate");t.indexOf("name")>-1&&(n=ai("form_error_tips_name_duplicate")),t.indexOf("email")>-1&&(n=ai("form_error_tips_email_duplicate")),t.indexOf("phone")>-1&&(n=ai("form_error_tips_phone_duplicate")),e.error=n,e.errorDom&&(e.errorDom.innerText=e.error,e.errorDom.style.display="block"),o.hasError=!0}})),this.hasError)return void this._handleSubmitReject(n);this.sendSubmitPackage({formContent:JSON.stringify(this.fieldValueList),fieldIdList:JSON.stringify(this.fieldIdList),config:n,transport:t}),null===(i=this.submitResoluteCallback)||void 0===i||i.call(this);var l=this.fieldIdList.reduce((function(e,t){return t.connectProperty&&(e[t.connectProperty]=t.fieldValue),e}),{});"{}"!==JSON.stringify(l)&&ii.identify("",l,"engage")}}else Pt({module:"form",message:"Form Submit field: Error info: ".concat(e)})}}),Object.defineProperty(e.prototype,"_handleSubmitReject",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e||{},n=t.cssSelector,i=t.stayTime,r=t.interactionType;[n,i,r].some((function(e){return void 0===e}))||ii.click({cssSelector:n,stayTime:i,interactionType:r})}}),Object.defineProperty(e.prototype,"handleFormSubmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){var r,o=this;if(!this.submitLoading)if(this._resetStates(),this._setFieldDomList(),this._checkField(),this.submitResoluteCallback=i,this.clickTarget=t,this.hasError)this._handleSubmitReject(n);else if(this.needCheckDuplicate)this._checkDuplicate(e,n);else{var a=this.fieldIdList.reduce((function(e,t){return t.connectProperty&&(e[t.connectProperty]=t.fieldValue),e}),{});"{}"!==JSON.stringify(a)&&ii.identify("",a,"engage"),this.popup.isPreview?this.popup.updateCache("previewFormContent"):this.sendSubmitPackage({formContent:JSON.stringify(this.fieldValueList),fieldIdList:JSON.stringify(this.fieldIdList),config:n,transport:e}),this.popup.updateCache("formSubmitted"),t&&this.popup.popupRender.handleGotoWidgetClick(t),null===(r=this.submitResoluteCallback)||void 0===r||r.call(this),setTimeout((function(){o.submitLoading=!1}))}}}),Object.defineProperty(e.prototype,"sendSubmitPackage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.popup.isPreview||(ii.engage({engageId:this.popup.experience.engageId,engageVersionId:this.popup.version.versionId,engageAction:"submit",properties:{creativeId:this.popup.popup.popupId,creativeType:this.popup.createType,formContent:e.formContent||"",fieldIdList:e.fieldIdList||""},config:e.config,transport:e.transport||"xhr"}),Yr.sendExperienceEventToGA("click",{experienceType:this.popup.experience.engageType,experienceId:this.popup.experience.engageId,experienceName:this.popup.experience.engageName,versionId:this.popup.version.versionId,versionName:this.popup.version.versionName,clickTarget:this.clickTarget}))}}),Object.defineProperty(e.prototype,"checkElementHasNoPackageAttr",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return null==e?void 0:e.getAttribute("data-engage-no-package")}}),Object.defineProperty(e.prototype,"setFieldNameToAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.popup.popupWrap.querySelectorAll('[data-menu-action="insert.field"]').forEach((function(t){var n=t.querySelector(".label");n&&n.setAttribute(e.fieldNameLabel,n.innerText)}))}}),e}();function Wi(e){var t;return null===(t=null==e?void 0:e.hasAttribute)||void 0===t?void 0:t.call(e,_n.TEMP_A)}function qi(e,t,n){var i=document.createElement("textarea");i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="2em",i.style.height="2em",i.style.padding="0",i.style.border="none",i.style.outline="none",i.style.boxShadow="none",i.style.background="transparent",i.value=e,document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy"),"function"==typeof t&&t()}catch(e){"function"==typeof n&&n()}document.body.removeChild(i)}var zi="data-engage-action";function Gi(e){var t=e.selector,n=e.actionDom,i=e.actionConfig,r=e.clickFn;if(!n||!i||!i.enableClickAction)return null;var o=i||{},a=o.clickActionConfig,l=o.clickActionType,c=Xe(n,"href"),s=Xe(n,"target"),u="A"===n.tagName,p=u&&"link"===l,d=null;if(n.setAttribute(gn,JSON.stringify(i)),p){var f=a[l]||{},h=f.linkURL,v=f.openNewTab,b=f.carryParameter;n.setAttribute("href",Zt(h,b)),n.setAttribute("target",v?"_blank":"_self")}else u&&(n.removeAttribute("href"),n.removeAttribute("target")),t?function(e,t){var n,i=et.document;if(!i.querySelector('style[data-selector="'.concat(e,'"]'))){var r=i.createElement("style");r.setAttribute("data-selector",e),r.textContent=t,null===(n=i.head)||void 0===n||n.appendChild(r)}}(t,"\n ".concat(t," {\n cursor: pointer!important;\n }\n ")):n.style.cursor="pointer","function"==typeof r&&(d=q(r,200),n.addEventListener("click",d,!1));return function(){n.removeAttribute(gn),u&&(c&&n.setAttribute("href",c),s&&n.setAttribute("target",s)),p||(t?function(e){var t=et.document,n=t.querySelector('style[data-selector="'.concat(e,'"]'));(null==t?void 0:t.head)&&n&&t.head.removeChild(n)}(t):n.style.cursor="auto",d&&n.removeEventListener("click",d,!1))}}function Yi(e,t,n,i){var r=n.clickActionConfig,o=n.clickActionType,a=n.enableClickAction;if(a){switch(o){case"link":case"line":var l=r[o]||{},c=l.linkURL,s=l.openNewTab,u=l.carryParameter;c&&function(e,t){void 0===t&&(t=!1);var n=document.createElement("a");n.setAttribute(_n.TEMP_A,""),n.href=e,n.target=t?"_blank":"_self",document.body.appendChild(n),n.click(),document.body.removeChild(n)}(Zt(c,u),s);break;case"tel":var p=(r[o]||{}).phoneNumber;p&&function(e){var t=document.createElement("a");t.setAttribute(_n.TEMP_A,""),t.href="tel:"+e,document.body.appendChild(t),t.click(),document.body.removeChild(t)}(p);break;case"copiedText":var d=(r[o]||{}).text;d&&function(e,t,n){L(this,void 0,void 0,(function(){return R(this,(function(i){try{navigator.clipboard.writeText(e).then((function(){t()}),(function(i){qi(e,t,n)}))}catch(i){return qi(e,t,n),[2]}return[2]}))}))}(d,(function(){!function(e,t,n){if(e&&t){var i=Z('[data-insert-tooltip-text="'.concat(n,']"'),et);i&&i.remove();var r=0,o=0;if("click"===e.type&&(r=e.clientX,o=e.clientY),"touchend"===e.type||"touchstart"===e.type){var a="touchend"===e.type?e.changedTouches:e.touches;(null==a?void 0:a[0])&&(r=a[0].clientX,o=a[0].clientY)}var l=t.getBoundingClientRect(),c=l.top,s=l.left,u=l.right,p=l.height,d=document.body.clientWidth,f={top:parseInt((c-4-32).toString(),10),bottom:parseInt((c+p+4).toString(),10),left:s,right:u};0===r&&0===o?(f.left=parseInt((s+(u-s)/2-85).toString(),10),f.right=parseInt((s+(u-s)/2+85).toString(),10)):(f.left=r>parseInt(85..toString(),10)?parseInt((r-85).toString(),10):r,f.right=parseInt((r-170).toString(),10));var h=document.createElement("div");h.innerHTML='0&&f.left
\n ");var v=h.firstChild;v&&document.body.appendChild(v),setTimeout((function(){v&&v.remove()}),1500)}}(e,t,ai("copySuccessfully"))}));break;case"downloadFile":var f=(r[o]||{}).fileURL;f&&function(e){var t=document.createElement("a");t.setAttribute(_n.TEMP_A,""),t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t)}(f);break;case"runCode":var h=(r[o]||{}).code;h&&Cn(h)}null==i||i(t,{enableClickAction:a,clickActionType:o,clickActionConfig:r})}}function Ji(e){return!!e&&(X(e)?Ji(K(e)):"submit"===Xe(e,"data-button-type")||!(!e.parentNode||"body"===e.nodeName.toLowerCase())&&Ji(e.parentNode))}function Xi(e){if(!e)return 0;if(X(e))return Xi(K(e));var t=_n.DATA_ACTION_CONFIG,n=_n.DATA_BLOCK,i=_n.BUTTON_CLOSE,r=_n.ICON_CLOSE,o=_n.BUTTON_FORM_SUBMIT,a=Xe(e,t)||Xe(e,gn),l=Xe(e,n),c=!1;try{a&&"closePopup"===JSON.parse(a).clickActionType&&(c=!0)}catch(e){}return c||l===i||l===r?1:a||l===o?2:e.parentNode&&"BODY"!==e.nodeName?Xi(e.parentNode):0}var Ki=function(){function e(e){Object.defineProperty(this,"popup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.popup=e}return Object.defineProperty(e.prototype,"_handleActionClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){var r,o,a=Ji(e),l=t||{},c=l.enableClickAction,s=l.clickActionType,u=l.clickActionConfig,p=!0;if(c){switch(s){case"link":case"line":var d=null!==(r=u[s])&&void 0!==r?r:{},f=d.linkURL,h=d.closePopup;(a||f&&h)&&(this.popup.unmounted(),p=!a);break;case"runCode":(null===(o=u.runCode)||void 0===o?void 0:o.closePopup)&&(this.popup.unmounted(),p=!a);break;case"closePopup":this.popup.unmounted(),a||this.popup.popupRender.sendClose(n,e,i),p=!1;break;case"showMessage":this.popup.popupRender.gotoNext(!0),p=!1}a&&(p=!1,this.popup.updateCache("formSubmitted"))}c&&!this.popup.isPreview&&p&&(this.popup.updateCache("hasClicked"),this.popup.sendEngagePackage({type:"click",config:n,transport:i,properties:{},clickTarget:e}))}}),Object.defineProperty(e.prototype,"applyAction",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){this._handleActionClick(e,t,n,i)}}),e}();function Qi(e){if(!e)return e;var t;if([Number,String,Boolean].forEach((function(n){e instanceof n&&(t=n(e))})),void 0===t)if("[object Array]"===Object.prototype.toString.call(e))t=[],e.forEach((function(e,n){t[n]=Qi(e)}));else if("object"==typeof e)if(e.nodeType&&"function"==typeof e.cloneNode)t=e.cloneNode(!0);else if(e.prototype)t=e;else if(e instanceof Date)t=new Date(e);else for(var n in t={},e)t[n]=Qi(e[n]);else t=e;return t}function Zi(e){var t=qe(e);if(!t)return!1;if(function(e){var t;if(!e)return!0;var n=_n.TEMP_A;if(null===(t=null==e?void 0:e.hasAttribute)||void 0===t?void 0:t.call(e,n))return!0;var i=e.nodeName.toLowerCase();return"html"===i||(new Date).getTime()-it.clickActionTime0&&(i=r),Qi(i).reduce((function(e,t){return e.push({eventName:t.eventName,eventType:"pti"===t.source?1:0,properties:t.properties}),e}),[])}(t,o?r:"");return{events:l,isPopup:o}}function er(e,t,n){var i;if(!e||!t)return null;if(X(e))return er(K(e),t,n);if(null===(i=null==e?void 0:e.hasAttribute)||void 0===i?void 0:i.call(e,t)){if(!n)return e;if(e.getAttribute(t)===n)return e;if(e.parentNode&&"body"!==e.nodeName.toLowerCase())return er(e.parentNode,t,n)}else if(e.parentNode&&"body"!==e.nodeName.toLowerCase())return er(e.parentNode,t,n);return null}function tr(e,t){return!(!e||!t)&&(e===t||!(!t.parentNode||"body"===e.nodeName.toLowerCase())&&tr(e,t.parentNode))}function nr(e){var t,n,i=e.srcElement,r=e.win,o=e.inlineActionConfig;if(o&&"link"===(null==o?void 0:o.clickActionType)&&!(null===(n=null===(t=null==o?void 0:o.clickActionConfig)||void 0===t?void 0:t.link)||void 0===n?void 0:n.openNewTab))return!0;var a=i.nodeName,l=i.getAttribute("target");return"A"===a&&!function(e){var t=e.target,n=e.win;return!("_self"===t||!t||"_parent"===t&&n.parent===n||"_top"===t&&n.top===n)}({target:l,win:r})}var ir=function(){function e(e){Object.defineProperty(this,"popupInstance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hasClosedByManual",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBackList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allAction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pageClickCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.popupInstance=e,this.rollBackList=[],this.allAction=[],this.hasClosedByManual=!1;var t=this;this._pageClickCallback=function(e){t.popupInstance.popupWrap&&t.popupInstance.popupWrap.contains(e.target)&&t.applyAction(e.event,e.config)}}return Object.defineProperty(e.prototype,"_bindActionStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=_n.DATA_ACTION_CONFIG,n=_n.DOM_TYPE;this.allAction=function(e){var t=[];return e?([].slice.call(e.querySelectorAll("div["+zi+"]")).forEach((function(e){var n=Xe(e,zi);if(n)try{var i=JSON.parse(n);t.push({el:e,config:i})}catch(e){}})),t):t}(this.popupInstance.popupWrap);var i=this.popupInstance.popupWrap.querySelectorAll("div[data-engage-action]");[].slice.call(i).length>0&&[].slice.call(i).forEach((function(i){var r=er(i,n),o=er(i,t),a=e.allAction.find((function(e){return o===e.el})),l=r&&Gi({actionDom:r,actionConfig:null==a?void 0:a.config});l&&e.rollBackList.push(l)}))}}),Object.defineProperty(e.prototype,"removeActionEffect",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.rollBackList.forEach((function(e){return e()}))}}),Object.defineProperty(e.prototype,"_renderCodeMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;(this.popupInstance.popup.code||[]).forEach((function(t){var n=e.popupInstance,i=n.popup,a=n.experience,l=n.renderType;if("css"===t.type){var c="#engage_".concat(i.popupId),s=kn(t.code,c);s&&Bn(s,i.popupId,l)}else{var u={engage_id:a.engageId,popup_id:i.popupId};!function(e,t,n,i){if(void 0===i&&(i=et),Q()&&"body"!==t)try{var a=Y(et);new Function("window",r,o,e).bind(a)(i,Lr,n)}catch(e){}else Cn(e,n)}(t.code,l,u)}}))}}),Object.defineProperty(e.prototype,"_updateRootPageStyles",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=0),"update"===e){if(!document.body.getAttribute("ptx_stickybar_origin_top_value")){var n=window.getComputedStyle(document.body).getPropertyValue("top"),i="auto"===n?0:Number(n.replace("px",""));document.body.setAttribute("ptx_stickybar_origin_top_value",i.toString())}var r=Number(document.body.getAttribute("ptx_stickybar_origin_top_value"));document.body.style.position="relative",document.body.style.top=t+r+"px"}else"restore"===e&&(r=Number(document.body.getAttribute("ptx_stickybar_origin_top_value")),document.body.style.position="static",document.body.style.top=r+"px")}}),Object.defineProperty(e.prototype,"_getNodeActionType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i,r,o,a=_n.DATA_BLOCK,l=_n.DATA_BUTTON_TYPE,c=_n.DATA_ACTION_CLICK,s=_n.DATA_ACTION_CLOSE,u=_n.DATA_ACTION_CONFIG,p=_n.BUTTON_CLOSE,d=_n.ICON_CLOSE,f=_n.BUTTON_GOTO_WIDGET,h=_n.BUTTON_FORM_SUBMIT,v=_n.BUTTON_URL,b=_n.DATA_URL_CLOSE_POPUP,m=qe(e),g=qe(e),y=null,w=null,_=!1,x=!1;try{do{y=(null===(t=null==g?void 0:g.getAttribute)||void 0===t?void 0:t.call(g,a))||"",w=null===(n=g.getAttribute)||void 0===n?void 0:n.call(g,l),x||(x=(null===(i=null==m?void 0:m.hasAttribute)||void 0===i?void 0:i.call(m,c))||(null===(r=null==m?void 0:m.hasAttribute)||void 0===r?void 0:r.call(m,s))||-1!==[p,d,f,h,v,b].indexOf(y))&&(g=m),_||(_=null===(o=null==m?void 0:m.hasAttribute)||void 0===o?void 0:o.call(m,u)),(!x||!_)&&(m=m.parentNode)}while(!(x&&_||m===this.popupInstance.popupWrap))}catch(e){Pt({module:"popup",message:"Popup check action node has error: "+e})}return{linkType:y,buttonType:w,interactiveNode:g,isActionNode:_,isInteractiveNode:x}}}),Object.defineProperty(e.prototype,"_triggerLink",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if("_blank"===e)try{et.open(t,"_blank")}catch(e){Pt({module:"popup",message:"not support to use window.open, error: "+e})}else et.location.href=t}}),Object.defineProperty(e.prototype,"_handleInteractiveNodeClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){var o,a,l,c=this,s=_n.BUTTON_CLOSE,u=_n.ICON_CLOSE,p=_n.BUTTON_GOTO_WIDGET,d=_n.BUTTON_FORM_SUBMIT,f=_n.BUTTON_URL,h=_n.DATA_URL_CLOSE_POPUP,v=e.tagName.toUpperCase(),b=(e.textContent||v||"").trim()||"unknow target";if("image"===(null===(o=null==e?void 0:e.parentNode)||void 0===o?void 0:o.getAttribute("data-engage-block"))){var m=null===(a=e.querySelector("img"))||void 0===a?void 0:a.getAttribute("alt");m&&(b=m)}switch(t){case s:case u:return this.sendClose(r,e,i),void this.popupInstance.unmounted();case p:this._clear(),this.popupInstance.sendEngagePackage({type:"click",config:r,transport:i,properties:{target:b},clickTarget:e}),this.handleGotoWidgetClick(e);break;case d:this.popupInstance.popupForm.handleFormSubmit(i,e,r,(function(){c.handleGotoWidgetClick(e),c.popupInstance.updateCache("formSubmitted")}));break;default:this.popupInstance.sendEngagePackage({type:"click",config:r,transport:i,properties:{target:b},clickTarget:e})}var g=(null==e?void 0:e.href)||"",y=(null==e?void 0:e.target)||"";if(g&&!/^javascript:(void\(0\))?;?$/.test(g))if("submit"===n){var w="beacon";(null==r?void 0:r.events)&&r.events.length>0&&(w="xhr","_blank"===y&&(w="beacon")),this.popupInstance.popupForm.handleFormSubmit(w,e,r,(function(){c.popupInstance.updateCache("formSubmitted"),c._triggerLink(y,g)}))}else this._triggerLink(y,g);t===f&&(null===(l=e.getAttribute)||void 0===l?void 0:l.call(e,h))&&this.popupInstance.unmounted(),this.popupInstance.updateCache("hasClosed")}}),Object.defineProperty(e.prototype,"_clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n;this.popupInstance.widget&&("inject"===this.popupInstance.widget.widgetSettings.stickyMode&&this._updateRootPageStyles("restore"),(null===(e=this.popupInstance.widget)||void 0===e?void 0:e.widgetSettings.showMask)&&Pn(this.popupInstance.widget.widgetId),On("delete",this.popupInstance.widget.widgetSettings.position),this.popupInstance.popupWrap&&(null===(n=null===(t=this.popupInstance)||void 0===t?void 0:t.popupContainer)||void 0===n?void 0:n.hasChildNodes())&&this.popupInstance.popupContainer.contains(this.popupInstance.popupWrap)&&this.popupInstance.popupContainer.removeChild(this.popupInstance.popupWrap))}}),Object.defineProperty(e.prototype,"_setMaskStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.popupInstance.widget||{}).widgetSettings,t=this.popupInstance.popupWrap.querySelector('[data-engage-block="engage"]');t&&((null==e?void 0:e.showMask)?(null==e?void 0:e.showMask)&&(t.style.position="fixed"):(t.style.left="auto",t.style.right="auto",t.style.top="auto",t.style.bottom="auto"),"pos-sticky-top"===(null==e?void 0:e.position)&&"inject"===(null==e?void 0:e.stickyMode)&&this._updateRootPageStyles("update",null==e?void 0:e.height))}}),Object.defineProperty(e.prototype,"_renderHtmlCss",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;if(this.popupInstance.widget){var t=null!==(e=this.popupInstance.widget)&&void 0!==e?e:{},n=t.widgetNodes,i=t.version,r=n.css,o=n.html,a=n.commonStyle,l=void 0===a?"":a,c=this.popupInstance.widget.widgetSettings.position,s=i?function(e){switch(void 0===e&&(e="pos-center"),e){case"pos-center-top":return In(en||(en=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; left: 50%; top: 0 } 100% { opacity: 1 }",toLeave:"0% { opacity: 1 } 100% { opacity: 0; left: 50%; top: 0 }"});case"pos-sticky-top":return In(tn||(tn=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; transform: translate(-50%, -100%) } 100% { opacity: 1 }",toLeave:"0% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -100%) }"});case"pos-right-bottom":return In(nn||(nn=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; right:0; bottom: 0 } 100% { opacity: 1 }",toLeave:"0% { opacity: 1 } 100% { opacity: 0; right:0; bottom: 0 }"});case"pos-right-center":return In(rn||(rn=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; right: 0; top: 50%; } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; right: 0; top: 50%; } 100% { opacity: 0 }"});case"pos-right-top":return In(on||(on=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; right: 0; top: 0; } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; right: 0; top: 0; } 100% { opacity: 0 }"});case"pos-center-bottom":return In(an||(an=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; left: 50%; bottom: 0; } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; left: 50%; bottom: 0; } 100% { opacity: 0 }"});case"pos-sticky-bottom":return In(ln||(ln=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; transform: translate(-50%, 100%) } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; transform: translate(-50%, 100%) } 100% { opacity: 0 }"});case"pos-left-bottom":return In(cn||(cn=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; left: 0; bottom: 0; } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; left: 0; bottom: 0; } 100% { opacity: 0 }"});case"pos-left-center":return In(sn||(sn=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; left: 0; top: 50%; } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; left: 0; top: 50%; } 100% { opacity: 0 }"});case"pos-left-top":return In(un||(un=F(["",""],["",""])),{position:e,toEnter:"0% { opacity: 0; left: 0; top: 0 } 100% { opacity: 1 }",toLeave:"0% { opacity: 1; left: 0; top: 0 } 100% { opacity: 0 }"});case"pos-center":return In(pn||(pn=F(["",""],["",""])),{position:e,toEnter:"from { transform: translate(-50%, -50%) scale(.8) }",toLeave:"to { transform: scale(.8) }"});default:return""}}(c):"",u=kn(l+r+s,"#engage_".concat(this.popupInstance.popup.popupId));if(u&&Bn(u,this.popupInstance.popup.popupId+this.popupInstance.widget.widgetId,this.popupInstance.renderType),o&&(this.popupInstance.popupWrap.innerHTML=o),i){var p=this.popupInstance.popupWrap.querySelector('div[data-menu-action="insert.popup"]');p&&p.classList.add("animate-enter")}this.popupInstance.popupWrap.style.display="none"}}}),Object.defineProperty(e.prototype,"_checkEngageData",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t=_n.DATA_SHOW_ENGAGE,n=(this.popupInstance.widget||{}).widgetSettings;if("false"===(null===(e=this.popupInstance.popupWrap)||void 0===e?void 0:e.getAttribute(t))&&n){var i=dn.get(vn)||[],r=i.indexOf(null==n?void 0:n.position);-1!==r&&(i.splice(r,1),dn.set(vn,i))}else;}}),Object.defineProperty(e.prototype,"_handlePopupClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=this._getNodeActionType(e),r=i.linkType,o=i.buttonType,a=i.interactiveNode;i.isInteractiveNode&&a&&r&&(e.preventDefault(),this._handleInteractiveNodeClick(a,r,o||"",t,n))}}),Object.defineProperty(e.prototype,"handleGotoWidgetClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n=null===(t=null==e?void 0:e.getAttribute)||void 0===t?void 0:t.call(e,_n.DATA_GOTO_WIDGET);"prev"===n?this.gotoPrev():"next"===n&&this.gotoNext(!0)}}),Object.defineProperty(e.prototype,"gotoPrev",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.popupInstance.widgetIndex-1;e>=0&&(this.popupInstance.updateInstanceState("widgetIndex",e),this.render())}}),Object.defineProperty(e.prototype,"gotoNext",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.popupInstance.popup.widgets.length-1,n=this.popupInstance.widgetIndex+1;if(n<=t){if(this.popupInstance.updateInstanceState("widgetIndex",n),e)try{On("delete",this.popupInstance.popup.widgets[this.popupInstance.widgetIndex].widgetSettings.position)}catch(e){}this.render()}}}),Object.defineProperty(e.prototype,"sendClose",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=this.popupInstance.popupForm.checkElementHasNoPackageAttr(t),r={};t&&(r.target=((null==t?void 0:t.textContent)||(null==t?void 0:t.tagName.toUpperCase())||"").trim()||"unknow target"),this.popupInstance.isPreview||i||this.popupInstance.sendEngagePackage({type:"close",config:e,transport:n,properties:r}),this.popupInstance.updateCache("hasClosed")}}),Object.defineProperty(e.prototype,"close",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._clear(),this.popupInstance.popupCountDown.clearCountDownFromPop(),this.popupInstance.shownByJs||Ti.__deletePopupFromTheRenderList(this.popupInstance.experience.engageId,this.popupInstance.popup.popupId),En("delete",this.popupInstance.popup.popupId),nt.off(T.PAGE_ON_CLICK,this._pageClickCallback)}}),Object.defineProperty(e.prototype,"getTransport",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n,i="beacon";return(null==e?void 0:e.events)&&(null===(n=e.events)||void 0===n?void 0:n.length)>0&&(i="xhr",!1===t&&(i="beacon")),i}}),Object.defineProperty(e.prototype,"applyAction",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n,i,r,o,a,l,c=this,s=_n.DATA_ACTION_CONFIG,u=_n.DOM_TYPE,p=_n.DATA_ACTION_CLOSE,d=_n.DATA_BLOCK,f=_n.BUTTON_FORM_SUBMIT,h=_n.DATA_ACTION_CLICK,v=qe(e),b=!(["input","select","option","radio","textarea","checkbox"].indexOf(v.tagName.toLocaleLowerCase())>-1),m=er(v,u),g=er(v,s),y=c.allAction.find((function(e){return g===e.el})),w=((null===(i=null===(n=null==y?void 0:y.config)||void 0===n?void 0:n.clickActionConfig)||void 0===i?void 0:i.link)||{}).openNewTab,_=this.getTransport(t,w);if(m)if((null===(r=m.hasAttribute)||void 0===r?void 0:r.call(m,p))||m.querySelector("a[".concat(d,"]"))||(null===(o=m.hasAttribute)||void 0===o?void 0:o.call(m,d))&&"A"===m.tagName)c._handlePopupClick(e,_,t);else{var x=function(){Yi(e,m,null==y?void 0:y.config,(function(e,n){c.popupInstance.popupAction.applyAction(e,n,t,_)}))};if(m.getAttribute(d)!==f){if(b&&y){if(Ji(v))return void c.popupInstance.popupForm.handleFormSubmit(_,m,t,x);if(null===(a=null==y?void 0:y.config)||void 0===a?void 0:a.enableClickAction)return void Yi(e,m,null==y?void 0:y.config,(function(e,n){c.popupInstance.popupAction.applyAction(e,n,t,_)}))}!this.popupInstance.isPreview&&b&&(!y||!y.config.enableClickAction)&&(null==t?void 0:t.events)&&(null===(l=t.events)||void 0===l?void 0:l.length)>0&&ii.track(D(D({},t),{params:{transport:_}}))}else er(v,h)?c._handlePopupClick(e,_,t):c.popupInstance.popupForm.handleFormSubmit(_,m,t,x)}}}),Object.defineProperty(e.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n,i,r=this;this.popupInstance.updateInstanceState("widget",this.popupInstance.popup.widgets[this.popupInstance.widgetIndex]),this.popupInstance.widget&&(t=this.popupInstance.widget.widgetSettings.position,-1===(dn.get(vn)||[]).indexOf(t)&&this.popupInstance.widget&&(this._renderHtmlCss(),le()&&(null==(n=this.popupInstance.popupWrap)?void 0:n.querySelector('[data-menu-action="'.concat(_n.DATA_COUNTDOWN,'"]')))?this.popupInstance.unmounted():(this.popupInstance.popupCountDown.init(),this.popupInstance.popupCountDown.checkCountDownExpired()?this.popupInstance.unmounted():(function(e){var t;if(e&&e.querySelectorAll('[data-ec-asset-type="video"]').length>0){var n,i=document.head.querySelector("script.ecVideoJs"),r=document.head.querySelector("link.ecVideoCss"),o=document.head.querySelector("script.ecYoutube");if(i||((n=document.createElement("script")).setAttribute("class","ecVideoJs"),n.src="https://ptxpublicres.ptengine.jp/scripts/video/ec-video.js",document.head.appendChild(n)),!r){var a=document.createElement("link");a.setAttribute("class","ecVideoCss"),a.href="https://ptxpublicres.ptengine.jp/styles/ec-video.css",a.rel="stylesheet",document.head.appendChild(a)}o||((n=document.createElement("script")).setAttribute("class","ecYoutube"),n.src="https://ptxpublicres.ptengine.jp/scripts/video/ec-youtube.js",document.head.appendChild(n));for(var l=e.querySelectorAll('[data-ec-asset-type="video"]'),c=function(e){var n=l[e],i=n.getAttribute("data-ec-asset")||"";if(!i)return{value:void 0};var r=JSON.parse(i),o=!0;r.video&&r.video.hideControls&&(o=!1);var a=r.videoUrl.videoType,c=n.querySelector("div.ecVideoBase"),s=n.querySelector("div.ecYoutube"),u=null==c?void 0:c.getAttribute("tip");if("url"===a&&""!==r.videoUrl.data){var p={controls:o,autoplay:r.video&&r.video.autoPlay||!1,loop:r.video&&r.video.loop||!1,poster:r.video&&r.video.poster||"",preload:"auto",fluid:!0,controlBar:{pictureInPictureToggle:!1,currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,remainingTimeDisplay:!0,volumePanel:{inline:!1}},sources:[{src:r.videoUrl.data,type:"video/mp4"}]};p.autoplay&&(p.muted=!0,p.poster="");var d=setInterval((function(){if(window.videojs){clearInterval(d);var e=new window.videojs(null==c?void 0:c.querySelector(".ecVideoPlayer"),p);e.on("error",(function(){e.errorDisplay.contentEl_.innerHTML='
'.concat(u,"
")}));var t=n.querySelector(".vjs-big-play-button"),i=n.querySelector(".vjs-loading-spinner"),o=n.querySelector(".vjs-poster"),a=n.querySelector(".vjs-tech"),l=n.querySelector(".video-js");t&&i&&(t.style.transform="translate(-50%, -50%)",t.style.display="block",i.style.margin="-25px 0 0 -25px",t.style.margin="0",a.style.width="100%",a.style.height="100%",l.style.width="100%",l.style.height="100%",a.style.padding="0",l.style.padding="0",a.style.background="#000"),r.video&&r.video.poster&&o&&(o.style.backgroundSize="cover"),r.video&&r.video.autoPlay&&e.play(),e.on("play",(function(){t.style.display="none"}))}}),300)}if("youtube"===a&&""!==r.videoUrl.data){var f=r.videoUrl.data,h=function(e){var t;if(null===e)return!1;var n=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return!(!n||11!==(null===(t=null==n?void 0:n[7])||void 0===t?void 0:t.length))&&(null==n?void 0:n[7])}(f),v=null===(t=n.querySelector("div.ecYoutubeBase"))||void 0===t?void 0:t.style,b=parseInt(v.width,10),m=parseInt(v.height,10);if(function(e){var t;if(null===e)return!1;var n=/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return!!e.match(n)&&(null===(t=null==e?void 0:e.match(n))||void 0===t?void 0:t[1])}(f)&&h)var g=setInterval((function(){window.YT&&window.YT.Player&&(clearInterval(g),new window.YT.Player(s,{height:m,width:b,playerVars:{controls:o?1:0,autoplay:r.video&&r.video.autoPlay?1:0,loop:r.video&&r.video.loop?1:0,enablejsapi:1},videoId:h,events:{onReady:function(e){e.target.setVolume(0),r.video&&r.video.autoPlay&&e.target.playVideo()},onStateChange:function(e){r.video&&r.video.loop&&0===e.data&&e.target.playVideo()},onError:function(e){}}}))}),300);else{var y=n.querySelector("div.ecYoutubeBase");y&&(y.innerHTML='
'.concat(u,"
"))}}},s=0;s=":setTimeout((function(){!e.deleted&&e.mounted()}),1e3*(+t+1))}}}),t}(ar),sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=null,i=!1,r=function(){n&&(clearTimeout(n),n=null),n=setTimeout((function(){i||e.deleted||(i=!0,e.mounted())}),1e3*+t)};r(),me(et.document,"scroll",r),me(et.document,"click",r)}}),t}(ar),ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=+t.replace("%",""),i=!1,r=function(){setTimeout((function(){var t=parseInt(se().toString(),10),r=et.document.documentElement.scrollTop||et.pageYOffset;isNaN(r)&&(r=0);var o,a=(parseFloat(r.toString())+parseInt((void 0===o&&(o=window),(o.document.doctype?o.document.documentElement:o.document.body).clientHeight).toString(),10))/t*100;!(Math.abs(a-n)<=2||a>=n)||i||e.deleted||(i=!0,e.mounted())}),50)};me(et.document,"scroll",r),e.setLeaveHandler((function(){ge(et.document,"scroll",r)}))}}),t}(ar),pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=-1!==["POPUP","STICKY_BAR"].indexOf(e.experience.engageType)?e.experience.engageId:e.popup.popupId;nt.off("".concat(T.SHOW_POPUP,".").concat(t)),nt.on("".concat(T.SHOW_POPUP,".").concat(t),(function(){e.mounted(!0)}))}}),t}(ar),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=this.getLocalInfo(e);">"===n&&(+i.seenTimes>=t?e.triggerGoNext=!1:e.triggerGoNext=!0)}}),t}(ar),fr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getLocalInfo(e),i=!n.hasClosed||+n.hasClosed<+t;e.triggerGoNext=i}}),t}(ar),hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getLocalInfo(e);e.triggerGoNext=!n.session||!n.session[Mt()]||+n.session[Mt()].frequencySessionTimes<+t}}),t}(ar),vr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){!!this.getLocalInfo(e).formSubmitted===t?e.triggerGoNext=!1:e.triggerGoNext=!0}}),t}(ar),br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),Object.defineProperty(t.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=this.getLocalInfo(e),r=null;switch(n){case"==":case"!=":r=!!i.hasClicked!==t}null!==r&&(e.triggerGoNext=r)}}),t}(ar);function mr(e){var t=dn.get(e);if(!t){switch(e){case"UserBlur":t=new lr;break;case"UserStay":t=new cr;break;case"UserStop":t=new sr;break;case"ScrollMatch":t=new ur;break;case"ShownByJs":t=new pr;break;case"ClickButton":t=new br;break;case"SeenTimes":t=new dr;break;case"CloseTimes":t=new fr;break;case"FormSubmitted":t=new vr;break;case"FrequencySessionTimes":t=new hr}dn.set(e,t)}return t}var gr,yr=function(){function e(e,t,n,i,r,o){var a=this;Object.defineProperty(this,"_leaveHandler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hasFrequencyTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"trigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"experience",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"terminal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupWrap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPreview",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"createType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"triggerGoNext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"renderType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widgetIndex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shownByJs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deleted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rendered",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variant",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupRender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupCountDown",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupForm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"popupAction",{enumerable:!0,configurable:!0,writable:!0,value:void 0});var l=i.widgets.some((function(e){return Boolean(e.widgetNodes.commonStyle)}))?"shadowDom":"body";this.experience=e,this.version=t,this.terminal=n,this.popup=i,this.isPreview=r,this.createType=o,this.triggerGoNext=!0,this._leaveHandler=[],this.renderType=l,this.popupContainer=this._getEngageContainerWrapper(l,this.popup.popupId),this.popupWrap=this._createEngageWrap(this._getEngageWrapperId(this.popup.popupId)),this.hasFrequencyTrigger=-1!==["POPUP","STICKY_BAR"].indexOf(this.experience.engageType),this.trigger=this.hasFrequencyTrigger?this.experience.trigger:this.popup.trigger,this.widget=null,this.widgetIndex=0,this.deleted=!1,this.rendered=!1,this.variant={formContent:"",fieldIDList:""},this.shownByJs=!1,this.popupRender=new ir(this),this.popupCountDown=new Bi(this),this.popupForm=new Vi(this),this.popupAction=new Ki(this),this._init(),nt.on("".concat(T.CLEAR_POPUP,".").concat(i.popupId),(function(){a.unmounted()}))}return Object.defineProperty(e.prototype,"_init",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._checkTrigger()||0!==(this.trigger.start||[]).length||this.mounted()}}),Object.defineProperty(e.prototype,"_createEngageWrap",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=et.document.getElementById(e);if(!t){(t=et.document.createElement("div")).setAttribute("id",e);var n=[].slice.call(et.document.querySelectorAll('[id^="ptxEngage_')),i=[].slice.call(te('[id^="ptxEngage_'));"popup"===this.createType?t.setAttribute("focusindex",50-n.length-i.length+""):t.setAttribute("focusindex",100-n.length-i.length+"")}return t}}),Object.defineProperty(e.prototype,"_getEngageWrapperId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return"engage_"+e}}),Object.defineProperty(e.prototype,"_getEngageContainerWrapper",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=et.document.getElementById(hn+"_"+t);return n||((n=et.document.createElement("div")).setAttribute("id",hn+"_"+t),function(e,t){Q()&&"body"!==t?J(e):et.document.body.appendChild(e)}(n,e)),n}}),Object.defineProperty(e.prototype,"_checkTrigger",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=Boolean(this.experience.heatmapVersion),t=!1;return!this.experience.triggerFlag&&!this.isPreview||e||(t=this._checkTriggerItem(this.trigger,"stop")),t||(t=this._checkTriggerItem(this.trigger,"start")),t||(t=this._checkPopupFrequencyTrigger()),t}}),Object.defineProperty(e.prototype,"_checkPopupFrequencyTrigger",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;if(!this.hasFrequencyTrigger)return!1;if("session"===(this.experience.trigger.frequency||{}).type&&(null===(e=this.experience.trigger.frequency)||void 0===e?void 0:e.times)){var t=or(this);if(t.setValue(this.experience.trigger.frequency.times),t.setValidator(mr("FrequencySessionTimes")),t.run(),!this.triggerGoNext)return!0}return!1}}),Object.defineProperty(e.prototype,"_checkTriggerItem",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){for(var n=e[t],i=!1,r=0;r=3||e.changeCount>=1e3?t.stopObserve(e):e.observerFn()&&e.changeTime++}),200))}}),Object.defineProperty(e.prototype,"stopObserve",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.changeTimer;t&&clearInterval(t)}}),Object.defineProperty(e.prototype,"addObserve",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.selector,n=e.changeType,i=e.unique,r=e.resultElement,o=e.observerFn;if(!o)return null;var a=this.getMutationIndex(t,n);-1!==a&&i&&this.stopObserve(this.mutationsList[a]);var l={changeCount:0,changeTime:0,changeTimer:null,changeType:n,selector:t,unique:i,observerFn:o,resultElement:r};return this.startObserve(l),this.mutationsList.push(l),l}}),Object.defineProperty(e.prototype,"updateObserve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){var r=this.getObserve(e,t);r&&n in r&&(r[n]=i)}}),Object.defineProperty(e.prototype,"deleteObserve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getMutationIndex(e,t);-1!==n&&(this.stopObserve(this.mutationsList[n]),this.mutationsList.splice(n,1))}}),Object.defineProperty(e.prototype,"getObserve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getMutationIndex(e,t);if(-1!==n)return this.mutationsList[n]}}),Object.defineProperty(e.prototype,"getMutationsList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.mutationsList}}),e}(),xr=new _r,Or=function(){function e(e,t){var n;Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"attributeName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"attributeValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inlineId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.timer=null,this.applyStartTime=Date.now(),this.rollBack=null,this.inlineId=Ze.partAntiFlicker?We():null,this.selector=t.changeElementAttribute.selector.string,this.attributeName=t.changeElementAttribute.attribute.string,this.attributeValue=null===(n=t.changeElementAttribute.value)||void 0===n?void 0:n.string}return Object.defineProperty(e.prototype,"_setAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i,r,o;if(!e)return null;var a="IMG"===e.tagName&&"src"===t,l=((i={})[t]=e.getAttribute(t),i),c=[];if((null===n||a)&&e.removeAttribute(t),null!==n&&e.setAttribute(t,n),a&&(["srcset","data-src","data-original"].forEach((function(t){l[t]=e.getAttribute(t),e.removeAttribute(t)})),"picture"===(null===(o=null===(r=e.parentElement)||void 0===r?void 0:r.tagName)||void 0===o?void 0:o.toLowerCase())))for(var s=e.parentElement.firstChild;s;)if(1===s.nodeType&&"source"===s.tagName.toLowerCase()){var u=s,p=s.nextSibling;c.push(u),e.parentElement.removeChild(u),s=p}else s=s.nextSibling;return Ze.partAntiFlicker&&this.inlineId&&ae(this.selector,this.inlineId),function(){Object.keys(l).forEach((function(t){var n=l[t];n&&e.setAttribute(t,n)})),c.forEach((function(t){var n;null===(n=e.parentElement)||void 0===n||n.insertBefore(t,e)}))}}}),Object.defineProperty(e.prototype,"_observeAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i,r,o=(xr.getObserve(e,"ATTRIBUTE_"+t)||{}).resultElement,a=Z(e,et),l=(null==o?void 0:o[0])&&et.document.contains(o[0])?o[0]:a;return!!l&&!!(null===n&&(null===(i=l.hasAttribute)||void 0===i?void 0:i.call(l,t))||(null===(r=l.getAttribute)||void 0===r?void 0:r.call(l,t))!==n)&&(this.rollBack=this._setAttribute(l,t,n),!0)}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n=this;if(this.selector&&void 0!==(null===(t=null===(e=null==et?void 0:et.document)||void 0===e?void 0:e.documentElement)||void 0===t?void 0:t.setAttribute)){Ze.partAntiFlicker&&this.inlineId&&oe(this.selector,this.inlineId);var i=Z(this.selector,et);if(i){if("BODY"===i.nodeName)return;this.rollBack=this._setAttribute(i,this.attributeName,this.attributeValue),this._applyCallback(),xr.addObserve({selector:this.selector,changeType:"ATTRIBUTE_"+this.attributeName,unique:!0,resultElement:[i],observerFn:function(){return n._observeAttribute(n.selector,n.attributeName,n.attributeValue)}})}else this.inline.delay(this.applyStartTime,(function(){return n.apply()}))}}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;this.timer&&clearInterval(this.timer),Ze.partAntiFlicker&&this.inlineId&&ae(this.selector,this.inlineId),null===(e=this.rollBack)||void 0===e||e.call(this),xr.deleteObserve(this.selector,"ATTRIBUTE_"+this.attributeName)}}),e}(),Tr={REPLACE:0,INSERT:1,APPEND:2,BEFORE:3,AFTER:4};!function(e){e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.BEFORE=2]="BEFORE",e[e.AFTER=3]="AFTER"}(gr||(gr={}));var Pr=function(){function e(e,t){Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"modeTag",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"html",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__enableObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__observerId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inlineId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.content=t,this.rollBack=null,this.__observerId=null,this.inlineId=Ze.partAntiFlicker?We():null,this.applyStartTime=Date.now(),this.html=t.elementContent.html.string,this.selector=t.elementContent.selector.string,this.__enableObserver=!!(null==t?void 0:t.__enableObserver),this.modeTag=Object.keys(Tr).find((function(e){return Tr[e]===t.elementContent.mode}))||"REPLACE"}return Object.defineProperty(e.prototype,"_applyContentChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e){var t=e.nextSibling,n=function(e,t,n){var i;if(e){var r=null,o=null,a=e.ownerDocument||et.document;switch(n){case Tr.AFTER:r=e.parentNode,o=e.nextSibling;break;case Tr.INSERT:r=e,o=e.firstChild;break;case Tr.APPEND:r=e,o=null;break;case Tr.BEFORE:case Tr.REPLACE:r=e.parentNode,o=e}if(r){var l=function(e,t){var n=0,i="",r="",o=xn[t.tagName];o&&(n=o[0],i=o[1],r=o[2]);var a=t.ownerDocument.createElement("div");a.innerHTML=i+(e||"")+r;for(var l=a;00;){var c=r.pop();c&&c.remove()}}catch(c){}"REPLACE"===a.modeTag&&e&&!(null===(n=e.hasAttribute)||void 0===n?void 0:n.call(e,yn))&&!o.contains(e)&&o.contains(i)&&(t?(null==i?void 0:i.contains(t))&&i.insertBefore(e,t):null===(l=null==i?void 0:i.appendChild)||void 0===l||l.call(i,e))},r}}}}),Object.defineProperty(e.prototype,"_selector",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&Z(e,et)}}),Object.defineProperty(e.prototype,"_applyContentBefore",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=xr.getMutationsList()||[];if(n.length&&e){if("APPEND"!==this.modeTag&&"INSERT"!==this.modeTag&&"REPLACE"!==this.modeTag||xr.getObserve(this.selector,"TEXT")&&xr.deleteObserve(this.selector,"TEXT"),"REPLACE"===this.modeTag){var i=n.filter((function(t){return!(!(null==t?void 0:t.selector)||!e.querySelector(t.selector))}));i.length&&i.forEach((function(e){return xr.deleteObserve(e.selector,e.changeType)}))}var r=n.filter((function(e){return(e.resultElement||[]).some((function(e){return 1===(null==e?void 0:e.nodeType)&&!!(null==e?void 0:e.querySelector(t.selector))}))}));r.length&&r.forEach((function(e){return xr.deleteObserve(e.selector,e.changeType)}))}}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"_generateNodeHtml",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.reduce((function(e,t){return e+(8===t.nodeType?"\x3c!--".concat(t.nodeValue,"--\x3e"):3!==t.nodeType?t.outerHTML:t.textContent||t.nodeValue||"")}),"")}}),Object.defineProperty(e.prototype,"_observeContentChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i=this._selector(e),r=(xr.getObserve(e,"".concat(this.modeTag,"_").concat(this.__observerId))||{}).resultElement,o=(null==r?void 0:r[0])&&et.document.contains(r[0])?r[0]:i;if(!o)return!1;var a=!r||0===(null==r?void 0:r.length)||(null==r?void 0:r.every((function(e){return!et.document.contains(e)}))),l="REPLACE"===this.modeTag;if(a||l&&(null==r?void 0:r[0])&&!this._compareHtmlIsEqual(null!==(t=this._generateNodeHtml(r))&&void 0!==t?t:"",this.html)){"REPLACE"!==this.modeTag&&(null===(n=this.rollBack)||void 0===n||n.call(this));var c=this._applyContentChange(o);return xr.updateObserve(e,"".concat(this.modeTag,"_").concat(this.__observerId),"resultElement",c),Boolean(c&&c.length>0)}return!1}}),Object.defineProperty(e.prototype,"_cleanCommonFactor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{return e.replace(/^]*)>(?:<\/p>)?(.+?)(?:
]*>)?<\/p>$/s,(function(e,t,n){return"
").concat(n,"
")})).replace(/\s+pt-insert-element=\"\"/g,"")}catch(t){return console.error("Error cleaning common factor:",t),e}}}),Object.defineProperty(e.prototype,"_cleanActionChangeFactor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{return e.replace(/\s+pt-inline-action="[^"]*"/g,"").replace(/\s+(?:target|href)="[^"]*"/g,"")}catch(t){return console.error("Error cleaning action change factor:",t),e}}}),Object.defineProperty(e.prototype,"_compareHtmlIsEqual",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this._cleanCommonFactor(e),i=this._cleanCommonFactor(t);return-1!==n.indexOf(gn)||-1!==i.indexOf(gn)?this._cleanActionChangeFactor(n)===this._cleanActionChangeFactor(i):n===i}}),Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;"REPLACE"===this.modeTag&&Ze.partAntiFlicker&&this.inlineId&&oe(this.selector,this.inlineId);var t=this._selector(this.selector);if(t){if("BODY"===t.nodeName)return;!this.__enableObserver&&this._applyContentBefore(t);var n=this._applyContentChange(t);this.__enableObserver&&(this.__observerId=Ve(),xr.addObserve({selector:this.selector,changeType:"".concat(this.modeTag,"_").concat(this.__observerId),resultElement:n,observerFn:function(){return e._observeContentChange(e.selector)}}))}else this.inline.delay(this.applyStartTime,(function(){return e.apply()}))}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;Ze.partAntiFlicker&&this.inlineId&&ae(this.selector,this.inlineId),null===(e=this.rollBack)||void 0===e||e.call(this),xr.deleteObserve(this.selector,"".concat(this.modeTag,"_").concat(this.__observerId)),this.__observerId=null}}),e}(),Er=function(){function e(e,t){var n,i,r;Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"documentFirstCSSStyleSheet",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.style=t,this.selector=null!==(r=null===(i=null===(n=t.elementStyle)||void 0===n?void 0:n.selector)||void 0===i?void 0:i.string)&&void 0!==r?r:"",this.documentFirstCSSStyleSheet=null,this.applyStartTime=Date.now(),this.rollBack=null}return Object.defineProperty(e.prototype,"_applySelectorDomToStyleSheet",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=e.cssRule,i=e.selectorDom,r=e.selectorString,o=e.propertyString,a=e.valueString,l=e.importantString,c=e.cssConditionalString;i?(this.rollBack=n?this._addStyleSheet(r,o,a,l,c):this._setStyleProperty(i,o,a,l),this._applyCallback()):this.inline.delay(this.applyStartTime,(function(){return t.apply()}))}}),Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.style.elementStyle,n=t.property,i=t.value,r=t.selector,o=t.cssRule,a=t.important,l=t.cssConditional,c=n&&n.string,s=i&&i.string,u=a&&a.boolean,p=r&&r.string,d=l&&l.string;if(p)if(null==et?void 0:et.document){var f=Z(p,et);o?this.style.version?this._applySelectorDomToStyleSheet({cssRule:o,selectorDom:f,selectorString:p,propertyString:c,valueString:s,importantString:u,cssConditionalString:d}):(this.rollBack=this._addStyleSheet(p,c,s,u,d),this._applyCallback()):this._applySelectorDomToStyleSheet({cssRule:o,selectorDom:f,selectorString:p,propertyString:c,valueString:s,importantString:u,cssConditionalString:d})}else this.inline.delay(this.applyStartTime,(function(){return e.apply()}))}}),Object.defineProperty(e.prototype,"_getFirstCSSStyleSheet",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.documentFirstCSSStyleSheet)return this.documentFirstCSSStyleSheet;for(var t=e.styleSheets.length-1;t>=0;t--){var n=e.styleSheets[t];if(!n.href){var i=n.ownerNode;if(i&&i.parentNode&&"HEAD"===i.parentNode.tagName)return this.documentFirstCSSStyleSheet=n}}return 0===e.styleSheets.length&&e.createStyleSheet(),this.documentFirstCSSStyleSheet=e.styleSheets[0]}}),Object.defineProperty(e.prototype,"_getNewStyleSheet",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return ne(e)}}),Object.defineProperty(e.prototype,"_addStyleSheetToHead",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n,i=t||et.document,r=i.getElementsByTagName("head")[0];r||(r=i.createElement("head"),null===(n=i.body.parentNode)||void 0===n||n.insertBefore(r,i.body)),r.appendChild(e)}}),Object.defineProperty(e.prototype,"_addStyleSheet",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){var o,a=e+"{"+t+": "+n+(i?" !important":"")+"}";if(r&&(a=r+"{"+a+"}"),null===(o=null==et?void 0:et.document)||void 0===o?void 0:o.createStyleSheet){var l=this._getFirstCSSStyleSheet(et.document),c=l.rules.length;return l.insertRule(a,c),function(){l.deleteRule?l.deleteRule(c):l.removeRule(c),l.insertRule("x {}",c)}}var s=this._getNewStyleSheet(a);this._addStyleSheetToHead(s,et.document);var u=s.parentNode;return function(){try{null==u||u.removeChild(s)}catch(e){}}}}),Object.defineProperty(e.prototype,"_setStyleProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){if(e.style.setProperty)try{var r=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return e.style.setProperty(t,n,i?"important":""),function(){e.style.setProperty(t,"",o),e.style.setProperty(t,r,o)}}catch(e){}var a=e.style.cssText;return e.style.cssText+=";"+t+": "+n+(i?" !important":"")+";",function(){e.style.cssText=a}}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this.rollBack)||void 0===e||e.call(this)}}),e}(),Sr=function(){function e(e,t){Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"textChange",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"replaceHTML",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inlineId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.textChange=t,this.applyStartTime=Date.now(),this.rollBack=null,this.selector=t.elementContent.selector.string,this.replaceHTML=this._getTextChangeHTML(this.textChange.elementContent.html.string),this.inlineId=Ze.partAntiFlicker?We():null}return Object.defineProperty(e.prototype,"_selector",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?Z(e,et):null}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"_getTextChangeHTML",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=et.document.createElement("div");return t.innerHTML=e,1===t.childNodes.length&&t.firstChild?t.firstChild.innerHTML:t.innerHTML}}),Object.defineProperty(e.prototype,"_applyTextChange",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this._selector(this.selector);if(!e)return!1;var t=e.innerHTML;return e.innerHTML=this.replaceHTML,Ze.partAntiFlicker&&this.inlineId&&ae(this.selector,this.inlineId),this._applyCallback(),this.rollBack=function(){try{e&&et.document.contains(e)&&(e.innerHTML=t)}catch(e){}},!0}}),Object.defineProperty(e.prototype,"_observeTextChange",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(xr.getObserve(this.selector,"TEXT")||{}).resultElement,t=this._selector(this.selector),n=(null==e?void 0:e[0])&&et.document.contains(e[0])?e[0]:t;return!(!n||n.innerHTML===this.replaceHTML)&&this._applyTextChange()}}),Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;Ze.partAntiFlicker&&this.inlineId&&oe(this.selector,this.inlineId);var t=this._selector(this.selector);t?(this._applyTextChange(),xr.addObserve({selector:this.selector,changeType:"TEXT",unique:!0,resultElement:[t],observerFn:function(){return e._observeTextChange()}})):this.inline.delay(this.applyStartTime,(function(){return e.apply()}))}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;Ze.partAntiFlicker&&this.inlineId&&ae(this.selector,this.inlineId),null===(e=this.rollBack)||void 0===e||e.call(this)}}),e}(),Cr=function(){function e(e,t){var n,i,r;Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.text=t,this.selector=null!==(r=null===(i=null===(n=null==t?void 0:t.elementText)||void 0===n?void 0:n.selector)||void 0===i?void 0:i.string)&&void 0!==r?r:"",this.timer=null,this.applyStartTime=Date.now(),this.rollBack=null}return Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.text.elementText,n=t.selector,i=t.text,r=t.childIndex,o=this._selector(n.string);if(o){if("BODY"===o.nodeName)return;if(r.integer>=0&&r.integer=3)return i.timer&&clearInterval(i.timer),void i.inline.isPreview;if(r>=1e3)i.timer&&clearInterval(i.timer);else{var a=i._selector(e);if(a){var l=a.childNodes[n],c=l.nodeValue;c!==t&&(l.nodeValue=t,o++,i.rollBack=function(){try{l&&document.contains(l)&&(l.nodeValue=c)}catch(e){}})}}}),200)}}),Object.defineProperty(e.prototype,"_selector",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&Z(e,et)}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;this.timer&&clearInterval(this.timer),null===(e=this.rollBack)||void 0===e||e.call(this)}}),e}(),Ir=function(){function e(e,t){var n,i;Object.defineProperty(this,"inline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"move",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"mode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"applyStartTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"targetSelector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"__enableObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rollBack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.inline=e,this.move=t,this.rollBack=null,this.applyStartTime=Date.now(),this.selector=t.elementMove.selector.string,this.targetSelector=t.elementMove.targetSelector.string,this.__enableObserver=!!t.__enableObserver,this.mode=null!==(i=null===(n=null==t?void 0:t.elementMove)||void 0===n?void 0:n.mode)&&void 0!==i?i:3}return Object.defineProperty(e.prototype,"_elementMoveToTarget",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=e.parentNode,r=e.nextSibling,o=e.ownerDocument||et.document,a=null;switch(n){case gr.BOTTOM:a=t,t.appendChild(e);break;case gr.TOP:a=t,t.insertBefore(e,t.childNodes[0]||null);break;case gr.BEFORE:a=t.parentNode,t.parentNode&&t.parentNode.insertBefore(e,t);break;case gr.AFTER:a=t.parentNode,t.parentNode&&t.parentNode.insertBefore(e,t.nextSibling)}return this.rollBack=function(){i&&i.insertBefore(e,r)},{elementOwnerDocument:o,parentNode:a,insertedNodes:[e]}}}),Object.defineProperty(e.prototype,"_applyMoveChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(e&&t){var n=this._elementMoveToTarget(e,t,this.mode),i=n.elementOwnerDocument,r=n.parentNode,o=n.insertedNodes;if(i&&r&&(null==o?void 0:o.length))return this._applyCallback(),o}}}),Object.defineProperty(e.prototype,"_selector",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&Z(e,et)}}),Object.defineProperty(e.prototype,"_applyCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inline.renderCallback()}}),Object.defineProperty(e.prototype,"apply",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this._selector(this.selector),n=this._selector(this.targetSelector);if(t&&n){if("BODY"===t.nodeName||"BODY"===n.nodeName)return;var i=this._applyMoveChange(t,n);this.__enableObserver&&xr.addObserve({selector:this.selector,changeType:this.mode,resultElement:i,observerFn:function(){return e._observeMoveChange()}})}else this.inline.delay(this.applyStartTime,(function(){return e.apply()}))}}),Object.defineProperty(e.prototype,"_observeMoveChange",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this._selector(this.selector),t=this._selector(this.targetSelector),n=(xr.getObserve(this.selector,this.mode)||{}).resultElement,i=!n||n.length<=0||n.some((function(e){return!et.document.contains(e)}));if(i&&e&&t){var r=this._applyMoveChange(e,t);return xr.updateObserve(this.selector,this.mode,"resultElement",r),Boolean(r&&r.length>0)}if(!i&&e&&e!==n[0]){var o=e.parentNode;return o&&o.removeChild(e),!0}return!1}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.applyStartTime=Date.now(),this.apply()}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this.rollBack)||void 0===e||e.call(this)}}),e}(),kr=function(){function e(e,t,n,i){var r,o=this;Object.defineProperty(this,"experience",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hasPageJumped",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hasSendInlineView",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inlineList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inlineRender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"terminal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPreview",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.experience=e,this.isPreview=i,this.terminal=n,this.version=t,this.inlineList=this._actionFilter((null===(r=this.terminal)||void 0===r?void 0:r.inline)||[]),this.inlineRender=[],this.hasSendInlineView=!1,this.hasPageJumped=!1,this._init(),nt.on(T.ROUTER_CHANGE,(function(){o.hasPageJumped=!0}))}return Object.defineProperty(e.prototype,"_init",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._unique().forEach((function(t){e._mounted(t)}))}}),Object.defineProperty(e.prototype,"_unique",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return(this.inlineList||[]).sort((function(e,t){return(null==e?void 0:e.changeElementAction)&&!(null==t?void 0:t.changeElementAction)?1:!(null==e?void 0:e.changeElementAction)&&(null==t?void 0:t.changeElementAction)?-1:0})).reduce((function(t,n){return t.reduce((function(t,i,r){return e._isEqual(n,i)&&t.push(r),t}),[]).forEach((function(e){t.splice(e,1)})),t.push(n),t}),[])}}),Object.defineProperty(e.prototype,"_isEqual",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return"changeElementAction"in e?function(e,t){return"changeElementAction"in e&&"changeElementAction"in t&&e.changeElementAction.selector.string===t.changeElementAction.selector.string}(e,t):"changeElementAttribute"in e?function(e,t){return"changeElementAttribute"in e&&"changeElementAttribute"in t&&e.changeElementAttribute.selector.string===t.changeElementAttribute.selector.string&&e.changeElementAttribute.attribute.string===t.changeElementAttribute.attribute.string}(e,t):"elementContent"in e?e.elementContent.isTextChange?function(e,t){return"elementContent"in e&&"elementContent"in t&&!(!e.elementContent.isTextChange||!t.elementContent.isTextChange)&&e.elementContent.selector.string===t.elementContent.selector.string}(e,t):function(e,t){return"elementContent"in e&&"elementContent"in t&&e.elementContent.selector.string===t.elementContent.selector.string&&e.elementContent.isTextChange===t.elementContent.isTextChange&&e.elementContent.mode===Tr.REPLACE&&t.elementContent.mode===Tr.REPLACE}(e,t):"elementMove"in e?function(e,t){return"elementContent"in e&&"elementContent"in t&&e.elementMove.selector.string===t.elementMove.selector.string}(e,t):"elementText"in e&&function(e,t){return"elementText"in e&&"elementText"in t&&e.elementText.selector.string===t.elementText.selector.string&&e.elementText.mode===t.elementText.mode}(e,t)}}),Object.defineProperty(e.prototype,"_actionFilter",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return(e||[]).reduce((function(e,t){var n=t;return n&&(e=e.filter((function(e){var t,i=e.changeElementAttribute||{},r=i.selector,o=i.attribute;return(null==r?void 0:r.string)!==(null===(t=null==n?void 0:n.selector)||void 0===t?void 0:t.string)||"href"!==(null==o?void 0:o.string)}))),e.push(t),e}),[])}}),Object.defineProperty(e.prototype,"_mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t;(null==e?void 0:e.changeElementAction)&&(t=new wr(this,e)),e.elementStyle&&(t=new Er(this,e)),e.changeElementAttribute&&(t=new Or(this,e)),e.elementContent&&(t=e.elementContent.isTextChange?new Sr(this,e):new Pr(this,e)),e.elementMove&&(t=new Ir(this,e)),e.elementText&&(t=new Cr(this,e)),t&&(null==t||t.mounted(),this.inlineRender.push(t))}}),Object.defineProperty(e.prototype,"delay",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=this;void 0===n&&(n=200),this.hasPageJumped||Date.now()-e>12e4||setTimeout((function(){i.hasPageJumped||null==t||t()}),n)}}),Object.defineProperty(e.prototype,"renderCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.hasSendInlineView||this.isPreview||(this.hasSendInlineView=!0,ii.engage({engageId:this.experience.engageId,engageVersionId:this.version.versionId,engageAction:"view",properties:{creativeId:"",creativeType:"inline"}}),Yr.sendExperienceEventToGA("view",{experienceType:this.experience.engageType,experienceId:this.experience.engageId,versionId:this.version.versionId,experienceName:this.experience.engageName,versionName:this.version.versionName}))}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.inlineRender.forEach((function(e){return e.unmounted()}))}}),e}(),jr=function(){function e(e,t,n,i){var r=this;Object.defineProperty(this,"isPreview",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"experience",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"terminal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isSendVersionEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"destroyed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"renderEngage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.isPreview=e,this.experience=t,this.version=n,this.terminal=i,this.isSendVersionEvent=!1,this.renderEngage=[],this.destroyed=!1,nt.on("".concat(T.CLEAR_EXPERIENCE,".").concat(t.engageId),(function(){r._handleClearExperience()}))}return Object.defineProperty(e.prototype,"_renderExperience",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t=this.terminal||{},n=t.popup,i=t.stickybar,r=t.inline,o=t.code,a=t.extraConfig;if((null==a?void 0:a.ptKit)&&Lr.initMethods(null==a?void 0:a.ptKit),n&&this._renderPopup("popup",n),i&&this._renderPopup("stickyBar",i),o&&this._renderCode(o,null===(e=this.experience)||void 0===e?void 0:e.productSocialProof),r)if("next"===Ze.frameworkName&&"complete"!==et.document.readyState){var l=this,c=function(){"complete"===et.document.readyState&&(setTimeout((function(){!l.destroyed&&l._renderInline()}),150),ge(et.document,"readystatechange",c))};me(et.document,"readystatechange",c,!1)}else this._renderInline()}}),Object.defineProperty(e.prototype,"_renderPopup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=[]),t.forEach((function(t){var i=new yr(n.experience,n.version,n.terminal,t,n.isPreview,e);n.renderEngage.push(i)}))}}),Object.defineProperty(e.prototype,"_renderCode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t="");var i=new Si(e,t,(function(){n._sendViewPackage("code"),n._updateLocalCache("seenTimes")}));this.renderEngage.push(i)}}),Object.defineProperty(e.prototype,"_renderInline",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=new kr(this.experience,this.version,this.terminal,this.isPreview);this.renderEngage.push(e),ft()&&("loading"===et.document.readyState?me(et.document,"DOMContentLoaded",ht):ht())}}),Object.defineProperty(e.prototype,"_bodyReady",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;et.document.body?this._renderExperience():me(et,"DOMContentLoaded",(function(){e._renderExperience()}))}}),Object.defineProperty(e.prototype,"_sendViewPackage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this.isPreview){var t=this;ii.addCallbackToWaitList((function(){ii.engage({engageId:t.experience.engageId,engageVersionId:t.version.versionId,engageAction:"view",properties:{creativeId:"",creativeType:e}})})),Yr.sendExperienceEventToGA("view",{experienceType:this.experience.engageType,experienceId:this.experience.engageId,versionId:this.version.versionId,experienceName:this.experience.engageName,versionName:this.version.versionName})}}}),Object.defineProperty(e.prototype,"_updateLocalCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){Sn(this.version.versionId,e)}}),Object.defineProperty(e.prototype,"_controlGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(-1!==["POPUP","STICKY_BAR"].indexOf(this.experience.engageType))return this.terminal={popup:[{popupId:fn,popupHasError:!1,popupHasForm:!1,popupName:"CONTROL_GROUP",widgets:[]}]},void this._bodyReady();this._sendViewPackage("controlGroup"),this._updateLocalCache("seenTimes")}}),Object.defineProperty(e.prototype,"_handleRenderCallback",{enumerable:!1,configurable:!0,writable:!0,value:function(){Tn(this.version.versionId)}}),Object.defineProperty(e.prototype,"_handleClearExperience",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.renderEngage.length>0&&(this.renderEngage.forEach((function(e){var t;null===(t=null==e?void 0:e.unmounted)||void 0===t||t.call(e)})),this.renderEngage=[])}}),Object.defineProperty(e.prototype,"mounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;if(this.version){if(this.version.controlGroup)return this._controlGroup(),void this._handleRenderCallback();var t=!ei()&&(null===(e=this.terminal)||void 0===e?void 0:e.redirect)&&function(e){var t="";if(e){var n=e.condition,i=e.toValue;"=="===n&&i&&(t=i.indexOf(et.location.hostname)<0?Qt(i):i)}return t}(this.terminal.redirect);if(t&&(et.__pt_inspectorMode?(Qr.showExperience(this.experience.engageId,this.version.versionId),setTimeout((function(){Hn(t)}),500)):Hn(t)),!this.terminal&&!et.PT_ENGAGE_IN_DEBUG)return this.unmounted(),void this._handleRenderCallback();this._bodyReady(),this._handleRenderCallback()}}}),Object.defineProperty(e.prototype,"unmounted",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.destroyed=!0,this._handleClearExperience()}}),e}(),Ar=function(){function e(){var e=this;Object.defineProperty(this,"isPreview",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"renderList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.isPreview=!1,this.renderList=[],nt.on(T.ROUTER_CHANGE,(function(){e.clearRenderList(),Tn()}))}return Object.defineProperty(e.prototype,"clearRenderList",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.renderList.forEach((function(e){return e.unmounted()})),this.renderList=[]}}),Object.defineProperty(e.prototype,"setPreviewFlag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.isPreview=e}}),Object.defineProperty(e.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if((this.isPreview||Qn()||!Ze.isExcess)&&(e.forEach((function(e){var n,i,r=e.matchedUrl,o=e.versions;if(!r||r===it.page){var a=o[0],l=(null===(n=null==a?void 0:a.terminals)||void 0===n?void 0:n.find((function(e){return e.type===Ln(et)})))||(null===(i=null==a?void 0:a.terminals)||void 0===i?void 0:i[0]);if((!t.isPreview||0!==(null==l?void 0:l.terminalStatus)&&0!==(null==l?void 0:l.status))&&(c=a.versionId,-1===(dn.get(bn)||[]).indexOf(c))){var c,s=new jr(t.isPreview,e,a,l);s.mounted(),t.renderList.push(s)}}})),!this.isPreview)){var n=e.filter((function(e){return 1===e.enableABTest&&e.versions.length>0})).map((function(e){return e.versions[0].versionId}));Fn(Ze.sid,n)}}}),e}(),Nr=new Ar,Dr=function(){function e(){var e=this;Object.defineProperty(this,"rollbackList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.rollbackList=[],nt.on(T.ROUTER_CHANGE,(function(){e.rollbackList.forEach((function(e){return"function"==typeof e&&e()})),e.rollbackList=[]}))}return Object.defineProperty(e.prototype,"initMethods",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e&&Object.keys(e).forEach((function(n){var i;!t[[n]]&&(null===(i=e[n])||void 0===i?void 0:i.startsWith("function"))&&(t[n]=new Function(r,"return ".concat(e[n]))(t))}))}}),e}(),Lr=new Dr;function Rr(e){var t=history[e];return function(){var n=t.apply(this,arguments);try{var i=new _i(e,{bubbles:!1,cancelable:!1,detail:{}});i&&(i.arguments=arguments,xi(i,et))}catch(e){}return n}}function Mr(){return Ie(m,et)}function Fr(){return Ie(g)}var Br,Ur,Hr=function(){function e(){var e=this;Object.defineProperty(this,"pageSended",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"experienceInstance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.pageSended=!1,this.experienceInstance=null,nt.on(T.BEFORE_ROUTER_CHANGE,(function(){e._redirect()})),nt.on(T.ROUTER_CHANGE,(function(){e._inline()}))}return Object.defineProperty(e.prototype,"_isNV",{enumerable:!1,configurable:!0,writable:!0,value:function(){Bt(),kt("nid",1),it.multiLinkTag?Jt():(kt("visitRef",$(it.ref,!1)),rt("isNV",!Un()))}}),Object.defineProperty(e.prototype,"_isSearchEngine",{enumerable:!1,configurable:!0,writable:!0,value:function(){it.multiLinkTag?Jt():(kt("visitRef",$(it.ref,!1)),rt("isNV",!Un()))}}),Object.defineProperty(e.prototype,"_isReturnVisit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;it.multiLinkTag?Jt():(rt("isNV",!Un()&&this._getIsNV()),kt(["pvn","visitRef"],[it.isNV?0:null!==(e=Ht())&&void 0!==e?e:1,it.isNV?$(it.ref,!1):Wt()]))}}),Object.defineProperty(e.prototype,"_updateStates",{enumerable:!1,configurable:!0,writable:!0,value:function(){kt("lastActionTime",it.multiLinkTag?$t():At())}}),Object.defineProperty(e.prototype,"_sendPage",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;ii.page(it.isNV?"pn":"pv",(function(){e.pageSended=!0}))}}),Object.defineProperty(e.prototype,"_getIsNV",{enumerable:!1,configurable:!0,writable:!0,value:function(){return e=$t(),+it.visitTime-+e>+it.silentTime||1===Dt();var e}}),Object.defineProperty(e.prototype,"_checkExecutionConditions",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!(yi()||Qn()||Mr()||Fr()||ei()||Ze.isExcess)}}),Object.defineProperty(e.prototype,"_redirect",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._checkExecutionConditions()&&function(){var e=(Ze.experienceList||[]).filter((function(e){return"REDIRECT"===e.engageType})).map((function(e){return{experienceId:e.engageId,conditions:e.conditions,versions:e.versions.map((function(e){var t;return{controlGroup:e.controlGroup,rate:e.rate,versionId:e.versionId,redirect:null===(t=e.terminals)||void 0===t?void 0:t[0].redirect}}))}}));try{e.length&&et.__pt_inspectorMode&&Qr.setExperienceList({matchedList:Ze.experienceList})}catch(e){}var t=function(e){for(var t,n,i=Mn(Ze.sid),r=null,o=0;o0&&e&&e.render(t)}(this.experienceInstance)}}),Object.defineProperty(e.prototype,"setExperience",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.experienceInstance=e}}),Object.defineProperty(e.prototype,"start",{enumerable:!1,configurable:!0,writable:!0,value:function(){this[0===Ut()?"_isNV":"_isReturnVisit"](),this._updateStates(),this._redirect()||(this._inline(),this._sendPage(),it.multiDomainFlag&&("complete"===et.document.readyState?Xt():(me(et,"DOMContentLoaded",(function(){Xt()})),me(et,"load",(function(){Xt()})))),Wn(),function(){if(!Ze.cancelWatchSPARouterChange){var e=et.history;e.pushState=Rr("pushState"),e.replaceState=Rr("replaceState");var t=function(){return Ze.onlyWatchRouterPath?je(et,!1):Ze.watchRouterHashChange?je(et):et.location.href};if("onpopstate"in et){var n=t(),i=q((function(){var i=t();"beforeunload"!==e.state&&"back"!==e.state&&n!==i&&(n=i,nt.emit(T.BEFORE_ROUTER_CHANGE),setTimeout((function(){nt.emit(T.ROUTER_CHANGE)}),200))}),200);ge(et,"popstate",i),me(et,"popstate",i),ge(et,"pushState",i),me(et,"pushState",i),ge(et,"replaceState",i),me(et,"replaceState",i),Ze.watchRouterHashChange&&(ge(et,"hashchange",i),me(et,"hashchange",i))}}}(),function(){try{wi()&&(window[k]=window[k]||["setAccount,".concat(Ze.sid)],ce(et.document,gi+"/components/event/foreign/dest/event.js",!1))}catch(e){}}(),Mr()&&function(){var e;if(!window._ptLpoVisualEvent){window._ptLpoVisualEvent={};var t=(null===(e=et.location.href)||void 0===e?void 0:e.indexOf("isdev"))>-1?"localhost:8000":"pti.ptengine.com";ce(et.document,"".concat(location.protocol,"//").concat(t,"/event/event_entry.js"))}}(),me(et,"onorientationchange",(function(){rt("rotationFlag",ye(et))})),"loading"!==et.document.readyState?ii.performance():me(et,"DOMContentLoaded",(function(){ii.performance()})))}}),e}(),$r=new Hr,Vr=function(){function e(){Object.defineProperty(this,"locked",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"touchmoveFlag",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formElementTriggerEventType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastFocusDomQueue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"iframeValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allFocusType",{enumerable:!0,configurable:!0,writable:!0,value:["input","textarea","select","embed"]}),this.locked=!1,this.timer=null,this.touchmoveFlag=!1,this.formElementTriggerEventType=this._getFormElementTriggerEventType(),this.lastFocusDomQueue=[null,null],this.iframeValue=[0,0,""]}return Object.defineProperty(e.prototype,"_getFormElementTriggerEventType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return/windows|win32/i.test(et.navigator.userAgent)&&/msie|trident|edge/i.test(et.navigator.userAgent)||/(iPhone|iPad|iPod|iOS|Android)/.test(et.navigator.userAgent)?"click":"focus"}}),Object.defineProperty(e.prototype,"_bindEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this;me(et.document,"click",(function(e){t._handleDocumentClick(e,et.document.documentElement),bi()}),!0),me(et.document,"touchstart",(function(e){t._handleTouchstart(e)}),!0),me(et.document,"touchmove",(function(){t._handleTouchmove()}),!0),me(et.document,"touchend",(function(e){t._handleTouchend(e)}),!0),me(et.document,"keydown",(function(t){e._handleKeydownListener(t)}),!0),me(et.document,"keyup",(function(t){e._handleKeyupListener(t)}),!0);var n=et.document.readyState.toLowerCase();if("interactive"===n||"complete"===n)this._handleBindIframe();else{var i=function(){t._handleBindIframe(),ge(et.document,"DOMContentLoaded",i)};me(et.document,"DOMContentLoaded",i)}}}),Object.defineProperty(e.prototype,"_handleKeydownListener",{enumerable:!1,configurable:!0,writable:!0,value:function(e){hi(e),fi("keydown",e)&&this._keyboardEnter(e)}}),Object.defineProperty(e.prototype,"_handleKeyupListener",{enumerable:!1,configurable:!0,writable:!0,value:function(e){vi(e),fi("keyup",e)&&this._keyboardEnter(e)}}),Object.defineProperty(e.prototype,"_handleTouchstart",{enumerable:!1,configurable:!0,writable:!0,value:function(e){rt(["srcElement","mouseCoo"],[qe(e),Ge(e)])}}),Object.defineProperty(e.prototype,"_handleBindIframe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(function(){var e;return"true"===(null===(e=Ke("setIframe"))||void 0===e?void 0:e[1])}()||"7f21ceb9"===Ze.sid)for(var t=et.document.getElementsByTagName("iframe"),n=0;n0&&ii.track({events:i}),rt(["srcElement","clickActionTime"],[qe(n),(new Date).getTime()])}e.lastFocusDomQueue.push(t),e.lastFocusDomQueue.shift()}))}))}))}}),Object.defineProperty(e.prototype,"_applyAutoEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(Ze.autoEvent&&0!==Ze.autoEvent.length){var t=function(e,t,n){var i=function(e){for(;e&&"body"!==e.nodeName.toLowerCase();){if("a"===(null==e?void 0:e.nodeName.toLowerCase()))return e;e=X(t=e)?K(t):t.parentNode}var t;return null}(e);if(i){var r="",o="object"==typeof i.href?i.href.animVal:i.href,a=$(o,!1).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\./g,"%2E"),l=/\.(msi|pdf|apk|ipa|jar|umd|jad|epub|mobi|iso|tar|zip|rar|gzip|gz|dmg|doc|docx|xls|xlsx|csv|ppt|pptx|exe|txt|pdf|key|numbers|pages)/,c=o.match(/mailto:/)?"mailSendings":o.toLowerCase().match(l)?"fileDownloads":0===o.toLowerCase().indexOf("http")?"outboundLinks":"";if(c&&-1!==t.indexOf(c)){if("mailSendings"===c&&(r="Mail_Mailto_".concat(a.toLowerCase())),"fileDownloads"===c){var s=o.toLowerCase().match(l)[1];a=a.replace(/(^https?:\/\/)([^/]+)/i,(function(e){return e.toLowerCase()})),r="Downloads_".concat(s,"_").concat(a)}if("outboundLinks"===c){for(var u=!0,p=0;p0){u=!1;break}u&&(a=a.replace(/(^https?:\/\/)([^/]+)/i,(function(e){return e.toLowerCase()})),r="Outbound%20Links_Exit_".concat(a))}}return r}}(e,Ze.autoEvent,it.domainSet);if(t){var n={events:[{eventName:t,eventType:0}]};nr({srcElement:e,win:et})&&(n.params={transport:"beacon"}),ii.track(n)}}}}),Object.defineProperty(e.prototype,"_onClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i=(new Date).getTime();qn(i)&&zn(),Yn(i)&&kt("lastActionTime",i);var r=qe(e);if(r){var o=(null===(t=null==r?void 0:r.nodeName)||void 0===t?void 0:t.toLowerCase())||"";if("html"!==o&&!(it.srcElement===r&&i-it.clickActionTime=(t=parseInt(e.scrollHeight.toString(),10),isNaN(t)?0:t))&&(n=!1),n}}),Object.defineProperty(e.prototype,"_handleScroll",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n=qe(e),i=(null==n?void 0:n.documentElement)||n,r=(new Date).getTime();if(qn(r)&&zn(),Yn(r)&&kt("lastActionTime",r),rt("scrolledFlag",!0),this.timeN=r,this.tmpTime=this.timeN-this.timeB,this.tmpTime<1e3)return this.timeB=this.timeN,this.scrollTimer&&clearTimeout(this.scrollTimer),void(this.scrollTimer=setTimeout((function(){t=lt(Dt(),r,$t()),at(i),ii.scroll(t,!0)}),1e3));t=lt(Dt(),r,$t()),kt("lastActionTime",r),kt("pageList",qt()),$n(),at(i),this._isScrolling(i)&&ii.scroll(t),this.timeB=this.timeN}}),Object.defineProperty(e.prototype,"start",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.timeB=At(),this._bindEvent(),-1!==["interactive","complete"].indexOf(et.document.readyState.toLowerCase())?this._scrollDomBindEvent():me(et.document,"DOMContentLoaded",this._scrollDomBindEvent)}}),e}()),zr=new(function(){function e(){Object.defineProperty(this,"_ver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_defaultArr",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastTrackEventTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._ver="1.0.1",this._defaultArr=[],this.lastTrackEventTime=(new Date).getTime()-1e4}return Object.defineProperty(e.prototype,"_checkTrackEventTime",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(new Date).getTime();return!(this.lastTrackEventTime+1e3>e||(e-this.lastTrackEventTime>1e4?(this.lastTrackEventTime=e-9e3,0):(this.lastTrackEventTime+=1e3,0)))}}),Object.defineProperty(e.prototype,"_addPVN",{enumerable:!1,configurable:!0,writable:!0,value:function(){kt("pvn",+Ht()+1)}}),Object.defineProperty(e.prototype,"_handlePush",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e.split(",");switch(n[0]){case"setPVTag":this._setPTTag(n);break;case"setCustomEvent":this._setCustomEvent(t);break;case"setTrackEvent":this._setTrackEvent(n);break;case"setCrossDomainLink":this._setCrossDomainLink(n[1])}}}),Object.defineProperty(e.prototype,"_setPTTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{var t="";if("replace"===e[2])t=e[1];else{var n=e[1]?e[1]:"";t=it.initPage+"#"+n}Vt(t),rt("page",t),ii.page("vpv")}catch(e){}}}),Object.defineProperty(e.prototype,"_setCustomEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{var t=e.eventName?e.eventName:"";if(!t)return;this._addPVN(),ii.track({events:[{eventName:t,eventType:0}]})}catch(e){}}}),Object.defineProperty(e.prototype,"_setTrackEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{if("string"==typeof e[6]&&!et.location.href.replace(/\/$/,"").match(new RegExp(e[6].replace(/^\//,"").replace(/[\\]?[\\]?\/[\.]?[\*]?[\$]?$/,""))))return;void 0===e[3]&&(e[3]=""),void 0===e[4]&&(e[4]="0"),e[4]=e[4].replace(/\./g,"e");for(var t=1;t<5;t++)e[t]=Le(e[t]);for(e[1]=e[1].substring(0,200),e[2]=e[2].substring(0,200),e[3]=e[3].substring(0,500),e[4]=e[4].substring(0,10),t=1;t<5;t++)if(e[t]=$(e[t]).replace(/\./g,"%2E"),e[t].indexOf(".")>-1){var n=e[t].split(".");e[t]=n.join("%2E")}if("string"==typeof e[7]);else{if(!this._checkTrackEventTime())return;this._addPVN();var i=e[3];i&&ii.track({events:[{eventName:i,eventType:0}]})}}catch(e){}}}),Object.defineProperty(e.prototype,"_setCrossDomainLink",{enumerable:!1,configurable:!0,writable:!0,value:function(e){rt("crossDomainLink","allManual"===e?"allManual":"halfManual"===e&&"halfManual")}}),Object.defineProperty(e.prototype,"_init",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this._defaultArr.length>0)for(var e=0,t=this._defaultArr.length;e=0;e--){var t=this.waitList[e],n=t.type,i=t.eventName,r=t.properties;"ga4"===n&&(this._sendGAEvent(i,r),this.waitList.splice(e,1))}}}),Object.defineProperty(e.prototype,"_checkHasCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i,r,o,a,l;return(null===(r=null===(i=this.sendCache)||void 0===i?void 0:i[e])||void 0===r?void 0:r[t])&&-1!==(null===(l=null===(a=null===(o=this.sendCache)||void 0===o?void 0:o[e])||void 0===a?void 0:a[t])||void 0===l?void 0:l.indexOf(n))}}),Object.defineProperty(e.prototype,"_addCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i,r;(null===(i=this.sendCache)||void 0===i?void 0:i[e])||(this.sendCache[e]={}),(null===(r=this.sendCache[e])||void 0===r?void 0:r[t])||(this.sendCache[e][t]=[]),-1===this.sendCache[e][t].indexOf(n)&&this.sendCache[e][t].push(n)}}),Object.defineProperty(e.prototype,"_generatorInterval",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i=0,r=null!==(t=e.delay)&&void 0!==t?t:200,o=null!==(n=e.maxWaitTime)&&void 0!==n?n:3e4,a=setInterval((function(){var t;e.checkFn()?(e.callbackFn(),clearInterval(a)):i>o&&(null===(t=e.rejectFn)||void 0===t||t.call(e),clearInterval(a)),i+=r}),r);return a}}),Object.defineProperty(e.prototype,"sendExperienceEventToGA",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=t.experienceType,i=t.experienceId,r=t.versionId,o=t.experienceName,a=t.versionName;if(this.enableIntegrationGA4&&"REDIRECT"!==n&&!this._checkHasCache(i,r,e)){var l="",c={};"view"===e&&(l="pt_experience_impression",c={pt_experience_name:o,pt_experience_version_name:a}),"close"===e&&(l="pt_experience_close",c={pt_experience_name:o,pt_experience_version_name:a}),"click"===e&&(l="pt_experience_click",c={pt_experience_name:o,pt_experience_version_name:a}),l&&(this._sendGAEvent(l,c),this._addCache(i,r,e))}}}),e}(),Yr=new Gr,Jr=function(){function e(){Object.defineProperty(this,"area",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widgetScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.area="en",this.widgetScript=null}return Object.defineProperty(e.prototype,"getWidgetLocalData",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=[];try{var t=_t(x);t&&(e=JSON.parse(t))}catch(e){}return e}}),Object.defineProperty(e.prototype,"getWidgetSessionData",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=[];try{var t=sessionStorage.getItem(x);t&&(e=JSON.parse(t))}catch(e){}return e}}),Object.defineProperty(e.prototype,"setWidgetFlagToLocalStorage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getWidgetLocalData(),i=this.getLocalDataSidIndex(n),r=i.index,o=i.position;if("add"===e){var a=t&&this.checkPositionDataIsValid(t)?t:"l",l="".concat(Ze.sid,"-").concat(a);-1===r?n.push(l):t&&t!==o&&n.splice(r,1,l)}else-1!==r&&n.splice(r,1);wt(x,JSON.stringify(n))}}),Object.defineProperty(e.prototype,"setWidgetCloseFlagToSessionStorage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{var t=this.getWidgetSessionData(),n=t.indexOf(Ze.sid);"add"===e?-1===n&&t.push(Ze.sid):-1!==n&&t.splice(n,1),sessionStorage.setItem(x+"_close",JSON.stringify(t))}catch(e){}}}),Object.defineProperty(e.prototype,"loadWidgetScript",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.widgetScript||(this.widgetScript=ce(et.document,"".concat(location.protocol,"//pteglobalstatic.ptengine.com/assistant/inject.js?area=").concat(this.area,"&sid=").concat(Ze.sid),!0,"ptengine-assistant-inject"))}}),Object.defineProperty(e.prototype,"getLocalDataSidIndex",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n=e||this.getWidgetLocalData(),i=n.findIndex((function(e){return e&&e.startsWith(Ze.sid)})),r=null===(t=n[i])||void 0===t?void 0:t.split("-")[1];return{index:i,position:this.checkPositionDataIsValid(r)?r:void 0}}}),Object.defineProperty(e.prototype,"checkPositionDataIsValid",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return["l","r"].includes(e)}}),Object.defineProperty(e.prototype,"openWidget",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.loadWidgetScript(),this.setWidgetFlagToLocalStorage("add",e),this.setWidgetCloseFlagToSessionStorage("remove")}}),Object.defineProperty(e.prototype,"closeWidget",{enumerable:!1,configurable:!0,writable:!0,value:function(e){"local"===e?this.setWidgetFlagToLocalStorage("remove"):this.setWidgetCloseFlagToSessionStorage("add")}}),Object.defineProperty(e.prototype,"start",{enumerable:!1,configurable:!0,writable:!0,value:function(e){yi()||Qn()||Mr()||Fr()||ei()||(this.area=Te(e),-1!==this.getLocalDataSidIndex().index&&(this.loadWidgetScript(),this.setWidgetFlagToLocalStorage("add")))}}),e}(),Xr=new Jr,Kr=function(){function e(){var e=this;Object.defineProperty(this,"experienceDisplayCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.experienceDisplayCache=new Set,nt.on(T.ROUTER_CHANGE,(function(){e.experienceDisplayCache.clear()}))}return Object.defineProperty(e.prototype,"_postMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){et.postMessage({command:e,message:t,tabId:et.__pt_inspector_tabId},"*")}}),Object.defineProperty(e.prototype,"_parseResponseFromApi",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{var t=e?JSON.parse(e):{};if("success"===t.status)return t}catch(e){return}}}),Object.defineProperty(e.prototype,"execResponseFromApi",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this._parseResponseFromApi(e)){var t=this._parseResponseFromApi(e),n=t.conversion,i=t.goal,r=t.content,o=t.unMatchedEngage,a=t.pvLimited,l=t.eventLimited,c=t.exclude;this.setExperienceList({matchedList:r,unMatchedList:o}),this._postMessage("SendPageInfo",{type:"API_RESPONSE",detail:{pvLimited:a,eventLimited:l,exclude:c,conversion:n,goal:i,sid:Ze.sid},timestamp:Date.now()})}}}),Object.defineProperty(e.prototype,"setExperienceList",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.matchedList,n=void 0===t?[]:t,i=e.unMatchedList,r=void 0===i?[]:i;this._postMessage("SetExperienceList",{matchedList:n,unMatchedList:null!=r?r:[]})}}),Object.defineProperty(e.prototype,"showExperience",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.experienceDisplayCache.has(t)||(this._postMessage("SendPageInfo",{type:"EXPERIENCE",detail:{engageId:e,versionId:t},timestamp:Date.now()}),this.experienceDisplayCache.add(t))}}),Object.defineProperty(e.prototype,"sendTrackEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){void 0===n&&(n="");var i=null==e?void 0:e.reduce((function(e,t){return e.push(t.eventName),e}),[]),r=t&&function(e){if(!e)return"";var t=["input","select","textarea","button"],n=e.split(">").map((function(e){var n;t.some((function(t){return 0===e.indexOf(t+":input[name=")}))&&(e=e.split(":input").join(""));var i=null===(n=e.match(/\:eq\(\d+\)/))||void 0===n?void 0:n[0];if(i){var r=e.split(i)[0],o=i.replace(/[^0-9]/gi,"");r&&void 0!==o&&(e=/(#.+)/.test(r)?'[id="'.concat(r.replace("#",""),'"]').concat(Number(o)>0?":nth-of-type(".concat(Number(o)+1,")"):""):"".concat(r,":nth-of-type(").concat(Number(o)+1,")"))}else/(#.+)/.test(e)&&(e='[id="'.concat(e.replace("#",""),'"]'));return e})).join(">");return n.replace(/\\u/g,"\\\\u")}(V(t.slice(1)));this._postMessage("SendPageInfo",{type:"EVENT",detail:{eventNames:i,selector:null!=r?r:"",text:n},timestamp:Date.now()})}}),e}(),Qr=new Kr;if(ii.setExperience(Nr),$r.setExperience(Nr),Array.prototype.find||(Array.prototype.find=function(e){return e&&(this.filter(e)||[])[0]}),function(){var e,t,n,i,r,o,a=xe(et,et.document.documentElement),l=ye(et),c=function(){var e,t=[],n="",i=Ze.domain&&Ze.domain.length>1,r=function(e){for(var t=e.split(".").reverse(),n=[],i=1;it.replace(/^https?:\/\//,"").length?1:-1}));for(var o=0;o4||"com"===i||"org"===i)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i);var r=e.match(t);return r?r[0]:""}(et.location.hostname),t.push(n)),{domain:n,domainSet:t,multiDomainFlag:i}}(),s=c.domain,u=c.domainSet,p=c.multiDomainFlag;rt("domain",s),rt("page",ut()),rt("initPage",ut()),rt("domainSet",u),rt("multiDomainFlag",p),rt("silentTime",function(){var e,t,n,i,r=pe();return 1e3*(r===O.PC||r===O.TABLET?null!==(t=null===(e=Ze.silentTimes)||void 0===e?void 0:e.pc)&&void 0!==t?t:30:null!==(i=null===(n=Ze.silentTimes)||void 0===n?void 0:n.mobile)&&void 0!==i?i:5)*60}()),rt("trackEventList",ct()),rt("visualEventSelectors",(e=[],Ze.ptiEventList.forEach((function(t){var n=Oe(V(t.isOnly?t.selfSelector:t.sameSelector));e.find((function(e){return e===n}))||e.push(n)})),e)),rt("ref",st(t=et.document.referrer)?"":t),rt("terminalType",pe(et)),rt("rotationFlag",l),rt("yMax",a),rt("yMaxP",1===l?a:0),rt("yMaxM",1!==l?a:0),rt("visitTime",tt.getTime()),rt("multiLinkTag",(n=et.location.href,i=new RegExp(_),(null==(r=n.match(i))?void 0:r[2])||"")),rt("sandboxFlag",((null==(o=document.currentScript)?void 0:o.getAttribute("src"))||"").includes("sandbox")),ot()}(),Ei.preInspection(),Ei.ready&&!Ei.interrupted){var Zr=dt();Zn(),Xr.start(document.currentScript),zr.start(),Ti.init({antiFlickerObj:Zr,scriptElement:document.currentScript}),Br=Gt(Ze.sid),Ur=tt.getTime(),Ct.profileId=Ze.sid,Ct.deviceId=Bt(),Ct.sessionId=Mt(),Ct.accountId=Ft()||"",Ct.pageId=it.sandboxFlag&&Br.pageId||Vt(it.page),Ct.pageViewId=it.sandboxFlag&&Br.pageViewId||Rt(!0),Ct.pageList=Lt()||"",Ct.vn=Number(Br.vn)||0,Ct.pvn=Number(Br.pvn)||0,Ct.lastActionTime=Number(Br.lastActionTime)||Ur,Ct.nid=Number(Br.nid)||0,Ct.toFlag=0,Ct.visitRef=Wt(),Ct.preSessionId=Br.preSessionId||"",Ct.preSessionLastSendTime=Number(Br.preSessionLastSendTime)||0,Yt(),St=!0,it.sandboxFlag||(Wr.start(),qr.start(),$r.start())}}();