@paradow/ledge-relay 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/build.json +1 -1
- package/web/sw.js +1 -1
package/package.json
CHANGED
package/web/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.64.0","fingerprint":"97b2641a74e40ee46e64ceb3b631632977ec7df7dd9547f4ca0d3dff45f93a48"}
|
package/web/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){"use strict";const w=a=>[...new Uint8Array(a)].map(t=>t.toString(16).padStart(2,"0")).join("");async function A(a){const t=[...a].sort((e,n)=>e.path<n.path?-1:e.path>n.path?1:0).map(e=>`${e.path} ${e.sha256}
|
|
2
|
-
`).join("");return w(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(t)))}const h={fr:{title:{request:()=>"Ledge",question:()=>"Ledge",finished:a=>`${a} a terminé`,resolved:a=>`${a} · traitée`,decision:a=>`${a} attend ta décision`,point:()=>"Ledge",chat:"Ledge a répondu"},fallbackTitle:"Ledge",fallbackBody:"Une demande attend",chatTap:"Touche pour lire la réponse."},en:{title:{request:()=>"Ledge",question:()=>"Ledge",finished:a=>`${a} has finished`,resolved:a=>`${a} · handled`,decision:a=>`${a} needs your decision`,point:()=>"Ledge",chat:"Ledge has answered"},fallbackTitle:"Ledge",fallbackBody:"A request is waiting",chatTap:"Tap to read the answer."}},x="Touchez pour lire la réponse.",p=a=>a==="en"?"en":"fr";function D(a,t){const e=h[t];if(a.kind==="point")return{title:e.title.point(""),body:a.body};const n=a.kind==="chat"?e.title.chat:a.name?e.title[a.kind](a.name):a.title,c=(a.kind==="request"||a.kind==="question")&&a.name&&!a.body.startsWith(`${a.name} · `)?`${a.name} · ${a.body}`:a.body,i=a.kind==="chat"&&a.body===x?e.chatTap:c;return{title:n,body:i}}var N=[{path:"/assets/App-CZdQQob4.js",sha256:"48bfc2d545292671485b0326a629600400d4e587bb2ab80e8ef1b3449d375376"},{path:"/assets/boot-Df6KxLoV.js",sha256:"febe4c6ce7c978fc89b2ba4f2596650f5833299cef591e9c08b8a66fd406e480"},{path:"/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2",sha256:"2317fa4bb293c9c0b110e18315d529235c47a0ddd3338cea3d8c7955e927899e"},{path:"/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2",sha256:"6894439694946a589d157ece003086960a6a4013d74a813dab7602efdb3d8c09"},{path:"/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2",sha256:"824f485b5d26e2f2da3c2b236132ece1bc8e4e43373452950bb0e40548b4313f"},{path:"/assets/geist-latin-wght-normal-BgDaEnEv.woff2",sha256:"19f9c92546aa300c312235e3125af1b81394d8db9a4bc4a425cd5b641d2d54e1"},{path:"/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2",sha256:"cd8800999070b729e1cc0bf7a48da6c3ac096a044251171b9a7574b56d96d4b4"},{path:"/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2",sha256:"4866787fc952dbdbd591d6923d67bc21c2d894b93f34ab69d0cdf25d47bfb2df"},{path:"/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2",sha256:"1a189eb997c3e2ece68373e387afaec9e8617424186c4b1ab3cff7c54ba6223b"},{path:"/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2",sha256:"684ad5b531f81d43c1e8c7038262d5db7cdc1f68006e04d6c7769efa8d33c8cc"},{path:"/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2",sha256:"5bb66d8319ba1602bb2eb67dce8d79c2b4687be8ce183a0574433e949b3c60ad"},{path:"/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2",sha256:"d39b60889a94a527a7f73c7988a2d6efb6c081614aef683b0b386c02d74c2175"},{path:"/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2",sha256:"8fa40e5d248247735eb97a0bd593b8852440430600d6ba01364c31fe0abc1fe1"},{path:"/assets/index-B7Qk80Pv.css",sha256:"87531ce9d3a0a900ed97a57ac525609327106161751111be4e052beb4bf9f830"},{path:"/assets/index-Cm_-9uqI.js",sha256:"7832b22a9de1551083e89c88e647c97ab04970046913248bb70b649d12118f0c"},{path:"/assets/label-BjpUvtdY.js",sha256:"28b3a39e4b011575cffa92cff6505d2d58dc08b658979264712fc428d6e6ead4"},{path:"/assets/xterm-DYP7pi_n.css",sha256:"7c5a01f382f76539fc9b4db6b18e18a7035741845fd14968c5cdc0a7e373d817"},{path:"/assets/xterm-DbCZs1Jk.js",sha256:"b1eb7f0decb087932e28dc9cab37a37069fc8383c89bf41b454003c0f117abf2"},{path:"/favicon-32.png",sha256:"8afb58670e4e93f81a4b5930accfcba9e23b642d7693ff2da4ae51a1799af893"},{path:"/favicon.svg",sha256:"03c39e5e05688a324925df07bc4731187842241de621a9610005954aaf718782"},{path:"/icon-180.png",sha256:"b01c3662cb0ef681df940908deb9f8b52caab71dccc4e295bd0e73a6d090c2f3"},{path:"/icon-192.png",sha256:"8271411145eaf7f8d58fad0930a2cc47facd6fa23db77f3ed68a4b6f7d83f323"},{path:"/icon-512.png",sha256:"a5e56463db48adec3e467dcb75736b8f5b8358a59df44b1177e4c139e80bbeaf"},{path:"/icon-maskable-512.png",sha256:"7e4530e0046b6ede752cfc9278f99b0c5110665b36ee7f35fa958ee6ebee77f8"},{path:"/index.html",sha256:"4b9148eef32406eb0e510f9d431431fb6aa8b84b91a606acd9208b92a3ee688e"},{path:"/manifest.webmanifest",sha256:"02c67cf82fcc6431c0c4c3951f1bd7f6c4eee20f3a35f515cd1b37c5ba031af0"}];const s=self,S=N,l="/sw.js",r="ledge-",o=`${r}0.
|
|
2
|
+
`).join("");return w(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(t)))}const h={fr:{title:{request:()=>"Ledge",question:()=>"Ledge",finished:a=>`${a} a terminé`,resolved:a=>`${a} · traitée`,decision:a=>`${a} attend ta décision`,point:()=>"Ledge",chat:"Ledge a répondu"},fallbackTitle:"Ledge",fallbackBody:"Une demande attend",chatTap:"Touche pour lire la réponse."},en:{title:{request:()=>"Ledge",question:()=>"Ledge",finished:a=>`${a} has finished`,resolved:a=>`${a} · handled`,decision:a=>`${a} needs your decision`,point:()=>"Ledge",chat:"Ledge has answered"},fallbackTitle:"Ledge",fallbackBody:"A request is waiting",chatTap:"Tap to read the answer."}},x="Touchez pour lire la réponse.",p=a=>a==="en"?"en":"fr";function D(a,t){const e=h[t];if(a.kind==="point")return{title:e.title.point(""),body:a.body};const n=a.kind==="chat"?e.title.chat:a.name?e.title[a.kind](a.name):a.title,c=(a.kind==="request"||a.kind==="question")&&a.name&&!a.body.startsWith(`${a.name} · `)?`${a.name} · ${a.body}`:a.body,i=a.kind==="chat"&&a.body===x?e.chatTap:c;return{title:n,body:i}}var N=[{path:"/assets/App-CZdQQob4.js",sha256:"48bfc2d545292671485b0326a629600400d4e587bb2ab80e8ef1b3449d375376"},{path:"/assets/boot-Df6KxLoV.js",sha256:"febe4c6ce7c978fc89b2ba4f2596650f5833299cef591e9c08b8a66fd406e480"},{path:"/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2",sha256:"2317fa4bb293c9c0b110e18315d529235c47a0ddd3338cea3d8c7955e927899e"},{path:"/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2",sha256:"6894439694946a589d157ece003086960a6a4013d74a813dab7602efdb3d8c09"},{path:"/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2",sha256:"824f485b5d26e2f2da3c2b236132ece1bc8e4e43373452950bb0e40548b4313f"},{path:"/assets/geist-latin-wght-normal-BgDaEnEv.woff2",sha256:"19f9c92546aa300c312235e3125af1b81394d8db9a4bc4a425cd5b641d2d54e1"},{path:"/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2",sha256:"cd8800999070b729e1cc0bf7a48da6c3ac096a044251171b9a7574b56d96d4b4"},{path:"/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2",sha256:"4866787fc952dbdbd591d6923d67bc21c2d894b93f34ab69d0cdf25d47bfb2df"},{path:"/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2",sha256:"1a189eb997c3e2ece68373e387afaec9e8617424186c4b1ab3cff7c54ba6223b"},{path:"/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2",sha256:"684ad5b531f81d43c1e8c7038262d5db7cdc1f68006e04d6c7769efa8d33c8cc"},{path:"/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2",sha256:"5bb66d8319ba1602bb2eb67dce8d79c2b4687be8ce183a0574433e949b3c60ad"},{path:"/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2",sha256:"d39b60889a94a527a7f73c7988a2d6efb6c081614aef683b0b386c02d74c2175"},{path:"/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2",sha256:"8fa40e5d248247735eb97a0bd593b8852440430600d6ba01364c31fe0abc1fe1"},{path:"/assets/index-B7Qk80Pv.css",sha256:"87531ce9d3a0a900ed97a57ac525609327106161751111be4e052beb4bf9f830"},{path:"/assets/index-Cm_-9uqI.js",sha256:"7832b22a9de1551083e89c88e647c97ab04970046913248bb70b649d12118f0c"},{path:"/assets/label-BjpUvtdY.js",sha256:"28b3a39e4b011575cffa92cff6505d2d58dc08b658979264712fc428d6e6ead4"},{path:"/assets/xterm-DYP7pi_n.css",sha256:"7c5a01f382f76539fc9b4db6b18e18a7035741845fd14968c5cdc0a7e373d817"},{path:"/assets/xterm-DbCZs1Jk.js",sha256:"b1eb7f0decb087932e28dc9cab37a37069fc8383c89bf41b454003c0f117abf2"},{path:"/favicon-32.png",sha256:"8afb58670e4e93f81a4b5930accfcba9e23b642d7693ff2da4ae51a1799af893"},{path:"/favicon.svg",sha256:"03c39e5e05688a324925df07bc4731187842241de621a9610005954aaf718782"},{path:"/icon-180.png",sha256:"b01c3662cb0ef681df940908deb9f8b52caab71dccc4e295bd0e73a6d090c2f3"},{path:"/icon-192.png",sha256:"8271411145eaf7f8d58fad0930a2cc47facd6fa23db77f3ed68a4b6f7d83f323"},{path:"/icon-512.png",sha256:"a5e56463db48adec3e467dcb75736b8f5b8358a59df44b1177e4c139e80bbeaf"},{path:"/icon-maskable-512.png",sha256:"7e4530e0046b6ede752cfc9278f99b0c5110665b36ee7f35fa958ee6ebee77f8"},{path:"/index.html",sha256:"4b9148eef32406eb0e510f9d431431fb6aa8b84b91a606acd9208b92a3ee688e"},{path:"/manifest.webmanifest",sha256:"02c67cf82fcc6431c0c4c3951f1bd7f6c4eee20f3a35f515cd1b37c5ba031af0"}];const s=self,S=N,l="/sw.js",r="ledge-",o=`${r}0.64.0-9e4ed046a38f3bff`,d=`${r}meta`,u="/accepted",g="/lang",_=/^\/(auth(\/.*)?|ws|healthz|push\/key)$/,f="/pending/",I=24*36e5,y=/^\/#\/[A-Za-z0-9/%._~-]*$/,j=/^[A-Za-z0-9_-]{1,32}$/,m=async a=>w(await crypto.subtle.digest("SHA-256",a));async function k(){const a=await(await caches.open(d)).match(u);return a?a.text():null}const b=async()=>await k()??o;async function q(){var e;const a=await caches.open(d),t=[];for(const n of await a.keys()){const c=new URL(n.url).pathname;if(!c.startsWith(f))continue;const i=Number(await((e=await a.match(c))==null?void 0:e.text()));Date.now()-i<I?t.push(c.slice(f.length)):await a.delete(c)}return t}async function B(){var a;try{return p(await((a=await(await caches.open(d)).match(g))==null?void 0:a.text()))}catch{return"fr"}}async function v(){await(await caches.open(d)).put(u,new Response(o)),await L()}async function L(){const a=new Set([d,o,await b(),...await q()]);for(const t of await caches.keys())t.startsWith(r)&&!a.has(t)&&await caches.delete(t)}async function E(a,t){const e=await fetch(a,{cache:"no-cache"});if(!e.ok)throw new Error(`${a}: ${e.status}`);if(t!==void 0&&await m(await e.clone().arrayBuffer())!==t)throw new Error(`${a}: not the file of this build`);return e}async function C(){const a=await caches.open(d);await a.put(f+o,new Response(String(Date.now())));const t=await caches.open(o);try{const e=await Promise.all([...S.map(n=>E(n.path,n.sha256).then(c=>[n.path,c])),E(l).then(n=>[l,n])]);for(const[n,c]of e)await t.put(n,c)}catch(e){throw await k()!==o&&await caches.delete(o),await a.delete(f+o),e}s.registration.active||(await v(),await s.skipWaiting())}async function P(){await(await caches.open(d)).delete(f+o),await L(),await s.clients.claim()}async function O(a,t){const e=await b();return(await caches.has(e)?await(await caches.open(e)).match(t):void 0)??fetch(a)}async function T(a){if(!await caches.has(a))return null;const t=await caches.open(a),e=[];for(const n of await t.keys()){const c=new URL(n.url).pathname,i=await t.match(c);i&&e.push({path:c,sha256:await m(await i.arrayBuffer())})}return e.some(n=>n.path===l)?{version:a.slice(r.length,a.lastIndexOf("-")),fingerprint:await A(e)}:null}async function W(){const a=await b();return{current:await T(a),pending:a===o?null:await T(o)}}s.addEventListener("install",a=>a.waitUntil(C())),s.addEventListener("activate",a=>a.waitUntil(P())),s.addEventListener("fetch",a=>{const{request:t}=a;if(t.method!=="GET")return;const e=new URL(t.url);e.origin!==s.location.origin||_.test(e.pathname)||a.respondWith(O(t,t.mode==="navigate"?"/index.html":e.pathname))}),s.addEventListener("message",a=>{var e;const t=(e=a.data)==null?void 0:e.type;t==="build"&&a.waitUntil(W().then(n=>{var c;return(c=a.ports[0])==null?void 0:c.postMessage(n)})),t==="lang"&&a.waitUntil(caches.open(d).then(n=>n.put(g,new Response(p(a.data.lang))))),t==="accept"&&a.waitUntil((async()=>{await v(),await s.skipWaiting();for(const n of await s.clients.matchAll({type:"window",includeUncontrolled:!0}))n.postMessage({type:"changed"})})())});function R(a){if(typeof a!="object"||a===null)return null;const t=a,e=(c,i)=>typeof c=="string"&&c.length<=i;return t.v===1&&(t.kind==="request"||t.kind==="question"||t.kind==="finished"||t.kind==="chat"||t.kind==="decision"||t.kind==="resolved"||t.kind==="point")&&e(t.title,80)&&(t.name===void 0||e(t.name,100))&&e(t.body,120)&&e(t.url,300)&&y.test(t.url)&&typeof t.badge=="number"&&Number.isInteger(t.badge)&&t.badge>=0&&t.badge<=999&&typeof t.tag=="string"&&j.test(t.tag)?a:null}s.addEventListener("push",a=>{var e;let t=null;try{t=R((e=a.data)==null?void 0:e.json())}catch{}a.waitUntil((async()=>{var $,U;const n=await B();if(!t)return s.registration.showNotification(h[n].fallbackTitle,{body:h[n].fallbackBody,tag:"ledge",renotify:!0});const{title:c,body:i}=D(t,n);await s.registration.showNotification(c,{body:i,tag:t.tag,data:{url:t.url,kind:t.kind},icon:"/icon-192.png",renotify:t.kind!=="finished"&&t.kind!=="resolved"&&t.kind!=="point"});try{await((U=($=s.registration).setAppBadge)==null?void 0:U.call($,t.badge))}catch{}})())}),s.addEventListener("notificationclick",a=>{var n;a.notification.close();const t=(n=a.notification.data)==null?void 0:n.url,e=typeof t=="string"&&t.length<=300&&y.test(t)?t:"/#/";a.waitUntil((async()=>{var i;const[c]=await s.clients.matchAll({type:"window",includeUncontrolled:!0});if(!c)return void await s.clients.openWindow(e);await((i=c.focus)==null?void 0:i.call(c)),c.postMessage({type:"ledge.open",url:e})})())})})();
|