mnfst 0.5.313 → 0.5.315
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/lib/manifest.appwrite.data.js +1 -1
- package/lib/manifest.data.js +1 -1
- package/lib/manifest.data.min.js +1 -1
- package/lib/manifest.integrity.json +10 -10
- package/lib/manifest.js +2 -2
- package/lib/manifest.min.js +1 -1
- package/lib/manifest.modules.integrity.json +7 -7
- package/lib/manifest.schema.json +9 -2
- package/lib/manifest.sw.js +1 -1
- package/lib/manifest.sw.min.js +1 -1
- package/lib/manifest.utilities.js +71 -48
- package/lib/manifest.utilities.min.js +1 -1
- package/lib/manifest.utilities.min.js.map +1 -1
- package/lib/manifest.utilities.node.mjs +56 -43
- package/package.json +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest.accordion.css": "sha384-XA/UMMX/m2c8/rtvH3LeUez5j/jjNq+sTvihfja4fT2r47bWdpLH/wRpR+4PGdRN",
|
|
3
3
|
"manifest.appwrite.auth.js": "sha384-n+Fohtui5o2h3HpM7ifnop9YsAdlTj0uHYfzljQMghLJeDkODC6OXop6ds6OTZha",
|
|
4
4
|
"manifest.appwrite.auth.min.js": "sha384-qN5XF96RpRVTzBeOBoxwh6ziq2+eZ2rS0cLUtlwp4CFcbyuMCaf6kHFJKoWEGNvp",
|
|
5
|
-
"manifest.appwrite.data.js": "sha384-
|
|
5
|
+
"manifest.appwrite.data.js": "sha384-EopS1Hg5bz70dtV0vu0T7Fw59RYhQdY4AS8a5GuuO4eaVtAo5ZYsaWeVpnOiT5DB",
|
|
6
6
|
"manifest.appwrite.data.min.js": "sha384-0fTVQE2rvA0T/qiXgSxe9YZDezipYFzrsSqnDcN8Xh6Vij1Pt/b3M6xySEqUtTjK",
|
|
7
7
|
"manifest.appwrite.presences.js": "sha384-O3EedwV2QTzd4YotjvGPsDHbxaGbtRaZuNopC7/Cfoo5uYPo8ZHYkCPCWurXpA2/",
|
|
8
8
|
"manifest.appwrite.presences.min.js": "sha384-7AHt7baL29VI3S1Nbkkyq34j2eJ2ysGpDnllmpXXSlc4GHvTk5hdCrXra2R3mSfH",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
36
36
|
"manifest.computed.min.js": "sha384-90LbCcEOhrjhxi0GWBRb3DJyOkKWLRwzK7Z2nkbc1uaZ5B9EGmNKqx+mstTLWFGJ",
|
|
37
37
|
"manifest.css": "sha384-WvntWYbbzn/qhMLloLI/aTaw1TIuYuPuISMLLBaC2ELhmFPYu1rix/WNzyDeG/Z+",
|
|
38
|
-
"manifest.data.js": "sha384-
|
|
39
|
-
"manifest.data.min.js": "sha384-
|
|
38
|
+
"manifest.data.js": "sha384-CS+Pe/8OK9J/N4WpKq53UxD80K9mIS5NztAp+dQqdAQ6s85GCHUqOKJXjJ281i8a",
|
|
39
|
+
"manifest.data.min.js": "sha384-XkUI6r/rkPXxDykOx3oAaH8BK/2pe8dHtOhaHM/4O7wBjPfT5Aq3hHGG1VSNGSp5",
|
|
40
40
|
"manifest.datepicker.css": "sha384-lW6PLZxKr2GjR/O16oPq+5wrBZjQ1UCQUo2PTQZaj0FW8hCh6dydjzCF1qcp9up4",
|
|
41
41
|
"manifest.datepicker.js": "sha384-pZUQhUK6u5cl6g0myBXND/Wtrs1RTovYmy/ETQLUV0JujvTvUdRNc/XjPpVhtK16",
|
|
42
42
|
"manifest.datepicker.min.js": "sha384-e6xN1xQW3LLFvmSWrh3INMCgfUwD+gJca6n9fJfUFArA/OSm2KY0MDeN0pHVsYiw",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"manifest.icons.js": "sha384-kKOINpX70YzNO3FvkV6umrmO3f0KIu0DNbwB+ej55a7y/lhU7v/myQtXL0bwCTbt",
|
|
59
59
|
"manifest.icons.min.js": "sha384-RAKDwcHLQFVqT/fTZCwC3vTfBn6TkWC8psFm9aRwbJBbtZCruaBGcd4KqaIP//T4",
|
|
60
60
|
"manifest.input.css": "sha384-6+ErMsR67xE2xQWUS6QPhYH89pqf4wY4GEIDPq6jcQrHDqZMthyX4I93N4DttG7c",
|
|
61
|
-
"manifest.js": "sha384
|
|
61
|
+
"manifest.js": "sha384-vJJsbOKeZrxXR/sYjalGl8BaA5stnseOc/GuSJtu84j4rJwOJZuIupJhs2sy0tRI",
|
|
62
62
|
"manifest.localization.js": "sha384-9EDAqnI7MNCZp4Vas0RMZgceCuz9EJUi/OARm8iI+Hi4S8HF//yyVOhhhhQ+XcLq",
|
|
63
63
|
"manifest.localization.min.js": "sha384-5EkwrlpE29wmsy0JBq7UwWy8rVzEsu8tTprnsiNThVddFWsbFd63C/il4JjnWLmP",
|
|
64
64
|
"manifest.markdown.js": "sha384-rh24qtS792HpX6P83zUQEOxloelp1zNMninBZWSh5XTfpSEfmAasEjVG/OBAK76C",
|
|
65
65
|
"manifest.markdown.min.js": "sha384-SQE17YSZCRm9blVSP9bPH/Wf1ZsEFh/9cKQWX3ohORBuPWTkwZLpcbN8PC5BstJ6",
|
|
66
66
|
"manifest.min.css": "sha384-ZLXKtchybe6D6nmOkd2CYR9LzplunAqxpUkvf8yfrn8BLT/M2jNo83Tb95mdx98L",
|
|
67
|
-
"manifest.min.js": "sha384-
|
|
68
|
-
"manifest.modules.integrity.json": "sha384-
|
|
67
|
+
"manifest.min.js": "sha384-ybK4C+3D+ZZec76a8VY0wtdCwMA6Ju0cqKiI9pbBYI7/Ju+7tviiug6hTW98pTN5",
|
|
68
|
+
"manifest.modules.integrity.json": "sha384-YPUC4lJWFO3o0iZYuXC+g++MOJn7vV8TjO3tet9ZuzWW/cb5Gfh4njXbIrHtkOYk",
|
|
69
69
|
"manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
70
70
|
"manifest.native.min.js": "sha384-3xZep6D5icnCvKbzPxQ6QxqvJMfWI0GiADQrGkiFJEhe8sXg6P6vfIAjLUykFi+2",
|
|
71
71
|
"manifest.payments.js": "sha384-3Db2i47QA5I/Id5XMkwJThxSe8wZFiEEcJaKuuIjE5yBjGBxPMWFwhE4wgdvWgOo",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"manifest.submissions.min.js": "sha384-p/5Ekd6u/cTsyVQbRgGzEi3h1hJU9zD7+hjdR+upcwt++26sfrLXMjFI2YjS8zWt",
|
|
89
89
|
"manifest.svg.js": "sha384-D1jF3a0pXIuzm7T2sltyzblF8BTZ8sv1CkfJyQ33q21G6QlYyjdPv8DJi80eCISD",
|
|
90
90
|
"manifest.svg.min.js": "sha384-rsvQ50FgVpTxX2Wvba3hed2TQvZR+CHHfgS4Cg7V1Dyjx6rxkS1s6rG6UMWDIMez",
|
|
91
|
-
"manifest.sw.js": "sha384-
|
|
92
|
-
"manifest.sw.min.js": "sha384-
|
|
91
|
+
"manifest.sw.js": "sha384-519v59p7EO7b3aLlIvYR37xSE7a5G1YE4z5uWp9Ty2y7d4XjRrtrzU3HjKUsWnE1",
|
|
92
|
+
"manifest.sw.min.js": "sha384-TnXOGW1snM1/Out4NUrTVY5X7Gl9Xvh/cAe69WL8Hsxsnsx0tJJ8Migk6o870Jlw",
|
|
93
93
|
"manifest.switch.css": "sha384-s3+th9ojcLpRGhxxS9u4VR+AVRUqK6sNI62h4TAuZG7G1r1bNqXo1z/UMhTon00x",
|
|
94
94
|
"manifest.table.css": "sha384-1XqR9mQSrxogf6fGcbVEbQ/cObABBAlMNfpW6T0vibXYwHv6l9kF3AVTXg/FknpM",
|
|
95
95
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
108
108
|
"manifest.url.parameters.min.js": "sha384-0C6e6FIjB9TKVGy5W0LH0TDQ3Eg4mRAokM4MANHUuwoG0IzUZV7HaYUQd2AnkB7a",
|
|
109
109
|
"manifest.utilities.css": "sha384-+y0FwD4lna9Ud4w1rbauDlfHQzBXcwluAdrNhtMKMP1L1ygAn6KSvUUceZBGq19U",
|
|
110
|
-
"manifest.utilities.js": "sha384-
|
|
111
|
-
"manifest.utilities.min.js": "sha384-
|
|
110
|
+
"manifest.utilities.js": "sha384-eageU5iIrcVA1XUl51NE5Fnaz0kGCaZ15R2AthhdGZlg6q0OWL+CrqdLbym6LnRm",
|
|
111
|
+
"manifest.utilities.min.js": "sha384-lxLEf5mo3LSkDpzPOl2FhXmAFVAjwJ/93SGHxN/hMlvzGGJTNBkUQu7GJpKnUKYo",
|
|
112
112
|
"manifest.vendor.integrity.json": "sha384-xMKQh8gEBZhtaYhv09XUs3amAIT3Oh7aKrsGN0ABsnlIpbgxr5OHi5FxQTQhqz3E",
|
|
113
113
|
"manifest.virtual.js": "sha384-PtIDx042i29mkxEYZH+y3whBzKgBgV01CU1XzzeEl/8TBPl9qvny4ppyXgYI5DsM",
|
|
114
114
|
"manifest.virtual.min.js": "sha384-T50w4Y91/MCfR2ioessUCNc7ddvbr93fDxR81+zN6pGj2G5or02TIx6NLH3e/o3O"
|
package/lib/manifest.js
CHANGED
|
@@ -353,8 +353,8 @@
|
|
|
353
353
|
const DEFAULT_VERSION = 'latest';
|
|
354
354
|
|
|
355
355
|
// Stamped at build
|
|
356
|
-
const LOADER_VERSION = '0.5.
|
|
357
|
-
const MODULES_INTEGRITY = 'sha384-
|
|
356
|
+
const LOADER_VERSION = '0.5.315';
|
|
357
|
+
const MODULES_INTEGRITY = 'sha384-YPUC4lJWFO3o0iZYuXC+g++MOJn7vV8TjO3tet9ZuzWW/cb5Gfh4njXbIrHtkOYk';
|
|
358
358
|
const INTEGRITY_FILE = 'manifest.modules.integrity.json';
|
|
359
359
|
const VENDOR_FILE = 'manifest.vendor.integrity.json';
|
|
360
360
|
// 'strict' | 'warn' while checks are requested; map promise while they apply
|
package/lib/manifest.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";const e=document.currentScript;if(!window.ManifestPending){const we=new Map;let ge=0;window.ManifestPending={hold(e="work"){const t=++ge;return we.set(t,e),()=>{we.delete(t)}},get count(){return we.size+(window.__manifestMarkdownPending||0)+(window.__manifestUtilitiesPending||0)},labels(){const e=[...we.values()];return window.__manifestMarkdownPending>0&&e.push("markdown"),window.__manifestUtilitiesPending>0&&e.push("utilities"),e},background:e=>("function"==typeof e&&(e.__manifestBackground=!0),e)}}const t=new Set,n=new WeakSet;let i=!1;function o(){for(const e of[...t])e.settle()}function r(){i||(i=!0,queueMicrotask(()=>{i=!1,o()}))}function a(e){for(let t=e.parentNode;t;t=t.parentNode)if(t._x_ignore)return!0;return!1}function s(e,i){const s=window.Alpine,c=e.getAttribute("x-if");let d=!e.closest("[x-data],[x-init]"),l=!1,u=null;const f=()=>!!s.evaluate(e,c),m=()=>{u&&(u(),u=null)},p=()=>{t.delete(y),m()},w=()=>{d=!1,l=!1,m(),i._x_ignore=!0,t.add(y)},g=()=>{p(),s.mutateDom(()=>{s.destroyTree(i),i.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl,r()},h=()=>{d||e._x_currentIfEl!==i||!i.isConnected||a(e)||(d=!0,l=!1,p(),delete i._x_ignore,s.initTree(i),o())},y={settle(){if(!d&&!l)return e._x_currentIfEl!==i?p():void(i.isConnected?e._x_marker&&!a(e)&&f()&&h():i.getRootNode()instanceof DocumentFragment||p())}},v=()=>window.__manifestReady||!window.__manifestReadyCoordinator?g():(queueMicrotask(()=>{e._x_currentIfEl===i&&(e._x_undoIf=v,(()=>{if(u||!l||e._x_currentIfEl!==i||a(e))return;const t=s.evaluateLater(e,c),n=s.effect(()=>t(e=>{e&&queueMicrotask(()=>{l&&f()&&h()})}));u=()=>s.release(n)})())}),a(e)?w():(d&&(d=!1,i._x_ignore=!0,s.destroyTree(i),t.add(y)),void(l||(l=!0,window.addEventListener("manifest:ready",()=>{if(l&&e._x_currentIfEl===i){if(e.isConnected&&a(e))return w();if(e.isConnected&&f())return h();g(),delete e._x_undoIf}},{once:!0})))));e._x_currentIfEl=i,e._x_lastRenderedEl=i,e._x_undoIf=v,n.add(e),d||(i._x_ignore=!0,t.add(y))}function c(e,t){e.querySelectorAll("template").forEach(e=>{const n=t||e.matches("[x-if],[x-for]");n&&e.content.querySelectorAll("[data-pre-rendered]").forEach(e=>{e.tagName.startsWith("X-")&&e.removeAttribute("data-pre-rendered")}),c(e.content,n)})}function d(){try{!function(){if("undefined"==typeof document||!document.querySelector)return;const e=document.querySelector('meta[name="manifest:prerendered"]');if(!e||"0"===e.getAttribute("content"))return;const t=document.getElementById("__manifest_hydrate__");if(!t)return;let n;try{n=JSON.parse(t.textContent||"[]")}catch(e){n=[]}if(!Array.isArray(n)||0===n.length)return void t.remove();const i=e=>String(null==e?"":e).replace(/&/g,"&").replace(/"/g,"""),o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),r=[];for(const e of n){const t=document.querySelector('[data-hydrate-id="'+e.id+'"]');if(!t)continue;let n=0;for(let e=t.parentNode;e;e=e.parentNode)n++;r.push({entry:e,el:t,depth:n})}r.sort((e,t)=>t.depth-e.depth);for(const{entry:e,el:t}of r){const n=document.querySelector('[data-hydrate-id="'+e.id+'"]')||t;if(!n||!n.parentNode)continue;if("string"==typeof e.html){const t=n.tagName.toLowerCase(),r={},a=n.attributes;for(let e=0;e<a.length;e++)"data-hydrate-id"!==a[e].name&&(r[a[e].name]=a[e].value);if(e.attrs)for(const t in e.attrs){const n=e.attrs[t];null===n?delete r[t]:r[t]=n}const s=Object.keys(r).map(e=>e+'="'+i(r[e])+'"').join(" "),c=o.has(t)?"<"+t+" "+s+">":"<"+t+" "+s+">"+e.html+"</"+t+">",d=document.createElement("div");d.innerHTML=c;const l=d.firstElementChild;if(l)try{n.parentNode.replaceChild(l,n)}catch(e){}continue}if(!e.attrs)continue;const r=n.tagName.toLowerCase(),a={},s=n.attributes;for(let e=0;e<s.length;e++)"data-hydrate-id"!==s[e].name&&(a[s[e].name]=s[e].value);for(const t in e.attrs){const n=e.attrs[t];null===n?delete a[t]:a[t]=n}const c=Object.keys(a).map(e=>e+'="'+i(a[e])+'"').join(" "),d=o.has(r),l=d?"":n.innerHTML,u=d?"<"+r+" "+c+">":"<"+r+" "+c+">"+l+"</"+r+">",f=document.createElement("div");f.innerHTML=u;const m=f.firstElementChild;if(m)try{n.parentNode.replaceChild(m,n)}catch(e){}}t.remove()}()}catch(e){}}if("undefined"!=typeof document&&document.addEventListener("alpine:init",function(){if("undefined"==typeof document||!document.querySelectorAll)return;c(document);let e=0;if(document.querySelectorAll("[data-mnfst-prerender-clone]").forEach(t=>{if(t.closest&&t.closest("[data-hydrate]"))return;t.removeAttribute("data-mnfst-prerender-clone");const n=t.previousElementSibling;n&&"TEMPLATE"===n.tagName&&n.hasAttribute("x-if")?(s(n,t),e++):t.remove()}),!e)return;const i=window.Alpine;"function"==typeof i.interceptInit&&i.interceptInit(e=>{n.has(e)&&t.size&&r()}),document.addEventListener("alpine:initialized",o,{once:!0})},{once:!0}),"undefined"!=typeof document)if("loading"===document.readyState){let he=!1;document.addEventListener("readystatechange",()=>{he||"loading"===document.readyState||(he=!0,d())})}else d();if("undefined"!=typeof window&&"undefined"!=typeof document){let ye=null;window.addEventListener("resize",()=>{document.documentElement.classList.add("window-resizing"),ye&&clearTimeout(ye),ye=setTimeout(()=>{document.documentElement.classList.remove("window-resizing"),ye=null},200)},{passive:!0})}const l="latest",u="0.5.313",f="sha384-3ilRgYyZT9GVh2JzZKNTJyxKfCOnHz6GbcXmydxK86Ti2xua2MmC2VhFBmBaX/JV",m="manifest.modules.integrity.json",p="manifest.vendor.integrity.json";let w=null,g=null,h=!1,y=null,v=l,_=["https://cdn.manifestx.dev/npm","https://cdn.jsdelivr.net/npm","https://unpkg.com"];function b(e,t){return e.includes("unpkg.com")?t.replace(/\.min\.js$/,".js"):t}function $(e=l,t=_[0]){return`${t}/mnfst@${e}/lib`}const E=["components","router","utilities","data","icons","localization","markdown","svg","code","color","toasts","tooltips","dropdowns","combobox","computed","tabs","slides","colorpicker","datepicker","charts","url-parameters","virtual","export","status"],k=["defer","bindings"],L=["edit"],S=["appwrite-auth","appwrite-data","appwrite-presences"],M=["rich-text","submissions"],j={"appwrite-data":["data"],"appwrite-presences":["data","appwrite-auth"],device:["utilities"],edit:["rich-text"]};let x=null;function A(e,t=v){const n=e.replace(/-/g,".");if(x){return[`${x.replace(/\/$/,"")}/manifest.${n}.js`]}return _.map(e=>`${$(t,e)}/${b(e,`manifest.${n}.min.js`)}`)}function P(e,t=v){return A(e,t)[0]}function C(e){if(function(){if("complete"===document.readyState)return!0;if("loading"===document.readyState)return!1;try{const e=performance.getEntriesByType("navigation")[0];if(e)return e.domContentLoadedEventEnd>0}catch(e){}return!1}())return void e();let t=!1;const n=()=>{t||(t=!0,e())};document.addEventListener("DOMContentLoaded",n,{once:!0}),window.addEventListener("load",n,{once:!0})}function N(t){if(t.hasAttribute("data-mnfst-loaded"))return!0;if(t.hasAttribute("data-mnfst-loading"))return!1;if("complete"===document.readyState)return!0;if(!t.async&&!t.defer&&e&&e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)return!0;try{if(t.src&&performance.getEntriesByName(t.src).length)return!0}catch(e){}return!1}function I(e,t,n=!0){return new Promise((i,o)=>{const r=document.querySelector(`script[src="${e}"]`);if(r){if(N(r))return i();let t=!1;const n=()=>{t||(t=!0,i())};r.addEventListener("load",n),r.addEventListener("error",()=>{t||(t=!0,o(new Error(`Failed to load ${e}`)))});const a=setInterval(()=>{N(r)&&(clearInterval(a),n())},50);return void setTimeout(()=>{clearInterval(a),n()},4e3)}const a=document.createElement("script");t&&(a.integrity=t,a.crossOrigin="anonymous"),a.src=e,a.async=!n,a.setAttribute("data-mnfst-loading",""),a.onload=()=>{a.removeAttribute("data-mnfst-loading"),a.setAttribute("data-mnfst-loaded",""),i()},a.onerror=()=>{a.removeAttribute("data-mnfst-loading"),a.remove(),o(new Error(`Failed to load ${e}`))},document.head.appendChild(a)})}function T(e){return e.split(/[?#]/)[0].split("/").pop()}function R(e){const t=e.match(/(alpinejs@[^/]+\/dist\/cdn\.min\.js)(?:[?#]|$)/);return t?t[1]:null}function O(e){try{const t=performance.getEntriesByName(new URL(e,location.href).href).pop();return!!t&&200===t.responseStatus}catch(e){return!1}}function W(e,t){if("warn"!==w)throw console.error(`[Manifest Loader] ${e} ${t} data-integrity="warn" loads it unchecked instead.`),Object.assign(new Error(e),{logged:!0});console.warn(`[Manifest Loader] ${e} Loading unchecked (data-integrity="warn").`)}async function q(e,t,n){for(const i of e){try{const e=await fetch(i,t?{integrity:t,mode:"cors",credentials:"omit"}:{mode:"cors",credentials:"omit"});if(e.ok)return e}catch(e){}console.error(`[Manifest Loader] ${n} failed to load${t?" or failed its integrity check":""} from ${i}`)}throw new Error(`${n} could not be ${t?"verified":"loaded"} from any CDN${t?` (expected ${t})`:""}.`)}let z=null;const U=/^sha(256|384|512)-[A-Za-z0-9+/=]+$/;function B(e,t){const n=e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:null;return"string"==typeof n&&U.test(n)?n:null}async function D(e,t){const n=B(e,t);if(n)return n;const i=B(e,p);return i&&/\/(languages|langs)\//.test(t)?(z||(z=q(_.map(e=>`${$(u,e)}/${p}`),i,p).then(e=>e.json()).catch(e=>{throw z=null,e})),B(await z,t)):null}async function F(e,{key:t=null,hash:n=null,alpine:i=!1,unchecked:o=!1,ordered:r=!0}={}){const a=g&&!o?await g:null,s=t||T(e[0]||"");let c=null;for(const o of e){let s=n;if(a){const e=t||(i?R(o):T(o));s=e&&await D(a,e)||(i?y:null),s||(i?W(`No integrity hash is known for Alpine at ${o}. Add data-alpine-integrity="sha384-…" for it, or remove data-alpine to use the default.`,"Alpine was not loaded."):W(`${e||o} has no integrity hash in this release.`,"Not loaded."))}try{return await I(o,s,r)}catch(t){c=t,s?console.error(`[Manifest Loader] ${T(o)} ${O(o)?"failed its integrity check":"failed to load or failed its integrity check"} from ${o}${e.length>1?" — trying next CDN":""}`):e.length>1&&console.warn(`[Manifest Loader] ${o} failed — trying fallback CDN`)}}throw a&&console.error(`[Manifest Loader] ${s} did not match its integrity hash on any CDN — not loaded.`),c||new Error(`Failed to load ${s}`)}const V=new Map;async function H(e,t=v){const n=V.get(e);if(n)return n.version!==t&&console.warn(`[Manifest Loader] ${e} already loaded at ${n.version} — ignoring request for ${t}`),n.promise;const i=async function(e,t){let n=!1;return h&&t!==u&&(W(`Integrity checks cover this loader's own version (${u}); ${e} was requested at ${t}.`,"Not loaded."),n=!0),F(A(e,t),{unchecked:n})}(e,t);return V.set(e,{version:t,promise:i}),i.catch(()=>V.delete(e)),i}function Z(e){const t=[],n=new Set,i={native:"device",import:"export"};function o(e){if(e=i[e]||e,n.has(e))return;const r=j[e];if(r)for(const e of r)n.has(e)||o(e);t.push(e),n.add(e)}for(const t of e)o(t);return t}const J=[{magic:"$chat",plugin:"chat"},{magic:"$presence",plugin:"appwrite-presences"},{magic:"$rich",plugin:"rich-text",attr:"x-rich-text"},{plugin:"submissions",attr:"x-submit"},...["$share","$secure","$links","$push","$app","$haptics","$biometric","$camera"].map(e=>({magic:e,plugin:"device"}))].map(e=>({...e,re:e.magic?new RegExp("\\"+e.magic+"\\b"):null}));let G=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||G)return;G=!0;const e=()=>{const e=window.Alpine;if(window.ManifestRichText||!e||!e.magic||!e.reactive||window.__manifestRichStub)return;const t=window.__manifestRichStub=e.reactive({v:0}),n=window.__manifestRichStubWrites=[],i=new WeakMap,o=e=>e&&"function"==typeof e.deref?e.deref():e,r={value:"",link:"",selection:null,all:{},active:()=>!1,can:()=>!1,markdown:()=>"",html:()=>""};e.magic("rich",(e,a)=>(t.v,window.__manifestRichMagic?window.__manifestRichMagic(e,a):(e=>(i.has(e)||i.set(e,new Proxy(r,{get:(t,i)=>{const r=n.find(t=>o(t[0])===e&&t[1]===i);return r?r[2]:i in t?t[i]:"string"==typeof i?()=>{}:void 0},set:(t,i,r)=>{for(let t=n.length-1;t>=0;t--){const r=o(n[t][0]);r&&r.isConnected&&(r!==e||n[t][1]!==i)||n.splice(t,1)}return n.push(["function"==typeof WeakRef?new WeakRef(e):e,i,r]),!0}})),i.get(e)))(e)))};document.addEventListener("alpine:init",e,{once:!0}),window.Alpine&&window.Alpine.magic&&e()}();let K=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||K)return;K=!0;const e=()=>{const e=window.Alpine;if(window.__manifestEditMagic||!e||!e.magic||!e.reactive||window.__manifestEditStub)return;const t=window.__manifestEditStub=e.reactive({v:0}),n=()=>!1,i=window.__manifestEditStubWrites={},o=new Proxy({active:!1,canUndo:!1,canRedo:!1,version:0,stale:[],conflicts:[],onPublish:null,target:null,can:n,scope:()=>null,block:()=>null,patches:()=>[],export:()=>({log:[],cursor:0}),publish:()=>Promise.resolve({results:[]}),undo:()=>Promise.resolve(!1),redo:()=>Promise.resolve(!1),classes:new Proxy({},{get:()=>n})},{get:(e,t)=>t in i?i[t]:t in e?e[t]:"string"==typeof t?n:void 0,set:(e,t,n)=>(i[t]=n,!0)});e.magic("edit",(e,n)=>(t.v,window.__manifestEditMagic?window.__manifestEditMagic(e,n):o))};document.addEventListener("alpine:init",e,{once:!0}),window.Alpine&&window.Alpine.magic&&e()}(),"undefined"!=typeof document&&document.addEventListener("alpine:initialized",()=>{window.__manifestAlpineStarted=!0},{once:!0});const X=/^x-(code|code-group)$/,Y=new RegExp("\\$("+J.filter(e=>e.magic).map(e=>e.magic.slice(1)).join("|")+")\\b"),Q=new Set;function ee(e,t=("undefined"==typeof document?null:document)){const n=J.filter(t=>!e.includes(t.plugin)),i=!e.includes("components");if(0===n.length&&!i||!t)return[];const o=new Set,r=new Set(n.map(e=>e.plugin)).size+(i?1:0),a=()=>o.size===r;for(const e of t.querySelectorAll("script:not([src])")){const t=e.textContent||"";for(const e of n)e.re&&!o.has(e.plugin)&&e.re.test(t)&&o.add(e.plugin);if(a())return[...o]}const s=e=>{if(i&&!o.has("components")){const t=e.tagName.toLowerCase();t.startsWith("x-")&&!X.test(t)&&o.add("components")}for(const t of e.attributes||[]){for(const e of n)e.attr&&!o.has(e.plugin)&&(t.name===e.attr||t.name.startsWith(e.attr+"-")||t.name.startsWith(e.attr+"."))&&o.add(e.plugin);const e=t.value;if(e&&-1!==e.indexOf("$")&&!Q.has(e))if(Y.test(e))for(const t of n)t.re&&!o.has(t.plugin)&&t.re.test(e)&&o.add(t.plugin);else Q.size>2e4&&Q.clear(),Q.add(e)}},c=e=>{for(const t of e.querySelectorAll("*")){if(s(t),a())return;if("TEMPLATE"===t.tagName&&t.content&&(c(t.content),a()))return}};return 1===t.nodeType&&(s(t),"TEMPLATE"===t.tagName&&t.content&&c(t.content)),a()||c(t),[...o]}let te=!1;const ne=new Set,ie=e=>V.has(e)||ne.has(e);function oe(e,t=v){if(!te||!e||"undefined"==typeof document)return Promise.resolve([]);let n=e;if("string"==typeof e){if(-1===e.indexOf("x-")&&-1===e.indexOf("$"))return Promise.resolve([]);n=document.createElement("template"),n.innerHTML=e,n=n.content}const i=ee([...new Set(J.map(e=>e.plugin))].filter(ie).concat("components"),n);if(!i.length)return Promise.resolve([]);const o=Z(i).filter(e=>!ie(e));return Promise.all(o.map(e=>H(e,t).catch(t=>{ne.has(e)||(ne.add(e),console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t))}))).then(()=>o)}function re(e){if("undefined"==typeof MutationObserver)return;const t=new Set;let n=!1;const i=new MutationObserver(o=>{for(const e of o)for(const n of e.addedNodes)1===n.nodeType&&t.add(n);!n&&t.size&&(n=!0,setTimeout(()=>{n=!1;const o=[...t].filter(e=>e.isConnected);t.clear(),o.forEach(t=>oe(t,e)),J.every(e=>ie(e.plugin))&&i.disconnect()},0))});i.observe(document.documentElement,{childList:!0,subtree:!0})}const ae={"text-edit":"rich-text"};function se(e){return e.filter(e=>{const t=e.replace(/^\+/,"");return!ae[t]||(console.warn(`[Manifest Loader] ${t} was renamed to ${ae[t]}`),!1)})}async function ce(e=v){const t=_.map(t=>`${$(e,t)}/${b(t,"manifest.tailwind.min.js")}`);let n=null;try{return await F(t)}catch(e){n=e}throw console.warn('[Manifest Loader] Tailwind plugin not available from any CDN. Load it directly: <script src="/scripts/tailwind.v4.3.1.js"><\/script>'),n||new Error("Tailwind plugin not available from CDN.")}window.Manifest={loadPlugin:function(e,t=v){if(![...E,...M,...S,...L,"payments","chat","device","native","import","tailwind"].includes(e))return ae[e]?se([e]):console.warn(`[Manifest Loader] Unknown module: ${e}`),Promise.reject(new Error(`Unknown module: ${e}`));const n=Z([e]);return Promise.all(n.map(e=>H(e,t)))},loadTailwind:ce,loadVendor:function(e,t){return F(_.map(t=>`${t}/${e}`),{key:e,hash:t,ordered:!1})},fetchVendor:async function(e,t){const n=g?await g:null;let i=t||null;return n&&(i=await D(n,e),i||W(`${e} has no integrity hash in this release.`,"Not loaded.")),q(_.map(t=>`${t}/${e}`),i,e)},get integrity(){return h},getPluginUrl:P,getModuleUrl:P,loadUsed:oe},window.Manifest.loadModule=window.Manifest.loadPlugin;const de="/sw.js";const le={registered:!1,version:null,kill:()=>ue(null)};async function ue(e){le.registered=!1;try{const t=e||await navigator.serviceWorker.getRegistration(de);if(t){const e=t.active||t.waiting||t.installing;try{e&&e.postMessage({type:"manifest:sw",action:"kill"})}catch(e){}await t.unregister()}}catch(e){}try{if(window.caches){const e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith("mnfst-sw:")).map(e=>caches.delete(e)))}}catch(e){}}async function fe(e){const t=e.sw,n="on"===t,i=n?(...e)=>console.info("[Manifest SW]",...e):()=>{};if(!navigator.serviceWorker)return i("skip: unsupported");const o=window.location,r=!!window.__mnfstRun,a=function(e){const t=String(e||"").toLowerCase();return"localhost"===t||"127.0.0.1"===t||"[::1]"===t||"::1"===t||"0.0.0.0"===t||t.endsWith(".localhost")||t.endsWith(".local")}(o.hostname);let s=window.__manifestLoaded||null;if(!s&&window.__manifestPromise&&(s=await window.__manifestPromise.catch(()=>null)),!s){const e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json";s=await fetch(e).then(e=>e.ok?e.json():null).catch(()=>null)}const c="off"===t||s&&!1===s.sw,d=await navigator.serviceWorker.getRegistration(de).catch(()=>null);if(c||r||a&&!n)return i("skip:",c?"kill switch":r?"mnfst-run":"dev origin",d?"(unregistering)":""),void await ue(d);if(!("https:"===o.protocol||n&&window.isSecureContext))return i("skip: not https");let l=null;try{l=sessionStorage.getItem("manifest:sw-probe")}catch(e){}const u="strict"===w;if("ok"!==l||u){const e=await fetch(de,{cache:"no-store"}).catch(()=>null),t=e&&e.headers.get("content-type")||"";if(!e||!e.ok||!/javascript|ecmascript/i.test(t))return i("skip: no stub",e&&e.status,t);if(u&&(f=await e.text().catch(()=>""),(String(f).match(/importScripts\s*\(([^)]*)\)/g)||[]).some(e=>(e.match(/https?:\/\/[^'"`\s)]+/g)||[]).some(e=>{try{return new URL(e).origin!==location.origin}catch(e){return!0}}))))return console.warn(`[Manifest Loader] ${de} imports its worker module from another origin, which integrity checks can't cover, so the service worker stays off. Serve the module from this origin (copy lib/manifest.sw.min.js into ${de}), set data-sw="off", or set data-integrity="warn" to register it anyway.`),void await ue(d);try{sessionStorage.setItem("manifest:sw-probe","ok")}catch(e){}}var f;const m=s&&"string"==typeof s.deployment?s.deployment:"",p=`${de}?v=${encodeURIComponent(e.version)}&d=${encodeURIComponent(m)}`,g=await navigator.serviceWorker.register(p,{scope:"/"});le.registered=!0,le.version=e.version,i("registered",p,g.active?"active":g.installing?"installing":"waiting")}window.Manifest.swStub=function(e=l){const t=`mnfst@${String(e||l).replace(/[^\w.+-]/g,"")}/lib/manifest.sw.min.js`;return`try { importScripts('https://cdn.manifestx.dev/npm/${t}'); } catch (e) { importScripts('https://cdn.jsdelivr.net/npm/${t}'); }\nif (!self.__mnfstSw) self.addEventListener('activate', function () { self.registration.unregister(); });\n`},window.Manifest.sw=le;const me=function(){let e=document.currentScript;if(e||(e=document.querySelector('script[src*="manifest.js"]')),!e)return null;const t=e.getAttribute("data-modules")??e.getAttribute("data-plugins"),n=e.getAttribute("data-omit"),i=null!==e.getAttribute("data-tailwind"),o=e.getAttribute("data-version")||l,r=!!e.getAttribute("data-version"),a=e.getAttribute("data-alpine"),s=(e.getAttribute("data-integrity")??"").trim().toLowerCase(),c=/^(off|false)$/.test(s)?null:"warn"===s?"warn":e.hasAttribute("data-integrity")||e.getAttribute("integrity")?"strict":null,d=e.getAttribute("data-module-base")??e.getAttribute("data-plugin-base"),u=e.getAttribute("data-cdn"),f=e.getAttribute("data-sw");let m=[],p=[],w=!t;if(t){const e=se(t.split(",").map(e=>e.trim()).filter(e=>e));p=e.filter(e=>e.startsWith("+")).map(e=>e.slice(1));const n=e.filter(e=>!e.startsWith("+"));n.length>0?m=[...n,...p]:(w=!0,m=E.slice())}else m=E.slice();if(n&&m.length>0){const e=n.split(",").map(e=>e.trim());m=m.filter(t=>!e.includes(t))}return m=Z(m),{plugins:m,extraPlugins:p,deriveFromManifest:w,tailwind:i,version:o,versionSet:r,alpine:a,alpineIntegrity:e.getAttribute("data-alpine-integrity"),integrity:c,pluginBase:d,cdn:u,sw:f}}();var pe;if(me&&me.version&&(v=me.version),me&&me.pluginBase&&(pe=me.pluginBase,x=pe||null),me&&me.cdn&&function(e){if(!e)return;const t=e.split(",").map(e=>e.trim().replace(/\/$/,"")).filter(Boolean);t.length&&(_=t)}(me.cdn),me&&me.integrity&&(w=me.integrity,!me.versionSet&&f&&(v=me.version=u),h=me.version===u,y=me.alpineIntegrity&&U.test(me.alpineIntegrity.trim())?me.alpineIntegrity.trim():null,g=async function(e){if(e.version!==u)return W(`Integrity checks cover this loader's own version (${u}), but data-version is "${e.version}". Set data-version="${u}" or remove it.`,"No modules were loaded."),null;const t=x?[`${x.replace(/\/$/,"")}/${m}`]:_.map(e=>`${$(u,e)}/${m}`);try{return await(await q(t,f,m)).json()}catch(e){throw new Error(`${e.message} No modules were loaded.`)}}(me),g.catch(()=>{})),function(e){if(!e||window.__manifestSwArmed)return;const t=window.__manifestSwArmed={};let n=!1;const i=()=>{if(!n&&window.__manifestSwArmed===t){n=!0;try{fe(e).catch(()=>{})}catch(e){}}};setTimeout(()=>{if(window.__manifestReady)return i();window.addEventListener("manifest:ready",i,{once:!0}),window.__manifestLoaderStarted||("complete"===document.readyState?setTimeout(i,0):window.addEventListener("load",i,{once:!0}))},0)}(me),me&&me.plugins.length>0){if(window.__manifestLoaderStarted)return;window.__manifestLoaderStarted=!0;const ve=["data","localization","components","appwrite-auth","appwrite-data","appwrite-presences","payments","chat"],_e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json",be=new Set,$e=e=>{if(null===e||"object"!=typeof e)return;const t=e=>e.replace(/\$\{([^}]+)\}/g,(e,t)=>"undefined"!=typeof window&&window.env&&void 0!==window.env[t]?window.env[t]:(be.has(t)||(be.add(t),t.startsWith("PUBLIC_")?console.warn(`[Manifest] manifest.json references \${${t}}, but it is not present in window.env. Add ${t}=… to .env (read by mnfst-run) or set it via <script>window.env = {…}<\/script>. Leaving placeholder literal.`):console.warn(`[Manifest] manifest.json references \${${t}}, but only PUBLIC_-prefixed env vars are injected into window.env by mnfst-run. Rename to PUBLIC_${t}, hardcode the value, or supply it via <script>window.env = {…}<\/script>. Leaving placeholder literal.`)),e)),n=e=>{if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];"string"==typeof o?e[i]=t(o):o&&"object"==typeof o&&n(o)}else for(const i of Object.keys(e)){const o=e[i];"string"==typeof o?e[i]=t(o):o&&"object"==typeof o&&n(o)}};n(e)},Ee=()=>window.__manifestLoaded?Promise.resolve(window.__manifestLoaded):(window.__manifestPromise||(window.__manifestPromise=fetch(_e).then(e=>e.ok?e.json():null).then(e=>(e&&!e.__interpolated&&($e(e),Object.defineProperty(e,"__interpolated",{value:!0,enumerable:!1})),e)).catch(()=>null)),window.__manifestPromise);function ke(e,t){if(window.__manifestReadyCoordinator)return;window.__manifestReadyCoordinator=!0;const n=window.ManifestPending.hold("ready"),i=!!t,o={data:!e.some(e=>"data"===e||"appwrite-data"===e)||!!window.__manifestRenderReady,utilities:!i||!!window.__manifestUtilitiesReady};let r=!1,a=null;const s=()=>!(window.__manifestMarkdownPending>0),c=()=>!(window.__manifestUtilitiesPending>0),d=()=>{r||(r=!0,n(),window.__manifestReady=!0,window.dispatchEvent(new CustomEvent("manifest:ready")))},l=()=>{r||o.data&&o.utilities&&s()&&c()&&(clearTimeout(a),a=setTimeout(()=>{o.data&&o.utilities&&s()&&c()&&d()},300))};window.addEventListener("manifest:render-ready",()=>{o.data=!0,l()}),window.addEventListener("manifest:utilities-ready",()=>{o.utilities=!0,l()}),window.addEventListener("manifest:utilities-idle",l),window.addEventListener("manifest:markdown-idle",l),setTimeout(d,15e3),l()}(async()=>{if(g){(me.deriveFromManifest||me.plugins.some(e=>ve.includes(e)))&&Ee();try{await g}catch(e){return void(e.logged||console.error(`[Manifest Loader] ${e.message}`))}}let e=null,t=me.plugins,n=null;if(me.deriveFromManifest){e=await Ee();const n=function(e){if(!e||"object"!=typeof e)return E.slice();const t=e.data&&"object"==typeof e.data&&Object.keys(e.data).length>0,n=e.components?.length>0||e.preloadedComponents?.length>0,i=(()=>{if(!e.data||"object"!=typeof e.data)return!1;for(const t of Object.values(e.data))if(t&&"object"==typeof t){if("string"==typeof t.locales)return!0;for(const e of Object.keys(t))if(!["url","headers","params","transform","defaultValue","locales"].includes(e)&&/^[a-zA-Z]{2}(-[a-zA-Z]{2})?$/.test(e))return!0}return!1})(),o=e.status&&"object"==typeof e.status&&Object.keys(e.status).length>0;return E.filter(e=>"data"===e?t:"localization"===e?i:"components"===e?n:"status"!==e||o)}(e),i=function(e){if(!e||"object"!=typeof e)return[];if(!(e.appwrite||e.data&&Object.values(e.data).some(e=>e&&"object"==typeof e&&(e.appwriteTableId||e.appwriteDatabaseId||e.appwriteBucketId))))return[];const t=[];return e.appwrite?.auth&&t.push("appwrite-auth"),(e.appwrite||e.data&&Object.values(e.data).some(e=>e&&"object"==typeof e&&e.appwriteTableId))&&t.push("appwrite-data"),(e.appwrite?.presence||e.appwrite?.presences)&&t.push("appwrite-presences"),t}(e),o=function(e){return e&&"object"==typeof e&&e.payments&&"object"==typeof e.payments?["payments"]:[]}(e),r=function(e){return e&&"object"==typeof e&&(e.ai||e.chat)?["chat"]:[]}(e),a=function(e){if("undefined"!=typeof window&&window.Capacitor)return["device"];const t=e&&"object"==typeof e?e.device??e.native:null;return t&&"object"==typeof t?["device"]:[]}(e);t=Z([...k,...n,...i,...o,...r,...a,...me.extraPlugins||[]])}else{t=Z([...k,...t.filter(e=>!k.includes(e))]);me.plugins.some(e=>ve.includes(e))&&(n=Ee()),"undefined"!=typeof window&&window.Capacitor&&!t.includes("device")&&(t=Z([...t,"device"]))}const i=t.map(e=>H(e,me.version).catch(t=>{console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t)}));me.tailwind&&!function(){try{return!!document.querySelector("style[data-mnfst-utilities][data-mnfst-utilities-complete]")}catch(e){return!1}}()&&i.push(ce(me.version).catch(()=>{})),await Promise.all(i),n&&(e=await n),e&&"undefined"!=typeof window&&(window.__manifestLoaded=e,window.ManifestComponentsRegistry&&(window.ManifestComponentsRegistry.manifest=e)),C(async()=>{if(me.deriveFromManifest){try{const e=ee(t);if(e.length>0){const n=Z(e).filter(e=>!t.includes(e));await Promise.all(n.map(e=>H(e,me.version).catch(t=>{ne.add(e),console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t)})))}}catch(e){}te=!0,re(me.version)}var e;ke(t,me.tailwind),e=function(e){if(e&&(e.startsWith("http")||e.startsWith("/")))return[e];const t=e||"3.17.5";return _.map(e=>`${e}/alpinejs@${t}/dist/cdn.min.js`)}(me.alpine),C(()=>{window.Alpine||document.querySelector('script[src*="alpinejs"]')||F(e,{alpine:!0}).catch(e=>{e.logged||console.error("[Manifest Loader] Alpine.js failed to load from all CDNs.")})})})})()}}();
|
|
1
|
+
!function(){"use strict";const e=document.currentScript;if(!window.ManifestPending){const we=new Map;let ge=0;window.ManifestPending={hold(e="work"){const t=++ge;return we.set(t,e),()=>{we.delete(t)}},get count(){return we.size+(window.__manifestMarkdownPending||0)+(window.__manifestUtilitiesPending||0)},labels(){const e=[...we.values()];return window.__manifestMarkdownPending>0&&e.push("markdown"),window.__manifestUtilitiesPending>0&&e.push("utilities"),e},background:e=>("function"==typeof e&&(e.__manifestBackground=!0),e)}}const t=new Set,n=new WeakSet;let i=!1;function o(){for(const e of[...t])e.settle()}function r(){i||(i=!0,queueMicrotask(()=>{i=!1,o()}))}function a(e){for(let t=e.parentNode;t;t=t.parentNode)if(t._x_ignore)return!0;return!1}function s(e,i){const s=window.Alpine,c=e.getAttribute("x-if");let d=!e.closest("[x-data],[x-init]"),l=!1,u=null;const f=()=>!!s.evaluate(e,c),m=()=>{u&&(u(),u=null)},p=()=>{t.delete(y),m()},w=()=>{d=!1,l=!1,m(),i._x_ignore=!0,t.add(y)},g=()=>{p(),s.mutateDom(()=>{s.destroyTree(i),i.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl,r()},h=()=>{d||e._x_currentIfEl!==i||!i.isConnected||a(e)||(d=!0,l=!1,p(),delete i._x_ignore,s.initTree(i),o())},y={settle(){if(!d&&!l)return e._x_currentIfEl!==i?p():void(i.isConnected?e._x_marker&&!a(e)&&f()&&h():i.getRootNode()instanceof DocumentFragment||p())}},v=()=>window.__manifestReady||!window.__manifestReadyCoordinator?g():(queueMicrotask(()=>{e._x_currentIfEl===i&&(e._x_undoIf=v,(()=>{if(u||!l||e._x_currentIfEl!==i||a(e))return;const t=s.evaluateLater(e,c),n=s.effect(()=>t(e=>{e&&queueMicrotask(()=>{l&&f()&&h()})}));u=()=>s.release(n)})())}),a(e)?w():(d&&(d=!1,i._x_ignore=!0,s.destroyTree(i),t.add(y)),void(l||(l=!0,window.addEventListener("manifest:ready",()=>{if(l&&e._x_currentIfEl===i){if(e.isConnected&&a(e))return w();if(e.isConnected&&f())return h();g(),delete e._x_undoIf}},{once:!0})))));e._x_currentIfEl=i,e._x_lastRenderedEl=i,e._x_undoIf=v,n.add(e),d||(i._x_ignore=!0,t.add(y))}function c(e,t){e.querySelectorAll("template").forEach(e=>{const n=t||e.matches("[x-if],[x-for]");n&&e.content.querySelectorAll("[data-pre-rendered]").forEach(e=>{e.tagName.startsWith("X-")&&e.removeAttribute("data-pre-rendered")}),c(e.content,n)})}function d(){try{!function(){if("undefined"==typeof document||!document.querySelector)return;const e=document.querySelector('meta[name="manifest:prerendered"]');if(!e||"0"===e.getAttribute("content"))return;const t=document.getElementById("__manifest_hydrate__");if(!t)return;let n;try{n=JSON.parse(t.textContent||"[]")}catch(e){n=[]}if(!Array.isArray(n)||0===n.length)return void t.remove();const i=e=>String(null==e?"":e).replace(/&/g,"&").replace(/"/g,"""),o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),r=[];for(const e of n){const t=document.querySelector('[data-hydrate-id="'+e.id+'"]');if(!t)continue;let n=0;for(let e=t.parentNode;e;e=e.parentNode)n++;r.push({entry:e,el:t,depth:n})}r.sort((e,t)=>t.depth-e.depth);for(const{entry:e,el:t}of r){const n=document.querySelector('[data-hydrate-id="'+e.id+'"]')||t;if(!n||!n.parentNode)continue;if("string"==typeof e.html){const t=n.tagName.toLowerCase(),r={},a=n.attributes;for(let e=0;e<a.length;e++)"data-hydrate-id"!==a[e].name&&(r[a[e].name]=a[e].value);if(e.attrs)for(const t in e.attrs){const n=e.attrs[t];null===n?delete r[t]:r[t]=n}const s=Object.keys(r).map(e=>e+'="'+i(r[e])+'"').join(" "),c=o.has(t)?"<"+t+" "+s+">":"<"+t+" "+s+">"+e.html+"</"+t+">",d=document.createElement("div");d.innerHTML=c;const l=d.firstElementChild;if(l)try{n.parentNode.replaceChild(l,n)}catch(e){}continue}if(!e.attrs)continue;const r=n.tagName.toLowerCase(),a={},s=n.attributes;for(let e=0;e<s.length;e++)"data-hydrate-id"!==s[e].name&&(a[s[e].name]=s[e].value);for(const t in e.attrs){const n=e.attrs[t];null===n?delete a[t]:a[t]=n}const c=Object.keys(a).map(e=>e+'="'+i(a[e])+'"').join(" "),d=o.has(r),l=d?"":n.innerHTML,u=d?"<"+r+" "+c+">":"<"+r+" "+c+">"+l+"</"+r+">",f=document.createElement("div");f.innerHTML=u;const m=f.firstElementChild;if(m)try{n.parentNode.replaceChild(m,n)}catch(e){}}t.remove()}()}catch(e){}}if("undefined"!=typeof document&&document.addEventListener("alpine:init",function(){if("undefined"==typeof document||!document.querySelectorAll)return;c(document);let e=0;if(document.querySelectorAll("[data-mnfst-prerender-clone]").forEach(t=>{if(t.closest&&t.closest("[data-hydrate]"))return;t.removeAttribute("data-mnfst-prerender-clone");const n=t.previousElementSibling;n&&"TEMPLATE"===n.tagName&&n.hasAttribute("x-if")?(s(n,t),e++):t.remove()}),!e)return;const i=window.Alpine;"function"==typeof i.interceptInit&&i.interceptInit(e=>{n.has(e)&&t.size&&r()}),document.addEventListener("alpine:initialized",o,{once:!0})},{once:!0}),"undefined"!=typeof document)if("loading"===document.readyState){let he=!1;document.addEventListener("readystatechange",()=>{he||"loading"===document.readyState||(he=!0,d())})}else d();if("undefined"!=typeof window&&"undefined"!=typeof document){let ye=null;window.addEventListener("resize",()=>{document.documentElement.classList.add("window-resizing"),ye&&clearTimeout(ye),ye=setTimeout(()=>{document.documentElement.classList.remove("window-resizing"),ye=null},200)},{passive:!0})}const l="latest",u="0.5.315",f="sha384-YPUC4lJWFO3o0iZYuXC+g++MOJn7vV8TjO3tet9ZuzWW/cb5Gfh4njXbIrHtkOYk",m="manifest.modules.integrity.json",p="manifest.vendor.integrity.json";let w=null,g=null,h=!1,y=null,v=l,_=["https://cdn.manifestx.dev/npm","https://cdn.jsdelivr.net/npm","https://unpkg.com"];function b(e,t){return e.includes("unpkg.com")?t.replace(/\.min\.js$/,".js"):t}function $(e=l,t=_[0]){return`${t}/mnfst@${e}/lib`}const E=["components","router","utilities","data","icons","localization","markdown","svg","code","color","toasts","tooltips","dropdowns","combobox","computed","tabs","slides","colorpicker","datepicker","charts","url-parameters","virtual","export","status"],k=["defer","bindings"],L=["edit"],S=["appwrite-auth","appwrite-data","appwrite-presences"],j=["rich-text","submissions"],M={"appwrite-data":["data"],"appwrite-presences":["data","appwrite-auth"],device:["utilities"],edit:["rich-text"]};let A=null;function x(e,t=v){const n=e.replace(/-/g,".");if(A){return[`${A.replace(/\/$/,"")}/manifest.${n}.js`]}return _.map(e=>`${$(t,e)}/${b(e,`manifest.${n}.min.js`)}`)}function P(e,t=v){return x(e,t)[0]}function C(e){if(function(){if("complete"===document.readyState)return!0;if("loading"===document.readyState)return!1;try{const e=performance.getEntriesByType("navigation")[0];if(e)return e.domContentLoadedEventEnd>0}catch(e){}return!1}())return void e();let t=!1;const n=()=>{t||(t=!0,e())};document.addEventListener("DOMContentLoaded",n,{once:!0}),window.addEventListener("load",n,{once:!0})}function I(t){if(t.hasAttribute("data-mnfst-loaded"))return!0;if(t.hasAttribute("data-mnfst-loading"))return!1;if("complete"===document.readyState)return!0;if(!t.async&&!t.defer&&e&&e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)return!0;try{if(t.src&&performance.getEntriesByName(t.src).length)return!0}catch(e){}return!1}function N(e,t,n=!0){return new Promise((i,o)=>{const r=document.querySelector(`script[src="${e}"]`);if(r){if(I(r))return i();let t=!1;const n=()=>{t||(t=!0,i())};r.addEventListener("load",n),r.addEventListener("error",()=>{t||(t=!0,o(new Error(`Failed to load ${e}`)))});const a=setInterval(()=>{I(r)&&(clearInterval(a),n())},50);return void setTimeout(()=>{clearInterval(a),n()},4e3)}const a=document.createElement("script");t&&(a.integrity=t,a.crossOrigin="anonymous"),a.src=e,a.async=!n,a.setAttribute("data-mnfst-loading",""),a.onload=()=>{a.removeAttribute("data-mnfst-loading"),a.setAttribute("data-mnfst-loaded",""),i()},a.onerror=()=>{a.removeAttribute("data-mnfst-loading"),a.remove(),o(new Error(`Failed to load ${e}`))},document.head.appendChild(a)})}function R(e){return e.split(/[?#]/)[0].split("/").pop()}function T(e){const t=e.match(/(alpinejs@[^/]+\/dist\/cdn\.min\.js)(?:[?#]|$)/);return t?t[1]:null}function O(e){try{const t=performance.getEntriesByName(new URL(e,location.href).href).pop();return!!t&&200===t.responseStatus}catch(e){return!1}}function W(e,t){if("warn"!==w)throw console.error(`[Manifest Loader] ${e} ${t} data-integrity="warn" loads it unchecked instead.`),Object.assign(new Error(e),{logged:!0});console.warn(`[Manifest Loader] ${e} Loading unchecked (data-integrity="warn").`)}async function q(e,t,n){for(const i of e){try{const e=await fetch(i,t?{integrity:t,mode:"cors",credentials:"omit"}:{mode:"cors",credentials:"omit"});if(e.ok)return e}catch(e){}console.error(`[Manifest Loader] ${n} failed to load${t?" or failed its integrity check":""} from ${i}`)}throw new Error(`${n} could not be ${t?"verified":"loaded"} from any CDN${t?` (expected ${t})`:""}.`)}let U=null;const z=/^sha(256|384|512)-[A-Za-z0-9+/=]+$/;function D(e,t){const n=e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:null;return"string"==typeof n&&z.test(n)?n:null}async function B(e,t){const n=D(e,t);if(n)return n;const i=D(e,p);return i&&/\/(languages|langs)\//.test(t)?(U||(U=q(_.map(e=>`${$(u,e)}/${p}`),i,p).then(e=>e.json()).catch(e=>{throw U=null,e})),D(await U,t)):null}async function F(e,{key:t=null,hash:n=null,alpine:i=!1,unchecked:o=!1,ordered:r=!0}={}){const a=g&&!o?await g:null,s=t||R(e[0]||"");let c=null;for(const o of e){let s=n;if(a){const e=t||(i?T(o):R(o));s=e&&await B(a,e)||(i?y:null),s||(i?W(`No integrity hash is known for Alpine at ${o}. Add data-alpine-integrity="sha384-…" for it, or remove data-alpine to use the default.`,"Alpine was not loaded."):W(`${e||o} has no integrity hash in this release.`,"Not loaded."))}try{return await N(o,s,r)}catch(t){c=t,s?console.error(`[Manifest Loader] ${R(o)} ${O(o)?"failed its integrity check":"failed to load or failed its integrity check"} from ${o}${e.length>1?" — trying next CDN":""}`):e.length>1&&console.warn(`[Manifest Loader] ${o} failed — trying fallback CDN`)}}throw a&&console.error(`[Manifest Loader] ${s} did not match its integrity hash on any CDN — not loaded.`),c||new Error(`Failed to load ${s}`)}const H=new Map;async function Z(e,t=v){const n=H.get(e);if(n)return n.version!==t&&console.warn(`[Manifest Loader] ${e} already loaded at ${n.version} — ignoring request for ${t}`),n.promise;const i=async function(e,t){let n=!1;return h&&t!==u&&(W(`Integrity checks cover this loader's own version (${u}); ${e} was requested at ${t}.`,"Not loaded."),n=!0),F(x(e,t),{unchecked:n})}(e,t);return H.set(e,{version:t,promise:i}),i.catch(()=>H.delete(e)),i}function V(e){const t=[],n=new Set,i={native:"device",import:"export"};function o(e){if(e=i[e]||e,n.has(e))return;const r=M[e];if(r)for(const e of r)n.has(e)||o(e);t.push(e),n.add(e)}for(const t of e)o(t);return t}const J=[{magic:"$chat",plugin:"chat"},{magic:"$presence",plugin:"appwrite-presences"},{magic:"$rich",plugin:"rich-text",attr:"x-rich-text"},{plugin:"submissions",attr:"x-submit"},...["$share","$secure","$links","$push","$app","$haptics","$biometric","$camera"].map(e=>({magic:e,plugin:"device"}))].map(e=>({...e,re:e.magic?new RegExp("\\"+e.magic+"\\b"):null}));let X=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||X)return;X=!0;const e=()=>{const e=window.Alpine;if(window.ManifestRichText||!e||!e.magic||!e.reactive||window.__manifestRichStub)return;const t=window.__manifestRichStub=e.reactive({v:0}),n=window.__manifestRichStubWrites=[],i=new WeakMap,o=e=>e&&"function"==typeof e.deref?e.deref():e,r={value:"",link:"",selection:null,all:{},active:()=>!1,can:()=>!1,markdown:()=>"",html:()=>""};e.magic("rich",(e,a)=>(t.v,window.__manifestRichMagic?window.__manifestRichMagic(e,a):(e=>(i.has(e)||i.set(e,new Proxy(r,{get:(t,i)=>{const r=n.find(t=>o(t[0])===e&&t[1]===i);return r?r[2]:i in t?t[i]:"string"==typeof i?()=>{}:void 0},set:(t,i,r)=>{for(let t=n.length-1;t>=0;t--){const r=o(n[t][0]);r&&r.isConnected&&(r!==e||n[t][1]!==i)||n.splice(t,1)}return n.push(["function"==typeof WeakRef?new WeakRef(e):e,i,r]),!0}})),i.get(e)))(e)))};document.addEventListener("alpine:init",e,{once:!0}),window.Alpine&&window.Alpine.magic&&e()}();let Y=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||Y)return;Y=!0;const e=()=>{const e=window.Alpine;if(window.__manifestEditMagic||!e||!e.magic||!e.reactive||window.__manifestEditStub)return;const t=window.__manifestEditStub=e.reactive({v:0}),n=()=>!1,i=window.__manifestEditStubWrites={},o=new Proxy({active:!1,canUndo:!1,canRedo:!1,version:0,stale:[],conflicts:[],onPublish:null,target:null,can:n,scope:()=>null,block:()=>null,patches:()=>[],export:()=>({log:[],cursor:0}),publish:()=>Promise.resolve({results:[]}),undo:()=>Promise.resolve(!1),redo:()=>Promise.resolve(!1),classes:new Proxy({},{get:()=>n})},{get:(e,t)=>t in i?i[t]:t in e?e[t]:"string"==typeof t?n:void 0,set:(e,t,n)=>(i[t]=n,!0)});e.magic("edit",(e,n)=>(t.v,window.__manifestEditMagic?window.__manifestEditMagic(e,n):o))};document.addEventListener("alpine:init",e,{once:!0}),window.Alpine&&window.Alpine.magic&&e()}(),"undefined"!=typeof document&&document.addEventListener("alpine:initialized",()=>{window.__manifestAlpineStarted=!0},{once:!0});const G=/^x-(code|code-group)$/,K=new RegExp("\\$("+J.filter(e=>e.magic).map(e=>e.magic.slice(1)).join("|")+")\\b"),Q=new Set;function ee(e,t=("undefined"==typeof document?null:document)){const n=J.filter(t=>!e.includes(t.plugin)),i=!e.includes("components");if(0===n.length&&!i||!t)return[];const o=new Set,r=new Set(n.map(e=>e.plugin)).size+(i?1:0),a=()=>o.size===r;for(const e of t.querySelectorAll("script:not([src])")){const t=e.textContent||"";for(const e of n)e.re&&!o.has(e.plugin)&&e.re.test(t)&&o.add(e.plugin);if(a())return[...o]}const s=e=>{if(i&&!o.has("components")){const t=e.tagName.toLowerCase();t.startsWith("x-")&&!G.test(t)&&o.add("components")}for(const t of e.attributes||[]){for(const e of n)e.attr&&!o.has(e.plugin)&&(t.name===e.attr||t.name.startsWith(e.attr+"-")||t.name.startsWith(e.attr+"."))&&o.add(e.plugin);const e=t.value;if(e&&-1!==e.indexOf("$")&&!Q.has(e))if(K.test(e))for(const t of n)t.re&&!o.has(t.plugin)&&t.re.test(e)&&o.add(t.plugin);else Q.size>2e4&&Q.clear(),Q.add(e)}},c=e=>{for(const t of e.querySelectorAll("*")){if(s(t),a())return;if("TEMPLATE"===t.tagName&&t.content&&(c(t.content),a()))return}};return 1===t.nodeType&&(s(t),"TEMPLATE"===t.tagName&&t.content&&c(t.content)),a()||c(t),[...o]}let te=!1;const ne=new Set,ie=e=>H.has(e)||ne.has(e);function oe(e,t=v){if(!te||!e||"undefined"==typeof document)return Promise.resolve([]);let n=e;if("string"==typeof e){if(-1===e.indexOf("x-")&&-1===e.indexOf("$"))return Promise.resolve([]);n=document.createElement("template"),n.innerHTML=e,n=n.content}const i=ee([...new Set(J.map(e=>e.plugin))].filter(ie).concat("components"),n);if(!i.length)return Promise.resolve([]);const o=V(i).filter(e=>!ie(e));return Promise.all(o.map(e=>Z(e,t).catch(t=>{ne.has(e)||(ne.add(e),console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t))}))).then(()=>o)}function re(e){if("undefined"==typeof MutationObserver)return;const t=new Set;let n=!1;const i=new MutationObserver(o=>{for(const e of o)for(const n of e.addedNodes)1===n.nodeType&&t.add(n);!n&&t.size&&(n=!0,setTimeout(()=>{n=!1;const o=[...t].filter(e=>e.isConnected);t.clear(),o.forEach(t=>oe(t,e)),J.every(e=>ie(e.plugin))&&i.disconnect()},0))});i.observe(document.documentElement,{childList:!0,subtree:!0})}const ae={"text-edit":"rich-text"};function se(e){return e.filter(e=>{const t=e.replace(/^\+/,"");return!ae[t]||(console.warn(`[Manifest Loader] ${t} was renamed to ${ae[t]}`),!1)})}async function ce(e=v){const t=_.map(t=>`${$(e,t)}/${b(t,"manifest.tailwind.min.js")}`);let n=null;try{return await F(t)}catch(e){n=e}throw console.warn('[Manifest Loader] Tailwind plugin not available from any CDN. Load it directly: <script src="/scripts/tailwind.v4.3.1.js"><\/script>'),n||new Error("Tailwind plugin not available from CDN.")}window.Manifest={loadPlugin:function(e,t=v){if(![...E,...j,...S,...L,"payments","chat","device","native","import","tailwind"].includes(e))return ae[e]?se([e]):console.warn(`[Manifest Loader] Unknown module: ${e}`),Promise.reject(new Error(`Unknown module: ${e}`));const n=V([e]);return Promise.all(n.map(e=>Z(e,t)))},loadTailwind:ce,loadVendor:function(e,t){return F(_.map(t=>`${t}/${e}`),{key:e,hash:t,ordered:!1})},fetchVendor:async function(e,t){const n=g?await g:null;let i=t||null;return n&&(i=await B(n,e),i||W(`${e} has no integrity hash in this release.`,"Not loaded.")),q(_.map(t=>`${t}/${e}`),i,e)},get integrity(){return h},getPluginUrl:P,getModuleUrl:P,loadUsed:oe},window.Manifest.loadModule=window.Manifest.loadPlugin;const de="/sw.js";const le={registered:!1,version:null,kill:()=>ue(null)};async function ue(e){le.registered=!1;try{const t=e||await navigator.serviceWorker.getRegistration(de);if(t){const e=t.active||t.waiting||t.installing;try{e&&e.postMessage({type:"manifest:sw",action:"kill"})}catch(e){}await t.unregister()}}catch(e){}try{if(window.caches){const e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith("mnfst-sw:")).map(e=>caches.delete(e)))}}catch(e){}}async function fe(e){const t=e.sw,n="on"===t,i=n?(...e)=>console.info("[Manifest SW]",...e):()=>{};if(!navigator.serviceWorker)return i("skip: unsupported");const o=window.location,r=!!window.__mnfstRun,a=function(e){const t=String(e||"").toLowerCase();return"localhost"===t||"127.0.0.1"===t||"[::1]"===t||"::1"===t||"0.0.0.0"===t||t.endsWith(".localhost")||t.endsWith(".local")}(o.hostname);let s=window.__manifestLoaded||null;if(!s&&window.__manifestPromise&&(s=await window.__manifestPromise.catch(()=>null)),!s){const e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json";s=await fetch(e).then(e=>e.ok?e.json():null).catch(()=>null)}const c="off"===t||s&&!1===s.sw,d=await navigator.serviceWorker.getRegistration(de).catch(()=>null);if(c||r||a&&!n)return i("skip:",c?"kill switch":r?"mnfst-run":"dev origin",d?"(unregistering)":""),void await ue(d);if(!("https:"===o.protocol||n&&window.isSecureContext))return i("skip: not https");let l=null;try{l=sessionStorage.getItem("manifest:sw-probe")}catch(e){}const u="strict"===w;if("ok"!==l||u){const e=await fetch(de,{cache:"no-store"}).catch(()=>null),t=e&&e.headers.get("content-type")||"";if(!e||!e.ok||!/javascript|ecmascript/i.test(t))return i("skip: no stub",e&&e.status,t);if(u&&(f=await e.text().catch(()=>""),(String(f).match(/importScripts\s*\(([^)]*)\)/g)||[]).some(e=>(e.match(/https?:\/\/[^'"`\s)]+/g)||[]).some(e=>{try{return new URL(e).origin!==location.origin}catch(e){return!0}}))))return console.warn(`[Manifest Loader] ${de} imports its worker module from another origin, which integrity checks can't cover, so the service worker stays off. Serve the module from this origin (copy lib/manifest.sw.min.js into ${de}), set data-sw="off", or set data-integrity="warn" to register it anyway.`),void await ue(d);try{sessionStorage.setItem("manifest:sw-probe","ok")}catch(e){}}var f;const m=s&&"string"==typeof s.deployment?s.deployment:"",p=`${de}?v=${encodeURIComponent(e.version)}&d=${encodeURIComponent(m)}`,g=await navigator.serviceWorker.register(p,{scope:"/"});le.registered=!0,le.version=e.version,i("registered",p,g.active?"active":g.installing?"installing":"waiting")}window.Manifest.swStub=function(e=l){const t=`mnfst@${String(e||l).replace(/[^\w.+-]/g,"")}/lib/manifest.sw.min.js`;return`try { importScripts('https://cdn.manifestx.dev/npm/${t}'); } catch (e) { importScripts('https://cdn.jsdelivr.net/npm/${t}'); }\nif (!self.__mnfstSw) self.addEventListener('activate', function () { self.registration.unregister(); });\n`},window.Manifest.sw=le;const me=function(){let e=document.currentScript;if(e||(e=document.querySelector('script[src*="manifest.js"]')),!e)return null;const t=e.getAttribute("data-modules")??e.getAttribute("data-plugins"),n=e.getAttribute("data-omit"),i=null!==e.getAttribute("data-tailwind"),o=e.getAttribute("data-version")||l,r=!!e.getAttribute("data-version"),a=e.getAttribute("data-alpine"),s=(e.getAttribute("data-integrity")??"").trim().toLowerCase(),c=/^(off|false)$/.test(s)?null:"warn"===s?"warn":e.hasAttribute("data-integrity")||e.getAttribute("integrity")?"strict":null,d=e.getAttribute("data-module-base")??e.getAttribute("data-plugin-base"),u=e.getAttribute("data-cdn"),f=e.getAttribute("data-sw");let m=[],p=[],w=!t;if(t){const e=se(t.split(",").map(e=>e.trim()).filter(e=>e));p=e.filter(e=>e.startsWith("+")).map(e=>e.slice(1));const n=e.filter(e=>!e.startsWith("+"));n.length>0?m=[...n,...p]:(w=!0,m=E.slice())}else m=E.slice();if(n&&m.length>0){const e=n.split(",").map(e=>e.trim());m=m.filter(t=>!e.includes(t))}return m=V(m),{plugins:m,extraPlugins:p,deriveFromManifest:w,tailwind:i,version:o,versionSet:r,alpine:a,alpineIntegrity:e.getAttribute("data-alpine-integrity"),integrity:c,pluginBase:d,cdn:u,sw:f}}();var pe;if(me&&me.version&&(v=me.version),me&&me.pluginBase&&(pe=me.pluginBase,A=pe||null),me&&me.cdn&&function(e){if(!e)return;const t=e.split(",").map(e=>e.trim().replace(/\/$/,"")).filter(Boolean);t.length&&(_=t)}(me.cdn),me&&me.integrity&&(w=me.integrity,!me.versionSet&&f&&(v=me.version=u),h=me.version===u,y=me.alpineIntegrity&&z.test(me.alpineIntegrity.trim())?me.alpineIntegrity.trim():null,g=async function(e){if(e.version!==u)return W(`Integrity checks cover this loader's own version (${u}), but data-version is "${e.version}". Set data-version="${u}" or remove it.`,"No modules were loaded."),null;const t=A?[`${A.replace(/\/$/,"")}/${m}`]:_.map(e=>`${$(u,e)}/${m}`);try{return await(await q(t,f,m)).json()}catch(e){throw new Error(`${e.message} No modules were loaded.`)}}(me),g.catch(()=>{})),function(e){if(!e||window.__manifestSwArmed)return;const t=window.__manifestSwArmed={};let n=!1;const i=()=>{if(!n&&window.__manifestSwArmed===t){n=!0;try{fe(e).catch(()=>{})}catch(e){}}};setTimeout(()=>{if(window.__manifestReady)return i();window.addEventListener("manifest:ready",i,{once:!0}),window.__manifestLoaderStarted||("complete"===document.readyState?setTimeout(i,0):window.addEventListener("load",i,{once:!0}))},0)}(me),me&&me.plugins.length>0){if(window.__manifestLoaderStarted)return;window.__manifestLoaderStarted=!0;const ve=["data","localization","components","appwrite-auth","appwrite-data","appwrite-presences","payments","chat"],_e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json",be=new Set,$e=e=>{if(null===e||"object"!=typeof e)return;const t=e=>e.replace(/\$\{([^}]+)\}/g,(e,t)=>"undefined"!=typeof window&&window.env&&void 0!==window.env[t]?window.env[t]:(be.has(t)||(be.add(t),t.startsWith("PUBLIC_")?console.warn(`[Manifest] manifest.json references \${${t}}, but it is not present in window.env. Add ${t}=… to .env (read by mnfst-run) or set it via <script>window.env = {…}<\/script>. Leaving placeholder literal.`):console.warn(`[Manifest] manifest.json references \${${t}}, but only PUBLIC_-prefixed env vars are injected into window.env by mnfst-run. Rename to PUBLIC_${t}, hardcode the value, or supply it via <script>window.env = {…}<\/script>. Leaving placeholder literal.`)),e)),n=e=>{if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];"string"==typeof o?e[i]=t(o):o&&"object"==typeof o&&n(o)}else for(const i of Object.keys(e)){const o=e[i];"string"==typeof o?e[i]=t(o):o&&"object"==typeof o&&n(o)}};n(e)},Ee=()=>window.__manifestLoaded?Promise.resolve(window.__manifestLoaded):(window.__manifestPromise||(window.__manifestPromise=fetch(_e).then(e=>e.ok?e.json():null).then(e=>(e&&!e.__interpolated&&($e(e),Object.defineProperty(e,"__interpolated",{value:!0,enumerable:!1})),e)).catch(()=>null)),window.__manifestPromise);function ke(e,t){if(window.__manifestReadyCoordinator)return;window.__manifestReadyCoordinator=!0;const n=window.ManifestPending.hold("ready"),i=!!t,o={data:!e.some(e=>"data"===e||"appwrite-data"===e)||!!window.__manifestRenderReady,utilities:!i||!!window.__manifestUtilitiesReady};let r=!1,a=null;const s=()=>!(window.__manifestMarkdownPending>0),c=()=>!(window.__manifestUtilitiesPending>0),d=()=>{r||(r=!0,n(),window.__manifestReady=!0,window.dispatchEvent(new CustomEvent("manifest:ready")))},l=()=>{r||o.data&&o.utilities&&s()&&c()&&(clearTimeout(a),a=setTimeout(()=>{o.data&&o.utilities&&s()&&c()&&d()},300))};window.addEventListener("manifest:render-ready",()=>{o.data=!0,l()}),window.addEventListener("manifest:utilities-ready",()=>{o.utilities=!0,l()}),window.addEventListener("manifest:utilities-idle",l),window.addEventListener("manifest:markdown-idle",l),setTimeout(d,15e3),l()}(async()=>{if(g){(me.deriveFromManifest||me.plugins.some(e=>ve.includes(e)))&&Ee();try{await g}catch(e){return void(e.logged||console.error(`[Manifest Loader] ${e.message}`))}}let e=null,t=me.plugins,n=null;if(me.deriveFromManifest){e=await Ee();const n=function(e){if(!e||"object"!=typeof e)return E.slice();const t=e.data&&"object"==typeof e.data&&Object.keys(e.data).length>0,n=e.components?.length>0||e.preloadedComponents?.length>0,i=(()=>{if(!e.data||"object"!=typeof e.data)return!1;for(const t of Object.values(e.data))if(t&&"object"==typeof t){if("string"==typeof t.locales)return!0;for(const e of Object.keys(t))if(!["url","headers","params","transform","defaultValue","locales"].includes(e)&&/^[a-zA-Z]{2}(-[a-zA-Z]{2})?$/.test(e))return!0}return!1})(),o=e.status&&"object"==typeof e.status&&Object.keys(e.status).length>0;return E.filter(e=>"data"===e?t:"localization"===e?i:"components"===e?n:"status"!==e||o)}(e),i=function(e){if(!e||"object"!=typeof e)return[];if(!(e.appwrite||e.data&&Object.values(e.data).some(e=>e&&"object"==typeof e&&(e.appwriteTableId||e.appwriteDatabaseId||e.appwriteBucketId))))return[];const t=[];return e.appwrite?.auth&&t.push("appwrite-auth"),(e.appwrite||e.data&&Object.values(e.data).some(e=>e&&"object"==typeof e&&e.appwriteTableId))&&t.push("appwrite-data"),(e.appwrite?.presence||e.appwrite?.presences)&&t.push("appwrite-presences"),t}(e),o=function(e){return e&&"object"==typeof e&&e.payments&&"object"==typeof e.payments?["payments"]:[]}(e),r=function(e){return e&&"object"==typeof e&&(e.ai||e.chat)?["chat"]:[]}(e),a=function(e){if("undefined"!=typeof window&&window.Capacitor)return["device"];const t=e&&"object"==typeof e?e.device??e.native:null;return t&&"object"==typeof t?["device"]:[]}(e);t=V([...k,...n,...i,...o,...r,...a,...me.extraPlugins||[]])}else{t=V([...k,...t.filter(e=>!k.includes(e))]);me.plugins.some(e=>ve.includes(e))&&(n=Ee()),"undefined"!=typeof window&&window.Capacitor&&!t.includes("device")&&(t=V([...t,"device"]))}const i=t.map(e=>Z(e,me.version).catch(t=>{console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t)}));me.tailwind&&!function(){try{return!!document.querySelector("style[data-mnfst-utilities][data-mnfst-utilities-complete]")}catch(e){return!1}}()&&i.push(ce(me.version).catch(()=>{})),await Promise.all(i),n&&(e=await n),e&&"undefined"!=typeof window&&(window.__manifestLoaded=e,window.ManifestComponentsRegistry&&(window.ManifestComponentsRegistry.manifest=e)),C(async()=>{if(me.deriveFromManifest){try{const e=ee(t);if(e.length>0){const n=V(e).filter(e=>!t.includes(e));await Promise.all(n.map(e=>Z(e,me.version).catch(t=>{ne.add(e),console.warn(`[Manifest Loader] Failed to load plugin ${e}:`,t)})))}}catch(e){}te=!0,re(me.version)}var e;ke(t,me.tailwind),e=function(e){if(e&&(e.startsWith("http")||e.startsWith("/")))return[e];const t=e||"3.17.5";return _.map(e=>`${e}/alpinejs@${t}/dist/cdn.min.js`)}(me.alpine),C(()=>{window.Alpine||document.querySelector('script[src*="alpinejs"]')||F(e,{alpine:!0}).catch(e=>{e.logged||console.error("[Manifest Loader] Alpine.js failed to load from all CDNs.")})})})})()}}();
|
|
2
2
|
//# sourceMappingURL=manifest.min.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-n+Fohtui5o2h3HpM7ifnop9YsAdlTj0uHYfzljQMghLJeDkODC6OXop6ds6OTZha",
|
|
3
3
|
"manifest.appwrite.auth.min.js": "sha384-qN5XF96RpRVTzBeOBoxwh6ziq2+eZ2rS0cLUtlwp4CFcbyuMCaf6kHFJKoWEGNvp",
|
|
4
|
-
"manifest.appwrite.data.js": "sha384-
|
|
4
|
+
"manifest.appwrite.data.js": "sha384-EopS1Hg5bz70dtV0vu0T7Fw59RYhQdY4AS8a5GuuO4eaVtAo5ZYsaWeVpnOiT5DB",
|
|
5
5
|
"manifest.appwrite.data.min.js": "sha384-0fTVQE2rvA0T/qiXgSxe9YZDezipYFzrsSqnDcN8Xh6Vij1Pt/b3M6xySEqUtTjK",
|
|
6
6
|
"manifest.appwrite.presences.js": "sha384-O3EedwV2QTzd4YotjvGPsDHbxaGbtRaZuNopC7/Cfoo5uYPo8ZHYkCPCWurXpA2/",
|
|
7
7
|
"manifest.appwrite.presences.min.js": "sha384-7AHt7baL29VI3S1Nbkkyq34j2eJ2ysGpDnllmpXXSlc4GHvTk5hdCrXra2R3mSfH",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"manifest.components.min.js": "sha384-hESaKDaMHi3fGoq63adUyrJQ65iyA8fpAvbFSAEzhoSOvQfAhG6LqPNc8Tt7qGf+",
|
|
24
24
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
25
25
|
"manifest.computed.min.js": "sha384-90LbCcEOhrjhxi0GWBRb3DJyOkKWLRwzK7Z2nkbc1uaZ5B9EGmNKqx+mstTLWFGJ",
|
|
26
|
-
"manifest.data.js": "sha384-
|
|
27
|
-
"manifest.data.min.js": "sha384-
|
|
26
|
+
"manifest.data.js": "sha384-CS+Pe/8OK9J/N4WpKq53UxD80K9mIS5NztAp+dQqdAQ6s85GCHUqOKJXjJ281i8a",
|
|
27
|
+
"manifest.data.min.js": "sha384-XkUI6r/rkPXxDykOx3oAaH8BK/2pe8dHtOhaHM/4O7wBjPfT5Aq3hHGG1VSNGSp5",
|
|
28
28
|
"manifest.datepicker.js": "sha384-pZUQhUK6u5cl6g0myBXND/Wtrs1RTovYmy/ETQLUV0JujvTvUdRNc/XjPpVhtK16",
|
|
29
29
|
"manifest.datepicker.min.js": "sha384-e6xN1xQW3LLFvmSWrh3INMCgfUwD+gJca6n9fJfUFArA/OSm2KY0MDeN0pHVsYiw",
|
|
30
30
|
"manifest.defer.js": "sha384-W8aR5uCnUlmet/NscIgAoGijW064iSLASszQH3RKoLF19klJCyLdVrdz796QqSgD",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"manifest.submissions.min.js": "sha384-p/5Ekd6u/cTsyVQbRgGzEi3h1hJU9zD7+hjdR+upcwt++26sfrLXMjFI2YjS8zWt",
|
|
60
60
|
"manifest.svg.js": "sha384-D1jF3a0pXIuzm7T2sltyzblF8BTZ8sv1CkfJyQ33q21G6QlYyjdPv8DJi80eCISD",
|
|
61
61
|
"manifest.svg.min.js": "sha384-rsvQ50FgVpTxX2Wvba3hed2TQvZR+CHHfgS4Cg7V1Dyjx6rxkS1s6rG6UMWDIMez",
|
|
62
|
-
"manifest.sw.js": "sha384-
|
|
63
|
-
"manifest.sw.min.js": "sha384-
|
|
62
|
+
"manifest.sw.js": "sha384-519v59p7EO7b3aLlIvYR37xSE7a5G1YE4z5uWp9Ty2y7d4XjRrtrzU3HjKUsWnE1",
|
|
63
|
+
"manifest.sw.min.js": "sha384-TnXOGW1snM1/Out4NUrTVY5X7Gl9Xvh/cAe69WL8Hsxsnsx0tJJ8Migk6o870Jlw",
|
|
64
64
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
65
65
|
"manifest.tabs.min.js": "sha384-Bi4vymb32IKQ3xZ0gHRArRqLj5BwIagAjn+r/CSG3OLLw8ArDw60haBfz4v1wjRC",
|
|
66
66
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"manifest.tooltips.min.js": "sha384-Yo2bjvUmVpIDAFYFVrK32d0ncmYJf66S4bwmOsadUM4HOGIhEzALTVO4BedCikTW",
|
|
72
72
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
73
73
|
"manifest.url.parameters.min.js": "sha384-0C6e6FIjB9TKVGy5W0LH0TDQ3Eg4mRAokM4MANHUuwoG0IzUZV7HaYUQd2AnkB7a",
|
|
74
|
-
"manifest.utilities.js": "sha384-
|
|
75
|
-
"manifest.utilities.min.js": "sha384-
|
|
74
|
+
"manifest.utilities.js": "sha384-eageU5iIrcVA1XUl51NE5Fnaz0kGCaZ15R2AthhdGZlg6q0OWL+CrqdLbym6LnRm",
|
|
75
|
+
"manifest.utilities.min.js": "sha384-lxLEf5mo3LSkDpzPOl2FhXmAFVAjwJ/93SGHxN/hMlvzGGJTNBkUQu7GJpKnUKYo",
|
|
76
76
|
"manifest.virtual.js": "sha384-PtIDx042i29mkxEYZH+y3whBzKgBgV01CU1XzzeEl/8TBPl9qvny4ppyXgYI5DsM",
|
|
77
77
|
"manifest.virtual.min.js": "sha384-T50w4Y91/MCfR2ioessUCNc7ddvbr93fDxR81+zN6pGj2G5or02TIx6NLH3e/o3O",
|
|
78
78
|
"@highlightjs/cdn-assets@11.11.1/highlight.min.js": "sha384-RH2xi4eIQ/gjtbs9fUXM68sLSi99C7ZWBRX1vDrVv6GQXRibxXLbwO2NGZB74MbU",
|
package/lib/manifest.schema.json
CHANGED
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"type": "string",
|
|
199
199
|
"enum": [
|
|
200
200
|
"user",
|
|
201
|
-
"team"
|
|
201
|
+
"team",
|
|
202
|
+
"teams"
|
|
202
203
|
]
|
|
203
204
|
},
|
|
204
205
|
{
|
|
@@ -207,7 +208,8 @@
|
|
|
207
208
|
"type": "string",
|
|
208
209
|
"enum": [
|
|
209
210
|
"user",
|
|
210
|
-
"team"
|
|
211
|
+
"team",
|
|
212
|
+
"teams"
|
|
211
213
|
]
|
|
212
214
|
}
|
|
213
215
|
}
|
|
@@ -480,6 +482,7 @@
|
|
|
480
482
|
"guest-manual",
|
|
481
483
|
"magic",
|
|
482
484
|
"otp",
|
|
485
|
+
"phone",
|
|
483
486
|
"oauth",
|
|
484
487
|
"password"
|
|
485
488
|
]
|
|
@@ -500,6 +503,10 @@
|
|
|
500
503
|
"type": "string"
|
|
501
504
|
}
|
|
502
505
|
},
|
|
506
|
+
"pollInterval": {
|
|
507
|
+
"type": "number",
|
|
508
|
+
"description": "Poll team membership every N ms. Off by default."
|
|
509
|
+
},
|
|
503
510
|
"guests": {
|
|
504
511
|
"type": "boolean",
|
|
505
512
|
"description": "Seed permanent/template teams for guest (anonymous) sessions too. Off by default."
|
package/lib/manifest.sw.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// Build stamps the published version here; unstamped (dev) falls back to the
|
|
18
18
|
// registration URL's `v`, then 'dev'.
|
|
19
|
-
const BUILD_VERSION = '0.5.
|
|
19
|
+
const BUILD_VERSION = '0.5.315';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
// Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
|
package/lib/manifest.sw.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";const t="0.5.
|
|
1
|
+
!function(){"use strict";const t="0.5.315",e="mnfst-sw:",n=e+"meta",a=/\.(css|js|mjs|json|csv|tsv|ya?ml|md|txt|xml|svg|png|jpe?g|gif|webp|avif|ico|bmp|woff2?|ttf|otf|eot|mp3|mp4|webm|ogg|wav|flac|m4a|wasm|webmanifest|map)$/i,s=/^\/(sw\.js$|precache\.json$|v1\/|_appwrite\/|_ai\/|__mnfst|__edit)/,i=/^(cdn\.manifestx\.dev|cdn\.jsdelivr\.net|unpkg\.com|esm\.run)$/,c="https://cdn.manifestx.dev/npm/",r=/^api\.(iconify\.design|simplesvg\.com|unisvg\.com)$/,o=/@\d+\.\d+\.\d+[^/]*(\/|$)/,l=/@[^/]+(\/|$)/;let f=null,u=!1;function m(t){try{return new URL(self.location.href).searchParams.get(t)||""}catch(t){return""}}function h(){return{version:-1===t.indexOf("-dev")?t:m("v")||"dev",deployment:m("d")}}function w(t){return e+t.version+":"+(t.deployment||"-")+":"}async function d(){const t=h();try{const e=await fetch("/manifest.json",{cache:"no-store"});if(e.ok){const n=await e.json();n&&"string"==typeof n.deployment&&n.deployment&&(t.deployment=n.deployment)}}catch(t){}try{const e=await caches.open(n);await e.put("/__meta",new Response(JSON.stringify(t),{headers:{"content-type":"application/json"}}))}catch(t){}return t}function p(){return f||(f=(async()=>{try{const t=await caches.open(n),e=await t.match("/__meta");if(e){const t=await e.json();if(t&&t.version)return t}}catch(t){}return d()})().catch(()=>h())),f}async function y(t){if(u)throw new Error("killed");const e=await p();return caches.open(w(e)+t)}function g(t){return t.url.replace(/([?&])t=\d+(?=&|$)/,"$1").replace(/[?&]$/,"").replace(/\?&/,"?")}function v(t){if("GET"!==t.method)return null;if(t.headers.has("range"))return null;if(-1!==(t.headers.get("accept")||"").indexOf("text/event-stream"))return null;const e=new URL(g(t));if("http:"!==e.protocol&&"https:"!==e.protocol)return null;const n=e.origin===self.location.origin,c=e.pathname;return"navigate"===t.mode||"document"===t.destination?n?"document":null:n?s.test(c)?null:/(^|\/)manifest\.json$/.test(c)?"manifest":e.searchParams.get("v")?"immutable":/\.html?$/i.test(c)?"document":a.test(c)?"swr":null:r.test(e.host)?/\.json$/.test(c)?"immutable":null:i.test(e.host)?o.test(c)||/\/alpinejs@/.test(c)?"immutable":l.test(c)?"swr":null:null}function j(t){return!!t&&t.ok&&!t.redirected&&("basic"===t.type||"cors"===t.type||"default"===t.type)}function _(t){const e=new URL(t.url).origin===self.location.origin||"cors"===t.mode?fetch(t):fetch(new Request(t.url,{mode:"cors",credentials:"omit",redirect:"follow",integrity:t.integrity||""}));if(0!==t.url.indexOf(c))return e;const n=()=>fetch(new Request("https://cdn.jsdelivr.net/npm/"+t.url.slice(30),{mode:"cors",credentials:"omit",redirect:"follow",integrity:t.integrity||""}));return e.then(t=>t.ok?t:n().then(e=>e.ok?e:t).catch(()=>t),()=>n())}async function k(t,e){const n=await y("pages"),a=g(t);try{const e=await fetch(t);return j(e)&&await n.put(a,e.clone()),e}catch(s){const i=await n.match(a,{ignoreSearch:e});if(i)return i;if(e&&"navigate"===t.mode){const t=await n.match("/index.html")||await n.match("/");if(t)return t}throw s}}function $(t,e){const n=t.request;switch(e){case"immutable":return async function(t){const e=await y("assets"),n=g(t),a=await e.match(n);if(a)return a;const s=await _(t);return j(s)&&await e.put(n,s.clone()),s}(n);case"swr":return async function(t,e){const n=await y("swr"),a=g(t),s=await n.match(a),i=(async()=>{const e=await _(t);return j(e)&&(await n.put(a,e.clone()),await async function(t){const e=await t.keys(),n=e.length-500;for(let a=0;a<n;a++)await t.delete(e[a])}(n)),e})();return s?(e.waitUntil(i.catch(()=>{})),s):i}(n,t);case"document":return k(n,!0);case"manifest":return k(n,!1);default:return fetch(n)}}const x={version:h().version,ready:!0};self.__mnfstSw=x,self.addEventListener("install",t=>{try{f=null,t.waitUntil(d().then(t=>{f=Promise.resolve(t)}).catch(()=>{}))}catch(t){}}),self.addEventListener("activate",t=>{try{t.waitUntil((async()=>{if(!self.registration||"undefined"==typeof caches||"function"!=typeof fetch||self.__mnfstSw!==x)return void await self.registration.unregister();const t=await p();await async function(t){const a=w(t),s=await caches.keys();await Promise.all(s.filter(t=>0===t.indexOf(e)&&t!==n&&0!==t.indexOf(a)).map(t=>caches.delete(t)))}(t).catch(()=>{}),async function(t){let e;try{const t=await fetch("/precache.json",{cache:"no-store"});if(!t.ok)return;e=await t.json()}catch(t){return}if(!e||!Array.isArray(e.files))return;if(e.deployment&&t.deployment&&e.deployment!==t.deployment)return;const n=e.files.filter(t=>"string"==typeof t),a=async t=>{try{const e=new Request(new URL(t,self.location.origin).href),n=v(e);if(!n)return;const a="immutable"===n?"assets":"swr"===n?"swr":"pages",s=await y(a),i=g(e);if(await s.match(i))return;const c=await _(e);j(c)&&await s.put(i,c)}catch(t){}};let s=0;await Promise.all(Array.from({length:4},async()=>{for(;s<n.length;)await a(n[s++])}))}(t).catch(()=>{})})().catch(()=>{}))}catch(t){}}),self.addEventListener("fetch",t=>{if(u)return;let e=null;try{e=v(t.request)}catch(t){return}if(e)try{t.respondWith($(t,e).catch(()=>fetch(t.request)))}catch(t){}}),self.addEventListener("message",t=>{try{const n=t.data;if(!n||"manifest:sw"!==n.type)return;const a=e=>{try{const n=t.ports&&t.ports[0];n?n.postMessage(e):t.source&&t.source.postMessage&&t.source.postMessage(e)}catch(t){}};if("ping"===n.action)return void a({type:"manifest:sw",action:"pong"});if("version"===n.action)return void t.waitUntil(p().then(t=>a({type:"manifest:sw",action:"version",version:t.version,deployment:t.deployment,key:w(t)})).catch(()=>{}));"kill"===n.action&&(u=!0,t.waitUntil((async()=>{await async function(){const t=await caches.keys();await Promise.all(t.filter(t=>0===t.indexOf(e)).map(t=>caches.delete(t)))}().catch(()=>{}),await self.registration.unregister().catch(()=>{}),a({type:"manifest:sw",action:"killed"})})().catch(()=>{})))}catch(t){}})}();
|
|
2
2
|
//# sourceMappingURL=manifest.sw.min.js.map
|
|
@@ -335,9 +335,6 @@ function createVariants() {
|
|
|
335
335
|
'xl': '@media (min-width: 1280px)',
|
|
336
336
|
'2xl': '@media (min-width: 1536px)',
|
|
337
337
|
|
|
338
|
-
// Supports queries
|
|
339
|
-
'supports': '@supports',
|
|
340
|
-
|
|
341
338
|
// Starting style
|
|
342
339
|
'starting': '@starting-style',
|
|
343
340
|
|
|
@@ -879,7 +876,7 @@ TailwindCompiler.prototype.addCriticalBlockingStylesSync = function () {
|
|
|
879
876
|
};
|
|
880
877
|
} else {
|
|
881
878
|
// Fall back to the cache (only generate what was used before)
|
|
882
|
-
const cached = localStorage.getItem(
|
|
879
|
+
const cached = localStorage.getItem(UTILITIES_CACHE_KEY);
|
|
883
880
|
let cachedClasses = new Set();
|
|
884
881
|
|
|
885
882
|
if (cached) {
|
|
@@ -1114,11 +1111,20 @@ TailwindCompiler.prototype.generateSynchronousUtilities = function () {
|
|
|
1114
1111
|
// Cache management
|
|
1115
1112
|
// Methods for loading, saving, and managing cached utilities
|
|
1116
1113
|
|
|
1114
|
+
// Bump when generated rule order changes: older sheets would replay in the old order
|
|
1115
|
+
const UTILITIES_CACHE_KEY = 'tailwind-cache:v2';
|
|
1116
|
+
const LEGACY_CACHE_KEYS = ['tailwind-cache'];
|
|
1117
|
+
|
|
1118
|
+
function dropLegacyUtilitiesCache() {
|
|
1119
|
+
for (const k of LEGACY_CACHE_KEYS) { try { localStorage.removeItem(k); } catch (_) { } }
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1117
1122
|
// Load and apply cached utilities
|
|
1118
1123
|
TailwindCompiler.prototype.loadAndApplyCache = function () {
|
|
1119
1124
|
const cacheStart = performance.now();
|
|
1125
|
+
dropLegacyUtilitiesCache();
|
|
1120
1126
|
try {
|
|
1121
|
-
const cached = localStorage.getItem(
|
|
1127
|
+
const cached = localStorage.getItem(UTILITIES_CACHE_KEY);
|
|
1122
1128
|
if (cached) {
|
|
1123
1129
|
const parsed = JSON.parse(cached);
|
|
1124
1130
|
this.cache = new Map(Object.entries(parsed));
|
|
@@ -1239,7 +1245,7 @@ TailwindCompiler.prototype.savePersistentCache = function () {
|
|
|
1239
1245
|
while (this.cache.size > 0 && attempts < 4) {
|
|
1240
1246
|
try {
|
|
1241
1247
|
const serialized = JSON.stringify(Object.fromEntries(this.cache));
|
|
1242
|
-
localStorage.setItem(
|
|
1248
|
+
localStorage.setItem(UTILITIES_CACHE_KEY, serialized);
|
|
1243
1249
|
return;
|
|
1244
1250
|
} catch (error) {
|
|
1245
1251
|
// QuotaExceededError (name varies by browser): drop the oldest
|
|
@@ -1262,13 +1268,14 @@ TailwindCompiler.prototype.savePersistentCache = function () {
|
|
|
1262
1268
|
// Last resort: cache is unusable in this origin right now, clear the slot
|
|
1263
1269
|
// so the next session starts clean. This is a perf optimization, not
|
|
1264
1270
|
// correctness — drop quietly.
|
|
1265
|
-
try { localStorage.removeItem(
|
|
1271
|
+
try { localStorage.removeItem(UTILITIES_CACHE_KEY); } catch (_) {}
|
|
1266
1272
|
};
|
|
1267
1273
|
|
|
1268
1274
|
// Load cache from localStorage
|
|
1269
1275
|
TailwindCompiler.prototype.loadPersistentCache = function () {
|
|
1276
|
+
dropLegacyUtilitiesCache();
|
|
1270
1277
|
try {
|
|
1271
|
-
const cached = localStorage.getItem(
|
|
1278
|
+
const cached = localStorage.getItem(UTILITIES_CACHE_KEY);
|
|
1272
1279
|
if (cached) {
|
|
1273
1280
|
const parsed = JSON.parse(cached);
|
|
1274
1281
|
this.cache = new Map(Object.entries(parsed));
|
|
@@ -2597,7 +2604,7 @@ TailwindCompiler.prototype.generateUtilitiesFromVars = function (cssText, usedDa
|
|
|
2597
2604
|
const finalRule = hasMediaQuery ? wrapAtRules(atRules, rule) : rule;
|
|
2598
2605
|
|
|
2599
2606
|
if (!generatedRules.has(finalRule)) {
|
|
2600
|
-
emit(finalRule, 2,
|
|
2607
|
+
emit(finalRule, 2, atRuleOrder(parsed.variants));
|
|
2601
2608
|
generatedRules.add(finalRule);
|
|
2602
2609
|
}
|
|
2603
2610
|
}
|
|
@@ -2712,46 +2719,62 @@ function breakpointRank(name) {
|
|
|
2712
2719
|
return bp.max ? -bp.px : bp.px;
|
|
2713
2720
|
}
|
|
2714
2721
|
|
|
2715
|
-
// ----
|
|
2716
|
-
const NO_RANK = -
|
|
2717
|
-
const
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
]
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
const
|
|
2731
|
-
|
|
2732
|
-
|
|
2722
|
+
// ---- At-rule order (Tailwind v4 variant order; the highest-order variant decides, then the next) ----
|
|
2723
|
+
const NO_RANK = -1e9;
|
|
2724
|
+
const ORDER_STEP = 1e7;
|
|
2725
|
+
const BREAKPOINT_ORDER = 10;
|
|
2726
|
+
const MEDIA_ORDER = [
|
|
2727
|
+
[/prefers-reduced-motion:\s*no-preference/, 1], [/prefers-reduced-motion:\s*reduce/, 2],
|
|
2728
|
+
[/prefers-contrast:\s*more/, 3], [/prefers-contrast:\s*less/, 4],
|
|
2729
|
+
[/orientation:\s*portrait/, 21], [/orientation:\s*landscape/, 22], [/prefers-color-scheme/, 23],
|
|
2730
|
+
[/^@media print/, 25], [/forced-colors/, 26], [/inverted-colors/, 27],
|
|
2731
|
+
[/\(pointer:\s*none/, 28], [/\(pointer:\s*coarse/, 29], [/\(pointer:\s*fine/, 30],
|
|
2732
|
+
[/any-pointer:\s*none/, 31], [/any-pointer:\s*coarse/, 32], [/any-pointer:\s*fine/, 33],
|
|
2733
|
+
[/scripting:\s*none/, 34]
|
|
2734
|
+
];
|
|
2735
|
+
|
|
2736
|
+
function toPx(size) {
|
|
2737
|
+
const u = /^(-?\d*\.?\d+)(px|rem|em)$/.exec(size.trim());
|
|
2738
|
+
return u ? parseFloat(u[1]) * (u[2] === 'px' ? 1 : 16) : null;
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
// Width condition → rank (max widest first, then min ascending); null if none
|
|
2742
|
+
function widthRank(selector) {
|
|
2743
|
+
let m = /\((?:min-width:\s*|width\s*>=\s*)([^)]+)\)/.exec(selector);
|
|
2744
|
+
if (m) { const px = toPx(m[1]); return px === null ? 1e5 : px; }
|
|
2745
|
+
m = /\((?:max-width:\s*|width\s*<\s*)([^)]+)\)/.exec(selector);
|
|
2746
|
+
if (m) { const px = toPx(m[1]); return px === null ? -1e5 : -px; }
|
|
2747
|
+
return null;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
// One at-rule variant's place in Tailwind's order; null for selector variants
|
|
2751
|
+
function variantOrder(selector) {
|
|
2752
|
+
if (typeof selector !== 'string' || !selector.startsWith('@')) return null;
|
|
2753
|
+
if (selector.startsWith('@supports')) return 0;
|
|
2754
|
+
if (selector.startsWith('@container')) return 20 * ORDER_STEP + (widthRank(selector) || 0);
|
|
2755
|
+
if (selector.startsWith('@starting-style')) return 24 * ORDER_STEP;
|
|
2756
|
+
if (!selector.startsWith('@media')) return 40 * ORDER_STEP;
|
|
2757
|
+
const r = widthRank(selector);
|
|
2758
|
+
if (r !== null) return BREAKPOINT_ORDER * ORDER_STEP + r;
|
|
2759
|
+
for (const [re, n] of MEDIA_ORDER) if (re.test(selector)) return n * ORDER_STEP;
|
|
2760
|
+
return 40 * ORDER_STEP;
|
|
2733
2761
|
}
|
|
2734
2762
|
|
|
2735
|
-
//
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
let band = -1, extra = 0;
|
|
2739
|
-
const ranks = [];
|
|
2763
|
+
// Top three at-rule variant orders, highest first (md: before motion-safe:md: before lg:)
|
|
2764
|
+
function atRuleOrder(variants) {
|
|
2765
|
+
const orders = [];
|
|
2740
2766
|
for (const v of variants || []) {
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
if (r !== null) { ranks.push(r); band = Math.max(band, 1); }
|
|
2744
|
-
else { band = Math.max(band, EARLY_MEDIA_VARIANTS.has(v.name) ? 0 : 2); extra++; }
|
|
2767
|
+
const o = v && variantOrder(v.selector);
|
|
2768
|
+
if (o !== null && o !== undefined) orders.push(o);
|
|
2745
2769
|
}
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
else extra = 0;
|
|
2749
|
-
return [band < 0 ? 2 : band, ranks.length ? ranks[0] : NO_RANK, ranks.length > 1 ? ranks[1] : NO_RANK, extra];
|
|
2770
|
+
orders.sort((a, b) => b - a);
|
|
2771
|
+
return [0, 1, 2].map(i => i < orders.length ? orders[i] : NO_RANK);
|
|
2750
2772
|
}
|
|
2751
2773
|
|
|
2752
|
-
// Full order key: [
|
|
2774
|
+
// Full order key: [at-rule, o1, o2, o3, section, var/entry, pair/array, opacity, sub]
|
|
2775
|
+
const KEY_SECTION = 4;
|
|
2753
2776
|
function ruleKey(rule, order, slotKey) {
|
|
2754
|
-
const head =
|
|
2777
|
+
const head = isAtRule(rule) ? [1].concat(order || [40 * ORDER_STEP, NO_RANK, NO_RANK]) : [0, 0, 0, 0];
|
|
2755
2778
|
return head.concat(slotKey);
|
|
2756
2779
|
}
|
|
2757
2780
|
|
|
@@ -3160,7 +3183,7 @@ TailwindCompiler.prototype.generateCustomUtilities = function (usedData) {
|
|
|
3160
3183
|
}
|
|
3161
3184
|
|
|
3162
3185
|
if (!generatedRules.has(finalRule)) {
|
|
3163
|
-
emit(finalRule, 2,
|
|
3186
|
+
emit(finalRule, 2, atRuleOrder(parsed.variants));
|
|
3164
3187
|
generatedRules.add(finalRule);
|
|
3165
3188
|
}
|
|
3166
3189
|
}
|
|
@@ -3254,7 +3277,7 @@ TailwindCompiler.prototype.generateCustomUtilities = function (usedData) {
|
|
|
3254
3277
|
if (generatedRules.has(rule)) continue;
|
|
3255
3278
|
generatedRules.add(rule);
|
|
3256
3279
|
slot = [2, 0, 0, 0];
|
|
3257
|
-
emit(rule, 2, [
|
|
3280
|
+
emit(rule, 2, [BREAKPOINT_ORDER * ORDER_STEP + e.rank, NO_RANK, NO_RANK]);
|
|
3258
3281
|
}
|
|
3259
3282
|
}
|
|
3260
3283
|
|
|
@@ -3265,7 +3288,7 @@ TailwindCompiler.prototype.generateCustomUtilities = function (usedData) {
|
|
|
3265
3288
|
}
|
|
3266
3289
|
};
|
|
3267
3290
|
|
|
3268
|
-
// Rules + order keys for theme and custom utilities, in sheet order (base, then
|
|
3291
|
+
// Rules + order keys for theme and custom utilities, in sheet order (base, then at-rules in Tailwind variant order).
|
|
3269
3292
|
// Full compile, incremental apply, cache text and the node bake all write this order.
|
|
3270
3293
|
TailwindCompiler.prototype.generateOrderedUtilities = function (themeCss, usedData) {
|
|
3271
3294
|
const data = Object.assign({}, usedData, { rulesOut: [], keysOut: [] });
|
|
@@ -3283,7 +3306,7 @@ TailwindCompiler.prototype.orderedUtilitiesCss = function (entries) {
|
|
|
3283
3306
|
// (see ruleKey); deltas are inserted at that index.
|
|
3284
3307
|
|
|
3285
3308
|
const utilitiesCssFrom = (applied) => `@layer utilities {\n${applied.entries.map(e => e.rule).join('\n\n')}\n}`;
|
|
3286
|
-
const
|
|
3309
|
+
const isAtRule = (rule) => rule.trim().startsWith('@');
|
|
3287
3310
|
|
|
3288
3311
|
function compareKeys(a, b) {
|
|
3289
3312
|
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
@@ -3311,7 +3334,7 @@ TailwindCompiler.prototype.entriesMatchSheet = function (entries) {
|
|
|
3311
3334
|
const layer = this.utilitiesLayerRule();
|
|
3312
3335
|
if (!layer || layer.cssRules.length !== entries.length) return false;
|
|
3313
3336
|
for (let i = 0; i < entries.length; i++) {
|
|
3314
|
-
if ((layer.cssRules[i] instanceof
|
|
3337
|
+
if (!(layer.cssRules[i] instanceof CSSStyleRule) !== !!entries[i].key[0]) return false;
|
|
3315
3338
|
}
|
|
3316
3339
|
return true;
|
|
3317
3340
|
};
|
|
@@ -3355,7 +3378,7 @@ TailwindCompiler.prototype.compileDelta = function (themeCss) {
|
|
|
3355
3378
|
if (tailwindResponsiveDisplay(classes).length) return false;
|
|
3356
3379
|
const fresh = classes.length ? this.generateKeyedUtilities(themeCss, classes).filter(e => !applied.rules.has(e.rule)) : [];
|
|
3357
3380
|
// The display block's contents depend on every used class: a new block rule means a full regen
|
|
3358
|
-
if (fresh.some(e => e.key[
|
|
3381
|
+
if (fresh.some(e => e.key[KEY_SECTION] === 2)) return false;
|
|
3359
3382
|
const entries = applied.entries;
|
|
3360
3383
|
|
|
3361
3384
|
// Place every rule first; bail before touching the sheet if any is ambiguous
|