upgrade filament
This commit is contained in:
1 parent
48593b234e
commit
39a444685a
85 files changed
+2555
-1386
No files matched your search
@@ -1 +1 @@
|
||||
(()=>{var e,t={794:(e,t,n)=>{n(27)},27:(e,t,n)=>{"use strict";function s(e){return Array.isArray?Array.isArray(e):"[object Array]"===d(e)}n.r(t);const i=1/0;function r(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}function c(e){return"string"==typeof e}function o(e){return"number"==typeof e}function h(e){return!0===e||!1===e||function(e){return a(e)&&null!==e}(e)&&"[object Boolean]"==d(e)}function a(e){return"object"==typeof e}function l(e){return null!=e}function u(e){return!e.trim().length}function d(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const p=e=>`Missing ${e} property in key`,g=e=>`Property 'weight' in key '${e}' must be a positive integer`,f=Object.prototype.hasOwnProperty;class m{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=y(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function y(e){let t=null,n=null,i=null,r=1,o=null;if(c(e)||s(e))i=e,t=M(e),n=x(e);else{if(!f.call(e,"name"))throw new Error(p("name"));const s=e.name;if(i=s,f.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(g(s));t=M(s),n=x(s),o=e.getFn}return{path:t,id:n,weight:r,src:i,getFn:o}}function M(e){return s(e)?e:e.split(".")}function x(e){return s(e)?e.join("."):e}var v={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],i=!1;const a=(e,t,u)=>{if(l(e))if(t[u]){const d=e[t[u]];if(!l(d))return;if(u===t.length-1&&(c(d)||o(d)||h(d)))n.push(r(d));else if(s(d)){i=!0;for(let e=0,n=d.length;e<n;e+=1)a(d[e],t,u+1)}else t.length&&a(d,t,u+1)}else n.push(e)};return a(e,c(t)?t.split("."):t,0),i?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const w=/[^ ]+/g;class k{constructor({getFn:e=v.getFn,fieldNormWeight:t=v.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(t){const i=t.match(w).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*e),c=parseFloat(Math.round(r*s)/s);return n.set(i,c),c},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,c(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();c(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!l(e)||u(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,i)=>{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(l(r))if(s(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:n,value:i}=t.pop();if(l(i))if(c(i)&&!u(i)){let t={v:i,i:n,n:this.norm.get(i)};e.push(t)}else s(i)&&i.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[i]=e}else if(c(r)&&!u(r)){let e={v:r,n:this.norm.get(r)};n.$[i]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function L(e,t,{getFn:n=v.getFn,fieldNormWeight:s=v.fieldNormWeight}={}){const i=new k({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(y)),i.setSources(t),i.create(),i}function S(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=v.distance,ignoreLocation:r=v.ignoreLocation}={}){const c=t/e.length;if(r)return c;const o=Math.abs(s-n);return i?c+o/i:o?1:c}const I=32;function C(e,t,n,{location:s=v.location,distance:i=v.distance,threshold:r=v.threshold,findAllMatches:c=v.findAllMatches,minMatchCharLength:o=v.minMatchCharLength,includeMatches:h=v.includeMatches,ignoreLocation:a=v.ignoreLocation}={}){if(t.length>I)throw new Error(`Pattern length exceeds max of ${I}.`);const l=t.length,u=e.length,d=Math.max(0,Math.min(s,u));let p=r,g=d;const f=o>1||h,m=f?Array(u):[];let y;for(;(y=e.indexOf(t,g))>-1;){let e=S(t,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:a});if(p=Math.min(e,p),g=y+l,f){let e=0;for(;e<l;)m[y+e]=1,e+=1}}g=-1;let M=[],x=1,w=l+u;const k=1<<l-1;for(let s=0;s<l;s+=1){let r=0,o=w;for(;r<o;){S(t,{errors:s,currentLocation:d+o,expectedLocation:d,distance:i,ignoreLocation:a})<=p?r=o:w=o,o=Math.floor((w-r)/2+r)}w=o;let h=Math.max(1,d-o+1),y=c?u:Math.min(d+o,u)+l,v=Array(y+2);v[y+1]=(1<<s)-1;for(let r=y;r>=h;r-=1){let c=r-1,o=n[e.charAt(c)];if(f&&(m[c]=+!!o),v[r]Line truncated
|
||||
(()=>{var e={27:(e,t,n)=>{"use strict";function s(e){return Array.isArray?Array.isArray(e):"[object Array]"===l(e)}n.r(t);function i(e){return"string"==typeof e}function r(e){return"number"==typeof e}function c(e){return!0===e||!1===e||function(e){return o(e)&&null!==e}(e)&&"[object Boolean]"==l(e)}function o(e){return"object"==typeof e}function h(e){return null!=e}function a(e){return!e.trim().length}function l(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const u=Object.prototype.hasOwnProperty;class d{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=p(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function p(e){let t=null,n=null,r=null,c=1,o=null;if(i(e)||s(e))r=e,t=g(e),n=f(e);else{if(!u.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const s=e.name;if(r=s,u.call(e,"weight")&&(c=e.weight,c<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(s));t=g(s),n=f(s),o=e.getFn}return{path:t,id:n,weight:c,src:r,getFn:o}}function g(e){return s(e)?e:e.split(".")}function f(e){return s(e)?e.join("."):e}var m={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],o=!1;const a=(e,t,l)=>{if(h(e))if(t[l]){const u=e[t[l]];if(!h(u))return;if(l===t.length-1&&(i(u)||r(u)||c(u)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(u));else if(s(u)){o=!0;for(let e=0,n=u.length;e<n;e+=1)a(u[e],t,l+1)}else t.length&&a(u,t,l+1)}else n.push(e)};return a(e,i(t)?t.split("."):t,0),o?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const y=/[^ ]+/g;class M{constructor({getFn:e=m.getFn,fieldNormWeight:t=m.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(t){const i=t.match(y).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*e),c=parseFloat(Math.round(r*s)/s);return n.set(i,c),c},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,i(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!h(e)||a(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let c=t.getFn?t.getFn(e):this.getFn(e,t.path);if(h(c))if(s(c)){let e=[];const t=[{nestedArrIndex:-1,value:c}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(h(r))if(i(r)&&!a(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else s(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(i(c)&&!a(c)){let e={v:c,n:this.norm.get(c)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function x(e,t,{getFn:n=m.getFn,fieldNormWeight:s=m.fieldNormWeight}={}){const i=new M({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(p)),i.setSources(t),i.create(),i}function v(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=m.distance,ignoreLocation:r=m.ignoreLocation}={}){const c=t/e.length;if(r)return c;const o=Math.abs(s-n);return i?c+o/i:o?1:c}const L=32;function S(e,t,n,{location:s=m.location,distance:i=m.distance,threshold:r=m.threshold,findAllMatches:c=m.findAllMatches,minMatchCharLength:o=m.minMatchCharLength,includeMatches:h=m.includeMatches,ignoreLocation:a=m.ignoreLocation}={}){if(t.length>L)throw new Error(`Pattern length exceeds max of ${L}.`);const l=t.length,u=e.length,d=Math.max(0,Math.min(s,u));let p=r,g=d;const f=o>1||h,y=f?Array(u):[];let M;for(;(M=e.indexOf(t,g))>-1;){let e=v(t,{currentLocation:M,expectedLocation:d,distance:i,ignoreLocation:a});if(p=Math.min(e,p),g=M+l,f){let e=0;for(;e<l;)y[M+e]=1,e+=1}}g=-1;let x=[],S=1,w=l+u;const k=1<<l-1;for(let s=0;s<l;s+=1){let r=0,o=w;for(;r<o;){v(t,{errors:s,currentLocation:d+o,expectedLocation:d,distance:i,ignoreLocation:a})<=p?r=o:w=o,o=Math.floor((w-r)/2+r)}w=o;let h=Math.max(1,d-o+1),m=c?u:Math.min(d+o,u)+l,M=Array(m+2);M[m+1]=(1<<s)-1;for(let r=m;r>=h;r-=1){let c=r-1,o=n[e.charAt(c)];if(f&&(y[c]=+!!o),M[r]=(M[r+1]<<1|1)&o,s&&(M[r]|=(x[r+1]|x[r])Line truncated
|
||||
Reference in new issue
Block a user