(this["webpackJsonp@subql/indexer-admin"]=this["webpackJsonp@subql/indexer-admin"]||[]).push([[17],{1324:function(e,t,n){"use strict";n.r(t);var i=n(1311),r=n(15),a=n(73),o=n(1392),l=(n(34),n(0),n(90),Object.defineProperty),u=function(e,t){return l(e,"name",{value:t,configurable:!0})};function c(e,t,n){var i=f(n,p(t.string));if(i){var r=null!==t.type&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:i,from:{line:e.line,ch:r},to:{line:e.line,ch:t.end}}}}function f(e,t){return t?s(s(e.map((function(e){return{proximity:d(p(e.text),t),entry:e}})),(function(e){return e.proximity<=2})),(function(e){return!e.entry.isDeprecated})).sort((function(e,t){return(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.text.length-t.entry.text.length})).map((function(e){return e.entry})):s(e,(function(e){return!e.isDeprecated}))}function s(e,t){var n=e.filter(t);return 0===n.length?e:n}function p(e){return e.toLowerCase().replace(/\W/g,"")}function d(e,t){var n=y(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}function y(e,t){var n,i,r=[],a=e.length,o=t.length;for(n=0;n<=a;n++)r[n]=[n];for(i=1;i<=o;i++)r[0][i]=i;for(n=1;n<=a;n++)for(i=1;i<=o;i++){var l=e[n-1]===t[i-1]?0:1;r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+l),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+l))}return r[a][o]}function v(e,t,n){var i="Invalid"===t.state.kind?t.state.prevState:t.state,o=i.kind,l=i.step;if("Document"===o&&0===l)return c(e,t,[{text:"{"}]);var u=n.variableToType;if(u){var f=m(u,t.state);if("Document"===o||"Variable"===o&&0===l)return c(e,t,Object.keys(u).map((function(e){return{text:'"'.concat(e,'": '),type:u[e]}})));if("ObjectValue"===o||"ObjectField"===o&&0===l)if(f.fields)return c(e,t,Object.keys(f.fields).map((function(e){return f.fields[e]})).map((function(e){return{text:'"'.concat(e.name,'": '),type:e.type,description:e.description}})));if("StringValue"===o||"NumberValue"===o||"BooleanValue"===o||"NullValue"===o||"ListValue"===o&&1===l||"ObjectField"===o&&2===l||"Variable"===o&&2===l){var s=f.type?Object(r.o)(f.type):void 0;if(s instanceof r.b)return c(e,t,[{text:"{"}]);if(s instanceof r.a)return c(e,t,s.getValues().map((function(e){return{text:'"'.concat(e.name,'"'),type:s,description:e.description}})));if(s===a.a)return c(e,t,[{text:"true",type:a.a,description:"Not false."},{text:"false",type:a.a,description:"Not true."}])}}}function m(e,t){var n={type:null,fields:null};return Object(o.a)(t,(function(t){if("Variable"===t.kind)n.type=e[t.name];else if("ListValue"===t.kind){var i=n.type?Object(r.p)(n.type):void 0;n.type=i instanceof r.d?i.ofType:null}else if("ObjectValue"===t.kind){var a=n.type?Object(r.o)(n.type):void 0;n.fields=a instanceof r.b?a.getFields():null}else if("ObjectField"===t.kind){var o=t.name&&n.fields?n.fields[t.name]:null;n.type=null===o||void 0===o?void 0:o.type}})),n}u(c,"hintList"),u(f,"filterAndSortList"),u(s,"filterNonEmpty"),u(p,"normalizeText"),u(d,"getProximity"),u(y,"lexicalDistance"),i.C.registerHelper("hint","graphql-variables",(function(e,t){var n=e.getCursor(),r=e.getTokenAt(n),a=v(n,r,t);return(null===a||void 0===a?void 0:a.list)&&a.list.length>0&&(a.from=i.C.Pos(a.from.line,a.from.ch),a.to=i.C.Pos(a.to.line,a.to.ch),i.C.signal(e,"hasCompletion",e,a,r)),a})),u(v,"getVariablesHint"),u(m,"getTypeInfo")},1392:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));function i(e,t){for(var n=[],i=e;null===i||void 0===i?void 0:i.kind;)n.push(i),i=i.prevState;for(var r=n.length-1;r>=0;r--)t(n[r])}(0,Object.defineProperty)(i,"name",{value:"forEachState",configurable:!0})}}]);
//# sourceMappingURL=17.f1207116.chunk.js.map