mnfst 0.5.310 → 0.5.311

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.
@@ -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-tCPCGVAchCElogq4wkTINpt9myDUYmPt+SCCWQlaiVURdP+Tpfm1LkL2hT2NwIcy",
5
+ "manifest.appwrite.data.js": "sha384-tj6g5Pg8427nnpqdbb0LEwGPkSP6Z8JuWhf2Gxtx96w+7yTCmWKaoqEYVUjczTvD",
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-+GUZ56TTJi4dMUlKY3vtfgkn9r7TKrhP+1b7qDdo+OTaF8Nv1dNySKUC7v/OJv1S",
39
- "manifest.data.min.js": "sha384-W+muy7TE2ny+djnW1dHGjiqzT02qwAzszKaE5Sk81et+X2+KpuPVBHQxp8xNtdP/",
38
+ "manifest.data.js": "sha384-yn8JAYpmaG/6Dc/IwdLsvyLm1RPrbx4PTIdcMOoeF9fGIMQ2xn886N5I/L+tgpRx",
39
+ "manifest.data.min.js": "sha384-tRvnMjVKrlB8NKaFwAjvsXuQhzNchuOx670HBOekiEqFHcQ6mUZrTG6jbWYOmRab",
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,18 +58,18 @@
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-YliabfC6jGVO0bYwYhTFP4ubuv3ZpSrGWP7eOW+Y2BEe+eKgCtcW3lLAdKf98oJK",
61
+ "manifest.js": "sha384-VwqSUzab+66uTguqJ9mOgCko30AK1P0Pgq8PXrAOtglNEsnCGEFbpCgpYy84Hcd9",
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-BCrmkfitMJk9SispsQdvNs2j+xW0sNn/aCXWufxyMjFYeJSQhlCHAEG6+Ysgt/QA",
68
- "manifest.modules.integrity.json": "sha384-7UXTLxNaFb15ntv92lmsFQa3oH4YbInYcQMWdlXGLgSe2SwVaRDaMw9wU4JCwfY9",
67
+ "manifest.min.js": "sha384-yCqnlOGuwyXJ5xo9cySGOPWfj12/ITmDV2UaaXFSg1Vztpm/mD1HUp5Cj6xnUrwK",
68
+ "manifest.modules.integrity.json": "sha384-MkhwjS1ZoGoJW1/PBZa11a1rKQa62KWcxlEPI3/heDdUx7JdwMWZ5JDg7X1VQl5+",
69
69
  "manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
70
70
  "manifest.native.min.js": "sha384-3xZep6D5icnCvKbzPxQ6QxqvJMfWI0GiADQrGkiFJEhe8sXg6P6vfIAjLUykFi+2",
71
- "manifest.payments.js": "sha384-kNhU58nmteKSdTUGcaLxoxyHoDRrgaSc9Go9RmlefsSm+uGTnERPHGD7HGgz0RhZ",
72
- "manifest.payments.min.js": "sha384-OhL3tLHSgzfCwr4Z9CudGDT0uzHNb+Ar6kclen7/m+9eTX4UHQIUPsMWrkRvYZAj",
71
+ "manifest.payments.js": "sha384-3Db2i47QA5I/Id5XMkwJThxSe8wZFiEEcJaKuuIjE5yBjGBxPMWFwhE4wgdvWgOo",
72
+ "manifest.payments.min.js": "sha384-n+Y/KURLVDZj9LAdz/i4GLjUGWiy3QJOMqAwwkLkLrBGm6o2EI+yim/lpKs2933s",
73
73
  "manifest.radio.css": "sha384-VjeioJsd9/IMK0R99buM3JujcB5F/ggmwnP0Gi3kdvpZUh91CA9BVqlADA+Cgwkj",
74
74
  "manifest.range.css": "sha384-n8Q1ZRqp7BelyADvmHL9VIM6zhsZp6curJ70myh9rIi2ctDX4vAZvYrgXObkYdqc",
75
75
  "manifest.reset.css": "sha384-ke5OF0mFHRRYxzWbcOKnb9RWRYUIubvG8O5V5N/3I4KtMwsFSE1ZDPj0fHgjn6eq",
@@ -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-rHP6T2eEXBCZ/4cVCAj9wGuvM3rHQWn/5vt32N88WoD17cThs5LW1dEuVXF3R718",
92
- "manifest.sw.min.js": "sha384-ASObPWpvATjeTD2DNEYBgFTMqmjCxZaMuCMZfM46XU6L+NrPIoJmNdq+MG4oKvDX",
91
+ "manifest.sw.js": "sha384-3DFisE+PetZohurxn/OCZgyBRu/3NQtd8816QMSVF7G80xTAQoQcTjH8aoH9MAFp",
92
+ "manifest.sw.min.js": "sha384-FKfJXNVqRRHF2O+0pHmrAuuZAhpTspebIXATYf9HFTWQoycM2PdWRurDv3qOoTK0",
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",
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.310';
357
- const MODULES_INTEGRITY = 'sha384-7UXTLxNaFb15ntv92lmsFQa3oH4YbInYcQMWdlXGLgSe2SwVaRDaMw9wU4JCwfY9';
356
+ const LOADER_VERSION = '0.5.311';
357
+ const MODULES_INTEGRITY = 'sha384-MkhwjS1ZoGoJW1/PBZa11a1rKQa62KWcxlEPI3/heDdUx7JdwMWZ5JDg7X1VQl5+';
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
@@ -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,"&amp;").replace(/"/g,"&quot;"),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.310",f="sha384-7UXTLxNaFb15ntv92lmsFQa3oH4YbInYcQMWdlXGLgSe2SwVaRDaMw9wU4JCwfY9",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 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 V(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 X(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 Y=[{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 Z=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||Z)return;Z=!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 G=!1;!function(){if("undefined"==typeof window||"undefined"==typeof document||G)return;G=!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 J=/^x-(code|code-group)$/,Q=new RegExp("\\$("+Y.filter(e=>e.magic).map(e=>e.magic.slice(1)).join("|")+")\\b"),K=new Set;function ee(e,t=("undefined"==typeof document?null:document)){const n=Y.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-")&&!J.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("$")&&!K.has(e))if(Q.test(e))for(const t of n)t.re&&!o.has(t.plugin)&&t.re.test(e)&&o.add(t.plugin);else K.size>2e4&&K.clear(),K.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(Y.map(e=>e.plugin))].filter(ie).concat("components"),n);if(!i.length)return Promise.resolve([]);const o=X(i).filter(e=>!ie(e));return Promise.all(o.map(e=>V(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)),Y.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=X([e]);return Promise.all(n.map(e=>V(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=X(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=X([...k,...n,...i,...o,...r,...a,...me.extraPlugins||[]])}else{t=X([...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=X([...t,"device"]))}const i=t.map(e=>V(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=X(e).filter(e=>!t.includes(e));await Promise.all(n.map(e=>V(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,"&amp;").replace(/"/g,"&quot;"),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.311",f="sha384-MkhwjS1ZoGoJW1/PBZa11a1rKQa62KWcxlEPI3/heDdUx7JdwMWZ5JDg7X1VQl5+",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"],S=["edit"],L=["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 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 W(e){try{const t=performance.getEntriesByName(new URL(e,location.href).href).pop();return!!t&&200===t.responseStatus}catch(e){return!1}}function O(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?O(`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."):O(`${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)} ${W(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 Z=new Map;async function H(e,t=v){const n=Z.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&&(O(`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 Z.set(e,{version:t,promise:i}),i.catch(()=>Z.delete(e)),i}function J(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 V=[{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 Q=/^x-(code|code-group)$/,X=new RegExp("\\$("+V.filter(e=>e.magic).map(e=>e.magic.slice(1)).join("|")+")\\b"),Y=new Set;function ee(e,t=("undefined"==typeof document?null:document)){const n=V.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-")&&!Q.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("$")&&!Y.has(e))if(X.test(e))for(const t of n)t.re&&!o.has(t.plugin)&&t.re.test(e)&&o.add(t.plugin);else Y.size>2e4&&Y.clear(),Y.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=>Z.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(V.map(e=>e.plugin))].filter(ie).concat("components"),n);if(!i.length)return Promise.resolve([]);const o=J(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)),V.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,...L,...S,"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=J([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 B(n,e),i||O(`${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=J(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 O(`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=J([...k,...n,...i,...o,...r,...a,...me.extraPlugins||[]])}else{t=J([...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=J([...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=J(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.")})})})})()}}();
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-tCPCGVAchCElogq4wkTINpt9myDUYmPt+SCCWQlaiVURdP+Tpfm1LkL2hT2NwIcy",
4
+ "manifest.appwrite.data.js": "sha384-tj6g5Pg8427nnpqdbb0LEwGPkSP6Z8JuWhf2Gxtx96w+7yTCmWKaoqEYVUjczTvD",
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-+GUZ56TTJi4dMUlKY3vtfgkn9r7TKrhP+1b7qDdo+OTaF8Nv1dNySKUC7v/OJv1S",
27
- "manifest.data.min.js": "sha384-W+muy7TE2ny+djnW1dHGjiqzT02qwAzszKaE5Sk81et+X2+KpuPVBHQxp8xNtdP/",
26
+ "manifest.data.js": "sha384-yn8JAYpmaG/6Dc/IwdLsvyLm1RPrbx4PTIdcMOoeF9fGIMQ2xn886N5I/L+tgpRx",
27
+ "manifest.data.min.js": "sha384-tRvnMjVKrlB8NKaFwAjvsXuQhzNchuOx670HBOekiEqFHcQ6mUZrTG6jbWYOmRab",
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",
@@ -45,8 +45,8 @@
45
45
  "manifest.markdown.min.js": "sha384-SQE17YSZCRm9blVSP9bPH/Wf1ZsEFh/9cKQWX3ohORBuPWTkwZLpcbN8PC5BstJ6",
46
46
  "manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
47
47
  "manifest.native.min.js": "sha384-3xZep6D5icnCvKbzPxQ6QxqvJMfWI0GiADQrGkiFJEhe8sXg6P6vfIAjLUykFi+2",
48
- "manifest.payments.js": "sha384-kNhU58nmteKSdTUGcaLxoxyHoDRrgaSc9Go9RmlefsSm+uGTnERPHGD7HGgz0RhZ",
49
- "manifest.payments.min.js": "sha384-OhL3tLHSgzfCwr4Z9CudGDT0uzHNb+Ar6kclen7/m+9eTX4UHQIUPsMWrkRvYZAj",
48
+ "manifest.payments.js": "sha384-3Db2i47QA5I/Id5XMkwJThxSe8wZFiEEcJaKuuIjE5yBjGBxPMWFwhE4wgdvWgOo",
49
+ "manifest.payments.min.js": "sha384-n+Y/KURLVDZj9LAdz/i4GLjUGWiy3QJOMqAwwkLkLrBGm6o2EI+yim/lpKs2933s",
50
50
  "manifest.rich.text.js": "sha384-ZBV9jXmu2nmprEHicddRE/m7nR4RPZtVc969Jte0+EJYBcVph7itkjcgN/61PyeC",
51
51
  "manifest.rich.text.min.js": "sha384-X3UNYMXCPxz+dj3p+w2pifjACJW//nwFWkEz8DjfS5RsjvK5zkVW1ERyeGt0MaYe",
52
52
  "manifest.router.js": "sha384-fnFIDMwehZjaLiZwwtry63AXX9qlyxzRJjKHi4SORgwW4hhZ5eiItTHc4J1mKagU",
@@ -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-rHP6T2eEXBCZ/4cVCAj9wGuvM3rHQWn/5vt32N88WoD17cThs5LW1dEuVXF3R718",
63
- "manifest.sw.min.js": "sha384-ASObPWpvATjeTD2DNEYBgFTMqmjCxZaMuCMZfM46XU6L+NrPIoJmNdq+MG4oKvDX",
62
+ "manifest.sw.js": "sha384-3DFisE+PetZohurxn/OCZgyBRu/3NQtd8816QMSVF7G80xTAQoQcTjH8aoH9MAFp",
63
+ "manifest.sw.min.js": "sha384-FKfJXNVqRRHF2O+0pHmrAuuZAhpTspebIXATYf9HFTWQoycM2PdWRurDv3qOoTK0",
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",
@@ -62,7 +62,9 @@ async function getPaymentsConfig() {
62
62
  environment: environmentOf(p.environment),
63
63
  state: p.state && typeof p.state === 'object' ? p.state : null,
64
64
  // Pass-through bag for adapter-specific options (locale, theme, etc.)
65
- options: p.options && typeof p.options === 'object' ? p.options : {}
65
+ options: p.options && typeof p.options === 'object' ? p.options : {},
66
+ // Optional allowlist of checkout hostnames the function may redirect to
67
+ redirectHosts: Array.isArray(p.redirectHosts) ? p.redirectHosts.map((h) => String(h).toLowerCase()) : null
66
68
  };
67
69
  return _cache;
68
70
  }
@@ -238,7 +240,7 @@ register('razorpay', {
238
240
  /* ---- Redirect-floor providers --------------------------------------------- */
239
241
  // Registered for discoverability; no overlay, so they degrade to the redirect
240
242
  // floor. Unlisted providers work the same way with zero config.
241
- ['stripe', 'square', 'paypal', 'braintree', 'adyen', 'mollie']
243
+ ['stripe', 'square', 'paypal', 'braintree', 'adyen', 'mollie', 'worldpay']
242
244
  .forEach((name) => register(name, { supportsOverlay: false, redirectOnly: true }));
243
245
 
244
246
  window.ManifestPaymentsAdapters = { register, get, list, loadScript };
@@ -321,6 +323,17 @@ async function postSession(config, ref, payload, preferMode) {
321
323
  return res.json();
322
324
  }
323
325
 
326
+ // Refuse a checkout address outside payments.redirectHosts, when set. ".example.com" allows that domain and its subdomains.
327
+ function checkedUrl(url, config) {
328
+ if (!config?.redirectHosts) return url;
329
+ let host = '';
330
+ try { const u = window.location.href ? new URL(url, window.location.href) : new URL(url); host = u.protocol === 'https:' ? u.hostname.toLowerCase() : ''; } catch (_) { /* invalid */ }
331
+ host = host.replace(/\.$/, '');
332
+ const ok = host && config.redirectHosts.some((h) => (h.startsWith('.') ? host === h.slice(1) || host.endsWith(h) : host === h));
333
+ if (!ok) throw new Error("Checkout couldn't be started. Please try again.");
334
+ return url;
335
+ }
336
+
324
337
  // Drive a server response into the right modality; overlay degrades to redirect
325
338
  // when no adapter supports it.
326
339
  async function dispatch(response, config) {
@@ -334,17 +347,23 @@ async function dispatch(response, config) {
334
347
  window.dispatchEvent(new CustomEvent('manifest:pay:result', { detail: { ...result, provider } }));
335
348
  return result;
336
349
  }
337
- if (response.url) { _navigate(response.url); return { status: 'redirected' }; }
350
+ if (response.url) { _navigate(checkedUrl(response.url, config)); return { status: 'redirected' }; }
338
351
  throw new Error(`No overlay adapter for "${provider}" and no fallback url`);
339
352
  }
340
353
  if (!response?.url) throw new Error('Redirect response missing url');
341
- _navigate(response.url);
354
+ _navigate(checkedUrl(response.url, config));
342
355
  return { status: 'redirected' };
343
356
  }
344
357
 
345
358
  // Public: initiate a payment flow for an opaque ref (or an absolute URL for a
346
359
  // zero-server link-through).
347
360
  async function initiate(ref, payload = {}) {
361
+ // Object form: { ref, ...payload }, e.g. x-pay="{ ref: 'panel', quantity: qty }"
362
+ if (ref && typeof ref === 'object' && typeof ref.ref === 'string') {
363
+ const { ref: inner, ...rest } = ref;
364
+ payload = { ...rest, ...payload };
365
+ ref = inner;
366
+ }
348
367
  setStore({ loading: true, error: null });
349
368
  try {
350
369
  // Zero-server link-through: an absolute URL just navigates.
@@ -373,6 +392,9 @@ async function initiate(ref, payload = {}) {
373
392
  function portal(ref = 'portal', payload = {}) { return initiate(ref, payload); }
374
393
 
375
394
  // Read server-defined entitlement state into $pay.state (managed mode).
395
+ // Order id from a checkout return address (?order=…), passed on to the state request
396
+ let _returnOrder = null;
397
+
376
398
  async function refreshState() {
377
399
  const config = await window.ManifestPaymentsConfig.getPaymentsConfig();
378
400
  if (!config?.state?.url) return null;
@@ -381,6 +403,7 @@ async function refreshState() {
381
403
  const q = new URLSearchParams();
382
404
  if (ctx.workspaceId) q.set('workspace', ctx.workspaceId);
383
405
  if (ctx.userId) q.set('user', ctx.userId);
406
+ if (_returnOrder) q.set('order', _returnOrder);
384
407
  const url = config.state.url + (q.toString() ? `?${q}` : '');
385
408
  const res = await fetch(url, { credentials: 'include' });
386
409
  if (!res.ok) return null;
@@ -394,15 +417,28 @@ async function refreshState() {
394
417
 
395
418
  // On return from a redirect checkout (success_url carries ?checkout=…), re-pull
396
419
  // state and strip the marker. The webhook can land seconds after the buyer, so
397
- // re-poll on a backoff to absorb the lag; each refresh overwrites $pay.state.
420
+ // re-poll on a backoff; while the state says it's still being confirmed
421
+ // (checking, created, pending), keep polling for about two minutes.
398
422
  const RETURN_POLL_MS = [2000, 5000, 10000];
423
+ const RETURN_EXTRA_MS = [15000, 20000, 30000, 30000];
424
+ const stillConfirming = (s) => !!s && (s.checking === true || s.status === 'created' || s.status === 'pending');
425
+ function pollReturn(i) {
426
+ const delays = RETURN_POLL_MS.concat(RETURN_EXTRA_MS);
427
+ if (i >= delays.length) return;
428
+ setTimeout(async () => {
429
+ const data = await refreshState();
430
+ if (i + 1 < RETURN_POLL_MS.length || stillConfirming(data)) pollReturn(i + 1);
431
+ }, delays[i]);
432
+ }
399
433
  function handleReturn() {
400
434
  try {
401
435
  const params = new URLSearchParams(window.location.search);
402
436
  if (!params.has(RETURN_PARAM)) return;
403
437
  const status = params.get(RETURN_PARAM);
438
+ const order = params.get('order');
439
+ if (order && /^[A-Za-z0-9_-]{1,64}$/.test(order)) _returnOrder = order;
404
440
  refreshState();
405
- RETURN_POLL_MS.forEach((ms) => setTimeout(() => { refreshState(); }, ms));
441
+ pollReturn(0);
406
442
  window.dispatchEvent(new CustomEvent('manifest:pay:return', { detail: { status } }));
407
443
  params.delete(RETURN_PARAM);
408
444
  const qs = params.toString();
@@ -1,2 +1,2 @@
1
- !function(){function e(e,t){return"string"!=typeof e?e:/\$\{[^}]+\}/.test(e)?(console.error(`[Manifest Payments] manifest.payments.${t} references an undefined env var (${e}).`),null):e}async function t(){if(window.ManifestComponentsRegistry?.manifest)return window.ManifestComponentsRegistry.manifest;if(window.__manifestLoaded)return window.__manifestLoaded;if(window.__manifestPromise){const e=await window.__manifestPromise.catch(()=>null);if(e)return e}try{const e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json";return window.__manifestPromise=fetch(e).then(e=>e.json()),await window.__manifestPromise}catch(e){return null}}let n=null;if(window.ManifestPaymentsConfig={getPaymentsConfig:async function(){if(n)return n;const r=await t();if(!r?.payments||"object"!=typeof r.payments)return null;const o=r.payments,a=o.endpoint?e(o.endpoint,"endpoint"):null,i=o.publicKey?e(o.publicKey,"publicKey"):null;return o.endpoint&&null===a||o.publicKey&&null===i?null:(n={provider:o.provider||null,endpoint:a,mode:"overlay"===o.mode?"overlay":"redirect",publicKey:i,managed:!0===o.managed,environment:function(e){if(null==e||""===e)return"live";const t=String(e).toLowerCase();return"live"===t||"sandbox"===t?t:(console.warn(`[Manifest Payments] Unknown environment "${e}"; using sandbox. Use "live" or "sandbox".`),"sandbox")}(o.environment),state:o.state&&"object"==typeof o.state?o.state:null,options:o.options&&"object"==typeof o.options?o.options:{}},n)},ensureManifest:t},!window.ManifestVendor){const e="https://cdn.jsdelivr.net/npm/";window.ManifestVendor={get checked(){return!(!window.Manifest||!window.Manifest.integrity)},script(t,n){const r=window.Manifest;return r&&r.loadVendor?r.loadVendor(t,n):new Promise((r,o)=>{const a=e+t,i=document.querySelector(`script[src="${a}"]`);if(i&&i.dataset.vendorLoaded)return r();const s=i||document.createElement("script");if(s.addEventListener("load",()=>{s.dataset.vendorLoaded="1",r()}),s.addEventListener("error",()=>o(new Error(`Failed to load ${a}`))),i){const e=()=>{try{return performance.getEntriesByName(a).length>0}catch(e){return!1}},t=setInterval(()=>{e()&&(clearInterval(t),r())},50);return void setTimeout(()=>{clearInterval(t),r()},4e3)}n&&(s.integrity=n,s.crossOrigin="anonymous"),s.src=a,document.head.appendChild(s)})},fetch(t,n){const r=window.Manifest;return r&&r.fetchVendor?r.fetchVendor(t,n):fetch(e+t,n?{integrity:n,mode:"cors",credentials:"omit"}:void 0).then(n=>{if(!n.ok)throw new Error(`Failed to load ${e+t}`);return n})}}}const r={};function o(e,t){return r[e]||(r[e]=new Promise((n,r)=>{const o=document.querySelector(`script[src="${e}"]`);if(o)return o.dataset.mnfstLoaded?n():(o.addEventListener("load",()=>n()),void o.addEventListener("error",()=>r(new Error(`Failed to load ${e}`))));const a=document.createElement("script");if(a.src=e,a.async=!0,t)for(const e in t)a.setAttribute(e,t[e]);a.onload=()=>{a.dataset.mnfstLoaded="1",n()},a.onerror=()=>r(new Error(`Failed to load ${e}`)),document.head.appendChild(a)})),r[e]}const a={};function i(e,t){a[e]=t}function s(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsStoreInitialized||(window.__manifestPaymentsStoreInitialized=!0,Alpine.store("pay",{loading:!1,error:null,last:null,state:null})))}i("revolut",{supportsOverlay:!0,async open({params:e={},config:t}){const n="live"===t?.environment?"prod":"sandbox";if(await o("prod"===n?"https://merchant.revolut.com/embed.js":"https://sandbox-merchant.revolut.com/embed.js"),!window.RevolutCheckout)throw new Error("RevolutCheckout SDK unavailable");const r=await window.RevolutCheckout(e.token,n);return new Promise(e=>{r.payWithPopup({onSuccess:()=>{r.destroy?.(),e({status:"complete"})},onCancel:()=>{r.destroy?.(),e({status:"cancelled"})},onError:t=>{r.destroy?.(),e({status:"error",error:t?.message})}})})}}),i("paddle",{supportsOverlay:!0,async open({params:e={},config:t}){if(await o("https://cdn.paddle.com/paddle/v2/paddle.js"),!window.Paddle)throw new Error("Paddle SDK unavailable");return"live"!==t?.environment&&window.Paddle.Environment.set("sandbox"),window.Paddle.Initialize({token:e.token||t?.publicKey}),new Promise(t=>{window.Paddle.Checkout.open({...e,eventCallback:e=>{"checkout.completed"===e?.name&&t({status:"complete"}),"checkout.closed"===e?.name&&t({status:"cancelled"})}})})}}),i("lemonsqueezy",{supportsOverlay:!0,async open({url:e}){if(!e)throw new Error("Lemon Squeezy overlay requires a checkout url");return await o("https://app.lemonsqueezy.com/js/lemon.js"),window.createLemonSqueezy&&window.createLemonSqueezy(),new Promise(t=>{const n=window.LemonSqueezy;n?.Setup&&n.Setup({eventHandler:e=>{"Checkout.Success"===e?.event&&t({status:"complete"}),"Checkout.Closed"===e?.event&&t({status:"cancelled"})}}),n?.Url?.Open?n.Url.Open(e):(window.location.assign(e),t({status:"redirected"}))})}}),i("polar",{supportsOverlay:!0,async open({url:e}){if(!e)throw new Error("Polar overlay requires a checkout url");await window.ManifestVendor.script("@polar-sh/checkout@0.3.0/dist/embed.global.js","sha384-VVse2cWVt+cit0Mxg2AgY85JuM53jg9WGvx5apSPxqsenuH7fZLX+qtDSvEomoP8");const t=window.Polar?.EmbedCheckout;if(!t?.create)return window.location.assign(e),{status:"redirected"};const n=await t.create(e);return new Promise(e=>{n.addEventListener("success",()=>e({status:"complete"})),n.addEventListener("close",()=>e({status:"cancelled"}))})}}),i("razorpay",{supportsOverlay:!0,async open({params:e={}}){if(await o("https://checkout.razorpay.com/v1/checkout.js"),!window.Razorpay)throw new Error("Razorpay SDK unavailable");return new Promise(t=>{new window.Razorpay({...e,handler:()=>t({status:"complete"}),modal:{...e.modal||{},ondismiss:()=>t({status:"cancelled"})}}).open()})}}),["stripe","square","paypal","braintree","adyen","mollie"].forEach(e=>i(e,{supportsOverlay:!1,redirectOnly:!0})),window.ManifestPaymentsAdapters={register:i,get:function(e){return e&&a[e]||null},list:function(){return Object.keys(a).map(e=>({name:e,overlay:!!a[e].supportsOverlay}))},loadScript:o},document.addEventListener("alpine:init",()=>{try{s()}catch(e){}}),window.ManifestPaymentsStore={initialize:s};const d="checkout";function c(e){const t=window.Alpine?.store("pay")||null;t&&Object.assign(t,e)}let l=e=>window.location.assign(e);function u(){const e={};try{const t=window.Alpine?.store("auth");t&&(t.user?.$id&&(e.userId=t.user.$id),t.currentTeam?.$id&&(e.workspaceId=t.currentTeam.$id))}catch(e){}return e}async function w(e,t={}){c({loading:!0,error:null});try{if("string"==typeof e&&/^https?:\/\//i.test(e))return l(e),{status:"redirected"};const n=await window.ManifestPaymentsConfig.getPaymentsConfig();if(!n)throw new Error('No "payments" config in manifest.json');if(!n.endpoint)throw new Error("payments.endpoint is required for server-backed refs");const r=t.mode||n.mode,o=await async function(e,t,n,r){const o={...u(),...n?.context||{}};r&&(o.preferMode=r);const a=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({ref:t,payload:n||null,context:o})});if(!a.ok){let e="";try{const t=await a.json();e=t&&(t.message||t.error)}catch(e){}throw new Error(e||"Checkout couldn't be started. Please try again.")}return a.json()}(n,e,t,r);return c({last:o}),await async function(e,t){if("overlay"===(e?.mode||"redirect")){const n=e.provider||t.provider,r=window.ManifestPaymentsAdapters.get(n);if(r?.supportsOverlay&&"function"==typeof r.open){const o=await r.open({url:e.url,params:e.params,config:t});return"complete"===o?.status&&await p(),window.dispatchEvent(new CustomEvent("manifest:pay:result",{detail:{...o,provider:n}})),o}if(e.url)return l(e.url),{status:"redirected"};throw new Error(`No overlay adapter for "${n}" and no fallback url`)}if(!e?.url)throw new Error("Redirect response missing url");return l(e.url),{status:"redirected"}}(o,n)}catch(t){throw c({error:t.message||String(t)}),window.dispatchEvent(new CustomEvent("manifest:pay:error",{detail:{ref:e,error:t.message}})),t}finally{c({loading:!1})}}async function p(){const e=await window.ManifestPaymentsConfig.getPaymentsConfig();if(!e?.state?.url)return null;try{const t=u(),n=new URLSearchParams;t.workspaceId&&n.set("workspace",t.workspaceId),t.userId&&n.set("user",t.userId);const r=e.state.url+(n.toString()?`?${n}`:""),o=await fetch(r,{credentials:"include"});if(!o.ok)return null;const a=await o.json();return c({state:a}),a}catch(e){return null}}const f=[2e3,5e3,1e4];function m(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsMagicInitialized||(window.__manifestPaymentsMagicInitialized=!0,Alpine.magic("pay",()=>{const e=window.ManifestPayments,t=(t,n)=>e.initiate(t,n);return t.portal=(t,n)=>e.portal(t,n),t.refresh=()=>e.refreshState(),t.register=(e,t)=>window.ManifestPaymentsAdapters.register(e,t),Object.defineProperties(t,{state:{get:()=>Alpine.store("pay")?.state},loading:{get:()=>Alpine.store("pay")?.loading},error:{get:()=>Alpine.store("pay")?.error},last:{get:()=>Alpine.store("pay")?.last}}),t})))}function y(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsDirectiveInitialized||(window.__manifestPaymentsDirectiveInitialized=!0,Alpine.directive("pay",(e,{expression:t,modifiers:n},{evaluateLater:r,cleanup:o})=>{const a=n.includes("portal"),i=n.includes("overlay")?"overlay":n.includes("redirect")?"redirect":null,s=t&&t.trim().length>0?r(t):null,d=async t=>{if("true"===e.getAttribute("aria-busy"))return;const n=i?{mode:i}:{},r=window.ManifestPayments;if(!r)return void console.warn("[x-pay] payments core not loaded");if(!a&&(null==t||""===t))return void console.warn("[x-pay] no ref provided");e.setAttribute("aria-busy","true");const o="disabled"in e?e.disabled:null;!1===o&&(e.disabled=!0);try{a?await r.portal("string"==typeof t&&t?t:"portal",n):await r.initiate(t,n)}catch(t){try{const n=Alpine.evaluate(e,"$toast");n?.negative&&n.negative(t?.message||"Payment could not be started")}catch(e){}}finally{e.removeAttribute("aria-busy"),!1===o&&(e.disabled=!1)}},c=e=>{e.preventDefault(),s?s(e=>d(e)):d("portal")};e.addEventListener("click",c),o(()=>e.removeEventListener("click",c))})))}function h(){if(window.__manifestPaymentsBooted)return;window.__manifestPaymentsBooted=!0;try{window.ManifestPayments?.handleReturn()}catch(e){}const e=()=>{try{window.ManifestPayments?.refreshState()}catch(e){}};window.Alpine?.store&&Alpine.store("auth")?(window.addEventListener("manifest:auth:initialized",e,{once:!0}),setTimeout(e,1500)):e()}if(window.ManifestPayments={initiate:w,portal:function(e="portal",t={}){return w(e,t)},refreshState:p,handleReturn:function(){try{const e=new URLSearchParams(window.location.search);if(!e.has(d))return;const t=e.get(d);p(),f.forEach(e=>setTimeout(()=>{p()},e)),window.dispatchEvent(new CustomEvent("manifest:pay:return",{detail:{status:t}})),e.delete(d);const n=e.toString(),r=window.location.pathname+(n?`?${n}`:"")+window.location.hash;window.history.replaceState({},"",r)}catch(e){}},getContext:u,setNavigate:function(e){"function"==typeof e&&(l=e)}},document.addEventListener("alpine:init",()=>{try{m()}catch(e){}}),window.ManifestPaymentsMagic={initialize:m},document.addEventListener("alpine:init",()=>{try{y()}catch(e){}}),window.ManifestPaymentsDirective={initialize:y},document.addEventListener("alpine:init",()=>{try{h()}catch(e){}}),"undefined"!=typeof Alpine)try{h()}catch(e){}window.ManifestPaymentsMain={boot:h}}();
1
+ !function(){function e(e,t){return"string"!=typeof e?e:/\$\{[^}]+\}/.test(e)?(console.error(`[Manifest Payments] manifest.payments.${t} references an undefined env var (${e}).`),null):e}async function t(){if(window.ManifestComponentsRegistry?.manifest)return window.ManifestComponentsRegistry.manifest;if(window.__manifestLoaded)return window.__manifestLoaded;if(window.__manifestPromise){const e=await window.__manifestPromise.catch(()=>null);if(e)return e}try{const e=document.querySelector('link[rel="manifest"]')?.getAttribute("href")||"/manifest.json";return window.__manifestPromise=fetch(e).then(e=>e.json()),await window.__manifestPromise}catch(e){return null}}let n=null;if(window.ManifestPaymentsConfig={getPaymentsConfig:async function(){if(n)return n;const r=await t();if(!r?.payments||"object"!=typeof r.payments)return null;const o=r.payments,a=o.endpoint?e(o.endpoint,"endpoint"):null,i=o.publicKey?e(o.publicKey,"publicKey"):null;return o.endpoint&&null===a||o.publicKey&&null===i?null:(n={provider:o.provider||null,endpoint:a,mode:"overlay"===o.mode?"overlay":"redirect",publicKey:i,managed:!0===o.managed,environment:function(e){if(null==e||""===e)return"live";const t=String(e).toLowerCase();return"live"===t||"sandbox"===t?t:(console.warn(`[Manifest Payments] Unknown environment "${e}"; using sandbox. Use "live" or "sandbox".`),"sandbox")}(o.environment),state:o.state&&"object"==typeof o.state?o.state:null,options:o.options&&"object"==typeof o.options?o.options:{},redirectHosts:Array.isArray(o.redirectHosts)?o.redirectHosts.map(e=>String(e).toLowerCase()):null},n)},ensureManifest:t},!window.ManifestVendor){const e="https://cdn.jsdelivr.net/npm/";window.ManifestVendor={get checked(){return!(!window.Manifest||!window.Manifest.integrity)},script(t,n){const r=window.Manifest;return r&&r.loadVendor?r.loadVendor(t,n):new Promise((r,o)=>{const a=e+t,i=document.querySelector(`script[src="${a}"]`);if(i&&i.dataset.vendorLoaded)return r();const s=i||document.createElement("script");if(s.addEventListener("load",()=>{s.dataset.vendorLoaded="1",r()}),s.addEventListener("error",()=>o(new Error(`Failed to load ${a}`))),i){const e=()=>{try{return performance.getEntriesByName(a).length>0}catch(e){return!1}},t=setInterval(()=>{e()&&(clearInterval(t),r())},50);return void setTimeout(()=>{clearInterval(t),r()},4e3)}n&&(s.integrity=n,s.crossOrigin="anonymous"),s.src=a,document.head.appendChild(s)})},fetch(t,n){const r=window.Manifest;return r&&r.fetchVendor?r.fetchVendor(t,n):fetch(e+t,n?{integrity:n,mode:"cors",credentials:"omit"}:void 0).then(n=>{if(!n.ok)throw new Error(`Failed to load ${e+t}`);return n})}}}const r={};function o(e,t){return r[e]||(r[e]=new Promise((n,r)=>{const o=document.querySelector(`script[src="${e}"]`);if(o)return o.dataset.mnfstLoaded?n():(o.addEventListener("load",()=>n()),void o.addEventListener("error",()=>r(new Error(`Failed to load ${e}`))));const a=document.createElement("script");if(a.src=e,a.async=!0,t)for(const e in t)a.setAttribute(e,t[e]);a.onload=()=>{a.dataset.mnfstLoaded="1",n()},a.onerror=()=>r(new Error(`Failed to load ${e}`)),document.head.appendChild(a)})),r[e]}const a={};function i(e,t){a[e]=t}function s(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsStoreInitialized||(window.__manifestPaymentsStoreInitialized=!0,Alpine.store("pay",{loading:!1,error:null,last:null,state:null})))}i("revolut",{supportsOverlay:!0,async open({params:e={},config:t}){const n="live"===t?.environment?"prod":"sandbox";if(await o("prod"===n?"https://merchant.revolut.com/embed.js":"https://sandbox-merchant.revolut.com/embed.js"),!window.RevolutCheckout)throw new Error("RevolutCheckout SDK unavailable");const r=await window.RevolutCheckout(e.token,n);return new Promise(e=>{r.payWithPopup({onSuccess:()=>{r.destroy?.(),e({status:"complete"})},onCancel:()=>{r.destroy?.(),e({status:"cancelled"})},onError:t=>{r.destroy?.(),e({status:"error",error:t?.message})}})})}}),i("paddle",{supportsOverlay:!0,async open({params:e={},config:t}){if(await o("https://cdn.paddle.com/paddle/v2/paddle.js"),!window.Paddle)throw new Error("Paddle SDK unavailable");return"live"!==t?.environment&&window.Paddle.Environment.set("sandbox"),window.Paddle.Initialize({token:e.token||t?.publicKey}),new Promise(t=>{window.Paddle.Checkout.open({...e,eventCallback:e=>{"checkout.completed"===e?.name&&t({status:"complete"}),"checkout.closed"===e?.name&&t({status:"cancelled"})}})})}}),i("lemonsqueezy",{supportsOverlay:!0,async open({url:e}){if(!e)throw new Error("Lemon Squeezy overlay requires a checkout url");return await o("https://app.lemonsqueezy.com/js/lemon.js"),window.createLemonSqueezy&&window.createLemonSqueezy(),new Promise(t=>{const n=window.LemonSqueezy;n?.Setup&&n.Setup({eventHandler:e=>{"Checkout.Success"===e?.event&&t({status:"complete"}),"Checkout.Closed"===e?.event&&t({status:"cancelled"})}}),n?.Url?.Open?n.Url.Open(e):(window.location.assign(e),t({status:"redirected"}))})}}),i("polar",{supportsOverlay:!0,async open({url:e}){if(!e)throw new Error("Polar overlay requires a checkout url");await window.ManifestVendor.script("@polar-sh/checkout@0.3.0/dist/embed.global.js","sha384-VVse2cWVt+cit0Mxg2AgY85JuM53jg9WGvx5apSPxqsenuH7fZLX+qtDSvEomoP8");const t=window.Polar?.EmbedCheckout;if(!t?.create)return window.location.assign(e),{status:"redirected"};const n=await t.create(e);return new Promise(e=>{n.addEventListener("success",()=>e({status:"complete"})),n.addEventListener("close",()=>e({status:"cancelled"}))})}}),i("razorpay",{supportsOverlay:!0,async open({params:e={}}){if(await o("https://checkout.razorpay.com/v1/checkout.js"),!window.Razorpay)throw new Error("Razorpay SDK unavailable");return new Promise(t=>{new window.Razorpay({...e,handler:()=>t({status:"complete"}),modal:{...e.modal||{},ondismiss:()=>t({status:"cancelled"})}}).open()})}}),["stripe","square","paypal","braintree","adyen","mollie","worldpay"].forEach(e=>i(e,{supportsOverlay:!1,redirectOnly:!0})),window.ManifestPaymentsAdapters={register:i,get:function(e){return e&&a[e]||null},list:function(){return Object.keys(a).map(e=>({name:e,overlay:!!a[e].supportsOverlay}))},loadScript:o},document.addEventListener("alpine:init",()=>{try{s()}catch(e){}}),window.ManifestPaymentsStore={initialize:s};const d="checkout";function c(e){const t=window.Alpine?.store("pay")||null;t&&Object.assign(t,e)}let l=e=>window.location.assign(e);function u(){const e={};try{const t=window.Alpine?.store("auth");t&&(t.user?.$id&&(e.userId=t.user.$id),t.currentTeam?.$id&&(e.workspaceId=t.currentTeam.$id))}catch(e){}return e}function w(e,t){if(!t?.redirectHosts)return e;let n="";try{const t=window.location.href?new URL(e,window.location.href):new URL(e);n="https:"===t.protocol?t.hostname.toLowerCase():""}catch(e){}n=n.replace(/\.$/,"");if(!(n&&t.redirectHosts.some(e=>e.startsWith(".")?n===e.slice(1)||n.endsWith(e):n===e)))throw new Error("Checkout couldn't be started. Please try again.");return e}async function p(e,t={}){if(e&&"object"==typeof e&&"string"==typeof e.ref){const{ref:n,...r}=e;t={...r,...t},e=n}c({loading:!0,error:null});try{if("string"==typeof e&&/^https?:\/\//i.test(e))return l(e),{status:"redirected"};const n=await window.ManifestPaymentsConfig.getPaymentsConfig();if(!n)throw new Error('No "payments" config in manifest.json');if(!n.endpoint)throw new Error("payments.endpoint is required for server-backed refs");const r=t.mode||n.mode,o=await async function(e,t,n,r){const o={...u(),...n?.context||{}};r&&(o.preferMode=r);const a=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({ref:t,payload:n||null,context:o})});if(!a.ok){let e="";try{const t=await a.json();e=t&&(t.message||t.error)}catch(e){}throw new Error(e||"Checkout couldn't be started. Please try again.")}return a.json()}(n,e,t,r);return c({last:o}),await async function(e,t){if("overlay"===(e?.mode||"redirect")){const n=e.provider||t.provider,r=window.ManifestPaymentsAdapters.get(n);if(r?.supportsOverlay&&"function"==typeof r.open){const o=await r.open({url:e.url,params:e.params,config:t});return"complete"===o?.status&&await m(),window.dispatchEvent(new CustomEvent("manifest:pay:result",{detail:{...o,provider:n}})),o}if(e.url)return l(w(e.url,t)),{status:"redirected"};throw new Error(`No overlay adapter for "${n}" and no fallback url`)}if(!e?.url)throw new Error("Redirect response missing url");return l(w(e.url,t)),{status:"redirected"}}(o,n)}catch(t){throw c({error:t.message||String(t)}),window.dispatchEvent(new CustomEvent("manifest:pay:error",{detail:{ref:e,error:t.message}})),t}finally{c({loading:!1})}}let f=null;async function m(){const e=await window.ManifestPaymentsConfig.getPaymentsConfig();if(!e?.state?.url)return null;try{const t=u(),n=new URLSearchParams;t.workspaceId&&n.set("workspace",t.workspaceId),t.userId&&n.set("user",t.userId),f&&n.set("order",f);const r=e.state.url+(n.toString()?`?${n}`:""),o=await fetch(r,{credentials:"include"});if(!o.ok)return null;const a=await o.json();return c({state:a}),a}catch(e){return null}}const y=[2e3,5e3,1e4],h=[15e3,2e4,3e4,3e4];function v(e){const t=y.concat(h);e>=t.length||setTimeout(async()=>{const t=await m();var n;(e+1<y.length||(n=t)&&(!0===n.checking||"created"===n.status||"pending"===n.status))&&v(e+1)},t[e])}function g(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsMagicInitialized||(window.__manifestPaymentsMagicInitialized=!0,Alpine.magic("pay",()=>{const e=window.ManifestPayments,t=(t,n)=>e.initiate(t,n);return t.portal=(t,n)=>e.portal(t,n),t.refresh=()=>e.refreshState(),t.register=(e,t)=>window.ManifestPaymentsAdapters.register(e,t),Object.defineProperties(t,{state:{get:()=>Alpine.store("pay")?.state},loading:{get:()=>Alpine.store("pay")?.loading},error:{get:()=>Alpine.store("pay")?.error},last:{get:()=>Alpine.store("pay")?.last}}),t})))}function P(){"undefined"!=typeof Alpine&&(window.__manifestPaymentsDirectiveInitialized||(window.__manifestPaymentsDirectiveInitialized=!0,Alpine.directive("pay",(e,{expression:t,modifiers:n},{evaluateLater:r,cleanup:o})=>{const a=n.includes("portal"),i=n.includes("overlay")?"overlay":n.includes("redirect")?"redirect":null,s=t&&t.trim().length>0?r(t):null,d=async t=>{if("true"===e.getAttribute("aria-busy"))return;const n=i?{mode:i}:{},r=window.ManifestPayments;if(!r)return void console.warn("[x-pay] payments core not loaded");if(!a&&(null==t||""===t))return void console.warn("[x-pay] no ref provided");e.setAttribute("aria-busy","true");const o="disabled"in e?e.disabled:null;!1===o&&(e.disabled=!0);try{a?await r.portal("string"==typeof t&&t?t:"portal",n):await r.initiate(t,n)}catch(t){try{const n=Alpine.evaluate(e,"$toast");n?.negative&&n.negative(t?.message||"Payment could not be started")}catch(e){}}finally{e.removeAttribute("aria-busy"),!1===o&&(e.disabled=!1)}},c=e=>{e.preventDefault(),s?s(e=>d(e)):d("portal")};e.addEventListener("click",c),o(()=>e.removeEventListener("click",c))})))}function b(){if(window.__manifestPaymentsBooted)return;window.__manifestPaymentsBooted=!0;try{window.ManifestPayments?.handleReturn()}catch(e){}const e=()=>{try{window.ManifestPayments?.refreshState()}catch(e){}};window.Alpine?.store&&Alpine.store("auth")?(window.addEventListener("manifest:auth:initialized",e,{once:!0}),setTimeout(e,1500)):e()}if(window.ManifestPayments={initiate:p,portal:function(e="portal",t={}){return p(e,t)},refreshState:m,handleReturn:function(){try{const e=new URLSearchParams(window.location.search);if(!e.has(d))return;const t=e.get(d),n=e.get("order");n&&/^[A-Za-z0-9_-]{1,64}$/.test(n)&&(f=n),m(),v(0),window.dispatchEvent(new CustomEvent("manifest:pay:return",{detail:{status:t}})),e.delete(d);const r=e.toString(),o=window.location.pathname+(r?`?${r}`:"")+window.location.hash;window.history.replaceState({},"",o)}catch(e){}},getContext:u,setNavigate:function(e){"function"==typeof e&&(l=e)}},document.addEventListener("alpine:init",()=>{try{g()}catch(e){}}),window.ManifestPaymentsMagic={initialize:g},document.addEventListener("alpine:init",()=>{try{P()}catch(e){}}),window.ManifestPaymentsDirective={initialize:P},document.addEventListener("alpine:init",()=>{try{b()}catch(e){}}),"undefined"!=typeof Alpine)try{b()}catch(e){}window.ManifestPaymentsMain={boot:b}}();
2
2
  //# sourceMappingURL=manifest.payments.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.payments.min.js","names":["resolvedOrNull","value","fieldName","test","console","error","async","ensureManifest","window","ManifestComponentsRegistry","manifest","__manifestLoaded","__manifestPromise","shared","catch","url","document","querySelector","getAttribute","fetch","then","r","json","_","_cache","ManifestPaymentsConfig","getPaymentsConfig","payments","p","endpoint","publicKey","provider","mode","managed","environment","v","e","String","toLowerCase","warn","environmentOf","state","options","ManifestVendor","CDN","checked","Manifest","integrity","script","path","hash","M","loadVendor","Promise","resolve","reject","src","found","dataset","vendorLoaded","s","createElement","addEventListener","Error","done","performance","getEntriesByName","length","poll","setInterval","clearInterval","setTimeout","crossOrigin","head","appendChild","fetchVendor","credentials","undefined","ok","_loaded","loadScript","attrs","existing","mnfstLoaded","k","setAttribute","onload","onerror","_registry","register","name","adapter","initializePaymentsStore","Alpine","__manifestPaymentsStoreInitialized","store","loading","last","supportsOverlay","open","params","config","env","RevolutCheckout","instance","token","payWithPopup","onSuccess","destroy","status","onCancel","onError","message","Paddle","Environment","set","Initialize","Checkout","eventCallback","ev","createLemonSqueezy","ls","LemonSqueezy","Setup","eventHandler","event","Url","Open","location","assign","Embed","Polar","EmbedCheckout","create","checkout","Razorpay","handler","modal","ondismiss","forEach","redirectOnly","ManifestPaymentsAdapters","get","list","Object","keys","map","n","overlay","ManifestPaymentsStore","initialize","RETURN_PARAM","setStore","patch","_navigate","getContext","ctx","auth","user","$id","userId","currentTeam","workspaceId","initiate","ref","payload","preferMode","response","context","res","method","headers","body","JSON","stringify","postSession","result","refreshState","dispatchEvent","CustomEvent","detail","dispatch","err","q","URLSearchParams","toString","data","RETURN_POLL_MS","initializePaymentsMagic","__manifestPaymentsMagicInitialized","magic","api","ManifestPayments","fn","portal","refresh","defineProperties","initializePaymentsDirective","__manifestPaymentsDirectiveInitialized","directive","el","expression","modifiers","evaluateLater","cleanup","isPortal","includes","modeHint","getRef","trim","run","hadDisabled","disabled","toast","evaluate","negative","removeAttribute","preventDefault","removeEventListener","bootPayments","__manifestPaymentsBooted","handleReturn","pull","once","search","has","ms","delete","qs","clean","pathname","history","replaceState","setNavigate","ManifestPaymentsMagic","ManifestPaymentsDirective","ManifestPaymentsMain","boot"],"sources":["manifest.payments.js"],"mappings":"CAEA,WASA,SAASA,EAAeC,EAAOC,GAC3B,MAAqB,iBAAVD,EAA2BA,EAClC,cAAcE,KAAKF,IACnBG,QAAQC,MAAM,yCAAyCH,sCAA8CD,OAC9F,MAEJA,CACX,CAE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,GAwBjDrL,SAAS8C,iBAAiB,cAAe,KACrC,IAAM6J,GAAgB,CAAE,MAAOpM,GAAoB,IAIjC,oBAAXsE,OACP,IAAM8H,GAAgB,CAAE,MAAOpM,GAAoB,CAGvDf,OAAOoO,qBAAuB,CAAEC,KAAMlB,EAGrC,CApiBD","ignoreList":[]}
1
+ {"version":3,"file":"manifest.payments.min.js","names":["resolvedOrNull","value","fieldName","test","console","error","async","ensureManifest","window","ManifestComponentsRegistry","manifest","__manifestLoaded","__manifestPromise","shared","catch","url","document","querySelector","getAttribute","fetch","then","r","json","_","_cache","ManifestPaymentsConfig","getPaymentsConfig","payments","p","endpoint","publicKey","provider","mode","managed","environment","v","e","String","toLowerCase","warn","environmentOf","state","options","redirectHosts","Array","isArray","map","h","ManifestVendor","CDN","checked","Manifest","integrity","script","path","hash","M","loadVendor","Promise","resolve","reject","src","found","dataset","vendorLoaded","s","createElement","addEventListener","Error","done","performance","getEntriesByName","length","poll","setInterval","clearInterval","setTimeout","crossOrigin","head","appendChild","fetchVendor","credentials","undefined","ok","_loaded","loadScript","attrs","existing","mnfstLoaded","k","setAttribute","onload","onerror","_registry","register","name","adapter","initializePaymentsStore","Alpine","__manifestPaymentsStoreInitialized","store","loading","last","supportsOverlay","open","params","config","env","RevolutCheckout","instance","token","payWithPopup","onSuccess","destroy","status","onCancel","onError","message","Paddle","Environment","set","Initialize","Checkout","eventCallback","ev","createLemonSqueezy","ls","LemonSqueezy","Setup","eventHandler","event","Url","Open","location","assign","Embed","Polar","EmbedCheckout","create","checkout","Razorpay","handler","modal","ondismiss","forEach","redirectOnly","ManifestPaymentsAdapters","get","list","Object","keys","n","overlay","ManifestPaymentsStore","initialize","RETURN_PARAM","setStore","patch","_navigate","getContext","ctx","auth","user","$id","userId","currentTeam","workspaceId","checkedUrl","host","u","href","URL","protocol","hostname","replace","some","startsWith","slice","endsWith","initiate","ref","payload","inner","rest","preferMode","response","context","res","method","headers","body","JSON","stringify","postSession","result","refreshState","dispatchEvent","CustomEvent","detail","dispatch","err","_returnOrder","q","URLSearchParams","toString","data","RETURN_POLL_MS","RETURN_EXTRA_MS","pollReturn","i","delays","concat","checking","initializePaymentsMagic","__manifestPaymentsMagicInitialized","magic","api","ManifestPayments","fn","portal","refresh","defineProperties","initializePaymentsDirective","__manifestPaymentsDirectiveInitialized","directive","el","expression","modifiers","evaluateLater","cleanup","isPortal","includes","modeHint","getRef","trim","run","hadDisabled","disabled","toast","evaluate","negative","removeAttribute","preventDefault","removeEventListener","bootPayments","__manifestPaymentsBooted","handleReturn","pull","once","search","has","order","delete","qs","clean","pathname","history","replaceState","setNavigate","ManifestPaymentsMagic","ManifestPaymentsDirective","ManifestPaymentsMain","boot"],"sources":["manifest.payments.js"],"mappings":"CAEA,WASA,SAASA,EAAeC,EAAOC,GAC3B,MAAqB,iBAAVD,EAA2BA,EAClC,cAAcE,KAAKF,IACnBG,QAAQC,MAAM,yCAAyCH,sCAA8CD,OAC9F,MAEJA,CACX,CAEAK,eAAeC,IACX,GAAIC,OAAOC,4BAA4BC,SAAU,OAAOF,OAAOC,2BAA2BC,SAC1F,GAAIF,OAAOG,iBAAkB,OAAOH,OAAOG,iBAC3C,GAAIH,OAAOI,kBAAmB,CAAE,MAAMC,QAAeL,OAAOI,kBAAkBE,MAAM,IAAM,MAAO,GAAID,EAAQ,OAAOA,CAAQ,CAC5H,IACI,MAAME,EAAMC,SAASC,cAAc,yBAAyBC,aAAa,SAAW,iBAEpF,OADAV,OAAOI,kBAAoBO,MAAMJ,GAAKK,KAAKC,GAAKA,EAAEC,cACrCd,OAAOI,iBACxB,CAAE,MAAOW,GACL,OAAO,IACX,CACJ,CAGA,IAAIC,EAAS,KA6Cb,GARAhB,OAAOiB,uBAAyB,CAAEC,kBApClCpB,iBACI,GAAIkB,EAAQ,OAAOA,EACnB,MAAMd,QAAiBH,IACvB,IAAKG,GAAUiB,UAAyC,iBAAtBjB,EAASiB,SAAuB,OAAO,KACzE,MAAMC,EAAIlB,EAASiB,SAEb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Ac,IAAIC,YAAY,sBAAuB,CAAEC,OAAQ,CAAEpF,aACxET,EAAOmJ,OAAOjG,GACd,MAAMkG,EAAKpJ,EAAOmG,WACZkD,EAAQtP,OAAO6H,SAAS0H,UAAYF,EAAK,IAAIA,IAAO,IAAMrP,OAAO6H,SAAS9E,KAChF/C,OAAOwP,QAAQC,aAAa,CAAC,EAAG,GAAIH,EACxC,CAAE,MAAOvO,GAAoB,CACjC,EAE0EwI,aAAYmG,YAhKtF,SAAqBxC,GAAwB,mBAAPA,IAAmB5D,EAAY4D,EAAI,GAgMzE1M,SAASmD,iBAAiB,cAAe,KACrC,IAAMkJ,GAA2B,CAAE,MAAO9L,GAAoB,IAGlEf,OAAO2P,sBAAwB,CAAEzG,WAAY2D,GA6D7CrM,SAASmD,iBAAiB,cAAe,KACrC,IAAM2J,GAA+B,CAAE,MAAOvM,GAAoB,IAGtEf,OAAO4P,0BAA4B,CAAE1G,WAAYoE,GAwBjD9M,SAASmD,iBAAiB,cAAe,KACrC,IAAMiL,GAAgB,CAAE,MAAO7N,GAAoB,IAIjC,oBAAX2E,OACP,IAAMkJ,GAAgB,CAAE,MAAO7N,GAAoB,CAGvDf,OAAO6P,qBAAuB,CAAEC,KAAMlB,EAGrC,CAxkBD","ignoreList":[]}
@@ -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.310';
19
+ const BUILD_VERSION = '0.5.311';
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)
@@ -1,2 +1,2 @@
1
- !function(){"use strict";const t="0.5.310",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){}})}();
1
+ !function(){"use strict";const t="0.5.311",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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.310",
3
+ "version": "0.5.311",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",