diff --git a/build/index.js b/build/index.js index e97af4e4..ddaf0c68 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gleap=t():e.Gleap=t()}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nyt});var a=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),a=i[0],r=i[1],o=i[2],s=[parseInt(a,16)+t,parseInt(r,16)+t,parseInt(o,16)+t];a=s[0],r=s[1],o=s[2],a=Math.max(Math.min(255,a),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(a.length<2?"0":"")+a,l=(r.length<2?"0":"")+r,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},r=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=r(e),u=r(n),d=r(o),p=r(t),h="#ffffff"===d,f=a(t,"#ffffff"===p?-35:-15),b=a(o,h?100:-120),g=a(o,h?30:-12),v=a(o,h?80:-30),m=(i=parseInt(i,10),Math.round(1.05*i)),y=Math.round(.4*i),w=Math.round(.25*i),k="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: calc(100% - 40px);\n max-width: 400px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(f," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(o,"1A 70%,\n ").concat(o," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 540px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(b,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(y,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n font-family: sans-serif;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n font-family: sans-serif;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n font-family: sans-serif;\n line-height: 20px;\n color: ").concat(b,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n font-family: sans-serif;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(w,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(w,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(m,"px;\n background-color: ").concat(g,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(v,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(g,";\n }\n .bb-tooltip {\n border-radius: ").concat(y,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(v,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(b,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(g,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(y,"px;\n border-top-right-radius: ").concat(y,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),x=document.querySelector(".gleap-styles");x&&x.remove();var C=document.createElement("style");C.innerHTML=k,C.className="gleap-styles",document.body.appendChild(C)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var a=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:a,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(r){}try{var a="";n.headers&&void 0!==n.headers.get&&(a=n.headers.get("content-type")),e.isContentTypeSupported(a)?n.text().then((function(a){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(a)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(r){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,a=i.responseType,r="<"+a+">";""!==a&&"text"!==a||(r=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:r},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),a.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,a){var r=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){a()},o.onload=function(){var e=document.createElement("canvas"),a=t,s=n;t>o.width/4&&(a=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>a&&(l*=a/c,c=a):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(r?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",a="";if(void 0!==e.getAttribute){var r=e.getAttribute("id");r&&(i=' id="'.concat(r,'"'));var o=e.getAttribute("class");o&&(a=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(a).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(a){}if(t.ready=!1,t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},ee.getInstance().sendMessage({name:"session-cleared"},!0),st.getInstance().clearAllNotifications(!1),st.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&e.gleapId&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(r){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n)}catch(r){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),a=0;a0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var a=JSON.parse(i.responseText),r=a.a,o=a.u;ee.getInstance().isOpened()||(r&&mt.getInstance().performActions(r),null!=o&&st.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var a=ie.getInstance().getSessionDuration();i.send(JSON.stringify({time:a,events:t.streamedEventArray,opened:ee.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),a=1;a0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,r(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}r(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=r.querySelectorAll("link[rel=import]");for(a=0;a0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=r.querySelectorAll("script, noscript");for(a=0;a"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?a.innerHTML=n.formatTime(e):(a.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9e.length)&&(t=e.length);for(var n=0,i=new Array(t);n'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)})))})),$(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",i="gleap-frame-container--survey-full",a="gleap-frame-container--classic",r="gleap-frame-container--classic-left",o="gleap-frame-container--modern-left",s="gleap-frame-container--no-button",c=[a,r,n,o,s,e,i],l=0;l1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Qe.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Ve(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=J(this.queue);this.queue=[];for(var t=0;t0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var a=t.data.formData,r=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(r.feedbackType,"MEDIUM",a,!1,r.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Le.notifyEvent("feedback-sent",a)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Le.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Qe.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ee.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var a=ee.getInstance().appMode;"survey"!==a&&"survey_full"!==a||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&ge(t.prototype,n),i&&ge(t,i),e}();function ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=mt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),a=1;a10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var a=n.pop();if("boolean"==typeof a)i+=4;else if("string"==typeof a)i+=2*a.length;else if("number"==typeof a)i+=8;else if("object"===De(a)&&-1===t.indexOf(a))for(var r in t.push(a),a)n.push(a[r])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var a,r=Ne(e);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Ne(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){r.e(E)}finally{r.f()}var p,h=[],f=Ne(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(a=this.startPoint.x),t.y>this.startPoint.y&&(r=this.startPoint.y),this.path.setAttributeNS(null,"x",a),this.path.setAttributeNS(null,"y",r),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,a=0,r=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&He(t.prototype,n),i&&He(t,i),e}();function We(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Qe.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Qe.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Qe.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Qe.translateText("Retry"),'
\n
').concat(Qe.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(mt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Ke.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),a=document.querySelector(".bb-capture-toolbar-item-colorpicker"),r=function(){var r=i[o],s=r.getAttribute("data-color");r.style.backgroundColor=s,r.onclick=function(){r&&(t.screenDrawer.setColor(s),a&&(a.style.display="none"),n.style.backgroundColor=r.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&mt.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),a=document.querySelector(".bb-tooltip-audio-recording"),r=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(r.classList.add(o),r.classList.remove(s)):(r.classList.add(s),r.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(r=a(o[0]))}return r&&r[t]?r[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,ee.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),me.getInstance().updateFeedbackButtonState(),ee.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Je(t.prototype,n),i&&Je(t,i),e}();function $e(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){ee.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,me.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];a=(a=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?mt.openConversation(t.data.conversation.shareToken):t.data.news?mt.openNewsArticle(t.data.news.id):mt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(a,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===me.getInstance().buttonHidden?e.feedbackButtonPosition===me.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):me.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&rt(t.prototype,n),i&&rt(t,i),e}();function ct(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";ce.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){R.getInstance().start(),me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Ue.getInstance().stop(),R.getInstance().stop(),ee.getInstance().destroy(),me.getInstance().toggleFeedbackButton(!1),st.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"getIdentity",value:function(){return I.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=I.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ee.getInstance().isOpened()}},{key:"hide",value:function(){ee.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){ee.getInstance().hideWidget()}},{key:"open",value:function(){ee.getInstance().setAppMode("widget"),ee.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);at.getInstance().formPreFill=t,ee.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Le.on(e,t)}},{key:"enableShortcuts",value:function(e){e?tt.getInstance().start():tt.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){me.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ie.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ie.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){ee.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Qe.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,t,n,a,i,r,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var a=i?b(i):{},r=I.getInstance();if(r.ready){var o=e||{};r.session.email&&(o.reportedBy=r.session.email);var s=new V("CRASH",n,o,!0,a);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.actionOutboundId,r=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),ee.getInstance().setAppMode(i?s:"widget"),ee.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:a,hideBackButton:o,format:s}},!0),r?ee.getInstance().showDrawingScreen("screenshot"):ee.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}},!0),ee.getInstance().showWidget())}},{key:"openHelpArticle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-help-article",data:{collectionId:e,articleId:t,hideBackButton:!n}},!0),ee.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];id&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"showNotification",value:function(e){st.getInstance().showNotification(e),e&&e.sound&<.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){me.getInstance().injectedFeedbackButton=!1,ee.getInstance().destroy(),D.getInstance().start().then((function(){me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var gt=0;gt{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nyt});var a=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),a=i[0],r=i[1],o=i[2],s=[parseInt(a,16)+t,parseInt(r,16)+t,parseInt(o,16)+t];a=s[0],r=s[1],o=s[2],a=Math.max(Math.min(255,a),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(a.length<2?"0":"")+a,l=(r.length<2?"0":"")+r,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},r=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=r(e),u=r(n),d=r(o),p=r(t),h="#ffffff"===d,f=a(t,"#ffffff"===p?-35:-15),b=a(o,h?100:-120),g=a(o,h?30:-12),v=a(o,h?80:-30),m=(i=parseInt(i,10),Math.round(1.05*i)),y=Math.round(.4*i),w=Math.round(.25*i),k="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: calc(100% - 40px);\n max-width: 400px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(f," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(o,"1A 70%,\n ").concat(o," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 540px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(b,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(y,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n font-family: sans-serif;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n font-family: sans-serif;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n font-family: sans-serif;\n line-height: 20px;\n color: ").concat(b,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n font-family: sans-serif;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(w,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(w,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(m,"px;\n background-color: ").concat(g,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(v,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(g,";\n }\n .bb-tooltip {\n border-radius: ").concat(y,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(v,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(b,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(g,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(y,"px;\n border-top-right-radius: ").concat(y,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),x=document.querySelector(".gleap-styles");x&&x.remove();var C=document.createElement("style");C.innerHTML=k,C.className="gleap-styles",document.body.appendChild(C)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var a=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:a,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(r){}try{var a="";n.headers&&void 0!==n.headers.get&&(a=n.headers.get("content-type")),e.isContentTypeSupported(a)?n.text().then((function(a){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(a)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(r){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,a=i.responseType,r="<"+a+">";""!==a&&"text"!==a||(r=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:r},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),a.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,a){var r=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){a()},o.onload=function(){var e=document.createElement("canvas"),a=t,s=n;t>o.width/4&&(a=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>a&&(l*=a/c,c=a):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(r?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",a="";if(void 0!==e.getAttribute){var r=e.getAttribute("id");r&&(i=' id="'.concat(r,'"'));var o=e.getAttribute("class");o&&(a=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(a).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(a){}if(t.ready=!1,t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},ee.getInstance().sendMessage({name:"session-cleared"},!0),st.getInstance().clearAllNotifications(!1),st.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&e.gleapId&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(r){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n)}catch(r){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),a=0;a0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var a=JSON.parse(i.responseText),r=a.a,o=a.u;ee.getInstance().isOpened()||(r&&mt.getInstance().performActions(r),null!=o&&st.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var a=ie.getInstance().getSessionDuration();i.send(JSON.stringify({time:a,events:t.streamedEventArray,opened:ee.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),a=1;a0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,r(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}r(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=r.querySelectorAll("link[rel=import]");for(a=0;a0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=r.querySelectorAll("script, noscript");for(a=0;a"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?a.innerHTML=n.formatTime(e):(a.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9e.length)&&(t=e.length);for(var n=0,i=new Array(t);n'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)})))})),$(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",i="gleap-frame-container--survey-full",a="gleap-frame-container--classic",r="gleap-frame-container--classic-left",o="gleap-frame-container--modern-left",s="gleap-frame-container--no-button",c=[a,r,n,o,s,e,i],l=0;l1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Qe.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Ve(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=J(this.queue);this.queue=[];for(var t=0;t0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var a=t.data.formData,r=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(r.feedbackType,"MEDIUM",a,!1,r.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Le.notifyEvent("feedback-sent",a)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Le.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Qe.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ee.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var a=ee.getInstance().appMode;"survey"!==a&&"survey_full"!==a||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&ge(t.prototype,n),i&&ge(t,i),e}();function ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=mt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),a=1;a10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var a=n.pop();if("boolean"==typeof a)i+=4;else if("string"==typeof a)i+=2*a.length;else if("number"==typeof a)i+=8;else if("object"===De(a)&&-1===t.indexOf(a))for(var r in t.push(a),a)n.push(a[r])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var a,r=Ne(e);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Ne(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){r.e(E)}finally{r.f()}var p,h=[],f=Ne(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(a=this.startPoint.x),t.y>this.startPoint.y&&(r=this.startPoint.y),this.path.setAttributeNS(null,"x",a),this.path.setAttributeNS(null,"y",r),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,a=0,r=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&He(t.prototype,n),i&&He(t,i),e}();function We(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Qe.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Qe.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Qe.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Qe.translateText("Retry"),'
\n
').concat(Qe.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(mt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Ke.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),a=document.querySelector(".bb-capture-toolbar-item-colorpicker"),r=function(){var r=i[o],s=r.getAttribute("data-color");r.style.backgroundColor=s,r.onclick=function(){r&&(t.screenDrawer.setColor(s),a&&(a.style.display="none"),n.style.backgroundColor=r.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&mt.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),a=document.querySelector(".bb-tooltip-audio-recording"),r=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(r.classList.add(o),r.classList.remove(s)):(r.classList.add(s),r.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(r=a(o[0]))}return r&&r[t]?r[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,ee.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),me.getInstance().updateFeedbackButtonState(),ee.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Je(t.prototype,n),i&&Je(t,i),e}();function $e(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){ee.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,me.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];a=(a=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?mt.openConversation(t.data.conversation.shareToken):t.data.news?mt.openNewsArticle(t.data.news.id):mt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(a,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===me.getInstance().buttonHidden?e.feedbackButtonPosition===me.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):me.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&rt(t.prototype,n),i&&rt(t,i),e}();function ct(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";ce.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){R.getInstance().start(),me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Ue.getInstance().stop(),R.getInstance().stop(),ee.getInstance().destroy(),me.getInstance().toggleFeedbackButton(!1),st.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"getIdentity",value:function(){return I.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=I.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ee.getInstance().isOpened()}},{key:"hide",value:function(){ee.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){ee.getInstance().hideWidget()}},{key:"open",value:function(){ee.getInstance().setAppMode("widget"),ee.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);at.getInstance().formPreFill=t,ee.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Le.on(e,t)}},{key:"enableShortcuts",value:function(e){e?tt.getInstance().start():tt.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){me.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ie.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ie.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){ee.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Qe.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,t,n,a,i,r,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var a=i?b(i):{},r=I.getInstance();if(r.ready){var o=e||{};r.session.email&&(o.reportedBy=r.session.email);var s=new V("CRASH",n,o,!0,a);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t,n,i){e.startFeedbackFlowWithOptions(t,{actionOutboundId:n,hideBackButton:!0,format:i},!0)}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.actionOutboundId,r=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),ee.getInstance().setAppMode(i?s:"widget"),ee.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:a,hideBackButton:o,format:s}},!0),r?ee.getInstance().showDrawingScreen("screenshot"):ee.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}},!0),ee.getInstance().showWidget())}},{key:"openHelpArticle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-help-article",data:{collectionId:e,articleId:t,hideBackButton:!n}},!0),ee.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];id&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"showNotification",value:function(e){st.getInstance().showNotification(e),e&&e.sound&<.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){me.getInstance().injectedFeedbackButton=!1,ee.getInstance().destroy(),D.getInstance().start().then((function(){me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var gt=0;gt void): void; function getIdentity(): any; function isUserIdentified(): boolean; diff --git a/package.json b/package.json index ef1dd9f1..5182058d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gleap", - "version": "8.3.0", + "version": "8.3.1", "main": "build/index.js", "scripts": { "start": "webpack serve", diff --git a/published/8.3.1/index.js b/published/8.3.1/index.js new file mode 100644 index 00000000..ddaf0c68 --- /dev/null +++ b/published/8.3.1/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gleap=t():e.Gleap=t()}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nyt});var a=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),a=i[0],r=i[1],o=i[2],s=[parseInt(a,16)+t,parseInt(r,16)+t,parseInt(o,16)+t];a=s[0],r=s[1],o=s[2],a=Math.max(Math.min(255,a),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(a.length<2?"0":"")+a,l=(r.length<2?"0":"")+r,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},r=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=r(e),u=r(n),d=r(o),p=r(t),h="#ffffff"===d,f=a(t,"#ffffff"===p?-35:-15),b=a(o,h?100:-120),g=a(o,h?30:-12),v=a(o,h?80:-30),m=(i=parseInt(i,10),Math.round(1.05*i)),y=Math.round(.4*i),w=Math.round(.25*i),k="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: calc(100% - 40px);\n max-width: 400px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(f," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(o,"1A 70%,\n ").concat(o," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 540px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(b,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(y,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n font-family: sans-serif;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n font-family: sans-serif;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n font-family: sans-serif;\n line-height: 20px;\n color: ").concat(b,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n font-family: sans-serif;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(w,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(w,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(m,"px;\n background-color: ").concat(g,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(v,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(g,";\n }\n .bb-tooltip {\n border-radius: ").concat(y,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(v,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(b,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(g,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(y,"px;\n border-top-right-radius: ").concat(y,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),x=document.querySelector(".gleap-styles");x&&x.remove();var C=document.createElement("style");C.innerHTML=k,C.className="gleap-styles",document.body.appendChild(C)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var a=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:a,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(r){}try{var a="";n.headers&&void 0!==n.headers.get&&(a=n.headers.get("content-type")),e.isContentTypeSupported(a)?n.text().then((function(a){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(a)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(r){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,a=i.responseType,r="<"+a+">";""!==a&&"text"!==a||(r=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:r},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),a.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,a){var r=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){a()},o.onload=function(){var e=document.createElement("canvas"),a=t,s=n;t>o.width/4&&(a=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>a&&(l*=a/c,c=a):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(r?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",a="";if(void 0!==e.getAttribute){var r=e.getAttribute("id");r&&(i=' id="'.concat(r,'"'));var o=e.getAttribute("class");o&&(a=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(a).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(a){}if(t.ready=!1,t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},ee.getInstance().sendMessage({name:"session-cleared"},!0),st.getInstance().clearAllNotifications(!1),st.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&e.gleapId&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(r){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n)}catch(r){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),a=0;a0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var a=JSON.parse(i.responseText),r=a.a,o=a.u;ee.getInstance().isOpened()||(r&&mt.getInstance().performActions(r),null!=o&&st.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var a=ie.getInstance().getSessionDuration();i.send(JSON.stringify({time:a,events:t.streamedEventArray,opened:ee.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),a=1;a0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,r(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}r(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=r.querySelectorAll("link[rel=import]");for(a=0;a0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=r.querySelectorAll("script, noscript");for(a=0;a"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?a.innerHTML=n.formatTime(e):(a.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9e.length)&&(t=e.length);for(var n=0,i=new Array(t);n'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)})))})),$(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",i="gleap-frame-container--survey-full",a="gleap-frame-container--classic",r="gleap-frame-container--classic-left",o="gleap-frame-container--modern-left",s="gleap-frame-container--no-button",c=[a,r,n,o,s,e,i],l=0;l1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Qe.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Ve(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=J(this.queue);this.queue=[];for(var t=0;t0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var a=t.data.formData,r=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(r.feedbackType,"MEDIUM",a,!1,r.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Le.notifyEvent("feedback-sent",a)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Le.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Qe.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ee.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var a=ee.getInstance().appMode;"survey"!==a&&"survey_full"!==a||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&ge(t.prototype,n),i&&ge(t,i),e}();function ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=mt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),a=1;a10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var a=n.pop();if("boolean"==typeof a)i+=4;else if("string"==typeof a)i+=2*a.length;else if("number"==typeof a)i+=8;else if("object"===De(a)&&-1===t.indexOf(a))for(var r in t.push(a),a)n.push(a[r])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var a,r=Ne(e);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Ne(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){r.e(E)}finally{r.f()}var p,h=[],f=Ne(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(a=this.startPoint.x),t.y>this.startPoint.y&&(r=this.startPoint.y),this.path.setAttributeNS(null,"x",a),this.path.setAttributeNS(null,"y",r),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,a=0,r=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&He(t.prototype,n),i&&He(t,i),e}();function We(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Qe.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Qe.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Qe.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Qe.translateText("Retry"),'
\n
').concat(Qe.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(mt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Ke.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),a=document.querySelector(".bb-capture-toolbar-item-colorpicker"),r=function(){var r=i[o],s=r.getAttribute("data-color");r.style.backgroundColor=s,r.onclick=function(){r&&(t.screenDrawer.setColor(s),a&&(a.style.display="none"),n.style.backgroundColor=r.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&mt.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),a=document.querySelector(".bb-tooltip-audio-recording"),r=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(r.classList.add(o),r.classList.remove(s)):(r.classList.add(s),r.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(r=a(o[0]))}return r&&r[t]?r[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,ee.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),me.getInstance().updateFeedbackButtonState(),ee.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Je(t.prototype,n),i&&Je(t,i),e}();function $e(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){ee.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,me.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];a=(a=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?mt.openConversation(t.data.conversation.shareToken):t.data.news?mt.openNewsArticle(t.data.news.id):mt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(a,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===me.getInstance().buttonHidden?e.feedbackButtonPosition===me.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):me.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&rt(t.prototype,n),i&&rt(t,i),e}();function ct(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";ce.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){R.getInstance().start(),me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Ue.getInstance().stop(),R.getInstance().stop(),ee.getInstance().destroy(),me.getInstance().toggleFeedbackButton(!1),st.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"getIdentity",value:function(){return I.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=I.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ee.getInstance().isOpened()}},{key:"hide",value:function(){ee.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){ee.getInstance().hideWidget()}},{key:"open",value:function(){ee.getInstance().setAppMode("widget"),ee.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);at.getInstance().formPreFill=t,ee.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Le.on(e,t)}},{key:"enableShortcuts",value:function(e){e?tt.getInstance().start():tt.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){me.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ie.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ie.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){ee.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Qe.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,t,n,a,i,r,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var a=i?b(i):{},r=I.getInstance();if(r.ready){var o=e||{};r.session.email&&(o.reportedBy=r.session.email);var s=new V("CRASH",n,o,!0,a);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t,n,i){e.startFeedbackFlowWithOptions(t,{actionOutboundId:n,hideBackButton:!0,format:i},!0)}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.actionOutboundId,r=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),ee.getInstance().setAppMode(i?s:"widget"),ee.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:a,hideBackButton:o,format:s}},!0),r?ee.getInstance().showDrawingScreen("screenshot"):ee.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}},!0),ee.getInstance().showWidget())}},{key:"openHelpArticle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-help-article",data:{collectionId:e,articleId:t,hideBackButton:!n}},!0),ee.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];id&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"showNotification",value:function(e){st.getInstance().showNotification(e),e&&e.sound&<.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){me.getInstance().injectedFeedbackButton=!1,ee.getInstance().destroy(),D.getInstance().start().then((function(){me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var gt=0;gt{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nyt});var a=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),a=i[0],r=i[1],o=i[2],s=[parseInt(a,16)+t,parseInt(r,16)+t,parseInt(o,16)+t];a=s[0],r=s[1],o=s[2],a=Math.max(Math.min(255,a),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(a.length<2?"0":"")+a,l=(r.length<2?"0":"")+r,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},r=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=r(e),u=r(n),d=r(o),p=r(t),h="#ffffff"===d,f=a(t,"#ffffff"===p?-35:-15),b=a(o,h?100:-120),g=a(o,h?30:-12),v=a(o,h?80:-30),m=(i=parseInt(i,10),Math.round(1.05*i)),y=Math.round(.4*i),w=Math.round(.25*i),k="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: calc(100% - 40px);\n max-width: 400px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(f," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(o,"1A 70%,\n ").concat(o," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 540px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(b,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(y,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n font-family: sans-serif;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n font-family: sans-serif;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n font-family: sans-serif;\n line-height: 20px;\n color: ").concat(b,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n font-family: sans-serif;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(w,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(w,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(m,"px;\n background-color: ").concat(g,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(v,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(g,";\n }\n .bb-tooltip {\n border-radius: ").concat(y,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(v,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(b,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(g,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(y,"px;\n border-top-right-radius: ").concat(y,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),x=document.querySelector(".gleap-styles");x&&x.remove();var C=document.createElement("style");C.innerHTML=k,C.className="gleap-styles",document.body.appendChild(C)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var a=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:a,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(r){}try{var a="";n.headers&&void 0!==n.headers.get&&(a=n.headers.get("content-type")),e.isContentTypeSupported(a)?n.text().then((function(a){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(a)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(r){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,a=i.responseType,r="<"+a+">";""!==a&&"text"!==a||(r=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:r},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),a.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,a){var r=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){a()},o.onload=function(){var e=document.createElement("canvas"),a=t,s=n;t>o.width/4&&(a=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>a&&(l*=a/c,c=a):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(r?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",a="";if(void 0!==e.getAttribute){var r=e.getAttribute("id");r&&(i=' id="'.concat(r,'"'));var o=e.getAttribute("class");o&&(a=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(a).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(a){}if(t.ready=!1,t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},ee.getInstance().sendMessage({name:"session-cleared"},!0),st.getInstance().clearAllNotifications(!1),st.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&e.gleapId&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(r){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n)}catch(r){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),a=0;a0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var a=JSON.parse(i.responseText),r=a.a,o=a.u;ee.getInstance().isOpened()||(r&&mt.getInstance().performActions(r),null!=o&&st.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var a=ie.getInstance().getSessionDuration();i.send(JSON.stringify({time:a,events:t.streamedEventArray,opened:ee.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),a=1;a0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,r(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}r(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=r.querySelectorAll("link[rel=import]");for(a=0;a0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=r.querySelectorAll("script, noscript");for(a=0;a"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?a.innerHTML=n.formatTime(e):(a.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9e.length)&&(t=e.length);for(var n=0,i=new Array(t);n'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)})))})),$(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",i="gleap-frame-container--survey-full",a="gleap-frame-container--classic",r="gleap-frame-container--classic-left",o="gleap-frame-container--modern-left",s="gleap-frame-container--no-button",c=[a,r,n,o,s,e,i],l=0;l1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Qe.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Ve(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=J(this.queue);this.queue=[];for(var t=0;t0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var a=t.data.formData,r=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(r.feedbackType,"MEDIUM",a,!1,r.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Le.notifyEvent("feedback-sent",a)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Le.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Qe.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ee.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var a=ee.getInstance().appMode;"survey"!==a&&"survey_full"!==a||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&ge(t.prototype,n),i&&ge(t,i),e}();function ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=mt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),a=1;a10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var a=n.pop();if("boolean"==typeof a)i+=4;else if("string"==typeof a)i+=2*a.length;else if("number"==typeof a)i+=8;else if("object"===De(a)&&-1===t.indexOf(a))for(var r in t.push(a),a)n.push(a[r])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var a,r=Ne(e);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Ne(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){r.e(E)}finally{r.f()}var p,h=[],f=Ne(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(a=this.startPoint.x),t.y>this.startPoint.y&&(r=this.startPoint.y),this.path.setAttributeNS(null,"x",a),this.path.setAttributeNS(null,"y",r),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,a=0,r=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&He(t.prototype,n),i&&He(t,i),e}();function We(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Qe.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Qe.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Qe.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Qe.translateText("Retry"),'
\n
').concat(Qe.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(mt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Ke.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),a=document.querySelector(".bb-capture-toolbar-item-colorpicker"),r=function(){var r=i[o],s=r.getAttribute("data-color");r.style.backgroundColor=s,r.onclick=function(){r&&(t.screenDrawer.setColor(s),a&&(a.style.display="none"),n.style.backgroundColor=r.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&mt.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),a=document.querySelector(".bb-tooltip-audio-recording"),r=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(r.classList.add(o),r.classList.remove(s)):(r.classList.add(s),r.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(r=a(o[0]))}return r&&r[t]?r[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,ee.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),me.getInstance().updateFeedbackButtonState(),ee.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Je(t.prototype,n),i&&Je(t,i),e}();function $e(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){ee.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,me.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];a=(a=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?mt.openConversation(t.data.conversation.shareToken):t.data.news?mt.openNewsArticle(t.data.news.id):mt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(a,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===me.getInstance().buttonHidden?e.feedbackButtonPosition===me.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):me.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&rt(t.prototype,n),i&&rt(t,i),e}();function ct(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";ce.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){R.getInstance().start(),me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Ue.getInstance().stop(),R.getInstance().stop(),ee.getInstance().destroy(),me.getInstance().toggleFeedbackButton(!1),st.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"getIdentity",value:function(){return I.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=I.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ee.getInstance().isOpened()}},{key:"hide",value:function(){ee.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){ee.getInstance().hideWidget()}},{key:"open",value:function(){ee.getInstance().setAppMode("widget"),ee.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);at.getInstance().formPreFill=t,ee.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Le.on(e,t)}},{key:"enableShortcuts",value:function(e){e?tt.getInstance().start():tt.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){me.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ie.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ie.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){ee.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Qe.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,t,n,a,i,r,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var a=i?b(i):{},r=I.getInstance();if(r.ready){var o=e||{};r.session.email&&(o.reportedBy=r.session.email);var s=new V("CRASH",n,o,!0,a);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.actionOutboundId,r=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),ee.getInstance().setAppMode(i?s:"widget"),ee.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:a,hideBackButton:o,format:s}},!0),r?ee.getInstance().showDrawingScreen("screenshot"):ee.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}},!0),ee.getInstance().showWidget())}},{key:"openHelpArticle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-help-article",data:{collectionId:e,articleId:t,hideBackButton:!n}},!0),ee.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];id&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"showNotification",value:function(e){st.getInstance().showNotification(e),e&&e.sound&<.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){me.getInstance().injectedFeedbackButton=!1,ee.getInstance().destroy(),D.getInstance().start().then((function(){me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var gt=0;gt{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,a,r=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);nyt});var a=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=n(e.match(/.{2}/g),3),a=i[0],r=i[1],o=i[2],s=[parseInt(a,16)+t,parseInt(r,16)+t,parseInt(o,16)+t];a=s[0],r=s[1],o=s[2],a=Math.max(Math.min(255,a),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16);var c=(a.length<2?"0":"")+a,l=(r.length<2?"0":"")+r,u=(o.length<2?"0":"")+o;return"#".concat(c).concat(l).concat(u)},r=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},o=function(e,t,n,i,o,s,c){var l=r(e),u=r(n),d=r(o),p=r(t),h="#ffffff"===d,f=a(t,"#ffffff"===p?-35:-15),b=a(o,h?100:-120),g=a(o,h?30:-12),v=a(o,h?80:-30),m=(i=parseInt(i,10),Math.round(1.05*i)),y=Math.round(.4*i),w=Math.round(.25*i),k="\n .gleap-frame-container {\n right: ".concat(s,"px;\n bottom: ").concat(75+c,"px;\n width: calc(100% - 40px);\n max-width: 400px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(f," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(o,"1A 70%,\n ").concat(o," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(c,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 540px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(i,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(c,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(s,"px;\n bottom: ").concat(75+c,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(68+c,"px;\n right: ").concat(4+s,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n max-width: min(300px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+s,"px;\n right: initial !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(c,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(b,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(o,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n }\n\n .gleap-notification-item img {\n width: 30px;\n height: 30px;\n min-width: 30px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(y,"px;\n padding: 12px 16px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n font-family: sans-serif;\n line-height: 21px;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-sender {\n font-size: 13px;\n font-family: sans-serif;\n color: ").concat(d,";\n }\n\n .gleap-notification-item-content {\n font-size: 14px;\n font-family: sans-serif;\n line-height: 20px;\n color: ").concat(b,";\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+c,"px);\n max-height: ").concat(660,'px;\n }\n\n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(i,"px);\n top: ").concat(i,"px;\n background-color: ").concat(o,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(c,"px;\n right: ").concat(s,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: auto;\n left: ").concat(s,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(c,"px;\n right: ").concat(s,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 22px;\n padding: 0px 4px;\n height: 22px;\n border-radius: 22px;\n background-color: red;\n color: #fff;\n font-size: 12px;\n font-family: sans-serif;\n text-align: center;\n line-height: 22px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 60px;\n height: 60px;\n border-radius: 60px;\n background-color: #485bff;\n transition: box-shadow 0.3s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(s,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(s,"px;\n right: auto;\n }\n \n .bb-feedback-button--open.bb-feedback-button--survey,\n .bb-feedback-button--open .bb-feedback-button-classic {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 38px;\n height: 38px;\n top: 11px;\n left: 11px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 18px;\n height: 18px;\n top: 23px;\n left: 21px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: absolute;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(w,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(w,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(l,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(d,";\n border-radius: ").concat(m,"px;\n background-color: ").concat(g,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(v,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(g,";\n }\n .bb-tooltip {\n border-radius: ").concat(y,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(v,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(m,"px;\n }\n .bb-capture-button-next {\n color: ").concat(l,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(b,";\n }\n .bb-svg-path {\n fill: ").concat(d,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(y,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(g,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(y,"px;\n border-top-right-radius: ").concat(y,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(u,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(u,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(u,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: initial !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n \n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n "),x=document.querySelector(".gleap-styles");x&&x.remove();var C=document.createElement("style");C.innerHTML=k,C.className="gleap-styles",document.body.appendChild(C)},s=function(e,t){return"button"===e?'':"dismiss"===e?'':"blur"===e?'\n \n':"pen"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n':"rect"===e?'\n \n \n \n \n \n \n \n \n \n \n':"pointer"===e?'\n \n ':"clip"===e?'\n \n \n \n \n \n':"mic"===e?'\n \n \n \n \n ':"camera"===e?'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n':"recorderon"===e?'\n \n \n \n \n \n \n \n \n \n \n \n':"recorderoff"===e?'\n \n \n \n \n \n \n \n \n ':"arrowdown"===e?'\n \n '):"arrowleft"===e?'\n \n '):"close"===e?'\n \n '):"undo"===e?'\n \n \n \n \n \n \n \n \n \n ':""};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var c=this.blacklist.concat(this.defaultBlacklist);return c&&c.length>0&&(e=e.filter((function(e){for(var t=0;t70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=e||[]}},{key:"setBlacklist",value:function(e){this.blacklist=e||[]}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n.15?"":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":c(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,i){if(!e.stopped&&i&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[i]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var a=n[1]&&n[1].method?n[1].method:"GET";e.requests[i]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:a,url:n[0],date:new Date}}else e.requests[i]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,i){if(!e.stopped&&i&&e.requests&&e.requests[i]){try{e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:"",responseText:""},e.calcRequestTime(i)}catch(r){}try{var a="";n.headers&&void 0!==n.headers.get&&(a=n.headers.get("content-type")),e.isContentTypeSupported(a)?n.text().then((function(a){e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(a)}),e.calcRequestTime(i),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[i]&&(e.requests[i].success=!0,e.requests[i].response={status:n.status,statusText:n.statusText,responseText:""}),e.calcRequestTime(i),e.cleanRequests())}catch(r){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var i=t.currentTarget,a=i.responseType,r="<"+a+">";""!==a&&"text"!==a||(r=e.cleanupContentSize(i.responseText)),e.requests[i.bbRequestId].success=!0,e.requests[i.bbRequestId].response={status:i.status,statusText:i.statusText,responseText:r},e.calcRequestTime(i.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,i=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.wrappedSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.wrappedSetRequestHeader(e,t))},XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),i.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),a.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var i=++n.requestId;return e.onFetch(arguments,i),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,i)}return t})).catch((function(t){throw e.onFetchFailed(t,i),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var i=new FileReader;i.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},i.onerror=function(e){n(e)},i.readAsText(e)}))}}])&&l(t.prototype,n),i&&l(t,i),e}();u(d,"instance",void 0);const p=d;var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(i,a){var r=0===e.indexOf("data:image/jpeg"),o=new Image;o.src=e,o.onerror=function(){a()},o.onload=function(){var e=document.createElement("canvas"),a=t,s=n;t>o.width/4&&(a=o.width/4),n>o.height/4&&(s=o.height/4);var c=o.width,l=o.height;c>l?c>a&&(l*=a/c,c=a):l>s&&(c*=s/l,l=s),e.width=c,e.height=l,e.getContext("2d").drawImage(o,0,0,c,l),i(r?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},f=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},b=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},g=function(e,t){return e.length>t?e.slice(0,t)+"...":e},v=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},m=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(i){}else localStorage.removeItem(n)},y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=g(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),i="",a="";if(void 0!==e.getAttribute){var r=e.getAttribute("id");r&&(i=' id="'.concat(r,'"'));var o=e.getAttribute("class");o&&(a=' class="'.concat(o,'"'))}var s=(e.tagName||"").toLowerCase(),c="<",l=">";return t||(c="[",l="]"),"".concat(c).concat(s).concat(i).concat(a).concat(l).concat(n).concat(c,"/").concat(s).concat(l)},w=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{m("session-".concat(t.sdkKey),null)}catch(a){}if(t.ready=!1,t.session={id:null,hash:null,type:null,name:"",email:"",phone:"",value:0},ee.getInstance().sendMessage({name:"session-cleared"},!0),st.getInstance().clearAllNotifications(!1),st.getInstance().setNotificationCount(0),n&&!isNaN(e)){var i=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*i)}})),L(this,"validateSession",(function(e){e&&e.gleapId&&(m("session-".concat(t.sdkKey),e),t.session=e,t.ready=!0,t.notifySessionReady())})),L(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=v("session-".concat(t.sdkKey));n&&t.validateSession(n);var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(r){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n)}catch(r){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({}))})),L(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}if(n)for(var i=Object.keys(n),a=0;a0)for(var e=0;e2)){var e=t;t.streamingEvents=!0;var n=I.getInstance().getGleapId(),i=new XMLHttpRequest;i.open("POST",I.getInstance().apiUrl+"/sessions/ping"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),I.getInstance().injectSession(i),i.onerror=function(){e.errorCount++,e.streamingEvents=!1},i.onreadystatechange=function(t){if(4===i.readyState){if(200===i.status||201===i.status){if(e.errorCount=0,I.getInstance().getGleapId()===n)try{var a=JSON.parse(i.responseText),r=a.a,o=a.u;ee.getInstance().isOpened()||(r&&mt.getInstance().performActions(r),null!=o&&st.getInstance().setNotificationCount(o))}catch(s){}}else e.errorCount++;e.streamingEvents=!1}};var a=ie.getInstance().getSessionDuration();i.send(JSON.stringify({time:a,events:t.streamedEventArray,opened:ee.getInstance().isOpened()})),t.streamedEventArray=[]}}))}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.stopped=!0}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"start",value:function(){this.startPageListener(),this.runEventStreamLoop(),this.resetErrorCountLoop()}},{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}},{key:"startPageListener",value:function(){this.logEvent("sessionStarted"),this.logCurrentPage();var e=this;setInterval((function(){e.stopped||e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=b(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&S(t.prototype,n),i&&S(t,i),e}();function E(e,t){for(var n=0;n1?t-1:0),a=1;a0||n.scrollLeft>0)&&(o.setAttribute("bb-scrollpos",!0),o.setAttribute("bb-scrolltop",n.scrollTop),o.setAttribute("bb-scrollleft",n.scrollLeft)),"SELECT"===s||"TEXTAREA"===s||"INPUT"===s){var l=n.value;"value"===n.getAttribute("gleap-ignore")&&(l=new Array(l.length+1).join("*")),o.setAttribute("bb-data-value",l),"checkbox"!==n.type&&"radio"!==n.type||!n.checked||o.setAttribute("bb-data-checked",!0)}}if(i.appendChild(o),n.shadowRoot){var u=t;t++,r(n.shadowRoot.firstChild,o,u),_(n.shadowRoot,o,u),void 0!==o.setAttribute&&o.setAttribute("bb-shadow-parent",u)}r(n.firstChild,o)}(e,n);var i=n.querySelector("head");return i||(i=n),_(window.document,i),n}(window.document.documentElement),o=r.querySelectorAll("link[rel=import]");for(a=0;a0){for(var c=s.childNodes;c.length>0;)s.parentNode.insertBefore(c[0],s);s.remove()}}var l=r.querySelectorAll("script, noscript");for(a=0;a"),e&&e.childNodes&&e.childNodes.length>0)for(var i=0;i0?a.innerHTML=n.formatTime(e):(a.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&i.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(i)},this.mediaRecorder.onstop=function(){n.prepareRecording(i)},this.mediaRecorder.start(200),n.rerender()})),G(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()});this.file=new File([t],"screen-recording.".concat("video/mp4"===this.getSupportedMimeType()?"mp4":"webm"),{type:this.getSupportedMimeType()});var n=document.querySelector(".bb-capture-preview video");n&&(n.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){i.rerender()}),100)}var t,n,i;return t=e,(n=[{key:"getSupportedMimeType",value:function(){return MediaRecorder.isTypeSupported("video/mp4")?"video/mp4":MediaRecorder.isTypeSupported("video/webm;codecs=h264")?"video/webm;codecs=h264":"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9e.length)&&(t=e.length);for(var n=0,i=new Array(t);n'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)})))})),$(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",i="gleap-frame-container--survey-full",a="gleap-frame-container--classic",r="gleap-frame-container--classic-left",o="gleap-frame-container--modern-left",s="gleap-frame-container--no-button",c=[a,r,n,o,s,e,i],l=0;l1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:I.getInstance().getSession(),apiUrl:I.getInstance().apiUrl,sdkKey:I.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:D.getInstance().getFlowConfig(),actions:D.getInstance().getProjectActions(),overrideLanguage:Qe.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new Ve(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=J(this.queue);this.queue=[];for(var t=0;t0&&window.open(i,"_blank").focus()}if("run-custom-action"===t.name&&Te.triggerCustomAction(t.data),"close-widget"===t.name&&e.hideWidget(),"send-feedback"===t.name){var a=t.data.formData,r=t.data.action,o=t.data.outboundId,s=t.data.spamToken;new V(r.feedbackType,"MEDIUM",a,!1,r.excludeData,o,s).sendFeedback().then((function(t){e.sendMessage({name:"feedback-sent",data:t}),Le.notifyEvent("feedback-sent",a)})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Le.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl)try{for(var n=JSON.parse(t.data),i=0;i1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:g(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var i=0;i0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=D.getInstance().getFlowConfig(),n="";n=t.buttonLogo?''):s("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-hidden",this.feedbackButton.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?this.feedbackButton.innerHTML='
').concat(Qe.translateText(t.widgetButtonText),"
"):this.feedbackButton.innerHTML='
'.concat(n).concat(s("arrowdown","#fff"),'
');var i=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(i=!0):e.getInstance().buttonHidden&&(i=!0),i&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),ee.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var a=ee.getInstance().appMode;"survey"!==a&&"survey_full"!==a||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||I.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&ge(t.prototype,n),i&&ge(t,i),e}();function ye(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=mt.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var i=this.getInstance().eventListeners[e];if(i)for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),a=1;a10)}},{key:"fetchImageResources",value:function(){for(var e=[],t=Object.keys(this.resourcesToResolve),n=0;n0&&(i.c=m),(e.scrollLeft||e.scrollTop)&&this.pushScrollAction(n,e,t);break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var x=e.parentNode;if(e.parentNode&&x.tagName&&"STYLE"===x.tagName&&x.ownerDocument){var C=x.ownerDocument.styleSheets;if(C)for(var L=0;L0&&!i.d&&(i.d=E);break;case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:break;default:throw delete e.ReplayRecID,new Error("Bad node ".concat(e))}return i}},{key:"delay",value:function(e){this.lastActionTime-=1e3*e}},{key:"deleteAllReplayRecIDs",value:function(e){delete e.ReplayRecID;var t=e.ownerDocument.ReplayRecInner.scrollListener;e.removeEventListener("scroll",t,{passive:!0});for(var n=e.firstChild;n;n=n.nextSibling)n.ReplayRecID&&this.deleteAllReplayRecIDs(n)}},{key:"optionallyAddAttribute",value:function(e,t){if("src"===e&&t){var n=t;0!==n.indexOf("data")&&(this.resourcesToResolve[n]="--")}}},{key:"appendAction",value:function(e){this.actions.push(e);var t=this;setTimeout((function(){t.actionsSize+=function(e){for(var t=[],n=[e],i=0;n.length;){var a=n.pop();if("boolean"==typeof a)i+=4;else if("string"==typeof a)i+=2*a.length;else if("number"==typeof a)i+=8;else if("object"===De(a)&&-1===t.indexOf(a))for(var r in t.push(a),a)n.push(a[r])}return i/1024/1024}(e)}),0)}},{key:"callback",value:function(e,t){var n=Date.now();if(n>this.lastActionTime){var i={};i.o=n-this.lastActionTime,this.appendAction(i)}this.lastActionTime=Date.now();try{var a,r=Ne(e);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(o.target.ReplayRecID&&"childList"===o.type){var s,c=Ne(o.removedNodes);try{for(c.s();!(s=c.n()).done;){var l=s.value,u=l.ReplayRecID;if(u){var d={};d.v=u,this.appendAction(d),this.deleteAllReplayRecIDs(l)}}}catch(E){c.e(E)}finally{c.f()}}}}catch(E){r.e(E)}finally{r.f()}var p,h=[],f=Ne(e);try{for(f.s();!(p=f.n()).done;){var b=p.value,g=b.target,v=g.ReplayRecID;if(v)switch(b.type){case"attributes":var m=b.attributeName;if(this.allowAttribute(g,m)){var y={};y.r=[v,m,g.getAttribute(m)],"SOURCE"!==g.tagName&&this.optionallyAddAttribute(m,g.getAttribute(m)),this.appendAction(y)}break;case"characterData":var w={};g.nodeType===Node.TEXT_NODE&&(w.t=[v,g.data]),this.appendAction(w);break;case"childList":b.addedNodes.length>0&&!g.ReplayRecNodesAdded&&(g.ReplayRecNodesAdded=!0,h.push(g))}}}catch(E){f.e(E)}finally{f.f()}for(var k=0,x=h;kthis.startPoint.x&&(a=this.startPoint.x),t.y>this.startPoint.y&&(r=this.startPoint.y),this.path.setAttributeNS(null,"x",a),this.path.setAttributeNS(null,"y",r),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",i)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var i=this.getMousePosition(e);this.appendToBuffer(i),this.strPath="M"+i.x+" "+i.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:e.pageX,y:e.pageY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,i,a=0,r=0,o=0;for(i=e;ithis.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}])&&He(t.prototype,n),i&&He(t,i),e}();function We(e,t){for(var n=0;n\n \n
'.concat(s("dismiss"),"
\n
").concat(s("rect"),'
\n
\n ').concat("capture"===this.type?'
\n '.concat(s("recorderon"),"\n ").concat(s("recorderoff"),'\n \n
\n
\n ').concat(s("mic"),'\n \n
\n
2:00
\n
\n
\n ').concat(s("pointer"),"\n
"):"",'\n
\n ').concat(s("rect"),'\n
\n
\n ').concat(s("pen"),'\n
\n
\n ').concat(s("blur"),'\n
\n
\n
\n ').concat(Qe.translateText("Pick a color"),'\n
\n
\n ').concat(s("undo"),'\n ').concat(Qe.translateText("Undo"),"\n
\n ").concat("capture"!==this.type?'
'.concat(Qe.translateText("Next"),"
"):"",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
').concat(Qe.translateText("Retry"),'
\n
').concat(Qe.translateText("Next"),"
\n
\n
\n
\n "),document.body.appendChild(e),e.setAttribute("dir",Qe.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,i=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,i="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&i&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(mt.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Ke.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new ze(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),i=document.querySelectorAll(".bb-capture-toolbar-item-color"),a=document.querySelector(".bb-capture-toolbar-item-colorpicker"),r=function(){var r=i[o],s=r.getAttribute("data-color");r.style.backgroundColor=s,r.onclick=function(){r&&(t.screenDrawer.setColor(s),a&&(a.style.display="none"),n.style.backgroundColor=r.style.backgroundColor,e.setPenColor(s))}},o=0;o0?i.classList.remove(e):i.classList.add(e)}}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&mt.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),i=document.querySelector(".bb-tooltip-screen-recording"),a=document.querySelector(".bb-tooltip-audio-recording"),r=document.querySelector(".bb-capture-editor"),o="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(r.classList.add(o),r.classList.remove(s)):(r.classList.add(s),r.classList.remove(o));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var l=0;l1&&(r=a(o[0]))}return r&&r[t]?r[t]:t}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e,ee.getInstance().sendConfigUpdate(),this.updateRTLSupport()}},{key:"updateRTLSupport",value:function(){this.isRTLLayout="true"===e.translateText("rtlLang"),me.getInstance().updateFeedbackButtonState(),ee.getInstance().updateFrameStyle()}},{key:"setCustomTranslation",value:function(e){this.customTranslation=e}}])&&Je(t.prototype,n),i&&Je(t,i),e}();function $e(e,t){for(var n=0;n0&&(this.notifications=t,this.renderNotifications())}}},{key:"setNotificationCount",value:function(e){ee.getInstance().isOpened()?this.unreadCount=0:(this.unreadCount=e,me.getInstance().updateNotificationBadge(this.unreadCount))}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||this.notifications.push(e),this.notifications.length>2&&this.notifications.shift(),m(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=s("dismiss"),this.notificationContainer.appendChild(t);for(var n=function(){var t=e.notifications[i];a=(a=t.data.text).replaceAll("{{name}}",I.getInstance().getName());var n=document.createElement("div");n.onclick=function(){t.data.conversation?mt.openConversation(t.data.conversation.shareToken):t.data.news?mt.openNewsArticle(t.data.news.id):mt.open()},n.className="gleap-notification-item",n.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&''),'\n
\n ').concat(t.data.sender?'
'.concat(t.data.sender.name,"
"):"",'\n
').concat(a,"
\n
"),e.notificationContainer.appendChild(n)},i=0;i0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],m(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=D.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==me.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===me.getInstance().buttonHidden?e.feedbackButtonPosition===me.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):me.getInstance().buttonHidden&&this.notificationContainer.classList.add(n)}}}])&&rt(t.prototype,n),i&&rt(t,i),e}();function ct(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"INFO";ce.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;var n=I.getInstance();n.sdkKey=e,n.setOnSessionReady((function(){setTimeout((function(){D.getInstance().start().then((function(){R.getInstance().start(),me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),n.startSession()}}},{key:"destroy",value:function(){Ue.getInstance().stop(),R.getInstance().stop(),ee.getInstance().destroy(),me.getInstance().toggleFeedbackButton(!1),st.getInstance().clearAllNotifications(!0),I.getInstance().clearSession(0,!1)}},{key:"identify",value:function(e,t,n){return I.getInstance().identifySession(e,b(t),n)}},{key:"clearIdentity",value:function(){I.getInstance().clearSession()}},{key:"getIdentity",value:function(){return I.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=I.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return ee.getInstance().isOpened()}},{key:"hide",value:function(){ee.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){p.getInstance().setMaxRequests(e)}},{key:"close",value:function(){ee.getInstance().hideWidget()}},{key:"open",value:function(){ee.getInstance().setAppMode("widget"),ee.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){R.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=b(e);at.getInstance().formPreFill=t,ee.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Le.on(e,t)}},{key:"enableShortcuts",value:function(e){e?tt.getInstance().start():tt.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){me.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ie.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ie.setAppBuildNumber(e)}},{key:"setApiUrl",value:function(e){I.getInstance().apiUrl=e}},{key:"setFrameUrl",value:function(e){ee.getInstance().frameUrl=e}},{key:"attachCustomData",value:function(e){ke.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){ke.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){ke.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){ke.getInstance().clearCustomData()}},{key:"setLanguage",value:function(e){Qe.getInstance().setOverrideLanguage(e)}},{key:"registerCustomAction",value:function(e){Te.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Te.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20;w((function(){o(e,t,n,a,i,r,s)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,i)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var a=i?b(i):{},r=I.getInstance();if(r.ready){var o=e||{};r.session.email&&(o.reportedBy=r.session.email);var s=new V("CRASH",n,o,!0,a);s.sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t,n,i){e.startFeedbackFlowWithOptions(t,{actionOutboundId:n,hideBackButton:!0,format:i},!0)}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.actionOutboundId,r=n.autostartDrawing,o=n.hideBackButton,s=n.format,c=I.getInstance();if(c.ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";i&&(l="start-survey"),ee.getInstance().setAppMode(i?s:"widget"),ee.getInstance().sendMessage({name:l,data:{flow:t,actionOutboundId:a,hideBackButton:o,format:s}},!0),r?ee.getInstance().showDrawingScreen("screenshot"):ee.getInstance().showWidget()}}},{key:"openConversation",value:function(e){e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e}},!0),ee.getInstance().showWidget())}},{key:"openHelpArticle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-help-article",data:{collectionId:e,articleId:t,hideBackButton:!n}},!0),ee.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];id&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news-article",data:{id:e,hideBackButton:!t}},!0),ee.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];ee.getInstance().setAppMode("widget"),ee.getInstance().sendMessage({name:"open-feature-requests",data:{hideBackButton:!e}},!0),ee.getInstance().showWidget()}},{key:"showNotification",value:function(e){st.getInstance().showNotification(e),e&&e.sound&<.ping()}}],(n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){me.getInstance().injectedFeedbackButton=!1,ee.getInstance().destroy(),D.getInstance().start().then((function(){me.getInstance().injectFeedbackButton(),st.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n0)for(var gt=0;gt { // Run auto configuration. setTimeout(() => { - GleapConfigManager.getInstance().start() + GleapConfigManager.getInstance() + .start() .then(() => { // Inject the Gleap frame. GleapStreamedEvent.getInstance().start(); @@ -159,7 +161,7 @@ class Gleap { /** * Destroy - * @returns + * @returns */ static destroy() { GleapReplayRecorder.getInstance().stop(); @@ -266,16 +268,19 @@ class Gleap { /** * Prefills a specific form field. - * @param {*} key - * @param {*} value + * @param {*} key + * @param {*} value */ static preFillForm(data) { const cleanedData = gleapDataParser(data); GleapPreFillManager.getInstance().formPreFill = cleanedData; - GleapFrameManager.getInstance().sendMessage({ - name: "prefill-form-data", - data: cleanedData - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: "prefill-form-data", + data: cleanedData, + }, + true + ); } /** @@ -439,7 +444,7 @@ class Gleap { ) { return Gleap.sendSilentCrashReportWithFormData( { - description + description, }, priority, excludeData @@ -481,8 +486,35 @@ class Gleap { newFormData.reportedBy = sessionInstance.session.email; } - const feedback = new GleapFeedback("CRASH", priority, newFormData, true, excludeDataCleaned); - feedback.sendFeedback().then(() => { }).catch((error) => { }); + const feedback = new GleapFeedback( + "CRASH", + priority, + newFormData, + true, + excludeDataCleaned + ); + feedback + .sendFeedback() + .then(() => {}) + .catch((error) => {}); + } + + /** + * Shows a survey manually. + * @param {*} actionType + * @param {*} outboundId + * @param {*} format + */ + static showSurvey(actionType, outboundId, format) { + Gleap.startFeedbackFlowWithOptions( + actionType, + { + actionOutboundId: outboundId, + hideBackButton: true, + format, + }, + true + ); } /** @@ -493,12 +525,17 @@ class Gleap { hideBackButton: !showBackButton, }); } - + /** * Starts the bug reporting flow. */ - static startFeedbackFlowWithOptions(feedbackFlow, options = {}, isSurvey = false) { - const { actionOutboundId, autostartDrawing, hideBackButton, format } = options; + static startFeedbackFlowWithOptions( + feedbackFlow, + options = {}, + isSurvey = false + ) { + const { actionOutboundId, autostartDrawing, hideBackButton, format } = + options; const sessionInstance = GleapSession.getInstance(); if (!sessionInstance.ready) { return; @@ -517,15 +554,18 @@ class Gleap { GleapFrameManager.getInstance().setAppMode(isSurvey ? format : "widget"); - GleapFrameManager.getInstance().sendMessage({ - name: action, - data: { - flow: feedbackFlow, - actionOutboundId: actionOutboundId, - hideBackButton: hideBackButton, - format, - } - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: action, + data: { + flow: feedbackFlow, + actionOutboundId: actionOutboundId, + hideBackButton: hideBackButton, + format, + }, + }, + true + ); if (autostartDrawing) { GleapFrameManager.getInstance().showDrawingScreen("screenshot"); @@ -544,12 +584,15 @@ class Gleap { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-conversation", - data: { - shareToken, - } - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: "open-conversation", + data: { + shareToken, + }, + }, + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -564,14 +607,17 @@ class Gleap { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-help-article", - data: { - collectionId, - articleId, - hideBackButton: !showBackButton, - } - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: "open-help-article", + data: { + collectionId, + articleId, + hideBackButton: !showBackButton, + }, + }, + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -582,12 +628,15 @@ class Gleap { static openHelpCenter(showBackButton = true) { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-helpcenter", - data: { - hideBackButton: !showBackButton, + GleapFrameManager.getInstance().sendMessage( + { + name: "open-helpcenter", + data: { + hideBackButton: !showBackButton, + }, }, - }, true); + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -602,13 +651,16 @@ class Gleap { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-helpcenter-search", - data: { - term, - hideBackButton: !showBackButton, - } - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: "open-helpcenter-search", + data: { + term, + hideBackButton: !showBackButton, + }, + }, + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -623,13 +675,16 @@ class Gleap { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-news-article", - data: { - id, - hideBackButton: !showBackButton, - } - }, true); + GleapFrameManager.getInstance().sendMessage( + { + name: "open-news-article", + data: { + id, + hideBackButton: !showBackButton, + }, + }, + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -640,12 +695,15 @@ class Gleap { static openNews(showBackButton = true) { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-news", - data: { - hideBackButton: !showBackButton, + GleapFrameManager.getInstance().sendMessage( + { + name: "open-news", + data: { + hideBackButton: !showBackButton, + }, }, - }, true); + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -656,12 +714,15 @@ class Gleap { static openFeatureRequests(showBackButton = true) { GleapFrameManager.getInstance().setAppMode("widget"); - GleapFrameManager.getInstance().sendMessage({ - name: "open-feature-requests", - data: { - hideBackButton: !showBackButton, + GleapFrameManager.getInstance().sendMessage( + { + name: "open-feature-requests", + data: { + hideBackButton: !showBackButton, + }, }, - }, true); + true + ); GleapFrameManager.getInstance().showWidget(); } @@ -672,7 +733,8 @@ class Gleap { } var hostname = window.location.hostname; - const isLocalHost = ["localhost", "127.0.0.1", "0.0.0.0", "", "::1"].includes(hostname) || + const isLocalHost = + ["localhost", "127.0.0.1", "0.0.0.0", "", "::1"].includes(hostname) || hostname.startsWith("192.168.") || hostname.startsWith("10.0.") || hostname.endsWith(".local") || @@ -684,7 +746,8 @@ class Gleap { GleapFeedbackButtonManager.getInstance().injectedFeedbackButton = false; GleapFrameManager.getInstance().destroy(); - GleapConfigManager.getInstance().start() + GleapConfigManager.getInstance() + .start() .then(() => { // Inject the widget buttons GleapFeedbackButtonManager.getInstance().injectFeedbackButton(); @@ -699,7 +762,7 @@ class Gleap { /** * Performs an action. - * @param {*} action + * @param {*} action */ performActions(actions) { for (let i = 0; i < actions.length; i++) { @@ -708,11 +771,7 @@ class Gleap { if (action.actionType === "notification") { Gleap.showNotification(action); } else { - Gleap.startFeedbackFlowWithOptions(action.actionType, { - actionOutboundId: action.outbound, - hideBackButton: true, - format: action.format - }, true); + Gleap.showSurvey(action.actionType, action.outbound, action.format); } } } @@ -728,8 +787,8 @@ class Gleap { /** * Sets a global data value - * @param {*} key - * @param {*} value + * @param {*} key + * @param {*} value */ setGlobalDataItem(key, value) { this.globalData[key] = value; @@ -737,8 +796,8 @@ class Gleap { /** * Gets a global data value - * @param {*} key - * @returns + * @param {*} key + * @returns */ getGlobalDataItem(key) { return this.globalData[key]; @@ -748,11 +807,14 @@ class Gleap { * Takes the current replay and assigns it to the global data array. */ takeCurrentReplay() { - GleapReplayRecorder.getInstance().getReplayData().then((replayData) => { - if (replayData) { - this.setGlobalDataItem("webReplay", replayData); - } - }).catch((exp) => { }); + GleapReplayRecorder.getInstance() + .getReplayData() + .then((replayData) => { + if (replayData) { + this.setGlobalDataItem("webReplay", replayData); + } + }) + .catch((exp) => {}); } } @@ -769,5 +831,28 @@ if (typeof window !== "undefined") { } } -export { GleapNetworkIntercepter, GleapAudioManager, GleapNotificationManager, GleapPreFillManager, GleapShortcutListener, GleapMarkerManager, GleapTranslationManager, GleapReplayRecorder, GleapFeedback, GleapConsoleLogManager, GleapRageClickDetector, GleapCustomActionManager, GleapEventManager, GleapCustomDataManager, GleapFeedbackButtonManager, GleapCrashDetector, GleapClickListener, GleapSession, GleapStreamedEvent, GleapConfigManager, GleapFrameManager, GleapMetaDataManager }; -export default Gleap; \ No newline at end of file +export { + GleapNetworkIntercepter, + GleapAudioManager, + GleapNotificationManager, + GleapPreFillManager, + GleapShortcutListener, + GleapMarkerManager, + GleapTranslationManager, + GleapReplayRecorder, + GleapFeedback, + GleapConsoleLogManager, + GleapRageClickDetector, + GleapCustomActionManager, + GleapEventManager, + GleapCustomDataManager, + GleapFeedbackButtonManager, + GleapCrashDetector, + GleapClickListener, + GleapSession, + GleapStreamedEvent, + GleapConfigManager, + GleapFrameManager, + GleapMetaDataManager, +}; +export default Gleap;