import{t as e}from"./rolldown-runtime.Bi-D_2cA.mjs";import{C as t,N as n,d as r,m as i,o as a,s as o}from"./react.B4lOa1lM.mjs";import{w as s}from"./motion.D9VVlZrJ.mjs";import{D as c,Et as l,W as u,h as d,o as f,r as ee,t as te,x as ne}from"./framer.KTGEEA2E.mjs";function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return typeof e==`function`?e():e}function re(e,t){return N[e]>N[t]}function h(e){let t;for(let n of e){let e=m(n);if((t===void 0||re(e,t))&&(t=e),t===`user-blocking`)break}return t}function g(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function _(e,...t){if(!e)throw Error(`Assertion Error`+(t.length>0?`: `+t.join(` `):``))}function v(e){throw Error(`Unexpected value: ${e}`)}function y(e,t,n,r){_(e>=t,e,`outside lower bound for`,r),_(e<=n,e,`outside upper bound for`,r)}function b(e){return typeof e==`string`}function x(e){return Number.isFinite(e)}function S(e){return e===null}function C(e){if(S(e))return 0;switch(e.type){case`array`:return 1;case`boolean`:return 2;case`color`:return 3;case`date`:return 4;case`enum`:return 5;case`file`:return 6;case`responsiveimage`:return 10;case`link`:return 7;case`number`:return 8;case`object`:return 9;case`richtext`:return 11;case`string`:return 12;case`vectorsetitem`:return 13;default:v(e)}}function ie(e){let t=e.readUint16(),n=[];for(let r=0;ri)return 1;for(let i=0;it.value)}function ue(e){return{type:`color`,value:e.readString()}}function de(e,t){e.writeString(t.value)}function fe(e,t){return e.valuet.value)}function pe(e){let t=e.readInt64();return{type:`date`,value:new Date(t).toISOString()}}function me(e,t){let n=new Date(t.value).getTime();e.writeInt64(n)}function he(e,t){let n=new Date(e.value),r=new Date(t.value);return nr)}function ge(e){return{type:`enum`,value:e.readString()}}function _e(e,t){e.writeString(t.value)}function ve(e,t){return e.valuet.value)}function ye(e){return{type:`file`,value:e.readString()}}function be(e,t){e.writeString(t.value)}function xe(e,t){return e.valuet.value)}function Se(e){return{type:`link`,value:e.readJson()}}function Ce(e,t){e.writeJson(t.value)}function we(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr)}function Te(e){return{type:`number`,value:e.readFloat64()}}function Ee(e,t){e.writeFloat64(t.value)}function De(e,t){return e.valuet.value)}function Oe(e){let t=e.readUint16(),n={};for(let r=0;ri.length)return 1;for(let a=0;as)return 1;let c=e.value[o]??null,l=t.value[s]??null,u=O.compare(c,l,n);if(u!==0)return u}return 0}function je(e){return{type:`responsiveimage`,value:e.readJson()}}function Me(e,t){e.writeJson(t.value)}function Ne(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr)}function Pe(e){let t=e.readInt8();if(t===0)return{type:`richtext`,value:e.readUint32()};if(t===1)return{type:`richtext`,value:e.readString()};throw Error(`Invalid rich text pointer`)}function Fe(e,t){if(x(t.value))e.writeInt8(0),e.writeUint32(t.value);else if(b(t.value))e.writeInt8(1),e.writeString(t.value);else throw Error(`Invalid rich text pointer`)}function Ie(e,t){let n=e.value,r=t.value;if(x(n)&&x(r)||b(n)&&b(r))return nr);throw Error(`Invalid rich text pointer`)}function Le(e){return{type:`string`,value:e.readString()}}function Re(e,t){e.writeString(t.value)}function ze(e,t,n){let r=e.value,i=t.value;return n.type===0&&(r=e.value.toLowerCase(),i=t.value.toLowerCase()),ri)}function Be(e){return{type:`vectorsetitem`,value:e.readUint32()}}function Ve(e,t){e.writeUint32(t.value)}function He(e,t){let n=e.value,r=t.value;return nr)}async function Ue(e){let t=Math.floor(nt*(Math.random()+1)*2**(e-1));await new Promise(e=>{setTimeout(e,t)})}async function w(e,t){let n=We(t),r=[],i=0;for(let e of n)r.push(`${e.from}-${e.to-1}`),i+=e.to-e.from;let a=new URL(e),o=r.join(`,`);a.searchParams.set(`range`,o);let s=await U(a);if(s.status!==200)throw Error(`Request failed: ${s.status} ${s.statusText}`);let c=await s.arrayBuffer(),l=new Uint8Array(c);if(l.length!==i)throw Error(`Request failed: Unexpected response length`);let u=new it,d=0;for(let e of n){let t=e.to-e.from,n=d+t,r=l.subarray(d,n);u.write(e.from,r),d=n}return t.map(e=>u.read(e.from,e.to-e.from))}function T(e,t){let n=e.length+t.length,r=new Uint8Array(n);return r.set(e,0),r.set(t,e.length),r}function We(e){_(e.length>0,`Must have at least one range`);let t=[...e].sort((e,t)=>e.from-t.from),n=[];for(let e of t){let t=n.length-1,r=n[t];r&&e.from<=r.to?n[t]={from:r.from,to:Math.max(r.to,e.to)}:n.push(e)}return n}function E(e){let t={},n=e.readUint16();for(let r=0;r{u(),k=Object.create,A=Object.defineProperty,j=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,Ke=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty,Je=(e,t)=>function(){try{return t||(0,e[M(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},Ye=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of M(t))qe.call(e,i)||i===n||A(e,i,{get:()=>t[i],enumerable:!(r=j(t,i))||r.enumerable});return e},Xe=(e,t,n)=>(n=e==null?{}:k(Ke(e)),Ye(!t&&e&&e.__esModule?n:A(n,`default`,{value:e,enumerable:!0}),e)),Ze=Xe(Je({"../../../node_modules/dataloader/index.js"(e,t){var n,r=/* @__PURE__ */ function(){function e(e,t){if(typeof e!=`function`)throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but got: `+e+`.`);this._batchLoadFn=e,this._maxBatchSize=function(e){if(e&&!1===e.batch)return 1;var t=e&&e.maxBatchSize;if(t===void 0)return 1/0;if(typeof t!=`number`||t<1)throw TypeError(`maxBatchSize must be a positive number: `+t);return t}(t),this._batchScheduleFn=function(e){var t=e&&e.batchScheduleFn;if(t===void 0)return i;if(typeof t!=`function`)throw TypeError(`batchScheduleFn must be a function: `+t);return t}(t),this._cacheKeyFn=function(e){var t=e&&e.cacheKeyFn;if(t===void 0)return function(e){return e};if(typeof t!=`function`)throw TypeError(`cacheKeyFn must be a function: `+t);return t}(t),this._cacheMap=function(e){if(e&&!1===e.cache)return null;var t=e&&e.cacheMap;if(t===void 0)return/* @__PURE__ */ new Map;if(t!==null){var n=[`get`,`set`,`delete`,`clear`].filter(function(e){return t&&typeof t[e]!=`function`});if(n.length!==0)throw TypeError(`Custom cacheMap missing methods: `+n.join(`, `))}return t}(t),this._batch=null,this.name=t&&t.name?t.name:null}var t=e.prototype;return t.load=function(e){if(e==null)throw TypeError(`The loader.load() function must be called with a value, but got: `+String(e)+`.`);var t=function(e){var t=e._batch;if(t!==null&&!t.hasDispatched&&t.keys.length and returns Promise>, but the function errored synchronously: `+String(n)+`.`))}if(!n||typeof n.then!=`function`)return a(e,t,TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise: `+String(n)+`.`));n.then(function(e){if(!s(e))throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array: `+String(e)+`.`);if(e.length!==t.keys.length)throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys. Keys: `+String(t.keys)+` Values: `+String(e));o(t);for(var n=0;n but got: `+e+`.`);for(var t=[],n=0;n0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}t.exports=r}})(),1),N={background:0,"user-visible":1,"user-blocking":2},P={Uint8:1,Uint16:2,Uint32:4,BigUint64:8,Int8:1,Int16:2,Int32:4,BigInt64:8,Float32:4,Float64:8},F=(D=class e{getOffset(){return this.offset}ensureLength(e){let t=this.bytes.length;if(!(this.offset+e<=t))throw Error(`Reading out of bounds`)}readUint8(){let e=P.Uint8;this.ensureLength(e);let t=this.view.getUint8(this.offset);return this.offset+=e,t}readUint16(){let e=P.Uint16;this.ensureLength(e);let t=this.view.getUint16(this.offset);return this.offset+=e,t}readUint32(){let e=P.Uint32;this.ensureLength(e);let t=this.view.getUint32(this.offset);return this.offset+=e,t}readUint64(){let e=this.readBigUint64();return Number(e)}readBigUint64(){let e=P.BigUint64;this.ensureLength(e);let t=this.view.getBigUint64(this.offset);return this.offset+=e,t}readInt8(){let e=P.Int8;this.ensureLength(e);let t=this.view.getInt8(this.offset);return this.offset+=e,t}readInt16(){let e=P.Int16;this.ensureLength(e);let t=this.view.getInt16(this.offset);return this.offset+=e,t}readInt32(){let e=P.Int32;this.ensureLength(e);let t=this.view.getInt32(this.offset);return this.offset+=e,t}readInt64(){let e=this.readBigInt64();return Number(e)}readBigInt64(){let e=P.BigInt64;this.ensureLength(e);let t=this.view.getBigInt64(this.offset);return this.offset+=e,t}readFloat32(){let e=P.Float32;this.ensureLength(e);let t=this.view.getFloat32(this.offset);return this.offset+=e,t}readFloat64(){let e=P.Float64;this.ensureLength(e);let t=this.view.getFloat64(this.offset);return this.offset+=e,t}readBytes(e){let t=this.offset,n=t+e,r=this.bytes.subarray(t,n);return this.offset=n,r}readString(){let t=this.readUint32(),n=this.readBytes(t);return e.textDecoder.decode(n)}readJson(){let e=this.readString();return JSON.parse(e)}constructor(e){p(this,`bytes`,void 0),p(this,`offset`,0),p(this,`view`,void 0),this.bytes=e,this.view=g(this.bytes)}},p(D,`textDecoder`,new TextDecoder),D),Qe=1024,$e=1.5,I=e=>2**e-1,L=e=>-(2**(e-1)),R=e=>2**(e-1)-1,z={Uint8:0,Uint16:0,Uint32:0,Uint64:0,BigUint64:0,Int8:L(8),Int16:L(16),Int32:L(32),Int64:-(2**53-1),BigInt64:-(BigInt(2)**BigInt(63))},B={Uint8:I(8),Uint16:I(16),Uint32:I(32),Uint64:2**53-1,BigUint64:BigInt(2)**BigInt(64)-BigInt(1),Int8:R(8),Int16:R(16),Int32:R(32),Int64:2**53-1,BigInt64:BigInt(2)**BigInt(63)-BigInt(1)},et=class{getOffset(){return this.offset}slice(e=0,t=this.offset){return this.bytes.slice(e,t)}subarray(e=0,t=this.offset){return this.bytes.subarray(e,t)}ensureLength(e){let t=this.bytes.length;if(this.offset+e<=t)return;let n=new Uint8Array(Math.ceil(t*$e)+e);n.set(this.bytes),this.bytes=n,this.view=g(n)}writeUint8(e){y(e,z.Uint8,B.Uint8,`Uint8`);let t=P.Uint8;this.ensureLength(t),this.view.setUint8(this.offset,e),this.offset+=t}writeUint16(e){y(e,z.Uint16,B.Uint16,`Uint16`);let t=P.Uint16;this.ensureLength(t),this.view.setUint16(this.offset,e),this.offset+=t}writeUint32(e){y(e,z.Uint32,B.Uint32,`Uint32`);let t=P.Uint32;this.ensureLength(t),this.view.setUint32(this.offset,e),this.offset+=t}writeUint64(e){y(e,z.Uint64,B.Uint64,`Uint64`);let t=BigInt(e);this.writeBigUint64(t)}writeBigUint64(e){y(e,z.BigUint64,B.BigUint64,`BigUint64`);let t=P.BigUint64;this.ensureLength(t),this.view.setBigUint64(this.offset,e),this.offset+=t}writeInt8(e){y(e,z.Int8,B.Int8,`Int8`);let t=P.Int8;this.ensureLength(t),this.view.setInt8(this.offset,e),this.offset+=t}writeInt16(e){y(e,z.Int16,B.Int16,`Int16`);let t=P.Int16;this.ensureLength(t),this.view.setInt16(this.offset,e),this.offset+=t}writeInt32(e){y(e,z.Int32,B.Int32,`Int32`);let t=P.Int32;this.ensureLength(t),this.view.setInt32(this.offset,e),this.offset+=t}writeInt64(e){y(e,z.Int64,B.Int64,`Int64`);let t=BigInt(e);this.writeBigInt64(t)}writeBigInt64(e){y(e,z.BigInt64,B.BigInt64,`BigInt64`);let t=P.BigInt64;this.ensureLength(t),this.view.setBigInt64(this.offset,e),this.offset+=t}writeFloat32(e){let t=P.Float32;this.ensureLength(t),this.view.setFloat32(this.offset,e),this.offset+=t}writeFloat64(e){let t=P.Float64;this.ensureLength(t),this.view.setFloat64(this.offset,e),this.offset+=t}writeBytes(e){let t=e.length;this.ensureLength(t),this.bytes.set(e,this.offset),this.offset+=t}encodeString(e){let t=this.encodedStrings.get(e);if(t)return t;let n=this.encoder.encode(e);return this.encodedStrings.set(e,n),n}writeString(e){let t=this.encodeString(e),n=t.length;this.writeUint32(n),this.writeBytes(t)}writeJson(e){let t=JSON.stringify(e);this.writeString(t)}constructor(){p(this,`offset`,0),p(this,`bytes`,new Uint8Array(Qe)),p(this,`view`,g(this.bytes)),p(this,`encoder`,new TextEncoder),p(this,`encodedStrings`,/* @__PURE__ */ new Map)}},V=class e{static fromString(t){let[n,r,i]=t.split(`/`).map(Number);return _(x(n),`Invalid chunkId`),_(x(r),`Invalid offset`),_(x(i),`Invalid length`),new e(n,r,i)}toString(){return`${this.chunkId}/${this.offset}/${this.length}`}static read(t){let n=t.readUint16(),r=t.readUint32(),i=t.readUint32();return new e(n,r,i)}write(e){e.writeUint16(this.chunkId),e.writeUint32(this.offset),e.writeUint32(this.length)}compare(e){return this.chunkIde.chunkId?1:this.offsete.offset?1:(_(this.length===e.length),0)}constructor(e,t,n){p(this,`chunkId`,void 0),p(this,`offset`,void 0),p(this,`length`,void 0),this.chunkId=e,this.offset=t,this.length=n}},(e=>{e.read=function(e){let t=e.readUint8();switch(t){case 0:return null;case 1:return ie(e);case 2:return se(e);case 3:return ue(e);case 4:return pe(e);case 5:return ge(e);case 6:return ye(e);case 7:return Se(e);case 8:return Te(e);case 9:return Oe(e);case 10:return je(e);case 11:return Pe(e);case 12:return Le(e);case 13:return Be(e);default:v(t)}},e.write=function(e,t){let n=C(t);if(e.writeUint8(n),!S(t))switch(t.type){case`array`:return ae(e,t);case`boolean`:return ce(e,t);case`color`:return de(e,t);case`date`:return me(e,t);case`enum`:return _e(e,t);case`file`:return be(e,t);case`link`:return Ce(e,t);case`number`:return Ee(e,t);case`object`:return ke(e,t);case`responsiveimage`:return Me(e,t);case`richtext`:return Fe(e,t);case`vectorsetitem`:return Ve(e,t);case`string`:return Re(e,t);default:v(t)}},e.compare=function(e,t,n){let r=C(e),i=C(t);if(ri)return 1;if(S(e)||S(t))return 0;switch(e.type){case`array`:return _(t.type===`array`),oe(e,t,n);case`boolean`:return _(t.type===`boolean`),le(e,t);case`color`:return _(t.type===`color`),fe(e,t);case`date`:return _(t.type===`date`),he(e,t);case`enum`:return _(t.type===`enum`),ve(e,t);case`file`:return _(t.type===`file`),xe(e,t);case`link`:return _(t.type===`link`),we(e,t);case`number`:return _(t.type===`number`),De(e,t);case`object`:return _(t.type===`object`),Ae(e,t,n);case`responsiveimage`:return _(t.type===`responsiveimage`),Ne(e,t);case`richtext`:return _(t.type===`richtext`),Ie(e,t);case`vectorsetitem`:return _(t.type===`vectorsetitem`),He(e,t);case`string`:return _(t.type===`string`),ze(e,t,n);default:v(e)}}})(O||={}),tt=class e{sortEntries(){this.entries.sort((e,t)=>{for(let n=0;n{let e=[];for(let t=0;te.getField(t)??null);this.entries.push({values:n,pointer:t})}constructor(e,t){p(this,`fieldNames`,void 0),p(this,`options`,void 0),p(this,`entries`,[]),this.fieldNames=e,this.options=t}},H=3,nt=250,rt=[408,429,500,502,503,504],U=async(e,t)=>{let n=0;for(;;){try{let r=await fetch(e,t);if(!rt.includes(r.status)||++n>H)return r}catch(e){if(t?.signal?.aborted||++n>H)throw e}await Ue(n)}},it=class{read(e,t){for(let n of this.chunks){if(en.end)continue;if(e+t>n.end)break;let r=e-n.start,i=r+t;return n.data.slice(r,i)}throw Error(`Missing data`)}write(e,t){let n=e,r=n+t.length,i=0,a=this.chunks.length;for(;ie.end)){if(n>e.start){let r=n-e.start;t=T(e.data.subarray(0,r),t),n=e.start}break}}for(;a>i;a--){let e=this.chunks[a-1];if(_(e,`Missing chunk`),!(r{let e=h(this.modelPrioritySources);return e?l({batch:!0,priority:e}):void 0})}async getModel(e){return this.model||(e&&this.modelPrioritySources.add(e),this.modelPromise??=this.loadModel().finally(()=>{this.modelPrioritySources.clear()}),this.model??=await this.modelPromise),this.model}async lookupItems(e,t){_(e.length===this.fields.length,`Invalid query length`);let n=[(await this.getModel(t)).entries];for(let[r,i]of e.entries()){let e=[];for(let a of n){let n,o=t?l({batch:!0,priority:m(t)}):void 0;switch(o&&await o,i.type){case`All`:n=[a];break;case`Equals`:n=this.queryEquals(a,i,r);break;case`NotEquals`:n=this.queryNotEquals(a,i,r);break;case`LessThan`:n=this.queryLessThan(a,i,r);break;case`GreaterThan`:n=this.queryGreaterThan(a,i,r);break;case`Contains`:n=await this.queryContains(a,i,r,t);break;case`StartsWith`:n=await this.queryStartsWith(a,i,r,t);break;case`EndsWith`:n=await this.queryEndsWith(a,i,r,t);break;default:v(i)}e.push(...n)}n=e}let r=[];for(let e of n)for(let n of e){let e=t?l({batch:!0,priority:m(t)}):void 0;e&&await e;let i={};for(let e=0;e0?[a]:[]}queryNotEquals(e,t,n){let r=this.getLeftMost(e,n,t.value),i=this.getRightMost(e,n,t.value),a=[],o=e.slice(0,r);o.length>0&&a.push(o);let s=e.slice(i+1);return s.length>0&&a.push(s),a}queryLessThan(e,t,n){let r=this.getRightMost(e,n,null);if(e=e.slice(r+1),t.inclusive){let r=this.getRightMost(e,n,t.value),i=e.slice(0,r+1);return i.length>0?[i]:[]}let i=this.getLeftMost(e,n,t.value),a=e.slice(0,i);return a.length>0?[a]:[]}queryGreaterThan(e,t,n){let r=this.getRightMost(e,n,null);if(e=e.slice(r+1),t.inclusive){let r=this.getLeftMost(e,n,t.value),i=e.slice(r);return i.length>0?[i]:[]}let i=this.getRightMost(e,n,t.value),a=e.slice(i+1);return a.length>0?[a]:[]}queryContains(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.includes(r)})}queryStartsWith(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.startsWith(r)})}queryEndsWith(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.endsWith(r)})}getLeftMost(e,t,n){let r=0,i=e.length;for(;r>1,o=e[a].values[t];0>O.compare(o,n,this.collation)?r=a+1:i=a}return r}getRightMost(e,t,n){let r=0,i=e.length;for(;r>1,o=e[a].values[t];O.compare(o,n,this.collation)>0?i=a:r=a+1}return i-1}async findItems(e,t,n,r){let i=[],a=0;for(let o=0;o{if(!e.ok)throw Error(`Request failed: ${e.status} ${e.statusText}`);let t=await e.arrayBuffer(),n=new F(new Uint8Array(t)),r=[],i=n.readUint32();for(let e=0;e{this.isScanning=!1,this.scanPrioritySources.clear()})),this.itemsPromise}resolveItem(e,t){let n=this.itemPrioritySources.get(e);n||(n=/* @__PURE__ */ new Set,this.itemPrioritySources.set(e,n)),t&&n.add(t);let r=this.itemLoader.load({pointer:e,prioritySources:n}),i=()=>this.itemPrioritySources.delete(e);return r.then(i,i),r}constructor(e,t){p(this,`id`,void 0),p(this,`url`,void 0),p(this,`itemsPromise`,void 0),p(this,`isScanning`,!1),p(this,`scanPrioritySources`,/* @__PURE__ */ new Set),p(this,`itemPrioritySources`,/* @__PURE__ */ new Map),p(this,`itemLoader`,new Ze.default(async e=>{let t=e.map(({pointer:e})=>{let t=V.fromString(e);return{from:t.offset,to:t.offset+t.length}}),n=await w(this.url,t),r=[];for(let t=0;te.pointer})),this.id=e,this.url=t}},G=class{async scanItems(e){return(await Promise.all(this.chunks.map(async t=>t.scanItems(e)))).flat()}resolveItems(e,t){return Promise.all(e.map(e=>{let n=V.fromString(e),r=this.chunks[n.chunkId];return _(r,`Missing chunk`),r.resolveItem(e,t)}))}compareItems(e,t){let n=V.fromString(e.pointer),r=V.fromString(t.pointer);return n.compare(r)}compareValues(e,t,n){return O.compare(e,t,n)}constructor(e){p(this,`options`,void 0),p(this,`id`,void 0),p(this,`schema`,void 0),p(this,`indexes`,void 0),p(this,`resolveRichText`,void 0),p(this,`resolveVectorSetItem`,void 0),p(this,`chunks`,void 0),this.options=e,this.chunks=this.options.chunks.map((e,t)=>new at(t,e)),this.schema=e.schema,this.indexes=e.indexes,this.resolveRichText=e.resolveRichText,this.resolveVectorSetItem=e.resolveVectorSetItem,this.id=e.id}}})))()}function st(e){return typeof e==`object`&&!!e&&!/*#__PURE__*/ i(e)&&ft in e}function ct(e,...t){if(!e)throw Error(`Assertion Error`+(t.length>0?`: `+t.join(` `):``))}function lt(e,t,n){for(let[r,i]of Object.entries(t)){let t=e[r];typeof i==`number`?e[r]=n(i,t):ut(t,i,n)}}function ut(e,t,n){if(typeof t!=`number`){if(Array.isArray(t)){if(!Array.isArray(e))return;let[r]=t;for(let t=0;t{let o=t.get(i);if(o)return o;let c=function t(i){switch(i[0]){case 1:{let[,...e]=i,a=e.map(t);return/*#__PURE__*/ r(n,void 0,...a)}case 2:{let[,e,...n]=i,a=n.map(t);return/*#__PURE__*/ r(d,e,...a)}case 3:{let[,n,r,o]=i;lt(r,o,(n,r)=>{if(n===1)return r&&t(r);if(typeof r!=`string`)return r;let i=e[r];return i?(st(i)&&i.preload(),i):r});let s=e[n];return ct(s,`Module not found`),st(s)&&s.preload(),/*#__PURE__*/ a(ee,{componentIdentifier:n,children:e=>/*#__PURE__*/ a(te,{component:s,props:{...e,...r}})})}case 4:{let[,e,n,...a]=i,o=a.map(t);return r(e===`a`?s.a:e,n,...o)}case 5:{let[,e]=i;return e}}}(JSON.parse(i));return t.set(i,c),c}}var K,q,ft,pt,mt;function ht(){return(ht=e((()=>{o(),u(),t(),ft=`preload`,pt=((K=pt||{})[K.Fragment=1]=`Fragment`,K[K.Link=2]=`Link`,K[K.Module=3]=`Module`,K[K.Tag=4]=`Tag`,K[K.Text=5]=`Text`,K),mt=((q=mt||{})[q.RichText=1]=`RichText`,q[q.VectorSetItem=2]=`VectorSetItem`,q)})))()}var J,Y,gt,X,_t,vt,yt,bt,Z,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,Q,$,qt,Jt,Yt;function Xt(){return(Xt=e((()=>{u(),ot(),ht(),J={Aa2TY5HtN:{isNullable:!0,type:f.String},BRar6a8iL:{isNullable:!0,type:f.String},BtPycgcKR:{isNullable:!0,type:f.ResponsiveImage},BWX0pZX3e:{isNullable:!0,type:f.String},cjJXJQicQ:{isNullable:!0,type:f.String},createdAt:{isNullable:!0,type:f.Date},DL3gWmSra:{isNullable:!0,type:f.String},DNXWNic2X:{isNullable:!0,type:f.String},eooBlV4ln:{isNullable:!0,type:f.String},G8soGBN07:{isNullable:!0,type:f.String},H5aZTngOU:{isNullable:!0,type:f.Boolean},hNvJS4vpM:{isNullable:!0,type:f.String},id:{isNullable:!1,type:f.String},IgCaikgCs:{definition:{isNullable:!0,type:f.String},isNullable:!0,type:f.Array},iJ8zA2SYy:{isNullable:!0,type:f.Boolean},Imh9a2yBn:{isNullable:!0,type:f.RichText},iSPatFmcD:{isNullable:!0,type:f.String},LHURZn747:{isNullable:!0,type:f.String},LultrdgEp:{isNullable:!0,type:f.Boolean},M_jLO6DGM:{isNullable:!0,type:f.Boolean},N4ZWWXM0W:{definition:{isNullable:!0,type:f.String},isNullable:!0,type:f.Array},nextItemId:{isNullable:!0,type:f.String},nokP7PwGM:{isNullable:!0,type:f.Link},previousItemId:{isNullable:!0,type:f.String},saRPSOi6I:{isNullable:!0,type:f.String},UFfC1gCBc:{isNullable:!0,type:f.Number},updatedAt:{isNullable:!0,type:f.Date},veL3lBajd:{isNullable:!0,type:f.String}},Y=new URL(`./Z4y3Ds18F-indexes-default-0.framercms`,`https://framerusercontent.com/modules/2OezPgSlsNbkHOOlR7IA/yLh9x8Cvq0sLBcEgMobs/Z4y3Ds18F.js`).href.replace(`/modules/`,`/cms/`),gt=[`id`],X={type:1},_t=[`previousItemId`],vt=[`nextItemId`],yt=[`id`,`veL3lBajd`],bt=[`veL3lBajd`,`id`],Z={type:0},xt=[`G8soGBN07`],St=[`eooBlV4ln`],Ct=[`DL3gWmSra`],wt=[`DNXWNic2X`],Tt=[`BtPycgcKR`],Et=[`iSPatFmcD`],Dt=[`BRar6a8iL`],Ot=[`cjJXJQicQ`],kt=[`saRPSOi6I`],At=[`Aa2TY5HtN`],jt=[`hNvJS4vpM`],Mt=[`N4ZWWXM0W`],Nt=[`IgCaikgCs`],Pt=[`nokP7PwGM`],Ft=[`LHURZn747`],It=[`M_jLO6DGM`],Lt=[`iJ8zA2SYy`],Rt=[`LultrdgEp`],zt=[`BWX0pZX3e`],Bt=[`UFfC1gCBc`],Vt=[`Imh9a2yBn`],Ht=[`veL3lBajd`],Ut=[`H5aZTngOU`],Wt=[],Gt=e=>{let t=Wt[e];if(t)return t().then(e=>e.default)},Kt=dt({}),Q=new ne,$={collectionByLocaleId:{default:new G({chunks:[new URL(`./Z4y3Ds18F-chunk-default-0.framercms`,`https://framerusercontent.com/modules/2OezPgSlsNbkHOOlR7IA/yLh9x8Cvq0sLBcEgMobs/Z4y3Ds18F.js`).href.replace(`/modules/`,`/cms/`)],id:`0c4285d2-b719-4fa8-b34a-3dc4cfc0e40edefault`,indexes:[new W({collation:X,collectionSchema:J,fieldNames:gt,range:{from:0,to:145},url:Y}),new W({collation:X,collectionSchema:J,fieldNames:_t,range:{from:145,to:289},url:Y}),new W({collation:X,collectionSchema:J,fieldNames:vt,range:{from:289,to:429},url:Y}),new W({collation:X,collectionSchema:J,fieldNames:yt,range:{from:429,to:665},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:bt,range:{from:665,to:901},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:xt,range:{from:901,to:1078},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:St,range:{from:1078,to:1242},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Ct,range:{from:1242,to:1433},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:wt,range:{from:1433,to:2069},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Tt,range:{from:2069,to:5645},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Et,range:{from:5645,to:6027},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Dt,range:{from:6027,to:6296},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Ot,range:{from:6296,to:6526},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:kt,range:{from:6526,to:6800},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:At,range:{from:6800,to:7086},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:jt,range:{from:7086,to:7382},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Mt,range:{from:7382,to:7563},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Nt,range:{from:7563,to:7744},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Pt,range:{from:7744,to:8145},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Ft,range:{from:8145,to:8427},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:It,range:{from:8427,to:8519},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Lt,range:{from:8519,to:8611},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Rt,range:{from:8611,to:8703},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:zt,range:{from:8703,to:9031},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Bt,range:{from:9031,to:9158},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Vt,range:{from:9158,to:12112},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Ht,range:{from:12112,to:12272},url:Y}),new W({collation:Z,collectionSchema:J,fieldNames:Ut,range:{from:12272,to:12364},url:Y})],resolveRichText:Kt,resolveVectorSetItem:Gt,schema:J})},displayName:`Plants`,id:`0c4285d2-b719-4fa8-b34a-3dc4cfc0e40e`},c($,{G8soGBN07:{defaultValue:``,title:`Common name`,type:f.String},eooBlV4ln:{defaultValue:``,title:`Verified Māori name`,type:f.String},DL3gWmSra:{defaultValue:``,title:`Botanical name`,type:f.String},DNXWNic2X:{defaultValue:``,title:`Short introduction`,type:f.String},BtPycgcKR:{title:`Plant photograph`,type:f.ResponsiveImage},iSPatFmcD:{defaultValue:``,title:`Image note`,type:f.String},BRar6a8iL:{defaultValue:``,title:`Light`,type:f.String},cjJXJQicQ:{defaultValue:``,title:`Mature height`,type:f.String},saRPSOi6I:{defaultValue:``,title:`Mature spread`,type:f.String},Aa2TY5HtN:{defaultValue:``,title:`Soil`,type:f.String},hNvJS4vpM:{defaultValue:``,title:`Moisture`,type:f.String},N4ZWWXM0W:{dataIdentifier:`local-module:collection/k2Sf4SFok:default`,title:`Categories`,type:f.MultiCollectionReference},IgCaikgCs:{dataIdentifier:`local-module:collection/yUkmfaABS:default`,title:`Browsing conditions`,type:f.MultiCollectionReference},nokP7PwGM:{title:`Species reference`,type:f.Link},LHURZn747:{defaultValue:`Sample profile · stock unconfirmed`,title:`Content status`,type:f.String},M_jLO6DGM:{defaultValue:!1,title:`Stock confirmed`,type:f.Boolean},iJ8zA2SYy:{defaultValue:!1,title:`Seasonal selection confirmed`,type:f.Boolean},LultrdgEp:{defaultValue:!1,title:`Feature on home`,type:f.Boolean},BWX0pZX3e:{defaultValue:``,title:`Search terms`,type:f.String},UFfC1gCBc:{defaultValue:0,title:`Display order`,type:f.Number},Imh9a2yBn:{defaultValue:``,title:`Plant notes`,type:f.RichText},veL3lBajd:{preventLocalization:!1,title:`Slug`,type:f.String},H5aZTngOU:{defaultValue:!1,title:`Photograph verified`,type:f.Boolean},createdAt:{title:`Created`,type:f.Date},updatedAt:{title:`Updated`,type:f.Date},previousItemId:{dataIdentifier:`local-module:collection/Z4y3Ds18F:default`,title:`Previous`,type:f.CollectionReference},nextItemId:{dataIdentifier:`local-module:collection/Z4y3Ds18F:default`,title:`Next`,type:f.CollectionReference}}),qt={},Jt={async getSlugByRecordId(e,t){let[n]=await Q.query({from:{data:$,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`veL3lBajd`,type:`Identifier`}],where:{left:{name:`id`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t);return n?.veL3lBajd},async getRecordIdBySlug(e,t){let[n]=await Q.query({from:{data:$,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`id`,type:`Identifier`}],where:{left:{name:`veL3lBajd`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t);return n?.id}},Yt={exports:{enumToDisplayNameFunctions:{type:`variable`,annotations:{framerContractVersion:`1`}},utils:{type:`variable`,annotations:{framerContractVersion:`1`}},default:{type:`data`,name:`data`,annotations:{framerEnumToDisplayNameUtils:`2`,framerCollectionId:`Z4y3Ds18F`,framerSlug:`veL3lBajd`,framerAutoSizeImages:`true`,framerContractVersion:`1`,framerRecordIdKey:`id`,framerColorSyntax:`false`,framerData:`true`,framerCollectionUtils:`1`}},__FramerMetadata__:{type:`variable`}}}})))()}export{Jt as a,Xt as i,Yt as n,qt as r,$ as t}; //# sourceMappingURL=Z4y3Ds18F.CB_y3613.mjs.map