All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.vendor.altair.13-es2018.js Maven / Gradle / Ivy

(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{zeOt:function(e,t,s){"use strict";function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===h(e)}function r(e){return"string"==typeof e}function i(e){return"number"==typeof e}function c(e){return"object"==typeof e}function a(e){return null!=e}function o(e){return!e.trim().length}function h(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}s.r(t),s.d(t,"DocUtils",function(){return J});const l=Object.prototype.hasOwnProperty;class u{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let s=d(e);t+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,t+=s.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 d(e){let t=null,s=null,i=null,c=1;if(r(e)||n(e))i=e,t=g(e),s=p(e);else{if(!l.call(e,"name"))throw new Error("Missing name property in key");const n=e.name;if(i=n,l.call(e,"weight")&&(c=e.weight,c<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(n));t=g(n),s=p(n)}return{path:t,id:s,weight:c,src:i}}function g(e){return n(e)?e:e.split(".")}function p(e){return n(e)?e.join("."):e}var f={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(a(e))if(t[u]){const d=e[t[u]];if(!a(d))return;if(u===t.length-1&&(r(d)||i(d)||function(e){return!0===e||!1===e||function(e){return c(e)&&null!==e}(e)&&"[object Boolean]"==h(e)}(d)))s.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)}(d));else if(n(d)){o=!0;for(let e=0,s=d.length;e{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,r(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();r(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t{let c=this.getFn(e,t.path);if(a(c))if(n(c)){let e=[];const t=[{nestedArrIndex:-1,value:c}];for(;t.length;){const{nestedArrIndex:s,value:i}=t.pop();if(a(i))if(r(i)&&!o(i)){let t={v:i,i:s,n:this.norm.get(i)};e.push(t)}else n(i)&&i.forEach((e,s)=>{t.push({nestedArrIndex:s,value:e})})}s.$[i]=e}else if(!o(c)){let e={v:c,n:this.norm.get(c)};s.$[i]=e}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function M(e,t,{getFn:s=f.getFn}={}){const n=new y({getFn:s});return n.setKeys(e.map(d)),n.setSources(t),n.create(),n}function x(e,{getFn:t=f.getFn}={}){const{keys:s,records:n}=e,r=new y({getFn:t});return r.setKeys(s),r.setIndexRecords(n),r}function _(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:r=f.distance,ignoreLocation:i=f.ignoreLocation}={}){const c=t/e.length;if(i)return c;const a=Math.abs(n-s);return r?c+a/r:a?1:c}function k(e){let t={};for(let s=0,n=e.length;s{this.chunks.push({pattern:e,alphabet:k(e),startIndex:t})},l=this.pattern.length;if(l>32){let e=0;const t=l%32,s=l-t;for(;e{const{isMatch:p,score:m,indices:y}=function(e,t,s,{location:n=f.location,distance:r=f.distance,threshold:i=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:a=f.minMatchCharLength,includeMatches:o=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const l=t.length,u=e.length,d=Math.max(0,Math.min(n,u));let g=i,p=d;const m=a>1||o,y=m?Array(u):[];let M;for(;(M=e.indexOf(t,p))>-1;){let e=_(t,{currentLocation:M,expectedLocation:d,distance:r,ignoreLocation:h});if(g=Math.min(e,g),p=M+l,m){let e=0;for(;e=a;c-=1){let n=c-1,i=s[e.charAt(n)];if(m&&(y[n]=+!!i),M[c]=(M[c+1]<<1|1)&i,f&&(M[c]|=(x[c+1]|x[c])<<1|1|x[c+1]),M[c]&I&&(k=_(t,{errors:f,currentLocation:n,expectedLocation:d,distance:r,ignoreLocation:h}),k<=g)){if(g=k,p=n,p<=d)break;a=Math.max(1,2*d-p)}}if(_(t,{errors:f+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:h})>g)break;x=M}const S={isMatch:p>=0,score:Math.max(.001,k)};if(m){const e=function(e=[],t=f.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=e.length;i=t&&s.push([n,r]),n=-1)}return e[i-1]&&i-n>=t&&s.push([n,i-1]),s}(y,a);e.length?o&&(S.indices=e):S.isMatch=!1}return S}(e,t,d,{location:n+g,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:a,includeMatches:s,ignoreLocation:o});p&&(u=!0),l+=m,p&&y&&(h=[...h,...y])});let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&s&&(d.indices=h),d}}class I{constructor(e){this.pattern=e}static isMultiMatch(e){return S(e,this.multiRegex)}static isSingleMatch(e){return S(e,this.singleRegex)}search(){}}function S(e,t){const s=e.match(t);return s?s[1]:null}class b extends I{constructor(e,{location:t=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:r=f.includeMatches,findAllMatches:i=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:o=f.ignoreLocation}={}){super(e),this._bitapSearch=new L(e,{location:t,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:a,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class v extends I{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,s=0;const n=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,s))>-1;)s=t+r,n.push([t,s-1]);const i=!!n.length;return{isMatch:i,score:i?0:1,indices:n}}}const w=[class extends I{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},v,class extends I{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends I{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends I{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends I{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends I{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},b],$=w.length,A=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,C=new Set([b.type,v.type]),F=[];function E(e,t){for(let s=0,n=F.length;s!(!e.$and&&!e.$or),R=e=>({$and:Object.keys(e).map(t=>({[t]:e[t]}))});function j(e,t,{auto:s=!0}={}){const i=e=>{let a=Object.keys(e);const o=(e=>!!e.$path)(e);if(!o&&a.length>1&&!O(e))return i(R(e));if((e=>!n(e)&&c(e)&&!O(e))(e)){const n=o?e.$path:a[0],i=o?e.$val:e[n];if(!r(i))throw new Error((e=>`Invalid value for key ${e}`)(n));const c={keyId:p(n),pattern:i};return s&&(c.searcher=E(i,t)),c}let h={children:[],operator:a[0]};return a.forEach(t=>{const s=e[t];n(s)&&s.forEach(e=>{h.children.push(i(e))})}),h};return O(e)||(e=R(e)),i(e)}function q(e,t){const s=e.matches;t.matches=[],a(s)&&s.forEach(e=>{if(!a(e.indices)||!e.indices.length)return;const{indices:s,value:n}=e;let r={indices:s,value:n};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)})}function N(e,t){t.score=e.score}let T=(()=>{class e{constructor(e,t={},s){this.options={...f,...t},this._keyStore=new u(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof y))throw new Error("Incorrect 'index' type");this._myIndex=t||M(this.options.keys,this._docs,{getFn:this.options.getFn})}add(e){a(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let s=0,n=this._docs.length;s{let s=1;e.matches.forEach(({key:e,norm:n,score:r})=>{const i=e?e.weight:null;s*=Math.pow(0===r&&i?Number.EPSILON:r,(i||1)*(t?1:n))}),e.score=s})}(h,{ignoreFieldNorm:o}),c&&h.sort(a),i(t)&&t>-1&&(h=h.slice(0,t)),function(e,t,{includeMatches:s=f.includeMatches,includeScore:n=f.includeScore}={}){const r=[];return s&&r.push(q),n&&r.push(N),e.map(e=>{const{idx:s}=e,n={item:t[s],refIndex:s};return r.length&&r.forEach(t=>{t(e,n)}),n})}(h,this._docs,{includeMatches:s,includeScore:n})}_searchStringList(e){const t=E(e,this.options),{records:s}=this._myIndex,n=[];return s.forEach(({v:e,i:s,n:r})=>{if(!a(e))return;const{isMatch:i,score:c,indices:o}=t.searchIn(e);i&&n.push({item:e,idx:s,matches:[{score:c,value:e,norm:r,indices:o}]})}),n}_searchLogical(e){const t=j(e,this.options),s=(e,t,n)=>{if(!e.children){const{keyId:s,searcher:r}=e,i=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:r});return i&&i.length?[{idx:n,item:t,matches:i}]:[]}switch(e.operator){case"$and":{const r=[];for(let i=0,c=e.children.length;i{if(a(e)){let c=s(t,e,i);c.length&&(n[i]||(n[i]={idx:i,item:e,matches:[]},r.push(n[i])),c.forEach(({matches:e})=>{n[i].matches.push(...e)}))}}),r}_searchObjectList(e){const t=E(e,this.options),{keys:s,records:n}=this._myIndex,r=[];return n.forEach(({$:e,i:n})=>{if(!a(e))return;let i=[];s.forEach((s,n)=>{i.push(...this._findMatches({key:s,value:e[n],searcher:t}))}),i.length&&r.push({idx:n,item:e,matches:i})}),r}_findMatches({key:e,value:t,searcher:s}){if(!a(t))return[];let r=[];if(n(t))t.forEach(({v:t,i:n,n:i})=>{if(!a(t))return;const{isMatch:c,score:o,indices:h}=s.searchIn(t);c&&r.push({score:o,key:e,value:t,idx:n,norm:i,indices:h})});else{const{v:n,n:i}=t,{isMatch:c,score:a,indices:o}=s.searchIn(n);c&&r.push({score:a,key:e,value:n,norm:i,indices:o})}return r}}return e.version="6.4.6",e.createIndex=M,e.parseIndex=x,e.config=f,e})();T.parseQuery=j,function(...e){F.push(...e)}(class{constructor(e,{isCaseSensitive:t=f.isCaseSensitive,includeMatches:s=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:r=f.ignoreLocation,findAllMatches:i=f.findAllMatches,location:c=f.location,threshold:a=f.threshold,distance:o=f.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:n,findAllMatches:i,ignoreLocation:r,location:c,threshold:a,distance:o},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map(e=>{let s=e.trim().split(A).filter(e=>e&&!!e.trim()),n=[];for(let r=0,i=s.length;r{e=[...e,...this.getTypeIndices(t,!0,e)]});const t=this.schema.getTypeMap();return Object.keys(t).forEach(s=>{/^__/.test(s)||(e=[...e,...this.getTypeIndices(t[s],!1,e)])}),this.searchIndex=e,e}getFieldsIndices(e,t,s,n){let r=[];return Object.keys(e).forEach(i=>{const c=e[i],a={search:c.name,name:c.name,description:c.description?c.description:"",args:c.args?c.args.map(e=>({name:e.name,description:e.description})):[],cat:"field",type:t.name,isQuery:s,highlight:"field"};r=[...r,a],c.args&&c.args.length&&c.args.forEach(e=>{r=[...r,{...a,search:e.name,highlight:"argument"}]}),c.type&&(r=[...r,...this.getTypeIndices(c.type,!1,[...n,...r]).filter(e=>!!e)])}),r}getTypeIndices(e,t,s){let n=null;if(!e.name)return[];if(s.some(t=>t.name===e.name&&"type"===t.cat))return[];e.getFields&&(n=e.getFields());const r=[{search:e.name,name:e.name,cat:"type",description:e.description?e.description:"",isRoot:t,highlight:"type"}];return n?[...r,...this.getFieldsIndices(n,e,t,[...s,...r]).filter(e=>!!e)]:r}searchDocs(e){return this.searchIndex.length?new z(this.searchIndex,{keys:["search"],threshold:.4}).search(e).map(e=>e.item):[]}generateQuery(e,t,s){let n="",r=!1;if(!this.schema)return;switch(t){case this.schema.getQueryType()&&this.schema.getQueryType().name:n+="query";break;case this.schema.getMutationType()&&this.schema.getMutationType().name:n+="mutation";break;case this.schema.getSubscriptionType()&&this.schema.getSubscriptionType().name:n+="subscription";break;default:n+=`fragment _____ on ${t}`,r=!0}const i=this.generateFieldData(e,t,[],1,s);if(!i)return;n+=`{\n${i.query}\n}`;const c={...i.meta};return c.hasArgs=r||c.hasArgs,{query:n,meta:c}}cleanName(e){return e.replace(/[\[\]!]/g,"")}generateFieldData(e,t,s,n,r={}){if(!(e&&t&&s&&this.schema))return{query:"",meta:{}};const i=r.tabSize||2,c=this.schema.getType(t),a=c&&c.getFields()[e];if(!a)return{query:"",meta:{}};const o={hasArgs:!1};let h=" ".repeat(n*i)+a.name;a.args&&a.args.length&&(o.hasArgs=!0,h+=`(${a.args.reduce((e,t)=>e+", "+t.name+": ______","").substring(2)})`);const l=this.cleanName(a.type.inspect()),u=this.schema.getType(l);if(s.filter(e=>e.type===l).length)return{query:"",meta:{}};if(n>=(r.addQueryDepthLimit||0))return{query:"",meta:{}};const d=u&&u.getFields&&u.getFields();let g="";return d&&(g=Object.keys(d).reduce((t,i)=>{if(s.filter(e=>e.name===i&&e.type===l).length)return"";const c=this.generateFieldData(i,l,[...s,{name:e,type:l}],n+1,r);if(!c)return t;const a=c.query;return o.hasArgs=o.hasArgs||c.meta.hasArgs||!1,a?t+"\n"+a:t},"").substring(1)),g&&(h+=`{\n${g}\n`,h+=" ".repeat(n*i)+"}"),{query:h,meta:o}}}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy