@veltdev/sdk-dev 4.5.0-beta.159 → 4.5.0-beta.160

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.
@@ -103,9 +103,8 @@ export declare class AuthRetryConfig {
103
103
  retryCount?: number;
104
104
  retryDelay?: number;
105
105
  }
106
- export declare class VeltAuthProvider {
106
+ export interface VeltAuthProvider {
107
107
  user: User;
108
- options: Options;
108
+ options?: Options;
109
109
  retryConfig?: AuthRetryConfig;
110
- constructor(user: User, options: Options, retryConfig?: AuthRetryConfig);
111
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-dev",
3
- "version": "4.5.0-beta.159",
3
+ "version": "4.5.0-beta.160",
4
4
  "description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
5
5
  "homepage": "https://velt.dev",
6
6
  "keywords": [
package/velt.js CHANGED
@@ -1,4 +1,4 @@
1
- var SNIPPYLY_VERSION = '4.5.0-beta.159';
1
+ var SNIPPYLY_VERSION = '4.5.0-beta.160';
2
2
  (function(m,w){"use strict";function rt(){var e=K.splice(0,K.length);for(ie=0;e.length;)e.shift().call(null,e.shift())}function me(e,t){for(var n=0,r=e.length;n<r;n++)Te(e[n],t)}function ot(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],U(t,q[pe(t)])}function fe(e){return function(t){Lt(t)&&(Te(t,e),L.length&&me(t.querySelectorAll(L),e))}}function pe(e){var t=le.call(e,"is"),n=e.nodeName.toUpperCase(),r=v.call(D,t?Y+t.toUpperCase():x+n);return t&&-1<r&&!De(n,t)?-1:r}function De(e,t){return-1<L.indexOf(e+'[is="'+t+'"]')}function Ie(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[W]||2,a=e[He]||3;!ce||o&&o!==t||!t[y]||r==="style"||e.prevValue===e.newValue&&(e.newValue!==""||n!==l&&n!==a)||t[y](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function Fe(e){var t=fe(e);return function(n){K.push(t,n.target),ie&&clearTimeout(ie),ie=setTimeout(rt,1)}}function de(e){nt&&(nt=!1,e.currentTarget.removeEventListener(Ze,de)),L.length&&me((e.target||u).querySelectorAll(L),e.detail===E?E:b),R&&at()}function lt(e,t){var n=this;Ye.call(n,e,t),Me.call(n,{target:n})}function Se(e,t,n){var r=t.apply(e,n),o=pe(r);return-1<o&&U(r,q[o]),n.pop()&&L.length&&ot(r.querySelectorAll(L)),r}function he(e,t){Tt(e,t),$?$.observe(e,gt):(ue&&(e.setAttribute=lt,e[H]=Ee(e),e[g](st,Me)),e[g](N,Ie)),e[k]&&ce&&(e.created=!0,e[k](),e.created=!1)}function at(){for(var e,t=0,n=G.length;t<n;t++)e=G[t],V.contains(e)||(n--,G.splice(t--,1),Te(e,E))}function Ve(e){throw new Error("A "+e+" type is already registered")}function Te(e,t){var n,r,o=pe(e);-1<o&&!Mt.call(e,"TEMPLATE")&&(Q(e,q[o]),o=0,t!==b||e[b]?t!==E||e[E]||(e[b]=!1,e[E]=!0,r="disconnected",o=1):(e[E]=!1,e[b]=!0,r="connected",o=1,R&&v.call(G,e)<0&&G.push(e)),o&&(n=e[t+O]||e[r+O])&&n.call(e))}function z(){}function Pe(e,t,n){var r=n&&n[_]||"",o=t.prototype,l=Ce(o),a=t.observedAttributes||ye,s={prototype:l};oe(l,k,{value:function(){if(te)te=!1;else if(!this[B]){this[B]=!0,new t(this),o[k]&&o[k].call(this);var i=j[ne.get(t)];(!Z||i.create.length>1)&&_e(this)}}}),oe(l,y,{value:function(i){-1<v.call(a,i)&&o[y]&&o[y].apply(this,arguments)}}),o[qe]&&oe(l,ut,{value:o[qe]}),o[Be]&&oe(l,ct,{value:o[Be]}),r&&(s[_]=r),e=e.toUpperCase(),j[e]={constructor:t,create:r?[r,re(e)]:[e]},ne.set(t,e),u[S](e.toLowerCase(),s),Le(e),P[e].r()}function Re(e){var t=j[e.toUpperCase()];return t&&t.constructor}function Ue(e){return typeof e=="string"?e:e&&e.is||""}function _e(e){for(var t,n=e[y],r=n?e.attributes:ye,o=r.length;o--;)t=r[o],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function Le(e){return e=e.toUpperCase(),e in P||(P[e]={},P[e].p=new Xe(function(t){P[e].r=t})),P[e].p}function ke(){C&&delete m.customElements,I(m,"customElements",{configurable:!0,value:new z}),I(m,"CustomElementRegistry",{configurable:!0,value:z});for(var e=it.get(/^HTML[A-Z]*[a-z]/),t=e.length;t--;function(n){var r=m[n];if(r){m[n]=function(o){var l,a;return o||(o=this),o[B]||(te=!0,l=j[ne.get(o.constructor)],a=Z&&l.create.length===1,o=a?Reflect.construct(r,ye,l.constructor):u.createElement.apply(u,l.create),o[B]=!0,te=!1,a||_e(o)),o},m[n].prototype=r.prototype;try{r.prototype.constructor=m[n]}catch{dt=!0,I(r,B,{value:m[n]})}}}(e[t]));u.createElement=function(n,r){var o=Ue(r);return o?Ae.call(this,n,re(o)):Ae.call(this,n)},et||(Oe=!0,u[S](""))}var u=m.document,T=m.Object,it=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(p){var f,h=[];for(f in i)p.test(f)&&h.push(f);return h},s=function(p,f){(f=f.toLowerCase())in i||(i[p]=(i[p]||[]).concat(f),i[f]=i[f.toUpperCase()]=p)},i=(T.create||T)(null),c={};for(n in e)for(o in e[n])for(r=e[n][o],i[o]=r,t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return c.get=function(p){return typeof p=="string"?i[p]||(l.test(p)?[]:""):a(p)},c.set=function(p,f){return l.test(p)?s(p,f):s(f,p),c},c}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});typeof w!="object"&&(w={type:w||"auto"});var K,Me,X,Ee,$,ve,Q,U,A,S="registerElement",xe=1e5*m.Math.random()>>0,H="__"+S+xe,g="addEventListener",b="attached",O="Callback",E="detached",_="extends",y="attributeChanged"+O,ut=b+O,qe="connected"+O,Be="disconnected"+O,k="created"+O,ct=E+O,W="ADDITION",He="REMOVAL",N="DOMAttrModified",Ze="DOMContentLoaded",st="DOMSubtreeModified",x="<",Y="=",mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ft=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],D=[],q=[],L="",V=u.documentElement,v=D.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ge=T.prototype,be=ge.hasOwnProperty,J=ge.isPrototypeOf,I=T.defineProperty,ye=[],ee=T.getOwnPropertyDescriptor,je=T.getOwnPropertyNames,pt=T.getPrototypeOf,Ge=T.setPrototypeOf,ze=!!T.__proto__,dt=!1,B="__dreCEv1",C=m.customElements,Z=!/^force/.test(w.type)&&!!(C&&C.define&&C.get&&C.whenDefined),Ke=T.create||T,ht=m.Map||function(){var e,t=[],n=[];return{get:function(r){return n[v.call(t,r)]},set:function(r,o){e=v.call(t,r),e<0?n[t.push(r)-1]=o:n[e]=o}}},Xe=m.Promise||function(e){function t(l){for(r=!0;n.length;)n.shift()(l)}var n=[],r=!1,o={catch:function(){return o},then:function(l){return n.push(l),r&&setTimeout(t,1),o}};return e(t),o},te=!1,j=Ke(null),P=Ke(null),ne=new ht,re=function(e){return e.toLowerCase()},Ce=T.create||function e(t){return t?(e.prototype=t,new e):this},Tt=Ge||(ze?function(e,t){return e.__proto__=t,e}:je&&ee?function(){function e(t,n){for(var r,o=je(n),l=0,a=o.length;l<a;l++)r=o[l],be.call(t,r)||I(t,r,ee(n,r))}return function(t,n){do e(t,n);while((n=pt(n))&&!J.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),F=m.MutationObserver||m.WebKitMutationObserver,$e=m.HTMLAnchorElement,d=(m.HTMLElement||m.Element||m.Node).prototype,R=!J.call(d,V),oe=R?function(e,t,n){return e[t]=n.value,e}:I,Lt=R?function(e){return e.nodeType===1}:function(e){return J.call(d,e)},G=R&&[],Qe=d.attachShadow,We=d.cloneNode,Mt=d.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},we=d.dispatchEvent,le=d.getAttribute,Et=d.hasAttribute,vt=d.removeAttribute,Ye=d.setAttribute,ae=u.createElement,Ht=u.importNode,Ae=ae,gt=F&&{attributes:!0,characterData:!0,attributeOldValue:!0},Je=F||function(e){ue=!1,V.removeEventListener(N,Je)},ie=0,et=S in u&&!/^force-all/.test(w.type),tt=!0,Oe=!1,ue=!0,nt=!0,ce=!0;if(F&&(A=u.createElement("div"),A.innerHTML="<div><div></div></div>",new F(function(e,t){if(e[0]&&e[0].type=="childList"&&!e[0].removedNodes[0].childNodes.length){A=ee(d,"innerHTML");var n=A&&A.set;n&&I(d,"innerHTML",{set:function(r){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,r)}})}t.disconnect(),A=null}).observe(A,{childList:!0,subtree:!0}),A.innerHTML=""),et||(Ge||ze?(Q=function(e,t){J.call(t,e)||he(e,t)},U=he):(Q=function(e,t){e[H]||(e[H]=T(!0),he(e,t))},U=Q),R?(ue=!1,function(){var e=ee(d,g),t=e.value,n=function(l){var a=new CustomEvent(N,{bubbles:!0});a.attrName=l,a.prevValue=le.call(this,l),a.newValue=null,a[He]=a.attrChange=2,vt.call(this,l),we.call(this,a)},r=function(l,a){var s=Et.call(this,l),i=s&&le.call(this,l),c=new CustomEvent(N,{bubbles:!0});Ye.call(this,l,a),c.attrName=l,c.prevValue=s?i:null,c.newValue=a,s?c.MODIFICATION=c.attrChange=1:c[W]=c.attrChange=0,we.call(this,c)},o=function(l){var a,s=l.currentTarget,i=s[H],c=l.propertyName;i.hasOwnProperty(c)&&(i=i[c],a=new CustomEvent(N,{bubbles:!0}),a.attrName=i.name,a.prevValue=i.value||null,a.newValue=i.value=s[c]||null,a.prevValue==null?a[W]=a.attrChange=0:a.MODIFICATION=a.attrChange=1,we.call(s,a))};e.value=function(l,a,s){l===N&&this[y]&&this.setAttribute!==r&&(this[H]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",o)),t.call(this,l,a,s)},I(d,g,e)}()):F||(V[g](N,Je),V.setAttribute(H,1),V.removeAttribute(H),ue&&(Me=function(e){var t,n,r,o=this;if(o===e.target){t=o[H],o[H]=n=Ee(o);for(r in n){if(!(r in t))return X(0,o,r,t[r],n[r],W);if(n[r]!==t[r])return X(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return X(2,o,r,t[r],n[r],He)}},X=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,Ie(a)},Ee=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)t=o[l],(n=t.name)!=="setAttribute"&&(r[n]=t.value);return r})),u[S]=function(e,t){if(n=e.toUpperCase(),tt&&(tt=!1,F?($=function(i,c){function p(f,h){for(var M=0,se=f.length;M<se;h(f[M++]));}return new F(function(f){for(var h,M,se,Ne=0,bt=f.length;Ne<bt;Ne++)h=f[Ne],h.type==="childList"?(p(h.addedNodes,i),p(h.removedNodes,c)):(M=h.target,ce&&M[y]&&h.attributeName!=="style"&&(se=le.call(M,h.attributeName))!==h.oldValue&&M[y](h.attributeName,h.oldValue,se))})}(fe(b),fe(E)),ve=function(i){return $.observe(i,{childList:!0,subtree:!0}),i},ve(u),Qe&&(d.attachShadow=function(){return ve(Qe.apply(this,arguments))})):(K=[],u[g]("DOMNodeInserted",Fe(b)),u[g]("DOMNodeRemoved",Fe(E))),u[g](Ze,de),u[g]("readystatechange",de),u.importNode=function(i,c){switch(i.nodeType){case 1:return Se(u,Ht,[i,!!c]);case 11:for(var p=u.createDocumentFragment(),f=i.childNodes,h=f.length,M=0;M<h;M++)p.appendChild(u.importNode(f[M],!!c));return p;default:return We.call(i,!!c)}},d.cloneNode=function(i){return Se(this,We,[!!i])}),Oe)return Oe=!1;if(-2<v.call(D,Y+n)+v.call(D,x+n)&&Ve(e),!mt.test(n)||-1<v.call(ft,n))throw new Error("The type "+e+" is invalid");var n,r,o=function(){return a?u.createElement(s,n):u.createElement(s)},l=t||ge,a=be.call(l,_),s=a?t[_].toUpperCase():n;return a&&-1<v.call(D,x+s)&&Ve(s),r=D.push((a?Y:x)+n)-1,L=L.concat(L.length?",":"",a?s+'[is="'+e.toLowerCase()+'"]':s),o.prototype=q[r]=be.call(l,"prototype")?l.prototype:Ce(d),L.length&&me(u.querySelectorAll(L),b),o},u.createElement=Ae=function(e,t){var n=Ue(t),r=n?ae.call(u,e,re(n)):ae.call(u,e),o=""+e,l=v.call(D,(n?Y:x)+(n||o).toUpperCase()),a=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=De(o.toUpperCase(),n))),ce=!u.createElement.innerHTMLHelper,a&&U(r,q[l]),r}),addEventListener("beforeunload",function(){delete u.createElement,delete u.importNode,delete u[S]},!1),z.prototype={constructor:z,define:Z?function(e,t,n){if(n)Pe(e,t,n);else{var r=e.toUpperCase();j[r]={constructor:t,create:[r]},ne.set(t,r),C.define(e,t)}}:Pe,get:Z?function(e){return C.get(e)||Re(e)}:Re,whenDefined:Z?function(e){return Xe.race([C.whenDefined(e),Le(e)])}:Le},!C||/^force/.test(w.type))ke();else if(!w.noBuiltIn)try{(function(e,t,n){var r=new RegExp(`^<a\\s+is=('|")`+n+"\\1></a>$");if(t[_]="a",e.prototype=Ce($e.prototype),e.prototype.constructor=e,m.customElements.define(n,e,t),!r.test(u.createElement("a",{is:n}).outerHTML)||!r.test(new e().outerHTML))throw t})(function e(){return Reflect.construct($e,[],e)},{},"document-register-element-a"+xe)}catch{ke()}if(!w.noBuiltIn)try{if(ae.call(u,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{re=function(t){return{is:t.toLowerCase()}}}})(window);
3
3
 
4
4
  var u_e=Object.create;var pO=Object.defineProperty,h_e=Object.defineProperties,f_e=Object.getOwnPropertyDescriptor,v_e=Object.getOwnPropertyDescriptors,C_e=Object.getOwnPropertyNames,mO=Object.getOwnPropertySymbols,CW=Object.getPrototypeOf,b7=Object.prototype.hasOwnProperty,_W=Object.prototype.propertyIsEnumerable,__e=Reflect.get;var vW=(i,o,n)=>o in i?pO(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,I=(i,o)=>{for(var n in o||={})b7.call(o,n)&&vW(i,n,o[n]);if(mO)for(var n of mO(o))_W.call(o,n)&&vW(i,n,o[n]);return i},T=(i,o)=>h_e(i,v_e(o));var I7=(i,o)=>{var n={};for(var e in i)b7.call(i,e)&&o.indexOf(e)<0&&(n[e]=i[e]);if(i!=null&&mO)for(var e of mO(i))o.indexOf(e)<0&&_W.call(i,e)&&(n[e]=i[e]);return n};var y_e=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),gO=(i,o)=>{for(var n in o)pO(i,n,{get:o[n],enumerable:!0})},S_e=(i,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of C_e(o))!b7.call(i,t)&&t!==n&&pO(i,t,{get:()=>o[t],enumerable:!(e=f_e(o,t))||e.enumerable});return i};var yW=(i,o,n)=>(n=i!=null?u_e(CW(i)):{},S_e(o||!i||!i.__esModule?pO(n,"default",{value:i,enumerable:!0}):n,i));var qm=(i,o,n)=>__e(CW(i),n,o);var Q=(i,o,n)=>new Promise((e,t)=>{var r=d=>{try{s(n.next(d))}catch(p){t(p)}},a=d=>{try{s(n.throw(d))}catch(p){t(p)}},s=d=>d.done?e(d.value):Promise.resolve(d.value).then(r,a);s((n=n.apply(i,o)).next())});var FG=y_e((Uho,NG)=>{"use strict";var _t={};_t.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};_t.localCName=_t.generateIdentifier();_t.splitLines=function(i){return i.trim().split(`
@@ -167,7 +167,7 @@ Content-Type: `+p.contentType+`\r
167
167
  />
168
168
  </svg>
169
169
  `},gt.CommentAnnotationPriorityMap={P0:{id:"P0",name:"P0",color:"var(--velt-error, #FF7162)",lightColor:"var(--velt-error-light, #F7E7E7) "},P1:{id:"P1",name:"P1",color:"var(--velt-warning, #ECB000)",lightColor:"var(--velt-warning-light, #FEFCEA)"},P2:{id:"P2",name:"P2",color:"var(--velt-text-7, #777E91)",lightColor:"var(--velt-background-1, #F3F3F5)"}},gt.WorkspaceRoles=[{id:uo.COMMENTER?.toLowerCase(),name:uo.COMMENTER,description:"Can comment on this project",permissions:[]},{id:uo.ADMIN?.toLowerCase(),name:uo.ADMIN,description:"Can comment on all projects and has access to the portal",permissions:[]}],gt.DocumentAccessTypeMap={[Ci.PUBLIC]:{id:Ci.PUBLIC,name:Ci.PUBLIC,description:"Anyone with link can view"},[Ci.RESTRICTED]:{id:Ci.RESTRICTED,name:Ci.RESTRICTED,description:"Only people with access can view"}},gt.DocumentAccessTypeMapSF={[Ci.PUBLIC]:{id:Ci.PUBLIC,name:Ci.PUBLIC,description:"Anyone with the link can comment after logging in."},[Ci.RESTRICTED]:{id:Ci.RESTRICTED,name:Ci.RESTRICTED,description:"Only people added to this project can comment."}},gt.CommentCategoryMap={bug:{id:"bug",name:"Bug",color:"#FF7162"},feedback:{id:"feedback",name:"Feedback",color:"#00C48C"},question:{id:"question",name:"Question",color:"#FFD166"}},gt.OVERLAY_POSITIONS=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"}],gt.OVERLAY_POSITIONS_FOR_POPOVER_MODE=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top"},{originX:"end",originY:"center",overlayX:"start",overlayY:"center"},{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"start",originY:"top",overlayX:"end",overlayY:"top"},{originX:"start",originY:"center",overlayX:"end",overlayY:"center"},{originX:"start",originY:"bottom",overlayX:"end",overlayY:"bottom"}],gt.VIDEO_EDITOR={ZOOM_IN_DURATION:500,ZOOM_OUT_DURATION:500,DEFAULT_ZOOM_FACTOR:1.5,MAX_ZOOM_FACTOR:3,ZOOM_FACTOR_OPTIONS:[{value:2,label:"2x"},{value:1.7,label:"1.7x"},{value:1.5,label:"1.5x"},{value:1.2,label:"1.2x"}],MIN_DRAG_AREA_MULTIPLIER:.015,PREFERRED_SECTION_DURATION_MULTIPLIER:.15,SELECTION_MIN_DRAG_DISTANCE:2,MIN_DURATION_THRESHOLD:.01,TIME_BUFFER:.1,SHORT_VIDEO_THRESHOLD:3,SMALL_VIDEO_THRESHOLD:5,MILLISECOND_PRECISION_MULTIPLIER:1e3,TENTH_SECOND_PRECISION_MULTIPLIER:10,DEBOUNCE_DELAY:200,DECIMAL_PRECISION:2,MAX_MARKER_COUNT:10,MARKER_INTERVAL:5,FAST_TIMEOUT:50,STANDARD_TIMEOUT:100,RECTANGLE_POSITIONING:{FULL_PERCENT:100,HALF_PERCENT:50,QUARTER_PERCENT:25},EASING:{QUAD_IN_OUT_MULTIPLIER:2,QUAD_IN_OUT_POWER:2,HALF_THRESHOLD:.5},PERCENTAGE:{HALF:50,FULL:100},MILLISECONDS_TO_SECONDS:1e3};var j=gt;var fn=(i,o=0)=>{try{let n=3735928559^o,e=1103547991^o;for(let t=0,r;t<i.length;t++)r=i.charCodeAt(t),n=Math.imul(n^r,2654435761),e=Math.imul(e^r,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=Math.imul(e^e>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&e)+(n>>>0)}catch(n){return mt.catch("Error in cyrb53: ",n),0}},Rke=()=>{try{return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}catch(i){return mt.catch("Error in uuidv4: ",i),""}},yt=i=>{try{return Ra.hashStr(i)}catch(o){return mt.catch("Error in hashStr: ",o),i}},Ec=i=>fn(i).toString(),fj=i=>yt(i),xc=i=>yt(i).toString(),zo=i=>yt(i).toString(),xd=i=>{try{if(i)return typeof i=="string"?Ra.hashStr(i):Array.isArray(i)?Ra.hashStr(i.join("-")):"";{let o=Rke();return Ra.hashStr(o)}}catch(o){return mt.catch("Error in getMultiThreadAnnotationId: ",o),""}},no=(i,o,n)=>{try{if(i&&o){if(i.featureAllowList&&i.featureAllowList.length&&!i.featureAllowList.includes(n)||i.userIdAllowList&&i.userIdAllowList.length&&!i.userIdAllowList.includes(o.userId)||i.userGroupIdAllowList&&i.userGroupIdAllowList.length&&!i.userGroupIdAllowList.includes(o.groupId||"")||i.userPlanAllowList&&i.userPlanAllowList.length&&!i.userPlanAllowList.includes(o.plan||""))return!1;if(i.urlAllowList){let e=window.location.href;if(i.urlAllowList.length&&!i.urlAllowList.filter(t=>e.includes(t)).length)return!1}return!0}return!1}catch(e){return mt.catch("Error in isFeatureAllowed: ",e),!1}},vn=()=>{try{let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o="";for(let n=0;n<20;n++)o+=i.charAt(Math.floor(Math.random()*i.length));return o}catch(i){return mt.catch("Error in utils generateId: ",i),""}},Bp=i=>{try{let o=0;if(i){let n=new Date().getTime();o=Math.abs(n-i)}return o}catch(o){return mt.catch("Error in utils getFirebaseTimeDiffInMins: ",o),0}};var Lre=()=>{try{return ni.debugMode||!!sessionStorage.getItem("debugMode")||!!sessionStorage.getItem("forceDebugMode")}catch(i){return mt.catch("Error in showLogs: ",i),!1}},Go=i=>{try{return typeof i!="object"?Object.assign({},...Object.keys(i).sort().map(o=>({[o]:i[o]&&typeof i[o]=="object"?Go(i[o]):i[o]}))):i}catch(o){return mt.catch("Error in sortObjectByKeys: ",o),i}},hj=i=>{try{return i!==null&&typeof i=="object"&&!Array.isArray(i)}catch{return!1}},Ic=i=>{try{return hj(i)?Object.fromEntries(Object.entries(i).sort(([o],[n])=>o.localeCompare(n)).map(([o,n])=>[o,hj(n)?Ic(n):Array.isArray(n)?n.map(e=>hj(e)?Ic(e):e):n])):i}catch{return i}},PP=(i,o)=>{try{return typeof o!="object"||o===null?i===o:typeof i!="object"||i===null?!1:Array.isArray(o)?Array.isArray(i)?o.every(n=>i.some(e=>PP(e,n))):!1:Object.keys(o).every(n=>Object.prototype.hasOwnProperty.call(i,n)?PP(i[n],o[n]):!1)}catch{return!1}},vj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield Fke(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new TextEncoder().encode(i),a=yield window.crypto.subtle.encrypt({name:"AES-CBC",iv:t},e,r);return btoa(String.fromCharCode(...new Uint8Array(a)))}catch(e){return mt.catch("Error in encrypt: ",e),i}}),Cj=(i,o,n)=>Q(void 0,null,function*(){try{let e=yield Nke(o),t=new Uint8Array(new TextEncoder().encode(n)).slice(0,16),r=new Uint8Array(atob(i).split("").map(s=>s.charCodeAt(0))),a=yield window.crypto.subtle.decrypt({name:"AES-CBC",iv:t},e,r);return new TextDecoder().decode(a)}catch(e){return mt.catch("Error in decrypt: ",e),i}}),Nke=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["decrypt"])}catch(o){throw mt.catch("Error in importDecryptKey:",o),o}}),Vp=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o;return yield vj(JSON.stringify(i),n,yt(n))}catch(n){return mt.catch("Error in encryptData: ",n),i}}),Bre=(i,o)=>Q(void 0,null,function*(){try{let n="Velt"+o,e=yield Cj(i,n,yt(n));return JSON.parse(e)}catch(n){return mt.catch("Error in decryptData: ",n),null}}),RP=i=>{try{switch(i?.region){case"asiaSouthEast1":return"asiaSouthEast1";case"asiaNorthEast1":return"asiaNorthEast1";case"europeWest1":return"europeWest1";default:return"usCentral1"}}catch(o){return mt.catch("Error in getRegion: ",o),"usCentral1"}},Fke=i=>Q(void 0,null,function*(){try{let o=new TextEncoder().encode(i),n=new Uint8Array(32);return n.fill(0),n.set(o.slice(0,32)),yield window.crypto.subtle.importKey("raw",n,"AES-CBC",!1,["encrypt"])}catch(o){throw mt.catch("Error in importKey:",o),o}}),Vre=i=>{try{if(i&&typeof i=="object"){let o=Go(i);return fn(JSON.stringify(o))}else return null}catch(o){return mt.catch("Error in utils generateLocationId: ",o),null}},qi=(i,o=[])=>(i?.tagName?.toLowerCase().indexOf("velt-")>=0&&![j.TAGS.VELT_VIDEO_PLAYER.toLowerCase()].includes(i?.tagName?.toLowerCase())||i?.tagName?.toLowerCase().indexOf("snippyly-")>=0||i?.className?.split&&(i?.className?.split(" ")?.indexOf("snippyly-overlay-panel")>=0||i?.className?.split(" ")?.indexOf("cdk-overlay-container")>=0))&&!o?.includes(i?.tagName?.toLowerCase())?!0:i?.parentNode&&qi(i?.parentNode,o),To=i=>{try{return!!document?.body?.contains(i)}catch(o){return mt.catch("Error in utils isElementInsideBody: ",o),!1}};var Hi=(i,o)=>{try{return Object.prototype.toString.call(i)===Object.prototype.toString.call(o)?Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"?Object.keys(i).length!==Object.keys(o).length?!1:Object.keys(i).every(n=>Hi(i[n],o[n])):i===o:!1}catch(n){return mt.catch("Error in utils deepCompare: ",n),!1}},yv=(i,o,n=1)=>{try{if(o){let e=Lke(o.textContent,i,n);if(e>=0){let t=(o?.ownerDocument).createNodeIterator(o,NodeFilter.SHOW_TEXT),r,a=[];for(;r=t.nextNode();)a.push(r);let s=[],d=e,p=i.length,u=d+p,C=0;for(let E=0;E<a.length;E++){let D=a[E],L=C;if(C+=D.textContent?.length,C>=d&&!s.length?s.push({textNode:D,startOffset:d-L}):C>=d&&C<u&&s.push({textNode:D}),C>=u){if(s.length===1&&s[0].textNode===D){s.push({textNode:D,endOffset:d-L+i.length});break}let G=p;s.forEach(Y=>{G-=Y.textNode.textContent?.length-(Y.startOffset||0)}),s.push({textNode:D,endOffset:G});break}}return s}}return[]}catch(e){return mt.catch("Error in utils calculateNodes: ",e),[]}},Lke=(i,o,n=1)=>{try{if(i?.includes(o)){let e=i.split(o,n);return e.length===n?e.join(o).length:-1}else return-1}catch(e){return mt.catch("Error in utils getTextPosition: ",e),-1}},qu=(i,o,n,e,t)=>{try{let r=new Range;r.setStart(i,o),r.setEnd(n,e);let a=r.toString(),s=0;if(i.nodeType===Node.TEXT_NODE){let d=i,p="";if(d)for(;d=d.previousSibling;)p=(d.textContent||"")+p;if(p){let u=new RegExp(Ed(t),"g");s=(p.match(u)||[]).length}}if(a){let d=new RegExp(Ed(t),"g");return(a.match(d)||[]).length+s}else return s}catch(r){return mt.catch("Error in utils getSelectedTextOccurrenceInRange: ",r),0}},Ed=i=>{try{return i&&typeof i=="string"?i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):i}catch(o){return mt.catch("Error in utils escapeRegExp: ",o),i}},Sv=i=>{try{return i==null?null:i.scrollHeight>i.clientHeight?i:Sv(i?.parentNode)}catch(o){return mt.catch("Error in utils getScrollableParent: ",o),null}},Lp=i=>{try{return i==null?[]:i.scrollHeight>i.clientHeight?[i,...Lp(i?.parentNode)]:Lp(i?.parentNode)}catch(o){return mt.catch("Error in utils getScrollableParents: ",o),[]}},_j=(i,o)=>{try{if(i&&o){let n=i.getBoundingClientRect(),e=o.getBoundingClientRect(),t=n.top-e.top+(o.tagName?.toLowerCase()==="html"?0:o.scrollTop),r=n.left-e.left;return{top:t,left:r}}else return null}catch(n){return mt.catch("Error in utils getRelativeTopLeftPosition: ",n),null}},bv=(i,o)=>`${fn(i+"_"+o)}`,xi=()=>{try{let i=new to;return i.url=window.location.href,i.path=window.location.pathname,i.queryParams=window.location.search,i.baseUrl=window.location.origin,i.title=document.title,i}catch(i){mt.catch("Error in utils getPageInfo: ",i);return}},km=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED)?!0:km(i?.parentElement):!1}catch(o){return mt.catch("Error in utils isCommentDisabledOnElement: ",o),!1}},NP=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_TAG_DISABLED)?!0:NP(i?.parentElement):!1}catch(o){return mt.catch("Error in utils isTagDisabledOnElement: ",o),!1}},FP=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_ARROW_DISABLED)?!0:FP(i?.parentElement):!1}catch(o){return mt.catch("Error in utils isArrowDisabledOnElement: ",o),!1}},LP=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_AREA_DISABLED)?!0:LP(i?.parentElement):!1}catch(o){return mt.catch("Error in utils isAreaDisabledOnElement: ",o),!1}},BP=i=>{try{return i?i?.hasAttribute&&i?.hasAttribute(j.ATTRIBUTES.VELT_RECORDER_DISABLED)?!0:BP(i?.parentElement):!1}catch(o){return mt.catch("Error in utils isRecorderDisabledOnElement: ",o),!1}};var fa=()=>{try{return window?.Snippyly?.version}catch(i){return mt.catch("Error in utils getSdkVersion: ",i),null}},yj=i=>{try{return Object.fromEntries(Object.entries(i).filter(([o,n])=>n!==void 0))}catch(o){return mt.catch("Error in utils removeUndefinedKeys: ",o),i}},VP=i=>{try{let o=new URL(i);return Object.values(j.URL_PARAMS).forEach(n=>{o.searchParams.delete(n)}),o.href}catch(o){return mt.catch("Error in utils excludeSnippylyParamsFromUrl: ",o),i}},xs=i=>{try{navigator.clipboard.writeText(i)}catch(o){mt.catch("Error in copyToClipboard: ",o)}},NS=i=>{try{let o=Ure(i);return o&&typeof o=="string"&&o.includes("/svg")&&(o=o.split("/svg")[0]+"/*[name()='svg']"),o}catch(o){mt.catch("Error in utils getXPath:",o)}},Ure=i=>{try{if(i){if(typeof i=="string")return document.evaluate(i,document,null,0,null);if(!i||i.nodeType!=1)return"";if(i.id&&i?.tagName?.toLowerCase()!=="svg"&&document.querySelectorAll(`[id='${i.id}']`)?.length===1)return"//*[@id='"+i.id+"']";let o=[].filter.call(i.parentNode?.children?i.parentNode?.children:[],function(n){return n.tagName==i.tagName});return Ure(i.parentNode)+"/"+i.tagName.toLowerCase()+(o.length>1?"["+([].indexOf.call(o,i)+1)+"]":"")}}catch(o){mt.catch("Error in utils calculateXPath:",o)}},jre=i=>{try{let o=[];return i.forEach(n=>{let e={};e.commonAncestorContainer=Bke(n.commonAncestorContainer),e.text=n.toString(),e.occurrence=qu(n.commonAncestorContainer,0,n.startContainer,n.startOffset,n.toString())+1,o.push(e)}),o}catch{return[]}},Bke=i=>{try{if(i.nodeType===Node.TEXT_NODE){let o=1,n=i.previousSibling;for(;n;)n.nodeType===Node.TEXT_NODE&&o++,n=n.previousSibling;return NS(i.parentElement)}else return NS(i)}catch(o){return mt.catch("Error in utils getXPathForText: ",o),NS(i)}},Sj=(i,o)=>{try{return i?i?.hasAttribute&&(o&&i.hasAttribute("contenteditable")||i?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_ENABLED)==="true")?i:Sj(i?.parentElement,o):null}catch(n){return mt.catch("Error in utils getSelectionEnabledElement: ",n),null}},UP=i=>{try{let o,n=[],e=document.createTreeWalker(i,NodeFilter.SHOW_TEXT,null);for(;o=e.nextNode();)n.push(o);return n}catch(o){return mt.catch("Error in utils getTextNodesInsideElement: ",o),[]}},$re=i=>{try{return i<576||i>=576&&i<767?"Mobile":i>=768&&i<992?"Tablet":i>=992&&i<1520?"Desktop":"Monitor"}catch(o){return mt.catch("Error in utils getDeviceTypeFromDeviceWidth: ",o),""}},Td=i=>new Promise(o=>setTimeout(o,i)),Hre=(i,o=0)=>new Promise((n,e)=>{let t=document.createElement("video");t.setAttribute("src",URL.createObjectURL(i)),t.load(),t.addEventListener("error",r=>{e("error when loading video file: "+r)}),t.addEventListener("loadedmetadata",()=>{if(t.duration<o){e("video is too short.");return}setTimeout(()=>{t.currentTime=o},200),t.addEventListener("seeked",()=>{let r=document.createElement("canvas");r.width=t.videoWidth,r.height=t.videoHeight;let a=r.getContext("2d");a.drawImage(t,0,0,r.width,r.height),a.canvas.toBlob(s=>{t.remove(),n(s)},"image/jpeg",.75)})})}),zre=i=>{try{return new Promise((o,n)=>{let e=new FileReader;e.onloadend=()=>o(e.result),e.readAsDataURL(i)})}catch(o){return mt.catch("Error in utils blobToBase64: ",o),Promise.resolve("")}},bj=(i,o="image/jpeg")=>{try{let n=atob(i.split(",")[1]),e=new ArrayBuffer(n.length),t=new Uint8Array(e);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return new Blob([e],{type:o})}catch(n){return mt.catch("Error in utils base64ToBlob: ",n),null}},Gre=(i,o,n=20)=>new Promise((e,t)=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let a=r.width,s=r.height,d=600,p=s/a*d,u="http://www.w3.org/2000/svg",C=document.createElementNS(u,"svg");C.setAttribute("xmlns",u),C.setAttribute("width",d.toString()),C.setAttribute("height",p.toString()),C.setAttribute("viewBox",`0 0 ${d} ${p}`);let E=document.createElementNS(u,"circle"),D=document.createElementNS(u,"polygon"),L=16,G=L+16,Y=d/2,ne=p/2;if(E.setAttribute("cx",Y.toString()),E.setAttribute("cy",ne.toString()),E.setAttribute("r",G.toString()),E.setAttribute("fill","lightgrey"),D.setAttribute("points",`${Y-L/2},${ne-L} ${Y-L/2},${ne+L} ${Y+L},${ne}`),D.setAttribute("fill","#ffffff"),C.appendChild(E),C.appendChild(D),o){let we=o.length*16-10,Se=16*1.5,Oe=(d-we)/2,_e=p-Se-10,fe=document.createElementNS(u,"rect");fe.setAttribute("x",Oe.toString()),fe.setAttribute("y",_e.toString()),fe.setAttribute("width",we.toString()),fe.setAttribute("height",Se.toString()),fe.setAttribute("fill","#353945b3"),fe.setAttribute("rx","12"),C.appendChild(fe);let Ae=document.createElementNS(u,"text");Ae.textContent=o,Ae.setAttribute("x",(d/2).toString()),Ae.setAttribute("y",(_e+16).toString()),Ae.setAttribute("font-size","16"),Ae.setAttribute("text-anchor","middle"),Ae.setAttribute("fill","white"),C.appendChild(Ae)}let ge=new XMLSerializer().serializeToString(C),ye=new Image,Re=new Blob([ge],{type:"image/svg+xml;charset=utf-8"}),We=URL.createObjectURL(Re);ye.onload=()=>{let Be=document.createElement("canvas");Be.width=d,Be.height=p;let we=Be.getContext("2d");we.beginPath(),we.moveTo(n,0),we.lineTo(d-n,0),we.quadraticCurveTo(d,0,d,n),we.lineTo(d,p-n),we.quadraticCurveTo(d,p,d-n,p),we.lineTo(n,p),we.quadraticCurveTo(0,p,0,p-n),we.lineTo(0,n),we.quadraticCurveTo(0,0,n,0),we.closePath(),we.clip(),we.drawImage(r,0,0,d,p),we.drawImage(ye,0,0,d,p);let Se=Be.toDataURL("image/png");e(Se)},ye.onerror=t,ye.src=We},r.onerror=t,r.src=i});var jP=i=>{try{return i?.replace(/[\n\t\u200D]/g,"")?.split(/\s+/)?.filter(e=>e?.trim()?.length)||[]}catch(o){return mt.catch("Error in utils getWords: ",o),[]}},na=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelector(n)}catch(n){return mt.catch("Error in utils getElementByAttributes: ",n),null}},Wre=(i,o=[])=>{try{let n=o.map(e=>`[${e}="${i}"]`).join(",");return document.querySelectorAll(n)}catch(n){return mt.catch("Error in utils getElementsByAttributes: ",n),[]}},bc=i=>{try{let o=Math.floor(i/3600),n=Math.floor((i-o*3600)/60),e=Math.floor(i-o*3600-n*60);return o&&o<10&&(o="0"+o),n<10&&(n="0"+n),e<10&&(e="0"+e),(o?o+":":"")+n+":"+e}catch{return""}},qre=(i,o=10)=>{try{if(!i||!i.currentTime)throw new Error("Invalid video element reference provided");let n=i.currentTime,e=Math.floor(n/o)*o,t=e+o;return{startSlot:bc(e),endSlot:bc(t),timeSlot:bc(e)+" - "+bc(t)}}catch{return null}},Iv=(i,o=["@"])=>{try{let n="",e,t=i.getRootNode();if(t instanceof ShadowRoot?e=t?.getSelection():e=window.getSelection(),e?.rangeCount){let r=e.getRangeAt(0),a=r.startOffset,s=r.endOffset,d=r?.commonAncestorContainer?.textContent;d?n=Vke(d,s,o):n=""}return n}catch(n){return mt.catch("Error in utils getWordAtCursor: ",n),""}};var Vke=(i,o,n=["@"])=>{try{let e=-1,t=!1;for(let r of n){let a=i.lastIndexOf(r,o),s=a>0?i.lastIndexOf(r,a-1):-1;if(a>e){let d=MP(i,a,o),p=kP(i,a,o);if(d||p){if(s!==-1){let u=MP(i,s,a),C=kP(i,s,a);!u&&!C&&(e=s,t=!0)}}else e=a,t=!0}}return e!==-1&&t?i.substring(e,o):""}catch(e){return mt.catch("Error in utils getStringFromLastAtSymbol: ",e),""}},MP=(i,o,n)=>{try{if(o===0)return!1;let e=i.charAt(o-1);return!(e===" "||e==="\xA0"||e===`
170
- `||e===" "||[",",":",";"].includes(e))}catch(e){return mt.catch("Error in utils isHotkeyDisabledForAutocomplete: ",e),!1}},kP=(i,o,n)=>{try{return!!i.substring(o+1,n).startsWith(" ")}catch(e){return mt.catch("Error in utils isHotkeyFollowedBySpace: ",e),!1}},Yre=(i,o,n=["@"])=>{try{let e=Uke(i),t=null;try{e&&typeof e.getSelection=="function"&&(t=e.getSelection())}catch{}if(t||(t=window.getSelection()),t?.rangeCount){let r=t.getRangeAt(0),a=r.startOffset,s=r?.commonAncestorContainer?.textContent;if(s){let d=-1;for(let p of n){let u=s.lastIndexOf(p,a),C=u>0?s.lastIndexOf(p,u-1):-1;if(u>d){let E=MP(s,u,a),D=kP(s,u,a);if(E||D){if(C!==-1){let L=MP(s,C,u),G=kP(s,C,u);!L&&!G&&(d=C)}}else d=u}}if(d!==-1){let p=s.substring(0,d),u=s.substring(r.endOffset),C=document.createElement("span");C.textContent=o,C.style.color="var(--velt-accent)";let E=Date.now()+"_"+Math.random().toString(36).substr(2,9);C.setAttribute("data-recently-added",E),setTimeout(()=>{C.hasAttribute("data-recently-added")&&C.removeAttribute("data-recently-added")},5e3);let D=r.commonAncestorContainer;if(D.nodeType===Node.TEXT_NODE){let L=D.parentNode;if(L){let G=document.createTextNode(p),Y=document.createTextNode(u);L.replaceChild(Y,D),L.insertBefore(C,Y),L.insertBefore(G,C);try{let ne=document.createRange();ne.setStartAfter(C),ne.collapse(!0),t?.removeAllRanges(),t?.addRange(ne)}catch(ne){mt.catch("Error positioning cursor after span:",ne);try{let ge=document.createRange();ge.selectNodeContents(i),ge.collapse(!1),t?.removeAllRanges(),t?.addRange(ge)}catch(ge){mt.catch("Error with fallback cursor positioning:",ge)}}}}}}}}catch(e){mt.catch("Error in utils replaceWordAtCursor: ",e)}},$P=()=>{try{let o=window.getSelection()?.getRangeAt(0),n=o?.commonAncestorContainer,e=o?.startContainer,t=o?.endContainer,r=[];r.push(n),r.push(e),r.push(t);let a=!1;for(let s of r)if(s&&qi(s,[j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT,j.TAGS.SNIPPYLY_COMMENT_TEXT_PORTAL,j.TAGS.SNIPPYLY_HIGHLIGHT_USER_TEXT,j.TAGS.SNIPPYLY_COMMENT_TEXT])){a=!0;break}return a}catch(i){return mt.catch("Error in utils isTextSelectionIncludesSnippylyElement: ",i),!1}},Kre=(i,o,n)=>{try{let e=document.querySelector(`[id=${i}]`);if(e)e.name=o,e.content=n;else{let t=document.createElement("meta");t.id=i,t.name=o,t.content=n,document.getElementsByTagName("head")[0].appendChild(t)}}catch{}},Zre=i=>{try{if(i){let o=document.querySelector(`[id=${i}]`);o&&o.remove()}}catch{}},Xre=()=>{try{let o=new Date().getTimezoneOffset(),n=Math.floor(Math.abs(o)/60),e=Math.abs(o)%60;return`UTC${o>0?"-":"+"}${n?.toString()?.padStart(2,"0")}:${e?.toString()?.padStart(2,"0")}`}catch(i){return mt.catch("Error in utils getTimezone: ",i),""}},Qre=()=>{try{let i=[];return document.querySelectorAll("*").forEach(n=>{(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth||["auto","scroll"].includes(getComputedStyle(n).overflow))&&i.push(n)}),i}catch(i){return mt.catch("Error in utils getScrollableElements: ",i),[]}},Jre=(i,o)=>Math.sqrt((i.x-o.x)**2+(i.y-o.y)**2),Ij=(i,o={x:window.innerWidth/2,y:window.innerHeight/2})=>{try{let n=i;for(;n.children.length>0;){let e=null,t=Number.MAX_SAFE_INTEGER;for(let r=0;r<n.children.length;r++){let a=n.children[r],s=a.getBoundingClientRect(),d={x:s.left+s.width/2,y:s.top+s.height/2},p=Jre(d,o);(s.top>=0||s.bottom<=window.innerHeight)&&s.width>0&&s.height>0&&p<=t&&(e=a,t=p)}if(e===null)break;n=e}return n}catch(n){return mt.catch("Error in utils getInnermostElement: ",n),null}},eae=i=>{try{let{offsetWidth:o,offsetHeight:n,scrollTop:e}=i,t=i,r={x:o/2,y:e+n/2};for(;t.children.length>0;){let a=null,s=Number.MAX_SAFE_INTEGER;for(let d=0;d<t.children.length;d++){let p=t.children[d],u={x:p.offsetLeft+p.offsetWidth/2,y:p.offsetTop+p.offsetHeight/2},C=Jre(u,r);p.offsetTop>=0&&p.offsetWidth>0&&p.offsetHeight>0&&C<=s&&(a=p,s=C)}if(a===null)break;t=a}return t}catch(o){return mt.catch("Error in utils getNestedInnermostElement: ",o),null}},tae=()=>{try{let i=window.innerWidth/2,o=window.innerHeight/2,n=document.elementFromPoint(i,o);for(;n&&n.tagName==="BODY";)o+=2,n=document.elementFromPoint(i,o);return n}catch(i){return mt.catch("Error in utils getCenteredBackgroundElement: ",i),null}},Ej=(i,o,n=!1)=>{try{let e=i.getBoundingClientRect(),t=o.getBoundingClientRect(),r=o.offsetTop;n&&(r=r-e.height/2+t.height/2),i.scrollTo({top:r,behavior:"smooth"})}catch(e){mt.catch("Error in utils nestedScrollIntoView: ",e)}},HP=(i,o=!0)=>{try{let n=document.body.getBoundingClientRect(),e=i.getBoundingClientRect(),t=e.top-n.top,r=window.innerHeight,a=t;o&&(a=a-r/2+e.height/2),window.scrollTo({top:a,behavior:"smooth"})}catch(n){mt.catch("Error in utils scrollIntoView: ",n)}},nae=(i=!1)=>{try{let o=!0;return i&&(o=/\sChrome\/[\d.]+ Mobile\s/.test(navigator.userAgent)),"ontouchstart"in window||navigator.maxTouchPoints>0||o}catch(o){return mt.catch("Error in utils isTouchDevice: ",o),!1}},iae=(i,o,n)=>{try{return(1-n)*i+n*o}catch(e){mt.catch("Error in utils lerp: ",e)}return 0},oae=(i,o)=>{try{if(i===void 0)return i;if(i=i.replace("#",""),i.length===6){let n=parseInt(i,16),e=(n>>16)+o;e>255&&(e=255),e<0&&(e=0);let t=(n&255)+o;t>255&&(t=255),t<0&&(t=0);let r=(n>>8&255)+o;return r>255&&(r=255),r<0&&(r=0),`#${(t|r<<8|e<<16).toString(16)}`}else return i}catch(n){mt.catch("Error in utils multiplyColor: ",n)}return i},rae=i=>{try{return i in j.TEXT_COLOR_MAP?j.TEXT_COLOR_MAP[i]:"#141416"}catch(o){return mt.catch("Error in generateUserColor:",o),"#141416"}},Tc=()=>{try{let i=localStorage.getItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS);if(i)return JSON.parse(i)}catch(i){return mt.catch("Error in getDefaultMediaStreamOptions:",i),{}}},zP=(i,o)=>{try{let n=o*(Math.PI/180),e=Math.cos(n);return e?i/e:i}catch(n){return mt.catch("Error in calculateHypotenuse:",n),0}},xj=(i,o,n=!0)=>{try{let e=[],t=n?i:i.parentNode;for(;t;)e.push(t),t=t.parentNode;let r=n?o:o.parentNode;for(;r;){if(e.indexOf(r)!==-1)return r;r=r.parentNode}return null}catch(e){return mt.catch("Error in utils findCommonParent: ",e),null}},Tj=(i,o,n,e)=>{let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),a=t.left+i,s=t.top+o,d=a-r.left,p=s-r.top;return{x:d,y:p}},Up=i=>{try{let o={height:0,width:0};if(typeof i?.getBBox=="function"){let n=i?.getBBox(),e=i?.getBoundingClientRect();o.height=parseFloat(e?.height||n.height||0),o.width=parseFloat(e?.width||n.width||0)}else{let n=window.getComputedStyle(i);if(o.height=i?.clientHeight||parseFloat(n.getPropertyValue("height"))||0,o.width=i?.clientWidth||parseFloat(n.getPropertyValue("width"))||0,i?.getBoundingClientRect&&typeof i?.getBoundingClientRect=="function"){let e=i?.getBoundingClientRect();o?.height||(o.height=e?.height||i?.clientHeight||i?.offsetHeight||0),o?.width||(o.width=e?.width||i?.clientWidth||i?.offsetWidth||0)}}return o}catch(o){return mt.catch("Error in utils getElementDimensions: ",o),{height:0,width:0}}},Dd=i=>{try{let o=i;for(;o;){if(window?.getComputedStyle(o)?.getPropertyValue("background-clip")=="text")return!0;o=o?.parentElement}return!1}catch(o){return mt.catch("Error in utils hasParentWithBackgroundClip: ",o),!1}},Uke=i=>{try{let o=i;for(;o;){if(o.toString()==="[object ShadowRoot]")return o;o=o.parentNode}}catch(o){mt.catch("Error in utils findShadowRoot: ",o)}return null},qn=i=>{try{let o=["commentCategories","color","resolved","inProgress","positionX","positionY","screenWidth","screenHeight","screenScrollHeight","screenScrollTop","taggedElementPath","taggedElementRect","targetElement","position","documentParamsId","documentParams","ghostComment","areaAnnotationId","iam","commentSource"],n=JSON.parse(JSON.stringify(i)),e={};return Object.keys(n).forEach(t=>{o.includes(t)||(e[t]=n[t])}),JSON.parse(JSON.stringify(e))}catch(o){return mt.catch("Error in utils getCommentAnnotationForClient: ",o),null}};var Ev=i=>i===null||typeof i>"u",xv=(i,o)=>{try{return!!i?.closest(`[${o}]`)}catch(n){return mt.catch("Error in utils hasParentWithAttribute: ",n),!1}},Dj=(i,o=!0)=>{try{let n=[];if(!i||!(i instanceof HTMLElement))return[];o&&n.push(i);for(let e=0;e<i.children.length;e++){let t=i.children[e];n=n.concat(Dj(t))}return n}catch(n){return mt.catch("Error in utils getAllNestedChildren: ",n),[]}},aae=()=>{try{return document.visibilityState==="hidden"?!1:document.hasFocus()}catch(i){return mt.catch("Error in utils isTabActive: ",i),!1}},wj=i=>{try{let o="",n=i?.getAttribute("src");if(n)o=`${fn(n)}`;else{let e=i?.querySelectorAll("source");if(e&&e.length>0){let r=e[0]?.getAttribute("src");r&&(o=`${fn(r)}`)}}return o}catch{return""}},Ke=i=>{try{return!(i&&(i?.children?.length>0||i?.textContent?.trim()?.length>0))}catch(o){return mt.catch("Error in utils isTemplateEmpty: ",o),!0}},ha=(i,o)=>{try{if(!i||!o)return;let n=[],e="",t=0;for(let d=0;d<o.length;d++){let p=o[d];p==="["?(t++,t===1&&e&&(n.push(e),e=""),e+=p):p==="]"?(t--,e+=p,t===0&&(n.push(e),e="")):p==="."&&t===0?e&&(n.push(e),e=""):e+=p}e&&n.push(e);let r,a=I({},i),s=n.reduce((d,p)=>{if(d==null)return;Ui(d)&&(r=d,d=d());let u=p.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(u){let E=u[1];if(/^\d+$/.test(E)){let D=parseInt(E,10);return Array.isArray(d)?d[D]:void 0}if(E.startsWith("'")&&E.endsWith("'")||E.startsWith('"')&&E.endsWith('"')){let D=E.slice(1,-1);return d[D]}if(E.includes(".")||E.includes("[")){let D=ha(a,E);Ui(D)&&(D=D());let L=D?.toString()||"";return d[L]}if(a[E]!==void 0){let D=a[E];return Ui(D)&&(D=D()),d[D]}return d[E]}let C=p;return(p.startsWith("'")&&p.endsWith("'")||p.startsWith('"')&&p.endsWith('"'))&&(C=p.slice(1,-1)),C==="length"&&Array.isArray(d)?d.length:d[C]},i);return r?Fi(()=>{try{let d=I({},i);return n.reduce((p,u)=>{if(p==null)return;Ui(p)&&(p=p());let C=u.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(C){let D=C[1];if(/^\d+$/.test(D)){let L=parseInt(D,10);return Array.isArray(p)?p[L]:void 0}if(D.startsWith("'")&&D.endsWith("'")||D.startsWith('"')&&D.endsWith('"')){let L=D.slice(1,-1);return p[L]}if(D.includes(".")||D.includes("[")){let L=ha(d,D);Ui(L)&&(L=L());let G=L?.toString()||"";return p[G]}if(d[D]!==void 0){let L=d[D];return Ui(L)&&(L=L()),p[L]}return p[D]}let E=u;return(u.startsWith("'")&&u.endsWith("'")||u.startsWith('"')&&u.endsWith('"'))&&(E=u.slice(1,-1)),p[E]},i)}catch{return""}}):s}catch{return""}},Yu=(i,o)=>{try{return!!(i?.locationId&&(i.locationId===o?.locationId||o?.location?.id===String(i.locationId))||i?.location?.id&&(i.location.id===o?.location?.id||i.location.id===String(o?.locationId)))}catch(n){return mt.catch("Error in utils isLocationSame: ",n),!1}},sae=()=>{try{let i=document.activeElement,o=new Set,n=10,e=0;for(;i&&i.shadowRoot&&!(o.has(i)||(o.add(i),i=i.shadowRoot.activeElement,e++,e>n)););return i}catch(i){return mt.catch("Error in utils getActiveElement: ",i),null}},si=(i,o)=>{try{return typeof i=="object"&&typeof o=="object"?JSON.stringify(i)===JSON.stringify(o):i===o}catch{return!1}},Tv=i=>{try{let o=JSON.parse(JSON.stringify(i));return i?.clientDocumentId&&(o.documentId=i.clientDocumentId),i?.clientOrganizationId&&(o.organizationId=i.clientOrganizationId),delete o?.clientDocumentId,delete o?.clientOrganizationId,delete o?.veltFolderId,delete o?.parentVeltFolderId,delete o?.pageInfo,o}catch{return i}},va=i=>{try{if(!i.some(a=>a?.value?.data))return{};let o=null,n=i.reduce((a,s)=>Math.max(a,s.timestamp),0),e=i.find(a=>a.timestamp===n);if(!e)return{};e?.value?.operation?.type==="removed"&&(o=e?.value?.operation);let r=i.map(a=>a.value).reduce((a,s)=>({data:I(I({},a?.data??{}),s?.data??{})}),{});return r.operation=o,r}catch{return{}}},Dc=(i,o,n)=>Q(void 0,null,function*(){try{let e=0;for(;e<=(n.retryCount||0);)try{let t=yield i();if(!t)return{success:!1,statusCode:400,message:`${o} failed: No response received`};if(t.statusCode===void 0)return{success:!1,statusCode:400,message:`${o} failed: Response missing statusCode`};if(t.statusCode!==200){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:t.statusCode,message:`${o} failed after ${e} attempts with status code ${t.statusCode}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)));continue}return t}catch(t){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:500,message:`${o} failed with error: ${t instanceof Error?t.message:"Unknown error"}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)))}return{success:!0,statusCode:200}}catch(e){return{success:!1,statusCode:500,message:`${o} failed with unexpected error: ${e instanceof Error?e.message:"Unknown error"}`}}}),lae=(i,o)=>Q(void 0,null,function*(){try{let n=0;for(;n<=(o.retryCount||0);)try{let e=yield i();if(!e)throw new Error("No response received");return e}catch{if(n++,n>(o.retryCount||0))return null;o.retryDelay&&(yield new Promise(t=>setTimeout(t,o.retryDelay)))}return null}catch{return null}}),Ca=i=>{try{if(i&&typeof i=="object"){let o=JSON.parse(JSON.stringify(i));return o?.clientOrganizationId&&(o.organizationId=o.clientOrganizationId,delete o.clientOrganizationId),o?.clientGroupId&&(o.groupId=o.clientGroupId,delete o.clientGroupId),o?.userSnippylyId&&delete o.userSnippylyId,o}else return null}catch(o){return mt.catch("Error in utils getUserForClient: ",o),null}},br=({url:i,apiProxyDomain:o})=>{try{if(o){let n=new URL(i);n.origin&&(i=i.replace(n.origin,o))}return i}catch(n){return mt.catch("Error in utils getResolvedApiUrl: ",n),i}};var tt=(()=>{let o=class o{constructor(e){this.functions=e,this.sf=!1,this.defaultProperties={},this.draftEvents=[],this.eventRateLimitCache={},this.EVENT_LIMIT=50,this.TIME_WINDOW_MS=60*1e3;try{this.updateDefaultProperties({sdkVersion:fa()}),window?.location?.href&&(this.defaultProperties.pageUrl=window.location.href)}catch(t){mt.catch("Error in AnalyticsService constructor: ",t)}}updateDefaultProperties(e={}){this.defaultProperties=I(I({},this.defaultProperties),e)}setInstalledFeature(e){try{this.defaultProperties?.installedFeatures||(this.defaultProperties.installedFeatures=[]),this.defaultProperties.installedFeatures.includes(e)||this.defaultProperties.installedFeatures.push(e)}catch(t){mt.catch("Error in AnalyticsService setInstalledFeature: ",t)}}setFeatureConfig({feature:e,config:t}){try{this.defaultProperties.featureConfigs||(this.defaultProperties.featureConfigs={}),this.defaultProperties.featureConfigs[e]||(this.defaultProperties.featureConfigs[e]={}),this.defaultProperties.featureConfigs[e]=I(I({},this.defaultProperties.featureConfigs[e]),t)}catch(r){mt.catch("Error in AnalyticsService setFeatureConfig: ",r)}}setSF(e){try{this.sf=e}catch(t){mt.catch("Error in AnalyticsService setSF: ",t)}}setAuthService(e){try{this.authService=e}catch(t){mt.catch("Error in AnalyticsService setAuthService: ",t)}}setCommentService(e){try{this.commentService=e}catch(t){mt.catch("Error in AnalyticsService setCommentService: ",t)}}setConfigService(e){try{this.configService=e}catch(t){mt.catch("Error in AnalyticsService setConfigService: ",t)}}setAreaService(e){try{this.areaService=e}catch(t){mt.catch("Error in AnalyticsService setAreaService: ",t)}}setRecorderAnnotationService(e){try{this.recorderAnnotationService=e}catch(t){mt.catch("Error in AnalyticsService setRecorderAnnotationService: ",t)}}setReactionService(e){try{this.reactionService=e}catch(t){mt.catch("Error in AnalyticsService setReactionService: ",t)}}setUserService(e){try{this.userService=e}catch(t){mt.catch("Error in AnalyticsService setUserService: ",t)}}identifyUser(e,t,r={}){try{this.userId=e;let a=typeof t=="object"?JSON.parse(JSON.stringify(t)):t;this.userService?.userDataProviderAvailable()&&a?.userId&&(a={userId:a.userId}),this.user=a;let s=this.defaultProperties?this.defaultProperties.apiKey:null;if(ni.production||ni.staging){let d=Date.now(),p={userId:e,clientUserId:this.user?.userId,traits:T(I({},a),{apiKey:s,forceReset:r?.forceReset,eventTimestamp:d}),properties:T(I({},this.defaultProperties),{eventTimestamp:d}),sf:this.sf,context:this.getContext(),eventTimestamp:d};this.setAnalytics("identify",p)}if(this.userId&&this.draftEvents?.length){let d=this.draftEvents?.slice();this.draftEvents=[],d?.forEach(p=>{switch(p.type){case"track":p?.data?.eventName&&this.trackEvent(p.data.eventName,p.data.properties,p.data.mergeDefaultProperties,p.data.userId,p.data.clientUserId);break;default:break}})}}catch(a){mt.catch("Error in AnalyticsService identifyUser: ",a)}}trackPage(e,t="",r={}){try{if((ni.production||ni.staging)&&this.userId){let a={userId:this.userId,clientUserId:this.user?.userId,name:e,properties:r,sf:this.sf,context:this.getContext()};this.setAnalytics("page",a)}}catch(a){mt.catch("Error in AnalyticsService trackPage: ",a)}}trackEvent(d){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{if(this.sf&&Nre.includes(e))return;if(ni.production||ni.staging)if(this.userId||a){if(this.eventRateLimitCache[e]?.blockedForSession)return;let p=Date.now();if(this.eventRateLimitCache[e]&&p-this.eventRateLimitCache[e].timestamp<this.TIME_WINDOW_MS){if(this.eventRateLimitCache[e].count>=this.EVENT_LIMIT){if(!this.eventRateLimitCache[e].rateLimitExceededEventTriggered){this.eventRateLimitCache[e].rateLimitExceededEventTriggered=!0,this.eventRateLimitCache[e].blockedForSession=!0;let u=I({eventName:e},t||{});this.triggerTrackEvent(X.Events.Core.SDK_EVENT_RATE_LIMIT_EXCEEDED,u,r,a,s)}return}this.eventRateLimitCache[e].count++}else this.eventRateLimitCache[e]={count:1,timestamp:p,rateLimitExceededEventTriggered:!1,blockedForSession:!1};return this.triggerTrackEvent(e,t,r,a,s)}else t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.draftEvents.push({type:"track",data:{eventName:e,properties:t,mergeDefaultProperties:r,userId:a,clientUserId:s}})}catch(p){mt.catch("Error in AnalyticsService trackEvent: ",p)}})}triggerTrackEvent(d){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{r&&(t||(t={}),t=I(I({},t),this.defaultProperties));let p;if(t?.annotationId){let C=t.annotationId;if(!p&&this.commentService){let E=this.commentService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId);let D=this.commentService.getMultiThreadAnnotationById(C);D?.metadata&&(p=D.metadata),D?.targetElementId&&(t.targetElementId=D.targetElementId)}if(!p&&this.recorderAnnotationService){let E=this.recorderAnnotationService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}if(!p&&this.reactionService){let E=this.reactionService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId)}if(!p&&this.areaService){let E=this.areaService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}}p&&typeof p=="object"&&(t=I(I({},t),p)),t&&typeof t=="object"&&(t=T(I({},t),{userId:this.userId||a,clientUserId:this.user?.userId||s}),t?.eventTimestamp||(t.eventTimestamp=Date.now()));let u={userId:this.userId||a,clientUserId:this.user?.userId||s,event:e,properties:t,sf:this.sf,context:this.getContext(),eventTimestamp:t?.eventTimestamp};return this.setAnalytics("track",u)}catch(p){mt.catch("Error in AnalyticsService triggerTrackEvent: ",p)}})}setAnalytics(e,t){return Q(this,null,function*(){try{return navigator.onLine?yr(this.functions,br({url:ni.cloudFunction.sa,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:20*60*1e3})({type:e,data:t}).catch(a=>{mt.warn("Error in AnalyticsService setAnalytics promise: ",e,a)}):void 0}catch(r){mt.catch("Error in AnalyticsService setAnalytics: ",r)}})}trackAuthenticatedEvent(e,t={},r=!0){try{this.authService?.getUser$&&typeof this.authService?.getUser$()?.subscribe=="function"&&(this.authService.getUser()?this.trackEvent(e,t,r):((!t||typeof t!="object")&&(t={}),t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.authService?.getUser$()?.pipe(Le(a=>!!a),rt(1))?.subscribe(()=>{this.trackEvent(e,t,r)})))}catch(a){mt.catch("Error in AnalyticsService trackAuthenticatedEvent: ",a)}}getContext(){try{let e={},t=xi();return e.os={name:t?.deviceInfo?.osName,version:t?.deviceInfo?.osVersion},e.page={path:t?.path,title:t?.title,url:t?.url},e.screen={height:t?.deviceInfo?.screenHeight,width:t?.deviceInfo?.screenWidth},e.app={name:t?.deviceInfo?.browserName,version:t?.deviceInfo?.browserVersion},e.device={type:t?.deviceInfo?.deviceType},e.timezone=Xre(),e.userAgent=t?.deviceInfo?.userAgent,e}catch(e){mt.catch("Error in AnalyticsService getContext: ",e)}}};o.\u0275fac=function(t){return new(t||o)(J($o))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var y=(()=>{let o=class o{get debugMode(){return Lre()}get logsEnabled(){return this.logsEnabled$.value}constructor(e){this.analyticsService=e,this.logsEnabled$=new ve(!0),this.log("%c[WB] Creating SERVICE LoggingService","color: blue;")}enableLogs(){try{if(this.logsEnabled$.value===!0)return;this.logsEnabled$.next(!0)}catch(e){this.catch("Error in LoggingService enableLogs: ",e)}}disableLogs(){try{if(this.logsEnabled$.value===!1)return;this.logsEnabled$.next(!1)}catch(e){this.catch("Error in LoggingService disableLogs: ",e)}}log(e,...t){this.debugMode&&console.log(e,...t)}warn(e,...t){this.debugMode&&console.warn(e,...t)}error(e,...t){this.debugMode&&console.error(e,...t)}debug(e,...t){this.debugMode&&console.debug(e,...t)}info(e,...t){this.debugMode&&console.info(e,...t)}catch(e,t,r,a=!1){try{let s=t?.message;this.logsEnabled$.value&&(s?.toLowerCase()?.includes("permission denied")||s?.toLowerCase()?.includes("permission_denied")||(t!==void 0?console.warn("Velt: ",e,t):console.warn("Velt: ",e))),a||this.analyticsService.trackEvent(X.Events.Core.SDK_ERROR,I({sourceMethod:e,message:(t?.message?t?.message:t)||e,clientUserId:this.analyticsService?.user?.userId,snippylyUserId:this.analyticsService?.user?.userSnippylyId,source:"sdk"},r||{}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(J(tt))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var cae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dae={};var Rm,Oj;(function(){var i;function o(we,Se){function Oe(){}Oe.prototype=Se.prototype,we.D=Se.prototype,we.prototype=new Oe,we.prototype.constructor=we,we.C=function(_e,fe,Ae){for(var xe=Array(arguments.length-2),Pn=2;Pn<arguments.length;Pn++)xe[Pn-2]=arguments[Pn];return Se.prototype[fe].apply(_e,xe)}}function n(){this.blockSize=-1}function e(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}o(e,n),e.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function t(we,Se,Oe){Oe||(Oe=0);var _e=Array(16);if(typeof Se=="string")for(var fe=0;16>fe;++fe)_e[fe]=Se.charCodeAt(Oe++)|Se.charCodeAt(Oe++)<<8|Se.charCodeAt(Oe++)<<16|Se.charCodeAt(Oe++)<<24;else for(fe=0;16>fe;++fe)_e[fe]=Se[Oe++]|Se[Oe++]<<8|Se[Oe++]<<16|Se[Oe++]<<24;Se=we.g[0],Oe=we.g[1],fe=we.g[2];var Ae=we.g[3],xe=Se+(Ae^Oe&(fe^Ae))+_e[0]+3614090360&4294967295;Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[1]+3905402710&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[2]+606105819&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[3]+3250441966&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[4]+4118548399&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[5]+1200080426&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[6]+2821735955&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[7]+4249261313&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[8]+1770035416&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[9]+2336552879&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[10]+4294925233&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[11]+2304563134&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[12]+1804603682&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[13]+4254626195&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[14]+2792965006&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[15]+1236535329&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(fe^Ae&(Oe^fe))+_e[1]+4129170786&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[6]+3225465664&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[11]+643717713&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[0]+3921069994&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[5]+3593408605&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[10]+38016083&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[15]+3634488961&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[4]+3889429448&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[9]+568446438&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[14]+3275163606&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[3]+4107603335&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[8]+1163531501&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[13]+2850285829&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[2]+4243563512&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[7]+1735328473&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[12]+2368359562&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(Oe^fe^Ae)+_e[5]+4294588738&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[8]+2272392833&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[11]+1839030562&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[14]+4259657740&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[1]+2763975236&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[4]+1272893353&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[7]+4139469664&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[10]+3200236656&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[13]+681279174&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[0]+3936430074&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[3]+3572445317&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[6]+76029189&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[9]+3654602809&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[12]+3873151461&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[15]+530742520&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[2]+3299628645&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(fe^(Oe|~Ae))+_e[0]+4096336452&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[7]+1126891415&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[14]+2878612391&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[5]+4237533241&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[12]+1700485571&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[3]+2399980690&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[10]+4293915773&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[1]+2240044497&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[8]+1873313359&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[15]+4264355552&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[6]+2734768916&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[13]+1309151649&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[4]+4149444226&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[11]+3174756917&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[2]+718787259&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[9]+3951481745&4294967295,we.g[0]=we.g[0]+Se&4294967295,we.g[1]=we.g[1]+(fe+(xe<<21&4294967295|xe>>>11))&4294967295,we.g[2]=we.g[2]+fe&4294967295,we.g[3]=we.g[3]+Ae&4294967295}e.prototype.u=function(we,Se){Se===void 0&&(Se=we.length);for(var Oe=Se-this.blockSize,_e=this.B,fe=this.h,Ae=0;Ae<Se;){if(fe==0)for(;Ae<=Oe;)t(this,we,Ae),Ae+=this.blockSize;if(typeof we=="string"){for(;Ae<Se;)if(_e[fe++]=we.charCodeAt(Ae++),fe==this.blockSize){t(this,_e),fe=0;break}}else for(;Ae<Se;)if(_e[fe++]=we[Ae++],fe==this.blockSize){t(this,_e),fe=0;break}}this.h=fe,this.o+=Se},e.prototype.v=function(){var we=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);we[0]=128;for(var Se=1;Se<we.length-8;++Se)we[Se]=0;var Oe=8*this.o;for(Se=we.length-8;Se<we.length;++Se)we[Se]=Oe&255,Oe/=256;for(this.u(we),we=Array(16),Se=Oe=0;4>Se;++Se)for(var _e=0;32>_e;_e+=8)we[Oe++]=this.g[Se]>>>_e&255;return we};function r(we,Se){var Oe=s;return Object.prototype.hasOwnProperty.call(Oe,we)?Oe[we]:Oe[we]=Se(we)}function a(we,Se){this.h=Se;for(var Oe=[],_e=!0,fe=we.length-1;0<=fe;fe--){var Ae=we[fe]|0;_e&&Ae==Se||(Oe[fe]=Ae,_e=!1)}this.g=Oe}var s={};function d(we){return-128<=we&&128>we?r(we,function(Se){return new a([Se|0],0>Se?-1:0)}):new a([we|0],0>we?-1:0)}function p(we){if(isNaN(we)||!isFinite(we))return C;if(0>we)return Y(p(-we));for(var Se=[],Oe=1,_e=0;we>=Oe;_e++)Se[_e]=we/Oe|0,Oe*=4294967296;return new a(Se,0)}function u(we,Se){if(we.length==0)throw Error("number format error: empty string");if(Se=Se||10,2>Se||36<Se)throw Error("radix out of range: "+Se);if(we.charAt(0)=="-")return Y(u(we.substring(1),Se));if(0<=we.indexOf("-"))throw Error('number format error: interior "-" character');for(var Oe=p(Math.pow(Se,8)),_e=C,fe=0;fe<we.length;fe+=8){var Ae=Math.min(8,we.length-fe),xe=parseInt(we.substring(fe,fe+Ae),Se);8>Ae?(Ae=p(Math.pow(Se,Ae)),_e=_e.j(Ae).add(p(xe))):(_e=_e.j(Oe),_e=_e.add(p(xe)))}return _e}var C=d(0),E=d(1),D=d(16777216);i=a.prototype,i.m=function(){if(G(this))return-Y(this).m();for(var we=0,Se=1,Oe=0;Oe<this.g.length;Oe++){var _e=this.i(Oe);we+=(0<=_e?_e:4294967296+_e)*Se,Se*=4294967296}return we},i.toString=function(we){if(we=we||10,2>we||36<we)throw Error("radix out of range: "+we);if(L(this))return"0";if(G(this))return"-"+Y(this).toString(we);for(var Se=p(Math.pow(we,6)),Oe=this,_e="";;){var fe=Re(Oe,Se).g;Oe=ne(Oe,fe.j(Se));var Ae=((0<Oe.g.length?Oe.g[0]:Oe.h)>>>0).toString(we);if(Oe=fe,L(Oe))return Ae+_e;for(;6>Ae.length;)Ae="0"+Ae;_e=Ae+_e}},i.i=function(we){return 0>we?0:we<this.g.length?this.g[we]:this.h};function L(we){if(we.h!=0)return!1;for(var Se=0;Se<we.g.length;Se++)if(we.g[Se]!=0)return!1;return!0}function G(we){return we.h==-1}i.l=function(we){return we=ne(this,we),G(we)?-1:L(we)?0:1};function Y(we){for(var Se=we.g.length,Oe=[],_e=0;_e<Se;_e++)Oe[_e]=~we.g[_e];return new a(Oe,~we.h).add(E)}i.abs=function(){return G(this)?Y(this):this},i.add=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0,fe=0;fe<=Se;fe++){var Ae=_e+(this.i(fe)&65535)+(we.i(fe)&65535),xe=(Ae>>>16)+(this.i(fe)>>>16)+(we.i(fe)>>>16);_e=xe>>>16,Ae&=65535,xe&=65535,Oe[fe]=xe<<16|Ae}return new a(Oe,Oe[Oe.length-1]&-2147483648?-1:0)};function ne(we,Se){return we.add(Y(Se))}i.j=function(we){if(L(this)||L(we))return C;if(G(this))return G(we)?Y(this).j(Y(we)):Y(Y(this).j(we));if(G(we))return Y(this.j(Y(we)));if(0>this.l(D)&&0>we.l(D))return p(this.m()*we.m());for(var Se=this.g.length+we.g.length,Oe=[],_e=0;_e<2*Se;_e++)Oe[_e]=0;for(_e=0;_e<this.g.length;_e++)for(var fe=0;fe<we.g.length;fe++){var Ae=this.i(_e)>>>16,xe=this.i(_e)&65535,Pn=we.i(fe)>>>16,Nn=we.i(fe)&65535;Oe[2*_e+2*fe]+=xe*Nn,ge(Oe,2*_e+2*fe),Oe[2*_e+2*fe+1]+=Ae*Nn,ge(Oe,2*_e+2*fe+1),Oe[2*_e+2*fe+1]+=xe*Pn,ge(Oe,2*_e+2*fe+1),Oe[2*_e+2*fe+2]+=Ae*Pn,ge(Oe,2*_e+2*fe+2)}for(_e=0;_e<Se;_e++)Oe[_e]=Oe[2*_e+1]<<16|Oe[2*_e];for(_e=Se;_e<2*Se;_e++)Oe[_e]=0;return new a(Oe,0)};function ge(we,Se){for(;(we[Se]&65535)!=we[Se];)we[Se+1]+=we[Se]>>>16,we[Se]&=65535,Se++}function ye(we,Se){this.g=we,this.h=Se}function Re(we,Se){if(L(Se))throw Error("division by zero");if(L(we))return new ye(C,C);if(G(we))return Se=Re(Y(we),Se),new ye(Y(Se.g),Y(Se.h));if(G(Se))return Se=Re(we,Y(Se)),new ye(Y(Se.g),Se.h);if(30<we.g.length){if(G(we)||G(Se))throw Error("slowDivide_ only works with positive integers.");for(var Oe=E,_e=Se;0>=_e.l(we);)Oe=We(Oe),_e=We(_e);var fe=Be(Oe,1),Ae=Be(_e,1);for(_e=Be(_e,2),Oe=Be(Oe,2);!L(_e);){var xe=Ae.add(_e);0>=xe.l(we)&&(fe=fe.add(Oe),Ae=xe),_e=Be(_e,1),Oe=Be(Oe,1)}return Se=ne(we,fe.j(Se)),new ye(fe,Se)}for(fe=C;0<=we.l(Se);){for(Oe=Math.max(1,Math.floor(we.m()/Se.m())),_e=Math.ceil(Math.log(Oe)/Math.LN2),_e=48>=_e?1:Math.pow(2,_e-48),Ae=p(Oe),xe=Ae.j(Se);G(xe)||0<xe.l(we);)Oe-=_e,Ae=p(Oe),xe=Ae.j(Se);L(Ae)&&(Ae=E),fe=fe.add(Ae),we=ne(we,xe)}return new ye(fe,we)}i.A=function(we){return Re(this,we).h},i.and=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)&we.i(_e);return new a(Oe,this.h&we.h)},i.or=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)|we.i(_e);return new a(Oe,this.h|we.h)},i.xor=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)^we.i(_e);return new a(Oe,this.h^we.h)};function We(we){for(var Se=we.g.length+1,Oe=[],_e=0;_e<Se;_e++)Oe[_e]=we.i(_e)<<1|we.i(_e-1)>>>31;return new a(Oe,we.h)}function Be(we,Se){var Oe=Se>>5;Se%=32;for(var _e=we.g.length-Oe,fe=[],Ae=0;Ae<_e;Ae++)fe[Ae]=0<Se?we.i(Ae+Oe)>>>Se|we.i(Ae+Oe+1)<<32-Se:we.i(Ae+Oe);return new a(fe,we.h)}e.prototype.digest=e.prototype.v,e.prototype.reset=e.prototype.s,e.prototype.update=e.prototype.u,Oj=dae.Md5=e,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.A,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=p,a.fromString=u,Rm=dae.Integer=a}).apply(typeof cae<"u"?cae:typeof self<"u"?self:typeof window<"u"?window:{});var GP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nm={};var Aj,jke,Dv,Pj,FS,WP,Mj,kj,Rj;(function(){var i,o=typeof Object.defineProperties=="function"?Object.defineProperty:function(V,te,me){return V==Array.prototype||V==Object.prototype||(V[te]=me.value),V};function n(V){V=[typeof globalThis=="object"&&globalThis,V,typeof window=="object"&&window,typeof self=="object"&&self,typeof GP=="object"&&GP];for(var te=0;te<V.length;++te){var me=V[te];if(me&&me.Math==Math)return me}throw Error("Cannot find global object")}var e=n(this);function t(V,te){if(te)e:{var me=e;V=V.split(".");for(var Ie=0;Ie<V.length-1;Ie++){var Ge=V[Ie];if(!(Ge in me))break e;me=me[Ge]}V=V[V.length-1],Ie=me[V],te=te(Ie),te!=Ie&&te!=null&&o(me,V,{configurable:!0,writable:!0,value:te})}}function r(V,te){V instanceof String&&(V+="");var me=0,Ie=!1,Ge={next:function(){if(!Ie&&me<V.length){var ot=me++;return{value:te(ot,V[ot]),done:!1}}return Ie=!0,{done:!0,value:void 0}}};return Ge[Symbol.iterator]=function(){return Ge},Ge}t("Array.prototype.values",function(V){return V||function(){return r(this,function(te,me){return me})}});var a=a||{},s=this||self;function d(V){var te=typeof V;return te=te!="object"?te:V?Array.isArray(V)?"array":te:"null",te=="array"||te=="object"&&typeof V.length=="number"}function p(V){var te=typeof V;return te=="object"&&V!=null||te=="function"}function u(V,te,me){return V.call.apply(V.bind,arguments)}function C(V,te,me){if(!V)throw Error();if(2<arguments.length){var Ie=Array.prototype.slice.call(arguments,2);return function(){var Ge=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(Ge,Ie),V.apply(te,Ge)}}return function(){return V.apply(te,arguments)}}function E(V,te,me){return E=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?u:C,E.apply(null,arguments)}function D(V,te){var me=Array.prototype.slice.call(arguments,1);return function(){var Ie=me.slice();return Ie.push.apply(Ie,arguments),V.apply(this,Ie)}}function L(V,te){function me(){}me.prototype=te.prototype,V.aa=te.prototype,V.prototype=new me,V.prototype.constructor=V,V.Qb=function(Ie,Ge,ot){for(var Rt=Array(arguments.length-2),ro=2;ro<arguments.length;ro++)Rt[ro-2]=arguments[ro];return te.prototype[Ge].apply(Ie,Rt)}}function G(V){let te=V.length;if(0<te){let me=Array(te);for(let Ie=0;Ie<te;Ie++)me[Ie]=V[Ie];return me}return[]}function Y(V,te){for(let me=1;me<arguments.length;me++){let Ie=arguments[me];if(d(Ie)){let Ge=V.length||0,ot=Ie.length||0;V.length=Ge+ot;for(let Rt=0;Rt<ot;Rt++)V[Ge+Rt]=Ie[Rt]}else V.push(Ie)}}class ne{constructor(te,me){this.i=te,this.j=me,this.h=0,this.g=null}get(){let te;return 0<this.h?(this.h--,te=this.g,this.g=te.next,te.next=null):te=this.i(),te}}function ge(V){return/^[\s\xa0]*$/.test(V)}function ye(){var V=s.navigator;return V&&(V=V.userAgent)?V:""}function Re(V){return Re[" "](V),V}Re[" "]=function(){};var We=ye().indexOf("Gecko")!=-1&&!(ye().toLowerCase().indexOf("webkit")!=-1&&ye().indexOf("Edge")==-1)&&!(ye().indexOf("Trident")!=-1||ye().indexOf("MSIE")!=-1)&&ye().indexOf("Edge")==-1;function Be(V,te,me){for(let Ie in V)te.call(me,V[Ie],Ie,V)}function we(V,te){for(let me in V)te.call(void 0,V[me],me,V)}function Se(V){let te={};for(let me in V)te[me]=V[me];return te}let Oe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function _e(V,te){let me,Ie;for(let Ge=1;Ge<arguments.length;Ge++){Ie=arguments[Ge];for(me in Ie)V[me]=Ie[me];for(let ot=0;ot<Oe.length;ot++)me=Oe[ot],Object.prototype.hasOwnProperty.call(Ie,me)&&(V[me]=Ie[me])}}function fe(V){var te=1;V=V.split(":");let me=[];for(;0<te&&V.length;)me.push(V.shift()),te--;return V.length&&me.push(V.join(":")),me}function Ae(V){s.setTimeout(()=>{throw V},0)}function xe(){var V=Fn;let te=null;return V.g&&(te=V.g,V.g=V.g.next,V.g||(V.h=null),te.next=null),te}class Pn{constructor(){this.h=this.g=null}add(te,me){let Ie=Nn.get();Ie.set(te,me),this.h?this.h.next=Ie:this.g=Ie,this.h=Ie}}var Nn=new ne(()=>new At,V=>V.reset());class At{constructor(){this.next=this.g=this.h=null}set(te,me){this.h=te,this.g=me,this.next=null}reset(){this.next=this.g=this.h=null}}let Pt,Ht=!1,Fn=new Pn,Zt=()=>{let V=s.Promise.resolve(void 0);Pt=()=>{V.then(qt)}};var qt=()=>{for(var V;V=xe();){try{V.h.call(V.g)}catch(me){Ae(me)}var te=Nn;te.j(V),100>te.h&&(te.h++,V.next=te.g,te.g=V)}Ht=!1};function wi(){this.s=this.s,this.C=this.C}wi.prototype.s=!1,wi.prototype.ma=function(){this.s||(this.s=!0,this.N())},wi.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function Xt(V,te){this.type=V,this.g=this.target=te,this.defaultPrevented=!1}Xt.prototype.h=function(){this.defaultPrevented=!0};var Zn=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var V=!1,te=Object.defineProperty({},"passive",{get:function(){V=!0}});try{let me=()=>{};s.addEventListener("test",me,te),s.removeEventListener("test",me,te)}catch{}return V}();function Vi(V,te){if(Xt.call(this,V?V.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,V){var me=this.type=V.type,Ie=V.changedTouches&&V.changedTouches.length?V.changedTouches[0]:null;if(this.target=V.target||V.srcElement,this.g=te,te=V.relatedTarget){if(We){e:{try{Re(te.nodeName);var Ge=!0;break e}catch{}Ge=!1}Ge||(te=null)}}else me=="mouseover"?te=V.fromElement:me=="mouseout"&&(te=V.toElement);this.relatedTarget=te,Ie?(this.clientX=Ie.clientX!==void 0?Ie.clientX:Ie.pageX,this.clientY=Ie.clientY!==void 0?Ie.clientY:Ie.pageY,this.screenX=Ie.screenX||0,this.screenY=Ie.screenY||0):(this.clientX=V.clientX!==void 0?V.clientX:V.pageX,this.clientY=V.clientY!==void 0?V.clientY:V.pageY,this.screenX=V.screenX||0,this.screenY=V.screenY||0),this.button=V.button,this.key=V.key||"",this.ctrlKey=V.ctrlKey,this.altKey=V.altKey,this.shiftKey=V.shiftKey,this.metaKey=V.metaKey,this.pointerId=V.pointerId||0,this.pointerType=typeof V.pointerType=="string"?V.pointerType:Yd[V.pointerType]||"",this.state=V.state,this.i=V,V.defaultPrevented&&Vi.aa.h.call(this)}}L(Vi,Xt);var Yd={2:"touch",3:"pen",4:"mouse"};Vi.prototype.h=function(){Vi.aa.h.call(this);var V=this.i;V.preventDefault?V.preventDefault():V.returnValue=!1};var vo="closure_listenable_"+(1e6*Math.random()|0),sl=0;function Hr(V,te,me,Ie,Ge){this.listener=V,this.proxy=null,this.src=te,this.type=me,this.capture=!!Ie,this.ha=Ge,this.key=++sl,this.da=this.fa=!1}function ll(V){V.da=!0,V.listener=null,V.proxy=null,V.src=null,V.ha=null}function Hl(V){this.src=V,this.g={},this.h=0}Hl.prototype.add=function(V,te,me,Ie,Ge){var ot=V.toString();V=this.g[ot],V||(V=this.g[ot]=[],this.h++);var Rt=bg(V,te,Ie,Ge);return-1<Rt?(te=V[Rt],me||(te.fa=!1)):(te=new Hr(te,this.src,ot,!!Ie,Ge),te.fa=me,V.push(te)),te};function Vc(V,te){var me=te.type;if(me in V.g){var Ie=V.g[me],Ge=Array.prototype.indexOf.call(Ie,te,void 0),ot;(ot=0<=Ge)&&Array.prototype.splice.call(Ie,Ge,1),ot&&(ll(te),V.g[me].length==0&&(delete V.g[me],V.h--))}}function bg(V,te,me,Ie){for(var Ge=0;Ge<V.length;++Ge){var ot=V[Ge];if(!ot.da&&ot.listener==te&&ot.capture==!!me&&ot.ha==Ie)return Ge}return-1}var zl="closure_lm_"+(1e6*Math.random()|0),Ig={};function bh(V,te,me,Ie,Ge){if(Ie&&Ie.once)return Eg(V,te,me,Ie,Ge);if(Array.isArray(te)){for(var ot=0;ot<te.length;ot++)bh(V,te[ot],me,Ie,Ge);return null}return me=jc(me),V&&V[vo]?V.K(te,me,p(Ie)?!!Ie.capture:!!Ie,Ge):Kd(V,te,me,!1,Ie,Ge)}function Kd(V,te,me,Ie,Ge,ot){if(!te)throw Error("Invalid event type");var Rt=p(Ge)?!!Ge.capture:!!Ge,ro=Zd(V);if(ro||(V[zl]=ro=new Hl(V)),me=ro.add(te,me,Ie,Rt,ot),me.proxy)return me;if(Ie=Ih(),me.proxy=Ie,Ie.src=V,Ie.listener=me,V.addEventListener)Zn||(Ge=Rt),Ge===void 0&&(Ge=!1),V.addEventListener(te.toString(),Ie,Ge);else if(V.attachEvent)V.attachEvent(Kw(te.toString()),Ie);else if(V.addListener&&V.removeListener)V.addListener(Ie);else throw Error("addEventListener and attachEvent are unavailable.");return me}function Ih(){function V(me){return te.call(V.src,V.listener,me)}let te=I_;return V}function Eg(V,te,me,Ie,Ge){if(Array.isArray(te)){for(var ot=0;ot<te.length;ot++)Eg(V,te[ot],me,Ie,Ge);return null}return me=jc(me),V&&V[vo]?V.L(te,me,p(Ie)?!!Ie.capture:!!Ie,Ge):Kd(V,te,me,!0,Ie,Ge)}function b_(V,te,me,Ie,Ge){if(Array.isArray(te))for(var ot=0;ot<te.length;ot++)b_(V,te[ot],me,Ie,Ge);else Ie=p(Ie)?!!Ie.capture:!!Ie,me=jc(me),V&&V[vo]?(V=V.i,te=String(te).toString(),te in V.g&&(ot=V.g[te],me=bg(ot,me,Ie,Ge),-1<me&&(ll(ot[me]),Array.prototype.splice.call(ot,me,1),ot.length==0&&(delete V.g[te],V.h--)))):V&&(V=Zd(V))&&(te=V.g[te.toString()],V=-1,te&&(V=bg(te,me,Ie,Ge)),(me=-1<V?te[V]:null)&&Eh(me))}function Eh(V){if(typeof V!="number"&&V&&!V.da){var te=V.src;if(te&&te[vo])Vc(te.i,V);else{var me=V.type,Ie=V.proxy;te.removeEventListener?te.removeEventListener(me,Ie,V.capture):te.detachEvent?te.detachEvent(Kw(me),Ie):te.addListener&&te.removeListener&&te.removeListener(Ie),(me=Zd(te))?(Vc(me,V),me.h==0&&(me.src=null,te[zl]=null)):ll(V)}}}function Kw(V){return V in Ig?Ig[V]:Ig[V]="on"+V}function I_(V,te){if(V.da)V=!0;else{te=new Vi(te,this);var me=V.listener,Ie=V.ha||V.src;V.fa&&Eh(V),V=me.call(Ie,te)}return V}function Zd(V){return V=V[zl],V instanceof Hl?V:null}var Uc="__closure_events_fn_"+(1e9*Math.random()>>>0);function jc(V){return typeof V=="function"?V:(V[Uc]||(V[Uc]=function(te){return V.handleEvent(te)}),V[Uc])}function wr(){wi.call(this),this.i=new Hl(this),this.M=this,this.F=null}L(wr,wi),wr.prototype[vo]=!0,wr.prototype.removeEventListener=function(V,te,me,Ie){b_(this,V,te,me,Ie)};function zr(V,te){var me,Ie=V.F;if(Ie)for(me=[];Ie;Ie=Ie.F)me.push(Ie);if(V=V.M,Ie=te.type||te,typeof te=="string")te=new Xt(te,V);else if(te instanceof Xt)te.target=te.target||V;else{var Ge=te;te=new Xt(Ie,V),_e(te,Ge)}if(Ge=!0,me)for(var ot=me.length-1;0<=ot;ot--){var Rt=te.g=me[ot];Ge=xg(Rt,Ie,!0,te)&&Ge}if(Rt=te.g=V,Ge=xg(Rt,Ie,!0,te)&&Ge,Ge=xg(Rt,Ie,!1,te)&&Ge,me)for(ot=0;ot<me.length;ot++)Rt=te.g=me[ot],Ge=xg(Rt,Ie,!1,te)&&Ge}wr.prototype.N=function(){if(wr.aa.N.call(this),this.i){var V=this.i,te;for(te in V.g){for(var me=V.g[te],Ie=0;Ie<me.length;Ie++)ll(me[Ie]);delete V.g[te],V.h--}}this.F=null},wr.prototype.K=function(V,te,me,Ie){return this.i.add(String(V),te,!1,me,Ie)},wr.prototype.L=function(V,te,me,Ie){return this.i.add(String(V),te,!0,me,Ie)};function xg(V,te,me,Ie){if(te=V.i.g[String(te)],!te)return!0;te=te.concat();for(var Ge=!0,ot=0;ot<te.length;++ot){var Rt=te[ot];if(Rt&&!Rt.da&&Rt.capture==me){var ro=Rt.listener,sa=Rt.ha||Rt.src;Rt.fa&&Vc(V.i,Rt),Ge=ro.call(sa,Ie)!==!1&&Ge}}return Ge&&!Ie.defaultPrevented}function xh(V,te,me){if(typeof V=="function")me&&(V=E(V,me));else if(V&&typeof V.handleEvent=="function")V=E(V.handleEvent,V);else throw Error("Invalid listener argument");return 2147483647<Number(te)?-1:s.setTimeout(V,te||0)}function E_(V){V.g=xh(()=>{V.g=null,V.i&&(V.i=!1,E_(V))},V.l);let te=V.h;V.h=null,V.m.apply(null,te)}class Th extends wi{constructor(te,me){super(),this.m=te,this.l=me,this.h=null,this.i=!1,this.g=null}j(te){this.h=arguments,this.g?this.i=!0:E_(this)}N(){super.N(),this.g&&(s.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function $c(V){wi.call(this),this.h=V,this.g={}}L($c,wi);var cl=[];function Xd(V){Be(V.g,function(te,me){this.g.hasOwnProperty(me)&&Eh(te)},V),V.g={}}$c.prototype.N=function(){$c.aa.N.call(this),Xd(this)},$c.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Tg=s.JSON.stringify,x_=s.JSON.parse,u7=class{stringify(V){return s.JSON.stringify(V,void 0)}parse(V){return s.JSON.parse(V,void 0)}};function zm(){}zm.prototype.h=null;function Dg(V){return V.h||(V.h=V.i())}function Zw(){}var Gl={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function T_(){Xt.call(this,"d")}L(T_,Xt);function D_(){Xt.call(this,"c")}L(D_,Xt);var Co={},Qd=null;function Dh(){return Qd=Qd||new wr}Co.La="serverreachability";function w_(V){Xt.call(this,Co.La,V)}L(w_,Xt);function Jd(V){let te=Dh();zr(te,new w_(te))}Co.STAT_EVENT="statevent";function O_(V,te){Xt.call(this,Co.STAT_EVENT,V),this.stat=te}L(O_,Xt);function Gr(V){let te=Dh();zr(te,new O_(te,V))}Co.Ma="timingevent";function Xw(V,te){Xt.call(this,Co.Ma,V),this.size=te}L(Xw,Xt);function Ia(V,te){if(typeof V!="function")throw Error("Fn must not be null and must be a function");return s.setTimeout(function(){V()},te)}function Hc(){this.g=!0}Hc.prototype.xa=function(){this.g=!1};function Qw(V,te,me,Ie,Ge,ot){V.info(function(){if(V.g)if(ot)for(var Rt="",ro=ot.split("&"),sa=0;sa<ro.length;sa++){var Oi=ro[sa].split("=");if(1<Oi.length){var Ea=Oi[0];Oi=Oi[1];var xa=Ea.split("_");Rt=2<=xa.length&&xa[1]=="type"?Rt+(Ea+"="+Oi+"&"):Rt+(Ea+"=redacted&")}}else Rt=null;else Rt=ot;return"XMLHTTP REQ ("+Ie+") [attempt "+Ge+"]: "+te+`
170
+ `||e===" "||[",",":",";"].includes(e))}catch(e){return mt.catch("Error in utils isHotkeyDisabledForAutocomplete: ",e),!1}},kP=(i,o,n)=>{try{return!!i.substring(o+1,n).startsWith(" ")}catch(e){return mt.catch("Error in utils isHotkeyFollowedBySpace: ",e),!1}},Yre=(i,o,n=["@"])=>{try{let e=Uke(i),t=null;try{e&&typeof e.getSelection=="function"&&(t=e.getSelection())}catch{}if(t||(t=window.getSelection()),t?.rangeCount){let r=t.getRangeAt(0),a=r.startOffset,s=r?.commonAncestorContainer?.textContent;if(s){let d=-1;for(let p of n){let u=s.lastIndexOf(p,a),C=u>0?s.lastIndexOf(p,u-1):-1;if(u>d){let E=MP(s,u,a),D=kP(s,u,a);if(E||D){if(C!==-1){let L=MP(s,C,u),G=kP(s,C,u);!L&&!G&&(d=C)}}else d=u}}if(d!==-1){let p=s.substring(0,d),u=s.substring(r.endOffset),C=document.createElement("span");C.textContent=o,C.style.color="var(--velt-accent)";let E=Date.now()+"_"+Math.random().toString(36).substr(2,9);C.setAttribute("data-recently-added",E),setTimeout(()=>{C.hasAttribute("data-recently-added")&&C.removeAttribute("data-recently-added")},5e3);let D=r.commonAncestorContainer;if(D.nodeType===Node.TEXT_NODE){let L=D.parentNode;if(L){let G=document.createTextNode(p),Y=document.createTextNode(u);L.replaceChild(Y,D),L.insertBefore(C,Y),L.insertBefore(G,C);try{let ne=document.createRange();ne.setStartAfter(C),ne.collapse(!0),t?.removeAllRanges(),t?.addRange(ne)}catch(ne){mt.catch("Error positioning cursor after span:",ne);try{let ge=document.createRange();ge.selectNodeContents(i),ge.collapse(!1),t?.removeAllRanges(),t?.addRange(ge)}catch(ge){mt.catch("Error with fallback cursor positioning:",ge)}}}}}}}}catch(e){mt.catch("Error in utils replaceWordAtCursor: ",e)}},$P=()=>{try{let o=window.getSelection()?.getRangeAt(0),n=o?.commonAncestorContainer,e=o?.startContainer,t=o?.endContainer,r=[];r.push(n),r.push(e),r.push(t);let a=!1;for(let s of r)if(s&&qi(s,[j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT,j.TAGS.SNIPPYLY_COMMENT_TEXT_PORTAL,j.TAGS.SNIPPYLY_HIGHLIGHT_USER_TEXT,j.TAGS.SNIPPYLY_COMMENT_TEXT])){a=!0;break}return a}catch(i){return mt.catch("Error in utils isTextSelectionIncludesSnippylyElement: ",i),!1}},Kre=(i,o,n)=>{try{let e=document.querySelector(`[id=${i}]`);if(e)e.name=o,e.content=n;else{let t=document.createElement("meta");t.id=i,t.name=o,t.content=n,document.getElementsByTagName("head")[0].appendChild(t)}}catch{}},Zre=i=>{try{if(i){let o=document.querySelector(`[id=${i}]`);o&&o.remove()}}catch{}},Xre=()=>{try{let o=new Date().getTimezoneOffset(),n=Math.floor(Math.abs(o)/60),e=Math.abs(o)%60;return`UTC${o>0?"-":"+"}${n?.toString()?.padStart(2,"0")}:${e?.toString()?.padStart(2,"0")}`}catch(i){return mt.catch("Error in utils getTimezone: ",i),""}},Qre=()=>{try{let i=[];return document.querySelectorAll("*").forEach(n=>{(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth||["auto","scroll"].includes(getComputedStyle(n).overflow))&&i.push(n)}),i}catch(i){return mt.catch("Error in utils getScrollableElements: ",i),[]}},Jre=(i,o)=>Math.sqrt((i.x-o.x)**2+(i.y-o.y)**2),Ij=(i,o={x:window.innerWidth/2,y:window.innerHeight/2})=>{try{let n=i;for(;n.children.length>0;){let e=null,t=Number.MAX_SAFE_INTEGER;for(let r=0;r<n.children.length;r++){let a=n.children[r],s=a.getBoundingClientRect(),d={x:s.left+s.width/2,y:s.top+s.height/2},p=Jre(d,o);(s.top>=0||s.bottom<=window.innerHeight)&&s.width>0&&s.height>0&&p<=t&&(e=a,t=p)}if(e===null)break;n=e}return n}catch(n){return mt.catch("Error in utils getInnermostElement: ",n),null}},eae=i=>{try{let{offsetWidth:o,offsetHeight:n,scrollTop:e}=i,t=i,r={x:o/2,y:e+n/2};for(;t.children.length>0;){let a=null,s=Number.MAX_SAFE_INTEGER;for(let d=0;d<t.children.length;d++){let p=t.children[d],u={x:p.offsetLeft+p.offsetWidth/2,y:p.offsetTop+p.offsetHeight/2},C=Jre(u,r);p.offsetTop>=0&&p.offsetWidth>0&&p.offsetHeight>0&&C<=s&&(a=p,s=C)}if(a===null)break;t=a}return t}catch(o){return mt.catch("Error in utils getNestedInnermostElement: ",o),null}},tae=()=>{try{let i=window.innerWidth/2,o=window.innerHeight/2,n=document.elementFromPoint(i,o);for(;n&&n.tagName==="BODY";)o+=2,n=document.elementFromPoint(i,o);return n}catch(i){return mt.catch("Error in utils getCenteredBackgroundElement: ",i),null}},Ej=(i,o,n=!1)=>{try{let e=i.getBoundingClientRect(),t=o.getBoundingClientRect(),r=o.offsetTop;n&&(r=r-e.height/2+t.height/2),i.scrollTo({top:r,behavior:"smooth"})}catch(e){mt.catch("Error in utils nestedScrollIntoView: ",e)}},HP=(i,o=!0)=>{try{let n=document.body.getBoundingClientRect(),e=i.getBoundingClientRect(),t=e.top-n.top,r=window.innerHeight,a=t;o&&(a=a-r/2+e.height/2),window.scrollTo({top:a,behavior:"smooth"})}catch(n){mt.catch("Error in utils scrollIntoView: ",n)}},nae=(i=!1)=>{try{let o=!0;return i&&(o=/\sChrome\/[\d.]+ Mobile\s/.test(navigator.userAgent)),"ontouchstart"in window||navigator.maxTouchPoints>0||o}catch(o){return mt.catch("Error in utils isTouchDevice: ",o),!1}},iae=(i,o,n)=>{try{return(1-n)*i+n*o}catch(e){mt.catch("Error in utils lerp: ",e)}return 0},oae=(i,o)=>{try{if(i===void 0)return i;if(i=i.replace("#",""),i.length===6){let n=parseInt(i,16),e=(n>>16)+o;e>255&&(e=255),e<0&&(e=0);let t=(n&255)+o;t>255&&(t=255),t<0&&(t=0);let r=(n>>8&255)+o;return r>255&&(r=255),r<0&&(r=0),`#${(t|r<<8|e<<16).toString(16)}`}else return i}catch(n){mt.catch("Error in utils multiplyColor: ",n)}return i},rae=i=>{try{return i in j.TEXT_COLOR_MAP?j.TEXT_COLOR_MAP[i]:"#141416"}catch(o){return mt.catch("Error in generateUserColor:",o),"#141416"}},Tc=()=>{try{let i=localStorage.getItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS);if(i)return JSON.parse(i)}catch(i){return mt.catch("Error in getDefaultMediaStreamOptions:",i),{}}},zP=(i,o)=>{try{let n=o*(Math.PI/180),e=Math.cos(n);return e?i/e:i}catch(n){return mt.catch("Error in calculateHypotenuse:",n),0}},xj=(i,o,n=!0)=>{try{let e=[],t=n?i:i.parentNode;for(;t;)e.push(t),t=t.parentNode;let r=n?o:o.parentNode;for(;r;){if(e.indexOf(r)!==-1)return r;r=r.parentNode}return null}catch(e){return mt.catch("Error in utils findCommonParent: ",e),null}},Tj=(i,o,n,e)=>{let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),a=t.left+i,s=t.top+o,d=a-r.left,p=s-r.top;return{x:d,y:p}},Up=i=>{try{let o={height:0,width:0};if(typeof i?.getBBox=="function"){let n=i?.getBBox(),e=i?.getBoundingClientRect();o.height=parseFloat(e?.height||n.height||0),o.width=parseFloat(e?.width||n.width||0)}else{let n=window.getComputedStyle(i);if(o.height=i?.clientHeight||parseFloat(n.getPropertyValue("height"))||0,o.width=i?.clientWidth||parseFloat(n.getPropertyValue("width"))||0,i?.getBoundingClientRect&&typeof i?.getBoundingClientRect=="function"){let e=i?.getBoundingClientRect();o?.height||(o.height=e?.height||i?.clientHeight||i?.offsetHeight||0),o?.width||(o.width=e?.width||i?.clientWidth||i?.offsetWidth||0)}}return o}catch(o){return mt.catch("Error in utils getElementDimensions: ",o),{height:0,width:0}}},Dd=i=>{try{let o=i;for(;o;){if(window?.getComputedStyle(o)?.getPropertyValue("background-clip")=="text")return!0;o=o?.parentElement}return!1}catch(o){return mt.catch("Error in utils hasParentWithBackgroundClip: ",o),!1}},Uke=i=>{try{let o=i;for(;o;){if(o.toString()==="[object ShadowRoot]")return o;o=o.parentNode}}catch(o){mt.catch("Error in utils findShadowRoot: ",o)}return null},qn=i=>{try{let o=["commentCategories","color","resolved","inProgress","positionX","positionY","screenWidth","screenHeight","screenScrollHeight","screenScrollTop","taggedElementPath","taggedElementRect","targetElement","position","documentParamsId","documentParams","ghostComment","areaAnnotationId","iam","commentSource"],n=JSON.parse(JSON.stringify(i)),e={};return Object.keys(n).forEach(t=>{o.includes(t)||(e[t]=n[t])}),JSON.parse(JSON.stringify(e))}catch(o){return mt.catch("Error in utils getCommentAnnotationForClient: ",o),null}};var Ev=i=>i===null||typeof i>"u",xv=(i,o)=>{try{return!!i?.closest(`[${o}]`)}catch(n){return mt.catch("Error in utils hasParentWithAttribute: ",n),!1}},Dj=(i,o=!0)=>{try{let n=[];if(!i||!(i instanceof HTMLElement))return[];o&&n.push(i);for(let e=0;e<i.children.length;e++){let t=i.children[e];n=n.concat(Dj(t))}return n}catch(n){return mt.catch("Error in utils getAllNestedChildren: ",n),[]}},aae=()=>{try{return document.visibilityState==="hidden"?!1:document.hasFocus()}catch(i){return mt.catch("Error in utils isTabActive: ",i),!1}},wj=i=>{try{let o="",n=i?.getAttribute("src");if(n)o=`${fn(n)}`;else{let e=i?.querySelectorAll("source");if(e&&e.length>0){let r=e[0]?.getAttribute("src");r&&(o=`${fn(r)}`)}}return o}catch{return""}},Ke=i=>{try{return!(i&&(i?.children?.length>0||i?.textContent?.trim()?.length>0))}catch(o){return mt.catch("Error in utils isTemplateEmpty: ",o),!0}},ha=(i,o)=>{try{if(!i||!o)return;let n=[],e="",t=0;for(let d=0;d<o.length;d++){let p=o[d];p==="["?(t++,t===1&&e&&(n.push(e),e=""),e+=p):p==="]"?(t--,e+=p,t===0&&(n.push(e),e="")):p==="."&&t===0?e&&(n.push(e),e=""):e+=p}e&&n.push(e);let r,a=I({},i),s=n.reduce((d,p)=>{if(d==null)return;Ui(d)&&(r=d,d=d());let u=p.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(u){let E=u[1];if(/^\d+$/.test(E)){let D=parseInt(E,10);return Array.isArray(d)?d[D]:void 0}if(E.startsWith("'")&&E.endsWith("'")||E.startsWith('"')&&E.endsWith('"')){let D=E.slice(1,-1);return d[D]}if(E.includes(".")||E.includes("[")){let D=ha(a,E);Ui(D)&&(D=D());let L=D?.toString()||"";return d[L]}if(a[E]!==void 0){let D=a[E];return Ui(D)&&(D=D()),d[D]}return d[E]}let C=p;return(p.startsWith("'")&&p.endsWith("'")||p.startsWith('"')&&p.endsWith('"'))&&(C=p.slice(1,-1)),C==="length"&&Array.isArray(d)?d.length:d[C]},i);return r?Fi(()=>{try{let d=I({},i);return n.reduce((p,u)=>{if(p==null)return;Ui(p)&&(p=p());let C=u.match(/^\[([^\[\]]+|(\[[^\[\]]*\]))\]$/);if(C){let D=C[1];if(/^\d+$/.test(D)){let L=parseInt(D,10);return Array.isArray(p)?p[L]:void 0}if(D.startsWith("'")&&D.endsWith("'")||D.startsWith('"')&&D.endsWith('"')){let L=D.slice(1,-1);return p[L]}if(D.includes(".")||D.includes("[")){let L=ha(d,D);Ui(L)&&(L=L());let G=L?.toString()||"";return p[G]}if(d[D]!==void 0){let L=d[D];return Ui(L)&&(L=L()),p[L]}return p[D]}let E=u;return(u.startsWith("'")&&u.endsWith("'")||u.startsWith('"')&&u.endsWith('"'))&&(E=u.slice(1,-1)),p[E]},i)}catch{return""}}):s}catch{return""}},Yu=(i,o)=>{try{return!!(i?.locationId&&(i.locationId===o?.locationId||o?.location?.id===String(i.locationId))||i?.location?.id&&(i.location.id===o?.location?.id||i.location.id===String(o?.locationId)))}catch(n){return mt.catch("Error in utils isLocationSame: ",n),!1}},sae=()=>{try{let i=document.activeElement,o=new Set,n=10,e=0;for(;i&&i.shadowRoot&&!(o.has(i)||(o.add(i),i=i.shadowRoot.activeElement,e++,e>n)););return i}catch(i){return mt.catch("Error in utils getActiveElement: ",i),null}},si=(i,o)=>{try{return typeof i=="object"&&typeof o=="object"?JSON.stringify(i)===JSON.stringify(o):i===o}catch{return!1}},Tv=i=>{try{let o=JSON.parse(JSON.stringify(i));return i?.clientDocumentId&&(o.documentId=i.clientDocumentId),i?.clientOrganizationId&&(o.organizationId=i.clientOrganizationId),delete o?.clientDocumentId,delete o?.clientOrganizationId,delete o?.veltFolderId,delete o?.parentVeltFolderId,delete o?.pageInfo,o}catch{return i}},va=i=>{try{if(!i.some(a=>a?.value?.data))return{};let o=null,n=i.reduce((a,s)=>Math.max(a,s.timestamp),0),e=i.find(a=>a.timestamp===n);if(!e)return{};e?.value?.operation?.type==="removed"&&(o=e?.value?.operation);let r=i.map(a=>a.value).reduce((a,s)=>({data:I(I({},a?.data??{}),s?.data??{})}),{});return r.operation=o,r}catch{return{}}},Dc=(i,o,n)=>Q(void 0,null,function*(){try{let e=0;for(;e<=(n.retryCount||0);)try{let t=yield i();if(!t)return{success:!1,statusCode:400,message:`${o} failed: No response received`};if(t.statusCode===void 0)return{success:!1,statusCode:400,message:`${o} failed: Response missing statusCode`};if(t.statusCode!==200){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:t.statusCode,message:`${o} failed after ${e} attempts with status code ${t.statusCode}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)));continue}return t}catch(t){if(e++,e>(n.retryCount||0))return{success:!1,statusCode:500,message:`${o} failed with error: ${t instanceof Error?t.message:"Unknown error"}`};n.retryDelay&&(yield new Promise(r=>setTimeout(r,n.retryDelay)))}return{success:!0,statusCode:200}}catch(e){return{success:!1,statusCode:500,message:`${o} failed with unexpected error: ${e instanceof Error?e.message:"Unknown error"}`}}}),lae=(i,o)=>Q(void 0,null,function*(){try{let n=0;for(;n<=(o.retryCount||0);)try{let e=yield i();if(!e)throw new Error("No response received");return e}catch{if(n++,n>=(o.retryCount||0))return null;o.retryDelay&&(yield new Promise(t=>setTimeout(t,o.retryDelay)))}return null}catch{return null}}),Ca=i=>{try{if(i&&typeof i=="object"){let o=JSON.parse(JSON.stringify(i));return o?.clientOrganizationId&&(o.organizationId=o.clientOrganizationId,delete o.clientOrganizationId),o?.clientGroupId&&(o.groupId=o.clientGroupId,delete o.clientGroupId),o?.userSnippylyId&&delete o.userSnippylyId,o}else return null}catch(o){return mt.catch("Error in utils getUserForClient: ",o),null}},br=({url:i,apiProxyDomain:o})=>{try{if(o){let n=new URL(i);n.origin&&(i=i.replace(n.origin,o))}return i}catch(n){return mt.catch("Error in utils getResolvedApiUrl: ",n),i}};var tt=(()=>{let o=class o{constructor(e){this.functions=e,this.sf=!1,this.defaultProperties={},this.draftEvents=[],this.eventRateLimitCache={},this.EVENT_LIMIT=50,this.TIME_WINDOW_MS=60*1e3;try{this.updateDefaultProperties({sdkVersion:fa()}),window?.location?.href&&(this.defaultProperties.pageUrl=window.location.href)}catch(t){mt.catch("Error in AnalyticsService constructor: ",t)}}updateDefaultProperties(e={}){this.defaultProperties=I(I({},this.defaultProperties),e)}setInstalledFeature(e){try{this.defaultProperties?.installedFeatures||(this.defaultProperties.installedFeatures=[]),this.defaultProperties.installedFeatures.includes(e)||this.defaultProperties.installedFeatures.push(e)}catch(t){mt.catch("Error in AnalyticsService setInstalledFeature: ",t)}}setFeatureConfig({feature:e,config:t}){try{this.defaultProperties.featureConfigs||(this.defaultProperties.featureConfigs={}),this.defaultProperties.featureConfigs[e]||(this.defaultProperties.featureConfigs[e]={}),this.defaultProperties.featureConfigs[e]=I(I({},this.defaultProperties.featureConfigs[e]),t)}catch(r){mt.catch("Error in AnalyticsService setFeatureConfig: ",r)}}setSF(e){try{this.sf=e}catch(t){mt.catch("Error in AnalyticsService setSF: ",t)}}setAuthService(e){try{this.authService=e}catch(t){mt.catch("Error in AnalyticsService setAuthService: ",t)}}setCommentService(e){try{this.commentService=e}catch(t){mt.catch("Error in AnalyticsService setCommentService: ",t)}}setConfigService(e){try{this.configService=e}catch(t){mt.catch("Error in AnalyticsService setConfigService: ",t)}}setAreaService(e){try{this.areaService=e}catch(t){mt.catch("Error in AnalyticsService setAreaService: ",t)}}setRecorderAnnotationService(e){try{this.recorderAnnotationService=e}catch(t){mt.catch("Error in AnalyticsService setRecorderAnnotationService: ",t)}}setReactionService(e){try{this.reactionService=e}catch(t){mt.catch("Error in AnalyticsService setReactionService: ",t)}}setUserService(e){try{this.userService=e}catch(t){mt.catch("Error in AnalyticsService setUserService: ",t)}}identifyUser(e,t,r={}){try{this.userId=e;let a=typeof t=="object"?JSON.parse(JSON.stringify(t)):t;this.userService?.userDataProviderAvailable()&&a?.userId&&(a={userId:a.userId}),this.user=a;let s=this.defaultProperties?this.defaultProperties.apiKey:null;if(ni.production||ni.staging){let d=Date.now(),p={userId:e,clientUserId:this.user?.userId,traits:T(I({},a),{apiKey:s,forceReset:r?.forceReset,eventTimestamp:d}),properties:T(I({},this.defaultProperties),{eventTimestamp:d}),sf:this.sf,context:this.getContext(),eventTimestamp:d};this.setAnalytics("identify",p)}if(this.userId&&this.draftEvents?.length){let d=this.draftEvents?.slice();this.draftEvents=[],d?.forEach(p=>{switch(p.type){case"track":p?.data?.eventName&&this.trackEvent(p.data.eventName,p.data.properties,p.data.mergeDefaultProperties,p.data.userId,p.data.clientUserId);break;default:break}})}}catch(a){mt.catch("Error in AnalyticsService identifyUser: ",a)}}trackPage(e,t="",r={}){try{if((ni.production||ni.staging)&&this.userId){let a={userId:this.userId,clientUserId:this.user?.userId,name:e,properties:r,sf:this.sf,context:this.getContext()};this.setAnalytics("page",a)}}catch(a){mt.catch("Error in AnalyticsService trackPage: ",a)}}trackEvent(d){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{if(this.sf&&Nre.includes(e))return;if(ni.production||ni.staging)if(this.userId||a){if(this.eventRateLimitCache[e]?.blockedForSession)return;let p=Date.now();if(this.eventRateLimitCache[e]&&p-this.eventRateLimitCache[e].timestamp<this.TIME_WINDOW_MS){if(this.eventRateLimitCache[e].count>=this.EVENT_LIMIT){if(!this.eventRateLimitCache[e].rateLimitExceededEventTriggered){this.eventRateLimitCache[e].rateLimitExceededEventTriggered=!0,this.eventRateLimitCache[e].blockedForSession=!0;let u=I({eventName:e},t||{});this.triggerTrackEvent(X.Events.Core.SDK_EVENT_RATE_LIMIT_EXCEEDED,u,r,a,s)}return}this.eventRateLimitCache[e].count++}else this.eventRateLimitCache[e]={count:1,timestamp:p,rateLimitExceededEventTriggered:!1,blockedForSession:!1};return this.triggerTrackEvent(e,t,r,a,s)}else t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.draftEvents.push({type:"track",data:{eventName:e,properties:t,mergeDefaultProperties:r,userId:a,clientUserId:s}})}catch(p){mt.catch("Error in AnalyticsService trackEvent: ",p)}})}triggerTrackEvent(d){return Q(this,arguments,function*(e,t={},r=!0,a,s){try{r&&(t||(t={}),t=I(I({},t),this.defaultProperties));let p;if(t?.annotationId){let C=t.annotationId;if(!p&&this.commentService){let E=this.commentService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId);let D=this.commentService.getMultiThreadAnnotationById(C);D?.metadata&&(p=D.metadata),D?.targetElementId&&(t.targetElementId=D.targetElementId)}if(!p&&this.recorderAnnotationService){let E=this.recorderAnnotationService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}if(!p&&this.reactionService){let E=this.reactionService.getAnnotationById(C);E?.metadata&&(p=E.metadata),E?.targetElementId&&(t.targetElementId=E.targetElementId)}if(!p&&this.areaService){let E=this.areaService.getAnnotationById(C);E?.metadata&&(p=E.metadata)}}p&&typeof p=="object"&&(t=I(I({},t),p)),t&&typeof t=="object"&&(t=T(I({},t),{userId:this.userId||a,clientUserId:this.user?.userId||s}),t?.eventTimestamp||(t.eventTimestamp=Date.now()));let u={userId:this.userId||a,clientUserId:this.user?.userId||s,event:e,properties:t,sf:this.sf,context:this.getContext(),eventTimestamp:t?.eventTimestamp};return this.setAnalytics("track",u)}catch(p){mt.catch("Error in AnalyticsService triggerTrackEvent: ",p)}})}setAnalytics(e,t){return Q(this,null,function*(){try{return navigator.onLine?yr(this.functions,br({url:ni.cloudFunction.sa,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:20*60*1e3})({type:e,data:t}).catch(a=>{mt.warn("Error in AnalyticsService setAnalytics promise: ",e,a)}):void 0}catch(r){mt.catch("Error in AnalyticsService setAnalytics: ",r)}})}trackAuthenticatedEvent(e,t={},r=!0){try{this.authService?.getUser$&&typeof this.authService?.getUser$()?.subscribe=="function"&&(this.authService.getUser()?this.trackEvent(e,t,r):((!t||typeof t!="object")&&(t={}),t?.eventTimestamp||(t.eventTimestamp=Date.now()),this.authService?.getUser$()?.pipe(Le(a=>!!a),rt(1))?.subscribe(()=>{this.trackEvent(e,t,r)})))}catch(a){mt.catch("Error in AnalyticsService trackAuthenticatedEvent: ",a)}}getContext(){try{let e={},t=xi();return e.os={name:t?.deviceInfo?.osName,version:t?.deviceInfo?.osVersion},e.page={path:t?.path,title:t?.title,url:t?.url},e.screen={height:t?.deviceInfo?.screenHeight,width:t?.deviceInfo?.screenWidth},e.app={name:t?.deviceInfo?.browserName,version:t?.deviceInfo?.browserVersion},e.device={type:t?.deviceInfo?.deviceType},e.timezone=Xre(),e.userAgent=t?.deviceInfo?.userAgent,e}catch(e){mt.catch("Error in AnalyticsService getContext: ",e)}}};o.\u0275fac=function(t){return new(t||o)(J($o))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var y=(()=>{let o=class o{get debugMode(){return Lre()}get logsEnabled(){return this.logsEnabled$.value}constructor(e){this.analyticsService=e,this.logsEnabled$=new ve(!0),this.log("%c[WB] Creating SERVICE LoggingService","color: blue;")}enableLogs(){try{if(this.logsEnabled$.value===!0)return;this.logsEnabled$.next(!0)}catch(e){this.catch("Error in LoggingService enableLogs: ",e)}}disableLogs(){try{if(this.logsEnabled$.value===!1)return;this.logsEnabled$.next(!1)}catch(e){this.catch("Error in LoggingService disableLogs: ",e)}}log(e,...t){this.debugMode&&console.log(e,...t)}warn(e,...t){this.debugMode&&console.warn(e,...t)}error(e,...t){this.debugMode&&console.error(e,...t)}debug(e,...t){this.debugMode&&console.debug(e,...t)}info(e,...t){this.debugMode&&console.info(e,...t)}catch(e,t,r,a=!1){try{let s=t?.message;this.logsEnabled$.value&&(s?.toLowerCase()?.includes("permission denied")||s?.toLowerCase()?.includes("permission_denied")||(t!==void 0?console.warn("Velt: ",e,t):console.warn("Velt: ",e))),a||this.analyticsService.trackEvent(X.Events.Core.SDK_ERROR,I({sourceMethod:e,message:(t?.message?t?.message:t)||e,clientUserId:this.analyticsService?.user?.userId,snippylyUserId:this.analyticsService?.user?.userSnippylyId,source:"sdk"},r||{}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(J(tt))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var cae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dae={};var Rm,Oj;(function(){var i;function o(we,Se){function Oe(){}Oe.prototype=Se.prototype,we.D=Se.prototype,we.prototype=new Oe,we.prototype.constructor=we,we.C=function(_e,fe,Ae){for(var xe=Array(arguments.length-2),Pn=2;Pn<arguments.length;Pn++)xe[Pn-2]=arguments[Pn];return Se.prototype[fe].apply(_e,xe)}}function n(){this.blockSize=-1}function e(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}o(e,n),e.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function t(we,Se,Oe){Oe||(Oe=0);var _e=Array(16);if(typeof Se=="string")for(var fe=0;16>fe;++fe)_e[fe]=Se.charCodeAt(Oe++)|Se.charCodeAt(Oe++)<<8|Se.charCodeAt(Oe++)<<16|Se.charCodeAt(Oe++)<<24;else for(fe=0;16>fe;++fe)_e[fe]=Se[Oe++]|Se[Oe++]<<8|Se[Oe++]<<16|Se[Oe++]<<24;Se=we.g[0],Oe=we.g[1],fe=we.g[2];var Ae=we.g[3],xe=Se+(Ae^Oe&(fe^Ae))+_e[0]+3614090360&4294967295;Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[1]+3905402710&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[2]+606105819&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[3]+3250441966&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[4]+4118548399&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[5]+1200080426&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[6]+2821735955&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[7]+4249261313&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[8]+1770035416&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[9]+2336552879&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[10]+4294925233&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[11]+2304563134&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(Ae^Oe&(fe^Ae))+_e[12]+1804603682&4294967295,Se=Oe+(xe<<7&4294967295|xe>>>25),xe=Ae+(fe^Se&(Oe^fe))+_e[13]+4254626195&4294967295,Ae=Se+(xe<<12&4294967295|xe>>>20),xe=fe+(Oe^Ae&(Se^Oe))+_e[14]+2792965006&4294967295,fe=Ae+(xe<<17&4294967295|xe>>>15),xe=Oe+(Se^fe&(Ae^Se))+_e[15]+1236535329&4294967295,Oe=fe+(xe<<22&4294967295|xe>>>10),xe=Se+(fe^Ae&(Oe^fe))+_e[1]+4129170786&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[6]+3225465664&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[11]+643717713&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[0]+3921069994&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[5]+3593408605&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[10]+38016083&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[15]+3634488961&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[4]+3889429448&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[9]+568446438&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[14]+3275163606&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[3]+4107603335&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[8]+1163531501&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(fe^Ae&(Oe^fe))+_e[13]+2850285829&4294967295,Se=Oe+(xe<<5&4294967295|xe>>>27),xe=Ae+(Oe^fe&(Se^Oe))+_e[2]+4243563512&4294967295,Ae=Se+(xe<<9&4294967295|xe>>>23),xe=fe+(Se^Oe&(Ae^Se))+_e[7]+1735328473&4294967295,fe=Ae+(xe<<14&4294967295|xe>>>18),xe=Oe+(Ae^Se&(fe^Ae))+_e[12]+2368359562&4294967295,Oe=fe+(xe<<20&4294967295|xe>>>12),xe=Se+(Oe^fe^Ae)+_e[5]+4294588738&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[8]+2272392833&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[11]+1839030562&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[14]+4259657740&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[1]+2763975236&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[4]+1272893353&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[7]+4139469664&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[10]+3200236656&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[13]+681279174&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[0]+3936430074&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[3]+3572445317&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[6]+76029189&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(Oe^fe^Ae)+_e[9]+3654602809&4294967295,Se=Oe+(xe<<4&4294967295|xe>>>28),xe=Ae+(Se^Oe^fe)+_e[12]+3873151461&4294967295,Ae=Se+(xe<<11&4294967295|xe>>>21),xe=fe+(Ae^Se^Oe)+_e[15]+530742520&4294967295,fe=Ae+(xe<<16&4294967295|xe>>>16),xe=Oe+(fe^Ae^Se)+_e[2]+3299628645&4294967295,Oe=fe+(xe<<23&4294967295|xe>>>9),xe=Se+(fe^(Oe|~Ae))+_e[0]+4096336452&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[7]+1126891415&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[14]+2878612391&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[5]+4237533241&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[12]+1700485571&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[3]+2399980690&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[10]+4293915773&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[1]+2240044497&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[8]+1873313359&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[15]+4264355552&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[6]+2734768916&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[13]+1309151649&4294967295,Oe=fe+(xe<<21&4294967295|xe>>>11),xe=Se+(fe^(Oe|~Ae))+_e[4]+4149444226&4294967295,Se=Oe+(xe<<6&4294967295|xe>>>26),xe=Ae+(Oe^(Se|~fe))+_e[11]+3174756917&4294967295,Ae=Se+(xe<<10&4294967295|xe>>>22),xe=fe+(Se^(Ae|~Oe))+_e[2]+718787259&4294967295,fe=Ae+(xe<<15&4294967295|xe>>>17),xe=Oe+(Ae^(fe|~Se))+_e[9]+3951481745&4294967295,we.g[0]=we.g[0]+Se&4294967295,we.g[1]=we.g[1]+(fe+(xe<<21&4294967295|xe>>>11))&4294967295,we.g[2]=we.g[2]+fe&4294967295,we.g[3]=we.g[3]+Ae&4294967295}e.prototype.u=function(we,Se){Se===void 0&&(Se=we.length);for(var Oe=Se-this.blockSize,_e=this.B,fe=this.h,Ae=0;Ae<Se;){if(fe==0)for(;Ae<=Oe;)t(this,we,Ae),Ae+=this.blockSize;if(typeof we=="string"){for(;Ae<Se;)if(_e[fe++]=we.charCodeAt(Ae++),fe==this.blockSize){t(this,_e),fe=0;break}}else for(;Ae<Se;)if(_e[fe++]=we[Ae++],fe==this.blockSize){t(this,_e),fe=0;break}}this.h=fe,this.o+=Se},e.prototype.v=function(){var we=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);we[0]=128;for(var Se=1;Se<we.length-8;++Se)we[Se]=0;var Oe=8*this.o;for(Se=we.length-8;Se<we.length;++Se)we[Se]=Oe&255,Oe/=256;for(this.u(we),we=Array(16),Se=Oe=0;4>Se;++Se)for(var _e=0;32>_e;_e+=8)we[Oe++]=this.g[Se]>>>_e&255;return we};function r(we,Se){var Oe=s;return Object.prototype.hasOwnProperty.call(Oe,we)?Oe[we]:Oe[we]=Se(we)}function a(we,Se){this.h=Se;for(var Oe=[],_e=!0,fe=we.length-1;0<=fe;fe--){var Ae=we[fe]|0;_e&&Ae==Se||(Oe[fe]=Ae,_e=!1)}this.g=Oe}var s={};function d(we){return-128<=we&&128>we?r(we,function(Se){return new a([Se|0],0>Se?-1:0)}):new a([we|0],0>we?-1:0)}function p(we){if(isNaN(we)||!isFinite(we))return C;if(0>we)return Y(p(-we));for(var Se=[],Oe=1,_e=0;we>=Oe;_e++)Se[_e]=we/Oe|0,Oe*=4294967296;return new a(Se,0)}function u(we,Se){if(we.length==0)throw Error("number format error: empty string");if(Se=Se||10,2>Se||36<Se)throw Error("radix out of range: "+Se);if(we.charAt(0)=="-")return Y(u(we.substring(1),Se));if(0<=we.indexOf("-"))throw Error('number format error: interior "-" character');for(var Oe=p(Math.pow(Se,8)),_e=C,fe=0;fe<we.length;fe+=8){var Ae=Math.min(8,we.length-fe),xe=parseInt(we.substring(fe,fe+Ae),Se);8>Ae?(Ae=p(Math.pow(Se,Ae)),_e=_e.j(Ae).add(p(xe))):(_e=_e.j(Oe),_e=_e.add(p(xe)))}return _e}var C=d(0),E=d(1),D=d(16777216);i=a.prototype,i.m=function(){if(G(this))return-Y(this).m();for(var we=0,Se=1,Oe=0;Oe<this.g.length;Oe++){var _e=this.i(Oe);we+=(0<=_e?_e:4294967296+_e)*Se,Se*=4294967296}return we},i.toString=function(we){if(we=we||10,2>we||36<we)throw Error("radix out of range: "+we);if(L(this))return"0";if(G(this))return"-"+Y(this).toString(we);for(var Se=p(Math.pow(we,6)),Oe=this,_e="";;){var fe=Re(Oe,Se).g;Oe=ne(Oe,fe.j(Se));var Ae=((0<Oe.g.length?Oe.g[0]:Oe.h)>>>0).toString(we);if(Oe=fe,L(Oe))return Ae+_e;for(;6>Ae.length;)Ae="0"+Ae;_e=Ae+_e}},i.i=function(we){return 0>we?0:we<this.g.length?this.g[we]:this.h};function L(we){if(we.h!=0)return!1;for(var Se=0;Se<we.g.length;Se++)if(we.g[Se]!=0)return!1;return!0}function G(we){return we.h==-1}i.l=function(we){return we=ne(this,we),G(we)?-1:L(we)?0:1};function Y(we){for(var Se=we.g.length,Oe=[],_e=0;_e<Se;_e++)Oe[_e]=~we.g[_e];return new a(Oe,~we.h).add(E)}i.abs=function(){return G(this)?Y(this):this},i.add=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0,fe=0;fe<=Se;fe++){var Ae=_e+(this.i(fe)&65535)+(we.i(fe)&65535),xe=(Ae>>>16)+(this.i(fe)>>>16)+(we.i(fe)>>>16);_e=xe>>>16,Ae&=65535,xe&=65535,Oe[fe]=xe<<16|Ae}return new a(Oe,Oe[Oe.length-1]&-2147483648?-1:0)};function ne(we,Se){return we.add(Y(Se))}i.j=function(we){if(L(this)||L(we))return C;if(G(this))return G(we)?Y(this).j(Y(we)):Y(Y(this).j(we));if(G(we))return Y(this.j(Y(we)));if(0>this.l(D)&&0>we.l(D))return p(this.m()*we.m());for(var Se=this.g.length+we.g.length,Oe=[],_e=0;_e<2*Se;_e++)Oe[_e]=0;for(_e=0;_e<this.g.length;_e++)for(var fe=0;fe<we.g.length;fe++){var Ae=this.i(_e)>>>16,xe=this.i(_e)&65535,Pn=we.i(fe)>>>16,Nn=we.i(fe)&65535;Oe[2*_e+2*fe]+=xe*Nn,ge(Oe,2*_e+2*fe),Oe[2*_e+2*fe+1]+=Ae*Nn,ge(Oe,2*_e+2*fe+1),Oe[2*_e+2*fe+1]+=xe*Pn,ge(Oe,2*_e+2*fe+1),Oe[2*_e+2*fe+2]+=Ae*Pn,ge(Oe,2*_e+2*fe+2)}for(_e=0;_e<Se;_e++)Oe[_e]=Oe[2*_e+1]<<16|Oe[2*_e];for(_e=Se;_e<2*Se;_e++)Oe[_e]=0;return new a(Oe,0)};function ge(we,Se){for(;(we[Se]&65535)!=we[Se];)we[Se+1]+=we[Se]>>>16,we[Se]&=65535,Se++}function ye(we,Se){this.g=we,this.h=Se}function Re(we,Se){if(L(Se))throw Error("division by zero");if(L(we))return new ye(C,C);if(G(we))return Se=Re(Y(we),Se),new ye(Y(Se.g),Y(Se.h));if(G(Se))return Se=Re(we,Y(Se)),new ye(Y(Se.g),Se.h);if(30<we.g.length){if(G(we)||G(Se))throw Error("slowDivide_ only works with positive integers.");for(var Oe=E,_e=Se;0>=_e.l(we);)Oe=We(Oe),_e=We(_e);var fe=Be(Oe,1),Ae=Be(_e,1);for(_e=Be(_e,2),Oe=Be(Oe,2);!L(_e);){var xe=Ae.add(_e);0>=xe.l(we)&&(fe=fe.add(Oe),Ae=xe),_e=Be(_e,1),Oe=Be(Oe,1)}return Se=ne(we,fe.j(Se)),new ye(fe,Se)}for(fe=C;0<=we.l(Se);){for(Oe=Math.max(1,Math.floor(we.m()/Se.m())),_e=Math.ceil(Math.log(Oe)/Math.LN2),_e=48>=_e?1:Math.pow(2,_e-48),Ae=p(Oe),xe=Ae.j(Se);G(xe)||0<xe.l(we);)Oe-=_e,Ae=p(Oe),xe=Ae.j(Se);L(Ae)&&(Ae=E),fe=fe.add(Ae),we=ne(we,xe)}return new ye(fe,we)}i.A=function(we){return Re(this,we).h},i.and=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)&we.i(_e);return new a(Oe,this.h&we.h)},i.or=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)|we.i(_e);return new a(Oe,this.h|we.h)},i.xor=function(we){for(var Se=Math.max(this.g.length,we.g.length),Oe=[],_e=0;_e<Se;_e++)Oe[_e]=this.i(_e)^we.i(_e);return new a(Oe,this.h^we.h)};function We(we){for(var Se=we.g.length+1,Oe=[],_e=0;_e<Se;_e++)Oe[_e]=we.i(_e)<<1|we.i(_e-1)>>>31;return new a(Oe,we.h)}function Be(we,Se){var Oe=Se>>5;Se%=32;for(var _e=we.g.length-Oe,fe=[],Ae=0;Ae<_e;Ae++)fe[Ae]=0<Se?we.i(Ae+Oe)>>>Se|we.i(Ae+Oe+1)<<32-Se:we.i(Ae+Oe);return new a(fe,we.h)}e.prototype.digest=e.prototype.v,e.prototype.reset=e.prototype.s,e.prototype.update=e.prototype.u,Oj=dae.Md5=e,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.A,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=p,a.fromString=u,Rm=dae.Integer=a}).apply(typeof cae<"u"?cae:typeof self<"u"?self:typeof window<"u"?window:{});var GP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nm={};var Aj,jke,Dv,Pj,FS,WP,Mj,kj,Rj;(function(){var i,o=typeof Object.defineProperties=="function"?Object.defineProperty:function(V,te,me){return V==Array.prototype||V==Object.prototype||(V[te]=me.value),V};function n(V){V=[typeof globalThis=="object"&&globalThis,V,typeof window=="object"&&window,typeof self=="object"&&self,typeof GP=="object"&&GP];for(var te=0;te<V.length;++te){var me=V[te];if(me&&me.Math==Math)return me}throw Error("Cannot find global object")}var e=n(this);function t(V,te){if(te)e:{var me=e;V=V.split(".");for(var Ie=0;Ie<V.length-1;Ie++){var Ge=V[Ie];if(!(Ge in me))break e;me=me[Ge]}V=V[V.length-1],Ie=me[V],te=te(Ie),te!=Ie&&te!=null&&o(me,V,{configurable:!0,writable:!0,value:te})}}function r(V,te){V instanceof String&&(V+="");var me=0,Ie=!1,Ge={next:function(){if(!Ie&&me<V.length){var ot=me++;return{value:te(ot,V[ot]),done:!1}}return Ie=!0,{done:!0,value:void 0}}};return Ge[Symbol.iterator]=function(){return Ge},Ge}t("Array.prototype.values",function(V){return V||function(){return r(this,function(te,me){return me})}});var a=a||{},s=this||self;function d(V){var te=typeof V;return te=te!="object"?te:V?Array.isArray(V)?"array":te:"null",te=="array"||te=="object"&&typeof V.length=="number"}function p(V){var te=typeof V;return te=="object"&&V!=null||te=="function"}function u(V,te,me){return V.call.apply(V.bind,arguments)}function C(V,te,me){if(!V)throw Error();if(2<arguments.length){var Ie=Array.prototype.slice.call(arguments,2);return function(){var Ge=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(Ge,Ie),V.apply(te,Ge)}}return function(){return V.apply(te,arguments)}}function E(V,te,me){return E=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?u:C,E.apply(null,arguments)}function D(V,te){var me=Array.prototype.slice.call(arguments,1);return function(){var Ie=me.slice();return Ie.push.apply(Ie,arguments),V.apply(this,Ie)}}function L(V,te){function me(){}me.prototype=te.prototype,V.aa=te.prototype,V.prototype=new me,V.prototype.constructor=V,V.Qb=function(Ie,Ge,ot){for(var Rt=Array(arguments.length-2),ro=2;ro<arguments.length;ro++)Rt[ro-2]=arguments[ro];return te.prototype[Ge].apply(Ie,Rt)}}function G(V){let te=V.length;if(0<te){let me=Array(te);for(let Ie=0;Ie<te;Ie++)me[Ie]=V[Ie];return me}return[]}function Y(V,te){for(let me=1;me<arguments.length;me++){let Ie=arguments[me];if(d(Ie)){let Ge=V.length||0,ot=Ie.length||0;V.length=Ge+ot;for(let Rt=0;Rt<ot;Rt++)V[Ge+Rt]=Ie[Rt]}else V.push(Ie)}}class ne{constructor(te,me){this.i=te,this.j=me,this.h=0,this.g=null}get(){let te;return 0<this.h?(this.h--,te=this.g,this.g=te.next,te.next=null):te=this.i(),te}}function ge(V){return/^[\s\xa0]*$/.test(V)}function ye(){var V=s.navigator;return V&&(V=V.userAgent)?V:""}function Re(V){return Re[" "](V),V}Re[" "]=function(){};var We=ye().indexOf("Gecko")!=-1&&!(ye().toLowerCase().indexOf("webkit")!=-1&&ye().indexOf("Edge")==-1)&&!(ye().indexOf("Trident")!=-1||ye().indexOf("MSIE")!=-1)&&ye().indexOf("Edge")==-1;function Be(V,te,me){for(let Ie in V)te.call(me,V[Ie],Ie,V)}function we(V,te){for(let me in V)te.call(void 0,V[me],me,V)}function Se(V){let te={};for(let me in V)te[me]=V[me];return te}let Oe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function _e(V,te){let me,Ie;for(let Ge=1;Ge<arguments.length;Ge++){Ie=arguments[Ge];for(me in Ie)V[me]=Ie[me];for(let ot=0;ot<Oe.length;ot++)me=Oe[ot],Object.prototype.hasOwnProperty.call(Ie,me)&&(V[me]=Ie[me])}}function fe(V){var te=1;V=V.split(":");let me=[];for(;0<te&&V.length;)me.push(V.shift()),te--;return V.length&&me.push(V.join(":")),me}function Ae(V){s.setTimeout(()=>{throw V},0)}function xe(){var V=Fn;let te=null;return V.g&&(te=V.g,V.g=V.g.next,V.g||(V.h=null),te.next=null),te}class Pn{constructor(){this.h=this.g=null}add(te,me){let Ie=Nn.get();Ie.set(te,me),this.h?this.h.next=Ie:this.g=Ie,this.h=Ie}}var Nn=new ne(()=>new At,V=>V.reset());class At{constructor(){this.next=this.g=this.h=null}set(te,me){this.h=te,this.g=me,this.next=null}reset(){this.next=this.g=this.h=null}}let Pt,Ht=!1,Fn=new Pn,Zt=()=>{let V=s.Promise.resolve(void 0);Pt=()=>{V.then(qt)}};var qt=()=>{for(var V;V=xe();){try{V.h.call(V.g)}catch(me){Ae(me)}var te=Nn;te.j(V),100>te.h&&(te.h++,V.next=te.g,te.g=V)}Ht=!1};function wi(){this.s=this.s,this.C=this.C}wi.prototype.s=!1,wi.prototype.ma=function(){this.s||(this.s=!0,this.N())},wi.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function Xt(V,te){this.type=V,this.g=this.target=te,this.defaultPrevented=!1}Xt.prototype.h=function(){this.defaultPrevented=!0};var Zn=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var V=!1,te=Object.defineProperty({},"passive",{get:function(){V=!0}});try{let me=()=>{};s.addEventListener("test",me,te),s.removeEventListener("test",me,te)}catch{}return V}();function Vi(V,te){if(Xt.call(this,V?V.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,V){var me=this.type=V.type,Ie=V.changedTouches&&V.changedTouches.length?V.changedTouches[0]:null;if(this.target=V.target||V.srcElement,this.g=te,te=V.relatedTarget){if(We){e:{try{Re(te.nodeName);var Ge=!0;break e}catch{}Ge=!1}Ge||(te=null)}}else me=="mouseover"?te=V.fromElement:me=="mouseout"&&(te=V.toElement);this.relatedTarget=te,Ie?(this.clientX=Ie.clientX!==void 0?Ie.clientX:Ie.pageX,this.clientY=Ie.clientY!==void 0?Ie.clientY:Ie.pageY,this.screenX=Ie.screenX||0,this.screenY=Ie.screenY||0):(this.clientX=V.clientX!==void 0?V.clientX:V.pageX,this.clientY=V.clientY!==void 0?V.clientY:V.pageY,this.screenX=V.screenX||0,this.screenY=V.screenY||0),this.button=V.button,this.key=V.key||"",this.ctrlKey=V.ctrlKey,this.altKey=V.altKey,this.shiftKey=V.shiftKey,this.metaKey=V.metaKey,this.pointerId=V.pointerId||0,this.pointerType=typeof V.pointerType=="string"?V.pointerType:Yd[V.pointerType]||"",this.state=V.state,this.i=V,V.defaultPrevented&&Vi.aa.h.call(this)}}L(Vi,Xt);var Yd={2:"touch",3:"pen",4:"mouse"};Vi.prototype.h=function(){Vi.aa.h.call(this);var V=this.i;V.preventDefault?V.preventDefault():V.returnValue=!1};var vo="closure_listenable_"+(1e6*Math.random()|0),sl=0;function Hr(V,te,me,Ie,Ge){this.listener=V,this.proxy=null,this.src=te,this.type=me,this.capture=!!Ie,this.ha=Ge,this.key=++sl,this.da=this.fa=!1}function ll(V){V.da=!0,V.listener=null,V.proxy=null,V.src=null,V.ha=null}function Hl(V){this.src=V,this.g={},this.h=0}Hl.prototype.add=function(V,te,me,Ie,Ge){var ot=V.toString();V=this.g[ot],V||(V=this.g[ot]=[],this.h++);var Rt=bg(V,te,Ie,Ge);return-1<Rt?(te=V[Rt],me||(te.fa=!1)):(te=new Hr(te,this.src,ot,!!Ie,Ge),te.fa=me,V.push(te)),te};function Vc(V,te){var me=te.type;if(me in V.g){var Ie=V.g[me],Ge=Array.prototype.indexOf.call(Ie,te,void 0),ot;(ot=0<=Ge)&&Array.prototype.splice.call(Ie,Ge,1),ot&&(ll(te),V.g[me].length==0&&(delete V.g[me],V.h--))}}function bg(V,te,me,Ie){for(var Ge=0;Ge<V.length;++Ge){var ot=V[Ge];if(!ot.da&&ot.listener==te&&ot.capture==!!me&&ot.ha==Ie)return Ge}return-1}var zl="closure_lm_"+(1e6*Math.random()|0),Ig={};function bh(V,te,me,Ie,Ge){if(Ie&&Ie.once)return Eg(V,te,me,Ie,Ge);if(Array.isArray(te)){for(var ot=0;ot<te.length;ot++)bh(V,te[ot],me,Ie,Ge);return null}return me=jc(me),V&&V[vo]?V.K(te,me,p(Ie)?!!Ie.capture:!!Ie,Ge):Kd(V,te,me,!1,Ie,Ge)}function Kd(V,te,me,Ie,Ge,ot){if(!te)throw Error("Invalid event type");var Rt=p(Ge)?!!Ge.capture:!!Ge,ro=Zd(V);if(ro||(V[zl]=ro=new Hl(V)),me=ro.add(te,me,Ie,Rt,ot),me.proxy)return me;if(Ie=Ih(),me.proxy=Ie,Ie.src=V,Ie.listener=me,V.addEventListener)Zn||(Ge=Rt),Ge===void 0&&(Ge=!1),V.addEventListener(te.toString(),Ie,Ge);else if(V.attachEvent)V.attachEvent(Kw(te.toString()),Ie);else if(V.addListener&&V.removeListener)V.addListener(Ie);else throw Error("addEventListener and attachEvent are unavailable.");return me}function Ih(){function V(me){return te.call(V.src,V.listener,me)}let te=I_;return V}function Eg(V,te,me,Ie,Ge){if(Array.isArray(te)){for(var ot=0;ot<te.length;ot++)Eg(V,te[ot],me,Ie,Ge);return null}return me=jc(me),V&&V[vo]?V.L(te,me,p(Ie)?!!Ie.capture:!!Ie,Ge):Kd(V,te,me,!0,Ie,Ge)}function b_(V,te,me,Ie,Ge){if(Array.isArray(te))for(var ot=0;ot<te.length;ot++)b_(V,te[ot],me,Ie,Ge);else Ie=p(Ie)?!!Ie.capture:!!Ie,me=jc(me),V&&V[vo]?(V=V.i,te=String(te).toString(),te in V.g&&(ot=V.g[te],me=bg(ot,me,Ie,Ge),-1<me&&(ll(ot[me]),Array.prototype.splice.call(ot,me,1),ot.length==0&&(delete V.g[te],V.h--)))):V&&(V=Zd(V))&&(te=V.g[te.toString()],V=-1,te&&(V=bg(te,me,Ie,Ge)),(me=-1<V?te[V]:null)&&Eh(me))}function Eh(V){if(typeof V!="number"&&V&&!V.da){var te=V.src;if(te&&te[vo])Vc(te.i,V);else{var me=V.type,Ie=V.proxy;te.removeEventListener?te.removeEventListener(me,Ie,V.capture):te.detachEvent?te.detachEvent(Kw(me),Ie):te.addListener&&te.removeListener&&te.removeListener(Ie),(me=Zd(te))?(Vc(me,V),me.h==0&&(me.src=null,te[zl]=null)):ll(V)}}}function Kw(V){return V in Ig?Ig[V]:Ig[V]="on"+V}function I_(V,te){if(V.da)V=!0;else{te=new Vi(te,this);var me=V.listener,Ie=V.ha||V.src;V.fa&&Eh(V),V=me.call(Ie,te)}return V}function Zd(V){return V=V[zl],V instanceof Hl?V:null}var Uc="__closure_events_fn_"+(1e9*Math.random()>>>0);function jc(V){return typeof V=="function"?V:(V[Uc]||(V[Uc]=function(te){return V.handleEvent(te)}),V[Uc])}function wr(){wi.call(this),this.i=new Hl(this),this.M=this,this.F=null}L(wr,wi),wr.prototype[vo]=!0,wr.prototype.removeEventListener=function(V,te,me,Ie){b_(this,V,te,me,Ie)};function zr(V,te){var me,Ie=V.F;if(Ie)for(me=[];Ie;Ie=Ie.F)me.push(Ie);if(V=V.M,Ie=te.type||te,typeof te=="string")te=new Xt(te,V);else if(te instanceof Xt)te.target=te.target||V;else{var Ge=te;te=new Xt(Ie,V),_e(te,Ge)}if(Ge=!0,me)for(var ot=me.length-1;0<=ot;ot--){var Rt=te.g=me[ot];Ge=xg(Rt,Ie,!0,te)&&Ge}if(Rt=te.g=V,Ge=xg(Rt,Ie,!0,te)&&Ge,Ge=xg(Rt,Ie,!1,te)&&Ge,me)for(ot=0;ot<me.length;ot++)Rt=te.g=me[ot],Ge=xg(Rt,Ie,!1,te)&&Ge}wr.prototype.N=function(){if(wr.aa.N.call(this),this.i){var V=this.i,te;for(te in V.g){for(var me=V.g[te],Ie=0;Ie<me.length;Ie++)ll(me[Ie]);delete V.g[te],V.h--}}this.F=null},wr.prototype.K=function(V,te,me,Ie){return this.i.add(String(V),te,!1,me,Ie)},wr.prototype.L=function(V,te,me,Ie){return this.i.add(String(V),te,!0,me,Ie)};function xg(V,te,me,Ie){if(te=V.i.g[String(te)],!te)return!0;te=te.concat();for(var Ge=!0,ot=0;ot<te.length;++ot){var Rt=te[ot];if(Rt&&!Rt.da&&Rt.capture==me){var ro=Rt.listener,sa=Rt.ha||Rt.src;Rt.fa&&Vc(V.i,Rt),Ge=ro.call(sa,Ie)!==!1&&Ge}}return Ge&&!Ie.defaultPrevented}function xh(V,te,me){if(typeof V=="function")me&&(V=E(V,me));else if(V&&typeof V.handleEvent=="function")V=E(V.handleEvent,V);else throw Error("Invalid listener argument");return 2147483647<Number(te)?-1:s.setTimeout(V,te||0)}function E_(V){V.g=xh(()=>{V.g=null,V.i&&(V.i=!1,E_(V))},V.l);let te=V.h;V.h=null,V.m.apply(null,te)}class Th extends wi{constructor(te,me){super(),this.m=te,this.l=me,this.h=null,this.i=!1,this.g=null}j(te){this.h=arguments,this.g?this.i=!0:E_(this)}N(){super.N(),this.g&&(s.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function $c(V){wi.call(this),this.h=V,this.g={}}L($c,wi);var cl=[];function Xd(V){Be(V.g,function(te,me){this.g.hasOwnProperty(me)&&Eh(te)},V),V.g={}}$c.prototype.N=function(){$c.aa.N.call(this),Xd(this)},$c.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Tg=s.JSON.stringify,x_=s.JSON.parse,u7=class{stringify(V){return s.JSON.stringify(V,void 0)}parse(V){return s.JSON.parse(V,void 0)}};function zm(){}zm.prototype.h=null;function Dg(V){return V.h||(V.h=V.i())}function Zw(){}var Gl={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function T_(){Xt.call(this,"d")}L(T_,Xt);function D_(){Xt.call(this,"c")}L(D_,Xt);var Co={},Qd=null;function Dh(){return Qd=Qd||new wr}Co.La="serverreachability";function w_(V){Xt.call(this,Co.La,V)}L(w_,Xt);function Jd(V){let te=Dh();zr(te,new w_(te))}Co.STAT_EVENT="statevent";function O_(V,te){Xt.call(this,Co.STAT_EVENT,V),this.stat=te}L(O_,Xt);function Gr(V){let te=Dh();zr(te,new O_(te,V))}Co.Ma="timingevent";function Xw(V,te){Xt.call(this,Co.Ma,V),this.size=te}L(Xw,Xt);function Ia(V,te){if(typeof V!="function")throw Error("Fn must not be null and must be a function");return s.setTimeout(function(){V()},te)}function Hc(){this.g=!0}Hc.prototype.xa=function(){this.g=!1};function Qw(V,te,me,Ie,Ge,ot){V.info(function(){if(V.g)if(ot)for(var Rt="",ro=ot.split("&"),sa=0;sa<ro.length;sa++){var Oi=ro[sa].split("=");if(1<Oi.length){var Ea=Oi[0];Oi=Oi[1];var xa=Ea.split("_");Rt=2<=xa.length&&xa[1]=="type"?Rt+(Ea+"="+Oi+"&"):Rt+(Ea+"=redacted&")}}else Rt=null;else Rt=ot;return"XMLHTTP REQ ("+Ie+") [attempt "+Ge+"]: "+te+`
171
171
  `+me+`
172
172
  `+Rt})}function Jw(V,te,me,Ie,Ge,ot,Rt){V.info(function(){return"XMLHTTP RESP ("+Ie+") [ attempt "+Ge+"]: "+te+`
173
173
  `+me+`