(this["webpackJsonp@subql/indexer-admin"]=this["webpackJsonp@subql/indexer-admin"]||[]).push([[18],{1316:function(e,t,n){"use strict";n.r(t),n.d(t,"c",(function(){return l}));var r=n(1311),i=Object.defineProperty,a=function(e,t){return i(e,"name",{value:t,configurable:!0})};function s(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}a(s,"_mergeNamespaces");var o={exports:{}};!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(s(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))})),a(r,"getOption");var i={Backspace:c,Enter:u};function s(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=o(n))}}function o(e){return function(t){return p(t,e)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function c(t){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),s=t.listSelections(),o=0;o<s.length;o++){if(!s[o].empty())return e.Pass;var c=d(t,s[o].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}for(o=s.length-1;o>=0;o--){var u=s[o].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function u(t){var n=l(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var o=d(t,a[s].head);if(!o||i.indexOf(o)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),f(t,-1),a=t.listSelections();for(var n=0;n<a.length;n++){var r=a[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function f(e,t){for(var n=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var s=r[a];s.head==e.getCursor()&&(i=a);var o=s.head.ch||t>0?{line:s.head.line,ch:s.head.ch+t}:{line:s.head.line-1};n.push({anchor:o,head:o})}e.setSelections(n,i)}function h(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function p(t,i){var a=l(t);if(!a||t.getOption("disableInput"))return e.Pass;var s=r(a,"pairs"),o=s.indexOf(i);if(-1==o)return e.Pass;for(var c,u=r(a,"closeBefore"),p=r(a,"triples"),d=s.charAt(o+1)==i,v=t.listSelections(),b=o%2==0,y=0;y<v.length;y++){var S,O=v[y],P=O.head,k=t.getRange(P,n(P.line,P.ch+1));if(b&&!O.empty())S="surround";else if(!d&&b||k!=i)if(d&&P.ch>1&&p.indexOf(i)>=0&&t.getRange(n(P.line,P.ch-2),P)==i+i){if(P.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(P.line,P.ch-2))))return e.Pass;S="addFour"}else if(d){var x=0==P.ch?" ":t.getRange(n(P.line,P.ch-1),P);if(e.isWordChar(k)||x==i||e.isWordChar(x))return e.Pass;S="both"}else{if(!b||!(0===k.length||/\s/.test(k)||u.indexOf(k)>-1))return e.Pass;S="both"}else S=d&&g(t,P)?"both":p.indexOf(i)>=0&&t.getRange(P,n(P.line,P.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=S)return e.Pass}else c=S}var m=o%2?s.charAt(o-1):i,A=o%2?i:s.charAt(o+1);t.operation((function(){if("skip"==c)f(t,1);else if("skipThree"==c)f(t,3);else if("surround"==c){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=m+e[n]+A;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=h(e[n]);t.setSelections(e)}else"both"==c?(t.replaceSelection(m+A,null),t.triggerElectric(m+A),f(t,-1)):"addFour"==c&&(t.replaceSelection(m+m+m+m,"before"),f(t,1))}))}function d(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function g(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(s,"ensureBound"),s(t.pairs+"`"),a(o,"handler"),a(l,"getConfig"),a(c,"handleBackspace"),a(u,"handleEnter"),a(f,"moveSel"),a(h,"contractSelection"),a(p,"handleChar"),a(d,"charsAround"),a(g,"stringStartsAfter")}(r.a.exports);var l=s({__proto__:null,default:o.exports},[o.exports])}}]);
//# sourceMappingURL=18.888aa32b.chunk.js.map