@snippyly/plugin-staging 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/snippyly.js +368 -272
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snippyly/plugin-staging",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "snippyly.js",
6
6
  "scripts": {
package/snippyly.js CHANGED
@@ -3,35 +3,35 @@
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(),s=new Map;class e{constructor(t,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let i=s.get(this.cssText);return t&&void 0===i&&(s.set(this.cssText,i=new CSSStyleSheet),i.replaceSync(this.cssText)),i}toString(){return this.cssText}}const n=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return(t=>new e("string"==typeof t?t:t+"",i))(s)})(t):t
6
+ const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),e=new Map;class s{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let i=e.get(this.cssText);return t&&void 0===i&&(e.set(this.cssText,i=new CSSStyleSheet),i.replaceSync(this.cssText)),i}toString(){return this.cssText}}const n=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",i))(e)})(t):t
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */;var o;const r=window.trustedTypes,l=r?r.emptyScript:"",h=window.reactiveElementPolyfillSupport,a={toAttribute(t,i){switch(i){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},c=(t,i)=>i!==t&&(i==i||t==t),d={attribute:!0,type:String,converter:a,reflect:!1,hasChanged:c};class p 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,s)=>{const e=this._$Eh(s,i);void 0!==e&&(this._$Eu.set(e,s),t.push(e))})),t}static createProperty(t,i=d){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const n=this[t];this[i]=e,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||d}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 s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Eh(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"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,s;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.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 s=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{t?i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((t=>{const s=document.createElement("style"),e=window.litNonce;void 0!==e&&s.setAttribute("nonce",e),s.textContent=t.cssText,i.appendChild(s)}))})(s,this.constructor.elementStyles),s}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,s){this._$AK(t,s)}_$ES(t,i,s=d){var e,n;const o=this.constructor._$Eh(t,s);if(void 0!==o&&!0===s.reflect){const r=(null!==(n=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==n?n:a.toAttribute)(i,s.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var s,e,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(e=null===(s=l)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:"function"==typeof l?l:null)&&void 0!==n?n:a.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||c)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):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 s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),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(s)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(s)}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){}}
11
+ */;var o;const r=window.trustedTypes,l=r?r.emptyScript:"",h=window.reactiveElementPolyfillSupport,a={toAttribute(t,i){switch(i){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},d=(t,i)=>i!==t&&(i==i||t==t),c={attribute:!0,type:String,converter:a,reflect:!1,hasChanged:d};class p 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,e)=>{const s=this._$Eh(e,i);void 0!==s&&(this._$Eu.set(s,e),t.push(s))})),t}static createProperty(t,i=c){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||c}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 e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"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,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.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 e=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,e)=>{t?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((t=>{const e=document.createElement("style"),s=window.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=t.cssText,i.appendChild(e)}))})(e,this.constructor.elementStyles),e}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,e){this._$AK(t,e)}_$ES(t,i,e=c){var s,n;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(n=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:a.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,s,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(s=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:a.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(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 e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),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(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}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;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.3.2");const v=globalThis.trustedTypes,y=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,m="?"+g,w=`<${m}>`,f=document,b=(t="")=>f.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,E=/>/g,k=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,M=/'/g,_=/"/g,L=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),U=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),O=new WeakMap,B=f.createTreeWalker(f,129,null,!1),R=(t,i)=>{const s=t.length-1,e=[];let n,o=2===i?"<svg>":"",r=C;for(let i=0;i<s;i++){const s=t[i];let l,h,a=-1,c=0;for(;c<s.length&&(r.lastIndex=c,h=r.exec(s),null!==h);)c=r.lastIndex,r===C?"!--"===h[1]?r=$:void 0!==h[1]?r=E:void 0!==h[2]?(L.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=k):void 0!==h[3]&&(r=k):r===k?">"===h[0]?(r=null!=n?n:C,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?k:'"'===h[3]?_:M):r===_||r===M?r=k:r===$||r===E?r=C:(r=k,n=void 0);const d=r===k&&t[i+1].startsWith("/>")?" ":"";o+=r===C?s+w:a>=0?(e.push(l),s.slice(0,a)+"$lit$"+s.slice(a)+g+d):s+g+(-2===a?(e.push(void 0),i):d)}const l=o+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==y?y.createHTML(l):l,e]};class j{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=R(t,i);if(this.el=j.createElement(h,s),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=B.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(g)){const s=a[o++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+"$lit$").split(g),i=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?Z:"?"===i[1]?V:"@"===i[1]?F:I})}else l.push({type:6,index:n})}for(const i of t)e.removeAttribute(i)}if(L.test(e.tagName)){const t=e.textContent.split(g),i=t.length-1;if(i>0){e.textContent=v?v.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],b()),B.nextNode(),l.push({type:2,index:++n});e.append(t[i],b())}}}else if(8===e.nodeType)if(e.data===m)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,i){const s=f.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){var n,o,r,l;if(i===U)return i;let h=void 0!==e?null===(n=s._$Cl)||void 0===n?void 0:n[e]:s._$Cu;const a=x(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,s,e)),void 0!==e?(null!==(r=(l=s)._$Cl)&&void 0!==r?r:l._$Cl=[])[e]=h:s._$Cu=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class z{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:s},parts:e}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(s,!0);B.currentNode=n;let o=B.nextNode(),r=0,l=0,h=e[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new P(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new D(o,this,t)),this.v.push(i),h=e[++l]}r!==(null==h?void 0:h.index)&&(o=B.nextNode(),r++)}return n}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class P{constructor(t,i,s,e){var n;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(n=null==e?void 0:e.isConnected)||void 0===n||n}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=N(this,t,i),x(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):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!==T&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,n="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=j.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(s);else{const t=new z(n,this),i=t.p(this.options);t.m(s),this.k(i),this._$AH=t}}_$AC(t){let i=O.get(t.strings);return void 0===i&&O.set(t.strings,i=new j(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const n of t)e===i.length?i.push(s=new P(this.M(b()),this.M(b()),this,this.options)):s=i[e],s._$AI(n),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.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 I{constructor(t,i,s,e,n){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const n=this.strings;let o=!1;if(void 0===n)t=N(this,t,i,0),o=!x(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const e=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=N(this,e[s+r],i,r),l===U&&(l=this._$AH[r]),o||(o=!x(l)||l!==this._$AH[r]),l===T?t=T:t!==T&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!e&&this.C(t)}C(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends I{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===T?void 0:t}}const H=v?v.emptyScript:"";class V extends I{constructor(){super(...arguments),this.type=4}C(t){t&&t!==T?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class F extends I{constructor(t,i,s,e,n){super(t,i,s,e,n),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=N(this,t,i,0))&&void 0!==s?s:T)===U)return;const e=this._$AH,n=t===T&&e!==T||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,o=t!==T&&(e===T||n);n&&this.element.removeEventListener(this.name,this,e),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const J=window.litHtmlPolyfillSupport;
17
+ var u;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(o=globalThis.reactiveElementVersions)&&void 0!==o?o:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,v=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,m="?"+g,w=`<${m}>`,f=document,b=(t="")=>f.createComment(t),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,E=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,L=/'/g,_=/"/g,M=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),O=new WeakMap,z=f.createTreeWalker(f,129,null,!1),B=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=x;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,d=0;for(;d<e.length&&(r.lastIndex=d,h=r.exec(e),null!==h);)d=r.lastIndex,r===x?"!--"===h[1]?r=$:void 0!==h[1]?r=k:void 0!==h[2]?(M.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=E):void 0!==h[3]&&(r=E):r===E?">"===h[0]?(r=null!=n?n:x,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?E:'"'===h[3]?_:L):r===_||r===L?r=E:r===$||r===k?r=x:(r=E,n=void 0);const c=r===E&&t[i+1].startsWith("/>")?" ":"";o+=r===x?e+w:a>=0?(s.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+g+c):e+g+(-2===a?(s.push(void 0),i):c)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==v?v.createHTML(l):l,s]};class R{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=B(t,i);if(this.el=R.createElement(h,e),z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=z.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(g)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(g),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?I:"?"===i[1]?V:"@"===i[1]?F:P})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(M.test(s.tagName)){const t=s.textContent.split(g),i=t.length-1;if(i>0){s.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],b()),z.nextNode(),l.push({type:2,index:++n});s.append(t[i],b())}}}else if(8===s.nodeType)if(s.data===m)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,i){const e=f.createElement("template");return e.innerHTML=t,e}}function j(t,i,e=t,s){var n,o,r,l;if(i===U)return i;let h=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const a=C(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=h:e._$Cu=h),void 0!==h&&(i=j(t,h._$AS(t,i.values),h,s)),i}class N{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:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(e,!0);z.currentNode=n;let o=z.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new Z(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new D(o,this,t)),this.v.push(i),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=z.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class Z{constructor(t,i,e,s){var n;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}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=j(this,t,i),C(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):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!==T&&C(this._$AH)?this._$AA.nextSibling.data=t:this.k(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=R.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new N(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=O.get(t.strings);return void 0===i&&O.set(t.strings,i=new R(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new Z(this.M(b()),this.M(b()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.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 P{constructor(t,i,e,s,n){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=T}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=j(this,t,i,0),o=!C(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=j(this,s[e+r],i,r),l===U&&(l=this._$AH[r]),o||(o=!C(l)||l!==this._$AH[r]),l===T?t=T:t!==T&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.C(t)}C(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends P{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===T?void 0:t}}const H=y?y.emptyScript:"";class V extends P{constructor(){super(...arguments),this.type=4}C(t){t&&t!==T?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class F extends P{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=j(this,t,i,0))&&void 0!==e?e:T)===U)return;const s=this._$AH,n=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==T&&(s===T||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){j(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 K,W;null==J||J(j,P),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class X extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,s)=>{var e,n;const o=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new P(i.insertBefore(b(),t),t,void 0,null!=s?s:{})}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===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:X});const q=globalThis.litElementPolyfillSupport;null==q||q({LitElement:X}),(null!==(W=globalThis.litElementVersions)&&void 0!==W?W:globalThis.litElementVersions=[]).push("3.2.0");
23
+ var K,W;null==J||J(R,Z),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class q extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var s,n;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new Z(i.insertBefore(b(),t),t,void 0,null!=e?e:{})}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}}q.finalized=!0,q._$litElement$=!0,null===(K=globalThis.litElementHydrateSupport)||void 0===K||K.call(globalThis,{LitElement:q});const G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:q}),(null!==(W=globalThis.litElementVersions)&&void 0!==W?W:globalThis.litElementVersions=[]).push("3.2.0");
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- const G=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(s){s.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(s){s.createProperty(i.key,t)}};
29
+ const X=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */function Q(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):G(t,i)
34
+ */function Q(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):X(t,i)
35
35
  /**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
@@ -53,281 +53,377 @@ const it=1;
53
53
  * Copyright 2018 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
55
  */
56
- const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,s){this._$Ct=t,this._$AM=i,this._$Ci=s}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==it||"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 s,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===(s=this.st)||void 0===s?void 0:s.has(t))&&this.et.add(t);return this.render(i)}const n=t.element.classList;this.et.forEach((t=>{t in i||(n.remove(t),this.et.delete(t))}));for(const t in i){const s=!!i[t];s===this.et.has(t)||(null===(e=this.st)||void 0===e?void 0:e.has(t))||(s?(n.add(t),this.et.add(t)):(n.remove(t),this.et.delete(t)))}return U}}),et=(t,i=0)=>{try{let s=3735928559^i,e=1103547991^i;for(let i,n=0;n<t.length;n++)i=t.charCodeAt(n),s=Math.imul(s^i,2654435761),e=Math.imul(e^i,1597334677);return s=Math.imul(s^s>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),4294967296*(2097151&e)+(s>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}},nt=(t,i,s=!1,e="localStorage")=>{try{const n=s?btoa(i):i;"localStorage"===e?localStorage.setItem(t,n):sessionStorage.setItem(t,n)}catch(t){console.warn("Error in setLocalStorage: ",t)}},ot=(t,i=!1,s="localStorage")=>{try{let e=null;return e="localStorage"===s?localStorage.getItem(t):sessionStorage.getItem(t),e&&i?atob(e):e}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},rt=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}};var lt=function(t,i,s,e){for(var n,o=arguments.length,r=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,s,r):n(i,s))||r);return o>3&&r&&Object.defineProperty(i,s,r),r};let ht=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",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=()=>{try{const t=new URL(document.location),i=t.searchParams;if(i.has("snippyly_google_token")){const s=JSON.parse(atob(i.get("snippyly_google_token"))),e={};e.userId=s.uid,e.name=s.displayName,e.email=s.email,e.photoUrl=null==s?void 0:s.photoURL,e.contacts=window.SNIPPYLY_USER_CONTACTS||[],nt("snippyly-user",JSON.stringify(e),!0),i.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}if(i.has("review-mode"))if(nt("review-mode","true",!1,"sessionStorage"),i.has("review-doc-id"))this.loadPluginUI();else{const s=new URL(document.location);s.searchParams.delete("review-mode");const e=et(s.href);i.append("review-doc-id",`${e}`),window.history.replaceState({},document.title,t.href),this.loadPluginUI()}else if(ot("review-mode",!1,"sessionStorage")){const s=new URL(document.location);s.searchParams.delete("review-mode"),i.append("review-mode","true");const e=et(s.href);i.append("review-doc-id",`${e}`),window.history.replaceState({},document.title,t.href),this.loadPluginUI()}}catch(t){console.warn("Error in checkUrl: ",t)}},this.loadPluginUI=()=>{try{this.loadPlugin=!0;const t=document.createElement("snippyly-comments");window.document.body.appendChild(t);const i=document.createElement("snippyly-comments-sidebar");window.document.body.appendChild(i);const s=document.createElement("snippyly-cursor");window.document.body.appendChild(s),((t="latest",i=!1,s)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))s&&s();else{const e=document.createElement("script");e.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}@${t||"latest"}/snippyly.js`,e.id="snippylyScript",e.type="module",document.body.appendChild(e),e.onload=()=>{s&&s()}}})(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.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&this.commentElement.enableTextComments(!0),ot("snippyly-user",!0)&&this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.identifySnippyly=async()=>{try{this.snippylyUser=JSON.parse(ot("snippyly-user",!0)),await Snippyly.identify(this.snippylyUser),this.getComments()}catch(t){console.warn("Error in identifySnippyly: ",t)}},this.getComments=()=>{try{this.commentElement&&this.commentElement.getAllCommentPinAnnotationsOnCurrentDocument().subscribe((t=>{this.comments=t}))}catch(t){console.warn("Error in getComments: ",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{rt("review-mode","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("review-doc-id"),i.delete("review-mode"),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(),rt("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=>{try{this.menuOpenedId===t?this.menuOpenedId=void 0:this.menuOpenedId=t}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}};try{this.expanded=!0,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")}render(){var t,i,s,e,n,o;return this.loadPlugin?A`
57
- <div class="snippyly-plugin-container">
58
- <div class="snippyly-btn-container snippyly-menu-trigger ${st({opened:"snippylyMenu"===this.menuOpenedId})}" id="snippylyMenu" @click=${()=>this.toggleMenu("snippylyMenu")}>
59
- <div class="btn snippyly-btn">
60
- <svg class="snippyly-logo" width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg">
61
- <path d="M7.27564 0.223149C6.79031 0.00346224 6.25358 -0.0557657 5.73589 0.0532382C5.21819 0.162242 4.74372 0.434385 4.37475 0.833949C3.99784 1.2249 3.74112 1.72714 3.63818 2.275C3.53523 2.82287 3.59085 3.39088 3.79775 3.90475C3.99487 4.42252 4.33503 4.86527 4.77372 5.17507C5.21241 5.48487 5.72921 5.64732 6.25653 5.64115H8.91823V2.82595C8.92404 2.26743 8.77031 1.72008 8.4772 1.25563C8.1841 0.791185 7.76528 0.431303 7.27564 0.223149Z" fill="#FFCB00"/>
62
- <path d="M16.9736 3.72115C16.3509 3.06258 15.5579 2.61408 14.6946 2.43229C13.8313 2.25049 12.9365 2.34355 12.1231 2.69972C11.3097 3.05588 10.6143 3.65918 10.1246 4.43343C9.63489 5.20769 9.37289 6.11818 9.37167 7.04995V11.7611H13.8313C14.714 11.771 15.5791 11.4985 16.3131 10.9793C17.0471 10.46 17.616 9.7183 17.9451 8.85115C18.2892 7.9918 18.3806 7.04259 18.2072 6.12744C18.0339 5.21229 17.604 4.3737 16.9736 3.72115Z" fill="#FF7162"/>
63
- <path d="M14.4933 13.9835C14.2962 13.4652 13.956 13.0218 13.5172 12.7114C13.0783 12.401 12.5612 12.2379 12.0334 12.2435H9.37167V15.0611C9.36611 15.6198 9.52006 16.1671 9.81336 16.6316C10.1067 17.096 10.5256 17.4558 11.0154 17.6639C11.3431 17.8099 11.6949 17.8853 12.0504 17.8859C12.4867 17.8813 12.9153 17.7635 13.2987 17.5429C13.682 17.3223 14.0085 17.0057 14.2496 16.6206C14.4906 16.2356 14.6388 15.7939 14.6813 15.3342C14.7238 14.8745 14.6593 14.4107 14.4933 13.9835Z" fill="#0DCF82"/>
64
- <path d="M0.351589 9.03355C0.00514201 9.8932 -0.0880133 10.8436 0.0843205 11.7602C0.256654 12.6768 0.686445 13.517 1.31742 14.1708C1.72451 14.6098 2.20989 14.9589 2.74541 15.1979C3.28094 15.4368 3.85595 15.5608 4.4371 15.5628C5.03193 15.5613 5.62062 15.4353 6.16924 15.192C6.9885 14.8437 7.68929 14.2415 8.17981 13.4645C8.67033 12.6874 8.92771 11.7717 8.91823 10.8372V6.12115H4.46544C3.58239 6.11147 2.71718 6.38434 1.98312 6.90402C1.24906 7.4237 0.680388 8.16595 0.351589 9.03355Z" fill="#A259FE"/>
65
- </svg>
66
- <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
67
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.646 4.354L0.645996 1.354L1.354 0.646004L4 3.293L6.646 0.646004L7.354 1.354L4.354 4.354L4 4.707L3.646 4.354Z" fill="#5B5B5B"/>
68
- </svg>
69
- </div>
70
- <div class="snippyly-menu">
71
- <div class="menu-item" @click=${()=>this.toggleSnippylyPluginToolbar()}>${this.expanded?"Hide Toolbar":"Show Toolbar"}</div>
72
- <div class="menu-item" @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
56
+ const et=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==it||"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 e,s;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===(e=this.st)||void 0===e?void 0:e.has(t))&&this.et.add(t);return this.render(i)}const n=t.element.classList;this.et.forEach((t=>{t in i||(n.remove(t),this.et.delete(t))}));for(const t in i){const e=!!i[t];e===this.et.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(e?(n.add(t),this.et.add(t)):(n.remove(t),this.et.delete(t)))}return U}}),st=(t,i=0)=>{try{let e=3735928559^i,s=1103547991^i;for(let i,n=0;n<t.length;n++)i=t.charCodeAt(n),e=Math.imul(e^i,2654435761),s=Math.imul(s^i,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&s)+(e>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}},nt=(t,i,e=!1,s="localStorage")=>{try{const n=e?btoa(i):i;"localStorage"===s?localStorage.setItem(t,n):sessionStorage.setItem(t,n)}catch(t){console.warn("Error in setLocalStorage: ",t)}},ot=(t,i=!1,e="localStorage")=>{try{let s=null;return s="localStorage"===e?localStorage.getItem(t):sessionStorage.getItem(t),s&&i?atob(s):s}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},rt=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}};var lt=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};let ht=class extends q{constructor(){super(),this._loadPlugin=!1,this.comments=[],this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",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=()=>{try{const t=new URL(document.location),i=t.searchParams;if(i.has("snippyly_google_token")){const e=JSON.parse(atob(i.get("snippyly_google_token"))),s={};s.userId=e.uid,s.name=e.displayName,s.email=e.email,s.photoUrl=null==e?void 0:e.photoURL,s.contacts=window.SNIPPYLY_USER_CONTACTS||[],nt("snippyly-user",JSON.stringify(s),!0),i.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}if(i.has("review-mode"))if(nt("review-mode","true",!1,"sessionStorage"),i.has("review-doc-id"))this.loadPluginUI();else{const e=new URL(document.location);e.searchParams.delete("review-mode");const s=st(e.href);i.append("review-doc-id",`${s}`),window.history.replaceState({},document.title,t.href),this.loadPluginUI()}else if(ot("review-mode",!1,"sessionStorage")){const e=new URL(document.location);e.searchParams.delete("review-mode"),i.append("review-mode","true");const s=st(e.href);i.append("review-doc-id",`${s}`),window.history.replaceState({},document.title,t.href),this.loadPluginUI()}}catch(t){console.warn("Error in checkUrl: ",t)}},this.loadPluginUI=()=>{try{this.loadPlugin=!0;const t=document.createElement("snippyly-comments");window.document.body.appendChild(t);const i=document.createElement("snippyly-comments-sidebar");window.document.body.appendChild(i);const e=document.createElement("snippyly-cursor");window.document.body.appendChild(e),((t="latest",i=!1,e)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))e&&e();else{const s=document.createElement("script");s.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}@${t||"latest"}/snippyly.js`,s.id="snippylyScript",s.type="module",document.body.appendChild(s),s.onload=()=>{e&&e()}}})(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.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&this.commentElement.enableTextComments(!0),ot("snippyly-user",!0)&&this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.identifySnippyly=async()=>{try{this.snippylyUser=JSON.parse(ot("snippyly-user",!0)),await Snippyly.identify(this.snippylyUser),this.getComments()}catch(t){console.warn("Error in identifySnippyly: ",t)}},this.getComments=()=>{try{this.commentElement&&this.commentElement.getAllCommentPinAnnotationsOnCurrentDocument().subscribe((t=>{this.comments=t}))}catch(t){console.warn("Error in getComments: ",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{rt("review-mode","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("review-doc-id"),i.delete("review-mode"),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(),rt("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)}};try{this.expanded=!0,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")}render(){var t,i,e,s,n,o,r,l,h,a,d;return this.loadPlugin?A`
57
+ <div class="snippyly-plugin-container ${et({expanded:this.expanded,active:null===(t=this.snippylyUser)||void 0===t?void 0:t.userId})}">
58
+ <div class="snippyly-logo-container snippyly-menu-trigger" @click=${()=>this.toggleSnippylyPluginToolbar()}>
59
+ ${this.expanded?null:A`
60
+ <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow-icon">
61
+ <path fill-rule="evenodd" clip-rule="evenodd"
62
+ d="M3.646 4.354L0.645996 1.354L1.354 0.646004L4 3.293L6.646 0.646004L7.354 1.354L4.354 4.354L4 4.707L3.646 4.354Z"
63
+ fill="#5B5B5B" />
64
+ </svg>
65
+ `}
66
+ <svg class="snippyly-logo" width="20" height="20" viewBox="0 0 20 20" fill="none"
67
+ xmlns="http://www.w3.org/2000/svg">
68
+ <path
69
+ d="M7.27564 0.223149C6.79031 0.00346224 6.25358 -0.0557657 5.73589 0.0532382C5.21819 0.162242 4.74372 0.434385 4.37475 0.833949C3.99784 1.2249 3.74112 1.72714 3.63818 2.275C3.53523 2.82287 3.59085 3.39088 3.79775 3.90475C3.99487 4.42252 4.33503 4.86527 4.77372 5.17507C5.21241 5.48487 5.72921 5.64732 6.25653 5.64115H8.91823V2.82595C8.92404 2.26743 8.77031 1.72008 8.4772 1.25563C8.1841 0.791185 7.76528 0.431303 7.27564 0.223149Z"
70
+ fill="#FFCB00" />
71
+ <path
72
+ d="M16.9736 3.72115C16.3509 3.06258 15.5579 2.61408 14.6946 2.43229C13.8313 2.25049 12.9365 2.34355 12.1231 2.69972C11.3097 3.05588 10.6143 3.65918 10.1246 4.43343C9.63489 5.20769 9.37289 6.11818 9.37167 7.04995V11.7611H13.8313C14.714 11.771 15.5791 11.4985 16.3131 10.9793C17.0471 10.46 17.616 9.7183 17.9451 8.85115C18.2892 7.9918 18.3806 7.04259 18.2072 6.12744C18.0339 5.21229 17.604 4.3737 16.9736 3.72115Z"
73
+ fill="#FF7162" />
74
+ <path
75
+ d="M14.4933 13.9835C14.2962 13.4652 13.956 13.0218 13.5172 12.7114C13.0783 12.401 12.5612 12.2379 12.0334 12.2435H9.37167V15.0611C9.36611 15.6198 9.52006 16.1671 9.81336 16.6316C10.1067 17.096 10.5256 17.4558 11.0154 17.6639C11.3431 17.8099 11.6949 17.8853 12.0504 17.8859C12.4867 17.8813 12.9153 17.7635 13.2987 17.5429C13.682 17.3223 14.0085 17.0057 14.2496 16.6206C14.4906 16.2356 14.6388 15.7939 14.6813 15.3342C14.7238 14.8745 14.6593 14.4107 14.4933 13.9835Z"
76
+ fill="#0DCF82" />
77
+ <path
78
+ d="M0.351589 9.03355C0.00514201 9.8932 -0.0880133 10.8436 0.0843205 11.7602C0.256654 12.6768 0.686445 13.517 1.31742 14.1708C1.72451 14.6098 2.20989 14.9589 2.74541 15.1979C3.28094 15.4368 3.85595 15.5608 4.4371 15.5628C5.03193 15.5613 5.62062 15.4353 6.16924 15.192C6.9885 14.8437 7.68929 14.2415 8.17981 13.4645C8.67033 12.6874 8.92771 11.7717 8.91823 10.8372V6.12115H4.46544C3.58239 6.11147 2.71718 6.38434 1.98312 6.90402C1.24906 7.4237 0.680388 8.16595 0.351589 9.03355Z"
79
+ fill="#A259FE" />
80
+ </svg>
81
+ ${this.expanded?A`
82
+ <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow-icon">
83
+ <path fill-rule="evenodd" clip-rule="evenodd"
84
+ d="M3.646 4.354L0.645996 1.354L1.354 0.646004L4 3.293L6.646 0.646004L7.354 1.354L4.354 4.354L4 4.707L3.646 4.354Z"
85
+ fill="#5B5B5B" />
86
+ </svg>
87
+ `:null}
88
+ <div class="snippyly-menu snippyly-tooltip">
89
+ <div class="menu-item">${this.expanded?"Hide Toolbar":"Show Toolbar"}</div>
73
90
  </div>
74
91
  </div>
75
92
  ${this.expanded?A`
76
- <div class="btn comment-tool-btn ${st({disabled:!(null===(t=this.snippylyUser)||void 0===t?void 0:t.userId)})}">
93
+ <div class="snippyly-comment-tool-container snippyly-menu-trigger ${et({disabled:!(null===(i=this.snippylyUser)||void 0===i?void 0:i.userId)})}">
77
94
  <snippyly-comment-tool class="custom-tool">
78
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="btn comment-btn">
79
- <path d="M1.944 16.75L3.64 13.992L3.927 13.527L3.69 13.034C3.225 12.083 2.993 11.124 3 10C3 6.134 6.134 3 10 3C13.866 3 17 6.134 17 10C17 13.866 13.866 17 10 17C8.86 17.007 7.888 16.768 6.926 16.291L6.658 16.16L6.362 16.197L1.944 16.749V16.75ZM6.487 17.19C7.547 17.708 8.74 18 10 18C14.418 18 18 14.418 18 10C18 5.582 14.418 2 10 2C5.582 2 2 5.582 2 10C2 11.243 2.283 12.419 2.789 13.468L0.672 16.908L0 18L1.272 17.841L6.487 17.189V17.19Z" fill="#5B5B5B"/>
95
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
96
+ <path
97
+ d="M1.944 16.75L3.64 13.992L3.927 13.527L3.69 13.034C3.225 12.083 2.993 11.124 3 10C3 6.134 6.134 3 10 3C13.866 3 17 6.134 17 10C17 13.866 13.866 17 10 17C8.86 17.007 7.888 16.768 6.926 16.291L6.658 16.16L6.362 16.197L1.944 16.749V16.75ZM6.487 17.19C7.547 17.708 8.74 18 10 18C14.418 18 18 14.418 18 10C18 5.582 14.418 2 10 2C5.582 2 2 5.582 2 10C2 11.243 2.283 12.419 2.789 13.468L0.672 16.908L0 18L1.272 17.841L6.487 17.189V17.19Z"
98
+ fill="#5B5B5B" />
80
99
  </svg>
81
100
  </snippyly-comment-tool>
101
+ <div class="snippyly-menu snippyly-tooltip">
102
+ <div class="menu-item">${(null===(e=this.snippylyUser)||void 0===e?void 0:e.userId)?"Add comments":"Sign in to add comments"}</div>
103
+ </div>
82
104
  </div>
83
- ${(null===(i=this.comments)||void 0===i?void 0:i.length)?A`
84
- <div class="comments-counter" @click=${()=>this.toggleCommentSidebar()}>
85
- ${null===(s=this.comments)||void 0===s?void 0:s.length} ${1===(null===(e=this.comments)||void 0===e?void 0:e.length)?"Comment":"Comments"}
105
+ ${(null===(s=this.comments)||void 0===s?void 0:s.length)?A`
106
+ <div class="snippyly-comments-container snippyly-menu-trigger">
107
+ <div class="comment-counter" @click=${()=>this.toggleCommentSidebar()}>
108
+ ${null===(n=this.comments)||void 0===n?void 0:n.length} ${1===(null===(o=this.comments)||void 0===o?void 0:o.length)?"Comment":"Comments"}
109
+ </div>
110
+ <div class="snippyly-menu snippyly-tooltip">
111
+ <div class="menu-item">Toggle Sidebar</div>
112
+ </div>
86
113
  </div>
87
114
  `:null}
88
115
  <div class="spacer"></div>
89
- <snippyly-presence max-users="4"></snippyly-presence>
90
- ${(null===(n=this.snippylyUser)||void 0===n?void 0:n.userId)?A`
91
- <div class="snippyly-btn-container snippyly-menu-trigger">
92
- <button class="btn primary-btn share-btn" @click=${()=>this.copyLink()}>
93
- Share
94
- </button>
95
- <div class="snippyly-menu">
96
- <div class="menu-item">${this.copyLinkTooltip}</div>
116
+ <div class="snippyly-presence-container snippyly-menu-trigger">
117
+ <snippyly-presence max-users="4"></snippyly-presence>
118
+ </div>
119
+ ${(null===(r=this.snippylyUser)||void 0===r?void 0:r.userId)?A`
120
+ <div class="snippyly-share-container snippyly-menu-trigger" @click=${()=>this.copyLink()}>
121
+ <button class="snippyly-btn snippyly-primary-btn signin-btn">
122
+ Share
123
+ </button>
124
+ <div class="snippyly-menu snippyly-tooltip">
125
+ <div class="menu-item">${this.copyLinkTooltip}</div>
126
+ </div>
127
+ </div>
128
+ `:null}
129
+ ${(null===(l=this.snippylyUser)||void 0===l?void 0:l.userId)?null:A`
130
+ <div class="snippyly-signin-container snippyly-menu-trigger">
131
+ <button class="snippyly-btn snippyly-primary-btn signin-btn" @click=${()=>this.loginWithGoogle()}>
132
+ Sign in
133
+ </button>
97
134
  </div>
98
- </div>
99
- <div class="snippyly-btn-container snippyly-menu-trigger profile-img-container ${st({opened:"userMenu"===this.menuOpenedId})}" id="userMenu" @click=${()=>this.toggleMenu("userMenu")}>
100
- <img src=${null===(o=this.snippylyUser)||void 0===o?void 0:o.photoUrl} class="profile-img" />
101
- <div class="snippyly-menu">
102
- <div class="menu-item" @click=${()=>this.signOutUser()}>Sign Out</div>
103
- </div>
104
- </div>
105
- `:A`
106
- <button class="btn primary-btn signin-btn" @click=${()=>this.loginWithGoogle()}>
107
- Sign in
108
- </button>
109
- `}
135
+ `}
136
+ `:null}
137
+
138
+ <div class="snippyly-menu-container snippyly-menu-trigger ${et({opened:"userMenu"===this.menuOpenedId})}" id="userMenu" @click=${t=>this.toggleMenu(t,"userMenu")}>
139
+ ${this.expanded&&(null===(h=this.snippylyUser)||void 0===h?void 0:h.photoUrl)?A`
140
+ <img src=${null===(a=this.snippylyUser)||void 0===a?void 0:a.photoUrl} class="profile-img" referrerpolicy="no-referrer" />
110
141
  `:null}
111
- </div>
112
- `:A``}};ht.styles=((t,...s)=>{const n=1===t.length?t[0]:s.reduce(((i,s,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.")})(s)+t[e+1]),t[0]);return new e(n,i)})`
113
- :host(.visible) {
114
- display: flex;
115
- padding: 16px;
116
- border: 1px solid rgba(0, 0, 0, 0.12);
117
- background: white;
118
- border-radius: 8px;
119
- position: fixed;
120
- bottom: 0px;
121
- right: 0px;
122
- margin: 24px;
123
- height: 72px;
124
- box-sizing: border-box;
125
- align-items: center;
126
- z-index: 999999995;
127
- box-shadow: 0 1rem 3rem #0000002d;
128
- }
129
-
130
- :host(.expanded) {
131
- min-width: 450px;
132
- }
133
-
134
- .snippyly-plugin-container {
135
- display: flex;
136
- align-items: center;
137
- width: 100%;
138
- }
139
-
140
- .snippyly-btn, .comment-tool-btn {
141
- height: 28px;
142
- padding: 8px;
143
- border-radius: 8px;
144
- cursor: pointer;
145
- }
146
-
147
- .snippyly-btn:hover, .comment-tool-btn:not(.disabled):hover, .comments-counter:hover {
148
- background: #f0f0f0;
149
- }
150
-
151
- .snippyly-btn {
152
- display: flex;
153
- align-items: center;
154
- }
155
-
156
- .snippyly-logo {
157
- margin-right: 8px;
158
- }
159
-
160
- .comment-tool-btn, .comment-tool-btn .custom-btn-container {
161
- display: flex;
162
- align-items: center;
163
- }
164
-
165
- .comment-tool-btn.disabled, .comment-tool-btn.disabled .btn {
166
- cursor: not-allowed;
167
- }
168
-
169
- .comment-tool-btn.disabled .comment-btn path {
170
- fill: #979797;
171
- }
172
-
173
- .comments-counter {
174
- border: 1px solid #B6B1B1;
175
- border-radius: 6px;
176
- padding: 8px;
177
- cursor: pointer;
178
- }
179
-
180
- .btn {
181
- cursor: pointer;
182
- }
183
-
184
- .primary-btn {
185
- height: 36px;
186
- background: rgb(24, 160, 251);
187
- border-radius: 6px;
188
- border: 0;
189
- box-shadow: none;
190
- outline: none;
191
- padding: 0 12px;
192
- color: white;
193
- /* margin: 0 12px; */
194
- }
195
-
196
- .profile-img-container {
197
- display: flex;
198
- }
199
-
200
- .profile-img {
201
- width: 36px;
202
- height: 36px;
203
- border-radius: 50px;
204
- cursor: pointer;
205
- /* margin: 0 12px; */
206
- }
207
-
208
- .snippyly-plugin-container > * {
209
- margin: 0 6px;
210
- }
211
-
212
- .snippyly-plugin-container > *:first-child {
213
- margin-left: 0px !important;
214
- }
215
-
216
- .snippyly-plugin-container > *:last-child {
217
- margin-right: 0px !important;
218
- }
219
-
220
- .spacer {
221
- flex: 1 0 auto;
222
- }
223
-
224
- .snippyly-menu-trigger {
225
- position: relative;
226
- }
227
-
228
- .snippyly-menu {
229
- position: absolute;
230
- background: black;
231
- color: white;
232
- top: -64px;
233
- left: 50%;
234
- white-space: nowrap;
235
- /* width: 150px; */
236
- transform: translateX(-50%);
237
- display: none;
238
- border-radius: 4px;
239
- }
240
-
241
- .snippyly-menu:after {
242
- content: '';
243
- position: absolute;
244
- display: block;
245
- width: 0px;
246
- z-index: 1;
247
- border-style: solid;
248
- border-color: rgb(0, 0, 0) transparent;
249
- border-width: 8px 8px 0px;
250
- bottom: -8px;
251
- left: 50%;
252
- transform: translateX(-50%);
253
- }
254
-
255
- .snippyly-menu-trigger:hover .snippyly-menu, .snippyly-menu-trigger.opened .snippyly-menu {
256
- display: block;
257
- }
258
-
259
- :host(.expanded) #snippylyMenu.snippyly-menu-trigger .snippyly-menu:after {
260
- left: 32px;
261
- }
262
-
263
- :host(:not(.expanded)) #snippylyMenu.snippyly-menu-trigger .snippyly-menu {
264
- left: 0px;
265
- }
266
-
267
- :host(.expanded) #snippylyMenu.snippyly-menu-trigger .snippyly-menu {
268
- left: 48px;
269
- }
270
-
271
- #snippylyMenu.snippyly-menu-trigger .snippyly-menu {
272
- top: -94px;
273
- }
274
-
275
- :host(:not(.expanded)) #snippylyMenu.snippyly-menu-trigger .snippyly-menu:after {
276
- left: unset;
277
- right: 24px;
278
- }
279
-
280
- .menu-item {
281
- padding: 8px;
282
- cursor: pointer;
283
- }
284
-
285
- .s-presence-container {
286
- display: inline-flex;
287
- flex-direction: row-reverse;
288
- align-items: center;
289
- }
290
-
291
- .s-presence-avatar {
292
- position: relative;
293
- box-shadow: 0px 0px 0px 3px;
294
- border-radius: 50%;
295
- overflow: hidden;
296
- width: 24px;
297
- height: 24px;
298
- display: flex;
299
- align-items: center;
300
- justify-content: center;
301
- font-size: 12px;
302
- // background-color: white;
303
- }
304
-
305
- .s-presence-avatar.more-users {
306
- background: #4578a7;
307
- box-shadow: 0px 0px 0px 3px #4578a7;
308
- }
309
-
310
- .s-presence-avatar:not(:last-child):not(.more-users) {
311
- margin-left: -6px !important;
312
- }
313
-
314
- .s-presence-avatar-image {
315
- width: 100%;
316
- height: auto;
317
- display: block;
318
- }
319
-
320
- .s-presence-avatar-image-small {
321
- width: 1.6rem;
322
- height: auto;
323
- display: block;
324
- }
325
-
326
- .s-presence-avatar-initial {
327
- color: white;
328
- }
329
-
330
- .away {
331
- filter: grayscale(1);
332
- }
333
- `,lt([Y()],ht.prototype,"loadPlugin",null),lt([Y()],ht.prototype,"comments",void 0),lt([Y()],ht.prototype,"commentElement",void 0),lt([Y()],ht.prototype,"_expanded",void 0),lt([Y()],ht.prototype,"snippylyUser",void 0),lt([Q()],ht.prototype,"apiKey",void 0),lt([Y()],ht.prototype,"staging",void 0),lt([Y()],ht.prototype,"menuOpenedId",void 0),lt([Y()],ht.prototype,"copyLinkTooltip",void 0),ht=lt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],ht);export{ht as SnippylyPlugin};
142
+ <svg width="4" height="14" viewBox="0 0 4 14" fill="none" xmlns="http://www.w3.org/2000/svg"
143
+ class="more-menu-icon">
144
+ <path
145
+ d="M3.5 12C3.5 12.3978 3.34196 12.7794 3.06066 13.0607C2.77936 13.342 2.39782 13.5 2 13.5C1.60218 13.5 1.22064 13.342 0.93934 13.0607C0.658035 12.7794 0.5 12.3978 0.5 12C0.5 11.6022 0.658035 11.2206 0.93934 10.9393C1.22064 10.658 1.60218 10.5 2 10.5C2.39782 10.5 2.77936 10.658 3.06066 10.9393C3.34196 11.2206 3.5 11.6022 3.5 12ZM3.5 7C3.5 7.39782 3.34196 7.77936 3.06066 8.06066C2.77936 8.34196 2.39782 8.5 2 8.5C1.60218 8.5 1.22064 8.34196 0.93934 8.06066C0.658035 7.77936 0.5 7.39782 0.5 7C0.5 6.60218 0.658035 6.22064 0.93934 5.93934C1.22064 5.65804 1.60218 5.5 2 5.5C2.39782 5.5 2.77936 5.65804 3.06066 5.93934C3.34196 6.22064 3.5 6.60218 3.5 7ZM3.5 2C3.5 2.39782 3.34196 2.77936 3.06066 3.06066C2.77936 3.34196 2.39782 3.5 2 3.5C1.60218 3.5 1.22064 3.34196 0.93934 3.06066C0.658035 2.77936 0.5 2.39782 0.5 2C0.5 1.60218 0.658035 1.22064 0.93934 0.93934C1.22064 0.658035 1.60218 0.5 2 0.5C2.39782 0.5 2.77936 0.658035 3.06066 0.93934C3.34196 1.22064 3.5 1.60218 3.5 2Z"
146
+ fill="black" />
147
+ </svg>
148
+ <div class="snippyly-menu">
149
+ <div class="menu-item" @click=${()=>this.toggleSnippylyPluginToolbar()}>${this.expanded?"Hide Toolbar":"Show Toolbar"}</div>
150
+ <div class="menu-item" @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
151
+ ${(null===(d=this.snippylyUser)||void 0===d?void 0:d.userId)?A`
152
+ <div class="menu-item-divider"></div>
153
+ <div class="menu-item" @click=${()=>this.signOutUser()}>Sign out</div>
154
+ `:null}
155
+ </div>
156
+ </div>
157
+ </div>
158
+ `:A``}};ht.styles=((t,...e)=>{const n=1===t.length?t[0]:e.reduce(((i,e,s)=>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.")})(e)+t[s+1]),t[0]);return new s(n,i)})`
159
+
160
+ @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');
161
+
162
+ * {
163
+ font-family: 'Poppins', sans-serif;
164
+ }
165
+
166
+ .snippyly-plugin-container {
167
+ height: 3.5rem;
168
+ background-color: white;
169
+ position: fixed;
170
+ bottom: 0;
171
+ right: 0;
172
+ z-index: 99999999;
173
+ margin: 1.5rem;
174
+ border-radius: 0.5rem;
175
+ border: 1px solid rgba(0, 0, 0, 0.12);
176
+ display: flex;
177
+ box-sizing: border-box;
178
+ align-items: center;
179
+ z-index: 999999995;
180
+ box-shadow: 0 1rem 3rem #0000002d;
181
+ /* overflow: hidden; */
182
+ }
183
+
184
+ .snippyly-plugin-container.expanded {
185
+ min-width: 30rem;
186
+ }
187
+
188
+ .snippyly-plugin-container>* {
189
+ display: flex;
190
+ align-items: center;
191
+ padding: 0 0.5rem;
192
+ height: 100%;
193
+ position: relative;
194
+ }
195
+
196
+ .snippyly-logo-container {
197
+ display: flex;
198
+ align-items: center;
199
+ /* padding: 1rem; */
200
+ height: 100%;
201
+ }
202
+
203
+ .snippyly-plugin-container.expanded .snippyly-logo-container {
204
+ border-right: 1px solid rgba(0, 0, 0, 0.12);
205
+ }
206
+
207
+ .snippyly-logo-container:hover,
208
+ .snippyly-comment-tool-container:hover,
209
+ .snippyly-menu-container:hover {
210
+ background-color: #f5f5f5;
211
+ cursor: pointer;
212
+ }
213
+
214
+ .snippyly-logo-container {
215
+ border-top-left-radius: 0.5rem;
216
+ border-bottom-left-radius: 0.5rem;
217
+ }
218
+
219
+ .snippyly-menu-container {
220
+ border-top-right-radius: 0.5rem;
221
+ border-bottom-right-radius: 0.5rem;
222
+ }
223
+
224
+ .snippyly-plugin-container.expanded .snippyly-logo {
225
+ margin-right: 0.5rem;
226
+ }
227
+
228
+ .snippyly-plugin-container:not(.expanded) .snippyly-logo {
229
+ margin-left: 0.5rem;
230
+ }
231
+
232
+ .snippyly-comment-tool-container {
233
+ padding: 0;
234
+ }
235
+
236
+ snippyly-comment-tool {
237
+ height: 100%;
238
+ padding: 1rem;
239
+ box-sizing: border-box;
240
+ }
241
+
242
+ .snippyly-comments-container {
243
+ padding-left: 0.5rem;
244
+ padding-right: 0.5rem;
245
+ }
246
+
247
+ .comment-counter {
248
+ border: 1px solid rgb(0, 0, 0, 0.25);
249
+ padding: 0.3rem 0.5rem;
250
+ border-radius: 0.5rem;
251
+ font-size: 0.8rem;
252
+ }
253
+
254
+ .comment-counter:hover {
255
+ background-color: #f5f5f5;
256
+ cursor: pointer;
257
+ }
258
+
259
+ .snippyly-btn {
260
+ cursor: pointer;
261
+ padding: 0.3rem 0.5rem;
262
+ font-size: 0.8rem;
263
+ }
264
+
265
+ .snippyly-primary-btn {
266
+ /* height: 36px; */
267
+ background: rgb(24, 160, 251);
268
+ border-radius: 6px;
269
+ border: 0;
270
+ box-shadow: none;
271
+ outline: none;
272
+ /* padding: 0 12px; */
273
+ color: white;
274
+ /* margin: 0 12px; */
275
+ }
276
+
277
+ .snippyly-menu-trigger {
278
+ position: relative;
279
+ }
280
+
281
+ .snippyly-menu-trigger:hover .snippyly-menu, .snippyly-menu-trigger.opened .snippyly-menu {
282
+ display: block;
283
+ }
284
+
285
+ .snippyly-menu {
286
+ position: absolute;
287
+ background: #222222;
288
+ color: white;
289
+ top: 0;
290
+ left: 50%;
291
+ white-space: nowrap;
292
+ transform: translate(-50%, calc(-100% - 1rem));
293
+ display: none;
294
+ border-radius: 4px;
295
+ }
296
+
297
+ .menu-item {
298
+ padding: 0.25rem 0.5rem;
299
+ cursor: pointer;
300
+ font-size: 0.8rem;
301
+ }
302
+
303
+ .menu-item:first-child {
304
+ padding-top: 0.5rem;
305
+ }
306
+
307
+ .menu-item:last-child {
308
+ padding-bottom: 0.5rem;
309
+ }
310
+
311
+ .menu-item-divider {
312
+ background: black;
313
+ height: 1px;
314
+ margin: 0.2rem 0;
315
+ }
316
+
317
+ .snippyly-menu:not(.snippyly-tooltip):after {
318
+ content: '';
319
+ position: absolute;
320
+ display: block;
321
+ width: 0px;
322
+ z-index: 1;
323
+ border-style: solid;
324
+ border-color: #222222 transparent;
325
+ border-width: 8px 8px 0px;
326
+ bottom: -7px;
327
+ left: 50%;
328
+ transform: translateX(-50%);
329
+ }
330
+
331
+ .spacer {
332
+ flex: 1 0 auto;
333
+ }
334
+
335
+ .profile-img {
336
+ width: 1.5rem;
337
+ height: 1.5rem;
338
+ border-radius: 100%;
339
+ }
340
+
341
+ .snippyly-logo-container.snippyly-menu-trigger .snippyly-menu {
342
+ left: 85%;
343
+ }
344
+
345
+ .snippyly-logo-container.snippyly-menu-trigger .snippyly-menu:after {
346
+ left: 30%;
347
+ }
348
+
349
+ .snippyly-menu-container.snippyly-menu-trigger .snippyly-menu {
350
+ left: -50%;
351
+ }
352
+
353
+ .snippyly-plugin-container.expanded.active .snippyly-menu-container.snippyly-menu-trigger .snippyly-menu {
354
+ left: 5%;
355
+ }
356
+
357
+ .snippyly-menu-container.snippyly-menu-trigger .snippyly-menu:after {
358
+ left: 75%;
359
+ }
360
+
361
+ .more-menu-icon {
362
+ margin: 0.5rem;
363
+ }
364
+
365
+ .disabled {
366
+ cursor: not-allowed !important;
367
+ }
368
+
369
+ .arrow-icon {
370
+ transform: rotate(90deg);
371
+ }
372
+
373
+ .snippyly-plugin-container.expanded .arrow-icon {
374
+ transform: rotate(270deg);
375
+ }
376
+
377
+ snippyly-presence {
378
+ display: flex;
379
+ }
380
+
381
+ .s-presence-container {
382
+ display: inline-flex;
383
+ flex-direction: row-reverse;
384
+ align-items: center;
385
+ }
386
+
387
+ .s-presence-avatar {
388
+ position: relative;
389
+ box-shadow: 0px 0px 0px 3px;
390
+ border-radius: 50%;
391
+ overflow: hidden;
392
+ width: 24px;
393
+ height: 24px;
394
+ display: flex;
395
+ align-items: center;
396
+ justify-content: center;
397
+ font-size: 12px;
398
+ // background-color: white;
399
+ }
400
+
401
+ .s-presence-avatar.more-users {
402
+ background: #4578a7;
403
+ box-shadow: 0px 0px 0px 3px #4578a7;
404
+ }
405
+
406
+ .s-presence-avatar:not(:last-child):not(.more-users) {
407
+ margin-left: -6px !important;
408
+ }
409
+
410
+ .s-presence-avatar-image {
411
+ width: 100%;
412
+ height: auto;
413
+ display: block;
414
+ }
415
+
416
+ .s-presence-avatar-image-small {
417
+ width: 1.6rem;
418
+ height: auto;
419
+ display: block;
420
+ }
421
+
422
+ .s-presence-avatar-initial {
423
+ color: white;
424
+ }
425
+
426
+ .away {
427
+ filter: grayscale(1);
428
+ }
429
+ `,lt([Y()],ht.prototype,"loadPlugin",null),lt([Y()],ht.prototype,"comments",void 0),lt([Y()],ht.prototype,"commentElement",void 0),lt([Y()],ht.prototype,"_expanded",void 0),lt([Y()],ht.prototype,"snippylyUser",void 0),lt([Q()],ht.prototype,"apiKey",void 0),lt([Y()],ht.prototype,"staging",void 0),lt([Y()],ht.prototype,"menuOpenedId",void 0),lt([Y()],ht.prototype,"copyLinkTooltip",void 0),ht=lt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:s}=i;return{kind:e,elements:s,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],ht);export{ht as SnippylyPlugin};