altair-static 4.0.10
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/CHANGELOG.md +114 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/build/dist/108-es2018.js +1 -0
- package/build/dist/108-es5.js +1 -0
- package/build/dist/283-es2018.js +1 -0
- package/build/dist/283-es5.js +1 -0
- package/build/dist/379-es2018.js +1 -0
- package/build/dist/379-es5.js +1 -0
- package/build/dist/3rdpartylicenses.txt +4095 -0
- package/build/dist/527-es2018.js +1 -0
- package/build/dist/527-es5.js +1 -0
- package/build/dist/604-es2018.js +1 -0
- package/build/dist/604-es5.js +1 -0
- package/build/dist/709-es2018.js +1 -0
- package/build/dist/709-es5.js +1 -0
- package/build/dist/747-es2018.js +1 -0
- package/build/dist/747-es5.js +1 -0
- package/build/dist/773-es2018.js +1 -0
- package/build/dist/773-es5.js +1 -0
- package/build/dist/790-es2018.js +1 -0
- package/build/dist/790-es5.js +1 -0
- package/build/dist/794-es2018.js +1 -0
- package/build/dist/794-es5.js +1 -0
- package/build/dist/866-es2018.js +1 -0
- package/build/dist/866-es5.js +1 -0
- package/build/dist/873-es2018.js +1 -0
- package/build/dist/873-es5.js +1 -0
- package/build/dist/934-es2018.js +1 -0
- package/build/dist/934-es5.js +1 -0
- package/build/dist/assets/i18n/README.md +1 -0
- package/build/dist/assets/i18n/ach-UG.json +155 -0
- package/build/dist/assets/i18n/ach.json +55 -0
- package/build/dist/assets/i18n/af-ZA.json +122 -0
- package/build/dist/assets/i18n/ar-SA.json +122 -0
- package/build/dist/assets/i18n/ca-ES.json +122 -0
- package/build/dist/assets/i18n/cn.json +64 -0
- package/build/dist/assets/i18n/cs-CZ.json +155 -0
- package/build/dist/assets/i18n/da-DK.json +155 -0
- package/build/dist/assets/i18n/de-DE.json +155 -0
- package/build/dist/assets/i18n/default.json +177 -0
- package/build/dist/assets/i18n/el-GR.json +122 -0
- package/build/dist/assets/i18n/en-US.json +155 -0
- package/build/dist/assets/i18n/en.json +75 -0
- package/build/dist/assets/i18n/es-ES.json +155 -0
- package/build/dist/assets/i18n/es.json +57 -0
- package/build/dist/assets/i18n/fi-FI.json +155 -0
- package/build/dist/assets/i18n/fr-FR.json +155 -0
- package/build/dist/assets/i18n/fr.json +57 -0
- package/build/dist/assets/i18n/he-IL.json +122 -0
- package/build/dist/assets/i18n/hu-HU.json +155 -0
- package/build/dist/assets/i18n/it-IT.json +155 -0
- package/build/dist/assets/i18n/ja-JP.json +155 -0
- package/build/dist/assets/i18n/ko-KR.json +155 -0
- package/build/dist/assets/i18n/nl-NL.json +155 -0
- package/build/dist/assets/i18n/no-NO.json +155 -0
- package/build/dist/assets/i18n/pl-PL.json +155 -0
- package/build/dist/assets/i18n/pt-BR.json +155 -0
- package/build/dist/assets/i18n/pt-PT.json +155 -0
- package/build/dist/assets/i18n/ro-RO.json +155 -0
- package/build/dist/assets/i18n/ru-RU.json +155 -0
- package/build/dist/assets/i18n/sr-SP.json +155 -0
- package/build/dist/assets/i18n/sv-SE.json +155 -0
- package/build/dist/assets/i18n/tr-TR.json +155 -0
- package/build/dist/assets/i18n/uk-UA.json +155 -0
- package/build/dist/assets/i18n/vi-VN.json +155 -0
- package/build/dist/assets/i18n/zh-CN.json +155 -0
- package/build/dist/assets/i18n/zh-TW.json +155 -0
- package/build/dist/assets/img/altair_logo.png +0 -0
- package/build/dist/assets/img/altair_logo_128.png +0 -0
- package/build/dist/assets/img/altair_logo_512.png +0 -0
- package/build/dist/assets/img/logo.png +0 -0
- package/build/dist/assets/img/logo.svg +31 -0
- package/build/dist/assets/img/logo_350.svg +28 -0
- package/build/dist/assets/img/play.svg +19 -0
- package/build/dist/favicon.ico +0 -0
- package/build/dist/index.html +40 -0
- package/build/dist/jetbrains-mono-all-400-normal.woff +0 -0
- package/build/dist/jetbrains-mono-cyrillic-400-normal.woff2 +0 -0
- package/build/dist/jetbrains-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/build/dist/jetbrains-mono-greek-400-normal.woff2 +0 -0
- package/build/dist/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/build/dist/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/build/dist/jetbrains-mono-vietnamese-400-normal.woff2 +0 -0
- package/build/dist/main-es2018.js +1 -0
- package/build/dist/main-es5.js +1 -0
- package/build/dist/polyfills-es2018.js +1 -0
- package/build/dist/polyfills-es5.js +1 -0
- package/build/dist/runtime-es2018.js +1 -0
- package/build/dist/runtime-es5.js +1 -0
- package/build/dist/styles.css +2 -0
- package/build/index.d.ts +25 -0
- package/build/index.js +74 -0
- package/build/index.js.map +1 -0
- package/build/index.test.d.ts +1 -0
- package/build/index.test.js +46 -0
- package/build/index.test.js.map +1 -0
- package/build/utils/get-altair-html.d.ts +1 -0
- package/build/utils/get-altair-html.js +10 -0
- package/build/utils/get-altair-html.js.map +1 -0
- package/build/utils/get-dist.d.ts +4 -0
- package/build/utils/get-dist.js +9 -0
- package/build/utils/get-dist.js.map +1 -0
- package/jest.config.js +12 -0
- package/package.json +47 -0
- package/scripts/prepare_dist.js +77 -0
- package/src/__snapshots__/index.test.ts.snap +66 -0
- package/src/index.html +40 -0
- package/src/index.test.ts +56 -0
- package/src/index.ts +84 -0
- package/src/utils/get-altair-html.ts +7 -0
- package/src/utils/get-dist.ts +6 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkaltair_app=self.webpackChunkaltair_app||[]).push([[773],{28773:function(e,t,s){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 P}});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<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 s=[],o=!1;const l=(e,t,u)=>{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<s;e+=1)l(d[e],t,u+1)}else t.length&&l(d,t,u+1)}else s.push(e)};return l(e,r(t)?t.split("."):t,0),o?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1};const m=/[^ ]+/g;class y{constructor({getFn:e=f.getFn}={}){this.norm=function(e=3){const t=new Map,s=Math.pow(10,e);return{get(e){const n=e.match(m).length;if(t.has(n))return t.get(n);const r=1/Math.sqrt(n),i=parseFloat(Math.round(r*s)/s);return t.set(n,i),i},clear(){t.clear()}}}(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,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<s;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!a(e)||o(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(e,t){let s={i:t,$:{}};this.keys.forEach((t,i)=>{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}const k=32;function L(e){let t={};for(let s=0,n=e.length;s<n;s+=1){const r=e.charAt(s);t[r]=(t[r]||0)|1<<n-s-1}return t}class 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}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:a,ignoreLocation:o},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const h=(e,t)=>{this.chunks.push({pattern:e,alphabet:L(e),startIndex:t})},l=this.pattern.length;if(l>k){let e=0;const t=l%k,s=l-t;for(;e<s;)h(this.pattern.substr(e,k),e),e+=k;if(t){const e=l-k;h(this.pattern.substr(e),e)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return s&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:a,ignoreLocation:o}=this.options;let h=[],l=0,u=!1;this.chunks.forEach(({pattern:t,alphabet:d,startIndex:g})=>{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>k)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<l;)y[M+e]=1,e+=1}}p=-1;let x=[],L=1,I=l+u;const S=1<<l-1;for(let f=0;f<l;f+=1){let n=0,i=I;for(;n<i;)_(t,{errors:f,currentLocation:d+i,expectedLocation:d,distance:r,ignoreLocation:h})<=g?n=i:I=i,i=Math.floor((I-n)/2+n);I=i;let a=Math.max(1,d-i+1),o=c?u:Math.min(d+i,u)+l,M=Array(o+2);M[o+1]=(1<<f)-1;for(let c=o;c>=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]&S&&(L=_(t,{errors:f,currentLocation:n,expectedLocation:d,distance:r,ignoreLocation:h}),L<=g)){if(g=L,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 v={isMatch:p>=0,score:Math.max(.001,L)};if(m){const e=function(e=[],t=f.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=e.length;i<c;i+=1){let c=e[i];c&&-1===n?n=i:!c&&-1!==n&&(r=i-1,r-n+1>=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&&(v.indices=e):v.isMatch=!1}return v}(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 S{constructor(e){this.pattern=e}static isMultiMatch(e){return v(e,this.multiRegex)}static isSingleMatch(e){return v(e,this.singleRegex)}search(){}}function v(e,t){const s=e.match(t);return s?s[1]:null}class b extends S{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 I(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 w extends S{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 $=[class extends S{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]}}},w,class extends S{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 S{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 S{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 S{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 S{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],A=$.length,C=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,F=new Set([b.type,w.type]),E=[];function R(e,t){for(let s=0,n=E.length;s<n;s+=1){let n=E[s];if(n.condition(e,t))return new n(e,t)}return new I(e,t)}const O=e=>!(!e.$and&&!e.$or),j=e=>({$and:Object.keys(e).map(t=>({[t]:e[t]}))});function q(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(j(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=R(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=j(e)),i(e)}function N(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 T(e,t){t.score=e.score}let z=(()=>{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<n;s+=1){const r=this._docs[s];e(r,s)&&(this.removeAt(s),s-=1,n-=1,t.push(r))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:s,includeScore:n,shouldSort:c,sortFn:a,ignoreFieldNorm:o}=this.options;let h=r(e)?r(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){e.forEach(e=>{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(N),n&&r.push(T),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=R(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=q(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<c;i+=1){const c=s(e.children[i],t,n);if(!c.length)return[];r.push(...c)}return r}case"$or":{const r=[];for(let i=0,c=e.children.length;i<c;i+=1){const c=s(e.children[i],t,n);if(c.length){r.push(...c);break}}return r}}},n={},r=[];return this._myIndex.records.forEach(({$:e,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=R(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})();z.parseQuery=q,function(...e){E.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(C).filter(e=>e&&!!e.trim()),n=[];for(let r=0,i=s.length;r<i;r+=1){const e=s[r];let i=!1,c=-1;for(;!i&&++c<A;){const s=$[c];let r=s.isMultiMatch(e);r&&(n.push(new s(r,t)),i=!0)}if(!i)for(c=-1;++c<A;){const s=$[c];let r=s.isSingleMatch(e);if(r){n.push(new s(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let r=0,i=[],c=0;for(let a=0,o=t.length;a<o;a+=1){const n=t[a];i.length=0,r=0;for(let t=0,a=n.length;t<a;t+=1){const a=n[t],{isMatch:o,indices:h,score:l}=a.search(e);if(!o){c=0,r=0,i.length=0;break}r+=1,c+=l,s&&(F.has(a.constructor.type)?i=[...i,...h]:i.push(h))}if(r){let e={isMatch:!0,score:c/r};return s&&(e.indices=i),e}}return{isMatch:!1,score:1}}});var D=z,Q=s(70708),K=s(51316);class P{constructor(e){this.searchIndex=[],e&&this.updateSchema(e)}updateSchema(e){this.schema=(0,Q.I)(e)}generateSearchIndex(){if(!this.schema)return[];let e=[];(0,K.Z)(this.schema).forEach(t=>{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 D(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}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach(function(e){n(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function o(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}(self.webpackChunkaltair_app=self.webpackChunkaltair_app||[]).push([[773],{28773:function(e,i,o){function c(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function u(e){return"string"==typeof e}function l(e){return"number"==typeof e}function d(e){return"object"==typeof e}function v(e){return null!=e}function g(e){return!e.trim().length}function y(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}o.r(i),o.d(i,{DocUtils:function(){return H}});var p=Object.prototype.hasOwnProperty,m=function(){function e(t){var n=this;h(this,e),this._keys=[],this._keyMap={};var r=0;t.forEach(function(e){var t=k(e);r+=t.weight,n._keys.push(t),n._keyMap[t.id]=t,r+=t.weight}),this._keys.forEach(function(e){e.weight/=r})}return f(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function k(e){var t=null,n=null,r=null,i=1;if(u(e)||c(e))r=e,t=M(e),n=b(e);else{if(!p.call(e,"name"))throw new Error("Missing name property in key");var a=e.name;if(r=a,p.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(a));t=M(a),n=b(a)}return{path:t,id:n,weight:i,src:r}}function M(e){return c(e)?e:e.split(".")}function b(e){return c(e)?e.join("."):e}var x={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return 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){var n=[],r=!1;return function e(t,i,a){if(v(t))if(i[a]){var o=t[i[a]];if(!v(o))return;if(a===i.length-1&&(u(o)||l(o)||function(e){return!0===e||!1===e||function(e){return d(e)&&null!==e}(e)&&"[object Boolean]"==y(e)}(o)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(o));else if(c(o)){r=!0;for(var s=0,h=o.length;s<h;s+=1)e(o[s],i,a+1)}else i.length&&e(o,i,a+1)}else n.push(t)}(e,u(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1},_=/[^ ]+/g,w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,r=void 0===n?x.getFn:n;h(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(_).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),a=parseFloat(Math.round(i*n)/n);return t.set(r,a),a},clear:function(){t.clear()}}}(3),this.getFn=r,this.isCreated=!1,this.setIndexRecords()}return f(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach(function(t,n){e._keysMap[t.id]=n})}},{key:"create",value:function(){var e=this;this.isCreated||!this.docs.length||(this.isCreated=!0,u(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(v(e)&&!g(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach(function(t,i){var a=n.getFn(e,t.path);if(v(a))if(c(a))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:a}];t.length;){var o=t.pop(),s=o.nestedArrIndex,h=o.value;if(v(h))if(u(h)&&!g(h)){var l={v:h,i:s,n:n.norm.get(h)};e.push(l)}else c(h)&&h.forEach(function(e,n){t.push({nestedArrIndex:n,value:e})})}r.$[i]=e}();else if(!g(a)){var o={v:a,n:n.norm.get(a)};r.$[i]=o}}),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function L(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?x.getFn:r,a=new w({getFn:i});return a.setKeys(e.map(k)),a.setSources(t),a.create(),a}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?x.getFn:n,i=e.keys,a=e.records,o=new w({getFn:r});return o.setKeys(i),o.setIndexRecords(a),o}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,a=void 0===i?0:i,o=t.expectedLocation,c=void 0===o?0:o,s=t.distance,u=void 0===s?x.distance:s,h=t.ignoreLocation,l=void 0===h?x.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(c-a);return u?f+d/u:d?1:f}var O=32;function A(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var j=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,a=void 0===i?x.location:i,o=r.threshold,c=void 0===o?x.threshold:o,s=r.distance,u=void 0===s?x.distance:s,l=r.includeMatches,f=void 0===l?x.includeMatches:l,d=r.findAllMatches,v=void 0===d?x.findAllMatches:d,g=r.minMatchCharLength,y=void 0===g?x.minMatchCharLength:g,p=r.isCaseSensitive,m=void 0===p?x.isCaseSensitive:p,k=r.ignoreLocation,M=void 0===k?x.ignoreLocation:k;if(h(this,e),this.options={location:a,threshold:c,distance:u,includeMatches:f,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:A(e),startIndex:t})},_=this.pattern.length;if(_>O){for(var w=0,L=_%O,S=_-L;w<S;)b(this.pattern.substr(w,O),w),w+=O;if(L){var I=_-O;b(this.pattern.substr(I),I)}}else b(this.pattern,0)}}return f(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var a=this.options,o=a.location,c=a.distance,u=a.threshold,h=a.findAllMatches,l=a.minMatchCharLength,f=a.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach(function(t){var n=t.pattern,i=t.alphabet,a=t.startIndex,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,a=void 0===i?x.location:i,o=r.distance,c=void 0===o?x.distance:o,s=r.threshold,u=void 0===s?x.threshold:s,h=r.findAllMatches,l=void 0===h?x.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?x.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?x.includeMatches:v,y=r.ignoreLocation,p=void 0===y?x.ignoreLocation:y;if(t.length>O)throw new Error("Pattern length exceeds max of 32.");for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(a,M)),_=u,w=b,L=d>1||g,S=L?Array(M):[];(m=e.indexOf(t,w))>-1;){var A=I(t,{currentLocation:m,expectedLocation:b,distance:c,ignoreLocation:p});if(_=Math.min(A,_),w=m+k,L)for(var j=0;j<k;)S[m+j]=1,j+=1}w=-1;for(var C=[],E=1,$=k+M,F=1<<k-1,R=0;R<k;R+=1){for(var P=0,T=$;P<T;)I(t,{errors:R,currentLocation:b+T,expectedLocation:b,distance:c,ignoreLocation:p})<=_?P=T:$=T,T=Math.floor(($-P)/2+P);$=T;var q=Math.max(1,b-T+1),N=l?M:Math.min(b+T,M)+k,D=Array(N+2);D[N+1]=(1<<R)-1;for(var z=N;z>=q;z-=1){var Q=z-1,K=n[e.charAt(Q)];if(L&&(S[Q]=+!!K),D[z]=(D[z+1]<<1|1)&K,R&&(D[z]|=(C[z+1]|C[z])<<1|1|C[z+1]),D[z]&F&&(E=I(t,{errors:R,currentLocation:Q,expectedLocation:b,distance:c,ignoreLocation:p}))<=_){if(_=E,(w=Q)<=b)break;q=Math.max(1,2*b-w)}}if(I(t,{errors:R+1,currentLocation:b,expectedLocation:b,distance:c,ignoreLocation:p})>_)break;C=D}var W={isMatch:w>=0,score:Math.max(.001,E)};if(L){var B=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.minMatchCharLength,n=[],r=-1,i=-1,a=0,o=e.length;a<o;a+=1){var c=e[a];c&&-1===r?r=a:!c&&-1!==r&&((i=a-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}(S,d);B.length?g&&(W.indices=B):W.isMatch=!1}return W}(e,n,i,{location:o+a,distance:c,threshold:u,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(s(d),s(k)))});var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),C=function(){function e(t){h(this,e),this.pattern=t}return f(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return E(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return E(e,this.singleRegex)}}]),e}();function E(e,t){var n=e.match(t);return n?n[1]:null}var $=function(e){r(n,e);var t=a(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.location,o=void 0===a?x.location:a,c=i.threshold,s=void 0===c?x.threshold:c,u=i.distance,l=void 0===u?x.distance:u,f=i.includeMatches,d=void 0===f?x.includeMatches:f,v=i.findAllMatches,g=void 0===v?x.findAllMatches:v,y=i.minMatchCharLength,p=void 0===y?x.minMatchCharLength:y,m=i.isCaseSensitive,k=void 0===m?x.isCaseSensitive:m,M=i.ignoreLocation,b=void 0===M?x.ignoreLocation:M;return h(this,n),(r=t.call(this,e))._bitapSearch=new j(e,{location:o,threshold:s,distance:l,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return f(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),n}(C),F=function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),n}(C),R=[function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),n}(C),F,function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),n}(C),function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),n}(C),function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),n}(C),function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),n}(C),function(e){r(n,e);var t=a(n);function n(e){return h(this,n),t.call(this,e)}return f(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),n}(C),$],P=R.length,T=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,q=new Set([$.type,F.type]),N=[];function D(e,t){for(var n=0,r=N.length;n<r;n+=1){var i=N[n];if(i.condition(e,t))return new i(e,t)}return new j(e,t)}var z=function(e){return!(!e.$and&&!e.$or)},Q=function(e){return{$and:Object.keys(e).map(function(t){return n({},t,e[t])})}};function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,a=function e(n){var r=Object.keys(n),a=function(e){return!!e.$path}(n);if(!a&&r.length>1&&!z(n))return e(Q(n));if(function(e){return!c(e)&&d(e)&&!z(e)}(n)){var o=a?n.$path:r[0],s=a?n.$val:n[o];if(!u(s))throw new Error(function(e){return"Invalid value for key ".concat(e)}(o));var h={keyId:b(o),pattern:s};return i&&(h.searcher=D(s,t)),h}var l={children:[],operator:r[0]};return r.forEach(function(t){var r=n[t];c(r)&&r.forEach(function(t){l.children.push(e(t))})}),l};return z(e)||(e=Q(e)),a(e)}function W(e,t){var n=e.matches;t.matches=[],v(n)&&n.forEach(function(e){if(v(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}})}function B(e,t){t.score=e.score}var J,U=((J=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;h(this,e),this.options=t(t({},x),r),this._keyStore=new m(this.options.keys),this.setCollection(n,i)}return f(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof w))throw new Error("Incorrect 'index' type");this._myIndex=t||L(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){!v(e)||(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,a=i.includeMatches,o=i.includeScore,c=i.shouldSort,s=i.sortFn,h=i.ignoreFieldNorm,f=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?x.ignoreFieldNorm:n;e.forEach(function(e){var t=1;e.matches.forEach(function(e){var n=e.key,i=e.norm,a=e.score,o=n?n.weight:null;t*=Math.pow(0===a&&o?Number.EPSILON:a,(o||1)*(r?1:i))}),e.score=t})}(f,{ignoreFieldNorm:h}),c&&f.sort(s),l(r)&&r>-1&&(f=f.slice(0,r)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?x.includeMatches:r,a=n.includeScore,o=void 0===a?x.includeScore:a,c=[];return i&&c.push(W),o&&c.push(B),e.map(function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach(function(t){t(e,r)}),r})}(f,this._docs,{includeMatches:a,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=D(e,this.options),n=this._myIndex.records,r=[];return n.forEach(function(e){var n=e.v,i=e.i,a=e.n;if(v(n)){var o=t.searchIn(n),c=o.isMatch,s=o.score,u=o.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:a,indices:u}]})}}),r}},{key:"_searchLogical",value:function(e){var t=this,n=K(e,this.options),r=function e(n,r,i){if(!n.children){var a=n.keyId,o=n.searcher,c=t._findMatches({key:t._keyStore.get(a),value:t._myIndex.getValueForItemAtKeyId(r,a),searcher:o});return c&&c.length?[{idx:i,item:r,matches:c}]:[]}switch(n.operator){case"$and":for(var u=[],h=0,l=n.children.length;h<l;h+=1){var f=e(n.children[h],r,i);if(!f.length)return[];u.push.apply(u,s(f))}return u;case"$or":for(var d=[],v=0,g=n.children.length;v<g;v+=1){var y=e(n.children[v],r,i);if(y.length){d.push.apply(d,s(y));break}}return d}},i={},a=[];return this._myIndex.records.forEach(function(e){var t=e.$,o=e.i;if(v(t)){var c=r(n,t,o);c.length&&(i[o]||(i[o]={idx:o,item:t,matches:[]},a.push(i[o])),c.forEach(function(e){var t,n=e.matches;(t=i[o].matches).push.apply(t,s(n))}))}}),a}},{key:"_searchObjectList",value:function(e){var t=this,n=D(e,this.options),r=this._myIndex,i=r.keys,a=r.records,o=[];return a.forEach(function(e){var r=e.$,a=e.i;if(v(r)){var c=[];i.forEach(function(e,i){c.push.apply(c,s(t._findMatches({key:e,value:r[i],searcher:n})))}),c.length&&o.push({idx:a,item:r,matches:c})}}),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!v(n))return[];var i=[];if(c(n))n.forEach(function(e){var n=e.v,a=e.i,o=e.n;if(v(n)){var c=r.searchIn(n),s=c.isMatch,u=c.score,h=c.indices;s&&i.push({score:u,key:t,value:n,idx:a,norm:o,indices:h})}});else{var a=n.v,o=n.n,s=r.searchIn(a),u=s.isMatch,h=s.score,l=s.indices;u&&i.push({score:h,key:t,value:a,norm:o,indices:l})}return i}}]),e}()).version="6.4.6",J.createIndex=L,J.parseIndex=S,J.config=x,J);U.parseQuery=K,function(){N.push.apply(N,arguments)}(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isCaseSensitive,i=void 0===r?x.isCaseSensitive:r,a=n.includeMatches,o=void 0===a?x.includeMatches:a,c=n.minMatchCharLength,s=void 0===c?x.minMatchCharLength:c,u=n.ignoreLocation,l=void 0===u?x.ignoreLocation:u,f=n.findAllMatches,d=void 0===f?x.findAllMatches:f,v=n.location,g=void 0===v?x.location:v,y=n.threshold,p=void 0===y?x.threshold:y,m=n.distance,k=void 0===m?x.distance:m;h(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:o,minMatchCharLength:s,findAllMatches:d,ignoreLocation:l,location:g,threshold:p,distance:k},this.pattern=i?t:t.toLowerCase(),this.query=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map(function(e){for(var n=e.trim().split(T).filter(function(e){return e&&!!e.trim()}),r=[],i=0,a=n.length;i<a;i+=1){for(var o=n[i],c=!1,s=-1;!c&&++s<P;){var u=R[s],h=u.isMultiMatch(o);h&&(r.push(new u(h,t)),c=!0)}if(!c)for(s=-1;++s<P;){var l=R[s],f=l.isSingleMatch(o);if(f){r.push(new l(f,t));break}}}return r})}(this.pattern,this.options)}return f(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,a=[],o=0,c=0,u=t.length;c<u;c+=1){var h=t[c];a.length=0,i=0;for(var l=0,f=h.length;l<f;l+=1){var d=h[l],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){o=0,i=0,a.length=0;break}i+=1,o+=p,r&&(q.has(d.constructor.type)?a=[].concat(s(a),s(y)):a.push(y))}if(i){var m={isMatch:!0,score:o/i};return r&&(m.indices=a),m}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}());var V=U,Z=o(70708),G=o(51316),H=function(){function e(t){h(this,e),this.searchIndex=[],t&&this.updateSchema(t)}return f(e,[{key:"updateSchema",value:function(e){this.schema=(0,Z.I)(e)}},{key:"generateSearchIndex",value:function(){var e=this;if(!this.schema)return[];var t=[];(0,G.Z)(this.schema).forEach(function(n){t=[].concat(s(t),s(e.getTypeIndices(n,!0,t)))});var n=this.schema.getTypeMap();return Object.keys(n).forEach(function(r){/^__/.test(r)||(t=[].concat(s(t),s(e.getTypeIndices(n[r],!1,t))))}),this.searchIndex=t,t}},{key:"getFieldsIndices",value:function(e,n,r,i){var a=this,o=[];return Object.keys(e).forEach(function(c){var u=e[c],h={search:u.name,name:u.name,description:u.description?u.description:"",args:u.args?u.args.map(function(e){return{name:e.name,description:e.description}}):[],cat:"field",type:n.name,isQuery:r,highlight:"field"};o=[].concat(s(o),[h]),u.args&&u.args.length&&u.args.forEach(function(e){o=[].concat(s(o),[t(t({},h),{},{search:e.name,highlight:"argument"})])}),u.type&&(o=[].concat(s(o),s(a.getTypeIndices(u.type,!1,[].concat(s(i),s(o))).filter(function(e){return!!e}))))}),o}},{key:"getTypeIndices",value:function(e,t,n){var r=null;if(!e.name)return[];if(n.some(function(t){return t.name===e.name&&"type"===t.cat}))return[];e.getFields&&(r=e.getFields());var i=[{search:e.name,name:e.name,cat:"type",description:e.description?e.description:"",isRoot:t,highlight:"type"}];return r?[].concat(i,s(this.getFieldsIndices(r,e,t,[].concat(s(n),i)).filter(function(e){return!!e}))):i}},{key:"searchDocs",value:function(e){return this.searchIndex.length?new V(this.searchIndex,{keys:["search"],threshold:.4}).search(e).map(function(e){return e.item}):[]}},{key:"generateQuery",value:function(e,n,r){var i="",a=!1;if(this.schema){switch(n){case this.schema.getQueryType()&&this.schema.getQueryType().name:i+="query";break;case this.schema.getMutationType()&&this.schema.getMutationType().name:i+="mutation";break;case this.schema.getSubscriptionType()&&this.schema.getSubscriptionType().name:i+="subscription";break;default:i+="fragment _____ on ".concat(n),a=!0}var o=this.generateFieldData(e,n,[],1,r);if(o){i+="{\n".concat(o.query,"\n}");var c=t({},o.meta);return c.hasArgs=a||c.hasArgs,{query:i,meta:c}}}}},{key:"cleanName",value:function(e){return e.replace(/[\[\]!]/g,"")}},{key:"generateFieldData",value:function(e,t,n,r){var i=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!(e&&t&&n&&this.schema))return{query:"",meta:{}};var o=a.tabSize||2,c=this.schema.getType(t),u=c&&c.getFields()[e];if(!u)return{query:"",meta:{}};var h={hasArgs:!1},l=" ".repeat(r*o)+u.name;u.args&&u.args.length&&(h.hasArgs=!0,l+="(".concat(u.args.reduce(function(e,t){return e+", "+t.name+": ______"},"").substring(2),")"));var f=this.cleanName(u.type.inspect()),d=this.schema.getType(f);if(n.filter(function(e){return e.type===f}).length)return{query:"",meta:{}};if(r>=(a.addQueryDepthLimit||0))return{query:"",meta:{}};var v=d&&d.getFields&&d.getFields(),g="";return v&&(g=Object.keys(v).reduce(function(t,o){if(n.filter(function(e){return e.name===o&&e.type===f}).length)return"";var c=i.generateFieldData(o,f,[].concat(s(n),[{name:e,type:f}]),r+1,a);if(!c)return t;var u=c.query;return h.hasArgs=h.hasArgs||c.meta.hasArgs||!1,u?t+"\n"+u:t},"").substring(1)),g&&(l+="{\n".concat(g,"\n"),l+=" ".repeat(r*o)+"}"),{query:l,meta:h}}}]),e}()}}])}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkaltair_app=self.webpackChunkaltair_app||[]).push([[790],{98790:function(t,n,e){"use strict";var o,i=this&&this.__extends||(o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionCableSubscriptionProvider=void 0;var s=e(71251),c=e(50591),u=r(e(80650)),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.execute=function(t){var n=this,e=u.default.createConsumer(this.subscriptionUrl);return new c.Observable(function(o){n.subscription=e.subscriptions.create(Object.assign({},{channel:n.connectionParams.channel||"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{}),{connected:function(){this.perform("execute",t)},received:function(t){(t.result.data||t.result.errors)&&o.next(t.result),t.more||o.complete()}})})},n.prototype.close=function(){var t;null===(t=this.subscription)||void 0===t||t.unsubscribe()},n}(s.SubscriptionProvider);n.ActionCableSubscriptionProvider=l},80650:function(t,n,e){var o,i;(function(){(function(){(function(){var t=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},WebSocket:window.WebSocket,logger:window.console,createConsumer:function(t){var n;return null==t&&(t=null!=(n=this.getConfig("url"))?n:this.INTERNAL.default_mount_path),new r.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var n;return null!=(n=document.head.querySelector("meta[name='action-cable-"+t+"']"))?n.getAttribute("content"):void 0},createWebSocketURL:function(t){var n;return t&&!/^wss?:/i.test(t)?((n=document.createElement("a")).href=t,n.href=n.href,n.protocol=n.protocol.replace("http","ws"),n.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var n,e;if(n=1<=arguments.length?t.call(arguments,0):[],this.debugging)return n.push(Date.now()),(e=this.logger).log.apply(e,["[ActionCable]"].concat(t.call(n)))}}}).call(this)}).call(this);var r=this.ActionCable;(function(){(function(){r.ConnectionMonitor=function(){var t,n,e;function o(t){this.connection=t,this.visibilityDidChange=function(t,n){return function(){return t.apply(n,arguments)}}(this.visibilityDidChange,this),this.reconnectAttempts=0}return o.pollInterval={min:3,max:30},o.staleThreshold=6,o.prototype.start=function(){if(!this.isRunning())return this.startedAt=n(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},o.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=n(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped")},o.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},o.prototype.recordPing=function(){return this.pingedAt=n()},o.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")},o.prototype.recordDisconnect=function(){return this.disconnectedAt=n(),r.log("ConnectionMonitor recorded disconnect")},o.prototype.startPolling=function(){return this.stopPolling(),this.poll()},o.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},o.prototype.poll=function(){return this.pollTimeout=setTimeout((t=this,function(){return t.reconnectIfStale(),t.poll()}),this.getPollInterval());var t},o.prototype.getPollInterval=function(){var n,e,o,i;return o=(i=this.constructor.pollInterval).min,e=i.max,n=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*t(n,o,e))},o.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return r.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+e(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?r.log("ConnectionMonitor skipping reopening recent disconnect"):(r.log("ConnectionMonitor reopening"),this.connection.reopen())},o.prototype.connectionIsStale=function(){var t;return e(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},o.prototype.disconnectedRecently=function(){return this.disconnectedAt&&e(this.disconnectedAt)<this.constructor.staleThreshold},o.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout((t=this,function(){if(t.connectionIsStale()||!t.connection.isOpen())return r.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}),200);var t},n=function(){return(new Date).getTime()},e=function(t){return(n()-t)/1e3},t=function(t,n,e){return Math.max(n,Math.min(e,t))},o}()}).call(this),(function(){var t,n,e,o,i=[].slice,s=[].indexOf||function(t){for(var n=0,e=this.length;n<e;n++)if(n in this&&this[n]===t)return n;return-1};t=(e=r.INTERNAL).message_types,o=2<=(n=e.protocols).length?i.call(n,0,n.length-1):(0,[]),r.Connection=function(){function e(t){this.consumer=t,this.open=function(t,n){return function(){return t.apply(n,arguments)}}(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new r.ConnectionMonitor(this),this.disconnected=!0}return e.reopenDelay=500,e.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},e.prototype.open=function(){return this.isActive()?(r.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(r.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+n),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new r.WebSocket(this.consumer.url,n),this.installEventHandlers(),this.monitor.start(),!0)},e.prototype.close=function(t){var n;if((null!=t?t:{allowReconnect:!0}).allowReconnect||this.monitor.stop(),this.isActive())return null!=(n=this.webSocket)?n.close():void 0},e.prototype.reopen=function(){if(r.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(t){return r.log("Failed to reopen WebSocket",t)}finally{r.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},e.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},e.prototype.isOpen=function(){return this.isState("open")},e.prototype.isActive=function(){return this.isState("open","connecting")},e.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),s.call(o,t)>=0},e.prototype.isState=function(){var t,n;return n=1<=arguments.length?i.call(arguments,0):[],t=this.getState(),s.call(n,t)>=0},e.prototype.getState=function(){var t,n;for(n in WebSocket)if(WebSocket[n]===(null!=(t=this.webSocket)?t.readyState:void 0))return n.toLowerCase();return null},e.prototype.installEventHandlers=function(){var t,n;for(t in this.events)n=this.events[t].bind(this),this.webSocket["on"+t]=n},e.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},e.prototype.events={message:function(n){var e,o,i,r;if(this.isProtocolSupported())switch(i=JSON.parse(n.data),e=i.identifier,o=i.message,r=i.type,r){case t.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case t.ping:return this.monitor.recordPing();case t.confirmation:return this.subscriptions.notify(e,"connected");case t.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",o)}},open:function(){if(r.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return r.log("WebSocket onerror event")}},e}()}).call(this),(function(){var t=[].slice;r.Subscriptions=function(){function n(t){this.consumer=t,this.subscriptions=[]}return n.prototype.create=function(t,n){var e,o;return o=new r.Subscription(this.consumer,"object"==typeof(e=t)?e:{channel:e},n),this.add(o)},n.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},n.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},n.prototype.reject=function(t){var n,e,o,i,r;for(i=[],n=0,e=(o=this.findAll(t)).length;n<e;n++)this.forget(r=o[n]),this.notify(r,"rejected"),i.push(r);return i},n.prototype.forget=function(t){var n;return this.subscriptions=(function(){var e,o,i,r;for(r=[],e=0,o=(i=this.subscriptions).length;e<o;e++)(n=i[e])!==t&&r.push(n);return r}).call(this),t},n.prototype.findAll=function(t){var n,e,o,i,r;for(i=[],n=0,e=(o=this.subscriptions).length;n<e;n++)(r=o[n]).identifier===t&&i.push(r);return i},n.prototype.reload=function(){var t,n,e,o;for(o=[],t=0,n=(e=this.subscriptions).length;t<n;t++)o.push(this.sendCommand(e[t],"subscribe"));return o},n.prototype.notifyAll=function(){var n,e,o,i,r,s;for(e=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],s=[],o=0,i=(r=this.subscriptions).length;o<i;o++)s.push(this.notify.apply(this,[r[o],e].concat(t.call(n))));return s},n.prototype.notify=function(){var n,e,o,i,r,s,c;for(s=arguments[0],e=arguments[1],n=3<=arguments.length?t.call(arguments,2):[],r=[],o=0,i=(c="string"==typeof s?this.findAll(s):[s]).length;o<i;o++)r.push("function"==typeof(s=c[o])[e]?s[e].apply(s,n):void 0);return r},n.prototype.sendCommand=function(t,n){return this.consumer.send({command:n,identifier:t.identifier})},n}()}).call(this),(function(){r.Subscription=function(){var t;function n(n,e,o){this.consumer=n,null==e&&(e={}),this.identifier=JSON.stringify(e),t(this,o)}return n.prototype.perform=function(t,n){return null==n&&(n={}),n.action=t,this.send(n)},n.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},n.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},t=function(t,n){var e;if(null!=n)for(e in n)t[e]=n[e];return t},n}()}).call(this),(function(){r.Consumer=function(){function t(t){this.url=t,this.subscriptions=new r.Subscriptions(this),this.connection=new r.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}).call(this)}).call(this),t.exports?t.exports=r:void 0!==(i="function"==typeof(o=r)?o.call(n,e,n,t):o)&&(t.exports=i)}).call(this)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkaltair_app=self.webpackChunkaltair_app||[]).push([[790],{98790:function(t,n,e){"use strict";var o,i=this&&this.__extends||(o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionCableSubscriptionProvider=void 0;var s=e(71251),c=e(50591),u=r(e(80650)),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.execute=function(t){var n=this,e=u.default.createConsumer(this.subscriptionUrl);return new c.Observable(function(o){n.subscription=e.subscriptions.create(Object.assign({},{channel:n.connectionParams.channel||"GraphqlChannel",channelId:Math.round(Date.now()+1e5*Math.random()).toString(16)},{}),{connected:function(){this.perform("execute",t)},received:function(t){(t.result.data||t.result.errors)&&o.next(t.result),t.more||o.complete()}})})},n.prototype.close=function(){var t;null===(t=this.subscription)||void 0===t||t.unsubscribe()},n}(s.SubscriptionProvider);n.ActionCableSubscriptionProvider=l},80650:function(t,n,e){var o,i;(function(){(function(){(function(){var t=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},WebSocket:window.WebSocket,logger:window.console,createConsumer:function(t){var n;return null==t&&(t=null!=(n=this.getConfig("url"))?n:this.INTERNAL.default_mount_path),new r.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var n;return null!=(n=document.head.querySelector("meta[name='action-cable-"+t+"']"))?n.getAttribute("content"):void 0},createWebSocketURL:function(t){var n;return t&&!/^wss?:/i.test(t)?((n=document.createElement("a")).href=t,n.href=n.href,n.protocol=n.protocol.replace("http","ws"),n.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var n,e;if(n=1<=arguments.length?t.call(arguments,0):[],this.debugging)return n.push(Date.now()),(e=this.logger).log.apply(e,["[ActionCable]"].concat(t.call(n)))}}}).call(this)}).call(this);var r=this.ActionCable;(function(){(function(){r.ConnectionMonitor=function(){var t,n,e;function o(t){this.connection=t,this.visibilityDidChange=function(t,n){return function(){return t.apply(n,arguments)}}(this.visibilityDidChange,this),this.reconnectAttempts=0}return o.pollInterval={min:3,max:30},o.staleThreshold=6,o.prototype.start=function(){if(!this.isRunning())return this.startedAt=n(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},o.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=n(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped")},o.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},o.prototype.recordPing=function(){return this.pingedAt=n()},o.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")},o.prototype.recordDisconnect=function(){return this.disconnectedAt=n(),r.log("ConnectionMonitor recorded disconnect")},o.prototype.startPolling=function(){return this.stopPolling(),this.poll()},o.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},o.prototype.poll=function(){return this.pollTimeout=setTimeout((t=this,function(){return t.reconnectIfStale(),t.poll()}),this.getPollInterval());var t},o.prototype.getPollInterval=function(){var n,e,o,i;return o=(i=this.constructor.pollInterval).min,e=i.max,n=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*t(n,o,e))},o.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return r.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+e(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?r.log("ConnectionMonitor skipping reopening recent disconnect"):(r.log("ConnectionMonitor reopening"),this.connection.reopen())},o.prototype.connectionIsStale=function(){var t;return e(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},o.prototype.disconnectedRecently=function(){return this.disconnectedAt&&e(this.disconnectedAt)<this.constructor.staleThreshold},o.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout((t=this,function(){if(t.connectionIsStale()||!t.connection.isOpen())return r.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}),200);var t},n=function(){return(new Date).getTime()},e=function(t){return(n()-t)/1e3},t=function(t,n,e){return Math.max(n,Math.min(e,t))},o}()}).call(this),(function(){var t,n,e,o,i=[].slice,s=[].indexOf||function(t){for(var n=0,e=this.length;n<e;n++)if(n in this&&this[n]===t)return n;return-1};t=(e=r.INTERNAL).message_types,o=2<=(n=e.protocols).length?i.call(n,0,n.length-1):[],r.Connection=function(){function e(t){this.consumer=t,this.open=function(t,n){return function(){return t.apply(n,arguments)}}(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new r.ConnectionMonitor(this),this.disconnected=!0}return e.reopenDelay=500,e.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},e.prototype.open=function(){return this.isActive()?(r.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(r.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+n),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new r.WebSocket(this.consumer.url,n),this.installEventHandlers(),this.monitor.start(),!0)},e.prototype.close=function(t){var n;if((null!=t?t:{allowReconnect:!0}).allowReconnect||this.monitor.stop(),this.isActive())return null!=(n=this.webSocket)?n.close():void 0},e.prototype.reopen=function(){if(r.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(t){return r.log("Failed to reopen WebSocket",t)}finally{r.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},e.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},e.prototype.isOpen=function(){return this.isState("open")},e.prototype.isActive=function(){return this.isState("open","connecting")},e.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),s.call(o,t)>=0},e.prototype.isState=function(){var t,n;return n=1<=arguments.length?i.call(arguments,0):[],t=this.getState(),s.call(n,t)>=0},e.prototype.getState=function(){var t,n;for(n in WebSocket)if(WebSocket[n]===(null!=(t=this.webSocket)?t.readyState:void 0))return n.toLowerCase();return null},e.prototype.installEventHandlers=function(){var t,n;for(t in this.events)n=this.events[t].bind(this),this.webSocket["on"+t]=n},e.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},e.prototype.events={message:function(n){var e,o,i,r;if(this.isProtocolSupported())switch(i=JSON.parse(n.data),e=i.identifier,o=i.message,r=i.type,r){case t.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case t.ping:return this.monitor.recordPing();case t.confirmation:return this.subscriptions.notify(e,"connected");case t.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",o)}},open:function(){if(r.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return r.log("WebSocket onerror event")}},e}()}).call(this),(function(){var t=[].slice;r.Subscriptions=function(){function n(t){this.consumer=t,this.subscriptions=[]}return n.prototype.create=function(t,n){var e,o;return o=new r.Subscription(this.consumer,"object"==typeof(e=t)?e:{channel:e},n),this.add(o)},n.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},n.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},n.prototype.reject=function(t){var n,e,o,i,r;for(i=[],n=0,e=(o=this.findAll(t)).length;n<e;n++)this.forget(r=o[n]),this.notify(r,"rejected"),i.push(r);return i},n.prototype.forget=function(t){var n;return this.subscriptions=(function(){var e,o,i,r;for(r=[],e=0,o=(i=this.subscriptions).length;e<o;e++)(n=i[e])!==t&&r.push(n);return r}).call(this),t},n.prototype.findAll=function(t){var n,e,o,i,r;for(i=[],n=0,e=(o=this.subscriptions).length;n<e;n++)(r=o[n]).identifier===t&&i.push(r);return i},n.prototype.reload=function(){var t,n,e,o;for(o=[],t=0,n=(e=this.subscriptions).length;t<n;t++)o.push(this.sendCommand(e[t],"subscribe"));return o},n.prototype.notifyAll=function(){var n,e,o,i,r,s;for(e=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],s=[],o=0,i=(r=this.subscriptions).length;o<i;o++)s.push(this.notify.apply(this,[r[o],e].concat(t.call(n))));return s},n.prototype.notify=function(){var n,e,o,i,r,s,c;for(s=arguments[0],e=arguments[1],n=3<=arguments.length?t.call(arguments,2):[],r=[],o=0,i=(c="string"==typeof s?this.findAll(s):[s]).length;o<i;o++)r.push("function"==typeof(s=c[o])[e]?s[e].apply(s,n):void 0);return r},n.prototype.sendCommand=function(t,n){return this.consumer.send({command:n,identifier:t.identifier})},n}()}).call(this),(function(){r.Subscription=function(){var t;function n(n,e,o){this.consumer=n,null==e&&(e={}),this.identifier=JSON.stringify(e),t(this,o)}return n.prototype.perform=function(t,n){return null==n&&(n={}),n.action=t,this.send(n)},n.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},n.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},t=function(t,n){var e;if(null!=n)for(e in n)t[e]=n[e];return t},n}()}).call(this),(function(){r.Consumer=function(){function t(t){this.url=t,this.subscriptions=new r.Subscriptions(this),this.connection=new r.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}).call(this)}).call(this),t.exports?t.exports=r:void 0!==(i="function"==typeof(o=r)?o.call(n,e,n,t):o)&&(t.exports=i)}).call(this)}}]);
|