@snippyly/plugin-staging 1.0.42 → 1.0.44
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/snippyly.js +236 -160
package/package.json
CHANGED
package/snippyly.js
CHANGED
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new Map;class
|
|
6
|
+
const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new Map;class e{constructor(t,o){if(this._$cssResult$=!0,o!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let i=o.get(this.cssText);return t&&void 0===i&&(o.set(this.cssText,i=new CSSStyleSheet),i.replaceSync(this.cssText)),i}toString(){return this.cssText}}const s=(t,...o)=>{const s=1===t.length?t[0]:o.reduce(((i,o,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[e+1]),t[0]);return new e(s,i)},n=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let o="";for(const i of t.cssRules)o+=i.cssText;return(t=>new e("string"==typeof t?t:t+"",i))(o)})(t):t
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/;var r;const l=window.trustedTypes,a=l?l.emptyScript:"",d=window.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let o=t;switch(i){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},h=(t,i)=>i!==t&&(i==i||t==t),p={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:h};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,o)=>{const
|
|
11
|
+
*/;var r;const l=window.trustedTypes,a=l?l.emptyScript:"",d=window.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let o=t;switch(i){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},h=(t,i)=>i!==t&&(i==i||t==t),p={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:h};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,o)=>{const e=this._$Eh(o,i);void 0!==e&&(this._$Eu.set(e,o),t.push(e))})),t}static createProperty(t,i=p){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,o,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,o){return{get(){return this[i]},set(e){const s=this[t];this[i]=e,this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of i)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Eh(t,i){const o=i.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,o;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var i;const o=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,o)=>{t?i.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((t=>{const o=document.createElement("style"),e=window.litNonce;void 0!==e&&o.setAttribute("nonce",e),o.textContent=t.cssText,i.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ES(t,i,o=p){var e,s;const n=this.constructor._$Eh(t,o);if(void 0!==n&&!0===o.reflect){const r=(null!==(s=null===(e=o.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==s?s:c.toAttribute)(i,o.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,i){var o,e,s;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(s=null!==(e=null===(o=l)||void 0===o?void 0:o.fromAttribute)&&void 0!==e?e:"function"==typeof l?l:null)&&void 0!==s?s:c.fromAttribute;this._$Ei=r,this[r]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,o){let e=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||h)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===o.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):e=!1),!this.isUpdatePending&&e&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const o=this._$AL;try{i=this.shouldUpdate(o),i?(this.willUpdate(o),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(o)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(o)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
var u;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,C="?"+w,m=`<${C}>`,
|
|
17
|
+
var u;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,C="?"+w,m=`<${C}>`,f=document,b=(t="")=>f.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,E=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,M=/'/g,L=/"/g,A=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),U=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Z=new WeakMap,V=f.createTreeWalker(f,129,null,!1),B=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",r=F;for(let i=0;i<o;i++){const o=t[i];let l,a,d=-1,c=0;for(;c<o.length&&(r.lastIndex=c,a=r.exec(o),null!==a);)c=r.lastIndex,r===F?"!--"===a[1]?r=$:void 0!==a[1]?r=k:void 0!==a[2]?(A.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=E):void 0!==a[3]&&(r=E):r===E?">"===a[0]?(r=null!=s?s:F,d=-1):void 0===a[1]?d=-2:(d=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?E:'"'===a[3]?L:M):r===L||r===M?r=E:r===$||r===k?r=F:(r=E,s=void 0);const h=r===E&&t[i+1].startsWith("/>")?" ":"";n+=r===F?o+m:d>=0?(e.push(l),o.slice(0,d)+"$lit$"+o.slice(d)+w+h):o+w+(-2===d?(e.push(void 0),i):h)}const l=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,e]};class I{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,d]=B(t,i);if(this.el=I.createElement(a,o),V.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=V.nextNode())&&l.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const o=d[n++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(o);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?z:"?"===i[1]?H:"@"===i[1]?P:D})}else l.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(A.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=y?y.emptyScript:"";for(let o=0;o<i;o++)e.append(t[o],b()),V.nextNode(),l.push({type:2,index:++s});e.append(t[i],b())}}}else if(8===e.nodeType)if(e.data===C)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)l.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const o=f.createElement("template");return o.innerHTML=t,o}}function O(t,i,o=t,e){var s,n,r,l;if(i===U)return i;let a=void 0!==e?null===(s=o._$Cl)||void 0===s?void 0:s[e]:o._$Cu;const d=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,o,e)),void 0!==e?(null!==(r=(l=o)._$Cl)&&void 0!==r?r:l._$Cl=[])[e]=a:o._$Cu=a),void 0!==a&&(i=O(t,a._$AS(t,i.values),a,e)),i}class R{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:e}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(o,!0);V.currentNode=s;let n=V.nextNode(),r=0,l=0,a=e[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new T(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new K(n,this,t)),this.v.push(i),a=e[++l]}r!==(null==a?void 0:a.index)&&(n=V.nextNode(),r++)}return s}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class T{constructor(t,i,o,e){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=e,this._$Cg=null===(s=null==e?void 0:e.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=O(this,t,i),x(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=I.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(o);else{const t=new R(s,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=Z.get(t.strings);return void 0===i&&Z.set(t.strings,i=new I(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,e=0;for(const s of t)e===i.length?i.push(o=new T(this.M(b()),this.M(b()),this,this.options)):o=i[e],o._$AI(s),e++;e<i.length&&(this._$AR(o&&o._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,o,e,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,e){const s=this.strings;let n=!1;if(void 0===s)t=O(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const e=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=O(this,e[o+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!e&&this.C(t)}C(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class z extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===j?void 0:t}}const N=y?y.emptyScript:"";class H extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==j?this.element.setAttribute(this.name,N):this.element.removeAttribute(this.name)}}class P extends D{constructor(t,i,o,e,s){super(t,i,o,e,s),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=O(this,t,i,0))&&void 0!==o?o:j)===U)return;const e=this._$AH,s=t===j&&e!==j||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==j&&(e===j||s);s&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}}const J=window.litHtmlPolyfillSupport;
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
var W,G;null==J||J(I,T),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class X extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const o=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=o.firstChild),o}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,o)=>{var s
|
|
23
|
+
var W,G;null==J||J(I,T),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class X extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const o=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=o.firstChild),o}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,o)=>{var e,s;const n=null!==(e=null==o?void 0:o.renderBefore)&&void 0!==e?e:i;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new T(i.insertBefore(b(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return U}}X.finalized=!0,X._$litElement$=!0,null===(W=globalThis.litElementHydrateSupport)||void 0===W||W.call(globalThis,{LitElement:X});const q=globalThis.litElementPolyfillSupport;null==q||q({LitElement:X}),(null!==(G=globalThis.litElementVersions)&&void 0!==G?G:globalThis.litElementVersions=[]).push("3.2.0");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
@@ -53,30 +53,9 @@ const ot=1;
|
|
|
53
53
|
* Copyright 2018 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
55
|
*/
|
|
56
|
-
const
|
|
57
|
-
calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1))`;case 4:return
|
|
58
|
-
calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[3]}rem * var(--snippyly-base-rem-unit, 1))`}return
|
|
59
|
-
|
|
60
|
-
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
|
61
|
-
|
|
62
|
-
* {
|
|
63
|
-
font-family: 'Poppins', sans-serif;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.snippyly-plugin-container {
|
|
67
|
-
position: fixed;
|
|
68
|
-
bottom: 0;
|
|
69
|
-
right: 0;
|
|
70
|
-
z-index: 99999999;
|
|
71
|
-
margin: ${vt(1.5)};
|
|
72
|
-
margin-bottom: ${vt(3)}; // Added to prevent overlap between plugin UI and webflow badge
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@media only screen and (max-width: 660px) {
|
|
76
|
-
.snippyly-plugin-container {
|
|
77
|
-
display: none;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
56
|
+
const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==ot||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var o,e;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(o=this.st)||void 0===o?void 0:o.has(t))&&this.et.add(t);return this.render(i)}const s=t.element.classList;this.et.forEach((t=>{t in i||(s.remove(t),this.et.delete(t))}));for(const t in i){const o=!!i[t];o===this.et.has(t)||(null===(e=this.st)||void 0===e?void 0:e.has(t))||(o?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return U}}),st="snippyly-cursor",nt="snippyly-comments",rt="snippyly-comments-sidebar",lt="snippyly-huddle",at="snippyly-recorder-notes",dt="enable-url-navigation",ct=(t,i,o=!1,e="localStorage")=>{try{const s=o?btoa(i):i;"localStorage"===e?localStorage.setItem(t,s):sessionStorage.setItem(t,s)}catch(t){console.warn("Error in setLocalStorage: ",t)}},ht=(t,i=!1,o="localStorage")=>{try{let e=null;return e="localStorage"===o?localStorage.getItem(t):sessionStorage.getItem(t),e&&i?atob(e):e}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},pt=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}},vt=(...t)=>{if(t)switch(t.length){case 1:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1))`;case 2:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))`;case 3:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
|
|
57
|
+
calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1))`;case 4:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
|
|
58
|
+
calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[3]}rem * var(--snippyly-base-rem-unit, 1))`}return s`0`},ut=s`
|
|
80
59
|
|
|
81
60
|
.wrap {
|
|
82
61
|
padding: 32px;
|
|
@@ -122,7 +101,6 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
122
101
|
align-items: center;
|
|
123
102
|
}
|
|
124
103
|
|
|
125
|
-
.toolbar-icon-context,
|
|
126
104
|
.toolbar-icon {
|
|
127
105
|
width: 32px;
|
|
128
106
|
height: 32px;
|
|
@@ -131,32 +109,30 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
131
109
|
cursor: pointer;
|
|
132
110
|
}
|
|
133
111
|
|
|
134
|
-
.toolbar-icon:hover
|
|
112
|
+
.toolbar-icon:hover,
|
|
113
|
+
.action-dropdown:hover {
|
|
135
114
|
background: #EAE8F9;
|
|
136
115
|
}
|
|
137
116
|
|
|
138
|
-
.toolbar-icon:active,
|
|
139
|
-
|
|
117
|
+
.toolbar-icon:active,
|
|
118
|
+
.action-dropdown:active,
|
|
119
|
+
.action-dropdown:active *{
|
|
120
|
+
fill: #FFFFFF !important;
|
|
140
121
|
background: #625DF5;
|
|
141
122
|
}
|
|
142
123
|
|
|
143
|
-
.
|
|
144
|
-
width: 24px;
|
|
145
|
-
height: 24px;
|
|
146
|
-
fill: #8F95B2;
|
|
147
|
-
cursor: pointer;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.toolbar-icon-arrow {
|
|
124
|
+
.action-dropdown-icon {
|
|
151
125
|
width: 32px;
|
|
152
126
|
height: 32px;
|
|
153
127
|
fill: #8F95B2;
|
|
154
|
-
|
|
128
|
+
border-radius: 50px;
|
|
155
129
|
}
|
|
156
130
|
|
|
157
|
-
.toolbar-icon-
|
|
158
|
-
|
|
159
|
-
|
|
131
|
+
.toolbar-icon-border {
|
|
132
|
+
width: 24px;
|
|
133
|
+
height: 24px;
|
|
134
|
+
fill: #8F95B2;
|
|
135
|
+
cursor: pointer;
|
|
160
136
|
}
|
|
161
137
|
|
|
162
138
|
.toolbar-icon-dropdown-arrow {
|
|
@@ -166,11 +142,6 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
166
142
|
cursor: pointer;
|
|
167
143
|
}
|
|
168
144
|
|
|
169
|
-
.toolbar-icon-dropdown-arrow:active {
|
|
170
|
-
transition: 0.3s;
|
|
171
|
-
transform: rotate(-90deg);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
145
|
.toolbar-logo {
|
|
175
146
|
height: 1.82em;
|
|
176
147
|
}
|
|
@@ -262,8 +233,12 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
262
233
|
gap: 4px;
|
|
263
234
|
}
|
|
264
235
|
|
|
265
|
-
.action
|
|
236
|
+
.action-dropdown {
|
|
237
|
+
display: flex;
|
|
238
|
+
justify-content: center;
|
|
239
|
+
align-items: center;
|
|
266
240
|
padding: 0px 6px;
|
|
241
|
+
border-radius: 50px;
|
|
267
242
|
}
|
|
268
243
|
|
|
269
244
|
.toolbar-actions1 {
|
|
@@ -282,20 +257,23 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
282
257
|
cursor: pointer;
|
|
283
258
|
}
|
|
284
259
|
|
|
285
|
-
.action-border:hover,
|
|
260
|
+
.action-border:hover,
|
|
261
|
+
.action-border:hover * {
|
|
286
262
|
background: #EAE8F9;
|
|
287
263
|
border-color: rgba(98, 93, 245, 1);
|
|
288
264
|
color: #625DF5;
|
|
289
265
|
fill: #625DF5;
|
|
290
266
|
}
|
|
291
267
|
|
|
292
|
-
.action-border:active,
|
|
268
|
+
.action-border:active,
|
|
269
|
+
.action-border:active * {
|
|
293
270
|
background: #625DF5;
|
|
294
271
|
border-color: #625DF5;
|
|
295
272
|
color: #FFFFFF;
|
|
296
273
|
fill: #FFFFFF;
|
|
297
274
|
}
|
|
298
275
|
|
|
276
|
+
|
|
299
277
|
.action-text {
|
|
300
278
|
margin: 0px 8px 0px 4px;
|
|
301
279
|
color: #8F95B2;
|
|
@@ -304,6 +282,95 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
304
282
|
.toolbar-img {
|
|
305
283
|
width: 32px;
|
|
306
284
|
height: 32px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Tooltip text */
|
|
288
|
+
.tooltip {
|
|
289
|
+
position: relative;
|
|
290
|
+
display: flex;
|
|
291
|
+
flex-direction: row;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.tooltip-link {
|
|
295
|
+
font-style: normal;
|
|
296
|
+
font-weight: 400;
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
line-height: 1.5em;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.tooltip-link:hover {}
|
|
302
|
+
|
|
303
|
+
/* Tooltip text */
|
|
304
|
+
.tooltip .tooltiptext {
|
|
305
|
+
visibility: hidden;
|
|
306
|
+
block-size: auto;
|
|
307
|
+
width: max-content;
|
|
308
|
+
bottom: 140%;
|
|
309
|
+
background-color: black;
|
|
310
|
+
color: #fff;
|
|
311
|
+
text-align: left;
|
|
312
|
+
padding: 6px 12px;
|
|
313
|
+
border-radius: 6px;
|
|
314
|
+
font-style: normal;
|
|
315
|
+
font-weight: 400;
|
|
316
|
+
font-size: 12px;
|
|
317
|
+
line-height: 2em;
|
|
318
|
+
|
|
319
|
+
/* Position the tooltip text - see examples below! */
|
|
320
|
+
position: absolute;
|
|
321
|
+
z-index: 1;
|
|
322
|
+
opacity: 0;
|
|
323
|
+
transition: opacity 0.5s;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Show the tooltip text when you mouse over the tooltip container */
|
|
327
|
+
.tooltip:hover .tooltiptext {
|
|
328
|
+
visibility: visible;
|
|
329
|
+
opacity: 1;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.tooltip .tooltiptext::after {
|
|
333
|
+
content: " ";
|
|
334
|
+
position: absolute;
|
|
335
|
+
bottom: 0;
|
|
336
|
+
right: 50%;
|
|
337
|
+
width: 12px;
|
|
338
|
+
height: 12px;
|
|
339
|
+
background-color: #000;
|
|
340
|
+
border-radius: 4px;
|
|
341
|
+
transform: translate(50%, 41%) rotate(45deg);
|
|
342
|
+
transform-origin: center;
|
|
343
|
+
}
|
|
344
|
+
`,yt=s`
|
|
345
|
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
|
346
|
+
|
|
347
|
+
* {
|
|
348
|
+
font-family: 'Poppins', sans-serif;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.snippyly-plugin-container {
|
|
352
|
+
position: fixed;
|
|
353
|
+
bottom: 0;
|
|
354
|
+
right: 0;
|
|
355
|
+
z-index: 99999999;
|
|
356
|
+
margin: ${vt(1.5)};
|
|
357
|
+
margin-bottom: ${vt(3)}; // Added to prevent overlap between plugin UI and webflow badge
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@media only screen and (max-width: 660px) {
|
|
361
|
+
.snippyly-plugin-container {
|
|
362
|
+
display: none;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.toolbar-icon.active,
|
|
367
|
+
.action-dropdown.active,
|
|
368
|
+
.action-dropdown.active *{
|
|
369
|
+
fill: #FFFFFF !important;
|
|
370
|
+
background: #625DF5;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.toolbar-img {
|
|
307
374
|
border-radius: 50px;
|
|
308
375
|
}
|
|
309
376
|
|
|
@@ -324,69 +391,64 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
324
391
|
transform: rotate(180deg);
|
|
325
392
|
}
|
|
326
393
|
|
|
327
|
-
snippyly-huddle-tool.
|
|
394
|
+
snippyly-huddle-tool .action-dropdown {
|
|
328
395
|
display: flex;
|
|
329
396
|
align-items: center;
|
|
330
397
|
justify-content: center;
|
|
331
398
|
}
|
|
332
399
|
|
|
333
|
-
snippyly-huddle-tool.
|
|
334
|
-
width: 24px !important;
|
|
335
|
-
height: 24px !important;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
snippyly-huddle-tool.toolbar-icon .mat-menu-trigger {
|
|
400
|
+
snippyly-huddle-tool .action-dropdown .mat-menu-trigger {
|
|
339
401
|
display: flex;
|
|
340
402
|
}
|
|
341
403
|
|
|
342
|
-
snippyly-huddle-tool.
|
|
404
|
+
snippyly-huddle-tool .action-dropdown svg path:first-child {
|
|
343
405
|
stroke: rgb(143, 149, 178);
|
|
344
406
|
stroke-width: 1.5px;
|
|
407
|
+
fill: none !important;
|
|
345
408
|
}
|
|
346
409
|
|
|
347
|
-
snippyly-huddle-tool.
|
|
410
|
+
snippyly-huddle-tool .action-dropdown svg path:not(:first-child) {
|
|
348
411
|
fill: rgb(143, 149, 178);
|
|
349
412
|
stroke: rgb(143, 149, 178);
|
|
350
413
|
stroke-width: 0.5px;
|
|
351
414
|
}
|
|
352
415
|
|
|
353
|
-
snippyly-huddle-tool.
|
|
354
|
-
|
|
416
|
+
snippyly-huddle-tool .action-dropdown:active svg path:first-child,
|
|
417
|
+
snippyly-huddle-tool .action-dropdown.active svg path:first-child {
|
|
418
|
+
stroke: white;
|
|
419
|
+
fill: transparent !important;
|
|
355
420
|
}
|
|
356
421
|
|
|
357
|
-
snippyly-huddle-tool.
|
|
422
|
+
snippyly-huddle-tool .action-dropdown:active svg path:not(:first-child),
|
|
423
|
+
snippyly-huddle-tool .action-dropdown.active svg path:not(:first-child) {
|
|
358
424
|
fill: white;
|
|
359
425
|
stroke: white;
|
|
360
426
|
}
|
|
361
427
|
|
|
362
|
-
snippyly-recorder-tool.
|
|
428
|
+
snippyly-recorder-tool .action-dropdown {
|
|
363
429
|
display: flex;
|
|
364
430
|
align-items: center;
|
|
365
431
|
justify-content: center;
|
|
366
432
|
}
|
|
367
433
|
|
|
368
|
-
snippyly-recorder-tool.
|
|
434
|
+
snippyly-recorder-tool .action-dropdown .mat-menu-trigger {
|
|
369
435
|
display: flex;
|
|
370
436
|
}
|
|
371
437
|
|
|
372
|
-
snippyly-recorder-tool.
|
|
373
|
-
width: 24px !important;
|
|
374
|
-
height: 24px !important;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
snippyly-recorder-tool.toolbar-icon svg path:first-child {
|
|
438
|
+
snippyly-recorder-tool .action-dropdown svg path:first-child {
|
|
378
439
|
fill: rgb(143, 149, 178);
|
|
440
|
+
stroke-width: 1.5px;
|
|
379
441
|
}
|
|
380
442
|
|
|
381
|
-
snippyly-recorder-tool.
|
|
443
|
+
snippyly-recorder-tool .action-dropdown svg path:not(:first-child) {
|
|
382
444
|
fill: rgb(143, 149, 178);
|
|
383
445
|
}
|
|
384
446
|
|
|
385
|
-
snippyly-recorder-tool.
|
|
447
|
+
snippyly-recorder-tool .action-dropdown:active svg path:first-child {
|
|
386
448
|
fill: white;
|
|
387
449
|
}
|
|
388
450
|
|
|
389
|
-
snippyly-recorder-tool.
|
|
451
|
+
snippyly-recorder-tool .action-dropdown:active svg path:not(:first-child) {
|
|
390
452
|
fill: white;
|
|
391
453
|
}
|
|
392
454
|
|
|
@@ -446,13 +508,26 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
446
508
|
.away {
|
|
447
509
|
filter: grayscale(1);
|
|
448
510
|
}
|
|
449
|
-
`;var yt=function(t,i,o,s){for(var e,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,o):s,l=t.length-1;l>=0;l--)(e=t[l])&&(r=(n<3?e(r):n>3?e(i,o,r):e(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let gt=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const s=JSON.parse(atob(o.get("snippyly_google_token"))),e={},n=(null===(t=s.providerData)||void 0===t?void 0:t.length)?s.providerData[0]:null;e.userId=s.uid,e.name=s.displayName||(null==n?void 0:n.displayName),e.email=s.email||(null==n?void 0:n.email),e.photoUrl=(null==s?void 0:s.photoURL)||(null==n?void 0:n.photoURL),e.contacts=window.SNIPPYLY_USER_CONTACTS||[],ct("snippyly-user",JSON.stringify(e),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ct("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):ht("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&ct("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||ht("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||ht("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),s=o.searchParams;s.get(t)||(s.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(dt,"true"),window.document.body.appendChild(t)}if(!document.querySelector(et)){const t=document.createElement(et);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const s=document.createElement("script");s.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,s.id="snippylyScript",s.type="module",document.body.appendChild(s),s.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,s=1103547991^i;for(let i,e=0;e<t.length;e++)i=t.charCodeAt(e),o=Math.imul(o^i,2654435761),s=Math.imul(s^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&s)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(ht("snippyly-user",!0)){const i=JSON.parse(ht("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{pt("review","sessionStorage"),pt("sreviewId","sessionStorage"),pt("projectVersionKey","sessionStorage"),pt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),pt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):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 projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ct("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i,o,s,e,n;return this.loadPlugin?this.snippylyUser?A`
|
|
511
|
+
|
|
512
|
+
.active .action-border,
|
|
513
|
+
.active .action-border * {
|
|
514
|
+
background: #625DF5;
|
|
515
|
+
border-color: #625DF5;
|
|
516
|
+
color: #FFFFFF;
|
|
517
|
+
fill: #FFFFFF;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.active .toolbar-icon {
|
|
521
|
+
fill: #FFFFFF !important;
|
|
522
|
+
background: #625DF5;
|
|
523
|
+
}
|
|
524
|
+
`;var gt=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let wt=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const e=JSON.parse(atob(o.get("snippyly_google_token"))),s={},n=(null===(t=e.providerData)||void 0===t?void 0:t.length)?e.providerData[0]:null;s.userId=e.uid,s.name=e.displayName||(null==n?void 0:n.displayName),s.email=e.email||(null==n?void 0:n.email),s.photoUrl=(null==e?void 0:e.photoURL)||(null==n?void 0:n.photoURL),s.contacts=window.SNIPPYLY_USER_CONTACTS||[],ct("snippyly-user",JSON.stringify(s),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ct("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):ht("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&ct("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||ht("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||ht("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),e=o.searchParams;e.get(t)||(e.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(dt,"true"),window.document.body.appendChild(t)}if(!document.querySelector(st)){const t=document.createElement(st);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const e=document.createElement("script");e.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,e.id="snippylyScript",e.type="module",document.body.appendChild(e),e.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,e=1103547991^i;for(let i,s=0;s<t.length;s++)i=t.charCodeAt(s),o=Math.imul(o^i,2654435761),e=Math.imul(e^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&e)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(ht("snippyly-user",!0)){const i=JSON.parse(ht("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{pt("review","sessionStorage"),pt("sreviewId","sessionStorage"),pt("projectVersionKey","sessionStorage"),pt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),pt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):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 projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ct("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i,o,e,s,n;return this.loadPlugin?this.snippylyUser?_`
|
|
450
525
|
<div class="snippyly-plugin-container">
|
|
451
|
-
<div class="toolbar ${
|
|
526
|
+
<div class="toolbar ${et({expanded:this.expanded})}">
|
|
452
527
|
|
|
453
528
|
<!-- icon + logo -->
|
|
454
529
|
<div class="toolbar-section toolbar-toggle-icon" @click=${()=>this.toggleSnippylyPluginToolbar()}>
|
|
455
|
-
<svg class="toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
530
|
+
<svg class="toolbar-icon toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
456
531
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
457
532
|
d="M14.1607 12.4941C13.8353 12.8195 13.8353 13.3472 14.1607 13.6726L16.4882 16L14.1607 18.3274C13.8353 18.6528 13.8353 19.1805 14.1607 19.5059C14.4862 19.8314 15.0138 19.8314 15.3393 19.5059L18.2559 16.5893C18.5814 16.2638 18.5814 15.7362 18.2559 15.4107L15.3393 12.4941C15.0138 12.1686 14.4862 12.1686 14.1607 12.4941Z" />
|
|
458
533
|
</svg>
|
|
@@ -479,12 +554,12 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
479
554
|
</div>
|
|
480
555
|
|
|
481
556
|
<!-- divider -->
|
|
482
|
-
<div class="toolbar-section ${
|
|
557
|
+
<div class="toolbar-section ${et({"d-none":!this.expanded})}">
|
|
483
558
|
<div class="toolbar-divider"></div>
|
|
484
559
|
</div>
|
|
485
560
|
|
|
486
561
|
<!-- avatars -->
|
|
487
|
-
<div class="toolbar-section presence-section ${
|
|
562
|
+
<div class="toolbar-section presence-section ${et({"d-none":!this.expanded})}">
|
|
488
563
|
<div class="toolbar-avatars">
|
|
489
564
|
<snippyly-presence max-users="4"></snippyly-presence>
|
|
490
565
|
<!-- <div class="avatar blue overlapped">
|
|
@@ -510,72 +585,68 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
510
585
|
</div> -->
|
|
511
586
|
|
|
512
587
|
<!-- actions -->
|
|
513
|
-
<div class="toolbar-section huddle-recorder-section ${
|
|
588
|
+
<div class="toolbar-section huddle-recorder-section ${et({"d-none":!this.expanded})}">
|
|
514
589
|
<div class="toolbar-actions">
|
|
515
|
-
<
|
|
516
|
-
<div class="
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
<svg class="toolbar-icon-dropdown-arrow" viewBox="0 0 16 16" fill="none"
|
|
527
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
528
|
-
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
529
|
-
d="M10.8047 6.5286C10.5444 6.26825 10.1223 6.26825 9.86193 6.5286L8 8.39052L6.13807 6.5286C5.87772 6.26825 5.45561 6.26825 5.19526 6.5286C4.93491 6.78894 4.93491 7.21105 5.19526 7.4714L7.5286 9.80474C7.78894 10.0651 8.21105 10.0651 8.4714 9.80474L10.8047 7.4714C11.0651 7.21105 11.0651 6.78894 10.8047 6.5286Z" />
|
|
530
|
-
</svg>
|
|
531
|
-
|
|
590
|
+
<div class="action tooltip">
|
|
591
|
+
<div class="tooltiptext">Comment</div>
|
|
592
|
+
<snippyly-comment-tool class="custom-tool">
|
|
593
|
+
<div class="action">
|
|
594
|
+
<svg class="toolbar-icon ${et({active:this.addCommentMode})}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
595
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
596
|
+
d="M17.7608 6.03888C21.6888 6.64595 24.7153 9.3481 25.7503 13.1722C26.0832 14.4028 26.0832 16.5981 25.7503 17.8287C24.8136 21.2897 22.3047 23.7986 18.8437 24.7353C18.1546 24.9217 17.6783 24.9695 16.5154 24.9685C14.9367 24.9672 14.1823 24.8254 12.8496 24.2792L12.1364 23.9869L9.93697 24.5342C7.8786 25.0464 7.71866 25.071 7.44436 24.917C6.90064 24.6118 6.90443 24.3818 7.49147 22.0353L8.03021 19.8823L7.73728 19.1677C7.19053 17.8336 7.04867 17.0796 7.04737 15.5005C7.0464 14.3376 7.09415 13.8613 7.28063 13.1722C8.21127 9.73361 10.737 7.1939 14.1308 6.28405C14.9298 6.06985 17.0392 5.92745 17.7608 6.03888ZM14.2233 8.05664C12.9452 8.46912 12.019 9.04056 11.0373 10.0223C9.57907 11.4805 8.85364 13.0991 8.75174 15.1214C8.68947 16.3572 8.85884 17.3544 9.31582 18.4435C9.47381 18.8201 9.65855 19.2624 9.72624 19.4266C9.82922 19.6761 9.78471 19.9865 9.45432 21.3204C9.23688 22.1979 9.06827 22.9251 9.07953 22.9364C9.09079 22.9476 9.81796 22.779 10.6955 22.5616C12.0294 22.2312 12.3398 22.1867 12.5893 22.2897C12.7535 22.3573 13.1958 22.5421 13.5724 22.7001C14.6615 23.1571 15.6587 23.3264 16.8945 23.2642C18.9168 23.1623 20.5354 22.4368 21.9936 20.9786C22.968 20.0042 23.5361 19.0878 23.9685 17.7926C24.2112 17.0656 24.2457 16.7805 24.2457 15.5005C24.2457 14.2204 24.2112 13.9353 23.9685 13.2083C23.5361 11.9132 22.968 10.9967 21.9936 10.0223C20.3414 8.37025 18.566 7.66777 16.2447 7.74769C15.3595 7.77823 14.8403 7.8575 14.2233 8.05664Z" />
|
|
597
|
+
</svg>
|
|
598
|
+
</div>
|
|
599
|
+
</snippyly-comment-tool>
|
|
532
600
|
</div>
|
|
533
|
-
<div class="
|
|
534
|
-
<
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
</svg>
|
|
601
|
+
<div class="tooltip">
|
|
602
|
+
<div class="tooltiptext">Huddle</div>
|
|
603
|
+
<snippyly-huddle-tool type="all"></snippyly-huddle-tool>
|
|
604
|
+
</div>
|
|
605
|
+
<div class="tooltip">
|
|
606
|
+
<div class="tooltiptext">Recording</div>
|
|
607
|
+
<snippyly-recorder-tool type="all"></snippyly-recorder-tool>
|
|
541
608
|
</div>
|
|
542
609
|
</div>
|
|
543
610
|
</div>
|
|
544
611
|
|
|
545
612
|
<!-- divider -->
|
|
546
|
-
<div class="toolbar-section ${
|
|
613
|
+
<div class="toolbar-section ${et({"d-none":!this.expanded})}">
|
|
547
614
|
<div class="toolbar-divider"></div>
|
|
548
615
|
</div>
|
|
549
616
|
|
|
550
617
|
<!-- actions 1 -->
|
|
551
|
-
<div class="toolbar-section comment-viewmode-section ${
|
|
618
|
+
<div class="toolbar-section comment-viewmode-section ${et({"d-none":!this.expanded})}">
|
|
552
619
|
<div class="toolbar-actions1">
|
|
553
|
-
<div class="action-border" @click=${()=>this.toggleCommentSidebar()}>
|
|
554
|
-
<
|
|
555
|
-
|
|
556
|
-
|
|
620
|
+
<div class="action-border tooltip" @click=${()=>this.toggleCommentSidebar()}>
|
|
621
|
+
<div class="tooltiptext">All Comments</div>
|
|
622
|
+
<svg class="toolbar-icon-border" viewBox="0 0 24 24" fill="none"
|
|
623
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
624
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
625
|
+
d="M13.7608 2.03888C17.6888 2.64595 20.7153 5.3481 21.7503 9.17223C22.0832 10.4028 22.0832 12.5981 21.7503 13.8287C20.8136 17.2897 18.3047 19.7986 14.8437 20.7353C14.1546 20.9217 13.6783 20.9695 12.5154 20.9685C10.9367 20.9672 10.1823 20.8254 8.84963 20.2792L8.13643 19.9869L5.93697 20.5342C3.8786 21.0464 3.71866 21.071 3.44436 20.917C2.90064 20.6118 2.90443 20.3818 3.49147 18.0353L4.03021 15.8823L3.73728 15.1677C3.19053 13.8336 3.04867 13.0796 3.04737 11.5005C3.0464 10.3376 3.09415 9.86128 3.28063 9.17223C4.21127 5.73361 6.73701 3.1939 10.1308 2.28405C10.9298 2.06985 13.0392 1.92745 13.7608 2.03888ZM10.2233 4.05664C8.94525 4.46912 8.01905 5.04056 7.0373 6.02231C5.57907 7.48054 4.85364 9.09914 4.75174 11.1214C4.68947 12.3572 4.85884 13.3544 5.31582 14.4435C5.47381 14.8201 5.65855 15.2624 5.72624 15.4266C5.82922 15.6761 5.78471 15.9865 5.45432 17.3204C5.23688 18.1979 5.06827 18.9251 5.07953 18.9364C5.09079 18.9476 5.81796 18.779 6.69553 18.5616C8.02944 18.2312 8.3398 18.1867 8.5893 18.2897C8.75347 18.3573 9.19583 18.5421 9.57235 18.7001C10.6615 19.1571 11.6587 19.3264 12.8945 19.2642C14.9168 19.1623 16.5354 18.4368 17.9936 16.9786C18.968 16.0042 19.5361 15.0878 19.9685 13.7926C20.2112 13.0656 20.2457 12.7805 20.2457 11.5005C20.2457 10.2204 20.2112 9.93535 19.9685 9.20829C19.5361 7.91315 18.968 6.9967 17.9936 6.02231C16.3414 4.37025 14.566 3.66777 12.2447 3.74769C11.3595 3.77823 10.8403 3.8575 10.2233 4.05664Z" />
|
|
626
|
+
</svg>
|
|
557
627
|
<p class="action-text">${null===(t=this.comments)||void 0===t?void 0:t.length}</p>
|
|
558
628
|
</div>
|
|
559
|
-
${this.isUserGlobalContact?
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
629
|
+
${this.isUserGlobalContact?_`
|
|
630
|
+
<snippyly-menu>
|
|
631
|
+
<div menu-trigger class="action-border dropdown tooltip">
|
|
632
|
+
<div class="tooltiptext">Views</div>
|
|
633
|
+
<svg width="16" height="24" viewBox="0 0 16 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
634
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99939 16.3333C10.7497 16.3333 12.7055 14.6051 13.8509 13.1658C14.2482 12.6665 14.2482 12.0001 13.8509 11.5009C12.7055 10.0616 10.7497 8.33333 7.99939 8.33333C5.24906 8.33333 3.29326 10.0616 2.14788 11.5009C1.75062 12.0001 1.75062 12.6665 2.14788 13.1658C3.29325 14.6051 5.24906 16.3333 7.99939 16.3333ZM14.8942 13.996C15.6782 13.0108 15.6782 11.6558 14.8942 10.6707C13.6487 9.10551 11.3504 7 7.99939 7C4.64837 7 2.3501 9.10551 1.10458 10.6707C0.320609 11.6558 0.320609 13.0108 1.10458 13.996C2.3501 15.5612 4.64837 17.6667 7.99939 17.6667C11.3504 17.6667 13.6487 15.5612 14.8942 13.996Z" fill="#8F95B2"/>
|
|
635
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.33301 12.3332C9.33301 13.0696 8.73605 13.6665 7.99967 13.6665C7.26329 13.6665 6.66634 13.0696 6.66634 12.3332C6.66634 12.3142 6.66674 12.2954 6.66752 12.2767C6.77144 12.3133 6.88324 12.3332 6.99967 12.3332C7.55196 12.3332 7.99967 11.8855 7.99967 11.3332C7.99967 11.2167 7.97977 11.1049 7.94319 11.001C7.96192 11.0002 7.98075 10.9998 7.99967 10.9998C8.73605 10.9998 9.33301 11.5968 9.33301 12.3332ZM10.6663 12.3332C10.6663 13.8059 9.47243 14.9998 7.99967 14.9998C6.52692 14.9998 5.33301 13.8059 5.33301 12.3332C5.33301 10.8604 6.52692 9.6665 7.99967 9.6665C9.47243 9.6665 10.6663 10.8604 10.6663 12.3332Z" fill="#8F95B2"/>
|
|
636
|
+
</svg>
|
|
637
|
+
<p class="action-text" style="margin-left:4px">${this.viewMode||"External"}</p>
|
|
638
|
+
<svg class="toolbar-icon-dropdown-arrow" viewBox="0 0 16 16" fill="none"
|
|
639
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
640
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
641
|
+
d="M10.8047 6.5286C10.5444 6.26825 10.1223 6.26825 9.86193 6.5286L8 8.39052L6.13807 6.5286C5.87772 6.26825 5.45561 6.26825 5.19526 6.5286C4.93491 6.78894 4.93491 7.21105 5.19526 7.4714L7.5286 9.80474C7.78894 10.0651 8.21105 10.0651 8.4714 9.80474L10.8047 7.4714C11.0651 7.21105 11.0651 6.78894 10.8047 6.5286Z" />
|
|
642
|
+
</svg>
|
|
643
|
+
</div>
|
|
644
|
+
<div menu-items>
|
|
645
|
+
<div @click=${()=>this.setViewMode("Internal")}>Internal</div>
|
|
646
|
+
<div @click=${()=>this.setViewMode(null)}>External</div>
|
|
647
|
+
<div @click=${()=>this.setViewMode("All")}>All</div>
|
|
648
|
+
</div>
|
|
649
|
+
</snippyly-menu>
|
|
579
650
|
`:null}
|
|
580
651
|
</div>
|
|
581
652
|
</div>
|
|
@@ -588,7 +659,8 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
588
659
|
<!-- actions 2 -->
|
|
589
660
|
<div class="toolbar-section">
|
|
590
661
|
<div class="toolbar-actions2">
|
|
591
|
-
<div class="action" @click=${()=>this.copyLink()}>
|
|
662
|
+
<div class="action tooltip" @click=${()=>this.copyLink()}>
|
|
663
|
+
<div class="tooltiptext">Copy Link</div>
|
|
592
664
|
<svg class="toolbar-icon" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
593
665
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
594
666
|
d="M12.9986 14.0398C13.028 14.5913 12.6047 15.0622 12.0532 15.0916C11.3005 15.1318 10.7044 15.1808 10.2385 15.23C9.61292 15.2959 9.23278 15.6802 9.16959 16.233C9.07886 17.0267 9 18.2277 9 19.9999C9 21.7722 9.07886 22.9732 9.16959 23.7669C9.23289 24.3206 9.61207 24.7038 10.2368 24.7697C11.3308 24.8852 13.1392 24.9999 16 24.9999C18.8608 24.9999 20.6692 24.8852 21.7632 24.7697C22.3879 24.7038 22.7671 24.3206 22.8304 23.7669C22.9211 22.9732 23 21.7722 23 19.9999C23 18.2277 22.9211 17.0267 22.8304 16.233C22.7672 15.6802 22.3871 15.2959 21.7615 15.23C21.2956 15.1808 20.6995 15.1318 19.9468 15.0916C19.3953 15.0622 18.972 14.5913 19.0014 14.0398C19.0308 13.4883 19.5017 13.0651 20.0532 13.0945C20.8361 13.1362 21.4669 13.1878 21.9712 13.241C23.4556 13.3975 24.6397 14.4506 24.8175 16.0059C24.9188 16.8922 25 18.1715 25 19.9999C25 21.8284 24.9188 23.1077 24.8175 23.994C24.6398 25.5483 23.4585 26.6019 21.9732 26.7587C20.7919 26.8834 18.9108 26.9999 16 26.9999C13.0892 26.9999 11.2081 26.8834 10.0268 26.7587C8.54151 26.6019 7.36021 25.5483 7.18253 23.994C7.0812 23.1077 7 21.8284 7 19.9999C7 18.1715 7.0812 16.8922 7.18253 16.0059C7.36031 14.4506 8.54436 13.3975 10.0288 13.241C10.5331 13.1878 11.1639 13.1362 11.9468 13.0945C12.4983 13.0651 12.9692 13.4883 12.9986 14.0398Z" />
|
|
@@ -598,29 +670,31 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
598
670
|
|
|
599
671
|
</div>
|
|
600
672
|
<div class="action">
|
|
601
|
-
${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)?
|
|
673
|
+
${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)?_`<img class="toolbar-img" src=${null===(o=this.snippylyUser)||void 0===o?void 0:o.photoUrl} referrerpolicy="no-referrer" title=${null===(e=this.snippylyUser)||void 0===e?void 0:e.name} />`:_`<div class="profile-initial"><span>${(null===(n=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===n?void 0:n.charAt(0))||"-"}</span></div>`}
|
|
602
674
|
</div>
|
|
603
675
|
</div>
|
|
604
676
|
</div>
|
|
605
677
|
|
|
606
678
|
<!-- context menu icon -->
|
|
607
|
-
<
|
|
608
|
-
<
|
|
609
|
-
<
|
|
610
|
-
<
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
<div
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
679
|
+
<div class="toolbar-section">
|
|
680
|
+
<snippyly-menu>
|
|
681
|
+
<div menu-trigger class="toolbar-section">
|
|
682
|
+
<svg class="toolbar-icon" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
683
|
+
<path
|
|
684
|
+
d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
|
|
685
|
+
</svg>
|
|
686
|
+
</div>
|
|
687
|
+
<div menu-items>
|
|
688
|
+
<div @click=${()=>this.toggleSnippylyPluginToolbar()}>${this.expanded?"Hide Toolbar":"Show Toolbar"}</div>
|
|
689
|
+
<div @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
|
|
690
|
+
<div @click=${()=>this.signOutUser()}>Sign out</div>
|
|
691
|
+
</div>
|
|
692
|
+
</snippyly-menu>
|
|
693
|
+
</div>
|
|
620
694
|
|
|
621
695
|
</div>
|
|
622
696
|
</div>
|
|
623
|
-
`:
|
|
697
|
+
`:_`
|
|
624
698
|
<div class="snippyly-plugin-container">
|
|
625
699
|
<div class="toolbar" id="smallToolbar">
|
|
626
700
|
<!-- <div class="toolbar-section">
|
|
@@ -657,17 +731,19 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
|
|
|
657
731
|
<div class="toolbar-section">
|
|
658
732
|
<div class="toolbar-divider"></div>
|
|
659
733
|
</div>
|
|
660
|
-
<
|
|
661
|
-
<
|
|
662
|
-
<
|
|
663
|
-
<
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
<div
|
|
669
|
-
|
|
670
|
-
|
|
734
|
+
<div class="toolbar-section">
|
|
735
|
+
<snippyly-menu>
|
|
736
|
+
<div menu-trigger class="toolbar-section">
|
|
737
|
+
<svg class="toolbar-icon" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
738
|
+
<path
|
|
739
|
+
d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
|
|
740
|
+
</svg>
|
|
741
|
+
</div>
|
|
742
|
+
<div menu-items>
|
|
743
|
+
<div @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
|
|
744
|
+
</div>
|
|
745
|
+
</snippyly-menu>
|
|
746
|
+
</div>
|
|
671
747
|
</div>
|
|
672
748
|
</div>
|
|
673
|
-
`:
|
|
749
|
+
`:_``}};wt.styles=[ut,yt],gt([tt()],wt.prototype,"loadPlugin",null),gt([tt()],wt.prototype,"comments",void 0),gt([tt()],wt.prototype,"commentElement",void 0),gt([tt()],wt.prototype,"commentSubscription",void 0),gt([tt()],wt.prototype,"selectionElement",void 0),gt([tt()],wt.prototype,"addCommentMode",void 0),gt([tt()],wt.prototype,"_expanded",void 0),gt([tt()],wt.prototype,"snippylyUser",void 0),gt([Y()],wt.prototype,"apiKey",void 0),gt([tt()],wt.prototype,"staging",void 0),gt([Y()],wt.prototype,"projectVersionKey",null),gt([tt()],wt.prototype,"projectVersion",void 0),gt([tt()],wt.prototype,"_menuOpenedId",void 0),gt([tt()],wt.prototype,"copyLinkTooltip",void 0),gt([tt()],wt.prototype,"invalidApiKey",void 0),gt([tt()],wt.prototype,"documentId",void 0),gt([tt()],wt.prototype,"isUserGlobalContact",void 0),gt([tt()],wt.prototype,"location",void 0),gt([tt()],wt.prototype,"viewMode",void 0),wt=gt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:o,elements:e}=i;return{kind:o,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],wt);export{wt as SnippylyPlugin};
|