@usesuperflow/toolbar-staging 1.0.526 → 1.0.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/superflow.js +8 -12
- package/superflow.min.js +8 -12
package/package.json
CHANGED
package/superflow.js
CHANGED
|
@@ -2584,8 +2584,8 @@ class ca extends Jn{}ca.Encryptor=class extends ca{processBlock(t,e){const i=t,o
|
|
|
2584
2584
|
color: var(--legacy-velt-tool-focus-icon-color);
|
|
2585
2585
|
}
|
|
2586
2586
|
velt-sidebar-button .velt-tool--action-btn:focus .velt-tool--action-btn-icon {
|
|
2587
|
-
width:
|
|
2588
|
-
height:
|
|
2587
|
+
width: 1.8rem !important;
|
|
2588
|
+
height: 1.8rem !important;
|
|
2589
2589
|
}
|
|
2590
2590
|
velt-sidebar-button .velt-tool--action-btn:hover {
|
|
2591
2591
|
border-radius: var(--legacy-velt-tool-hover-border-radius);
|
|
@@ -2605,10 +2605,6 @@ class ca extends Jn{}ca.Encryptor=class extends ca{processBlock(t,e){const i=t,o
|
|
|
2605
2605
|
background-color: var(--legacy-velt-tool-active-bg-color);
|
|
2606
2606
|
color: var(--legacy-velt-tool-active-icon-color);
|
|
2607
2607
|
}
|
|
2608
|
-
velt-sidebar-button .velt-tool--action-btn:active .velt-tool--action-btn-icon, velt-sidebar-button .velt-tool--action-btn.active .velt-tool--action-btn-icon {
|
|
2609
|
-
width: rem_var(var(--legacy-velt-tool-active-icon-size));
|
|
2610
|
-
height: rem_var(var(--legacy-velt-tool-active-icon-size));
|
|
2611
|
-
}
|
|
2612
2608
|
|
|
2613
2609
|
.private-comment-mode {
|
|
2614
2610
|
--legacy-velt-tool-icon-color: #8F95B2;
|
|
@@ -2664,7 +2660,7 @@ class ca extends Jn{}ca.Encryptor=class extends ca{processBlock(t,e){const i=t,o
|
|
|
2664
2660
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.52861 3.52858C3.78896 3.26823 4.21107 3.26823 4.47141 3.52858L8.00001 7.05717L11.5286 3.52858C11.789 3.26823 12.2111 3.26823 12.4714 3.52858C12.7318 3.78892 12.7318 4.21103 12.4714 4.47138L8.94282 7.99998L12.4714 11.5286C12.7318 11.7889 12.7318 12.211 12.4714 12.4714C12.2111 12.7317 11.789 12.7317 11.5286 12.4714L8.00001 8.94279L4.47141 12.4714C4.21107 12.7317 3.78896 12.7317 3.52861 12.4714C3.26826 12.211 3.26826 11.7889 3.52861 11.5286L7.0572 7.99998L3.52861 4.47138C3.26826 4.21103 3.26826 3.78892 3.52861 3.52858Z" fill="#FAFBFF"/>
|
|
2665
2661
|
</svg>
|
|
2666
2662
|
</div>
|
|
2667
|
-
`:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Pa("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ha.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Ga.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Pa("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e
|
|
2663
|
+
`:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Pa("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ha.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Ga.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Pa("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;try{const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");if(!e)return;requestAnimationFrame((()=>{var t;try{const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}catch(t){console.warn("Error in checkToolbarPosition Request Animation Frame",t)}}))}catch(t){console.warn("Error in checkToolbarPosition",t)}},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.toolbarMouseMove=t=>{var e;try{if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<32)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}}catch(t){console.warn("Error in toolbarMouseMove",t)}},this.toolbarMouseDown=t=>{var e;try{const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}}catch(t){console.warn("Error in toolbarMouseDown",t)}},this.toolbarMouseUp=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseUp",t)}},this.toolbarMouseLeave=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseLeave",t)}},this.guestUserNameUpdated=!!Sa(Rt);const t=new URL(document.location);t.searchParams.has(bt)&&t.searchParams.delete(bt),this.signInUrl=`${qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,ka(Ct),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Pa("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),$a({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Ea(Et,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Pa("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ya(Ca(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Ra(ht.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Ht)||t.includes(Bt)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=yo(La,ce,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Ra(ht.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Pa("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?L`
|
|
2668
2664
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2669
2665
|
<div class="toolbar" id="smallToolbar"
|
|
2670
2666
|
style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
|
|
@@ -2886,11 +2882,11 @@ class ca extends Jn{}ca.Encryptor=class extends ca{processBlock(t,e){const i=t,o
|
|
|
2886
2882
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2887
2883
|
${this.disableCommentModeButton()}
|
|
2888
2884
|
<div class="toolbar ${lt({expanded:this.expanded,"add-comment-mode":this.addCommentMode,"private-comment-mode":!!this.privateCommentModeEnabled})}" @resize=${this.checkToolbarPosition()}
|
|
2889
|
-
@mousemove=${t=>this.
|
|
2890
|
-
@mousedown=${t=>this.
|
|
2891
|
-
@mouseup=${t=>this.
|
|
2892
|
-
@mouseleave=${t=>this.
|
|
2893
|
-
style="cursor: grab;
|
|
2885
|
+
@mousemove=${t=>this.toolbarMouseMove(t)}
|
|
2886
|
+
@mousedown=${t=>this.toolbarMouseDown(t)}
|
|
2887
|
+
@mouseup=${t=>this.toolbarMouseUp(t)}
|
|
2888
|
+
@mouseleave=${t=>this.toolbarMouseLeave(t)}
|
|
2889
|
+
style="cursor: grab;">
|
|
2894
2890
|
|
|
2895
2891
|
<!-- icon + logo -->
|
|
2896
2892
|
<div class="toolbar-section toolbar-toggle-icon d-sm-none" @click=${()=>this.toggleSnippylyPluginToolbar()}>
|
package/superflow.min.js
CHANGED
|
@@ -2584,8 +2584,8 @@ class da extends Yn{}da.Encryptor=class extends da{processBlock(t,e){const i=t,o
|
|
|
2584
2584
|
color: var(--legacy-velt-tool-focus-icon-color);
|
|
2585
2585
|
}
|
|
2586
2586
|
velt-sidebar-button .velt-tool--action-btn:focus .velt-tool--action-btn-icon {
|
|
2587
|
-
width:
|
|
2588
|
-
height:
|
|
2587
|
+
width: 1.8rem !important;
|
|
2588
|
+
height: 1.8rem !important;
|
|
2589
2589
|
}
|
|
2590
2590
|
velt-sidebar-button .velt-tool--action-btn:hover {
|
|
2591
2591
|
border-radius: var(--legacy-velt-tool-hover-border-radius);
|
|
@@ -2605,10 +2605,6 @@ class da extends Yn{}da.Encryptor=class extends da{processBlock(t,e){const i=t,o
|
|
|
2605
2605
|
background-color: var(--legacy-velt-tool-active-bg-color);
|
|
2606
2606
|
color: var(--legacy-velt-tool-active-icon-color);
|
|
2607
2607
|
}
|
|
2608
|
-
velt-sidebar-button .velt-tool--action-btn:active .velt-tool--action-btn-icon, velt-sidebar-button .velt-tool--action-btn.active .velt-tool--action-btn-icon {
|
|
2609
|
-
width: rem_var(var(--legacy-velt-tool-active-icon-size));
|
|
2610
|
-
height: rem_var(var(--legacy-velt-tool-active-icon-size));
|
|
2611
|
-
}
|
|
2612
2608
|
|
|
2613
2609
|
.private-comment-mode {
|
|
2614
2610
|
--legacy-velt-tool-icon-color: #8F95B2;
|
|
@@ -2664,7 +2660,7 @@ class da extends Yn{}da.Encryptor=class extends da{processBlock(t,e){const i=t,o
|
|
|
2664
2660
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.52861 3.52858C3.78896 3.26823 4.21107 3.26823 4.47141 3.52858L8.00001 7.05717L11.5286 3.52858C11.789 3.26823 12.2111 3.26823 12.4714 3.52858C12.7318 3.78892 12.7318 4.21103 12.4714 4.47138L8.94282 7.99998L12.4714 11.5286C12.7318 11.7889 12.7318 12.211 12.4714 12.4714C12.2111 12.7317 11.789 12.7317 11.5286 12.4714L8.00001 8.94279L4.47141 12.4714C4.21107 12.7317 3.78896 12.7317 3.52861 12.4714C3.26826 12.211 3.26826 11.7889 3.52861 11.5286L7.0572 7.99998L3.52861 4.47138C3.26826 4.21103 3.26826 3.78892 3.52861 3.52858Z" fill="#FAFBFF"/>
|
|
2665
2661
|
</svg>
|
|
2666
2662
|
</div>
|
|
2667
|
-
`:D``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ra("Error in disableAddCommentModeButton: ",t),D``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ga.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Za.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Ra("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");e
|
|
2663
|
+
`:D``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ra("Error in disableAddCommentModeButton: ",t),D``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ga.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=Za.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Ra("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;try{const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");if(!e)return;requestAnimationFrame((()=>{var t;try{const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,r]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],s=parseInt(n)-i;e.style.transform=`translate(${s||0}px, ${r||0}px)`}catch(t){console.warn("Error in checkToolbarPosition Request Animation Frame",t)}}))}catch(t){console.warn("Error in checkToolbarPosition",t)}},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.toolbarMouseMove=t=>{var e;try{if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<32)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}}catch(t){console.warn("Error in toolbarMouseMove",t)}},this.toolbarMouseDown=t=>{var e;try{const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}}catch(t){console.warn("Error in toolbarMouseDown",t)}},this.toolbarMouseUp=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseUp",t)}},this.toolbarMouseLeave=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseLeave",t)}},this.guestUserNameUpdated=!!ka(Vt);const t=new URL(document.location);t.searchParams.has(Ct)&&t.searchParams.delete(Ct),this.signInUrl=`${Qt}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${Qt}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ma(xt),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Ra("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,r,s,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(r=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===r||r.setProperty("transform","none","important"),null===(a=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),ja({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Sa(St,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Ra("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=ba(xa(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Va(ut.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();t.includes(Gt)||t.includes(Ht)?this.toolbarEnabled=!0:this.toolbarEnabled=await(async(t,e,i)=>{var o;try{const n=bo(Da,de,{timeout:12e5}),r=await n({apiKey:t,projectId:e,url:i});return null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}})(this.apiKey,this.projectId,t),this.toolbarEnabled||Va(ut.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Ra("Error in detectToolbarEnabled: ",t)}}render(){var t,e,i,o,n,r,s,a,l,c,d,h,u,p,v,m,g,f;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?D`
|
|
2668
2664
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2669
2665
|
<div class="toolbar" id="smallToolbar"
|
|
2670
2666
|
style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
|
|
@@ -2886,11 +2882,11 @@ class da extends Yn{}da.Encryptor=class extends da{processBlock(t,e){const i=t,o
|
|
|
2886
2882
|
<div class="snippyly-plugin-container" part="superflow-toolbar-container">
|
|
2887
2883
|
${this.disableCommentModeButton()}
|
|
2888
2884
|
<div class="toolbar ${ct({expanded:this.expanded,"add-comment-mode":this.addCommentMode,"private-comment-mode":!!this.privateCommentModeEnabled})}" @resize=${this.checkToolbarPosition()}
|
|
2889
|
-
@mousemove=${t=>this.
|
|
2890
|
-
@mousedown=${t=>this.
|
|
2891
|
-
@mouseup=${t=>this.
|
|
2892
|
-
@mouseleave=${t=>this.
|
|
2893
|
-
style="cursor: grab;
|
|
2885
|
+
@mousemove=${t=>this.toolbarMouseMove(t)}
|
|
2886
|
+
@mousedown=${t=>this.toolbarMouseDown(t)}
|
|
2887
|
+
@mouseup=${t=>this.toolbarMouseUp(t)}
|
|
2888
|
+
@mouseleave=${t=>this.toolbarMouseLeave(t)}
|
|
2889
|
+
style="cursor: grab;">
|
|
2894
2890
|
|
|
2895
2891
|
<!-- icon + logo -->
|
|
2896
2892
|
<div class="toolbar-section toolbar-toggle-icon d-sm-none" @click=${()=>this.toggleSnippylyPluginToolbar()}>
|