@mappedin/mappedin-js 6.17.0 → 6.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/{GLTFExporter-WJIVKLX5.js → GLTFExporter-CXO2YAF3.js} +1 -1
- package/lib/esm/{GLTFLoader-UVI44S2F.js → GLTFLoader-I7TPEHSY.js} +1 -1
- package/lib/esm/{chunk-VBXAQAZN.js → chunk-43W5ISDI.js} +1 -1
- package/lib/esm/{chunk-QV35JDEX.js → chunk-72VREA6L.js} +1 -1
- package/lib/esm/{chunk-I6I3EXJN.js → chunk-PCYD3VDS.js} +1 -1
- package/lib/esm/{chunk-QYWRASNF.js → chunk-PUC4BMPX.js} +1 -1
- package/lib/esm/{chunk-DWA5ATYZ.js → chunk-RTTZ7LHQ.js} +1 -1
- package/lib/esm/index.d.ts +16 -16
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-47NR3USD.js → inspector-AQXLD4YL.js} +1 -1
- package/lib/esm/{internal-HBF7XZ6U.js → internal-7BZS3RBF.js} +1 -1
- package/lib/esm/{src-QBZJI5BR.js → src-YUNUBHAQ.js} +1 -1
- package/lib/esm/{text3d-I6QPYM5K.js → text3d-Z7SSD7IN.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Me,o as Ee,p as je,q as De,r as Re}from"./chunk-I6I3EXJN.js";import"./chunk-QV35JDEX.js";import{g as Le}from"./chunk-DWA5ATYZ.js";import"./chunk-VBXAQAZN.js";import{a as O}from"./chunk-QYWRASNF.js";import{a as y,b as $,e as Ct,g as Lt,h as G,i as ze,j as oe,k as Oe,l as Ce}from"./chunk-IGHVNMJ3.js";var It=Ct((V,L)=>{O();var Ut=200,st="__lodash_hash_undefined__",$t=800,Gt=16,rt=9007199254740991,ot="[object Arguments]",qt="[object Array]",Jt="[object AsyncFunction]",Ht="[object Boolean]",Kt="[object Date]",Qt="[object Error]",at="[object Function]",Yt="[object GeneratorFunction]",Zt="[object Map]",Xt="[object Number]",en="[object Null]",ct="[object Object]",tn="[object Proxy]",nn="[object RegExp]",sn="[object Set]",rn="[object String]",on="[object Undefined]",an="[object WeakMap]",cn="[object ArrayBuffer]",un="[object DataView]",ln="[object Float32Array]",dn="[object Float64Array]",hn="[object Int8Array]",fn="[object Int16Array]",pn="[object Int32Array]",gn="[object Uint8Array]",mn="[object Uint8ClampedArray]",_n="[object Uint16Array]",yn="[object Uint32Array]",bn=/[\\^$.*+?()[\]{}|]/g,wn=/^\[object .+?Constructor\]$/,Sn=/^(?:0|[1-9]\d*)$/,_={};_[ln]=_[dn]=_[hn]=_[fn]=_[pn]=_[gn]=_[mn]=_[_n]=_[yn]=!0;_[ot]=_[qt]=_[cn]=_[Ht]=_[un]=_[Kt]=_[Qt]=_[at]=_[Zt]=_[Xt]=_[ct]=_[nn]=_[sn]=_[rn]=_[an]=!1;var ut=typeof global=="object"&&global&&global.Object===Object&&global,vn=typeof self=="object"&&self&&self.Object===Object&&self,N=ut||vn||Function("return this")(),lt=typeof V=="object"&&V&&!V.nodeType&&V,P=lt&&typeof L=="object"&&L&&!L.nodeType&&L,dt=P&&P.exports===lt,me=dt&&ut.process,Ke=(function(){try{var t=P&&P.require&&P.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(e){}})(),Qe=Ke&&Ke.isTypedArray;function ht(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function xn(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function An(t){return function(e){return t(e)}}function In(t,e){return t==null?void 0:t[e]}function Tn(t,e){return function(n){return t(e(n))}}var Fn=Array.prototype,zn=Function.prototype,Y=Object.prototype,_e=N["__core-js_shared__"],Z=zn.toString,x=Y.hasOwnProperty,Ye=(function(){var t=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),ft=Y.toString,On=Z.call(Object),Cn=RegExp("^"+Z.call(x).replace(bn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=dt?N.Buffer:void 0,Ze=N.Symbol,Xe=N.Uint8Array,et=K?K.allocUnsafe:void 0,pt=Tn(Object.getPrototypeOf,Object),tt=Object.create,Ln=Y.propertyIsEnumerable,Mn=Fn.splice,F=Ze?Ze.toStringTag:void 0,Q=(function(){try{var t=Ae(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),En=K?K.isBuffer:void 0,nt=Math.max,jn=Date.now,gt=Ae(N,"Map"),B=Ae(Object,"create"),Dn=(function(){function t(){}return function(e){if(!v(e))return{};if(tt)return tt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function z(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Rn(){this.__data__=B?B(null):{},this.size=0}function Vn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Pn(t){var e=this.__data__;if(B){var n=e[t];return n===st?void 0:n}return x.call(e,t)?e[t]:void 0}function Bn(t){var e=this.__data__;return B?e[t]!==void 0:x.call(e,t)}function Nn(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=B&&e===void 0?st:e,this}z.prototype.clear=Rn;z.prototype.delete=Vn;z.prototype.get=Pn;z.prototype.has=Bn;z.prototype.set=Nn;function A(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function kn(){this.__data__=[],this.size=0}function Wn(t){var e=this.__data__,n=X(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Mn.call(e,n,1),--this.size,!0}function Un(t){var e=this.__data__,n=X(e,t);return n<0?void 0:e[n][1]}function $n(t){return X(this.__data__,t)>-1}function Gn(t,e){var n=this.__data__,i=X(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}A.prototype.clear=kn;A.prototype.delete=Wn;A.prototype.get=Un;A.prototype.has=$n;A.prototype.set=Gn;function M(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function qn(){this.size=0,this.__data__={hash:new z,map:new(gt||A),string:new z}}function Jn(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e}function Hn(t){return te(this,t).get(t)}function Kn(t){return te(this,t).has(t)}function Qn(t,e){var n=te(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}M.prototype.clear=qn;M.prototype.delete=Jn;M.prototype.get=Hn;M.prototype.has=Kn;M.prototype.set=Qn;function E(t){var e=this.__data__=new A(t);this.size=e.size}function Yn(){this.__data__=new A,this.size=0}function Zn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Xn(t){return this.__data__.get(t)}function ei(t){return this.__data__.has(t)}function ti(t,e){var n=this.__data__;if(n instanceof A){var i=n.__data__;if(!gt||i.length<Ut-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new M(i)}return n.set(t,e),this.size=n.size,this}E.prototype.clear=Yn;E.prototype.delete=Zn;E.prototype.get=Xn;E.prototype.has=ei;E.prototype.set=ti;function ni(t,e){var n=Se(t),i=!n&&we(t),s=!n&&!i&&wt(t),r=!n&&!i&&!s&&vt(t),a=n||i||s||r,o=a?xn(t.length,String):[],c=o.length;for(var u in t)(e||x.call(t,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yt(u,c)))&&o.push(u);return o}function ye(t,e,n){(n!==void 0&&!ne(t[e],n)||n===void 0&&!(e in t))&&ve(t,e,n)}function ii(t,e,n){var i=t[e];(!(x.call(t,e)&&ne(i,n))||n===void 0&&!(e in t))&&ve(t,e,n)}function X(t,e){for(var n=t.length;n--;)if(ne(t[n][0],e))return n;return-1}function ve(t,e,n){e=="__proto__"&&Q?Q(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var si=mi();function ee(t){return t==null?t===void 0?on:en:F&&F in Object(t)?_i(t):xi(t)}function it(t){return k(t)&&ee(t)==ot}function ri(t){if(!v(t)||Si(t))return!1;var e=Te(t)?Cn:wn;return e.test(Fi(t))}function oi(t){return k(t)&&St(t.length)&&!!_[ee(t)]}function ai(t){if(!v(t))return vi(t);var e=bt(t),n=[];for(var i in t)i=="constructor"&&(e||!x.call(t,i))||n.push(i);return n}function xe(t,e,n,i,s){t!==e&&si(e,function(r,a){if(s||(s=new E),v(r))ci(t,e,a,n,xe,i,s);else{var o=i?i(be(t,a),r,a+"",t,e,s):void 0;o===void 0&&(o=r),ye(t,a,o)}},xt)}function ci(t,e,n,i,s,r,a){var o=be(t,n),c=be(e,n),u=a.get(c);if(u){ye(t,n,u);return}var l=r?r(o,c,n+"",t,e,a):void 0,h=l===void 0;if(h){var d=Se(c),f=!d&&wt(c),g=!d&&!f&&vt(c);l=c,d||f||g?Se(o)?l=o:zi(o)?l=fi(o):f?(h=!1,l=li(c,!0)):g?(h=!1,l=hi(c,!0)):l=[]:Oi(c)||we(c)?(l=o,we(o)?l=Ci(o):(!v(o)||Te(o))&&(l=yi(c))):h=!1}h&&(a.set(c,l),s(l,c,i,r,a),a.delete(c)),ye(t,n,l)}function mt(t,e){return Ii(Ai(t,e,At),t+"")}var ui=Q?function(t,e){return Q(t,"toString",{configurable:!0,enumerable:!1,value:Ei(e),writable:!0})}:At;function li(t,e){if(e)return t.slice();var n=t.length,i=et?et(n):new t.constructor(n);return t.copy(i),i}function di(t){var e=new t.constructor(t.byteLength);return new Xe(e).set(new Xe(t)),e}function hi(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function fi(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function pi(t,e,n,i){var s=!n;n||(n={});for(var r=-1,a=e.length;++r<a;){var o=e[r],c=i?i(n[o],t[o],o,n,t):void 0;c===void 0&&(c=t[o]),s?ve(n,o,c):ii(n,o,c)}return n}function gi(t){return mt(function(e,n){var i=-1,s=n.length,r=s>1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(r=t.length>3&&typeof r=="function"?(s--,r):void 0,a&&bi(n[0],n[1],a)&&(r=s<3?void 0:r,s=1),e=Object(e);++i<s;){var o=n[i];o&&t(e,o,i,r)}return e})}function mi(t){return function(e,n,i){for(var s=-1,r=Object(e),a=i(e),o=a.length;o--;){var c=a[t?o:++s];if(n(r[c],c,r)===!1)break}return e}}function _t(t,e,n,i,s,r){return v(t)&&v(e)&&(r.set(e,t),xe(t,e,void 0,_t,r),r.delete(e)),t}function te(t,e){var n=t.__data__;return wi(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Ae(t,e){var n=In(t,e);return ri(n)?n:void 0}function _i(t){var e=x.call(t,F),n=t[F];try{t[F]=void 0;var i=!0}catch(r){}var s=ft.call(t);return i&&(e?t[F]=n:delete t[F]),s}function yi(t){return typeof t.constructor=="function"&&!bt(t)?Dn(pt(t)):{}}function yt(t,e){var n=typeof t;return e=e==null?rt:e,!!e&&(n=="number"||n!="symbol"&&Sn.test(t))&&t>-1&&t%1==0&&t<e}function bi(t,e,n){if(!v(n))return!1;var i=typeof e;return(i=="number"?Ie(n)&&yt(e,n.length):i=="string"&&e in n)?ne(n[e],t):!1}function wi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Si(t){return!!Ye&&Ye in t}function bt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Y;return t===n}function vi(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function xi(t){return ft.call(t)}function Ai(t,e,n){return e=nt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,r=nt(i.length-e,0),a=Array(r);++s<r;)a[s]=i[e+s];s=-1;for(var o=Array(e+1);++s<e;)o[s]=i[s];return o[e]=n(a),ht(t,this,o)}}function be(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ii=Ti(ui);function Ti(t){var e=0,n=0;return function(){var i=jn(),s=Gt-(i-n);if(n=i,s>0){if(++e>=$t)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Fi(t){if(t!=null){try{return Z.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ne(t,e){return t===e||t!==t&&e!==e}var we=it((function(){return arguments})())?it:function(t){return k(t)&&x.call(t,"callee")&&!Ln.call(t,"callee")},Se=Array.isArray;function Ie(t){return t!=null&&St(t.length)&&!Te(t)}function zi(t){return k(t)&&Ie(t)}var wt=En||ji;function Te(t){if(!v(t))return!1;var e=ee(t);return e==at||e==Yt||e==Jt||e==tn}function St(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rt}function v(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function k(t){return t!=null&&typeof t=="object"}function Oi(t){if(!k(t)||ee(t)!=ct)return!1;var e=pt(t);if(e===null)return!0;var n=x.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Z.call(n)==On}var vt=Qe?An(Qe):oi;function Ci(t){return pi(t,xt(t))}var Li=mt(function(t){return t.push(void 0,_t),ht(Mi,void 0,t)});function xt(t){return Ie(t)?ni(t,!0):ai(t)}var Mi=gi(function(t,e,n,i){xe(t,e,n,i)});function Ei(t){return function(){return t}}function At(t){return t}function ji(){return!1}L.exports=Li});O();O();var Mt="ENTRIES",We="KEYS",Ue="VALUES";var D=class{constructor(e,n){let i=e._tree,s=Array.from(i.keys());this.set=e,this._type=n,this._path=s.length>0?[{node:i,keys:s}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:n}=C(this._path);if(C(n)==="")return{done:!1,value:this.result()};let i=e.get(C(n));return this._path.push({node:i,keys:Array.from(i.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=C(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>C(e)).filter(e=>e!=="").join("")}value(){return C(this._path).node.get("")}result(){switch(this._type){case Ue:return this.value();case We:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},C=t=>t[t.length-1],Et=(t,e,n)=>{let i=new Map;if(e===void 0)return i;let s=e.length+1,r=s+n,a=new Uint8Array(r*s).fill(n+1);for(let o=0;o<s;++o)a[o]=o;for(let o=1;o<r;++o)a[o*s]=o;return $e(t,e,n,i,a,1,s,""),i},$e=(t,e,n,i,s,r,a,o)=>{let c=r*a;e:for(let u of t.keys())if(u===""){let l=s[c-1];l<=n&&i.set(o,[t.get(u),l])}else{let l=r;for(let h=0;h<u.length;++h,++l){let d=u[h],f=a*l,g=f-a,m=s[f],p=Math.max(0,l-n-1),w=Math.min(a-1,l+n);for(let S=p;S<w;++S){let se=d!==e[S],re=s[g+S]+ +se,U=s[g+S+1]+1,I=s[f+S]+1,j=s[f+S+1]=Math.min(re,U,I);j<m&&(m=j)}if(m>n)continue e}$e(t.get(u),e,n,i,s,l,a,o+u)}},R=class t{constructor(e=new Map,n=""){this._size=void 0,this._tree=e,this._prefix=n}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[n,i]=H(this._tree,e.slice(this._prefix.length));if(n===void 0){let[s,r]=pe(i);for(let a of s.keys())if(a!==""&&a.startsWith(r)){let o=new Map;return o.set(a.slice(r.length),s.get(a)),new t(o,e)}}return new t(n,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,jt(this._tree,e)}entries(){return new D(this,Mt)}forEach(e){for(let[n,i]of this)e(n,i,this)}fuzzyGet(e,n){return Et(this._tree,e,n)}get(e){let n=de(this._tree,e);return n!==void 0?n.get(""):void 0}has(e){let n=de(this._tree,e);return n!==void 0&&n.has("")}keys(){return new D(this,We)}set(e,n){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ae(this._tree,e).set("",n),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let i=ae(this._tree,e);return i.set("",n(i.get(""))),this}fetch(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let i=ae(this._tree,e),s=i.get("");return s===void 0&&i.set("",s=n()),s}values(){return new D(this,Ue)}[Symbol.iterator](){return this.entries()}static from(e){let n=new t;for(let[i,s]of e)n.set(i,s);return n}static fromObject(e){return t.from(Object.entries(e))}},H=(t,e,n=[])=>{if(e.length===0||t==null)return[t,n];for(let i of t.keys())if(i!==""&&e.startsWith(i))return n.push([t,i]),H(t.get(i),e.slice(i.length),n);return n.push([t,e]),H(void 0,"",n)},de=(t,e)=>{if(e.length===0||t==null)return t;for(let n of t.keys())if(n!==""&&e.startsWith(n))return de(t.get(n),e.slice(n.length))},ae=(t,e)=>{let n=e.length;e:for(let i=0;t&&i<n;){for(let r of t.keys())if(r!==""&&e[i]===r[0]){let a=Math.min(n-i,r.length),o=1;for(;o<a&&e[i+o]===r[o];)++o;let c=t.get(r);if(o===r.length)t=c;else{let u=new Map;u.set(r.slice(o),c),t.set(e.slice(i,i+o),u),t.delete(r),t=u}i+=o;continue e}let s=new Map;return t.set(e.slice(i),s),s}return t},jt=(t,e)=>{let[n,i]=H(t,e);if(n!==void 0){if(n.delete(""),n.size===0)Ge(i);else if(n.size===1){let[s,r]=n.entries().next().value;qe(i,s,r)}}},Ge=t=>{if(t.length===0)return;let[e,n]=pe(t);if(e.delete(n),e.size===0)Ge(t.slice(0,-1));else if(e.size===1){let[i,s]=e.entries().next().value;i!==""&&qe(t.slice(0,-1),i,s)}},qe=(t,e,n)=>{if(t.length===0)return;let[i,s]=pe(t);i.set(s+e,n),i.delete(s)},pe=t=>t[t.length-1],ge="or",Je="and",Dt="and_not",T=class t{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let n=e.autoVacuum==null||e.autoVacuum===!0?le:e.autoVacuum;this._options=$(y(y({},ue),e),{autoVacuum:n,searchOptions:y(y({},Ve),e.searchOptions||{}),autoSuggestOptions:y(y({},Nt),e.autoSuggestOptions||{})}),this._index=new R,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=fe,this.addFields(this._options.fields)}add(e){let{extractField:n,stringifyField:i,tokenize:s,processTerm:r,fields:a,idField:o}=this._options,c=n(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let u=this.addDocumentId(c);this.saveStoredFields(u,e);for(let l of a){let h=n(e,l);if(h==null)continue;let d=s(i(h,l),l),f=this._fieldIds[l],g=new Set(d).size;this.addFieldLength(u,f,this._documentCount-1,g);for(let m of d){let p=r(m,l);if(Array.isArray(p))for(let w of p)this.addTerm(f,u,w);else p&&this.addTerm(f,u,p)}}}addAll(e){for(let n of e)this.add(n)}addAllAsync(e,n={}){let{chunkSize:i=10}=n,s={chunk:[],promise:Promise.resolve()},{chunk:r,promise:a}=e.reduce(({chunk:o,promise:c},u,l)=>(o.push(u),(l+1)%i===0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(o))}:{chunk:o,promise:c}),s);return a.then(()=>this.addAll(r))}remove(e){let{tokenize:n,processTerm:i,extractField:s,stringifyField:r,fields:a,idField:o}=this._options,c=s(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));let u=this._idToShortId.get(c);if(u==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let l of a){let h=s(e,l);if(h==null)continue;let d=n(r(h,l),l),f=this._fieldIds[l],g=new Set(d).size;this.removeFieldLength(u,f,this._documentCount,g);for(let m of d){let p=i(m,l);if(Array.isArray(p))for(let w of p)this.removeTerm(f,u,w);else p&&this.removeTerm(f,u,p)}}this._storedFields.delete(u),this._documentIds.delete(u),this._idToShortId.delete(c),this._fieldLength.delete(u),this._documentCount-=1}removeAll(e){if(e)for(let n of e)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new R,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let n=this._idToShortId.get(e);if(n==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((i,s)=>{this.removeFieldLength(n,s,this._documentCount,i)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:n,batchSize:i,batchWait:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:i,batchWait:s},{minDirtCount:n,minDirtFactor:e})}discardAll(e){let n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let i of e)this.discard(i)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(e){let{idField:n,extractField:i}=this._options,s=i(e,n);this.discard(s),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let i=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=fe,this.performVacuuming(e,i)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,n){let i=this._dirtCount;if(this.vacuumConditionsMet(n)){let s=e.batchSize||he.batchSize,r=e.batchWait||he.batchWait,a=1;for(let[o,c]of this._index){for(let[u,l]of c)for(let[h]of l)this._documentIds.has(h)||(l.size<=1?c.delete(u):l.delete(h));this._index.get(o).size===0&&this._index.delete(o),a%s===0&&await new Promise(u=>setTimeout(u,r)),a+=1}this._dirtCount-=i}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:n,minDirtFactor:i}=e;return n=n||le.minDirtCount,i=i||le.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=i}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let n=this._idToShortId.get(e);if(n!=null)return this._storedFields.get(n)}search(e,n={}){let{searchOptions:i}=this._options,s=y(y({},i),n),r=this.executeQuery(e,n),a=[];for(let[o,{score:c,terms:u,match:l}]of r){let h=u.length||1,d={id:this._documentIds.get(o),score:c*h,terms:Object.keys(l),queryTerms:u,match:l};Object.assign(d,this._storedFields.get(o)),(s.filter==null||s.filter(d))&&a.push(d)}return e===t.wildcard&&s.boostDocument==null||a.sort(Be),a}autoSuggest(e,n={}){n=y(y({},this._options.autoSuggestOptions),n);let i=new Map;for(let{score:r,terms:a}of this.search(e,n)){let o=a.join(" "),c=i.get(o);c!=null?(c.score+=r,c.count+=1):i.set(o,{score:r,terms:a,count:1})}let s=[];for(let[r,{score:a,terms:o,count:c}]of i)s.push({suggestion:r,terms:o,score:a/c});return s.sort(Be),s}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),n)}static async loadJSONAsync(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),n)}static getDefault(e){if(ue.hasOwnProperty(e))return ce(ue,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,n){let{index:i,documentIds:s,fieldLength:r,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=q(s),c._fieldLength=q(r),c._storedFields=q(a);for(let[u,l]of c._documentIds)c._idToShortId.set(l,u);for(let[u,l]of i){let h=new Map;for(let d of Object.keys(l)){let f=l[d];o===1&&(f=f.ds),h.set(parseInt(d,10),q(f))}c._index.set(u,h)}return c}static async loadJSAsync(e,n){let{index:i,documentIds:s,fieldLength:r,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=await J(s),c._fieldLength=await J(r),c._storedFields=await J(a);for(let[l,h]of c._documentIds)c._idToShortId.set(h,l);let u=0;for(let[l,h]of i){let d=new Map;for(let f of Object.keys(h)){let g=h[f];o===1&&(g=g.ds),d.set(parseInt(f,10),await J(g))}++u%1e3===0&&await He(0),c._index.set(l,d)}return c}static instantiateMiniSearch(e,n){let{documentCount:i,nextId:s,fieldIds:r,averageFieldLength:a,dirtCount:o,serializationVersion:c}=e;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let u=new t(n);return u._documentCount=i,u._nextId=s,u._idToShortId=new Map,u._fieldIds=r,u._avgFieldLength=a,u._dirtCount=o||0,u._index=new R,u}executeQuery(e,n={}){if(e===t.wildcard)return this.executeWildcardQuery(n);if(typeof e!="string"){let d=$(y(y({},n),e),{queries:void 0}),f=e.queries.map(g=>this.executeQuery(g,d));return this.combineResults(f,d.combineWith)}let{tokenize:i,processTerm:s,searchOptions:r}=this._options,a=y(y({tokenize:i,processTerm:s},r),n),{tokenize:o,processTerm:c}=a,h=o(e).flatMap(d=>c(d)).filter(d=>!!d).map(Bt(a)).map(d=>this.executeQuerySpec(d,a));return this.combineResults(h,a.combineWith)}executeQuerySpec(e,n){let i=y(y({},this._options.searchOptions),n),s=(i.fields||this._options.fields).reduce((m,p)=>$(y({},m),{[p]:ce(i.boost,p)||1}),{}),{boostDocument:r,weights:a,maxFuzzy:o,bm25:c}=i,{fuzzy:u,prefix:l}=y(y({},Ve.weights),a),h=this._index.get(e.term),d=this.termResults(e.term,e.term,1,e.termBoost,h,s,r,c),f,g;if(e.prefix&&(f=this._index.atPrefix(e.term)),e.fuzzy){let m=e.fuzzy===!0?.2:e.fuzzy,p=m<1?Math.min(o,Math.round(e.term.length*m)):m;p&&(g=this._index.fuzzyGet(e.term,p))}if(f)for(let[m,p]of f){let w=m.length-e.term.length;if(!w)continue;g==null||g.delete(m);let S=l*m.length/(m.length+.3*w);this.termResults(e.term,m,S,e.termBoost,p,s,r,c,d)}if(g)for(let m of g.keys()){let[p,w]=g.get(m);if(!w)continue;let S=u*m.length/(m.length+w);this.termResults(e.term,m,S,e.termBoost,p,s,r,c,d)}return d}executeWildcardQuery(e){let n=new Map,i=y(y({},this._options.searchOptions),e);for(let[s,r]of this._documentIds){let a=i.boostDocument?i.boostDocument(r,"",this._storedFields.get(s)):1;n.set(s,{score:a,terms:[],match:{}})}return n}combineResults(e,n=ge){if(e.length===0)return new Map;let i=n.toLowerCase(),s=Rt[i];if(!s)throw new Error("Invalid combination operator: ".concat(n));return e.reduce(s)||new Map}toJSON(){let e=[];for(let[n,i]of this._index){let s={};for(let[r,a]of i)s[r]=Object.fromEntries(a);e.push([n,s])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,n,i,s,r,a,o,c,u=new Map){if(r==null)return u;for(let l of Object.keys(a)){let h=a[l],d=this._fieldIds[l],f=r.get(d);if(f==null)continue;let g=f.size,m=this._avgFieldLength[d];for(let p of f.keys()){if(!this._documentIds.has(p)){this.removeTerm(d,p,n),g-=1;continue}let w=o?o(this._documentIds.get(p),n,this._storedFields.get(p)):1;if(!w)continue;let S=f.get(p),se=this._fieldLength.get(p)[d],re=Pt(S,g,this._documentCount,se,m,c),U=i*s*h*w*re,I=u.get(p);if(I){I.score+=U,kt(I.terms,e);let j=ce(I.match,n);j?j.push(l):I.match[n]=[l]}else u.set(p,{score:U,terms:[e],match:{[n]:[l]}})}}return u}addTerm(e,n,i){let s=this._index.fetch(i,Ne),r=s.get(e);if(r==null)r=new Map,r.set(n,1),s.set(e,r);else{let a=r.get(n);r.set(n,(a||0)+1)}}removeTerm(e,n,i){if(!this._index.has(i)){this.warnDocumentChanged(n,e,i);return}let s=this._index.fetch(i,Ne),r=s.get(e);r==null||r.get(n)==null?this.warnDocumentChanged(n,e,i):r.get(n)<=1?r.size<=1?s.delete(e):r.delete(n):r.set(n,r.get(n)-1),this._index.get(i).size===0&&this._index.delete(i)}warnDocumentChanged(e,n,i){for(let s of Object.keys(this._fieldIds))if(this._fieldIds[s]===n){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(i,'" was not present in field "').concat(s,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let n=this._nextId;return this._idToShortId.set(e,n),this._documentIds.set(n,e),this._documentCount+=1,this._nextId+=1,n}addFields(e){for(let n=0;n<e.length;n++)this._fieldIds[e[n]]=n}addFieldLength(e,n,i,s){let r=this._fieldLength.get(e);r==null&&this._fieldLength.set(e,r=[]),r[n]=s;let o=(this._avgFieldLength[n]||0)*i+s;this._avgFieldLength[n]=o/(i+1)}removeFieldLength(e,n,i,s){if(i===1){this._avgFieldLength[n]=0;return}let r=this._avgFieldLength[n]*i-s;this._avgFieldLength[n]=r/(i-1)}saveStoredFields(e,n){let{storeFields:i,extractField:s}=this._options;if(i==null||i.length===0)return;let r=this._storedFields.get(e);r==null&&this._storedFields.set(e,r={});for(let a of i){let o=s(n,a);o!==void 0&&(r[a]=o)}}};T.wildcard=Symbol("*");var ce=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0,Rt={[ge]:(t,e)=>{for(let n of e.keys()){let i=t.get(n);if(i==null)t.set(n,e.get(n));else{let{score:s,terms:r,match:a}=e.get(n);i.score=i.score+s,i.match=Object.assign(i.match,a),Pe(i.terms,r)}}return t},[Je]:(t,e)=>{let n=new Map;for(let i of e.keys()){let s=t.get(i);if(s==null)continue;let{score:r,terms:a,match:o}=e.get(i);Pe(s.terms,a),n.set(i,{score:s.score+r,terms:s.terms,match:Object.assign(s.match,o)})}return n},[Dt]:(t,e)=>{for(let n of e.keys())t.delete(n);return t}},Vt={k:1.2,b:.7,d:.5},Pt=(t,e,n,i,s,r)=>{let{k:a,b:o,d:c}=r;return Math.log(1+(n-e+.5)/(e+.5))*(c+t*(a+1)/(t+a*(1-o+o*i/s)))},Bt=t=>(e,n,i)=>{let s=typeof t.fuzzy=="function"?t.fuzzy(e,n,i):t.fuzzy||!1,r=typeof t.prefix=="function"?t.prefix(e,n,i):t.prefix===!0,a=typeof t.boostTerm=="function"?t.boostTerm(e,n,i):1;return{term:e,fuzzy:s,prefix:r,termBoost:a}},ue={idField:"id",extractField:(t,e)=>t[e],stringifyField:(t,e)=>t.toString(),tokenize:t=>t.split(Wt),processTerm:t=>t.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(t,e)=>{typeof(console==null?void 0:console[t])=="function"&&console[t](e)},autoVacuum:!0},Ve={combineWith:ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Vt},Nt={combineWith:Je,prefix:(t,e,n)=>e===n.length-1},he={batchSize:1e3,batchWait:10},fe={minDirtFactor:.1,minDirtCount:20},le=y(y({},he),fe),kt=(t,e)=>{t.includes(e)||t.push(e)},Pe=(t,e)=>{for(let n of e)t.includes(n)||t.push(n)},Be=({score:t},{score:e})=>e-t,Ne=()=>new Map,q=t=>{let e=new Map;for(let n of Object.keys(t))e.set(parseInt(n,10),t[n]);return e},J=async t=>{let e=new Map,n=0;for(let i of Object.keys(t))e.set(parseInt(i,10),t[i]),++n%1e3===0&&await He(0);return e},He=t=>new Promise(e=>setTimeout(e,t)),Wt=new RegExp("[\\n\\r\\p{Z}\\p{P}]+","u");var zt=Lt(It(),1);import{z as b}from"zod";var W,ie,Ot,Tt=class{constructor(e){oe(this,ie);G(this,"mapData");G(this,"indexes");G(this,"ready");oe(this,W);this.mapData=e,this.indexes=Vi(e),this.ready=this.populate(),Oe(this,W,Le(Ce(this,ie,Ot).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:n,enterpriseCategories:i}=this.indexes,s=this.mapData,r=[];return e.removeAll(),r=r.concat([e.addAllAsync(s.getByType("space")),e.addAllAsync(s.getByType("point-of-interest")),e.addAllAsync(s.getByType("object")),e.addAllAsync(s.getByType("connection")),e.addAllAsync(s.getByType("floor")),e.addAllAsync(s.getByType("door")),e.addAllAsync(s.getByType("annotation")),e.addAllAsync(s.getByType("area"))]),n&&(n==null||n.removeAll(),r.push(n.addAllAsync(s.getByType("enterprise-location")))),i&&(i==null||i.removeAll(),r.push(i.addAllAsync(s.getByType("enterprise-category")))),Promise.all(r)}async search(e,n={}){var c,u;await this.ready,Pi.parse(n);let i=(0,zt.default)({},n,Ri),s=this.indexes.places.search(e,{fields:Object.keys(i.places.fields).filter(l=>i.places.fields[l])});i.places.limit&&(s=s.slice(0,i.places.limit));let r=(c=this.indexes.enterpriseLocations)==null?void 0:c.search(e,{fields:Object.keys(i.enterpriseLocations.fields).filter(l=>i.enterpriseLocations.fields[l])});r&&i.enterpriseLocations.limit&&(r=r.slice(0,i.enterpriseLocations.limit));let a=(u=this.indexes.enterpriseCategories)==null?void 0:u.search(e,{fields:Object.keys(i.enterpriseCategories.fields).filter(l=>i.enterpriseCategories.fields[l])});a&&i.enterpriseCategories.limit&&(a=a.slice(0,i.enterpriseCategories.limit));let o=Di(this.mapData,{placesResult:s,locationsResult:r,categoriesResult:a});return ze(this,W).call(this,e),o}async suggest(e,n={}){await this.ready,Bi.parse(n);let i=[],{places:{enabled:s=!0}={},enterpriseLocations:{enabled:r=!0}={}}=n;r&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(c=>i.push(c)),s&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(c=>i.push(c));let a=new Map;i.forEach(c=>{let u=a.get(c.suggestion);(!u||c.score>u.score)&&a.set(c.suggestion,c)});let o=Array.from(a.values());return o.sort((c,u)=>u.score-c.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:o.map(c=>c.suggestion)}),o}};W=new WeakMap,ie=new WeakSet,Ot=function(e){this.mapData.Analytics.capture("$query-search",{query:e})};function Di(t,{placesResult:e,locationsResult:n,categoriesResult:i}){let s=e.reduce((o,{id:c,match:u,score:l,__type:h})=>{let d=t.getById(h,c);return d!=null&&!Me.is(d)&&!Ee.is(d)&&!je.is(d)&&!De.is(d)&&!Re.is(d)&&o.push({type:d.__type,match:u,score:l,item:d}),o},[]),r;if(n){r=[];for(let{id:o,match:c,score:u}of n){let l=t.getById("enterprise-location",o);l&&r.push({type:l.__type,match:c,score:u,item:l})}}let a;if(i){a=[];for(let{id:o,match:c,score:u}of i){let l=t.getById("enterprise-category",o);l&&a.push({type:l.__type,match:c,score:u,item:l})}}return{places:s,enterpriseLocations:r,enterpriseCategories:a}}var Ri={places:{fields:{name:!0,description:!0}},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0}},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0}}};function Fe(t){return t.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}function Vi(t){let e=new T({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(a,o)=>{let c=a[o];return typeof c=="string"?Fe(c):a[o]},processTerm:a=>Ni.has(a)?"":a.toLowerCase()}),n=t.getByType("enterprise-location"),i;n&&(i=new T({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(a,o)=>Array.isArray(a[o])?a[o].join(" "):typeof a[o]=="string"?Fe(a[o]):a[o]}));let s=t.getByType("enterprise-category"),r;return s&&(r=new T({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(a,o){return o==="locations.name"?a.locations.reduce((u,l)=>u+" ".concat(Ft," ")+l.name,"")+" ".concat(Ft):typeof a[o]=="string"?Fe(a[o]):a[o]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:r,enterpriseLocations:i,places:e}}var Pi=b.object({places:b.object({fields:b.object({name:b.boolean().optional(),description:b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional(),enterpriseCategories:b.object({fields:b.object({name:b.boolean().optional(),description:b.boolean().optional(),"locations.name":b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional(),enterpriseLocations:b.object({fields:b.object({name:b.boolean().optional(),tags:b.boolean().optional(),description:b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional()}),Bi=b.object({places:b.object({enabled:b.boolean().optional()}).optional(),enterpriseLocations:b.object({enabled:b.boolean().optional()}).optional()}),Ni=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),Ft="";export{Tt as InternalSearch,Fe as removeAccents};
|
|
1
|
+
import{b as Me,o as Ee,p as je,q as De,r as Re}from"./chunk-PCYD3VDS.js";import"./chunk-72VREA6L.js";import{g as Le}from"./chunk-RTTZ7LHQ.js";import"./chunk-43W5ISDI.js";import{a as O}from"./chunk-PUC4BMPX.js";import{a as y,b as $,e as Ct,g as Lt,h as G,i as ze,j as oe,k as Oe,l as Ce}from"./chunk-IGHVNMJ3.js";var It=Ct((V,L)=>{O();var Ut=200,st="__lodash_hash_undefined__",$t=800,Gt=16,rt=9007199254740991,ot="[object Arguments]",qt="[object Array]",Jt="[object AsyncFunction]",Ht="[object Boolean]",Kt="[object Date]",Qt="[object Error]",at="[object Function]",Yt="[object GeneratorFunction]",Zt="[object Map]",Xt="[object Number]",en="[object Null]",ct="[object Object]",tn="[object Proxy]",nn="[object RegExp]",sn="[object Set]",rn="[object String]",on="[object Undefined]",an="[object WeakMap]",cn="[object ArrayBuffer]",un="[object DataView]",ln="[object Float32Array]",dn="[object Float64Array]",hn="[object Int8Array]",fn="[object Int16Array]",pn="[object Int32Array]",gn="[object Uint8Array]",mn="[object Uint8ClampedArray]",_n="[object Uint16Array]",yn="[object Uint32Array]",bn=/[\\^$.*+?()[\]{}|]/g,wn=/^\[object .+?Constructor\]$/,Sn=/^(?:0|[1-9]\d*)$/,_={};_[ln]=_[dn]=_[hn]=_[fn]=_[pn]=_[gn]=_[mn]=_[_n]=_[yn]=!0;_[ot]=_[qt]=_[cn]=_[Ht]=_[un]=_[Kt]=_[Qt]=_[at]=_[Zt]=_[Xt]=_[ct]=_[nn]=_[sn]=_[rn]=_[an]=!1;var ut=typeof global=="object"&&global&&global.Object===Object&&global,vn=typeof self=="object"&&self&&self.Object===Object&&self,N=ut||vn||Function("return this")(),lt=typeof V=="object"&&V&&!V.nodeType&&V,P=lt&&typeof L=="object"&&L&&!L.nodeType&&L,dt=P&&P.exports===lt,me=dt&&ut.process,Ke=(function(){try{var t=P&&P.require&&P.require("util").types;return t||me&&me.binding&&me.binding("util")}catch(e){}})(),Qe=Ke&&Ke.isTypedArray;function ht(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function xn(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function An(t){return function(e){return t(e)}}function In(t,e){return t==null?void 0:t[e]}function Tn(t,e){return function(n){return t(e(n))}}var Fn=Array.prototype,zn=Function.prototype,Y=Object.prototype,_e=N["__core-js_shared__"],Z=zn.toString,x=Y.hasOwnProperty,Ye=(function(){var t=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),ft=Y.toString,On=Z.call(Object),Cn=RegExp("^"+Z.call(x).replace(bn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=dt?N.Buffer:void 0,Ze=N.Symbol,Xe=N.Uint8Array,et=K?K.allocUnsafe:void 0,pt=Tn(Object.getPrototypeOf,Object),tt=Object.create,Ln=Y.propertyIsEnumerable,Mn=Fn.splice,F=Ze?Ze.toStringTag:void 0,Q=(function(){try{var t=Ae(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),En=K?K.isBuffer:void 0,nt=Math.max,jn=Date.now,gt=Ae(N,"Map"),B=Ae(Object,"create"),Dn=(function(){function t(){}return function(e){if(!v(e))return{};if(tt)return tt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function z(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Rn(){this.__data__=B?B(null):{},this.size=0}function Vn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Pn(t){var e=this.__data__;if(B){var n=e[t];return n===st?void 0:n}return x.call(e,t)?e[t]:void 0}function Bn(t){var e=this.__data__;return B?e[t]!==void 0:x.call(e,t)}function Nn(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=B&&e===void 0?st:e,this}z.prototype.clear=Rn;z.prototype.delete=Vn;z.prototype.get=Pn;z.prototype.has=Bn;z.prototype.set=Nn;function A(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function kn(){this.__data__=[],this.size=0}function Wn(t){var e=this.__data__,n=X(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Mn.call(e,n,1),--this.size,!0}function Un(t){var e=this.__data__,n=X(e,t);return n<0?void 0:e[n][1]}function $n(t){return X(this.__data__,t)>-1}function Gn(t,e){var n=this.__data__,i=X(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}A.prototype.clear=kn;A.prototype.delete=Wn;A.prototype.get=Un;A.prototype.has=$n;A.prototype.set=Gn;function M(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function qn(){this.size=0,this.__data__={hash:new z,map:new(gt||A),string:new z}}function Jn(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e}function Hn(t){return te(this,t).get(t)}function Kn(t){return te(this,t).has(t)}function Qn(t,e){var n=te(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}M.prototype.clear=qn;M.prototype.delete=Jn;M.prototype.get=Hn;M.prototype.has=Kn;M.prototype.set=Qn;function E(t){var e=this.__data__=new A(t);this.size=e.size}function Yn(){this.__data__=new A,this.size=0}function Zn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Xn(t){return this.__data__.get(t)}function ei(t){return this.__data__.has(t)}function ti(t,e){var n=this.__data__;if(n instanceof A){var i=n.__data__;if(!gt||i.length<Ut-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new M(i)}return n.set(t,e),this.size=n.size,this}E.prototype.clear=Yn;E.prototype.delete=Zn;E.prototype.get=Xn;E.prototype.has=ei;E.prototype.set=ti;function ni(t,e){var n=Se(t),i=!n&&we(t),s=!n&&!i&&wt(t),r=!n&&!i&&!s&&vt(t),a=n||i||s||r,o=a?xn(t.length,String):[],c=o.length;for(var u in t)(e||x.call(t,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yt(u,c)))&&o.push(u);return o}function ye(t,e,n){(n!==void 0&&!ne(t[e],n)||n===void 0&&!(e in t))&&ve(t,e,n)}function ii(t,e,n){var i=t[e];(!(x.call(t,e)&&ne(i,n))||n===void 0&&!(e in t))&&ve(t,e,n)}function X(t,e){for(var n=t.length;n--;)if(ne(t[n][0],e))return n;return-1}function ve(t,e,n){e=="__proto__"&&Q?Q(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var si=mi();function ee(t){return t==null?t===void 0?on:en:F&&F in Object(t)?_i(t):xi(t)}function it(t){return k(t)&&ee(t)==ot}function ri(t){if(!v(t)||Si(t))return!1;var e=Te(t)?Cn:wn;return e.test(Fi(t))}function oi(t){return k(t)&&St(t.length)&&!!_[ee(t)]}function ai(t){if(!v(t))return vi(t);var e=bt(t),n=[];for(var i in t)i=="constructor"&&(e||!x.call(t,i))||n.push(i);return n}function xe(t,e,n,i,s){t!==e&&si(e,function(r,a){if(s||(s=new E),v(r))ci(t,e,a,n,xe,i,s);else{var o=i?i(be(t,a),r,a+"",t,e,s):void 0;o===void 0&&(o=r),ye(t,a,o)}},xt)}function ci(t,e,n,i,s,r,a){var o=be(t,n),c=be(e,n),u=a.get(c);if(u){ye(t,n,u);return}var l=r?r(o,c,n+"",t,e,a):void 0,h=l===void 0;if(h){var d=Se(c),f=!d&&wt(c),g=!d&&!f&&vt(c);l=c,d||f||g?Se(o)?l=o:zi(o)?l=fi(o):f?(h=!1,l=li(c,!0)):g?(h=!1,l=hi(c,!0)):l=[]:Oi(c)||we(c)?(l=o,we(o)?l=Ci(o):(!v(o)||Te(o))&&(l=yi(c))):h=!1}h&&(a.set(c,l),s(l,c,i,r,a),a.delete(c)),ye(t,n,l)}function mt(t,e){return Ii(Ai(t,e,At),t+"")}var ui=Q?function(t,e){return Q(t,"toString",{configurable:!0,enumerable:!1,value:Ei(e),writable:!0})}:At;function li(t,e){if(e)return t.slice();var n=t.length,i=et?et(n):new t.constructor(n);return t.copy(i),i}function di(t){var e=new t.constructor(t.byteLength);return new Xe(e).set(new Xe(t)),e}function hi(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function fi(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function pi(t,e,n,i){var s=!n;n||(n={});for(var r=-1,a=e.length;++r<a;){var o=e[r],c=i?i(n[o],t[o],o,n,t):void 0;c===void 0&&(c=t[o]),s?ve(n,o,c):ii(n,o,c)}return n}function gi(t){return mt(function(e,n){var i=-1,s=n.length,r=s>1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(r=t.length>3&&typeof r=="function"?(s--,r):void 0,a&&bi(n[0],n[1],a)&&(r=s<3?void 0:r,s=1),e=Object(e);++i<s;){var o=n[i];o&&t(e,o,i,r)}return e})}function mi(t){return function(e,n,i){for(var s=-1,r=Object(e),a=i(e),o=a.length;o--;){var c=a[t?o:++s];if(n(r[c],c,r)===!1)break}return e}}function _t(t,e,n,i,s,r){return v(t)&&v(e)&&(r.set(e,t),xe(t,e,void 0,_t,r),r.delete(e)),t}function te(t,e){var n=t.__data__;return wi(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Ae(t,e){var n=In(t,e);return ri(n)?n:void 0}function _i(t){var e=x.call(t,F),n=t[F];try{t[F]=void 0;var i=!0}catch(r){}var s=ft.call(t);return i&&(e?t[F]=n:delete t[F]),s}function yi(t){return typeof t.constructor=="function"&&!bt(t)?Dn(pt(t)):{}}function yt(t,e){var n=typeof t;return e=e==null?rt:e,!!e&&(n=="number"||n!="symbol"&&Sn.test(t))&&t>-1&&t%1==0&&t<e}function bi(t,e,n){if(!v(n))return!1;var i=typeof e;return(i=="number"?Ie(n)&&yt(e,n.length):i=="string"&&e in n)?ne(n[e],t):!1}function wi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Si(t){return!!Ye&&Ye in t}function bt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Y;return t===n}function vi(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function xi(t){return ft.call(t)}function Ai(t,e,n){return e=nt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,r=nt(i.length-e,0),a=Array(r);++s<r;)a[s]=i[e+s];s=-1;for(var o=Array(e+1);++s<e;)o[s]=i[s];return o[e]=n(a),ht(t,this,o)}}function be(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ii=Ti(ui);function Ti(t){var e=0,n=0;return function(){var i=jn(),s=Gt-(i-n);if(n=i,s>0){if(++e>=$t)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Fi(t){if(t!=null){try{return Z.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ne(t,e){return t===e||t!==t&&e!==e}var we=it((function(){return arguments})())?it:function(t){return k(t)&&x.call(t,"callee")&&!Ln.call(t,"callee")},Se=Array.isArray;function Ie(t){return t!=null&&St(t.length)&&!Te(t)}function zi(t){return k(t)&&Ie(t)}var wt=En||ji;function Te(t){if(!v(t))return!1;var e=ee(t);return e==at||e==Yt||e==Jt||e==tn}function St(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rt}function v(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function k(t){return t!=null&&typeof t=="object"}function Oi(t){if(!k(t)||ee(t)!=ct)return!1;var e=pt(t);if(e===null)return!0;var n=x.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Z.call(n)==On}var vt=Qe?An(Qe):oi;function Ci(t){return pi(t,xt(t))}var Li=mt(function(t){return t.push(void 0,_t),ht(Mi,void 0,t)});function xt(t){return Ie(t)?ni(t,!0):ai(t)}var Mi=gi(function(t,e,n,i){xe(t,e,n,i)});function Ei(t){return function(){return t}}function At(t){return t}function ji(){return!1}L.exports=Li});O();O();var Mt="ENTRIES",We="KEYS",Ue="VALUES";var D=class{constructor(e,n){let i=e._tree,s=Array.from(i.keys());this.set=e,this._type=n,this._path=s.length>0?[{node:i,keys:s}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:n}=C(this._path);if(C(n)==="")return{done:!1,value:this.result()};let i=e.get(C(n));return this._path.push({node:i,keys:Array.from(i.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=C(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>C(e)).filter(e=>e!=="").join("")}value(){return C(this._path).node.get("")}result(){switch(this._type){case Ue:return this.value();case We:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},C=t=>t[t.length-1],Et=(t,e,n)=>{let i=new Map;if(e===void 0)return i;let s=e.length+1,r=s+n,a=new Uint8Array(r*s).fill(n+1);for(let o=0;o<s;++o)a[o]=o;for(let o=1;o<r;++o)a[o*s]=o;return $e(t,e,n,i,a,1,s,""),i},$e=(t,e,n,i,s,r,a,o)=>{let c=r*a;e:for(let u of t.keys())if(u===""){let l=s[c-1];l<=n&&i.set(o,[t.get(u),l])}else{let l=r;for(let h=0;h<u.length;++h,++l){let d=u[h],f=a*l,g=f-a,m=s[f],p=Math.max(0,l-n-1),w=Math.min(a-1,l+n);for(let S=p;S<w;++S){let se=d!==e[S],re=s[g+S]+ +se,U=s[g+S+1]+1,I=s[f+S]+1,j=s[f+S+1]=Math.min(re,U,I);j<m&&(m=j)}if(m>n)continue e}$e(t.get(u),e,n,i,s,l,a,o+u)}},R=class t{constructor(e=new Map,n=""){this._size=void 0,this._tree=e,this._prefix=n}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[n,i]=H(this._tree,e.slice(this._prefix.length));if(n===void 0){let[s,r]=pe(i);for(let a of s.keys())if(a!==""&&a.startsWith(r)){let o=new Map;return o.set(a.slice(r.length),s.get(a)),new t(o,e)}}return new t(n,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,jt(this._tree,e)}entries(){return new D(this,Mt)}forEach(e){for(let[n,i]of this)e(n,i,this)}fuzzyGet(e,n){return Et(this._tree,e,n)}get(e){let n=de(this._tree,e);return n!==void 0?n.get(""):void 0}has(e){let n=de(this._tree,e);return n!==void 0&&n.has("")}keys(){return new D(this,We)}set(e,n){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ae(this._tree,e).set("",n),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let i=ae(this._tree,e);return i.set("",n(i.get(""))),this}fetch(e,n){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let i=ae(this._tree,e),s=i.get("");return s===void 0&&i.set("",s=n()),s}values(){return new D(this,Ue)}[Symbol.iterator](){return this.entries()}static from(e){let n=new t;for(let[i,s]of e)n.set(i,s);return n}static fromObject(e){return t.from(Object.entries(e))}},H=(t,e,n=[])=>{if(e.length===0||t==null)return[t,n];for(let i of t.keys())if(i!==""&&e.startsWith(i))return n.push([t,i]),H(t.get(i),e.slice(i.length),n);return n.push([t,e]),H(void 0,"",n)},de=(t,e)=>{if(e.length===0||t==null)return t;for(let n of t.keys())if(n!==""&&e.startsWith(n))return de(t.get(n),e.slice(n.length))},ae=(t,e)=>{let n=e.length;e:for(let i=0;t&&i<n;){for(let r of t.keys())if(r!==""&&e[i]===r[0]){let a=Math.min(n-i,r.length),o=1;for(;o<a&&e[i+o]===r[o];)++o;let c=t.get(r);if(o===r.length)t=c;else{let u=new Map;u.set(r.slice(o),c),t.set(e.slice(i,i+o),u),t.delete(r),t=u}i+=o;continue e}let s=new Map;return t.set(e.slice(i),s),s}return t},jt=(t,e)=>{let[n,i]=H(t,e);if(n!==void 0){if(n.delete(""),n.size===0)Ge(i);else if(n.size===1){let[s,r]=n.entries().next().value;qe(i,s,r)}}},Ge=t=>{if(t.length===0)return;let[e,n]=pe(t);if(e.delete(n),e.size===0)Ge(t.slice(0,-1));else if(e.size===1){let[i,s]=e.entries().next().value;i!==""&&qe(t.slice(0,-1),i,s)}},qe=(t,e,n)=>{if(t.length===0)return;let[i,s]=pe(t);i.set(s+e,n),i.delete(s)},pe=t=>t[t.length-1],ge="or",Je="and",Dt="and_not",T=class t{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let n=e.autoVacuum==null||e.autoVacuum===!0?le:e.autoVacuum;this._options=$(y(y({},ue),e),{autoVacuum:n,searchOptions:y(y({},Ve),e.searchOptions||{}),autoSuggestOptions:y(y({},Nt),e.autoSuggestOptions||{})}),this._index=new R,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=fe,this.addFields(this._options.fields)}add(e){let{extractField:n,stringifyField:i,tokenize:s,processTerm:r,fields:a,idField:o}=this._options,c=n(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let u=this.addDocumentId(c);this.saveStoredFields(u,e);for(let l of a){let h=n(e,l);if(h==null)continue;let d=s(i(h,l),l),f=this._fieldIds[l],g=new Set(d).size;this.addFieldLength(u,f,this._documentCount-1,g);for(let m of d){let p=r(m,l);if(Array.isArray(p))for(let w of p)this.addTerm(f,u,w);else p&&this.addTerm(f,u,p)}}}addAll(e){for(let n of e)this.add(n)}addAllAsync(e,n={}){let{chunkSize:i=10}=n,s={chunk:[],promise:Promise.resolve()},{chunk:r,promise:a}=e.reduce(({chunk:o,promise:c},u,l)=>(o.push(u),(l+1)%i===0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(o))}:{chunk:o,promise:c}),s);return a.then(()=>this.addAll(r))}remove(e){let{tokenize:n,processTerm:i,extractField:s,stringifyField:r,fields:a,idField:o}=this._options,c=s(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));let u=this._idToShortId.get(c);if(u==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let l of a){let h=s(e,l);if(h==null)continue;let d=n(r(h,l),l),f=this._fieldIds[l],g=new Set(d).size;this.removeFieldLength(u,f,this._documentCount,g);for(let m of d){let p=i(m,l);if(Array.isArray(p))for(let w of p)this.removeTerm(f,u,w);else p&&this.removeTerm(f,u,p)}}this._storedFields.delete(u),this._documentIds.delete(u),this._idToShortId.delete(c),this._fieldLength.delete(u),this._documentCount-=1}removeAll(e){if(e)for(let n of e)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new R,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let n=this._idToShortId.get(e);if(n==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((i,s)=>{this.removeFieldLength(n,s,this._documentCount,i)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:n,batchSize:i,batchWait:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:i,batchWait:s},{minDirtCount:n,minDirtFactor:e})}discardAll(e){let n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let i of e)this.discard(i)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(e){let{idField:n,extractField:i}=this._options,s=i(e,n);this.discard(s),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let i=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=fe,this.performVacuuming(e,i)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,n){let i=this._dirtCount;if(this.vacuumConditionsMet(n)){let s=e.batchSize||he.batchSize,r=e.batchWait||he.batchWait,a=1;for(let[o,c]of this._index){for(let[u,l]of c)for(let[h]of l)this._documentIds.has(h)||(l.size<=1?c.delete(u):l.delete(h));this._index.get(o).size===0&&this._index.delete(o),a%s===0&&await new Promise(u=>setTimeout(u,r)),a+=1}this._dirtCount-=i}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:n,minDirtFactor:i}=e;return n=n||le.minDirtCount,i=i||le.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=i}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let n=this._idToShortId.get(e);if(n!=null)return this._storedFields.get(n)}search(e,n={}){let{searchOptions:i}=this._options,s=y(y({},i),n),r=this.executeQuery(e,n),a=[];for(let[o,{score:c,terms:u,match:l}]of r){let h=u.length||1,d={id:this._documentIds.get(o),score:c*h,terms:Object.keys(l),queryTerms:u,match:l};Object.assign(d,this._storedFields.get(o)),(s.filter==null||s.filter(d))&&a.push(d)}return e===t.wildcard&&s.boostDocument==null||a.sort(Be),a}autoSuggest(e,n={}){n=y(y({},this._options.autoSuggestOptions),n);let i=new Map;for(let{score:r,terms:a}of this.search(e,n)){let o=a.join(" "),c=i.get(o);c!=null?(c.score+=r,c.count+=1):i.set(o,{score:r,terms:a,count:1})}let s=[];for(let[r,{score:a,terms:o,count:c}]of i)s.push({suggestion:r,terms:o,score:a/c});return s.sort(Be),s}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),n)}static async loadJSONAsync(e,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),n)}static getDefault(e){if(ue.hasOwnProperty(e))return ce(ue,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,n){let{index:i,documentIds:s,fieldLength:r,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=q(s),c._fieldLength=q(r),c._storedFields=q(a);for(let[u,l]of c._documentIds)c._idToShortId.set(l,u);for(let[u,l]of i){let h=new Map;for(let d of Object.keys(l)){let f=l[d];o===1&&(f=f.ds),h.set(parseInt(d,10),q(f))}c._index.set(u,h)}return c}static async loadJSAsync(e,n){let{index:i,documentIds:s,fieldLength:r,storedFields:a,serializationVersion:o}=e,c=this.instantiateMiniSearch(e,n);c._documentIds=await J(s),c._fieldLength=await J(r),c._storedFields=await J(a);for(let[l,h]of c._documentIds)c._idToShortId.set(h,l);let u=0;for(let[l,h]of i){let d=new Map;for(let f of Object.keys(h)){let g=h[f];o===1&&(g=g.ds),d.set(parseInt(f,10),await J(g))}++u%1e3===0&&await He(0),c._index.set(l,d)}return c}static instantiateMiniSearch(e,n){let{documentCount:i,nextId:s,fieldIds:r,averageFieldLength:a,dirtCount:o,serializationVersion:c}=e;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let u=new t(n);return u._documentCount=i,u._nextId=s,u._idToShortId=new Map,u._fieldIds=r,u._avgFieldLength=a,u._dirtCount=o||0,u._index=new R,u}executeQuery(e,n={}){if(e===t.wildcard)return this.executeWildcardQuery(n);if(typeof e!="string"){let d=$(y(y({},n),e),{queries:void 0}),f=e.queries.map(g=>this.executeQuery(g,d));return this.combineResults(f,d.combineWith)}let{tokenize:i,processTerm:s,searchOptions:r}=this._options,a=y(y({tokenize:i,processTerm:s},r),n),{tokenize:o,processTerm:c}=a,h=o(e).flatMap(d=>c(d)).filter(d=>!!d).map(Bt(a)).map(d=>this.executeQuerySpec(d,a));return this.combineResults(h,a.combineWith)}executeQuerySpec(e,n){let i=y(y({},this._options.searchOptions),n),s=(i.fields||this._options.fields).reduce((m,p)=>$(y({},m),{[p]:ce(i.boost,p)||1}),{}),{boostDocument:r,weights:a,maxFuzzy:o,bm25:c}=i,{fuzzy:u,prefix:l}=y(y({},Ve.weights),a),h=this._index.get(e.term),d=this.termResults(e.term,e.term,1,e.termBoost,h,s,r,c),f,g;if(e.prefix&&(f=this._index.atPrefix(e.term)),e.fuzzy){let m=e.fuzzy===!0?.2:e.fuzzy,p=m<1?Math.min(o,Math.round(e.term.length*m)):m;p&&(g=this._index.fuzzyGet(e.term,p))}if(f)for(let[m,p]of f){let w=m.length-e.term.length;if(!w)continue;g==null||g.delete(m);let S=l*m.length/(m.length+.3*w);this.termResults(e.term,m,S,e.termBoost,p,s,r,c,d)}if(g)for(let m of g.keys()){let[p,w]=g.get(m);if(!w)continue;let S=u*m.length/(m.length+w);this.termResults(e.term,m,S,e.termBoost,p,s,r,c,d)}return d}executeWildcardQuery(e){let n=new Map,i=y(y({},this._options.searchOptions),e);for(let[s,r]of this._documentIds){let a=i.boostDocument?i.boostDocument(r,"",this._storedFields.get(s)):1;n.set(s,{score:a,terms:[],match:{}})}return n}combineResults(e,n=ge){if(e.length===0)return new Map;let i=n.toLowerCase(),s=Rt[i];if(!s)throw new Error("Invalid combination operator: ".concat(n));return e.reduce(s)||new Map}toJSON(){let e=[];for(let[n,i]of this._index){let s={};for(let[r,a]of i)s[r]=Object.fromEntries(a);e.push([n,s])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,n,i,s,r,a,o,c,u=new Map){if(r==null)return u;for(let l of Object.keys(a)){let h=a[l],d=this._fieldIds[l],f=r.get(d);if(f==null)continue;let g=f.size,m=this._avgFieldLength[d];for(let p of f.keys()){if(!this._documentIds.has(p)){this.removeTerm(d,p,n),g-=1;continue}let w=o?o(this._documentIds.get(p),n,this._storedFields.get(p)):1;if(!w)continue;let S=f.get(p),se=this._fieldLength.get(p)[d],re=Pt(S,g,this._documentCount,se,m,c),U=i*s*h*w*re,I=u.get(p);if(I){I.score+=U,kt(I.terms,e);let j=ce(I.match,n);j?j.push(l):I.match[n]=[l]}else u.set(p,{score:U,terms:[e],match:{[n]:[l]}})}}return u}addTerm(e,n,i){let s=this._index.fetch(i,Ne),r=s.get(e);if(r==null)r=new Map,r.set(n,1),s.set(e,r);else{let a=r.get(n);r.set(n,(a||0)+1)}}removeTerm(e,n,i){if(!this._index.has(i)){this.warnDocumentChanged(n,e,i);return}let s=this._index.fetch(i,Ne),r=s.get(e);r==null||r.get(n)==null?this.warnDocumentChanged(n,e,i):r.get(n)<=1?r.size<=1?s.delete(e):r.delete(n):r.set(n,r.get(n)-1),this._index.get(i).size===0&&this._index.delete(i)}warnDocumentChanged(e,n,i){for(let s of Object.keys(this._fieldIds))if(this._fieldIds[s]===n){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(i,'" was not present in field "').concat(s,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let n=this._nextId;return this._idToShortId.set(e,n),this._documentIds.set(n,e),this._documentCount+=1,this._nextId+=1,n}addFields(e){for(let n=0;n<e.length;n++)this._fieldIds[e[n]]=n}addFieldLength(e,n,i,s){let r=this._fieldLength.get(e);r==null&&this._fieldLength.set(e,r=[]),r[n]=s;let o=(this._avgFieldLength[n]||0)*i+s;this._avgFieldLength[n]=o/(i+1)}removeFieldLength(e,n,i,s){if(i===1){this._avgFieldLength[n]=0;return}let r=this._avgFieldLength[n]*i-s;this._avgFieldLength[n]=r/(i-1)}saveStoredFields(e,n){let{storeFields:i,extractField:s}=this._options;if(i==null||i.length===0)return;let r=this._storedFields.get(e);r==null&&this._storedFields.set(e,r={});for(let a of i){let o=s(n,a);o!==void 0&&(r[a]=o)}}};T.wildcard=Symbol("*");var ce=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0,Rt={[ge]:(t,e)=>{for(let n of e.keys()){let i=t.get(n);if(i==null)t.set(n,e.get(n));else{let{score:s,terms:r,match:a}=e.get(n);i.score=i.score+s,i.match=Object.assign(i.match,a),Pe(i.terms,r)}}return t},[Je]:(t,e)=>{let n=new Map;for(let i of e.keys()){let s=t.get(i);if(s==null)continue;let{score:r,terms:a,match:o}=e.get(i);Pe(s.terms,a),n.set(i,{score:s.score+r,terms:s.terms,match:Object.assign(s.match,o)})}return n},[Dt]:(t,e)=>{for(let n of e.keys())t.delete(n);return t}},Vt={k:1.2,b:.7,d:.5},Pt=(t,e,n,i,s,r)=>{let{k:a,b:o,d:c}=r;return Math.log(1+(n-e+.5)/(e+.5))*(c+t*(a+1)/(t+a*(1-o+o*i/s)))},Bt=t=>(e,n,i)=>{let s=typeof t.fuzzy=="function"?t.fuzzy(e,n,i):t.fuzzy||!1,r=typeof t.prefix=="function"?t.prefix(e,n,i):t.prefix===!0,a=typeof t.boostTerm=="function"?t.boostTerm(e,n,i):1;return{term:e,fuzzy:s,prefix:r,termBoost:a}},ue={idField:"id",extractField:(t,e)=>t[e],stringifyField:(t,e)=>t.toString(),tokenize:t=>t.split(Wt),processTerm:t=>t.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(t,e)=>{typeof(console==null?void 0:console[t])=="function"&&console[t](e)},autoVacuum:!0},Ve={combineWith:ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Vt},Nt={combineWith:Je,prefix:(t,e,n)=>e===n.length-1},he={batchSize:1e3,batchWait:10},fe={minDirtFactor:.1,minDirtCount:20},le=y(y({},he),fe),kt=(t,e)=>{t.includes(e)||t.push(e)},Pe=(t,e)=>{for(let n of e)t.includes(n)||t.push(n)},Be=({score:t},{score:e})=>e-t,Ne=()=>new Map,q=t=>{let e=new Map;for(let n of Object.keys(t))e.set(parseInt(n,10),t[n]);return e},J=async t=>{let e=new Map,n=0;for(let i of Object.keys(t))e.set(parseInt(i,10),t[i]),++n%1e3===0&&await He(0);return e},He=t=>new Promise(e=>setTimeout(e,t)),Wt=new RegExp("[\\n\\r\\p{Z}\\p{P}]+","u");var zt=Lt(It(),1);import{z as b}from"zod";var W,ie,Ot,Tt=class{constructor(e){oe(this,ie);G(this,"mapData");G(this,"indexes");G(this,"ready");oe(this,W);this.mapData=e,this.indexes=Vi(e),this.ready=this.populate(),Oe(this,W,Le(Ce(this,ie,Ot).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:n,enterpriseCategories:i}=this.indexes,s=this.mapData,r=[];return e.removeAll(),r=r.concat([e.addAllAsync(s.getByType("space")),e.addAllAsync(s.getByType("point-of-interest")),e.addAllAsync(s.getByType("object")),e.addAllAsync(s.getByType("connection")),e.addAllAsync(s.getByType("floor")),e.addAllAsync(s.getByType("door")),e.addAllAsync(s.getByType("annotation")),e.addAllAsync(s.getByType("area"))]),n&&(n==null||n.removeAll(),r.push(n.addAllAsync(s.getByType("enterprise-location")))),i&&(i==null||i.removeAll(),r.push(i.addAllAsync(s.getByType("enterprise-category")))),Promise.all(r)}async search(e,n={}){var c,u;await this.ready,Pi.parse(n);let i=(0,zt.default)({},n,Ri),s=this.indexes.places.search(e,{fields:Object.keys(i.places.fields).filter(l=>i.places.fields[l])});i.places.limit&&(s=s.slice(0,i.places.limit));let r=(c=this.indexes.enterpriseLocations)==null?void 0:c.search(e,{fields:Object.keys(i.enterpriseLocations.fields).filter(l=>i.enterpriseLocations.fields[l])});r&&i.enterpriseLocations.limit&&(r=r.slice(0,i.enterpriseLocations.limit));let a=(u=this.indexes.enterpriseCategories)==null?void 0:u.search(e,{fields:Object.keys(i.enterpriseCategories.fields).filter(l=>i.enterpriseCategories.fields[l])});a&&i.enterpriseCategories.limit&&(a=a.slice(0,i.enterpriseCategories.limit));let o=Di(this.mapData,{placesResult:s,locationsResult:r,categoriesResult:a});return ze(this,W).call(this,e),o}async suggest(e,n={}){await this.ready,Bi.parse(n);let i=[],{places:{enabled:s=!0}={},enterpriseLocations:{enabled:r=!0}={}}=n;r&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(c=>i.push(c)),s&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(c=>i.push(c));let a=new Map;i.forEach(c=>{let u=a.get(c.suggestion);(!u||c.score>u.score)&&a.set(c.suggestion,c)});let o=Array.from(a.values());return o.sort((c,u)=>u.score-c.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:o.map(c=>c.suggestion)}),o}};W=new WeakMap,ie=new WeakSet,Ot=function(e){this.mapData.Analytics.capture("$query-search",{query:e})};function Di(t,{placesResult:e,locationsResult:n,categoriesResult:i}){let s=e.reduce((o,{id:c,match:u,score:l,__type:h})=>{let d=t.getById(h,c);return d!=null&&!Me.is(d)&&!Ee.is(d)&&!je.is(d)&&!De.is(d)&&!Re.is(d)&&o.push({type:d.__type,match:u,score:l,item:d}),o},[]),r;if(n){r=[];for(let{id:o,match:c,score:u}of n){let l=t.getById("enterprise-location",o);l&&r.push({type:l.__type,match:c,score:u,item:l})}}let a;if(i){a=[];for(let{id:o,match:c,score:u}of i){let l=t.getById("enterprise-category",o);l&&a.push({type:l.__type,match:c,score:u,item:l})}}return{places:s,enterpriseLocations:r,enterpriseCategories:a}}var Ri={places:{fields:{name:!0,description:!0}},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0}},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0}}};function Fe(t){return t.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}function Vi(t){let e=new T({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(a,o)=>{let c=a[o];return typeof c=="string"?Fe(c):a[o]},processTerm:a=>Ni.has(a)?"":a.toLowerCase()}),n=t.getByType("enterprise-location"),i;n&&(i=new T({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(a,o)=>Array.isArray(a[o])?a[o].join(" "):typeof a[o]=="string"?Fe(a[o]):a[o]}));let s=t.getByType("enterprise-category"),r;return s&&(r=new T({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(a,o){return o==="locations.name"?a.locations.reduce((u,l)=>u+" ".concat(Ft," ")+l.name,"")+" ".concat(Ft):typeof a[o]=="string"?Fe(a[o]):a[o]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:r,enterpriseLocations:i,places:e}}var Pi=b.object({places:b.object({fields:b.object({name:b.boolean().optional(),description:b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional(),enterpriseCategories:b.object({fields:b.object({name:b.boolean().optional(),description:b.boolean().optional(),"locations.name":b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional(),enterpriseLocations:b.object({fields:b.object({name:b.boolean().optional(),tags:b.boolean().optional(),description:b.boolean().optional()}).optional(),limit:b.number().positive().optional()}).optional()}),Bi=b.object({places:b.object({enabled:b.boolean().optional()}).optional(),enterpriseLocations:b.object({enabled:b.boolean().optional()}).optional()}),Ni=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),Ft="";export{Tt as InternalSearch,Fe as removeAccents};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as b,u as m,v as n,w as o,x as p,y as q,z as r}from"./chunk-
|
|
1
|
+
import{s as b,u as m,v as n,w as o,x as p,y as q,z as r}from"./chunk-72VREA6L.js";import{C as c,O as d,P as e,Q as f,R as g,_b as l,ab as j,bb as k,g as a,ra as h,wa as i}from"./chunk-RTTZ7LHQ.js";import"./chunk-43W5ISDI.js";import"./chunk-PUC4BMPX.js";import"./chunk-IGHVNMJ3.js";export{n as ANIMATION_TWEENS,o as ATTRIBUTION_POSITIONS,d as COLLISION_WORKER_PATH,i as DEFAULT_PATH_SMOOTHING,e as MAPLIBRE_WORKER_PATH,h as MAPPEDIN_LAYER_ID,q as MapLibreOverlay,b as Navigator,l as TEXT3D_STYLE_UPDATE_PROPS,f as collisionWorkerUrl,j as configureWorker,r as createRenderer,a as debounce,m as enableTestMode,c as interpolate,p as mountSceneGraphVisualizer,k as preloadFont,g as setCollisionWorkerUrl};
|