@veltdev/sdk 6.0.24 → 6.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/models/data/attachment.model.d.ts +23 -0
- package/{chunk-UYR6HRGI.js → chunk-2JSXDPYO.js} +1 -1
- package/{chunk-D4RIWWWT.js → chunk-2KJYRR7X.js} +1 -1
- package/{chunk-VSBVKZYP.js → chunk-6BTXSFDP.js} +1 -1
- package/{chunk-HRFML32S.js → chunk-7O3OJVW3.js} +1 -1
- package/{chunk-HWSQCIIL.js → chunk-AP33ZJ2C.js} +1 -1
- package/{chunk-K7KCPFC7.js → chunk-AWNCHHGK.js} +1 -1
- package/{chunk-S5U5EJSH.js → chunk-B3ZPP3EZ.js} +1 -1
- package/{chunk-FAOXE2LY.js → chunk-BJ5O5D7F.js} +1 -1
- package/{chunk-2TBFGTFV.js → chunk-BR7AO7YV.js} +1 -1
- package/chunk-CCZ3WXF4.js +1 -0
- package/{chunk-FV4CYQIJ.js → chunk-CLRO2X6T.js} +1 -1
- package/{chunk-U76HLU2G.js → chunk-CNB6D3KX.js} +22 -22
- package/{chunk-WQPVR2MY.js → chunk-DLN23S5M.js} +1 -1
- package/{chunk-RHUUOSBK.js → chunk-FJ6KQ3QL.js} +1 -1
- package/{chunk-OL2RJSA5.js → chunk-FJAMH4UH.js} +1 -1
- package/{chunk-4OP5FRJZ.js → chunk-G3BZ4EU4.js} +1 -1
- package/{chunk-Y7EFNXLS.js → chunk-GB46XS3O.js} +1 -1
- package/{chunk-B4MCRMP7.js → chunk-IAYXXVUB.js} +1 -1
- package/{chunk-2GJ6LQGO.js → chunk-JAKGBQ5D.js} +1 -1
- package/{chunk-AAZRCO7P.js → chunk-JICLHDU3.js} +1 -1
- package/{chunk-NEJKRV3M.js → chunk-JPOBXW24.js} +1 -1
- package/{chunk-VTMNUIEK.js → chunk-LCACRBV3.js} +1 -1
- package/{chunk-R7PGKNXH.js → chunk-LM54BOTU.js} +1 -1
- package/{chunk-T3JQYK3N.js → chunk-MEI3IAPO.js} +1 -1
- package/{chunk-3ETDYFCP.js → chunk-NNZNLREA.js} +1 -1
- package/{chunk-PS5CHEBA.js → chunk-NY2Q7SEG.js} +1 -1
- package/{chunk-ZN6UGTUP.js → chunk-TMLYEZEQ.js} +1 -1
- package/{chunk-FZKRXZIZ.js → chunk-TN7X7OZD.js} +1 -1
- package/{chunk-QWB3Q3X3.js → chunk-UFOCUTLN.js} +1 -1
- package/{chunk-ZLOF7AUP.js → chunk-VX7YLWTK.js} +1 -1
- package/{chunk-MKJOFE4P.js → chunk-VYZZWZPY.js} +1 -1
- package/{chunk-NAJL2GCA.js → chunk-W47H5WHD.js} +1 -1
- package/{chunk-WQQKFPTA.js → chunk-YRE3NGCE.js} +1 -1
- package/{chunk-5CE5EQ5I.js → chunk-Z7JR4TW6.js} +1 -1
- package/chunk-ZF7OTWYC.js +1 -0
- package/{chunk-N366MN5J.js → chunk-ZH5R4MP6.js} +1 -1
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +1 -1
- package/velt-comment.js +7 -7
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +1 -1
- package/velt-huddle.js +1 -1
- package/velt-live-state-sync.js +1 -1
- package/velt-notification.js +1 -1
- package/velt-portable.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +1 -1
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +1 -1
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +1 -1
- package/velt.js +2 -2
- package/chunk-FXHOBF24.js +0 -1
- package/chunk-S3ZS5EPV.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as $,c as z,d as U,e as H,f as j}from"./chunk-AP33ZJ2C.js";import{A as J,b as Y,n as O,q as Z}from"./chunk-BR7AO7YV.js";import{Ej as _,Gi as k,He as K,Ie as V,Rj as G,Sj as q,Vj as M,Wj as W,Yd as S,Zj as X,_d as E,_j as Q,a as b,ba as A,bf as x,ck as T,ea as g,ee as R,g as p,i as L,na as N,oj as y,pj as w,qj as C,sa as P,ug as F}from"./chunk-CNB6D3KX.js";var de=1e4,pe=6e4,ee=3e4,ge=3e4,me=900*1e3;function te(s){let n=Math.max(0,Math.min(Math.floor(Number.isFinite(s)?s:1)-1,16));return Math.min(ge*2**n,me)}var fe=3600*1e3,re=250,ie=1200*1e3,Ae=1024,Se={fetch:(s,n)=>fetch(s,n)},ve="The browser could not send the file to the storage URL the gateway signed. The usual cause is the CORS rules of that storage (its storage account or bucket), which must allow this page's origin for PUT; they are set by the operator of the deployment, not by the SDK.",oe="The browser could not read the file from the storage URL the gateway signed. The usual cause is the CORS rules of that storage (its storage account or bucket), which must allow this page's origin for GET; they are set by the operator of the deployment, not by the SDK.",m=class extends Error{constructor(n,d){super(d),this.code=n,this.name="PortableAttachmentError"}};function v(s){return!!s&&!s.url&&s.isAttachmentResolverUsed!==!0&&typeof s.bucketPath=="string"&&s.bucketPath.length>0&&s.attachmentId!==void 0&&s.attachmentId!==null&&String(s.attachmentId).length>0}function be(s,n,d){let e={organizationId:n,documentId:d};return typeof s?.name=="string"&&s.name.length>0&&s.name.length<=Ae&&(e.fileName=s.name),typeof s?.type=="string"&&s.type.length>0&&(e.contentType=s.type),Number.isInteger(s?.size)&&s.size>=0&&(e.sizeBytes=s.size),e}function ye(s){return typeof s=="string"&&/^[A-Za-z0-9._-]{1,128}$/.test(s)&&!/^\.+$/.test(s)}function we(s){return!!s&&typeof s=="object"&&!Array.isArray(s)&&Object.values(s).every(n=>typeof n=="string")}function Te(s){let n=s;return!n||typeof n!="object"||!ye(n.attachmentId)||typeof n.key!="string"||!n.key||typeof n.url!="string"||!C(n.url)||n.method!=="PUT"||!we(n.headers)?null:{attachmentId:n.attachmentId,key:n.key,url:n.url,method:"PUT",headers:b({},n.headers),expiresAtMs:typeof n.expiresAtMs=="number"?n.expiresAtMs:0}}function Ie(s){let n=s;return!n||typeof n!="object"||typeof n.url!="string"||!C(n.url)?null:{key:typeof n.key=="string"?n.key:"",url:n.url,expiresAtMs:typeof n.expiresAtMs=="number"&&Number.isFinite(n.expiresAtMs)?n.expiresAtMs:0}}function Pe(s,n,d){let e=Number.isFinite(s)?s-(n+(Number.isFinite(d)?d:0)):0;return n+Math.min(Math.max(e,0),fe)}var se=(()=>{let n=class n{constructor(e,t){this.injector=e,this.loggingService=t,this.urlGeneration=P(0),this.urlKeyVersions=new Map,this.userWatched=!1,this.watchedUserId=null,this.urlCache=new Map,this.urlInFlight=new Map,this.urlFailures=new Map,this.urlMissing=new Set,this.cacheOwner=null,this.attachmentsAnnounced=!1,this.hookedRealtime=null,this.offCapabilities=null,this.availabilityListeners=new Set,this.veltStorageRefusalsReported=new Set,this.reportedOpFailures=new Set,this.invalidReadUrlReported=!1,this.hotPathReported=new Set,this.portableSessionSeen=!1}get selector(){return this._selector??=this.injector.get(W)}get auth(){return this._auth??=this.injector.get(T)}get config(){return this._config??=this.injector.get(w)}isPortableSession(){try{if(!this.auth.getPortableBackend?.())return!1;let e=this.selector.isPortableSession()===!0;return e&&(this.portableSessionSeen=!0),e}catch(e){return this.loggingService.catch("Error in PortableAttachmentStorageService isPortableSession: ",e,void 0,!0),!1}}isPortableAttachmentDeployment(){if(this.isPortableSession())return!0;if(!this.portableSessionSeen)return!1;try{return this.config.getEnablePortableBackend()===!0}catch(e){return this.loggingService.catch("Error in PortableAttachmentStorageService isPortableAttachmentDeployment: ",e,void 0,!0),!0}}captureSessionUser(){return this.isPortableSession()?this.currentUserId():null}isSameSessionUser(e){return this.isSameSession(e??null)}isPortableAttachment(e){return v(e)&&this.isPortableSession()}upload(l){return p(this,arguments,function*({attachment:e,file:t,scope:r,sessionUserId:i}){let o=this.scopeIds(r);if(!o)throw this.notSent("upload","the comment has no organization or document id");let c=i===void 0?this.currentUserId():i;if(!c)throw this.notSent("upload","no user is signed in");if(!this.isSameSession(c))throw this.notSent("upload","the session changed before the upload started");if(!(yield this.waitForActiveBackend())||!this.isSameSession(c))throw this.notSent("upload","the portable backend is not active");let a=yield this.callOp("getUploadUrl",be(t,o.organizationId,o.documentId));if(!this.isSameSession(c))throw this.dropped("the session changed while getUploadUrl ran; the file was not uploaded");if(!a?.ok){this.reportOpFailure("getUploadUrl",a);let u=`${a?.code??"unknown"}${a?.message?` (${a.message})`:""}`;throw new m(a?.code??"failed-precondition",O(a)?`Tier B comment attachments are not available on this deployment: getUploadUrl answered ${u}`:`Tier B getUploadUrl failed: ${u}`)}let h=Te(a.data);if(!h){let u=new m("failed-precondition",'Tier B getUploadUrl answered a signed upload this SDK will not use (it needs method PUT, an https URL, string headers, an attachmentId of 1-128 letters, digits, ".", "_" or "-", and a key); the file was not uploaded');throw this.loggingService.catch(u.message,void 0,void 0,!0),u}if(yield this.putSignedUpload(h,t),!this.isSameSession(c))throw this.dropped("the session changed while the file uploaded; the attachment is not added");return e.attachmentId=h.attachmentId,e.bucketPath=h.key,e.url="",e.clientOrganizationId=o.organizationId,e.clientDocumentId=o.documentId,e})}putSignedUpload(e,t){return p(this,null,function*(){let r=typeof AbortController=="function"?new AbortController:null,i=null,l=new Promise((o,c)=>{i=setTimeout(()=>{r?.abort(),c(new m("put-failed",`Tier B attachment upload failed: the storage did not answer the PUT within ${ie/6e4} minutes`))},ie)});try{let o=yield Promise.race([Se.fetch(e.url,b({method:"PUT",headers:b({},e.headers),body:t.slice(0,t.size,""),redirect:"error",credentials:"omit",referrerPolicy:"no-referrer"},r?{signal:r.signal}:{})),l]);if(!o?.ok)throw new m("put-failed",`Tier B attachment upload failed: the storage answered the PUT with HTTP ${o?.status}`)}catch(o){let c=o instanceof m?o:new m("put-failed",`Tier B attachment upload failed in transport: ${o?.message??o}. ${ve}`);throw this.loggingService.catch(c.message,void 0,void 0,!0),c}finally{i!==null&&clearTimeout(i)}})}refuseVeltStorage(e){let t=new m("unimplemented",`Tier B ${e} was not sent: media outside comment attachments (recorder, tag) is not served by the portable backend, and Velt's storage is never used on a portable deployment`);try{this.veltStorageRefusalsReported.has(e)?this.loggingService.log(t.message):(this.veltStorageRefusalsReported.add(e),this.loggingService.catch(t.message,void 0,void 0,!0))}catch{}return t}delete(r){return p(this,arguments,function*({attachment:e,scope:t}){try{let i=this.attachmentIds(e,t),l=e?.attachmentId;if(!i||l===void 0||l===null||String(l).length===0){this.loggingService.catch("Tier B deleteAttachment was not sent: the attachment has no id, or the comment no organization or document id",void 0,void 0,!0);return}let o=this.currentUserId();if(!o||!(yield this.waitForActiveBackend())||!this.isSameSession(o)){this.loggingService.catch("Tier B deleteAttachment was not sent: the portable backend is not active",void 0,void 0,!0);return}let c=yield this.callOp("deleteAttachment",{organizationId:i.organizationId,documentId:i.documentId,attachmentId:String(l)});c?.ok||this.reportOpFailure("deleteAttachment",c)}catch(i){this.loggingService.catch("Error in PortableAttachmentStorageService delete: ",i,void 0,!0)}})}resolveDownloadUrl(e,t){try{if(!this.isPortableAttachment(e))return Promise.resolve(e?.url||null);let r=this.urlContext(e,t);if(!r||this.urlMissing.has(r.key))return Promise.resolve(null);let i=this.urlCache.get(r.key);return i&&this.isFresh(i,Date.now())?Promise.resolve(i.url):this.fetchDownloadUrl(r.key,e,r.ids,r.userId,!1)}catch(r){return this.loggingService.catch("Error in PortableAttachmentStorageService resolveDownloadUrl: ",r,void 0,!0),Promise.resolve(null)}}getDisplayUrl(e,t){if(!v(e))return e?.url;if(this.urlGeneration(),this.watchUser(),!this.isPortableSession())return e.url;try{let r=this.urlContext(e,t);if(!r)return e.url;if(this.keyVersion(r.key),this.urlMissing.has(r.key))return"";let i=Date.now(),l=this.urlCache.get(r.key);return l&&this.isFresh(l,i)?l.url:(this.inFailureBackoff(r.key,i)||this.fetchDownloadUrl(r.key,e,r.ids,r.userId,!1),l&&i<l.expiresAtMs?l.url:"")}catch(r){return this.loggingService.catch("Error in PortableAttachmentStorageService getDisplayUrl: ",r,void 0,!0),e.url}}isDisplayPending(e,t){if(!v(e)||!this.isPortableSession())return!1;try{if(this.getDisplayUrl(e,t))return!1;let r=this.urlContext(e,t);return!!r&&!this.urlMissing.has(r.key)&&!this.inFailureBackoff(r.key,Date.now())}catch(r){return this.loggingService.catch("Error in PortableAttachmentStorageService isDisplayPending: ",r,void 0,!0),!1}}reportLoadError(e,t,r){try{if(!this.isPortableAttachment(e))return;let i=this.urlContext(e,t),l=i?this.urlCache.get(i.key):void 0;if(!i||!l||l.afterLoadError||!r||l.url!==r)return;this.urlCache.delete(i.key),this.fetchDownloadUrl(i.key,e,i.ids,i.userId,!0),this.bumpKey(i.key)}catch(i){this.loggingService.catch("Error in PortableAttachmentStorageService reportLoadError: ",i,void 0,!0)}}fetchDownloadUrl(e,t,r,i,l){let o=this.urlInFlight.get(e);if(o)return o;let c;return c=p(this,null,function*(){try{if(!(yield this.waitForActiveBackend()))return this.recordUrlFailure(e),null;if(!this.isSameSession(i))return null;let a=this.serverTimeOffsetMs(),h=yield this.callOp("getDownloadUrl",{organizationId:r.organizationId,documentId:r.documentId,attachmentId:String(t.attachmentId)}),u=yield a;if(!this.isSameSession(i))return null;if(!h?.ok)return this.reportOpFailure("getDownloadUrl",h,!0),h?.code==="not-found"?(this.urlMissing.add(e),this.urlCache.delete(e),null):(this.recordUrlFailure(e),null);let f=Ie(h.data);if(!f)return this.invalidReadUrlReported||(this.invalidReadUrlReported=!0,console.error("Velt [portable backend]: getDownloadUrl answered a read URL that is not https (loopback http excepted); the attachment is not shown. Check the storage endpoint the gateway signs URLs for.")),this.recordUrlFailure(e),null;let I=Date.now();return this.pruneUrlCache(I),this.urlCache.set(e,{url:f.url,expiresAtMs:Pe(f.expiresAtMs,I,u),receivedAtMs:I,afterLoadError:l}),this.urlFailures.delete(e),f.url}catch(a){return this.loggingService.catch("Error in PortableAttachmentStorageService getDownloadUrl: ",a,void 0,!0),this.recordUrlFailure(e),null}finally{this.urlInFlight.get(e)===c&&this.urlInFlight.delete(e),this.bumpKey(e)}}),this.urlInFlight.set(e,c),c}isFresh(e,t){return t<e.expiresAtMs-pe||t-e.receivedAtMs<ee}inFailureBackoff(e,t){let r=this.urlFailures.get(e);return r!==void 0&&t-r.at<te(r.count)}keyVersion(e){let t=this.urlKeyVersions.get(e);return t||(t=P(0),this.urlKeyVersions.set(e,t)),t()}bumpKey(e){this.urlKeyVersions.get(e)?.update(t=>t+1)}recordUrlFailure(e){let t=(this.urlFailures.get(e)?.count??0)+1;this.urlFailures.set(e,{at:Date.now(),count:t}),setTimeout(()=>this.bumpKey(e),te(t)+50)}pruneUrlCache(e){if(!(this.urlCache.size<re)){for(let[t,r]of Array.from(this.urlCache))e>=r.expiresAtMs&&e-r.receivedAtMs>=ee&&this.urlCache.delete(t);for(let t of Array.from(this.urlCache.keys())){if(this.urlCache.size<2*re)break;this.urlCache.delete(t)}}}watchUser(){if(!this.userWatched){this.userWatched=!0;try{let e=!0;this.watchedUserId=this.currentUserId(),this.auth.getUser$().subscribe(t=>{let r=typeof t?.userId=="string"&&t.userId.length>0?t.userId:null;if(e||r===this.watchedUserId){this.watchedUserId=r;return}this.watchedUserId=r,this.urlCache.clear(),this.urlFailures.clear(),this.urlMissing.clear(),this.urlKeyVersions.clear(),this.cacheOwner=r,queueMicrotask(()=>this.urlGeneration.update(i=>i+1))}),e=!1}catch(e){this.loggingService.catch("Error in PortableAttachmentStorageService watchUser: ",e,void 0,!0)}}}serverTimeOffsetMs(){return p(this,null,function*(){try{let e=yield M()?.realtime?.getServerTimeOffset?.();return typeof e=="number"&&Number.isFinite(e)?e:0}catch{return 0}})}urlContext(e,t){let r=this.attachmentIds(e,t),i=this.currentUserId();return!r||!i?null:(this.cacheOwner!==i&&(this.urlCache.clear(),this.urlFailures.clear(),this.urlMissing.clear(),this.cacheOwner=i),{ids:r,userId:i,key:`${i}\0${r.organizationId}\0${r.documentId}\0${String(e.attachmentId)}`})}attachmentsAvailable$(){return new L(e=>{let t,r=()=>{try{let o=this.evaluateAvailability();o!==t&&(t=o,e.next(o))}catch(o){this.loggingService.catch("Error in PortableAttachmentStorageService attachmentsAvailable$: ",o,void 0,!0)}};this.hookRealtime(),this.availabilityListeners.add(r);let i=G(()=>{this.hookRealtime(),r()});r();let l=null;try{l=this.auth.getUser$().subscribe(()=>r())}catch(o){this.loggingService.catch("Error in PortableAttachmentStorageService attachmentsAvailable$ user stream: ",o,void 0,!0)}return()=>{this.availabilityListeners.delete(r),i(),l?.unsubscribe()}})}isUploadUnavailable(){try{this.hookRealtime()}catch(e){this.loggingService.catch("Error in PortableAttachmentStorageService isUploadUnavailable: ",e,void 0,!0)}return!this.evaluateAvailability()}evaluateAvailability(){return this.isPortableSession()?this.attachmentsAnnounced:!this.isPortableAttachmentDeployment()}hookRealtime(){try{let e=M()?.realtime??null;if(!e||e===this.hookedRealtime)return;this.offCapabilities?.(),this.hookedRealtime=e,this.attachmentsAnnounced=e.hasCapability?.(_)===!0,this.offCapabilities=e.onCapabilitiesChanged?.(t=>{this.attachmentsAnnounced=!!t&&typeof t.has=="function"&&t.has(_),this.notifyAvailability()})??null}catch(e){this.loggingService.catch("Error in PortableAttachmentStorageService hookRealtime: ",e,void 0,!0)}}notifyAvailability(){for(let e of Array.from(this.availabilityListeners))e()}attachmentIds(e,t){return this.scopeIds({organizationId:e?.clientOrganizationId,documentId:e?.clientDocumentId})??this.scopeIds(t)}scopeIds(e){let t=typeof e?.organizationId=="string"&&e.organizationId.length>0?e.organizationId:null,r=typeof e?.documentId=="string"&&e.documentId.length>0?e.documentId:null;return t&&r?{organizationId:t,documentId:r}:null}currentUserId(){try{let e=this.auth.getUser()?.userId;return typeof e=="string"&&e.length>0?e:null}catch{return null}}isSameSession(e){return!!e&&this.isPortableSession()&&this.currentUserId()===e}waitForActiveBackend(){return p(this,null,function*(){try{return this.selector.isPortableBackendActive()===!0?!0:(this.selector.isPortableBackendPending?.()===!0&&(yield q(de)),this.selector.isPortableBackendActive()===!0)}catch(e){return this.loggingService.catch("Error in PortableAttachmentStorageService waitForActiveBackend: ",e,void 0,!0),!1}})}callOp(e,t){let r=this.selector.resolveDbAdapter(),i=r?.[e];return typeof i!="function"?Promise.resolve({ok:!1,code:"unimplemented",message:`the portable adapter does not implement '${e}'`}):i.call(r,{scope:"doc",data:t})}reportOpFailure(e,t,r=!1){try{if(O(t)){let i=t?.code??"unknown";this.loggingService.log(`Tier B ${e} is not served by this deployment (${i}): comment attachments are not available`);return}if(r){let i=t?.code??"unknown",l=`${e}:${i}`;if(this.hotPathReported.has(l)){this.loggingService.log(`Tier B ${e} refused again: ${i}`);return}this.hotPathReported.add(l)}Y(e,t,{logCatch:(i,l)=>this.loggingService.catch(i,l,void 0,!0),reported:this.reportedOpFailures,isOutcomeUnknown:J})}catch{}}notSent(e,t){let r=new m("failed-precondition",`Tier B attachment ${e} was not sent: ${t}`);return this.loggingService.catch(r.message,void 0,void 0,!0),r}dropped(e){let t=new m("failed-precondition",`Tier B attachment upload was dropped: ${e}`);return this.loggingService.catch(t.message,void 0,void 0,!0),t}};n.\u0275fac=function(t){return new(t||n)(g(N),g(y))},n.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();var ae=s=>{try{let n={USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmouseenter","onmouseleave","onmousemove","onmousedown","onmouseup","onwheel","onscroll","onkeydown","onkeyup","onkeypress","onfocus","onblur","onchange","onsubmit","on*"],FORBID_TAGS:["script","style","iframe","object","embed","form"]};return Q.sanitize(s,n)}catch(n){return S.catch("Error in File utils sanitizeSvg: ",n),""}},le=s=>{try{return s.name.split(".").slice(0,-1).join(".")}catch(n){S.catch("Error in File utils getFileName: ",n);return}},D=s=>{try{return/(?:\.([^.]+))?$/.exec(s?.name)[1]}catch(n){S.catch("Error in File utils getFileExtension: ",n);return}},ce=(s,n)=>{try{let d=s.slice(0,-1,s.type);return new File([d],n+"."+D(s),{type:s.type})}catch(d){S.catch("Error in File utils updateFile: ",d);return}};var B={mp4:"video/mp4",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",webm:"video/webm",mkv:"video/x-matroska",m4v:"video/x-m4v",m4a:"audio/x-m4a",aac:"audio/aac","3gp":"video/3gpp","3g2":"video/3gpp2",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",zip:"application/zip",rar:"application/x-rar-compressed",txt:"text/plain",rtf:"application/rtf",html:"text/html",htm:"text/html",csv:"text/csv",ics:"text/calendar",vcf:"text/x-vcard",js:"application/javascript",css:"text/css",json:"application/json",xml:"application/xml",swf:"application/x-shockwave-flash"};var he=(()=>{let n=class n{getStorageInstance(e){return e?U(void 0,e):U()}ref(e,t){return H(e,t)}uploadBytesResumable(e,t,r){return j(e,t,r)}getDownloadURL(e){return z(e)}deleteObject(e){return $(e)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();var rt=(()=>{let n=class n{constructor(e,t,r,i,l,o,c){this.authService=e,this.configService=t,this.coreActionsService=r,this.loggingService=i,this.attachmentResolverService=l,this.storageAdapter=o,this.portableAttachments=c,this.storage=this.storageAdapter.getStorageInstance();try{this.configService.getApiKey$().subscribe(a=>{this.apiKey=a}),this.authService.getFirebaseConfig$().subscribe(a=>{if(a&&a.firebaseOptions?.storageBucket){this.storage=this.storageAdapter.getStorageInstance(a?.firebaseOptions?.storageBucket);let h=this.configService.getProxyConfig();h?.storageHost&&(this.storage.host=h.storageHost)}},a=>{this.loggingService.catch("Error in StorageService constructor: ",a)})}catch(a){this.loggingService.catch("Error in StorageService constructor:",a)}}createAttachment({path:e,file:t}){try{let r=new V;r.name=t.name;let i=ce(t,`${r.attachmentId}_${le(t)}`),l=`${this.apiKey}/${e}/${i?.name}`;return r.bucketPath=l,r.size=t.size,r.type=D(t),r?.type&&(r.mimeType=B[r?.type]),r}catch(r){return this.loggingService.catch("Error in StorageService createAttachment: ",r),null}}sanitizeSvgFile(e){return p(this,null,function*(){if(e.type===B.svg)try{let t=yield e.text(),r=ae(t);return new File([r],e.name,{type:e.type})}catch(t){return this.loggingService.catch("Error in StorageService sanitizeSvgFile: ",t),e}return e})}uploadAttachmentToStorage(l){return p(this,arguments,function*({attachment:e,file:t,resolve:r,reject:i}){try{let o=this.storageAdapter.ref(this.storage,e.bucketPath),c=this.storageAdapter.uploadBytesResumable(o,t,{cacheControl:"public,max-age=3600"});c.on("state_changed",a=>{let h=a.bytesTransferred/a.totalBytes*100},a=>{i(a)},()=>{this.storageAdapter.getDownloadURL(c.snapshot.ref).then(a=>{e.url=a,r(e)})})}catch(o){this.loggingService.catch("Error in StorageService uploadAttachmentToStorage: ",o),i(o)}})}uploadToResolver(c){return p(this,arguments,function*({file:e,attachment:t,metadata:r,resolve:i,reject:l,scope:o}){try{r.attachmentId=t.attachmentId;let a={attachmentId:t.attachmentId,name:t.name,file:e,metadata:r,mimeType:t.mimeType},h=F();this.coreActionsService.triggerAction(R.ATTACHMENT_RESOLVER,{event:k.Events.Resolver.ATTACHMENT_SAVE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:h,methodName:x.UPLOAD_TO_RESOLVER,source:"internal",payload:{attachment:a,eventType:E.ATTACHMENT_ADD}});let u=yield this.attachmentResolverService.saveAttachment({attachment:a,eventType:E.ATTACHMENT_ADD},h,o);u&&u.data?.url?(t.url=u.data?.url,i(t)):l(new Error("Failed to upload attachment to resolver"))}catch(a){this.loggingService.catch("Error in StorageService uploadToResolver: ",a),l(a)}})}uploadFile({path:e,file:t,useAttachmentResolver:r,metadata:i,attachmentScope:l,portableScope:o}){return new Promise((c,a)=>p(this,null,function*(){try{if(!this.apiKey)throw new Error("API key not configured");let h=o&&!r?this.portableAttachments.captureSessionUser():null,u=yield this.sanitizeSvgFile(t),f=this.createAttachment({path:e,file:u});if(!f)throw new Error("Attachment not created");r?this.uploadToResolver({file:u,attachment:f,metadata:i,resolve:c,reject:a,scope:l}):o&&(h||this.portableAttachments.isPortableAttachmentDeployment())?this.portableAttachments.upload({attachment:f,file:u,scope:o,sessionUserId:h??void 0}).then(c,a):this.portableAttachments.isPortableAttachmentDeployment()?a(this.portableAttachments.refuseVeltStorage("uploadFile")):this.uploadAttachmentToStorage({attachment:f,file:u,resolve:c,reject:a})}catch(h){this.loggingService.catch("Error in StorageService uploadFile:",h),a(h)}}))}uploadChunk(e,t,r,i){return new Promise((l,o)=>{try{if(i?.useAttachmentResolver){let c=this.createAttachment({path:e,file:t});if(!c){o(new Error("Attachment not created for chunk upload"));return}this.uploadToResolver({file:t,attachment:c,metadata:i.metadata,resolve:a=>l(a.url),reject:o,scope:i.attachmentScope});return}if(this.portableAttachments.isPortableAttachmentDeployment()){o(this.portableAttachments.refuseVeltStorage("uploadChunk"));return}if(this.apiKey){let c=`${this.apiKey}/${e}/${t.name}`,a=this.storageAdapter.ref(this.storage,c),h=this.storageAdapter.uploadBytesResumable(a,t,{cacheControl:"public,max-age=3600"});h.on("state_changed",u=>{let f=u.bytesTransferred/u.totalBytes*100},u=>{o(u)},()=>{this.storageAdapter.getDownloadURL(h.snapshot.ref).then(u=>{l(u)}).catch(u=>{this.loggingService.catch(`[uploadChunk] Error getting download URL for chunk ${r}:`,u),o(u)})})}else{let c=new Error("API key not available");this.loggingService.catch("[uploadChunk] API key not available",c),o(c)}}catch(c){this.loggingService.catch(`[uploadChunk] Error in StorageService uploadChunk for chunk ${r}: `,c),o(c)}})}downloadAttachment(e,t){try{if(this.portableAttachments.isPortableAttachment(e)){let r=this.portableAttachments.captureSessionUser();this.portableAttachments.resolveDownloadUrl(e,t).then(i=>{i&&this.portableAttachments.isSameSessionUser(r)?this.downloadFromUrl(e,i,!0):i||this.loggingService.catch("Tier B attachment download: no read URL could be resolved; nothing was downloaded")}).catch(i=>{this.loggingService.catch("Error in StorageService downloadAttachment (Tier B): ",i)});return}e.url&&this.downloadFromUrl(e,e.url)}catch(r){this.loggingService.catch("Error in StorageService downloadAttachment: ",r)}}downloadFromUrl(e,t,r=!1){try{let i=new XMLHttpRequest;i.responseType="blob",i.onload=()=>{if(r&&(i.status<200||i.status>=300)){this.loggingService.catch(`Tier B attachment download failed: the storage answered HTTP ${i.status}`);return}let l=i.response,o=document.createElement("a"),c=window.URL.createObjectURL(l);o.setAttribute("type","hidden"),o.setAttribute(K.ATTRIBUTES.VELT_DOWNLOAD_BUTTON,"true"),o.classList.add("snippyly-overlay-panel"),o.href=c,e?.name&&(o.download=e?.name),document.body.appendChild(o);let a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(a),window.URL.revokeObjectURL(c),o.remove()},i.onerror=()=>{r?(this.loggingService.catch(`Tier B attachment download failed in transport; opening it in a new tab instead. ${oe}`),window.open(t,"_blank","noopener,noreferrer")):window.open(t,"_blank")},i.open("GET",t),i.send()}catch(i){this.loggingService.catch("Error in StorageService downloadAttachment: ",i)}}deleteAttachment({attachment:e,metadata:t,useAttachmentResolver:r,attachmentScope:i,portableScope:l}){return new Promise((o,c)=>{if(r){let a=F();this.coreActionsService.triggerAction(R.ATTACHMENT_RESOLVER,{event:k.Events.Resolver.ATTACHMENT_DELETE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:a,methodName:x.DELETE_ATTACHMENT,source:"internal",payload:{attachmentId:e.attachmentId,metadata:t}}),this.attachmentResolverService.deleteAttachment({attachmentId:e.attachmentId,metadata:t},a,i).then(()=>{o(null)}).catch(h=>{c(h)})}else if((l||v(e))&&this.portableAttachments.isPortableAttachmentDeployment())this.portableAttachments.delete({attachment:e,scope:l}).then(()=>o(null),()=>o(null));else if(this.portableAttachments.isPortableAttachmentDeployment())this.portableAttachments.refuseVeltStorage("deleteAttachment"),o(null);else{let a=this.storageAdapter.ref(this.storage,e.bucketPath);this.storageAdapter.deleteObject(a).then(()=>{o(null)}).catch(h=>{o(null)})}})}getAttachmentDisplayUrl(e,t){return this.portableAttachments.getDisplayUrl(e,t)}isAttachmentDisplayPending(e,t){return this.portableAttachments.isDisplayPending(e,t)}isPortableAttachment(e){return this.portableAttachments.isPortableAttachment(e)}resolveAttachmentUrl(e,t){return this.portableAttachments.resolveDownloadUrl(e,t)}reportAttachmentLoadError(e,t,r){this.portableAttachments.reportLoadError(e,t,r)}deleteFileFromPath(e){return new Promise((t,r)=>{if(this.portableAttachments.isPortableAttachmentDeployment()){r(this.portableAttachments.refuseVeltStorage("deleteFileFromPath"));return}let i=this.storageAdapter.ref(this.storage,e);this.storageAdapter.deleteObject(i).then(()=>{t(null)}).catch(l=>{r(l)})})}};n.\u0275fac=function(t){return new(t||n)(g(T),g(w),g(X),g(y),g(Z),g(he),g(se))},n.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();export{se as a,rt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as F}from"./chunk-S5U5EJSH.js";import{b as G}from"./chunk-4OP5FRJZ.js";import{Ha as R,xa as H,ya as A,za as L}from"./chunk-PS5CHEBA.js";import{Bb as _,Ha as n,Ic as j,Jc as T,Kb as x,Kc as $,Pb as l,Ra as h,Rb as v,Re as N,Wa as V,a as I,ab as u,ba as E,ea as D,fb as B,l as y,la as m,ma as P,mc as d,nb as p,nc as c,ob as a,oj as f,pb as o,qb as g,r as S,rc as M,ub as k,vb as b,ya as O}from"./chunk-U76HLU2G.js";function K(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",17)(2,"path",18)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function Q(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",22)(2,"path",23)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function X(t,r){if(t&1&&(k(0),a(1,"div",6)(2,"div",7),u(3,K,6,0,"svg",8)(4,Q,6,0,"ng-template",null,1,M),o(),a(6,"div",9),l(7),d(8,"translate"),g(9,"br"),l(10),d(11,"translate"),o(),a(12,"div",10)(13,"p"),l(14),d(15,"translate"),m(),a(16,"svg",11),g(17,"path",12)(18,"path",13)(19,"path",14)(20,"path",15),o(),l(21),d(22,"translate"),o(),P(),a(23,"p"),l(24),d(25,"translate"),o()()(),b()),t&2){let C=x(5),i=_();n(3),p("ngIf",i.darkMode)("ngIfElse",C),n(4),v(" ",c(8,7,"Allow mic permission to")),n(3),v("",c(11,9,"enable your audio")," "),n(4),v(" ",c(15,11,"1. Click the")," "),n(7),v(" ",c(22,13,"page info icon in your browser\u2019s address bar")," "),n(3),v(" ",c(25,15,"2. Turn on Microphone")," ")}}function Y(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",17)(2,"path",24)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function ee(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",22)(2,"path",25)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function te(t,r){if(t&1&&(k(0),a(1,"div",6)(2,"div",7),u(3,Y,6,0,"svg",8)(4,ee,6,0,"ng-template",null,2,M),o(),a(6,"div",9),l(7),d(8,"translate"),g(9,"br"),l(10),d(11,"translate"),o(),a(12,"div",10)(13,"p"),l(14),d(15,"translate"),m(),a(16,"svg",11),g(17,"path",12)(18,"path",13)(19,"path",14)(20,"path",15),o(),l(21),d(22,"translate"),o(),P(),a(23,"p"),l(24),d(25,"translate"),o()()(),b()),t&2){let C=x(5),i=_();n(3),p("ngIf",i.darkMode)("ngIfElse",C),n(4),v(" ",c(8,7,"Allow camera permission")),n(3),v("",c(11,9,"to enable your video")," "),n(4),v(" ",c(15,11,"1. Click the")," "),n(7),v(" ",c(22,13,"page info icon in your browser\u2019s address bar")," "),n(3),v(" ",c(25,15,"2. Turn on Camera")," ")}}var z=(()=>{let r=class r{constructor(i,e,s,w,W){this.loggingService=i,this.themeService=e,this.elementRef=s,this.matDialogRef=w,this.data=W,this.veltElement=!0,this.darkMode=!0;try{this.loggingService.log("%c[WB] Creating CLASS: DevicePermissionDeniedDialogComponent","color: blue;"),this.type=this.data?.type,[!0,!1].includes(this.data?.darkMode)&&(this.darkMode=this.data?.darkMode)}catch(Z){this.loggingService.catch("Error in DevicePermissionDeniedDialogComponent constructor: ",Z)}}ngOnDestroy(){}};r.\u0275fac=function(e){return new(e||r)(h(f),h(R),h(O),h(H,8),h(A,8))},r.\u0275cmp=V({type:r,selectors:[["velt-device-permission-denied-dialog-internal"]],hostVars:1,hostBindings:function(e,s){e&2&&B("data-velt-element",s.veltElement)},inputs:{type:"type"},standalone:!1,decls:5,vars:5,consts:[["devicePermissionDialogRef",""],["defaultAudioIcon",""],["defaultVideoIcon",""],[1,"velt-device-permission-denied-dialog--container",3,"snippylyOverlay","snippylyOverlayZIndex"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"velt-device-permission-denied-dialog"],[1,"velt-device-permission-denied-dialog--icon"],["width","61","height","60","viewBox","0 0 61 60","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf","ngIfElse"],[1,"velt-device-permission-denied-dialog--header"],[1,"velt-device-permission-denied-dialog--content"],["width","13","height","12","viewBox","0 0 13 12","fill","none","xmlns","http://www.w3.org/2000/svg",1,"velt-device-permission-denied-dialog--page-info-icon"],["d","M4.375 2.5C4.375 3.53553 3.53553 4.375 2.5 4.375C1.46447 4.375 0.625 3.53553 0.625 2.5C0.625 1.46447 1.46447 0.625 2.5 0.625C3.53553 0.625 4.375 1.46447 4.375 2.5Z","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M5 2.5H12.5","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M0 8.75H7.5","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M11.875 8.75C11.875 9.78553 11.0355 10.625 10 10.625C8.96447 10.625 8.125 9.78553 8.125 8.75C8.125 7.71447 8.96447 6.875 10 6.875C11.0355 6.875 11.875 7.71447 11.875 8.75Z","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["width","61","height","60","viewBox","0 0 61 60","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","y","4","width","56","height","56","rx","28","fill","white","fill-opacity","0.04"],["d","M23.5026 20.333C23.5026 19.0069 24.0294 17.7352 24.9671 16.7975C25.9048 15.8598 27.1765 15.333 28.5026 15.333C29.8287 15.333 31.1005 15.8598 32.0381 16.7975C32.9758 17.7352 33.5026 19.0069 33.5026 20.333V28.6663C33.5027 29.1599 33.4297 29.6508 33.2859 30.123M29.9526 33.4563C29.2054 33.6828 28.4155 33.7311 27.6463 33.5973C26.8771 33.4636 26.1499 33.1516 25.5229 32.6863C24.8959 32.2211 24.3866 31.6154 24.0358 30.9179C23.685 30.2204 23.5024 29.4504 23.5026 28.6697V27.003M16.8359 28.6663C16.8356 30.7719 17.405 32.8383 18.484 34.6465C19.5629 36.4546 21.111 37.9371 22.9642 38.9366C24.8174 39.9362 26.9066 40.4156 29.0102 40.324C31.1137 40.2324 33.1533 39.5732 34.9126 38.4163M38.2459 35.083C39.5023 33.1791 40.1701 30.9474 40.1659 28.6663M21.8359 46.9997H35.1693M28.5026 40.333V46.9997","stroke","white","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M13.5 17L43.5 47","stroke","currentColor","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["x","36.5","width","24","height","24","rx","12","fill","currentColor"],["d","M48.5 18.99V19M48.5 14V5","stroke","white","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["x","0.5","y","4","width","56","height","56","rx","28","fill","black","fill-opacity","0.04"],["d","M23.5026 20.333C23.5026 19.0069 24.0294 17.7352 24.9671 16.7975C25.9048 15.8598 27.1765 15.333 28.5026 15.333C29.8287 15.333 31.1005 15.8598 32.0381 16.7975C32.9758 17.7352 33.5026 19.0069 33.5026 20.333V28.6663C33.5027 29.1599 33.4297 29.6508 33.2859 30.123M29.9526 33.4563C29.2054 33.6828 28.4155 33.7311 27.6463 33.5973C26.8771 33.4636 26.1499 33.1516 25.5229 32.6863C24.8959 32.2211 24.3866 31.6154 24.0358 30.9179C23.685 30.2204 23.5024 29.4504 23.5026 28.6697V27.003M16.8359 28.6663C16.8356 30.7719 17.405 32.8383 18.484 34.6465C19.5629 36.4546 21.111 37.9371 22.9642 38.9366C24.8174 39.9362 26.9066 40.4156 29.0102 40.324C31.1137 40.2324 33.1533 39.5732 34.9126 38.4163M38.2459 35.083C39.5023 33.1791 40.1701 30.9474 40.1659 28.6663M21.8359 46.9997H35.1693M28.5026 40.333V46.9997","stroke","black","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M42.375 39.2135C42.7034 39.1007 42.9883 38.8881 43.19 38.6054C43.3917 38.3227 43.5001 37.9841 43.5 37.6369V26.3635C43.4998 26.0795 43.4271 25.8003 43.2888 25.5523C43.1504 25.3043 42.9509 25.0958 42.7093 24.9465C42.4677 24.7973 42.192 24.7122 41.9083 24.6994C41.6246 24.6867 41.3424 24.7466 41.0883 24.8735L33.5 28.6669V30.3335V25.3333C33.5 24.4493 33.1488 23.6014 32.5237 22.9763C31.8986 22.3512 31.0507 22 30.1667 22H25.1667M33.5 37V38.6667C33.5 39.5507 33.1488 40.3986 32.5237 41.0237C31.8986 41.6488 31.0507 42 30.1667 42H16.8333C15.9493 42 15.1014 41.6488 14.4763 41.0237C13.8512 40.3986 13.5 39.5507 13.5 38.6667V25.3333C13.5 24.4493 13.8512 23.6014 14.4763 22.9763C15.1014 22.3512 15.9493 22 16.8333 22H18.5","stroke","white","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M42.375 39.2135C42.7034 39.1007 42.9883 38.8881 43.19 38.6054C43.3917 38.3227 43.5001 37.9841 43.5 37.6369V26.3635C43.4998 26.0795 43.4271 25.8003 43.2888 25.5523C43.1504 25.3043 42.9509 25.0958 42.7093 24.9465C42.4677 24.7973 42.192 24.7122 41.9083 24.6994C41.6246 24.6867 41.3424 24.7466 41.0883 24.8735L33.5 28.6669V30.3335V25.3333C33.5 24.4493 33.1488 23.6014 32.5237 22.9763C31.8986 22.3512 31.0507 22 30.1667 22H25.1667M33.5 37V38.6667C33.5 39.5507 33.1488 40.3986 32.5237 41.0237C31.8986 41.6488 31.0507 42 30.1667 42H16.8333C15.9493 42 15.1014 41.6488 14.4763 41.0237C13.8512 40.3986 13.5 39.5507 13.5 38.6667V25.3333C13.5 24.4493 13.8512 23.6014 14.4763 22.9763C15.1014 22.3512 15.9493 22 16.8333 22H18.5","stroke","currentColor","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,s){if(e&1&&(a(0,"div",3,0),k(2,4),u(3,X,26,17,"ng-container",5)(4,te,26,17,"ng-container",5),b(),o()),e&2){let w=x(1);p("snippylyOverlay",w)("snippylyOverlayZIndex",3e3),n(2),p("ngSwitch",s.type),n(),p("ngSwitchCase","audio"),n(),p("ngSwitchCase","video")}},dependencies:[j,T,$,F,G],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)} .velt-mat-dialog-container.velt-device-permission-denied-dialog--panel mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{padding:0;background-color:transparent;box-shadow:none;overflow:unset}.velt-device-permission-denied-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-lg);align-items:center;justify-content:center;padding:4rem;box-sizing:border-box;word-break:break-word;max-width:600px;max-height:400px;text-align:center;background-color:var(--velt-background-0);border-radius:var(--velt-border-radius-2xl);box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--icon[_ngcontent-%COMP%]{color:var(--velt-error)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--header[_ngcontent-%COMP%]{font-size:var(--velt-font-size-lg);font-weight:600;line-height:36px;letter-spacing:-.02em;text-align:center;color:var(--velt-text-0)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--content[_ngcontent-%COMP%]{font-size:var(--velt-font-size-sm);font-weight:400;line-height:21px;text-align:center;color:var(--velt-text-0)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--content[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--page-info-icon[_ngcontent-%COMP%]{margin-left:var(--velt-spacing-sm);margin-right:var(--velt-spacing-sm);color:var(--velt-error)}"],changeDetection:0});let t=r;return t})();var me=(()=>{let r=class r{constructor(i,e){this.loggingService=i,this.matDialog=e,this.audioPermissionState$=new y(null),this.videoPermissionState$=new y(null);try{this.loggingService.log("%c[WB] Creating CLASS: DevicePermissionService","color: blue;"),this.checkPermissions()}catch(s){this.loggingService.catch("Error in DevicePermissionService constructor: ",s)}}checkPermissions(){try{this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: checkPermissions","color: green;"),new N().browserName!=="Firefox"&&(navigator.permissions.query({name:"microphone"}).then(e=>{this.audioPermissionState$.next(e.state),e.onchange=()=>{this.audioPermissionState$.next(e.state)}}).catch(e=>{}),navigator.permissions.query({name:"camera"}).then(e=>{this.videoPermissionState$.next(e.state),e.onchange=()=>{this.videoPermissionState$.next(e.state)}}).catch(e=>{}))}catch(i){this.loggingService.catch("Error in DevicePermissionService checkPermissions: ",i)}}getPermissionState$(i){try{switch(this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: getPermissionState$","color: green;"),i){case"audio":return this.getAudioPermissionState$();case"video":return this.getVideoPermissionState$();default:return S(null)}}catch(e){return this.loggingService.catch("Error in DevicePermissionService getPermissionState$: ",e),S(null)}}getAudioPermissionState$(){return this.audioPermissionState$.asObservable()}getVideoPermissionState$(){return this.videoPermissionState$.asObservable()}openDevicePermissionDeniedDialog(i,e){try{this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: openDevicePermissionDeniedDialog","color: green;"),this.matDialog.open(z,{panelClass:["velt-device-permission-denied-dialog--panel","velt-mat-dialog-container"],backdropClass:["velt-device-permission-denied-dialog--backdrop","s-background-blur-1"],data:I({type:i},e||{})})}catch(s){this.loggingService.catch("Error in DevicePermissionService openDevicePermissionDeniedDialog: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(f),D(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"});let t=r;return t})();export{me as a};
|
|
1
|
+
import{x as F}from"./chunk-B3ZPP3EZ.js";import{b as G}from"./chunk-G3BZ4EU4.js";import{Ha as R,xa as H,ya as A,za as L}from"./chunk-NY2Q7SEG.js";import{Bb as _,Ha as n,Ic as j,Jc as T,Kb as x,Kc as $,Pb as l,Ra as h,Rb as v,Re as N,Wa as V,a as I,ab as u,ba as E,ea as D,fb as B,l as y,la as m,ma as P,mc as d,nb as p,nc as c,ob as a,oj as f,pb as o,qb as g,r as S,rc as M,ub as k,vb as b,ya as O}from"./chunk-CNB6D3KX.js";function K(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",17)(2,"path",18)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function Q(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",22)(2,"path",23)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function X(t,r){if(t&1&&(k(0),a(1,"div",6)(2,"div",7),u(3,K,6,0,"svg",8)(4,Q,6,0,"ng-template",null,1,M),o(),a(6,"div",9),l(7),d(8,"translate"),g(9,"br"),l(10),d(11,"translate"),o(),a(12,"div",10)(13,"p"),l(14),d(15,"translate"),m(),a(16,"svg",11),g(17,"path",12)(18,"path",13)(19,"path",14)(20,"path",15),o(),l(21),d(22,"translate"),o(),P(),a(23,"p"),l(24),d(25,"translate"),o()()(),b()),t&2){let C=x(5),i=_();n(3),p("ngIf",i.darkMode)("ngIfElse",C),n(4),v(" ",c(8,7,"Allow mic permission to")),n(3),v("",c(11,9,"enable your audio")," "),n(4),v(" ",c(15,11,"1. Click the")," "),n(7),v(" ",c(22,13,"page info icon in your browser\u2019s address bar")," "),n(3),v(" ",c(25,15,"2. Turn on Microphone")," ")}}function Y(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",17)(2,"path",24)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function ee(t,r){t&1&&(m(),a(0,"svg",16),g(1,"rect",22)(2,"path",25)(3,"path",19)(4,"rect",20)(5,"path",21),o())}function te(t,r){if(t&1&&(k(0),a(1,"div",6)(2,"div",7),u(3,Y,6,0,"svg",8)(4,ee,6,0,"ng-template",null,2,M),o(),a(6,"div",9),l(7),d(8,"translate"),g(9,"br"),l(10),d(11,"translate"),o(),a(12,"div",10)(13,"p"),l(14),d(15,"translate"),m(),a(16,"svg",11),g(17,"path",12)(18,"path",13)(19,"path",14)(20,"path",15),o(),l(21),d(22,"translate"),o(),P(),a(23,"p"),l(24),d(25,"translate"),o()()(),b()),t&2){let C=x(5),i=_();n(3),p("ngIf",i.darkMode)("ngIfElse",C),n(4),v(" ",c(8,7,"Allow camera permission")),n(3),v("",c(11,9,"to enable your video")," "),n(4),v(" ",c(15,11,"1. Click the")," "),n(7),v(" ",c(22,13,"page info icon in your browser\u2019s address bar")," "),n(3),v(" ",c(25,15,"2. Turn on Camera")," ")}}var z=(()=>{let r=class r{constructor(i,e,s,w,W){this.loggingService=i,this.themeService=e,this.elementRef=s,this.matDialogRef=w,this.data=W,this.veltElement=!0,this.darkMode=!0;try{this.loggingService.log("%c[WB] Creating CLASS: DevicePermissionDeniedDialogComponent","color: blue;"),this.type=this.data?.type,[!0,!1].includes(this.data?.darkMode)&&(this.darkMode=this.data?.darkMode)}catch(Z){this.loggingService.catch("Error in DevicePermissionDeniedDialogComponent constructor: ",Z)}}ngOnDestroy(){}};r.\u0275fac=function(e){return new(e||r)(h(f),h(R),h(O),h(H,8),h(A,8))},r.\u0275cmp=V({type:r,selectors:[["velt-device-permission-denied-dialog-internal"]],hostVars:1,hostBindings:function(e,s){e&2&&B("data-velt-element",s.veltElement)},inputs:{type:"type"},standalone:!1,decls:5,vars:5,consts:[["devicePermissionDialogRef",""],["defaultAudioIcon",""],["defaultVideoIcon",""],[1,"velt-device-permission-denied-dialog--container",3,"snippylyOverlay","snippylyOverlayZIndex"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"velt-device-permission-denied-dialog"],[1,"velt-device-permission-denied-dialog--icon"],["width","61","height","60","viewBox","0 0 61 60","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf","ngIfElse"],[1,"velt-device-permission-denied-dialog--header"],[1,"velt-device-permission-denied-dialog--content"],["width","13","height","12","viewBox","0 0 13 12","fill","none","xmlns","http://www.w3.org/2000/svg",1,"velt-device-permission-denied-dialog--page-info-icon"],["d","M4.375 2.5C4.375 3.53553 3.53553 4.375 2.5 4.375C1.46447 4.375 0.625 3.53553 0.625 2.5C0.625 1.46447 1.46447 0.625 2.5 0.625C3.53553 0.625 4.375 1.46447 4.375 2.5Z","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M5 2.5H12.5","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M0 8.75H7.5","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["d","M11.875 8.75C11.875 9.78553 11.0355 10.625 10 10.625C8.96447 10.625 8.125 9.78553 8.125 8.75C8.125 7.71447 8.96447 6.875 10 6.875C11.0355 6.875 11.875 7.71447 11.875 8.75Z","stroke","currentColor","stroke-opacity","0.6","stroke-width","1.25"],["width","61","height","60","viewBox","0 0 61 60","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","y","4","width","56","height","56","rx","28","fill","white","fill-opacity","0.04"],["d","M23.5026 20.333C23.5026 19.0069 24.0294 17.7352 24.9671 16.7975C25.9048 15.8598 27.1765 15.333 28.5026 15.333C29.8287 15.333 31.1005 15.8598 32.0381 16.7975C32.9758 17.7352 33.5026 19.0069 33.5026 20.333V28.6663C33.5027 29.1599 33.4297 29.6508 33.2859 30.123M29.9526 33.4563C29.2054 33.6828 28.4155 33.7311 27.6463 33.5973C26.8771 33.4636 26.1499 33.1516 25.5229 32.6863C24.8959 32.2211 24.3866 31.6154 24.0358 30.9179C23.685 30.2204 23.5024 29.4504 23.5026 28.6697V27.003M16.8359 28.6663C16.8356 30.7719 17.405 32.8383 18.484 34.6465C19.5629 36.4546 21.111 37.9371 22.9642 38.9366C24.8174 39.9362 26.9066 40.4156 29.0102 40.324C31.1137 40.2324 33.1533 39.5732 34.9126 38.4163M38.2459 35.083C39.5023 33.1791 40.1701 30.9474 40.1659 28.6663M21.8359 46.9997H35.1693M28.5026 40.333V46.9997","stroke","white","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M13.5 17L43.5 47","stroke","currentColor","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["x","36.5","width","24","height","24","rx","12","fill","currentColor"],["d","M48.5 18.99V19M48.5 14V5","stroke","white","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["x","0.5","y","4","width","56","height","56","rx","28","fill","black","fill-opacity","0.04"],["d","M23.5026 20.333C23.5026 19.0069 24.0294 17.7352 24.9671 16.7975C25.9048 15.8598 27.1765 15.333 28.5026 15.333C29.8287 15.333 31.1005 15.8598 32.0381 16.7975C32.9758 17.7352 33.5026 19.0069 33.5026 20.333V28.6663C33.5027 29.1599 33.4297 29.6508 33.2859 30.123M29.9526 33.4563C29.2054 33.6828 28.4155 33.7311 27.6463 33.5973C26.8771 33.4636 26.1499 33.1516 25.5229 32.6863C24.8959 32.2211 24.3866 31.6154 24.0358 30.9179C23.685 30.2204 23.5024 29.4504 23.5026 28.6697V27.003M16.8359 28.6663C16.8356 30.7719 17.405 32.8383 18.484 34.6465C19.5629 36.4546 21.111 37.9371 22.9642 38.9366C24.8174 39.9362 26.9066 40.4156 29.0102 40.324C31.1137 40.2324 33.1533 39.5732 34.9126 38.4163M38.2459 35.083C39.5023 33.1791 40.1701 30.9474 40.1659 28.6663M21.8359 46.9997H35.1693M28.5026 40.333V46.9997","stroke","black","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M42.375 39.2135C42.7034 39.1007 42.9883 38.8881 43.19 38.6054C43.3917 38.3227 43.5001 37.9841 43.5 37.6369V26.3635C43.4998 26.0795 43.4271 25.8003 43.2888 25.5523C43.1504 25.3043 42.9509 25.0958 42.7093 24.9465C42.4677 24.7973 42.192 24.7122 41.9083 24.6994C41.6246 24.6867 41.3424 24.7466 41.0883 24.8735L33.5 28.6669V30.3335V25.3333C33.5 24.4493 33.1488 23.6014 32.5237 22.9763C31.8986 22.3512 31.0507 22 30.1667 22H25.1667M33.5 37V38.6667C33.5 39.5507 33.1488 40.3986 32.5237 41.0237C31.8986 41.6488 31.0507 42 30.1667 42H16.8333C15.9493 42 15.1014 41.6488 14.4763 41.0237C13.8512 40.3986 13.5 39.5507 13.5 38.6667V25.3333C13.5 24.4493 13.8512 23.6014 14.4763 22.9763C15.1014 22.3512 15.9493 22 16.8333 22H18.5","stroke","white","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"],["d","M42.375 39.2135C42.7034 39.1007 42.9883 38.8881 43.19 38.6054C43.3917 38.3227 43.5001 37.9841 43.5 37.6369V26.3635C43.4998 26.0795 43.4271 25.8003 43.2888 25.5523C43.1504 25.3043 42.9509 25.0958 42.7093 24.9465C42.4677 24.7973 42.192 24.7122 41.9083 24.6994C41.6246 24.6867 41.3424 24.7466 41.0883 24.8735L33.5 28.6669V30.3335V25.3333C33.5 24.4493 33.1488 23.6014 32.5237 22.9763C31.8986 22.3512 31.0507 22 30.1667 22H25.1667M33.5 37V38.6667C33.5 39.5507 33.1488 40.3986 32.5237 41.0237C31.8986 41.6488 31.0507 42 30.1667 42H16.8333C15.9493 42 15.1014 41.6488 14.4763 41.0237C13.8512 40.3986 13.5 39.5507 13.5 38.6667V25.3333C13.5 24.4493 13.8512 23.6014 14.4763 22.9763C15.1014 22.3512 15.9493 22 16.8333 22H18.5","stroke","currentColor","stroke-opacity","0.52","stroke-width","2.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,s){if(e&1&&(a(0,"div",3,0),k(2,4),u(3,X,26,17,"ng-container",5)(4,te,26,17,"ng-container",5),b(),o()),e&2){let w=x(1);p("snippylyOverlay",w)("snippylyOverlayZIndex",3e3),n(2),p("ngSwitch",s.type),n(),p("ngSwitchCase","audio"),n(),p("ngSwitchCase","video")}},dependencies:[j,T,$,F,G],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)} .velt-mat-dialog-container.velt-device-permission-denied-dialog--panel mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{padding:0;background-color:transparent;box-shadow:none;overflow:unset}.velt-device-permission-denied-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-lg);align-items:center;justify-content:center;padding:4rem;box-sizing:border-box;word-break:break-word;max-width:600px;max-height:400px;text-align:center;background-color:var(--velt-background-0);border-radius:var(--velt-border-radius-2xl);box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--icon[_ngcontent-%COMP%]{color:var(--velt-error)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--header[_ngcontent-%COMP%]{font-size:var(--velt-font-size-lg);font-weight:600;line-height:36px;letter-spacing:-.02em;text-align:center;color:var(--velt-text-0)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--content[_ngcontent-%COMP%]{font-size:var(--velt-font-size-sm);font-weight:400;line-height:21px;text-align:center;color:var(--velt-text-0)}.velt-device-permission-denied-dialog[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--content[_ngcontent-%COMP%] .velt-device-permission-denied-dialog--page-info-icon[_ngcontent-%COMP%]{margin-left:var(--velt-spacing-sm);margin-right:var(--velt-spacing-sm);color:var(--velt-error)}"],changeDetection:0});let t=r;return t})();var me=(()=>{let r=class r{constructor(i,e){this.loggingService=i,this.matDialog=e,this.audioPermissionState$=new y(null),this.videoPermissionState$=new y(null);try{this.loggingService.log("%c[WB] Creating CLASS: DevicePermissionService","color: blue;"),this.checkPermissions()}catch(s){this.loggingService.catch("Error in DevicePermissionService constructor: ",s)}}checkPermissions(){try{this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: checkPermissions","color: green;"),new N().browserName!=="Firefox"&&(navigator.permissions.query({name:"microphone"}).then(e=>{this.audioPermissionState$.next(e.state),e.onchange=()=>{this.audioPermissionState$.next(e.state)}}).catch(e=>{}),navigator.permissions.query({name:"camera"}).then(e=>{this.videoPermissionState$.next(e.state),e.onchange=()=>{this.videoPermissionState$.next(e.state)}}).catch(e=>{}))}catch(i){this.loggingService.catch("Error in DevicePermissionService checkPermissions: ",i)}}getPermissionState$(i){try{switch(this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: getPermissionState$","color: green;"),i){case"audio":return this.getAudioPermissionState$();case"video":return this.getVideoPermissionState$();default:return S(null)}}catch(e){return this.loggingService.catch("Error in DevicePermissionService getPermissionState$: ",e),S(null)}}getAudioPermissionState$(){return this.audioPermissionState$.asObservable()}getVideoPermissionState$(){return this.videoPermissionState$.asObservable()}openDevicePermissionDeniedDialog(i,e){try{this.loggingService.log("%c[WB] Calling DevicePermissionService FUNCTION: openDevicePermissionDeniedDialog","color: green;"),this.matDialog.open(z,{panelClass:["velt-device-permission-denied-dialog--panel","velt-mat-dialog-container"],backdropClass:["velt-device-permission-denied-dialog--backdrop","s-background-blur-1"],data:I({type:i},e||{})})}catch(s){this.loggingService.catch("Error in DevicePermissionService openDevicePermissionDeniedDialog: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(f),D(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"});let t=r;return t})();export{me as a};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.26",
|
|
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": [
|